/* This file was generated by the Hex-Rays decompiler version 9.1.0.250226. Copyright (c) 2007-2021 Hex-Rays Detected compiler: Visual C++ */ #include #include #include //------------------------------------------------------------------------- // Function declarations #define __thiscall __cdecl // Test compile in C mode int sub_401000(); char __cdecl sub_401110(char a1); char __cdecl sub_401130(const char *a1, float a2); char __cdecl sub_4011D0(const char *a1); int sub_401250(); ofstream *sub_401260(); // void __cdecl unknown_libname_1(); idb int __cdecl sub_4012A0(int a1); int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd); BOOL __cdecl sub_401490(HINSTANCE a1); HWND __cdecl sub_401520(HINSTANCE hInstance, int nCmdShow); int __stdcall sub_401580(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // idb DWORD sub_4017C0(); int __cdecl sub_4017D0(HWND hWnd); // idb void __cdecl sub_4017E0(int a1, unsigned int a2, int a3); char sub_401CC0(); void sub_401D30(); BOOL sub_401D40(); int __cdecl sub_401D50(int a1, int a2, int a3); int sub_401D80(); int sub_401DA0(); int sub_401DC0(); int sub_401FC0(); BOOL sub_402220(); void sub_402240(); int sub_402420(); ofstream *sub_402430(); // void __cdecl unknown_libname_2(); idb void __cdecl sub_402470(HDC a1); void __cdecl sub_4024A0(float a1, float a2, float a3, float a4); void sub_4024F0(); void __cdecl sub_402580(float a1, float a2, float a3); int __cdecl sub_4025C0(HWND hWnd); // idb int sub_4025E0(); int sub_4026D0(); BOOL sub_4026F0(); HGDIOBJ sub_402720(); HGDIOBJ sub_402730(); HGDIOBJ __cdecl sub_402740(char a1, char a2, char a3); HGDIOBJ __cdecl sub_4027D0(unsigned __int8 a1, char a2, char a3); char __cdecl sub_402840(int a1, int a2, int a3, int a4, int a5, int a6); char __cdecl sub_4028E0(float *a1, int cpt); char __cdecl sub_4029E0(int a1, int a2, int a3, int a4, int a5, int a6); char __cdecl sub_402AD0(int a1, int a2, int a3, int a4, int a5, int a6); char __cdecl sub_402B10(int a1, int a2); char sub_402B90(); float *__cdecl sub_402CD0(float *a1); int __cdecl sub_402D40(int a1, int a2, int a3); float *__cdecl sub_402D90(float *a1); char sub_402E60(); char sub_402F00(); int sub_402FA0(); int sub_4030D0(); ofstream *sub_4030E0(); // void __cdecl unknown_libname_3(); idb void __thiscall sub_403130(_DWORD *this); _BYTE *__thiscall sub_403160(_BYTE *this); char sub_403170(); int sub_4033B0(); ofstream *sub_4033C0(); // void __cdecl unknown_libname_4(); idb _DWORD *__thiscall sub_403400(_DWORD *this); char __thiscall sub_403420(_DWORD *this); int __thiscall sub_403530(_DWORD *this, int a2); int sub_403590(); ofstream *sub_4035A0(); // void __cdecl unknown_libname_5(); idb char *__thiscall sub_4035E0(char *this); char __thiscall sub_403610(int this); int __thiscall sub_4037C0(int this); int __thiscall sub_4038C0(_DWORD *this, int a2); int sub_4039B0(); ofstream *sub_4039C0(); // void __cdecl unknown_libname_6(); idb _DWORD *__thiscall sub_403A00(_DWORD *this); char __thiscall sub_403A40(int this); int __thiscall sub_403E40(_DWORD *this, int a2); int sub_403E90(); ofstream *sub_403EA0(); // void __cdecl unknown_libname_7(); idb _DWORD *__thiscall sub_403EE0(_DWORD *this); char __thiscall sub_403F60(float *this); char __stdcall sub_4044A0(int a1, float a2, int a3, char a4); int __thiscall sub_404720(_DWORD *this, int a2); int sub_404980(); ofstream *sub_404990(); // void __cdecl unknown_libname_8(); idb char *__thiscall sub_4049D0(char *this); void __thiscall sub_404A20(_DWORD *this); void __thiscall sub_404C30(char *this, char a2); int __thiscall sub_404C90(_DWORD *this, int a2); int sub_404DF0(); ofstream *sub_404E00(); // void __cdecl unknown_libname_9(); idb char *__thiscall sub_404E40(char *this); char __thiscall sub_404E90(int *this); int __thiscall sub_405070(_DWORD *this, int a2); int sub_405270(); ofstream *sub_405280(); // void __cdecl unknown_libname_10(); idb char *__thiscall sub_4052C0(char *this); char __thiscall sub_405300(int this); void __thiscall sub_405430(int this, int a2); int sub_4055A0(); ofstream *sub_4055B0(); // void __cdecl unknown_libname_11(); idb char *__thiscall sub_4055F0(char *this); char __thiscall sub_405670(int *this); int __thiscall sub_405840(_DWORD *this, int a2); int sub_405BB0(); ofstream *sub_405BC0(); // void __cdecl unknown_libname_12(); idb char *__thiscall sub_405C00(char *this); char __thiscall sub_405C60(float *this); int __cdecl nullsub_1(_DWORD); // weak void __thiscall sub_405E20(int this, int a2); int sub_406030(); ofstream *sub_406040(); // void __cdecl unknown_libname_13(); idb _BYTE *__thiscall sub_406080(_BYTE *this); void __thiscall sub_4060F0(_DWORD *this); char __thiscall sub_406150(_DWORD *this); _DWORD *__fastcall sub_406190(_DWORD *a1, int a2, int a3); int __thiscall sub_406320(void *this, int a2, char a3); int __thiscall sub_406370(_DWORD *this, int a2); void __thiscall sub_406470(void *this, _DWORD *Block); _DWORD *sub_4064B0(); void __thiscall sub_4064E0(void *this, _DWORD *Block); int __stdcall sub_4065D0(int a1); int sub_406610(); ofstream *sub_406620(); // void __cdecl unknown_libname_14(); idb // ofstream *__thiscall ofstream::ofstream(ofstream *__hidden this); idb _DWORD *__thiscall sub_4066E6(ios *this, char a2); int __thiscall sub_406711(_DWORD *this); // void __thiscall ofstream::open(ofstream *__hidden this, const char *FileName, int, int); idb // int __thiscall unknown_libname_15(_DWORD); weak // void __thiscall ios::~ios(ios *__hidden this); idb // struct ostream *__thiscall ostream::write(ostream *__hidden this, const char *, int); idb // int __thiscall ostream::operator<<(ostream *this, char *); idb _DWORD *__thiscall sub_406CAC(ios *this, char a2); int __thiscall sub_406D3C(_DWORD *this); // int __thiscall ostream::operator<<(ostream *this, int); idb // int __thiscall ostream::operator<<(ostream *this, int); idb // int __stdcall ostream::operator<<(double); idb int __stdcall sub_40746F(int a1, int a2, int a3); // int __cdecl atexit(void (__cdecl *)()); // void *__cdecl operator new(size_t Size); idb // void __cdecl operator delete(void *Block); idb // int sprintf(char *const Buffer, const char *const Format, ...); // void __cdecl __noreturn _amsg_exit(DWORD NumberOfBytesWritten); idb int sub_4086AC(); // _DWORD __cdecl flsall(_DWORD); weak void __noreturn sub_408C56(); // weak // void __cdecl __noreturn _exit(int Code); void __noreturn sub_409F8C(); void __thiscall __noreturn sub_409FE2(EXCEPTION_POINTERS *this); // int __cdecl _except_handler3(int, PVOID TargetFrame, int); idb // int __cdecl _NMSG_WRITE(DWORD NumberOfBytesWritten); idb // _DWORD __cdecl _ld12cvt(_DWORD, _DWORD, _DWORD); weak int __cdecl sub_40BF9B(int a1, int a2); int __cdecl sub_40BFB1(int a1, int a2); int __cdecl sub_40BFC7(int a1, int a2); int __cdecl sub_40BFF4(int a1, int a2); // LONG __stdcall __CxxUnhandledExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo); idb LONG (__stdcall *sub_40CEC1())(struct _EXCEPTION_POINTERS *ExceptionInfo); LPTOP_LEVEL_EXCEPTION_FILTER sub_40CED2(); // _DWORD __cdecl __strgtold12(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak // int __cdecl raise(int Signal); //------------------------------------------------------------------------- // Data declarations // extern BOOL (__stdcall *BitBlt)(HDC hdc, int x, int y, int cx, int cy, HDC hdcSrc, int x1, int y1, DWORD rop); // extern BOOL (__stdcall *MoveToEx)(HDC hdc, int x, int y, LPPOINT lppt); // extern BOOL (__stdcall *LineTo)(HDC hdc, int x, int y); // extern BOOL (__stdcall *Polygon)(HDC hdc, const POINT *apt, int cpt); // extern HPEN (__stdcall *CreatePen)(int iStyle, int cWidth, COLORREF color); // extern BOOL (__stdcall *DeleteDC)(HDC hdc); // extern HDC (__stdcall *CreateCompatibleDC)(HDC hdc); // extern HBITMAP (__stdcall *CreateBitmap)(int nWidth, int nHeight, UINT nPlanes, UINT nBitCount, const void *lpBits); // extern HGDIOBJ (__stdcall *SelectObject)(HDC hdc, HGDIOBJ h); // extern HGDIOBJ (__stdcall *GetStockObject)(int i); // extern HBRUSH (__stdcall *CreateBrushIndirect)(const LOGBRUSH *plbrush); // extern LPTOP_LEVEL_EXCEPTION_FILTER (__stdcall *SetUnhandledExceptionFilter)(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter); // extern DWORD (__stdcall *GetTickCount)(); // extern BOOL (__stdcall *GlobalUnlock)(HGLOBAL hMem); // extern LPVOID (__stdcall *GlobalLock)(HGLOBAL hMem); // extern DWORD (__stdcall *GetLastError)(); // extern int (__stdcall *ReleaseDC)(HWND hWnd, HDC hDC); // extern LONG (__stdcall *ChangeDisplaySettingsA)(DEVMODEA *lpDevMode, DWORD dwFlags); // extern LRESULT (__stdcall *DispatchMessageA)(const MSG *lpMsg); // extern BOOL (__stdcall *SetCursorPos)(int X, int Y); // extern BOOL (__stdcall *TranslateMessage)(const MSG *lpMsg); // extern BOOL (__stdcall *GetMessageA)(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax); // extern HWND (__stdcall *GetDesktopWindow)(); // extern HDC (__stdcall *GetDC)(HWND hWnd); // extern BOOL (__stdcall *GetWindowRect)(HWND hWnd, LPRECT lpRect); // extern HICON (__stdcall *LoadIconA)(HINSTANCE hInstance, LPCSTR lpIconName); // extern int (__stdcall *ShowCursor)(BOOL bShow); // extern ATOM (__stdcall *RegisterClassA)(const WNDCLASSA *lpWndClass); // extern int (__stdcall *FillRect)(HDC hDC, const RECT *lprc, HBRUSH hbr); // extern HCURSOR (__stdcall *LoadCursorA)(HINSTANCE hInstance, LPCSTR lpCursorName); // extern HANDLE (__stdcall *GetClipboardData)(UINT uFormat); // extern BOOL (__stdcall *OpenClipboard)(HWND hWndNewOwner); // extern BOOL (__stdcall *IsClipboardFormatAvailable)(UINT format); // extern LRESULT (__stdcall *DefWindowProcA)(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // extern BOOL (__stdcall *CloseClipboard)(); // extern void (__stdcall *PostQuitMessage)(int nExitCode); // extern BOOL (__stdcall *UpdateWindow)(HWND hWnd); // extern 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); // extern BOOL (__stdcall *ShowWindow)(HWND hWnd, int nCmdShow); char byte_40F170[] = { '`' }; // weak char byte_40F171[2839] = { '\"', '2', '\x12', 'D', '\r', '1', ',', '\0', '\x06', '\0', '\x1A', 'F', '\x1A', '\0', '\x06', ':', '\x1A', 'F', '\r', '2', '\x10', 'F', '\x06', '<', '$', 'F', '\x10', 'F', ',', '<', '$', 'F', ',', '.', ',', '<', '(', '&', ',', '.', '\x06', '\0', '(', '&', ',', '\0', '\x06', '\0', ',', '\x06', ',', '\0', '\r', '3', '\x10', 'F', '\x06', '>', '$', 'F', '\x10', 'F', ',', '<', '$', 'F', ',', '.', ',', '<', ' ', '&', ',', '.', '\x1E', '&', '\x14', '(', ',', '\x1E', '\x1E', '&', ',', '\b', ',', '\x1E', '\x1E', '\0', ',', '\b', '\x10', '\0', '\x1E', '\0', '\x06', '\n', '\x10', '\0', '\x06', '\n', '\f', '\x06', '\r', '4', '$', 'F', '\x06', '\x1A', '$', '\0', '$', 'F', '\x18', '\0', ',', '\0', ',', '\x1A', '\x06', '\x1A', '\r', '5', '\x06', 'F', '*', 'F', '\x06', '$', '\x06', 'F', '\x10', '*', '\x06', '$', '$', '*', '\x10', '*', ',', ' ', '$', '*', ',', '\n', ',', ' ', '\"', '\0', ',', '\n', '\x10', '\0', '\"', '\0', '\x04', '\n', '\x10', '\0', '\x04', '\n', '\n', '\b', '\r', '6', '\x12', '(', '\x06', '\x18', '\"', '(', '\x12', '(', ',', '\x1E', '\"', '(', ',', '\n', ',', '\x1E', '\"', '\0', ',', '\n', '\x12', '\0', '\"', '\0', '\x06', '\n', '\x12', '\0', '\x04', ',', '\x06', '\n', '\b', '8', '\x04', ',', '\x10', 'B', '\b', '8', '\x1E', 'F', '\x10', 'B', '(', 'B', '\x1E', 'F', '\r', '7', '\0', 'F', '\0', '8', '2', 'F', '\0', 'F', '\x18', '\0', '2', 'F', '\r', '8', '$', '\0', '\x10', '\0', ',', '\n', '$', '\0', ',', '\x1A', ',', '\n', '\"', '$', ',', '\x1A', '\x0E', '$', '\"', '$', '\x06', '\x1A', '\x0E', '$', '\x06', '\n', '\x06', '\x1A', '\x06', '\n', '\x10', '\0', '\x06', ',', '\x0E', '$', '\x06', '<', '\x06', ',', '\x10', 'F', '\x06', '<', '$', 'F', '\x10', 'F', ',', '<', '$', 'F', ',', ',', ',', '<', ',', ',', '\"', '$', '\r', '9', '\x18', '\0', '\x06', '\0', '&', '\x06', '\x18', '\0', ',', '\x1A', '&', '\x06', ',', ':', ',', '\x1A', ' ', 'F', ',', ':', '\x12', 'F', ' ', 'F', ' ', '\x1C', ',', '*', '\x12', '\x1C', ' ', '\x1C', '\x06', '&', '\x12', '\x1C', '\x06', '>', '\x06', '&', '\x06', '>', '\x12', 'F', '\r', '0', '\n', '>', '\x18', 'F', '\b', '0', '\n', '>', '\b', '\x16', '\b', '0', '\n', '\b', '\b', '\x16', '\x18', '\0', '\n', '\b', '&', '\b', '\x18', '\0', '(', '\x14', '&', '\b', '(', '.', '(', '\x14', '&', '>', '(', '.', '\x18', 'F', '&', '>', '\r', '-', '\0', '\x1A', '2', '\x1A', '\0', '\x1C', '2', '\x1C', '\0', '\x18', '2', '\x18', '\r', '=', '2', '2', '\0', '2', '\0', '\x1A', '2', '\x1A', '\r', '~', '2', '\x14', '\"', '\b', '\0', '\x10', '\x10', '\x1C', '\x10', '\x1C', '\x18', '\x10', '\"', '\b', '\x18', '\x10', '\"', '\b', '\x1A', '\x12', '\x1A', '\x12', '\x10', '\x1C', '\r', '!', '\x18', '\x18', '\x16', 'D', '\x16', 'D', '\x1A', 'D', '\x1A', 'D', '\x18', '\x18', '\x18', '\xFE', '\x18', '\x04', '\x1A', '\xFE', '\x1A', '\x04', '\x16', '\0', '\x16', '\x02', '\x1C', '\0', '\x1C', '\x02', '\r', '@', '$', '\0', ',', '\b', '\x12', '\0', '$', '\0', '\b', '\f', '\x12', '\0', '\b', '4', '\b', '\f', '\x12', 'D', '\b', '4', '&', 'D', '\x12', 'D', ',', '4', '&', 'D', ',', '\x14', ',', '4', '\x1E', '\x14', ',', '\x14', '\x16', '\x1A', '\x1E', '\x14', '\x16', '$', '\x16', '\x1A', ' ', '*', '\x16', '$', ',', '*', ' ', '*', '\r', '#', '\0', '2', '2', '2', '\0', '\x14', '2', '\x14', '\x14', 'D', '\n', '\0', '\x1E', '\0', '&', 'D', '\r', '$', '&', '0', '&', '8', '\x1A', '8', '&', '0', '\x0E', '8', '\x1A', '8', '\x06', ',', '\x0E', '8', '\b', '&', '\x06', ',', '$', '\x1E', '\b', '&', ',', '\x16', '$', '\x1E', '*', '\n', ',', '\x16', ' ', '\x04', '*', '\n', '\f', '\x06', ' ', '\x04', '\x06', '\x14', '\f', '\x06', '\x06', '\x14', '\x06', '\n', '\x18', '\xE6', '\x18', '\x04', '\x18', 'D', '\x18', '8', '\r', '%', '\x06', '\x14', ',', '0', '\x12', 'D', '\b', '>', '\b', '>', '\b', '2', '\b', '2', '\x12', ',', '\x12', ',', '\x1C', '2', '\x1C', '2', '\x1C', '>', '\x1C', '>', '\x12', 'D', '\"', '\x18', '\x18', '\x12', '\x18', '\x12', '\x18', '\x06', '\x18', '\x06', '\"', '\0', '\"', '\0', ',', '\x06', ',', '\x06', ',', '\x12', '\"', '\x18', ',', '\x12', '\r', '^', '\0', ',', '\x1A', 'D', '\x1A', 'D', '2', '*', '\r', '&', '0', '\0', '(', '\0', '(', '\0', '\b', '.', '\b', '.', '\b', ':', '\b', ':', '\x0E', 'D', '\x0E', 'D', '\x1C', 'D', '\x1C', 'D', '$', '<', '$', 'D', '$', '<', '\x0E', '&', '\x02', '\x1C', '\x02', '\x1C', '\x02', '\x0E', '\x02', '\x0E', '\f', '\0', '\f', '\0', '\x1E', '\0', '\x1E', '\0', '(', '\x0E', '(', '\x0E', '(', '\x18', '0', '\x16', '$', '\x1A', '\r', '*', '\x18', 'D', '\x18', '2', '\x18', '2', '\x0E', '\"', '\x18', '2', ' ', '\"', '\b', '8', '\x18', '2', '(', '8', '\x18', '2', '\r', '(', '\x14', '0', '\x0E', '\x12', '\x0E', '\x12', '\x14', '\xF8', '\x14', '\xF8', ' ', '\xE4', '\x14', '0', ' ', 'D', '\r', ')', '\x0E', 'D', '\x1A', '0', '\x1A', '0', ' ', '\x14', ' ', '\x14', '\x1A', '\xF8', '\x1A', '\xF8', '\x0E', '\xE4', '\r', '_', '\0', '\xE2', '2', '\xE2', '\r', '+', '\0', '\"', '2', '\"', '\x18', '>', '\x18', '\x06', '\r', 'q', '2', '2', ',', '2', ',', '2', ',', '\xE4', '2', '\xE4', '\"', '\xE4', ',', '\b', '\x1E', '\0', '\x1E', '\0', '\f', '\0', '\f', '\0', '\0', '\b', '\0', '\b', '\0', '(', '\0', '(', '\f', '2', '\f', '2', '\x1E', '2', '\x1E', '2', ',', '(', '\r', 'w', '\0', '2', '\n', '2', '2', '2', '(', '2', '\x04', '2', '\n', '\0', '\n', '\0', '\x18', '\"', '\x18', '\"', '(', '\0', '(', '\0', '.', '2', '\r', 'e', '\0', '\x1A', '2', '\x1A', '2', '\x1A', '2', '(', '2', '(', '$', '2', '$', '2', '\n', '2', '\n', '2', '\0', '&', '\0', '&', '\0', '\x0E', '\0', '\x0E', '\f', '\0', '\f', '\0', '$', '\0', '$', '\0', '2', '\n', '2', '\0', '2', '\f', '\r', 'r', '\0', '2', '\n', '2', '\n', '2', '\n', '\0', '\n', '$', '\x1E', '2', '\x1E', '2', '.', '2', '.', '2', '2', ',', '\0', '\0', '\x1A', '\0', '\r', 't', ' ', '\0', '2', '\b', '\x14', '\0', ' ', '\0', '\x0E', '\b', '\x14', '\0', '\x0E', 'B', '\x0E', '\b', '*', '2', '\x02', '2', '\r', 'y', '\0', '2', '\f', '2', '2', '2', '&', '2', '\x06', '2', '\x1A', '\x06', ',', '2', '\x1A', '\x06', '\x1A', '\x06', '\x12', '\xE4', '\x18', '\xE4', '\0', '\xE4', '\r', 'u', '\0', '2', '\x06', '2', '\x06', '2', '\x06', '\n', '\x06', '\n', '\f', '\0', '\f', '\0', '\x1E', '\0', '\x1E', '\0', ',', '\n', ',', '2', ',', '\0', ',', '\0', '2', '\0', ',', '2', '&', '2', '\r', 'i', '\x18', '\0', '\x18', '2', '\x18', '2', '\0', '2', '\x16', 'F', '\x16', '@', '\x18', 'F', '\x18', '@', '\x1A', 'B', '\x1A', 'D', '\x14', 'B', '\x14', 'D', '2', '\0', '\0', '\0', '\r', 'o', '\0', '\x0E', '\f', '\0', '\f', '\0', '&', '\0', '&', '\0', '2', '\x0E', '2', '\x0E', '2', '$', '2', '$', '&', '2', '&', '2', '\f', '2', '\f', '2', '\0', '$', '\0', '$', '\0', '\x0E', '\r', 'p', '\0', '2', '\x06', '2', '\x06', '2', '\x06', '\xE4', '\x06', '&', '\x12', '2', '\x12', '2', '&', '2', '&', '2', '2', '&', '2', '&', '2', '\x0E', '2', '\x0E', '&', '\0', '&', '\0', '\x12', '\0', '\x12', '\0', '\x06', '\b', '\xFF', '\xE4', '\x12', '\xE4', '\r', '[', '\"', 'D', '\x0E', 'D', '\x0E', 'D', '\x0E', '\xE2', '\x0E', '\xE2', '\"', '\xE2', '\r', ']', '\x0E', 'D', '$', 'D', '$', 'D', '$', '\xE4', '$', '\xE4', '\x0E', '\xE4', '\r', '\\', '4', '\xE2', '\0', 'D', '\r', 'Q', '\x06', 'B', '\x18', 'H', '\0', '0', '\x06', 'B', '\0', '\x16', '\0', '0', '\b', '\x06', '\0', '\x16', '\x18', '\0', '\b', '\x06', '(', '\x06', '\x18', '\0', '2', '\x16', '(', '\x06', '2', '0', '2', '\x16', '*', 'B', '2', '0', '*', 'B', '\x18', 'H', '\x12', '\x02', '\x0E', '\xF0', '\x06', '\xEC', '\x0E', '\xF0', '\x0E', '\xF0', '(', '\xEA', '(', '\xEA', '2', '\xF6', '$', '\xEA', '2', '\xF6', '\r', 'W', '\0', 'F', '\f', 'F', '2', 'F', '&', 'F', '\x06', 'F', '\f', '\0', '\f', '\0', '\x18', ',', '\x18', ',', '(', '\0', '(', '\0', ',', 'F', '\r', 'E', '\x06', '\0', '\x06', 'F', ',', 'F', '\0', 'F', ',', '8', ',', 'F', '2', '\0', '\0', '\0', '2', '\x12', '2', '\0', '\x1E', '\"', '\x06', '\"', '\x1E', '\x1A', '\x1E', '*', '\r', 'R', '\0', 'F', '\"', 'F', '\"', 'F', '*', '<', '*', '<', '*', ',', '*', ',', '\x1E', '\"', '\x1E', '\"', '\x06', '\"', '\x06', 'F', '\x06', '\0', '\0', '\0', '\x0E', '\0', '\"', '\x18', '(', '\x06', '(', '\x06', '2', '\0', '\"', '\x18', '\x18', '\"', '\r', 'T', '\0', 'F', '\0', '4', '2', 'F', '\0', 'F', '2', '4', '2', 'F', '\x18', '\0', '\x18', 'F', '\"', '\0', '\x0E', '\0', '\r', 'Y', '\f', 'F', '\0', 'F', '&', 'F', '2', 'F', '\x18', '\x1C', '\x06', 'F', '\x18', '\x1C', ',', 'F', '\x18', '\x1C', '\x18', '\0', ' ', '\0', '\x10', '\0', '\r', 'U', '\0', 'F', '\f', 'F', '2', 'H', '&', 'H', '\x06', 'F', '\x06', '\x0E', '\x06', '\x0E', '\x0E', '\0', '\x0E', '\0', '$', '\0', '$', '\0', ',', '\x0E', ',', '\x0E', ',', 'H', '\r', 'I', '\x06', 'F', '*', 'F', ',', '\0', '\x06', '\0', '\x18', '\0', '\x18', 'F', '\r', 'O', '\x06', 'B', '\x18', 'H', '\0', '0', '\x06', 'B', '\0', '\x16', '\0', '0', '\b', '\x06', '\0', '\x16', '\x18', '\0', '\b', '\x06', '(', '\x06', '\x18', '\0', '2', '\x16', '(', '\x06', '2', '0', '2', '\x16', '*', 'B', '2', '0', '*', 'B', '\x18', 'H', '\r', 'P', '&', 'F', '\0', 'F', '2', '<', '&', 'F', '2', '(', '2', '<', '&', ' ', '2', '(', '\x06', ' ', '&', ' ', '\x06', '\0', '\x06', 'F', '\x16', '\0', '\0', '\0', '\r', '{', ' ', 'D', '\x16', 'D', '\x16', 'D', '\x0E', '8', '\x0E', '8', '\x14', '\x18', '\x14', '\x18', '\x04', '\x14', '\x04', '\x14', '\x14', '\x0E', '\x14', '\x0E', '\x0E', '\xF0', '\x0E', '\xF0', '\x16', '\xE6', '\x16', '\xE6', ' ', '\xE6', '\r', '}', '\b', 'D', '\x0E', 'D', '\x0E', 'D', '\x18', ':', '\x18', ':', '\x14', '\x16', '\x14', '\x16', '\"', '\x12', '\"', '\x12', '\x14', '\f', '\x14', '\f', '\x18', '\xEE', '\x18', '\xEE', '\x10', '\xE6', '\x10', '\xE6', '\b', '\xE6', '\r', '|', '\x18', '\xE2', '\x18', 'D', '\r', 'a', '2', '\0', '*', '\0', '*', '\0', '*', '(', '*', '(', '\"', '2', '\"', '2', '\n', '2', '\n', '2', '\0', ',', '*', '\x1A', '\x10', '\x1A', '\x10', '\x1A', '\0', '\x12', '\0', '\x12', '\0', '\x06', '\0', '\x06', '\x06', '\0', '\x06', '\0', '\x18', '\0', '\x18', '\0', '*', '\b', '\r', 's', '.', '(', '$', '0', '$', '0', '\x10', '2', '\x10', '2', '\0', ',', '\0', ',', '\0', ' ', '\0', ' ', '\b', '\x1A', '\b', '\x1A', '(', '\x1A', '(', '\x1A', '2', '\x12', '2', '\x12', '2', '\b', '2', '\b', '\"', '\0', '\"', '\0', '\f', '\0', '\f', '\0', '\0', '\x06', '\0', '\xFE', '\0', '\n', '.', '4', '.', '&', '\r', 'd', '2', '\0', '*', '\0', '*', '\0', '*', 'R', '*', 'R', '$', 'R', '*', '&', '\x1E', '2', '\x1E', '2', '\n', '2', '\n', '2', '\0', '&', '\0', '&', '\0', '\n', '\0', '\n', '\n', '\0', '\n', '\0', '\x1E', '\0', '\x1E', '\0', '*', '\f', '\r', 'f', '\0', '2', '2', '2', '\x10', '\0', '\x10', 'H', '\x10', 'H', '\x18', 'T', '\x18', 'T', '2', 'T', '\0', '\0', '2', '\0', '\r', 'g', '2', '2', '*', '2', '*', '2', '*', '\xF2', '*', '\xF2', '\x1E', '\xE6', '\x1E', '\xE6', '\b', '\xE6', '*', '\f', '\x1E', '\0', '\x1E', '\0', '\n', '\0', '\n', '\0', '\0', '\n', '\0', '\n', '\0', '&', '\0', '&', '\n', '2', '\n', '2', '\x1E', '2', '\x1E', '2', '*', '&', '\r', 'h', '\x06', 'D', '\0', 'D', '\x06', '\0', '\x06', 'D', '\f', '\0', '\0', '\0', '\x10', '2', '\x06', '(', '&', '2', '\x10', '2', ',', '(', '&', '2', ',', '\0', ',', '(', '&', '\0', '2', '\0', '\r', 'j', '\0', '\xE4', '\x16', '\xE4', '\x16', '\xE4', ' ', '\xEE', ' ', '\xEE', ' ', '2', ' ', '2', '\0', '2', '\x18', 'F', '\x18', '@', '\x16', 'F', '\x16', '@', '\x1A', 'B', '\x1A', 'D', '\x14', 'B', '\x14', 'D', '\r', 'k', '\0', 'B', '\x06', 'B', '\x06', 'B', '\x06', '\0', '\x06', '\0', '\0', '\0', '\x06', '\x1A', ',', '2', '\f', '\x1E', ',', '\0', '2', '\0', '(', '\0', '2', '2', '(', '2', '\r', 'l', '\x18', '\0', '\x18', 'R', '\x18', 'R', '\0', 'R', '2', '\0', '\0', '\0', '\r', ';', '\x16', ',', '\x16', '2', '\x18', ',', '\x18', '2', '\x14', '.', '\x14', '0', '\x1A', '0', '\x1A', '.', '\x18', '\x04', '\x14', '\x04', '\x0E', '\xF0', '\x18', '\x04', '\x0E', '\xF0', '\x14', '\x04', '\r', '\'', '\x16', '<', '\x18', '&', '\x1A', '<', '\x16', '<', '\x1A', '<', '\x18', '&', '\r', 'A', '\x1A', 'F', '\x06', '\0', ',', '\0', '\x1A', 'F', '&', '\0', '2', '\0', '$', '\x1C', '\x0E', '\x1C', '\x1A', 'F', '\x10', 'F', '\0', '\0', '\f', '\0', '\r', 'S', '\x0E', '\0', '\0', '\f', '&', '\0', '\x0E', '\0', '.', '\n', '&', '\0', '.', '\x1A', '.', '\n', '$', '$', '.', '\x1A', '\x10', '&', '$', '$', '\x04', '.', '\x10', '&', '\x04', '>', '\x04', '.', '\x10', 'F', '\x04', '>', '\"', 'F', '\x10', 'F', ',', '6', '\"', 'F', ',', 'F', ',', '6', ',', 'F', '*', '>', '\0', '\0', '\x02', '\b', '\0', '\f', '\0', '\0', '\r', 'D', '\x1E', 'F', '\0', 'F', ',', '<', '\x1E', 'F', '2', ',', ',', '<', '2', '\x1A', '2', ',', ',', '\n', '2', '\x1A', '\x1E', '\0', ',', '\n', '\0', '\0', '\x1E', '\0', '\x06', 'F', '\x06', '\0', '\r', 'F', '\b', 'F', '\b', '\0', '2', 'F', '\0', 'F', '2', '6', '2', 'F', '\x1A', '\"', '\b', '\"', '\x1A', '\x1A', '\x1A', '*', '\x10', '\0', '\0', '\0', '\r', 'G', '\x06', 'B', '\x18', 'H', '\0', '2', '\x06', 'B', '\0', '\x14', '\0', '2', '\b', '\x06', '\0', '\x14', '\x18', '\0', '\b', '\x06', '*', '\x04', '\x18', '\0', '*', '\x1A', '*', '\x04', '*', 'B', '\x18', 'H', '*', '@', '*', 'H', '\x1A', '\x1A', '2', '\x1A', '\r', 'H', '\f', 'F', '\0', 'F', '&', 'F', '2', 'F', '\f', '\0', '\0', '\0', '&', '\0', '2', '\0', ',', '\0', ',', 'F', '\x06', 'F', '\x06', '\0', ',', '\"', '\x06', '\"', '\r', 'J', '\x18', 'F', '2', 'F', '(', '\x0E', '(', 'F', '\x1E', '\0', '(', '\x0E', '\n', '\0', '\x1E', '\0', '\0', '\x0E', '\n', '\0', '\0', ' ', '\0', '\x0E', '\r', 'K', '\0', 'F', '\f', 'F', '\x06', 'F', '\x06', '\0', '\0', '\0', '\f', '\0', '0', 'F', '$', 'F', ',', 'F', '\x06', '\"', '\x12', ',', '\x1E', '&', '\x1E', '&', '(', '\x12', '(', '\x12', '*', '\0', '*', '\0', '2', '\0', '\r', 'L', '\x10', 'F', '\0', 'F', '\b', '\0', '\b', 'F', '2', '\0', '\0', '\0', '2', '\x1C', '2', '\0', '\r', ':', '\x16', ',', '\x16', '2', '\x18', ',', '\x18', '2', '\x1A', '.', '\x1A', '0', '\x14', '.', '\x14', '0', '\x16', '\xFE', '\x16', '\x04', '\x18', '\xFE', '\x18', '\x04', '\x14', '\0', '\x14', '\x02', '\x1A', '\0', '\x1A', '\x02', '\r', '\"', '\n', '<', '\f', '&', '\x0E', '<', '\n', '<', '\x0E', '<', '\f', '&', ' ', '<', '\"', '&', '$', '<', ' ', '<', '$', '<', '\"', '&', '\r', 'z', '\x02', '(', '\x02', '2', '\x02', '2', '0', '2', '0', '2', '\x02', '\0', '\x02', '\0', '0', '\0', '0', '\0', '0', '\n', '\r', 'x', '\0', '2', '\n', '2', '2', '2', '(', '2', '\0', '\0', '\n', '\0', '2', '\0', '(', '\0', '\x04', '2', '.', '\0', '\x04', '\0', '.', '2', '\r', 'c', '2', '\f', '\"', '\0', '\"', '\0', '\x0E', '\0', '\x0E', '\0', '\0', '\f', '\0', '\f', '\0', '$', '\0', '$', '\x0E', '2', '\x0E', '2', '\"', '2', '\"', '2', ',', ',', ',', '2', ',', '(', '0', '\b', '2', '\f', '\r', 'v', '\0', '2', '\n', '2', '2', '2', '(', '2', '\x06', '2', '\x18', '\0', '\x18', '\0', ',', '2', '\r', 'b', '\0', 'D', '\x06', 'D', '\x06', 'D', '\x06', '\0', '\x06', '\0', '\0', '\0', '\x06', '&', '\x12', '2', '\x12', '2', '&', '2', '&', '2', '2', '&', '2', '&', '2', '\f', '2', '\f', '&', '\0', '&', '\0', '\x12', '\0', '\x12', '\0', '\x06', '\f', '\r', 'n', '\0', '2', '\b', '2', '\b', '2', '\b', '\0', '\0', '\0', '\x10', '\0', '2', '\0', '&', '\0', '\b', '&', '\x16', '2', '\x16', '2', '$', '2', '$', '2', ',', '*', ',', '*', ',', '\0', '\r', 'm', '\0', '2', '\x04', '2', '\x04', '2', '\x04', '\0', '\x04', '*', '\n', '2', '\n', '2', '\x12', '2', '\x12', '2', '\x18', '*', '\x18', '*', '\x18', '\0', '\x18', '*', ' ', '2', ' ', '2', '(', '2', '(', '2', '.', '*', '.', '*', '.', '\0', '2', '\0', '.', '\0', '\x1E', '\0', '\x18', '\0', '\0', '\0', '\b', '\0', '\r', ',', '\x1C', '\x04', '\x16', '\x04', '\x0E', '\xEE', '\x1C', '\x04', '\x0E', '\xEE', '\x16', '\x04', '\r', '.', '\x16', '\x04', '\x16', '\xFE', '\x18', '\xFE', '\x18', '\x04', '\x1A', '\x04', '\x1A', '\xFE', '\x1C', '\x02', '\x1C', '\0', '\x14', '\x02', '\x14', '\0', '\r', '/', '\0', '\xE2', '2', 'D', '\r', 'Z', '\x06', 'F', '\x06', ':', ',', 'F', '\x06', 'F', '\x04', '\0', ',', 'F', ',', '\0', '\x04', '\0', ',', '\x0E', ',', '\0', '\r', 'X', '\f', 'F', '\0', 'F', '&', 'F', '2', 'F', '\f', '\0', '\0', '\0', '2', '\0', '&', '\0', '.', '\0', '\x04', 'F', '\x04', '\0', '.', 'F', '\r', 'C', '\x06', 'B', '\x18', 'H', '\0', '0', '\x06', 'B', '\0', '\x16', '\0', '0', '\b', '\x06', '\0', '\x16', '\x18', '\0', '\b', '\x06', '(', '\x06', '\x18', '\0', '2', '\x10', '(', '\x06', '*', 'B', '\x18', 'H', '*', 'B', '0', ':', '0', '4', '0', 'B', '2', '\x10', '.', '\x0E', '\r', 'V', '\f', 'F', '\0', 'F', '&', 'F', '2', 'F', '\x18', '\0', '\x06', 'F', ',', 'F', '\x18', '\0', '\r', 'B', '\0', 'F', '(', 'F', '(', 'F', '.', '@', '.', '@', '.', ',', '.', ',', '\"', '$', '\"', '$', '\x06', '$', '(', '$', '2', '\x1C', '2', '\x1C', '2', '\b', '2', '\b', '*', '\0', '*', '\0', '\0', '\0', '\x06', '\0', '\x06', 'F', '\"', '$', '(', '$', '\r', 'N', '\x06', 'F', '\0', 'F', '\x06', '\0', '\x06', 'F', ',', '\0', '\x06', 'F', ',', 'F', ',', '\0', '2', 'F', ',', 'F', '\f', '\0', '\0', '\0', '\r', 'M', '&', '\0', '2', '\0', '\x06', 'F', '\x06', '\0', '\x18', '\x1C', '\x06', 'F', ',', 'F', '\x18', '\x1C', ',', '\0', ',', 'F', '\x06', 'F', '\0', 'F', ',', 'F', '2', 'F', '\f', '\0', '\0', '\0', '\r', '<', '\0', '\"', '2', 'D', '2', '\0', '\0', '\"', '\r', '>', '2', ' ', '\0', 'D', '\0', '\0', '2', ' ', '\r', '?', '\x18', '\xFA', '\x18', '\0', '\x16', '\xFA', '\x16', '\0', '\x1A', '\xFA', '\x1A', '\0', '\x1C', '\xFC', '\x1C', '\xFE', '\x14', '\xFC', '\x14', '\xFE', '\x18', '\x1E', '\x18', '\x0E', '&', '\"', '\x18', '\x1E', '.', '*', '&', '\"', '.', '8', '.', '*', '\"', 'B', '.', '8', '\x0E', 'B', '\"', 'B', '\x04', '4', '\x0E', 'B', '\x04', '.', '\x04', '<', '\r', '\x0F', '\0', '\0', '\0' }; // weak _UNKNOWN *off_40FCCC = &loc_403140; // weak _UNKNOWN *off_40FCE8 = &loc_405650; // weak _UNKNOWN *off_40FD1C = &loc_405650; // weak _UNKNOWN *off_40FD3C = &loc_405650; // weak _UNKNOWN *off_40FD94 = &loc_405650; // weak _UNKNOWN *off_40FDC8 = &loc_405650; // weak _UNKNOWN *off_40FE44 = &loc_405650; // weak _UNKNOWN *off_40FE74 = &loc_405650; // weak _UNKNOWN *off_40FE90 = &loc_405650; // weak _UNKNOWN *off_40FEB0 = &loc_405650; // weak _UNKNOWN *off_40FED0 = &loc_405650; // weak _UNKNOWN *off_40FF04 = &loc_4060D0; // weak void *ofstream::`vftable' = &sub_4066E6; // weak int (__stdcall *off_40FFB0)(char) = &sub_406CAC; // weak _SCOPETABLE_ENTRY stru_4100C8[2] = { { -1, NULL, &loc_40A033 }, { 0, &loc_40A01F, &loc_40A023 } }; // weak CHAR WindowName[2] = "w"; // idb char FileName[] = "DEBUG.TXT"; // idb float flt_4110A0 = 1.0; // weak float flt_4110A4 = 1.0; // weak float flt_4110A8 = 1.0; // weak char aCouldNotSelect[25] = "could not select brush: "; // weak char aCouldNotCreate[25] = "could not create brush: "; // weak char aB[] = "B "; // idb char asc_4110E8[] = " l "; // idb char aM[] = " m "; // idb char aLB[] = " l B "; // idb char aU[] = " u "; // idb char aU_0[] = " U "; // idb char aPagetrailerEof[] = "\n%%PageTrailer\n%%EOF\n"; // idb char a0870600280K[] = "\n0.8706 0 0.28 0 K\n"; // idb char aPsAdobe10Creat[] = "%!PS-Adobe-1.0\n%%Creator: Adobe Illustrator\n%%BoundingBox: 0 0 0 0\n%%EndProlog\n"; // idb char aInstructionsNa[206] = "instructions: navigation - Type numbers to move between pieces.\r\t\t\t exploration - Try typing letters, spacebar, enter, backspace, and arrow keys.\r\t\t\t Press escape to exit"; // weak char aAndUclaDesignM[41] = "\r and UCLA Design | Media Arts"; // weak char aBasedOnWorkDon[40] = " based on work done at MIT Media Lab"; // weak char aJoshNimoy0100[19] = " Josh Nimoy 01/00 "; // weak char aTextension[12] = " Textension"; // weak char aQuestionMark[17] = "\"question mark\""; // weak char aPeriod[9] = "\"period\""; // weak char aExclamationMar[19] = "\"exclamation mark\""; // weak void (__noreturn *off_411754)() = &sub_409F8C; // weak _UNKNOWN unk_411C00; // weak _UNKNOWN unk_411C18; // weak _UNKNOWN unk_650AFC; // weak int dword_712010[]; // weak int dword_712014[510]; // weak int dword_71280C[228003]; // weak _UNKNOWN unk_7F1298; // weak HDC hDC; // idb HDC hdc; // idb int dword_AF1358; // weak int dword_AF135C; // weak char byte_AF1B60[65536]; // idb HWND hWnd; // idb int dword_B01B68; // weak int dword_B01B6C; // weak _UNKNOWN unk_BD05E8; // weak struct tagRECT Rect; // idb int dword_BD0668; // weak char byte_BD068D; // weak char byte_BD068E; // weak char byte_BD068F; // weak int dword_BD0690; // weak int dword_BD0694; // weak _UNKNOWN unk_BD0698; // weak float flt_C90698; // weak float flt_C9069C; // weak float flt_C906A0; // weak float flt_C906A4; // weak HDC dword_C906A8; // idb HDC hdcSrc; // idb int dword_C906B0[]; // weak int dword_C906B4[]; // weak int dword_C906B8[]; // weak int dword_C906BC[]; // weak int dword_C906C0[]; // weak int dword_C906C4[]; // weak int dword_C906C8[]; // weak int dword_C906CC[]; // weak int dword_C906D0[48724]; // weak _UNKNOWN unk_CC0020; // weak RECT rc; // idb int dword_EE0EAC; // weak float flt_FA0EB8; // weak float flt_FA0EBC; // weak float flt_FA0EC0; // weak float flt_FA0EC4; // weak float flt_FA0EC8; // weak _UNKNOWN unk_FAF930; // weak int dword_FAF934; // weak float flt_FAF96C; // weak float flt_FAF970; // weak float flt_FAF974; // weak HBRUSH hbr; // idb int dword_FAF97C; // weak int dword_FAF980; // weak int dword_FAF984; // weak int dword_FAF988; // weak int dword_FAF98C; // weak int dword_FAF990; // weak struct tagRECT stru_FAF9A0; // idb int dword_FAF9B4; // weak int dword_FAF9C4; // weak int dword_FAF9C8; // weak int dword_FAF9CC; // weak int dword_FAF9D0; // weak float flt_FAF9D4; // weak float flt_FAF9D8; // weak float flt_FAF9DC; // weak char byte_FAF9E0; // weak _UNKNOWN unk_FFFFFF; // weak _UNKNOWN unk_138EC80; // weak int dword_138ECF8; // weak _UNKNOWN unk_176DFC8; // weak _UNKNOWN unk_1B4D310; // weak _UNKNOWN unk_1F2C658; // weak _UNKNOWN unk_230B9A0; // weak _UNKNOWN unk_26EACE8; // weak _UNKNOWN unk_2ACA030; // weak _UNKNOWN unk_2EA9378; // weak _UNKNOWN unk_32886C0; // weak _UNKNOWN unk_3667A08; // weak _UNKNOWN unk_3A46D50; // weak int (*dword_3A46E84)(void); // weak LPTOP_LEVEL_EXCEPTION_FILTER lpfn; // idb //----- (00401000) -------------------------------------------------------- int sub_401000() { int v0; // edx int *v1; // eax int v2; // ecx char v3; // bl int v4; // ecx int v5; // esi int result; // eax __int16 v7; // di __int16 v8; // di __int16 v9; // bx int v10; // ecx int v11; // eax double v12; // st7 int v13; // edi __int16 v14; // [esp+0h] [ebp-8h] __int16 v15; // [esp+4h] [ebp-4h] v0 = 0; v1 = dword_712014; do { *v1 = 0; v1 += 2; } while ( (int)v1 < (int)dword_71280C ); v2 = 0; while ( 1 ) { v3 = byte_40F170[v2]; v4 = v2 + 1; v5 = 2 * v3; result = 4 * v0 + 8267828; dword_712010[v5] = result; if ( v3 == 15 ) break; while ( 1 ) { v7 = byte_40F170[v4]; v2 = v4 + 1; v14 = v7; if ( v7 == 13 ) break; v8 = byte_40F170[v2]; v9 = byte_40F171[v2]; v10 = v2 + 2; v15 = byte_40F170[v10]; v4 = v10 + 1; v11 = result + 16; *(float *)(v11 - 16) = (double)v14 * 0.0099999998; v12 = (double)v8; v13 = dword_712014[v5]; *(float *)(v11 - 12) = v12 * -0.0099999998; *(_DWORD *)(v11 - 8) = 0; v0 += 6; result = v11 + 8; dword_712014[v5] = v13 + 6; *(float *)(result - 12) = (double)v9 * 0.0099999998; *(float *)(result - 8) = (double)v15 * -0.0099999998; *(_DWORD *)(result - 4) = 0; } } return result; } // 712010: using guessed type int dword_712010[]; // 712014: using guessed type int dword_712014[510]; // 71280C: using guessed type int dword_71280C[228003]; //----- (00401110) -------------------------------------------------------- char __cdecl sub_401110(char a1) { return sub_402B10(dword_712010[2 * a1], dword_712014[2 * a1]); } // 712010: using guessed type int dword_712010[]; // 712014: using guessed type int dword_712014[510]; //----- (00401130) -------------------------------------------------------- char __cdecl sub_401130(const char *a1, float a2) { signed int i; // esi char v3; // al sub_402E60(); for ( i = 0; i < (int)(strlen(a1) + 1); ++i ) { v3 = a1[i]; if ( v3 == 13 ) { sub_402F00(); sub_4024A0(a2, 0.0, 0.0, 1.0); sub_402D40(0, 1069547520, 0); sub_402E60(); } else { sub_401110(v3); sub_4024A0(a2, 0.0, 0.0, 1.0); sub_402D40(1060320051, 0, 0); } } return sub_402F00(); } //----- (004011D0) -------------------------------------------------------- char __cdecl sub_4011D0(const char *a1) { signed int i; // esi char v2; // al sub_402E60(); sub_402E60(); for ( i = 0; i < (int)(strlen(a1) + 1); ++i ) { v2 = a1[i]; if ( v2 == 13 ) { sub_402F00(); sub_402D40(0, 1069547520, 0); sub_402E60(); } else { sub_401110(v2); sub_402D40(1060320051, 0, 0); } } sub_402F00(); return sub_402F00(); } //----- (00401250) -------------------------------------------------------- int sub_401250() { sub_401260(); return atexit(unknown_libname_1); } //----- (00401260) -------------------------------------------------------- ofstream *sub_401260() { return ofstream::ofstream((ofstream *)&unk_7F1298); } //----- (004012A0) -------------------------------------------------------- int __cdecl sub_4012A0(int a1) { int result; // eax result = a1; dword_BD0694 = a1; return result; } // BD0694: using guessed type int dword_BD0694; //----- (004012B0) -------------------------------------------------------- int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { _BYTE *v4; // eax _BYTE *v5; // eax HWND DesktopWindow; // eax int result; // eax HDC DC; // eax tagMSG Msg; // [esp+8h] [ebp-58h] BYREF _BYTE v10[8]; // [esp+24h] [ebp-3Ch] BYREF _DWORD v11[13]; // [esp+2Ch] [ebp-34h] BYREF dword_B01B68 = GetTickCount(); dword_BD0690 = dword_B01B68; v4 = operator new(8u); if ( v4 ) v5 = sub_403160(v4); else v5 = 0; sub_4012A0((int)v5); ShowCursor(0); DesktopWindow = GetDesktopWindow(); GetWindowRect(DesktopWindow, &Rect); result = sub_401490(hInstance); if ( result ) { result = (int)sub_401520(hInstance, nShowCmd); hWnd = (HWND)result; if ( result ) { DC = GetDC((HWND)result); sub_402470(DC); SetCursorPos(Rect.right + 10, Rect.bottom + 10); while ( GetMessageA(&Msg, 0, 0, 0) ) { sub_402240(); (*(void (__thiscall **)(int))(*(_DWORD *)dword_B01B6C + 8))(dword_B01B6C); if ( GetTickCount() - dword_BD0690 >= 0x3C ) { sub_402220(); dword_BD0690 += 60; } TranslateMessage(&Msg); DispatchMessageA(&Msg); } if ( strlen(byte_AF1B60) ) { ofstream::ofstream((ofstream *)v10); ofstream::open((ofstream *)v10, FileName, 2, 420); ostream::write((ostream *)v10, byte_AF1B60, strlen(byte_AF1B60)); unknown_libname_15(v10); sub_406711(v11); ios::~ios((ios *)v11); } if ( dword_B01B6C ) (**(void (__thiscall ***)(int, int))dword_B01B6C)(dword_B01B6C, 1); ChangeDisplaySettingsA(0, 0); ReleaseDC(hWnd, hDC); DeleteDC(hdc); return Msg.wParam; } } return result; } // 406760: using guessed type int __thiscall unknown_libname_15(_DWORD); // B01B68: using guessed type int dword_B01B68; // B01B6C: using guessed type int dword_B01B6C; // BD0690: using guessed type int dword_BD0690; //----- (00401490) -------------------------------------------------------- BOOL __cdecl sub_401490(HINSTANCE a1) { LOGBRUSH plbrush; // [esp+0h] [ebp-34h] BYREF WNDCLASSA WndClass; // [esp+Ch] [ebp-28h] BYREF plbrush.lbColor = (COLORREF)&unk_FFFFFF; WndClass.hbrBackground = CreateBrushIndirect(&plbrush); WndClass.hCursor = LoadCursorA(0, (LPCSTR)0x7F00); WndClass.hIcon = LoadIconA(0, (LPCSTR)0x7F05); WndClass.hInstance = a1; WndClass.lpfnWndProc = sub_401580; WndClass.lpszClassName = WindowName; WndClass.style = 3; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.lpszMenuName = 0; return RegisterClassA(&WndClass) != 0; } //----- (00401520) -------------------------------------------------------- HWND __cdecl sub_401520(HINSTANCE hInstance, int nCmdShow) { HWND result; // eax HWND v3; // esi result = CreateWindowExA(0, WindowName, WindowName, 0x90000000, 0, 0, Rect.right, Rect.bottom, 0, 0, hInstance, 0); v3 = result; if ( result ) { ShowWindow(result, nCmdShow); UpdateWindow(v3); return v3; } return result; } //----- (00401580) -------------------------------------------------------- int __stdcall sub_401580(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { int result; // eax if ( Msg > 0x100 ) { if ( Msg > 0x201 ) { if ( Msg == 514 ) { sub_401DA0(); return 0; } } else { switch ( Msg ) { case 0x201u: sub_401D80(); return 0; case 0x101u: sub_4017E0((int)hWnd, wParam, 0); return 0; case 0x200u: sub_401D50((int)hWnd, (__int16)lParam, SHIWORD(lParam)); return 0; } } return DefWindowProcA(hWnd, Msg, wParam, lParam); } if ( Msg == 256 ) { sub_4017E0((int)hWnd, wParam, 1); return 0; } else { switch ( Msg ) { case 2u: sub_401D30(); result = 0; break; case 5u: sub_4017D0(hWnd); result = 0; break; case 0xFu: case 0x85u: sub_401D40(); result = 0; break; default: return DefWindowProcA(hWnd, Msg, wParam, lParam); } } return result; } //----- (004017C0) -------------------------------------------------------- DWORD sub_4017C0() { return GetTickCount() - dword_B01B68; } // B01B68: using guessed type int dword_B01B68; //----- (004017D0) -------------------------------------------------------- int __cdecl sub_4017D0(HWND hWnd) { return sub_4025C0(hWnd); } //----- (004017E0) -------------------------------------------------------- void __cdecl sub_4017E0(int a1, unsigned int a2, int a3) { _DWORD *v3; // eax _DWORD *v4; // eax void *v5; // eax char *v6; // eax _DWORD *v7; // eax _DWORD *v8; // eax char *v9; // eax char *v10; // eax char *v11; // eax char *v12; // eax char *v13; // eax _BYTE *v14; // eax switch ( a2 ) { case 0x10u: byte_BD068E = a3 != 0; break; case 0x11u: byte_BD068F = a3 != 0; break; case 0x1Bu: PostQuitMessage(0); break; default: if ( a3 && (int)sub_4017C0() > 50 ) { LOBYTE(dword_BD0668) = a2; if ( byte_BD068E ) sub_401FC0(); else sub_401DC0(); if ( !byte_BD068F ) goto LABEL_15; if ( (_BYTE)dword_BD0668 == 115 ) { sub_402FA0(); return; } if ( (_BYTE)dword_BD0668 == 118 ) { sub_401CC0(); } else { LABEL_15: if ( (unsigned __int8)dword_BD0668 < 0x30u || (unsigned __int8)dword_BD0668 > 0x39u ) { if ( (a2 < 0x70 || a2 > 0x7B) && a2 != 19 && a2 != 145 && a2 != 45 && a2 != 36 && a2 != 33 && a2 != 46 && a2 != 35 && a2 != 34 && a2 != 91 && a2 != 144 && a2 != 111 && a2 != 106 && a2 != 97 && a2 != 98 && a2 != 99 && a2 != 100 && a2 != 101 && a2 != 96 && a2 != 110 && a2 != 107 && a2 != 109 && a2 != 103 && a2 != 104 && a2 != 105 ) { (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)dword_B01B6C + 24))( dword_B01B6C, (unsigned __int8)dword_BD0668); } } else { switch ( (char)dword_BD0668 ) { case '0': if ( *(_BYTE *)(dword_B01B6C + 4) != 10 ) { v3 = operator new(0x1000Cu); if ( !v3 ) goto LABEL_20; v4 = sub_403400(v3); sub_4012A0((int)v4); } break; case '1': if ( *(_BYTE *)(dword_B01B6C + 4) != 1 ) { v6 = (char *)operator new((size_t)&unk_650AFC); if ( !v6 ) goto LABEL_20; v5 = sub_4035E0(v6); goto LABEL_21; } break; case '2': if ( *(_BYTE *)(dword_B01B6C + 4) != 2 ) { v7 = operator new(0x10020u); if ( !v7 ) goto LABEL_20; v5 = sub_403A00(v7); goto LABEL_21; } break; case '3': if ( *(_BYTE *)(dword_B01B6C + 4) != 3 ) { v8 = operator new(0x3870u); if ( !v8 ) goto LABEL_20; v5 = sub_403EE0(v8); goto LABEL_21; } break; case '4': if ( *(_BYTE *)(dword_B01B6C + 4) != 4 ) { v9 = (char *)operator new(0x8DCu); if ( !v9 ) goto LABEL_20; v5 = sub_4049D0(v9); goto LABEL_21; } break; case '5': if ( *(_BYTE *)(dword_B01B6C + 4) != 5 ) { v10 = (char *)operator new(0xDACu); if ( !v10 ) goto LABEL_20; v5 = sub_404E40(v10); goto LABEL_21; } break; case '6': if ( *(_BYTE *)(dword_B01B6C + 4) != 6 ) { v11 = (char *)operator new(0x100004u); if ( !v11 ) goto LABEL_20; v5 = sub_4052C0(v11); goto LABEL_21; } break; case '7': if ( *(_BYTE *)(dword_B01B6C + 4) != 7 ) { v12 = (char *)operator new(0xC4F4u); if ( !v12 ) goto LABEL_20; v5 = sub_4055F0(v12); goto LABEL_21; } break; case '8': if ( *(_BYTE *)(dword_B01B6C + 4) != 8 ) { v13 = (char *)operator new(0x242Cu); if ( !v13 ) goto LABEL_20; v5 = sub_405C00(v13); goto LABEL_21; } break; case '9': if ( *(_BYTE *)(dword_B01B6C + 4) != 9 ) { v14 = operator new(0x10u); if ( v14 ) v5 = sub_406080(v14); else LABEL_20: v5 = 0; LABEL_21: sub_4012A0((int)v5); } break; default: return; } } } } break; } } // B01B6C: using guessed type int dword_B01B6C; // BD0668: using guessed type int dword_BD0668; // BD068E: using guessed type char byte_BD068E; // BD068F: using guessed type char byte_BD068F; //----- (00401CC0) -------------------------------------------------------- char sub_401CC0() { _BYTE *v0; // eax HANDLE ClipboardData; // eax void *v2; // edi _BYTE *v3; // esi _BYTE *v5; // [esp+8h] [ebp-4h] v0 = (_BYTE *)OpenClipboard(0); if ( v0 ) { v0 = (_BYTE *)IsClipboardFormatAvailable(1u); if ( v0 ) { ClipboardData = GetClipboardData(1u); v2 = ClipboardData; if ( ClipboardData ) { v0 = GlobalLock(ClipboardData); v3 = v0; if ( !v0 ) return (char)v0; } else { v3 = v5; } GlobalUnlock(v2); CloseClipboard(); LOBYTE(v0) = *v3; if ( *v3 ) { do { (*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)dword_B01B6C + 24))(dword_B01B6C, (char)v0); LOBYTE(v0) = *++v3; } while ( (_BYTE)v0 ); } } } return (char)v0; } // 401CF8: variable 'v5' is possibly undefined // B01B6C: using guessed type int dword_B01B6C; //----- (00401D30) -------------------------------------------------------- void sub_401D30() { PostQuitMessage(0); } //----- (00401D50) -------------------------------------------------------- int __cdecl sub_401D50(int a1, int a2, int a3) { dword_AF1358 = a2; dword_AF135C = a3; return (*(int (__thiscall **)(int, int, int))(*(_DWORD *)dword_B01B6C + 12))(dword_B01B6C, a2, a3); } // AF1358: using guessed type int dword_AF1358; // AF135C: using guessed type int dword_AF135C; // B01B6C: using guessed type int dword_B01B6C; //----- (00401D80) -------------------------------------------------------- int sub_401D80() { byte_BD068D = 1; return (*(int (__thiscall **)(int))(*(_DWORD *)dword_B01B6C + 16))(dword_B01B6C); } // B01B6C: using guessed type int dword_B01B6C; // BD068D: using guessed type char byte_BD068D; //----- (00401DA0) -------------------------------------------------------- int sub_401DA0() { byte_BD068D = 0; return (*(int (__thiscall **)(int))(*(_DWORD *)dword_B01B6C + 20))(dword_B01B6C); } // B01B6C: using guessed type int dword_B01B6C; // BD068D: using guessed type char byte_BD068D; //----- (00401DC0) -------------------------------------------------------- int sub_401DC0() { int result; // eax if ( (unsigned __int8)dword_BD0668 >= 0x41u && (unsigned __int8)dword_BD0668 <= 0x5Au ) LOBYTE(dword_BD0668) = dword_BD0668 + 32; result = (unsigned __int8)dword_BD0668 - 33; switch ( (char)dword_BD0668 ) { case 33: LOBYTE(dword_BD0668) = -122; break; case 34: LOBYTE(dword_BD0668) = -119; break; case 35: LOBYTE(dword_BD0668) = -120; break; case 36: LOBYTE(dword_BD0668) = -123; break; case 37: LOBYTE(dword_BD0668) = 0x80; break; case 38: LOBYTE(dword_BD0668) = -127; break; case 39: LOBYTE(dword_BD0668) = -126; break; case 40: LOBYTE(dword_BD0668) = -125; break; case 45: LOBYTE(dword_BD0668) = -124; break; case 46: LOBYTE(dword_BD0668) = -121; break; case -70: LOBYTE(dword_BD0668) = 59; break; case -69: LOBYTE(dword_BD0668) = 61; break; case -68: LOBYTE(dword_BD0668) = 44; break; case -67: LOBYTE(dword_BD0668) = 45; break; case -66: LOBYTE(dword_BD0668) = 46; break; case -65: LOBYTE(dword_BD0668) = 47; break; case -64: LOBYTE(dword_BD0668) = 96; break; case -37: LOBYTE(dword_BD0668) = 91; break; case -36: LOBYTE(dword_BD0668) = 92; break; case -35: LOBYTE(dword_BD0668) = 93; break; case -34: LOBYTE(dword_BD0668) = 39; break; default: return result; } return result; } // BD0668: using guessed type int dword_BD0668; //----- (00401FC0) -------------------------------------------------------- int sub_401FC0() { int result; // eax result = (unsigned __int8)dword_BD0668 - 33; switch ( (char)dword_BD0668 ) { case 33: LOBYTE(dword_BD0668) = -122; break; case 34: LOBYTE(dword_BD0668) = -119; break; case 35: LOBYTE(dword_BD0668) = -120; break; case 36: LOBYTE(dword_BD0668) = -123; break; case 37: LOBYTE(dword_BD0668) = 0x80; break; case 38: LOBYTE(dword_BD0668) = -127; break; case 39: LOBYTE(dword_BD0668) = -126; break; case 40: LOBYTE(dword_BD0668) = -125; break; case 45: LOBYTE(dword_BD0668) = -124; break; case 46: LOBYTE(dword_BD0668) = -121; break; case 48: LOBYTE(dword_BD0668) = 41; break; case 49: LOBYTE(dword_BD0668) = 33; break; case 50: LOBYTE(dword_BD0668) = 64; break; case 51: LOBYTE(dword_BD0668) = 35; break; case 52: LOBYTE(dword_BD0668) = 36; break; case 53: LOBYTE(dword_BD0668) = 37; break; case 54: LOBYTE(dword_BD0668) = 94; break; case 55: LOBYTE(dword_BD0668) = 38; break; case 56: LOBYTE(dword_BD0668) = 42; break; case 57: LOBYTE(dword_BD0668) = 40; break; case -70: LOBYTE(dword_BD0668) = 58; break; case -69: LOBYTE(dword_BD0668) = 43; break; case -68: LOBYTE(dword_BD0668) = 60; break; case -67: LOBYTE(dword_BD0668) = 95; break; case -66: LOBYTE(dword_BD0668) = 62; break; case -65: LOBYTE(dword_BD0668) = 63; break; case -64: LOBYTE(dword_BD0668) = 126; break; case -37: LOBYTE(dword_BD0668) = 123; break; case -36: LOBYTE(dword_BD0668) = 124; break; case -35: LOBYTE(dword_BD0668) = 125; break; case -34: LOBYTE(dword_BD0668) = 34; break; default: return result; } return result; } // BD0668: using guessed type int dword_BD0668; //----- (00402220) -------------------------------------------------------- BOOL sub_402220() { sub_4026D0(); (*(void (__thiscall **)(int))(*(_DWORD *)dword_B01B6C + 4))(dword_B01B6C); return sub_4026F0(); } // B01B6C: using guessed type int dword_B01B6C; //----- (00402240) -------------------------------------------------------- void sub_402240() { int v0; // esi int v1; // edi DWORD v2; // esi double v3; // st7 char v4; // al DWORD v5; // esi int v6; // eax float v7; // [esp+0h] [ebp-Ch] int v8; // [esp+4h] [ebp-8h] int v9; // [esp+8h] [ebp-4h] if ( dword_BD0694 ) { if ( dword_B01B6C ) { v8 = 1065353216; v9 = -1110651699; if ( *(_BYTE *)(dword_B01B6C + 4) > *(_BYTE *)(dword_BD0694 + 4) ) { v8 = -1082130432; v9 = 1036831949; } sub_402E60(); v7 = 0.0; do { sub_4026D0(); (*(void (__thiscall **)(int))(*(_DWORD *)dword_B01B6C + 4))(dword_B01B6C); sub_402E60(); sub_402D40(v8, 0, 0); v0 = dword_BD0690; v1 = dword_B01B68; dword_B01B68 = GetTickCount(); dword_BD0690 = dword_B01B68; (*(void (__thiscall **)(int))(*(_DWORD *)dword_BD0694 + 4))(dword_BD0694); dword_B01B68 = v1; dword_BD0690 = v0; sub_4026F0(); sub_402F00(); sub_402D40(v9, 0, 0); v2 = sub_4017C0(); while ( (int)(sub_4017C0() - v2) < 10 ) ; v3 = v7 + 0.1; v7 = v3; } while ( v3 < 1.0 ); sub_402F00(); dword_B01B68 = GetTickCount(); dword_BD0690 = dword_B01B68; sub_402E60(); sub_4026D0(); (*(void (__thiscall **)(int))(*(_DWORD *)dword_BD0694 + 4))(dword_BD0694); sub_402D40(-1088841318, -1093874483, 0); sub_402580(0.1, 0.1, 0.1); v4 = *(_BYTE *)(dword_BD0694 + 4); if ( v4 == 10 ) { sub_401110(48); } else if ( v4 != 105 ) { sub_401110(v4 + 48); } sub_4026F0(); sub_402F00(); v5 = sub_4017C0(); while ( (int)(sub_4017C0() - v5) < 500 ) ; dword_B01B68 = GetTickCount(); dword_BD0690 = dword_B01B68; if ( dword_B01B6C ) (**(void (__thiscall ***)(int, int))dword_B01B6C)(dword_B01B6C, 1); } v6 = dword_BD0694; dword_BD0694 = 0; dword_B01B6C = v6; } } // B01B68: using guessed type int dword_B01B68; // B01B6C: using guessed type int dword_B01B6C; // BD0690: using guessed type int dword_BD0690; // BD0694: using guessed type int dword_BD0694; //----- (00402420) -------------------------------------------------------- int sub_402420() { sub_402430(); return atexit(unknown_libname_2); } //----- (00402430) -------------------------------------------------------- ofstream *sub_402430() { return ofstream::ofstream((ofstream *)&unk_BD05E8); } //----- (00402470) -------------------------------------------------------- void __cdecl sub_402470(HDC a1) { dword_C906A8 = a1; sub_401000(); sub_4025E0(); sub_4024A0(0.0, 0.0, 0.0, 0.0); } //----- (004024A0) -------------------------------------------------------- void __cdecl sub_4024A0(float a1, float a2, float a3, float a4) { flt_FAF9D4 = a1 * a2 + flt_FAF9D4; flt_FAF9D8 = a1 * a3 + flt_FAF9D8; flt_FAF9DC = a1 * a4 + flt_FAF9DC; sub_4024F0(); } // FAF9D4: using guessed type float flt_FAF9D4; // FAF9D8: using guessed type float flt_FAF9D8; // FAF9DC: using guessed type float flt_FAF9DC; //----- (004024F0) -------------------------------------------------------- void sub_4024F0() { flt_C90698 = 3.1415927 * 0.0055555557 * flt_FAF9D4; flt_C9069C = 3.1415927 * 0.0055555557 * flt_FAF9D8; flt_C906A0 = 3.1415927 * 0.0055555557 * flt_FAF9DC; flt_FAF96C = cos(flt_C90698); flt_FA0EB8 = sin(flt_C90698); flt_FAF970 = cos(flt_C9069C); flt_FA0EBC = sin(flt_C9069C); flt_FAF974 = cos(flt_C906A0); flt_FA0EC0 = sin(flt_C906A0); } // C90698: using guessed type float flt_C90698; // C9069C: using guessed type float flt_C9069C; // C906A0: using guessed type float flt_C906A0; // FA0EB8: using guessed type float flt_FA0EB8; // FA0EBC: using guessed type float flt_FA0EBC; // FA0EC0: using guessed type float flt_FA0EC0; // FAF96C: using guessed type float flt_FAF96C; // FAF970: using guessed type float flt_FAF970; // FAF974: using guessed type float flt_FAF974; // FAF9D4: using guessed type float flt_FAF9D4; // FAF9D8: using guessed type float flt_FAF9D8; // FAF9DC: using guessed type float flt_FAF9DC; //----- (00402580) -------------------------------------------------------- void __cdecl sub_402580(float a1, float a2, float a3) { flt_4110A0 = flt_4110A0 * a1; flt_4110A4 = flt_4110A4 * a2; flt_4110A8 = flt_4110A8 * a3; } // 4110A0: using guessed type float flt_4110A0; // 4110A4: using guessed type float flt_4110A4; // 4110A8: using guessed type float flt_4110A8; //----- (004025C0) -------------------------------------------------------- int __cdecl sub_4025C0(HWND hWnd) { GetWindowRect(hWnd, &stru_FAF9A0); return sub_4025E0(); } //----- (004025E0) -------------------------------------------------------- int sub_4025E0() { double v0; // st7 double v1; // st6 HGDIOBJ StockObject; // eax rc.bottom = stru_FAF9A0.bottom - stru_FAF9A0.top; v0 = (double)(stru_FAF9A0.bottom - stru_FAF9A0.top); rc.top = 0; rc.right = stru_FAF9A0.right - stru_FAF9A0.left; rc.left = 0; flt_FA0EC4 = v0 * 0.5; v1 = (double)(stru_FAF9A0.right - stru_FAF9A0.left); flt_FA0EC8 = v1 * 0.5; if ( stru_FAF9A0.bottom - stru_FAF9A0.top >= stru_FAF9A0.right - stru_FAF9A0.left ) flt_C906A4 = v1; else flt_C906A4 = v0; hdcSrc = CreateCompatibleDC(dword_C906A8); dword_FAF9B4 = (int)CreateBitmap(rc.right, rc.bottom, 1u, 1u, &unk_BD0698); SelectObject(hdcSrc, (HGDIOBJ)dword_FAF9B4); sub_402720(); sub_402730(); sub_402720(); sub_402730(); StockObject = GetStockObject(12); SelectObject(hdcSrc, StockObject); return sub_4026D0(); } // C906A4: using guessed type float flt_C906A4; // FA0EC4: using guessed type float flt_FA0EC4; // FA0EC8: using guessed type float flt_FA0EC8; // FAF9B4: using guessed type int dword_FAF9B4; //----- (004026D0) -------------------------------------------------------- int sub_4026D0() { return FillRect(hdcSrc, &rc, hbr); } //----- (004026F0) -------------------------------------------------------- BOOL sub_4026F0() { return BitBlt(dword_C906A8, 0, 0, rc.right, rc.bottom, hdcSrc, 0, 0, (DWORD)&unk_CC0020); } //----- (00402720) -------------------------------------------------------- HGDIOBJ sub_402720() { return sub_402740(-1, -1, -1); } //----- (00402730) -------------------------------------------------------- HGDIOBJ sub_402730() { return sub_4027D0(0, 0, 0); } //----- (00402740) -------------------------------------------------------- HGDIOBJ __cdecl sub_402740(char a1, char a2, char a3) { __int16 v3; // ax HBRUSH v4; // eax DWORD LastError; // eax HGDIOBJ result; // eax DWORD v7; // eax LOGBRUSH plbrush; // [esp+4h] [ebp-Ch] BYREF HIBYTE(v3) = a3; LOBYTE(v3) = a2; LOBYTE(plbrush.lbColor) = a1; *(_WORD *)((char *)&plbrush.lbColor + 1) = v3; v4 = CreateBrushIndirect(&plbrush); hbr = v4; if ( !v4 ) { nullsub_1(aCouldNotCreate); LastError = GetLastError(); nullsub_1(LastError); v4 = hbr; } result = SelectObject(hdcSrc, v4); if ( !result ) { nullsub_1(aCouldNotSelect); v7 = GetLastError(); return (HGDIOBJ)nullsub_1(v7); } return result; } // 405E10: using guessed type int __cdecl nullsub_1(_DWORD); //----- (004027D0) -------------------------------------------------------- HGDIOBJ __cdecl sub_4027D0(unsigned __int8 a1, char a2, char a3) { unsigned __int16 v3; // ax COLORREF v4; // esi HPEN Pen; // eax LOGBRUSH plbrush; // [esp+8h] [ebp-Ch] BYREF HIBYTE(v3) = a3; LOBYTE(v3) = a2; v4 = a1 | (v3 << 8); Pen = CreatePen(0, 0, v4); SelectObject(hdcSrc, Pen); plbrush.lbColor = v4; plbrush.lbStyle = 0; dword_EE0EAC = (int)CreateBrushIndirect(&plbrush); return SelectObject(hdcSrc, (HGDIOBJ)dword_EE0EAC); } // EE0EAC: using guessed type int dword_EE0EAC; //----- (00402840) -------------------------------------------------------- char __cdecl sub_402840(int a1, int a2, int a3, int a4, int a5, int a6) { int v7; // [esp+0h] [ebp-24h] BYREF int v8; // [esp+4h] [ebp-20h] int v9; // [esp+8h] [ebp-1Ch] int v10; // [esp+Ch] [ebp-18h] int v11; // [esp+10h] [ebp-14h] int v12; // [esp+14h] [ebp-10h] int v13; // [esp+18h] [ebp-Ch] int v14; // [esp+1Ch] [ebp-8h] int v15; // [esp+20h] [ebp-4h] v7 = a1; v8 = a5; v10 = a4; v13 = a4; v9 = a3; v11 = a5; v12 = a6; v14 = a2; v15 = a6; sub_4028E0((float *)&v7, 3); v7 = a4; v8 = a2; v10 = a1; v13 = a1; v9 = a6; v11 = a2; v12 = a3; v14 = a5; v15 = a3; return sub_4028E0((float *)&v7, 3); } //----- (004028E0) -------------------------------------------------------- char __cdecl sub_4028E0(float *a1, int cpt) { int v2; // ebp char v3; // bl LONG *p_y; // esi double v6; // st7 ostream *v7; // eax ostream *v8; // eax char result; // al POINT apt; // [esp+8h] [ebp-7FFF8h] BYREF v2 = cpt; v3 = 0; if ( cpt > 0 ) { p_y = &apt.y; do { sub_402D90(a1); sub_402CD0(a1); v6 = a1[1]; *(p_y - 1) = (__int64)*a1; *p_y = (__int64)v6; if ( byte_FAF9E0 ) { v7 = (ostream *)ostream::operator<<((ostream *)&unk_FAF930, *(p_y - 1) - 629); v8 = (ostream *)ostream::operator<<(v7, 32); ostream::operator<<(v8, 224 - *p_y); if ( v3 ) { ostream::operator<<((ostream *)&unk_FAF930, asc_4110E8); } else { ostream::operator<<((ostream *)&unk_FAF930, aM); v3 = 1; } } a1 += 3; p_y += 2; --v2; } while ( v2 ); v2 = cpt; } Polygon(hdcSrc, &apt, v2); result = byte_FAF9E0; if ( byte_FAF9E0 ) return ostream::operator<<((ostream *)&unk_FAF930, aB); return result; } // FAF9E0: using guessed type char byte_FAF9E0; //----- (004029E0) -------------------------------------------------------- char __cdecl sub_4029E0(int a1, int a2, int a3, int a4, int a5, int a6) { dword_FAF980 = a2; dword_FAF984 = a3; dword_FAF97C = a1; dword_FAF988 = a1; dword_FAF98C = a5; dword_FAF990 = a6; sub_402B90(); dword_FAF97C = a1; dword_FAF984 = a6; dword_FAF980 = a5; dword_FAF988 = a4; dword_FAF98C = a5; dword_FAF990 = a3; sub_402B90(); dword_FAF980 = a5; dword_FAF984 = a3; dword_FAF97C = a4; dword_FAF988 = a4; dword_FAF98C = a2; dword_FAF990 = a6; sub_402B90(); dword_FAF97C = a4; dword_FAF984 = a6; dword_FAF980 = a2; dword_FAF988 = a1; dword_FAF98C = a2; dword_FAF990 = a3; return sub_402B90(); } // FAF97C: using guessed type int dword_FAF97C; // FAF980: using guessed type int dword_FAF980; // FAF984: using guessed type int dword_FAF984; // FAF988: using guessed type int dword_FAF988; // FAF98C: using guessed type int dword_FAF98C; // FAF990: using guessed type int dword_FAF990; //----- (00402AD0) -------------------------------------------------------- char __cdecl sub_402AD0(int a1, int a2, int a3, int a4, int a5, int a6) { dword_FAF97C = a1; dword_FAF980 = a2; dword_FAF984 = a3; dword_FAF988 = a4; dword_FAF98C = a5; dword_FAF990 = a6; return sub_402B90(); } // FAF97C: using guessed type int dword_FAF97C; // FAF980: using guessed type int dword_FAF980; // FAF984: using guessed type int dword_FAF984; // FAF988: using guessed type int dword_FAF988; // FAF98C: using guessed type int dword_FAF98C; // FAF990: using guessed type int dword_FAF990; //----- (00402B10) -------------------------------------------------------- char __cdecl sub_402B10(int a1, int a2) { int *v2; // esi unsigned int v3; // edi char result; // al if ( byte_FAF9E0 ) sub_402E60(); if ( a2 > 0 ) { v2 = (int *)(a1 + 8); v3 = (a2 + 5) / 6u; do { dword_FAF97C = *(v2 - 2); dword_FAF980 = *(v2 - 1); dword_FAF984 = *v2; dword_FAF988 = v2[1]; dword_FAF98C = v2[2]; dword_FAF990 = v2[3]; sub_402B90(); v2 += 6; --v3; } while ( v3 ); } result = byte_FAF9E0; if ( byte_FAF9E0 ) return sub_402F00(); return result; } // FAF97C: using guessed type int dword_FAF97C; // FAF980: using guessed type int dword_FAF980; // FAF984: using guessed type int dword_FAF984; // FAF988: using guessed type int dword_FAF988; // FAF98C: using guessed type int dword_FAF98C; // FAF990: using guessed type int dword_FAF990; // FAF9E0: using guessed type char byte_FAF9E0; //----- (00402B90) -------------------------------------------------------- char sub_402B90() { ostream *v0; // eax int v1; // eax double v2; // st7 ostream *v3; // eax char result; // al ostream *v5; // eax int v6; // eax double v7; // st7 ostream *v8; // eax sub_402D90((float *)&dword_FAF988); sub_402CD0((float *)&dword_FAF988); sub_402D90((float *)&dword_FAF97C); sub_402CD0((float *)&dword_FAF97C); MoveToEx(hdcSrc, (__int64)*(float *)&dword_FAF97C, (__int64)*(float *)&dword_FAF980, 0); if ( byte_FAF9E0 ) { dword_FAF934 = 1; v0 = (ostream *)ostream::operator<<(*(float *)&dword_FAF97C - 629.0); v1 = ostream::operator<<(v0, 32); v2 = 224.0 - *(float *)&dword_FAF980; *(_DWORD *)(v1 + 4) = 1; v3 = (ostream *)ostream::operator<<(v2); ostream::operator<<(v3, aM); } LineTo(hdcSrc, (__int64)*(float *)&dword_FAF988, (__int64)*(float *)&dword_FAF98C); result = byte_FAF9E0; if ( byte_FAF9E0 ) { dword_FAF934 = 1; v5 = (ostream *)ostream::operator<<(*(float *)&dword_FAF988 - 629.0); v6 = ostream::operator<<(v5, 32); v7 = 224.0 - *(float *)&dword_FAF98C; *(_DWORD *)(v6 + 4) = 1; v8 = (ostream *)ostream::operator<<(v7); return ostream::operator<<(v8, aLB); } return result; } // FAF934: using guessed type int dword_FAF934; // FAF97C: using guessed type int dword_FAF97C; // FAF980: using guessed type int dword_FAF980; // FAF988: using guessed type int dword_FAF988; // FAF98C: using guessed type int dword_FAF98C; // FAF9E0: using guessed type char byte_FAF9E0; //----- (00402CD0) -------------------------------------------------------- float *__cdecl sub_402CD0(float *a1) { float *result; // eax double v2; // st7 double v3; // st7 double v4; // st7 result = a1; *a1 = *a1 - flt_FA0EC8; a1[1] = a1[1] - flt_FA0EC4; v2 = 1.0 / (a1[2] * 0.0011111111 + 1.0); *a1 = v2 * *a1 + flt_FA0EC8; a1[1] = v2 * a1[1] + flt_FA0EC4; v3 = flt_C906A4 * *a1; *a1 = v3; *a1 = v3 + flt_FA0EC8; v4 = flt_C906A4 * a1[1]; a1[1] = v4; a1[1] = v4 + flt_FA0EC4; return result; } // C906A4: using guessed type float flt_C906A4; // FA0EC4: using guessed type float flt_FA0EC4; // FA0EC8: using guessed type float flt_FA0EC8; //----- (00402D40) -------------------------------------------------------- int __cdecl sub_402D40(int a1, int a2, int a3) { int result; // eax int v4; // [esp+0h] [ebp-Ch] BYREF int v5; // [esp+4h] [ebp-8h] int v6; // [esp+8h] [ebp-4h] v4 = a1; v5 = a2; v6 = a3; sub_402D90((float *)&v4); result = v6; dword_FAF9C8 = v4; dword_FAF9CC = v5; dword_FAF9D0 = v6; return result; } // FAF9C8: using guessed type int dword_FAF9C8; // FAF9CC: using guessed type int dword_FAF9CC; // FAF9D0: using guessed type int dword_FAF9D0; //----- (00402D90) -------------------------------------------------------- float *__cdecl sub_402D90(float *a1) { float *result; // eax double v2; // st7 double v3; // st6 double v4; // st6 double v5; // st7 float v6; // [esp+4h] [ebp+4h] result = a1; v2 = flt_4110A4 * a1[1]; v3 = flt_4110A8 * a1[2]; v6 = flt_4110A0 * *a1 * flt_FAF970 + flt_FA0EBC * v3; v4 = v3 * flt_FAF970 - flt_FA0EBC * v6; result[2] = flt_FAF96C * v4 - flt_FA0EB8 * v2; v5 = flt_FA0EB8 * v4 + flt_FAF96C * v2; *result = flt_FAF974 * v6 - flt_FA0EC0 * v5; result[1] = flt_FAF974 * v5 + flt_FA0EC0 * v6; *result = *(float *)&dword_FAF9C8 + *result; result[1] = *(float *)&dword_FAF9CC + result[1]; result[2] = *(float *)&dword_FAF9D0 + result[2]; return result; } // 4110A0: using guessed type float flt_4110A0; // 4110A4: using guessed type float flt_4110A4; // 4110A8: using guessed type float flt_4110A8; // FA0EB8: using guessed type float flt_FA0EB8; // FA0EBC: using guessed type float flt_FA0EBC; // FA0EC0: using guessed type float flt_FA0EC0; // FAF96C: using guessed type float flt_FAF96C; // FAF970: using guessed type float flt_FAF970; // FAF974: using guessed type float flt_FAF974; // FAF9C8: using guessed type int dword_FAF9C8; // FAF9CC: using guessed type int dword_FAF9CC; // FAF9D0: using guessed type int dword_FAF9D0; //----- (00402E60) -------------------------------------------------------- char sub_402E60() { int v0; // eax int v1; // ecx char result; // al v0 = 9 * dword_FAF9C4; v1 = dword_FAF9C4 + 1; dword_C906B0[v0] = dword_FAF9C8; dword_C906B4[v0] = dword_FAF9CC; dword_C906B8[v0] = dword_FAF9D0; dword_C906BC[v0] = LODWORD(flt_FAF9D4); dword_C906C0[v0] = LODWORD(flt_FAF9D8); dword_C906C4[v0] = LODWORD(flt_FAF9DC); dword_C906C8[v0] = LODWORD(flt_4110A0); dword_C906CC[v0] = LODWORD(flt_4110A4); dword_C906D0[v0] = LODWORD(flt_4110A8); result = byte_FAF9E0; dword_FAF9C4 = v1; if ( byte_FAF9E0 ) return ostream::operator<<((ostream *)&unk_FAF930, aU); return result; } // 4110A0: using guessed type float flt_4110A0; // 4110A4: using guessed type float flt_4110A4; // 4110A8: using guessed type float flt_4110A8; // C906B0: using guessed type int dword_C906B0[]; // C906B4: using guessed type int dword_C906B4[]; // C906B8: using guessed type int dword_C906B8[]; // C906BC: using guessed type int dword_C906BC[]; // C906C0: using guessed type int dword_C906C0[]; // C906C4: using guessed type int dword_C906C4[]; // C906C8: using guessed type int dword_C906C8[]; // C906CC: using guessed type int dword_C906CC[]; // C906D0: using guessed type int dword_C906D0[48724]; // FAF9C4: using guessed type int dword_FAF9C4; // FAF9C8: using guessed type int dword_FAF9C8; // FAF9CC: using guessed type int dword_FAF9CC; // FAF9D0: using guessed type int dword_FAF9D0; // FAF9D4: using guessed type float flt_FAF9D4; // FAF9D8: using guessed type float flt_FAF9D8; // FAF9DC: using guessed type float flt_FAF9DC; // FAF9E0: using guessed type char byte_FAF9E0; //----- (00402F00) -------------------------------------------------------- char sub_402F00() { int v0; // edx int v1; // ecx int v2; // edx int v3; // ecx int v4; // edx int v5; // ecx int v6; // edx int v7; // eax char result; // al --dword_FAF9C4; v0 = dword_C906B4[9 * dword_FAF9C4]; dword_FAF9C8 = dword_C906B0[9 * dword_FAF9C4]; v1 = dword_C906B8[9 * dword_FAF9C4]; dword_FAF9CC = v0; v2 = dword_C906BC[9 * dword_FAF9C4]; dword_FAF9D0 = v1; v3 = dword_C906C0[9 * dword_FAF9C4]; LODWORD(flt_FAF9D4) = v2; v4 = dword_C906C4[9 * dword_FAF9C4]; LODWORD(flt_FAF9D8) = v3; v5 = dword_C906C8[9 * dword_FAF9C4]; LODWORD(flt_FAF9DC) = v4; v6 = dword_C906CC[9 * dword_FAF9C4]; v7 = dword_C906D0[9 * dword_FAF9C4]; LODWORD(flt_4110A0) = v5; LODWORD(flt_4110A4) = v6; LODWORD(flt_4110A8) = v7; sub_4024F0(); result = byte_FAF9E0; if ( byte_FAF9E0 ) return ostream::operator<<((ostream *)&unk_FAF930, aU_0); return result; } // 4110A0: using guessed type float flt_4110A0; // 4110A4: using guessed type float flt_4110A4; // 4110A8: using guessed type float flt_4110A8; // C906B0: using guessed type int dword_C906B0[]; // C906B4: using guessed type int dword_C906B4[]; // C906B8: using guessed type int dword_C906B8[]; // C906BC: using guessed type int dword_C906BC[]; // C906C0: using guessed type int dword_C906C0[]; // C906C4: using guessed type int dword_C906C4[]; // C906C8: using guessed type int dword_C906C8[]; // C906CC: using guessed type int dword_C906CC[]; // C906D0: using guessed type int dword_C906D0[48724]; // FAF9C4: using guessed type int dword_FAF9C4; // FAF9C8: using guessed type int dword_FAF9C8; // FAF9CC: using guessed type int dword_FAF9CC; // FAF9D0: using guessed type int dword_FAF9D0; // FAF9D4: using guessed type float flt_FAF9D4; // FAF9D8: using guessed type float flt_FAF9D8; // FAF9DC: using guessed type float flt_FAF9DC; // FAF9E0: using guessed type char byte_FAF9E0; //----- (00402FA0) -------------------------------------------------------- int sub_402FA0() { DWORD TickCount; // eax double v1; // st7 int v3; // [esp+0h] [ebp-11Ch] int v4; // [esp+4h] [ebp-118h] int v5; // [esp+Ch] [ebp-110h] int v6; // [esp+10h] [ebp-10Ch] float v7; // [esp+18h] [ebp-104h] char Buffer[256]; // [esp+1Ch] [ebp-100h] BYREF TickCount = GetTickCount(); sprintf(Buffer, "txtnsn%010i.ai", TickCount); ofstream::open((ofstream *)&unk_FAF930, Buffer, 2, 420); ostream::operator<<((ostream *)&unk_FAF930, aPsAdobe10Creat); v7 = 0.001; do { *(float *)&v6 = 0.49900001 - v7; *(float *)&v5 = 0.66666502 - v7; *(float *)&v4 = v7 - 0.5; *(float *)&v3 = v7 - 0.66666502; sub_4029E0(v3, v4, 0, v5, v6, 0); v1 = v7 + 0.001; v7 = v1; } while ( v1 < 0.02 ); sub_4026F0(); byte_FAF9E0 = 1; sub_402220(); ostream::operator<<((ostream *)&unk_FAF930, a0870600280K); sub_402E60(); sub_4029E0(-1087722865, -1090519040, 0, 1059760783, 1056931054, 0); sub_4026F0(); sub_402F00(); byte_FAF9E0 = 0; ostream::operator<<((ostream *)&unk_FAF930, aPagetrailerEof); return unknown_libname_15(&unk_FAF930); } // 406760: using guessed type int __thiscall unknown_libname_15(_DWORD); // FAF9E0: using guessed type char byte_FAF9E0; //----- (004030D0) -------------------------------------------------------- int sub_4030D0() { sub_4030E0(); return atexit(unknown_libname_3); } //----- (004030E0) -------------------------------------------------------- ofstream *sub_4030E0() { return ofstream::ofstream((ofstream *)&unk_FAF930); } //----- (00403130) -------------------------------------------------------- void __thiscall sub_403130(_DWORD *this) { *this = &off_40FCCC; } // 40FCCC: using guessed type _UNKNOWN *off_40FCCC; //----- (00403160) -------------------------------------------------------- _BYTE *__thiscall sub_403160(_BYTE *this) { _BYTE *result; // eax result = this; *(_DWORD *)this = &off_40FCE8; this[4] = 105; return result; } // 40FCE8: using guessed type _UNKNOWN *off_40FCE8; //----- (00403170) -------------------------------------------------------- char sub_403170() { float v1; // [esp+0h] [ebp-14h] float v2; // [esp+0h] [ebp-14h] float v3; // [esp+0h] [ebp-14h] float v4; // [esp+10h] [ebp-4h] sub_402E60(); if ( (int)sub_4017C0() <= 7000 ) v4 = ((double)(int)sub_4017C0() - 3000.0) * 0.00025000001 * 0.039999999; else v4 = 0.039999999; if ( (int)sub_4017C0() > 3000 ) { sub_402D40(-1097229926, 0, 0); sub_402580(v4, v4, v4); sub_402E60(); sub_402580(2.0, 2.0, 2.0); v1 = (double)(int)sub_4017C0() * 0.1; sub_4024A0(v1, 0.0, 1.0, 1.0); sub_401130(aTextension, -2.0); sub_402F00(); sub_402E60(); v2 = (double)(int)sub_4017C0() * 0.050000001; sub_4024A0(v2, 1.0, 0.0, 1.0); sub_401130(aJoshNimoy0100, 1.0); sub_402F00(); sub_402E60(); sub_402580(0.5, 0.5, 0.5); v3 = (double)(int)sub_4017C0() * 0.033333335; sub_4024A0(v3, 1.0, 0.0, 1.0); sub_401130(aBasedOnWorkDon, -1.2); sub_401130(aAndUclaDesignM, -1.0); sub_402F00(); } sub_402F00(); sub_402E60(); if ( dword_138ECF8 ) sub_402580(0.017999999, 0.017999999, 1.0); else sub_402580(0.0185, 0.0185, 1.0); if ( (int)sub_4017C0() > 6000 ) { sub_402D40(-1040187392, 1097859072, 0); sub_4011D0(aInstructionsNa); sub_402F00(); sub_402E60(); sub_402580(0.02, 0.02, 0.02); } if ( (int)sub_4017C0() % 1000 >= 500 ) sub_4029E0(-1048576000, 1060320051, 0, -1049624576, -1082130432, 0); else sub_402840(-1048576000, 1060320051, 0, -1049624576, -1082130432, 0); return sub_402F00(); } // 138ECF8: using guessed type int dword_138ECF8; //----- (004033B0) -------------------------------------------------------- int sub_4033B0() { sub_4033C0(); return atexit(unknown_libname_4); } //----- (004033C0) -------------------------------------------------------- ofstream *sub_4033C0() { return ofstream::ofstream((ofstream *)&unk_138EC80); } //----- (00403400) -------------------------------------------------------- _DWORD *__thiscall sub_403400(_DWORD *this) { _DWORD *result; // eax result = this; *this = &off_40FD1C; this[16386] = 0; *((_BYTE *)this + 8) = 0; *((_BYTE *)this + 4) = 10; return result; } // 40FD1C: using guessed type _UNKNOWN *off_40FD1C; //----- (00403420) -------------------------------------------------------- char __thiscall sub_403420(_DWORD *this) { int i; // esi char v3; // al float v5; // [esp+0h] [ebp-1Ch] float v6; // [esp+0h] [ebp-1Ch] sub_402E60(); v5 = (double)(int)sub_4017C0() * 0.02; sub_4024A0(v5, 2.2, 1.1, 1.3); sub_402580(0.039999999, 0.039999999, 0.039999999); sub_402E60(); if ( (int)sub_4017C0() % 1000 >= 500 ) sub_4029E0(0, -1082130432, 0, 1060320051, 0, 0); else sub_402840(0, -1082130432, 0, 1060320051, 0, 0); for ( i = this[16386] - 1; i >= 0; --i ) { v3 = *((_BYTE *)this + i + 8); if ( v3 == 13 ) { sub_4024A0(180.0, 1.0, 0.0, 1.0); sub_402D40(0, 0, 1065353216); } else { v6 = (float)v3; sub_4024A0(v6, 0.1, 0.0, 0.1); } sub_402D40(-1087163597, 0, 0); sub_401110(*((_BYTE *)this + i + 8)); } sub_402F00(); return sub_402F00(); } //----- (00403530) -------------------------------------------------------- int __thiscall sub_403530(_DWORD *this, int a2) { int result; // eax result = a2; if ( a2 == 8 ) { result = this[16386]; if ( result > 0 ) { this[16386] = --result; *((_BYTE *)this + result + 8) = 0; } } else if ( a2 != 131 && a2 != 130 && a2 != 128 && a2 != 129 ) { *((_BYTE *)this + this[16386] + 8) = a2; result = this[16386] + 1; this[16386] = result; *((_BYTE *)this + result + 8) = 0; } return result; } //----- (00403590) -------------------------------------------------------- int sub_403590() { sub_4035A0(); return atexit(unknown_libname_5); } //----- (004035A0) -------------------------------------------------------- ofstream *sub_4035A0() { return ofstream::ofstream((ofstream *)&unk_176DFC8); } //----- (004035E0) -------------------------------------------------------- char *__thiscall sub_4035E0(char *this) { char *result; // eax int v2; // ecx _BYTE *v3; // edx result = this; v2 = 100; *(_DWORD *)result = &off_40FD3C; *((_DWORD *)result + 2) = 0; result[12] = 0; v3 = result + 131108; do { *v3 = 0; v3 += 65564; --v2; } while ( v2 ); result[4] = 1; return result; } // 40FD3C: using guessed type _UNKNOWN *off_40FD3C; //----- (00403610) -------------------------------------------------------- char __thiscall sub_403610(int this) { int v2; // esi int v3; // edi float v5; // [esp+0h] [ebp-30h] float v6; // [esp+1Ch] [ebp-14h] sub_402E60(); sub_402D40(-1088841318, 1048576000, 0); sub_4024A0(90.0, 0.0, 0.0, 1.0); v6 = 0.30000001 / (double)*(int *)(this + 8); sub_402580(v6, v6, v6); v5 = (float)*(int *)(this + 8); sub_4024A0(v5, 0.0, 0.0, -1.5); sub_401130((const char *)(this + 12), 3.0); sub_402F00(); v2 = this + 131088; v3 = 100; do { if ( *(_BYTE *)(v2 + 20) ) { sub_402E60(); sub_402D40(*(_DWORD *)(v2 + 8), *(_DWORD *)(v2 + 12), 0); sub_4024A0(*(float *)(v2 - 4), 0.0, 0.0, 1.0); sub_402580(*(float *)(v2 + 4), *(float *)(v2 + 4), *(float *)(v2 + 4)); sub_401130((const char *)(v2 - 65540), *(float *)v2); sub_402F00(); *(float *)(v2 + 12) = *(float *)(v2 + 12) - 0.0040000002; *(float *)(v2 + 8) = 0.2 / (double)*(unsigned int *)(v2 + 16) + *(float *)(v2 + 8); *(float *)v2 = (360.0 / (double)*(unsigned int *)(v2 + 16) - *(float *)v2) * 0.2 + *(float *)v2; *(float *)(v2 + 4) = *(float *)(v2 + 4) + 0.000099999997; *(float *)(v2 - 4) = *(float *)(v2 - 4) - 3.0; if ( *(float *)(v2 + 12) < -0.8 || *(float *)(v2 + 8) > 0.8 ) *(_BYTE *)(v2 + 20) = 0; } v2 += 65564; --v3; } while ( v3 ); if ( (int)sub_4017C0() % 1000 >= 500 ) return sub_4029E0(-1088841318, 1055957975, 0, -1088505774, 1047904911, 0); else return sub_402840(-1088841318, 1055957975, 0, -1088505774, 1047904911, 0); } //----- (004037C0) -------------------------------------------------------- int __thiscall sub_4037C0(int this) { char v2; // cl int v3; // esi int v4; // eax int v5; // eax int result; // eax _BYTE *i; // ecx int v8; // ebp v2 = 0; v3 = *(_DWORD *)(this + 8); v4 = 0; if ( v3 > 0 ) { do { if ( *(_BYTE *)(this + v4 + 12) == 32 ) v2 = 1; ++v4; } while ( v4 < v3 ); if ( v2 == 1 && *(_BYTE *)(v3 + this + 11) != 32 ) { *(_BYTE *)(v3 + this + 12) = 32; v5 = *(_DWORD *)(this + 8) + 1; *(_DWORD *)(this + 8) = v5; *(_BYTE *)(v5 + this + 12) = 0; } } result = 0; for ( i = (_BYTE *)(this + 131108); *i; i += 65564 ) { if ( ++result >= 100 ) return result; } v8 = this + 65564 * result; strcpy((char *)(v8 + 65548), (const char *)(this + 12)); result = 0; *(float *)(v8 + 131084) = 90.0 - (double)*(int *)(this + 8) * 1.5; *(_DWORD *)(v8 + 131088) = 1077936128; *(_DWORD *)(v8 + 131096) = -1088841318; *(_DWORD *)(v8 + 131100) = 1048576000; *(float *)(v8 + 131092) = 0.30000001 / (double)*(int *)(this + 8); *(_DWORD *)(v8 + 131104) = strlen((const char *)(this + 12)); *(_BYTE *)(v8 + 131108) = 1; *(_BYTE *)(this + 12) = 0; *(_DWORD *)(this + 8) = 0; return result; } //----- (004038C0) -------------------------------------------------------- int __thiscall sub_4038C0(_DWORD *this, int a2) { int result; // eax int v3; // edx int v4; // edx int v5; // edi int v6; // ebp char *v7; // esi char v8; // dl result = a2; if ( a2 == 8 ) { result = this[2]; if ( result > 0 ) { this[2] = --result; *((_BYTE *)this + result + 12) = 0; } return result; } if ( a2 != 131 && a2 != 130 && a2 != 128 && a2 != 129 ) { if ( a2 == 13 ) goto LABEL_18; if ( a2 != 63 && a2 != 46 && a2 != 33 ) { *((_BYTE *)this + this[2] + 12) = a2; v3 = this[2] + 1; this[2] = v3; *((_BYTE *)this + v3 + 12) = 0; result = this[2]; if ( result < 45 ) return result; return (*(int (__thiscall **)(_DWORD *))(*this + 28))(this); } } if ( a2 != 63 && a2 != 46 && a2 != 33 ) return result; *((_BYTE *)this + this[2] + 12) = a2; v4 = this[2] + 1; this[2] = v4; *((_BYTE *)this + v4 + 12) = 0; LABEL_18: v5 = this[2]; v6 = 0; if ( v5 > 0 ) { v7 = (char *)(this + 3); do { v8 = *v7; if ( *v7 != 63 && v8 != 33 && v8 != 46 ) ++v6; ++v7; } while ( (int)&v7[-12 - (_DWORD)this] < v5 ); if ( v6 > 2 ) return (*(int (__thiscall **)(_DWORD *))(*this + 28))(this); } if ( a2 == 13 ) return (*(int (__thiscall **)(_DWORD *))(*this + 28))(this); return result; } // 40393E: conditional instruction was optimized away because %arg_0.4 is in (==21|==2E|==3F|80..83) //----- (004039B0) -------------------------------------------------------- int sub_4039B0() { sub_4039C0(); return atexit(unknown_libname_6); } //----- (004039C0) -------------------------------------------------------- ofstream *sub_4039C0() { return ofstream::ofstream((ofstream *)&unk_1B4D310); } //----- (00403A00) -------------------------------------------------------- _DWORD *__thiscall sub_403A00(_DWORD *this) { _DWORD *result; // eax result = this; *this = &off_40FD94; this[16386] = 0; *((_BYTE *)this + 8) = 0; this[16387] = 0; this[16388] = 1053609165; this[16389] = 0; this[16390] = 0; *((_BYTE *)this + 4) = 2; return result; } // 40FD94: using guessed type _UNKNOWN *off_40FD94; //----- (00403A40) -------------------------------------------------------- char __thiscall sub_403A40(int this) { double v2; // st7 int v3; // edi char v4; // bl int v5; // ebp char v6; // al char v7; // cl int v8; // ecx int v9; // edx char *v10; // eax char v11; // bl int v12; // ecx int v13; // edi float v15; // [esp+0h] [ebp-12Ch] float v16; // [esp+0h] [ebp-12Ch] float v17; // [esp+0h] [ebp-12Ch] float v18; // [esp+0h] [ebp-12Ch] int v19; // [esp+8h] [ebp-124h] float v20; // [esp+20h] [ebp-10Ch] float v21; // [esp+20h] [ebp-10Ch] int v22; // [esp+20h] [ebp-10Ch] int i; // [esp+20h] [ebp-10Ch] char v24; // [esp+25h] [ebp-107h] char v25; // [esp+26h] [ebp-106h] char v26; // [esp+27h] [ebp-105h] char Buffer[256]; // [esp+2Ch] [ebp-100h] BYREF sub_402E60(); sub_4024A0(90.0, 0.0, 0.0, 1.0); sub_402580(0.80000001, 0.80000001, 1.0); v15 = (double)(int)sub_4017C0() * 0.1; sub_4024A0(v15, 1.0, 0.0, 0.0); v2 = (double)(*(_DWORD *)(this + 65544) + 1); v20 = (1.5 / v2 - *(float *)(this + 65552)) * 0.25 + *(float *)(this + 65552); *(float *)(this + 65552) = v20; *(float *)(this + 65556) = (v2 * -0.33333334 - *(float *)(this + 65556)) * 0.25 + *(float *)(this + 65556); *(float *)(this + 65560) = (0.5 / v2 - *(float *)(this + 65560)) * 0.25 + *(float *)(this + 65560); sub_402580(v20, v20, v20); sub_402D40(*(_DWORD *)(this + 65556), *(_DWORD *)(this + 65560), 0); sub_402E60(); v16 = (double)(int)sub_4017C0() * -0.1; sub_4024A0(v16, 1.0, 0.0, 0.0); v21 = 0.02 / *(float *)(this + 65552); sub_402580(v21, v21, v21); sub_4024A0(-90.0, 0.0, 0.0, 1.0); sub_402D40(1084227584, 0, 0); v3 = 0; v4 = 0; v5 = 0; v26 = 0; v25 = 0; v24 = 0; v22 = 1; if ( *(int *)(this + 65544) > 0 ) { while ( 1 ) { v6 = *(_BYTE *)(this + v5 + 8); v7 = 0; if ( v6 == 33 && !v26 ) break; if ( v6 == 46 && !v25 ) { sub_4011D0(aPeriod); v25 = 1; goto LABEL_11; } if ( v6 == 63 && !v24 ) { sub_4011D0(aQuestionMark); v24 = 1; goto LABEL_11; } LABEL_12: if ( !v5 && *(_BYTE *)(this + 8) != 32 ) goto LABEL_17; if ( *(_BYTE *)(this + v5 + 8) != 32 && v4 ) { if ( !v7 ) { LABEL_17: sprintf(Buffer, "word %02i \"", v3 + 1); v8 = 8; if ( *(_BYTE *)(this + v5 + 8) != 32 ) { v9 = *(_DWORD *)(this + 65544); v10 = (char *)(this + v5 + 8); do { if ( (int)&v10[-8 - this] >= v9 ) break; v11 = *v10; ++v8; ++v10; Buffer[v8] = v11; } while ( *v10 != 32 ); } v12 = v8 + 1; Buffer[v12] = 34; Buffer[v12 + 1] = 0; sub_4011D0(Buffer); ++v3; v4 = 0; } LABEL_23: sub_402E60(); sub_402AD0(-1082130432, 0, 0, -1054867456, 0, 0); sub_402D40(-1047003136, 0, 0); sprintf(Buffer, "character %02i", v22); sub_4011D0(Buffer); sub_402F00(); goto LABEL_24; } if ( v7 ) goto LABEL_23; LABEL_24: if ( *(_BYTE *)(this + v5 + 8) == 32 ) v4 = 1; else ++v22; *(float *)&v19 = *(float *)(this + 65552) * 35.0; sub_402D40(0, v19, 0); if ( ++v5 >= *(_DWORD *)(this + 65544) ) goto LABEL_28; } sub_4011D0(aExclamationMar); v26 = 1; LABEL_11: v7 = 1; goto LABEL_12; } LABEL_28: sub_402F00(); v13 = 0; for ( i = 0; v13 < *(_DWORD *)(this + 65544); i = v13 ) { sub_402E60(); v17 = (double)i * 20.0; sub_4024A0(v17, 1.0, 0.0, 0.0); sub_401110(*(_BYTE *)(this + v13 + 8)); sub_4024A0(-180.0, 0.0, 0.0, 1.0); sub_401110(*(_BYTE *)(this + v13 + 8)); sub_402F00(); sub_402D40(1060320051, 0, 0); ++v13; } v18 = (double)*(int *)(this + 65544) * 20.0; sub_4024A0(v18, 1.0, 0.0, 0.0); if ( (int)sub_4017C0() % 1000 >= 500 ) sub_4029E0(0, 0, 0, 1060320051, -1082130432, 0); else sub_402840(0, 0, 0, 1060320051, -1082130432, 0); return sub_402F00(); } //----- (00403E40) -------------------------------------------------------- int __thiscall sub_403E40(_DWORD *this, int a2) { char v2; // al int result; // eax v2 = a2; if ( a2 == 8 ) { result = this[16386]; if ( result > 0 ) this[16386] = --result; } else { if ( a2 == 13 || a2 == 10 ) v2 = 32; *((_BYTE *)this + this[16386] + 8) = v2; result = this[16386] + 1; this[16386] = result; this[16387] = result; } return result; } //----- (00403E90) -------------------------------------------------------- int sub_403E90() { sub_403EA0(); return atexit(unknown_libname_7); } //----- (00403EA0) -------------------------------------------------------- ofstream *sub_403EA0() { return ofstream::ofstream((ofstream *)&unk_1F2C658); } //----- (00403EE0) -------------------------------------------------------- _DWORD *__thiscall sub_403EE0(_DWORD *this) { _DWORD *result; // eax char *v2; // edx int v3; // edi int v4; // ecx result = this; this[2] = 1092616192; this[3] = 1092616192; *this = &off_40FDC8; this[4] = 10; this[5] = 10; this[6] = 0; this[7] = 0; this[8] = 0; this[9] = 1022363278; this[10] = 1014565228; this[11] = 0; *((_BYTE *)this + 4) = 3; v2 = (char *)(this + 12); v3 = 20; do { v4 = 20; do { v2[1] = 1; *v2 = 32; *((_DWORD *)v2 + 1) = 0; *((_DWORD *)v2 + 2) = 0; *((_DWORD *)v2 + 3) = 0; *((_DWORD *)v2 + 7) = 0; *((_DWORD *)v2 + 4) = 0; *((_DWORD *)v2 + 5) = 0; *((_DWORD *)v2 + 6) = 0; *((_DWORD *)v2 + 8) = 0; v2 += 36; --v4; } while ( v4 ); --v3; } while ( v3 ); return result; } // 40FDC8: using guessed type _UNKNOWN *off_40FDC8; //----- (00403F60) -------------------------------------------------------- char __thiscall sub_403F60(float *this) { float *v2; // ebx float *v3; // esi int v4; // ebp signed int v5; // eax double v6; // st7 double v7; // st6 int v8; // esi int v9; // ecx int v10; // eax float *v11; // ecx int v13; // [esp+0h] [ebp-34h] int v14; // [esp+4h] [ebp-30h] int v15; // [esp+Ch] [ebp-28h] int v16; // [esp+10h] [ebp-24h] int v17; // [esp+14h] [ebp-20h] float v18; // [esp+28h] [ebp-Ch] int v19; // [esp+2Ch] [ebp-8h] float v20; // [esp+2Ch] [ebp-8h] float v21; // [esp+2Ch] [ebp-8h] int v22; // [esp+30h] [ebp-4h] float v23; // [esp+30h] [ebp-4h] sub_402E60(); sub_4024A0(-5.0, 3.0, 0.0, 0.5); sub_4029E0(-1093874483, -1093874483, 0, 1053609165, 1053609165, 0); sub_402E60(); sub_402580(0.039999999, 0.039999999, 0.039999999); sub_402D40(-1055182029, -1055706317, 0); v2 = this + 13; v22 = 20; do { v3 = v2; v4 = 20; do { *v3 = (v3[3] - *v3) * 0.33333334 + *v3; v3[1] = (v3[4] - v3[1]) * 0.33333334 + v3[1]; *(float *)&v19 = (v3[5] - v3[2]) * 0.1 + v3[2]; v3[2] = *(float *)&v19; sub_402D40(0, 0, v19); if ( !*((_BYTE *)v3 - 3) ) { sub_402E60(); sub_4024A0(v3[6], 1.0, 0.0, -1.0); sub_402580(*v3, *v3, *v3); } sub_401110(*((_BYTE *)v3 - 4)); if ( !*((_BYTE *)v3 - 3) ) sub_402F00(); *(float *)&v17 = -v3[2]; sub_402D40(1065353216, 0, v17); if ( !*((_BYTE *)v3 - 3) ) { v3[6] = v3[6] + 20.0; if ( v3[2] > 49.0 ) *((_BYTE *)v3 - 4) = 32; } v3 += 180; --v4; } while ( v4 ); sub_402D40(-1046478848, 0, 0); sub_402D40(0, 1065353216, 0); v2 += 9; --v22; } while ( v22 ); sub_402F00(); this[2] = ((double)*((int *)this + 4) - this[2]) * 0.69999999 + this[2]; this[3] = ((double)*((int *)this + 5) - this[3]) * 0.69999999 + this[3]; v5 = sub_4017C0(); *(float *)&v16 = this[3] * 0.039999999 - 0.40000001; *(float *)&v15 = this[2] * 0.039999999 - 0.40000001; *(float *)&v14 = (this[3] + 1.0) * 0.039999999 - 0.40000001; *(float *)&v13 = (this[2] + 1.0) * 0.039999999 - 0.40000001; if ( v5 % 1000 >= 500 ) sub_4029E0(v13, v14, 0, v15, v16, 0); else sub_402840(v13, v14, 0, v15, v16, 0); v6 = this[6] + this[9]; v20 = 0.02; this[6] = v6; v18 = this[10] + this[7]; v7 = 0.02; this[7] = v18; if ( v6 < 0.0 ) v20 = -0.02; if ( v18 < 0.0 ) v7 = -0.02; v21 = (double)((int)(__int64)((v6 + v20) * 1000.0) % 40) * 0.001 + v20; v23 = (double)((int)(__int64)((v18 + v7) * 1000.0) % 40) * 0.001 + v7; v8 = (__int64)((v6 - v21) * 25.0 + 10.0); v9 = (__int64)((v18 - v23) * 25.0 + 10.0); if ( v6 > 0.0 ) ++v8; if ( v18 > 0.0 ) ++v9; v10 = v9 + 20 * v8; v11 = &this[9 * v10]; switch ( *((_BYTE *)v11 + 48) ) { case 0: case 9: case 0xA: case 0xD: case 0x20: break; default: *((_BYTE *)v11 + 49) = 1; this[9 * v10 + 18] = 50.0; v11[16] = 5.0; if ( v21 > 0.02 && this[6] > 0.0 ) this[9] = -this[9]; if ( v23 > 0.02 && this[7] > 0.0 ) this[10] = -this[10]; if ( v21 < 0.03 && this[6] < 0.0 ) this[9] = -this[9]; if ( v23 < 0.03 && this[7] < 0.0 ) this[10] = -this[10]; *((_BYTE *)v11 + 49) = 0; break; } if ( this[6] < -0.38999999 && this[9] < 0.0 ) this[9] = -this[9]; if ( this[7] < -0.38999999 && this[10] < 0.0 ) this[10] = -this[10]; if ( this[6] > 0.34999999 && this[9] > 0.0 ) this[9] = -this[9]; if ( this[7] > 0.34999999 && this[10] > 0.0 ) this[10] = -this[10]; if ( this[9] == this[10] ) this[9] = this[9] + 0.1; (*(void (__thiscall **)(float *, _DWORD, _DWORD, _DWORD, int))(*(_DWORD *)this + 28))( this, *((_DWORD *)this + 6), *((_DWORD *)this + 7), *((_DWORD *)this + 8), 1); return sub_402F00(); } //----- (004044A0) -------------------------------------------------------- char __stdcall sub_4044A0(int a1, float a2, int a3, char a4) { float v5; // [esp+0h] [ebp-D8h] float v6; // [esp+4h] [ebp-D4h] float v7; // [esp+8h] [ebp-D0h] float v8; // [esp+Ch] [ebp-CCh] float v9; // [esp+10h] [ebp-C8h] float v10; // [esp+14h] [ebp-C4h] int v11; // [esp+18h] [ebp-C0h] BYREF float v12; // [esp+1Ch] [ebp-BCh] int v13; // [esp+20h] [ebp-B8h] int v14; // [esp+24h] [ebp-B4h] float v15; // [esp+28h] [ebp-B0h] int v16; // [esp+2Ch] [ebp-ACh] float v17; // [esp+30h] [ebp-A8h] float v18; // [esp+34h] [ebp-A4h] int v19; // [esp+38h] [ebp-A0h] float v20; // [esp+3Ch] [ebp-9Ch] float v21; // [esp+40h] [ebp-98h] int v22; // [esp+44h] [ebp-94h] float v23; // [esp+48h] [ebp-90h] float v24; // [esp+4Ch] [ebp-8Ch] int v25; // [esp+50h] [ebp-88h] float v26; // [esp+54h] [ebp-84h] float v27; // [esp+58h] [ebp-80h] int v28; // [esp+5Ch] [ebp-7Ch] float v29; // [esp+60h] [ebp-78h] float v30; // [esp+64h] [ebp-74h] int v31; // [esp+68h] [ebp-70h] float v32; // [esp+6Ch] [ebp-6Ch] float v33; // [esp+70h] [ebp-68h] int v34; // [esp+74h] [ebp-64h] float v35; // [esp+78h] [ebp-60h] float v36; // [esp+7Ch] [ebp-5Ch] int v37; // [esp+80h] [ebp-58h] float v38; // [esp+84h] [ebp-54h] float v39; // [esp+88h] [ebp-50h] int v40; // [esp+8Ch] [ebp-4Ch] float v41; // [esp+90h] [ebp-48h] float v42; // [esp+94h] [ebp-44h] int v43; // [esp+98h] [ebp-40h] float v44; // [esp+9Ch] [ebp-3Ch] float v45; // [esp+A0h] [ebp-38h] int v46; // [esp+A4h] [ebp-34h] float v47; // [esp+A8h] [ebp-30h] float v48; // [esp+ACh] [ebp-2Ch] int v49; // [esp+B0h] [ebp-28h] float v50; // [esp+B4h] [ebp-24h] float v51; // [esp+B8h] [ebp-20h] int v52; // [esp+BCh] [ebp-1Ch] float v53; // [esp+C0h] [ebp-18h] float v54; // [esp+C4h] [ebp-14h] int v55; // [esp+C8h] [ebp-10h] float v56; // [esp+CCh] [ebp-Ch] float v57; // [esp+D0h] [ebp-8h] int v58; // [esp+D4h] [ebp-4h] v11 = a1; v14 = a1; v12 = a2 + 0.0144; v22 = a3; v31 = a3; v13 = a3; v16 = a3; v19 = a3; v15 = a2 + 0.0232; v25 = a3; v28 = a3; v34 = a3; v37 = a3; v40 = a3; v43 = a3; v9 = *(float *)&a1 + 0.0028000001; v17 = v9; v46 = a3; v18 = a2 + 0.0288; v7 = *(float *)&a1 + 0.0088; v20 = v7; v21 = a2 + 0.034400001; v5 = *(float *)&a1 + 0.0144; v23 = v5; v24 = a2 + 0.037599999; v8 = *(float *)&a1 + 0.0232; v26 = v8; v27 = v24; v10 = *(float *)&a1 + 0.0288; v29 = v10; v30 = a2 + 0.0348; v32 = *(float *)&a1 + 0.0348; v33 = v18; v6 = *(float *)&a1 + 0.037599999; v35 = v6; v36 = v15; v38 = v6; v39 = v12; v44 = v10; v41 = *(float *)&a1 + 0.034400001; v42 = a2 + 0.0088; v45 = a2 + 0.0028000001; v54 = v45; v47 = v8; v48 = a2; v51 = a2; v57 = v42; v49 = a3; v52 = a3; v50 = v5; v56 = v9; v53 = v7; v55 = a3; v58 = a3; if ( a4 ) return sub_4028E0((float *)&v11, 16); else return sub_402B10((int)&v11, 43); } //----- (00404720) -------------------------------------------------------- int __thiscall sub_404720(_DWORD *this, int a2) { int result; // eax int v3; // eax int v4; // eax int v5; // esi int v6; // eax switch ( a2 ) { case 8: v3 = this[4]; if ( v3 <= 0 ) { v4 = this[5]; this[4] = 19; if ( v4 <= 0 ) this[5] = 19; else this[5] = v4 - 1; } else { this[4] = v3 - 1; } v5 = this[5]; result = 9 * (v5 + 20 * this[4]); LOBYTE(this[180 * this[4] + 12 + 9 * v5]) = 0; break; case 13: result = this[5]; if ( result >= 19 ) { this[5] = 0; this[4] = 0; } else { ++result; this[4] = 0; this[5] = result; } break; case 128: result = this[4]; if ( result > 0 ) this[4] = --result; break; case 129: result = this[5]; if ( result > 0 ) this[5] = --result; break; case 130: result = this[4]; if ( result < 19 ) this[4] = ++result; break; case 131: result = this[5]; if ( result < 19 ) this[5] = ++result; break; default: LOBYTE(this[180 * this[4] + 12 + 9 * this[5]]) = a2; this[180 * this[4] + 13 + 9 * this[5]] = this[2]; this[180 * this[4] + 14 + 9 * this[5]] = this[3]; this[180 * this[4] + 15 + 9 * this[5]] = 1065353216; this[180 * this[4] + 16 + 9 * this[5]] = 0; this[180 * this[4] + 17 + 9 * this[5]] = 0; this[180 * this[4] + 18 + 9 * this[5]] = 0; this[180 * this[4] + 19 + 9 * this[5]] = 0; this[180 * this[4] + 20 + 9 * this[5]] = 0; BYTE1(this[180 * this[4] + 12 + 9 * this[5]]) = 1; v6 = this[4]; if ( v6 >= 19 ) { result = this[5]; this[4] = 0; if ( result >= 19 ) this[5] = 0; else this[5] = ++result; } else { result = v6 + 1; this[4] = result; } break; } return result; } //----- (00404980) -------------------------------------------------------- int sub_404980() { sub_404990(); return atexit(unknown_libname_8); } //----- (00404990) -------------------------------------------------------- ofstream *sub_404990() { return ofstream::ofstream((ofstream *)&unk_230B9A0); } //----- (004049D0) -------------------------------------------------------- char *__thiscall sub_4049D0(char *this) { char *result; // eax int v2; // esi char *v3; // edx result = this; v2 = 0; *(_DWORD *)this = &off_40FE44; this[4] = 4; v3 = this + 8; do { v3[12] = 32; *(_DWORD *)v3 = 0; *((_DWORD *)v3 + 4) = -1123066839; v3[20] = 0; *((_DWORD *)v3 + 1) = 1048576000; *((_DWORD *)v3 + 2) = 0; this[v2++ + 2168] = 0; v3 += 24; } while ( v2 < 90 ); *((_DWORD *)this + 566) = 0; return result; } // 40FE44: using guessed type _UNKNOWN *off_40FE44; //----- (00404A20) -------------------------------------------------------- void __thiscall sub_404A20(_DWORD *this) { int i; // edi __int64 v3; // rax int v4; // ecx int v5; // esi int v6; // esi float *v7; // esi int v8; // edi double v9; // st7 float v10; // [esp+0h] [ebp-20h] sub_402E60(); sub_402D40(-1102263091, 1028443341, 0); sub_402580(0.039999999, 0.039999999, 0.039999999); v10 = (double)(int)sub_4017C0() * 0.011111111; sub_4024A0(v10, 0.0, 0.0, 1.0); sub_402D40(0, 1092616192, 0); for ( i = 0; i < 90; ++i ) { v3 = (__int64)((double)(int)sub_4017C0() * 0.0027777778); v4 = 90; v5 = (int)v3 % 90; if ( 90 - (int)v3 % 90 <= 23 ) v5 -= 90; v6 = v5 + 23; if ( v6 == i && this[565] != v6 ) { LOBYTE(v4) = *((_BYTE *)this + i + 2168); (*(void (__thiscall **)(_DWORD *, int))(*this + 28))(this, v4); this[565] = v6; } sub_401110(*((_BYTE *)this + i + 2168)); if ( i == this[566] ) { if ( (int)sub_4017C0() % 1000 >= 500 ) sub_4029E0(0, 1050253722, 0, 1060320051, -1082130432, 0); else sub_402840(0, 1050253722, 0, 1060320051, -1082130432, 0); } sub_4024A0(-4.0, 0.0, 0.0, 1.0); sub_402D40(1060320051, 0, 0); } sub_402F00(); sub_402840(1041865114, 0, 0, 1048576000, 1020054733, 0); v7 = (float *)(this + 6); v8 = 90; do { if ( *((_BYTE *)v7 + 4) ) { sub_402E60(); sub_402D40(*((_DWORD *)v7 - 3), *((_DWORD *)v7 - 2), 0); sub_402580(*v7, *v7, *v7); sub_4024A0(*(v7 - 4), 0.0, 0.0, 1.0); sub_401110(*((_BYTE *)v7 - 4)); sub_402F00(); *(v7 - 4) = *(v7 - 4) - 3.0; *v7 = *v7 - 0.0099999998; *(v7 - 3) = *(v7 - 3) + 0.001; v9 = *(v7 - 2) - 0.0099999998; *(v7 - 2) = v9; if ( v9 < -1.0 ) *((_BYTE *)v7 + 4) = 0; } v7 += 6; --v8; } while ( v8 ); } //----- (00404C30) -------------------------------------------------------- void __thiscall sub_404C30(char *this, char a2) { int v2; // eax _BYTE *i; // edx char *v4; // edx if ( a2 != 32 && a2 && a2 != 9 ) { v2 = 0; for ( i = this + 28; *i; i += 24 ) { if ( ++v2 >= 90 ) return; } v4 = &this[24 * v2]; v4[20] = a2; *((_DWORD *)v4 + 2) = 0; *(_DWORD *)&this[24 * v2 + 24] = -1123066839; v4[28] = 1; *((_DWORD *)v4 + 3) = 1048576000; *((_DWORD *)v4 + 4) = 0; } } //----- (00404C90) -------------------------------------------------------- int __thiscall sub_404C90(_DWORD *this, int a2) { char v2; // dl int result; // eax int v4; // edx v2 = a2; switch ( a2 ) { case 8: v4 = this[566] - 1; this[566] = v4; if ( v4 == -1 ) this[566] = 89; result = this[566]; *((_BYTE *)this + result + 2168) = 32; break; case 10: case 13: v2 = 32; goto LABEL_10; case 128: result = this[566] - 1; this[566] = result; if ( result == -1 ) this[566] = 89; break; case 130: result = this[566] + 1; this[566] = result; if ( result == 90 ) this[566] = 0; break; default: LABEL_10: *((_BYTE *)this + this[566] + 2168) = v2; result = this[566] + 1; this[566] = result; if ( result == 90 ) this[566] = 0; break; } return result; } //----- (00404DF0) -------------------------------------------------------- int sub_404DF0() { sub_404E00(); return atexit(unknown_libname_9); } //----- (00404E00) -------------------------------------------------------- ofstream *sub_404E00() { return ofstream::ofstream((ofstream *)&unk_26EACE8); } //----- (00404E40) -------------------------------------------------------- char *__thiscall sub_404E40(char *this) { char *result; // eax int v2; // ecx _DWORD *v3; // edx _BYTE *v4; // esi result = this; v2 = 13; *(_DWORD *)result = &off_40FE74; result[4] = 5; v3 = result + 3388; v4 = result + 8; do { *v4 = 0; *(v3 - 13) = 0; *v3 = 0; v3[13] = 0; ++v3; v4 += 256; --v2; } while ( v2 ); *((_DWORD *)result + 873) = 0; *((_DWORD *)result + 874) = 0; return result; } // 40FE74: using guessed type _UNKNOWN *off_40FE74; //----- (00404E90) -------------------------------------------------------- char __thiscall sub_404E90(int *this) { int *v1; // edi int v2; // ebx int *v3; // esi int i; // ebp char v5; // al double v6; // st7 int v7; // eax float v9; // [esp+0h] [ebp-2Ch] float v10; // [esp+0h] [ebp-2Ch] float v11; // [esp+Ch] [ebp-20h] int *v12; // [esp+20h] [ebp-Ch] v1 = this; sub_402E60(); sub_4024A0(-90.0, 0.0, 0.0, 1.0); sub_402D40(1028443341, -1095552205, 0); sub_402580(0.039999999, 0.039999999, 0.039999999); v2 = 0; v3 = v1 + 847; v12 = v1 + 2; do { sub_402E60(); for ( i = 0; i < 256; ++i ) { if ( v1[873] == i && v1[874] == v2 ) { if ( (int)sub_4017C0() % 1000 >= 500 ) sub_4029E0(0, 1050253722, 0, 1060320051, -1082130432, 0); else sub_402840(0, 1050253722, 0, 1060320051, -1082130432, 0); } v5 = *((_BYTE *)v12 + i); if ( !v5 ) break; sub_401110(v5); if ( v2 % 2 ) { v11 = 1.0; v6 = (double)*v3 * 0.1; } else { v11 = -1.0; v6 = (double)*v3 * 0.011111111; } v9 = v6; sub_4024A0(v9, 0.0, 0.0, v11); v10 = (double)(int)sub_4017C0() * 0.001; sub_4024A0(v10, 1.0, 1.0, 0.0); sub_402D40(1060320051, 0, 0); if ( v2 % 2 ) sub_402580(1.1, 1.15, 1.0); else sub_402580(0.99000001, 0.94999999, 1.0); v1 = this; } sub_402F00(); v7 = *(v3 - 13); v3[13] = v7; *v3 += (v7 - *v3) / 10; sub_402D40(0, 1069547520, 0); ++v2; ++v3; v12 += 64; } while ( v2 < 13 ); return sub_402F00(); } //----- (00405070) -------------------------------------------------------- int __thiscall sub_405070(_DWORD *this, int a2) { int result; // eax int v3; // eax int v4; // edx _DWORD *v5; // eax int v6; // eax int v7; // esi _DWORD *v8; // eax result = a2 - 8; switch ( a2 ) { case 8: result = this[874]; v4 = this[result + 834]; if ( v4 > 0 ) { *((_BYTE *)&this[64 * result + 2] + v4) = 0; v5 = &this[this[874] + 834]; LABEL_6: --*v5; *((_BYTE *)&this[64 * this[874] + 2] + this[this[874] + 834]) = 0; result = this[873] - 1; this[873] = result; return result; } if ( result > 0 ) { v6 = result - 1; this[874] = v6; this[873] = this[v6 + 834]; *((_BYTE *)&this[64 * v6 + 2] + this[v6 + 834]) = 0; v5 = &this[this[874] + 834]; goto LABEL_6; } return result; case 13: result = this[874]; if ( result < 12 ) { v3 = result + 1; this[874] = v3; result = this[v3 + 834]; this[873] = result; } return result; case 128: case 129: case 130: case 131: return result; default: result = this[874]; v7 = this[result + 834]; if ( v7 >= (result % 2 != 0 ? 20 : 50) ) { if ( result < 12 ) { this[874] = ++result; this[873] = this[result + 834]; } } else { *((_BYTE *)&this[64 * result + 2] + v7) = a2; v8 = &this[this[874] + 834]; ++*v8; *((_BYTE *)&this[64 * this[874] + 2] + this[this[874] + 834]) = 0; result = this[873] + 1; this[873] = result; } return result; } } //----- (00405270) -------------------------------------------------------- int sub_405270() { sub_405280(); return atexit(unknown_libname_10); } //----- (00405280) -------------------------------------------------------- ofstream *sub_405280() { return ofstream::ofstream((ofstream *)&unk_2ACA030); } //----- (004052C0) -------------------------------------------------------- char *__thiscall sub_4052C0(char *this) { char *result; // eax int v2; // edx _BYTE *v3; // ecx result = this; v2 = 0xFFFF; *(_DWORD *)this = &off_40FE90; this[4] = 6; *((_DWORD *)this + 4) = 0; *((_DWORD *)this + 3) = 0; v3 = this + 20; do { *v3 = 0; v3 += 16; --v2; } while ( v2 ); result[8] = 1; return result; } // 40FE90: using guessed type _UNKNOWN *off_40FE90; //----- (00405300) -------------------------------------------------------- char __thiscall sub_405300(int this) { int v2; // esi int v3; // ebx char result; // al double v5; // st7 double v6; // st7 float v7; // [esp+0h] [ebp-1Ch] sub_402E60(); sub_402D40(-1097229926, 0, 0); sub_402580(0.02, 0.02, 0.02); sub_4024A0(*(float *)(this + 16), 1.0, 0.0, 0.0); v2 = this + 28; v3 = 0xFFFF; do { if ( *(_BYTE *)(v2 - 8) ) { sub_402E60(); sub_4024A0(*(float *)v2, 1.0, 0.0, 0.0); sub_402D40(*(_DWORD *)(v2 - 4), -1055916032, 0); sub_401110(*(_BYTE *)(v2 + 4)); sub_402F00(); } v2 += 16; --v3; } while ( v3 ); sub_402E60(); v7 = -*(float *)(this + 16); sub_4024A0(v7, 1.0, 0.0, 0.0); sub_402D40(*(_DWORD *)(this + 12), -1055916032, 0); if ( (int)sub_4017C0() % 1000 >= 500 ) sub_4029E0(0, 1050253722, 0, -1087163597, -1082130432, 0); else sub_402840(0, 1050253722, 0, -1087163597, -1082130432, 0); sub_402F00(); sub_402F00(); result = *(_BYTE *)(this + 8); v5 = *(float *)(this + 16); if ( result ) v6 = v5 + 1.0; else v6 = v5 - 1.0; *(float *)(this + 16) = v6; return result; } //----- (00405430) -------------------------------------------------------- void __thiscall sub_405430(int this, int a2) { int v2; // eax _BYTE *i; // edx int v4; // edx switch ( a2 ) { case 13: *(_BYTE *)(this + 8) = *(_BYTE *)(this + 8) == 0; break; case 128: if ( *(float *)(this + 12) <= 0.0 ) *(_DWORD *)(this + 12) = 1107558400; else *(float *)(this + 12) = *(float *)(this + 12) - 1.0; break; case 129: case 131: return; case 130: if ( *(float *)(this + 12) >= 34.0 ) goto LABEL_14; *(float *)(this + 12) = *(float *)(this + 12) + 1.0; break; default: v2 = 0; for ( i = (_BYTE *)(this + 20); *i; i += 16 ) { if ( ++v2 >= 0xFFFF ) return; } v4 = this + 16 * v2; *(_BYTE *)(v4 + 20) = 1; *(float *)(v4 + 28) = -*(float *)(this + 16); *(_DWORD *)(v4 + 24) = *(_DWORD *)(this + 12); *(_BYTE *)(16 * (v2 + 2) + this) = a2; if ( *(float *)(this + 12) >= 34.0 ) LABEL_14: *(_DWORD *)(this + 12) = 0; else *(float *)(this + 12) = *(float *)(this + 12) + 1.0; break; } } //----- (004055A0) -------------------------------------------------------- int sub_4055A0() { sub_4055B0(); return atexit(unknown_libname_11); } //----- (004055B0) -------------------------------------------------------- ofstream *sub_4055B0() { return ofstream::ofstream((ofstream *)&unk_2EA9378); } //----- (004055F0) -------------------------------------------------------- char *__thiscall sub_4055F0(char *this) { char *result; // eax int v2; // ecx _DWORD *v3; // edx _BYTE *v4; // edx int v5; // ecx result = this; v2 = 1000; *(_DWORD *)result = &off_40FEB0; result[4] = 7; v3 = result + 12; do { *((_BYTE *)v3 - 4) = 0; *v3 = 0; v3[7] = 1; v3[8] = 0; v3 += 11; --v2; } while ( v2 ); v4 = result + 44060; v5 = 100; do { *v4 = 0; v4 += 64; --v5; } while ( v5 ); *((_DWORD *)result + 12602) = -1; *((_DWORD *)result + 12603) = 20; *((_DWORD *)result + 12604) = 20; return result; } // 40FEB0: using guessed type _UNKNOWN *off_40FEB0; //----- (00405670) -------------------------------------------------------- char __thiscall sub_405670(int *this) { int *v2; // esi int v3; // edi int v4; // edi int *v5; // esi int v6; // ebp int v7; // eax int v8; // edx signed int v9; // eax double v10; // st7 int v12; // [esp+0h] [ebp-28h] int v13; // [esp+4h] [ebp-24h] int v14; // [esp+Ch] [ebp-1Ch] int v15; // [esp+Ch] [ebp-1Ch] int v16; // [esp+10h] [ebp-18h] int v17; // [esp+10h] [ebp-18h] float v18; // [esp+24h] [ebp-4h] sub_402E60(); sub_402D40(-1088841318, -1092196762, 0); sub_402580(1.2, 0.89999998, 0.0); v2 = this + 6; v3 = 1000; do { if ( v2[5] ) { sub_402E60(); *(float *)&v16 = (*((float *)v2 + 1) + 1.0) * 0.025; *(float *)&v14 = *(float *)v2 * 0.025; sub_402D40(v14, v16, 0); sub_402580(0.025, 0.025, 0.0); sub_401110(*((_BYTE *)v2 - 16)); sub_402F00(); *(float *)v2 = ((double)*(v2 - 2) - *(float *)v2) * 0.2 + *(float *)v2; *((float *)v2 + 1) = ((double)*(v2 - 1) - *((float *)v2 + 1)) * 0.2 + *((float *)v2 + 1); } v2 += 11; --v3; } while ( v3 ); v4 = 0; v5 = this + 11016; do { if ( *((_BYTE *)v5 - 4) ) { v6 = this[*(v5 - 2) + 11002 + v4]; if ( (signed int)(sub_4017C0() - *(v5 - 4)) > *(_DWORD *)(v6 + 4) ) { *(_DWORD *)(v6 + 8) = *v5; *(_DWORD *)(this[*(v5 - 2) + 11002 + v4] + 12) = v5[1]; v7 = *v5 + 1; *v5 = v7; if ( v7 > 40 ) *v5 = 0; *(v5 - 4) = sub_4017C0(); v8 = *(v5 - 2) + 1; *(v5 - 2) = v8; if ( v8 == *(v5 - 3) ) *(v5 - 2) = 0; } } v4 += 16; v5 += 16; } while ( v4 < 1600 ); v9 = sub_4017C0(); v10 = (double)this[12604]; v18 = (float)this[12603]; *(float *)&v17 = (v10 + 1.0) * 0.025; *(float *)&v15 = (v18 + 1.0) * 0.025; *(float *)&v13 = v10 * 0.025; *(float *)&v12 = v18 * 0.025; if ( v9 % 1000 >= 500 ) sub_4029E0(v12, v13, 0, v15, v17, 0); else sub_402840(v12, v13, 0, v15, v17, 0); return sub_402F00(); } //----- (00405840) -------------------------------------------------------- int __thiscall sub_405840(_DWORD *this, int a2) { int result; // eax _DWORD *v4; // eax int v5; // ecx int v6; // edi _DWORD *v7; // eax _DWORD *v8; // ebp double v9; // st7 float *v10; // ebp double v11; // st7 int v12; // edi _BYTE *v13; // ecx _DWORD *v14; // ecx int v15; // edx int v16; // [esp+14h] [ebp+4h] if ( a2 == 8 ) { result = this[12602]; if ( result != -1 ) { this[12603] = this[11 * result + 4]; v4 = &this[11 * result]; this[12604] = v4[5]; v4[10] = 1; this[11 * this[12602] + 11] = 0; result = this[11 * this[12602] + 12]; this[12602] = result; } } else { v5 = this[12602]; if ( v5 != -1 || a2 != 128 && a2 != 130 && a2 != 129 && a2 != 131 && a2 != 13 && a2 != 32 ) { v6 = 0; v7 = this + 11; while ( *v7 ) { ++v6; v7 += 11; if ( v6 >= 1000 ) goto LABEL_18; } if ( v5 != -1 ) { v8 = &this[11 * this[12602] + 3]; *v8 = sub_4017C0() - *v8; } v9 = (double)(int)this[12603]; *(float *)&this[11 * v6 + 6] = v9; v10 = (float *)&this[11 * v6]; *((_DWORD *)v10 + 4) = (__int64)v9; v11 = (double)(int)this[12604]; v10[7] = v11; *((_DWORD *)v10 + 5) = (__int64)v11; v10[10] = 0.0; this[10 * v6 + 11 + v6] = 1; *((_BYTE *)v10 + 8) = a2; *((_DWORD *)v10 + 3) = sub_4017C0(); v10[12] = *((float *)this + 12602); this[12602] = v6; } LABEL_18: switch ( a2 ) { case 13: case 131: result = this[12604]; if ( result >= 39 ) this[12604] = 0; else this[12604] = ++result; break; case 128: result = this[12603]; if ( result <= 0 ) this[12603] = 39; else this[12603] = --result; break; case 129: result = this[12604]; if ( result <= 0 ) this[12604] = 39; else this[12604] = --result; break; default: result = this[12603]; if ( result >= 39 ) this[12603] = 0; else this[12603] = ++result; break; } if ( (a2 == 32 || a2 == 129 || a2 == 131 || a2 == 128 || a2 == 130 || a2 == 13 || a2 == 10) && this[12602] != -1 ) { v12 = -1; result = 0; v13 = this + 11015; do { if ( !*v13 ) v12 = result; ++result; v13 += 64; } while ( result < 100 ); if ( v12 != -1 ) { v14 = this + 4; result = (int)&this[16 * v12]; v16 = 1000; *(_DWORD *)(result + 44048) = 0; *(_BYTE *)(result + 44060) = 1; *(_DWORD *)(result + 44056) = 0; *(_DWORD *)(result + 44052) = 0; do { if ( !v14[6] ) { v15 = *(_DWORD *)(result + 44052); if ( v15 < 10 ) { this[16 * v12 + 11002 + v15] = v14 - 2; *(_DWORD *)(result + 44064) = *v14; *(_DWORD *)(result + 44068) = v14[1]; ++*(_DWORD *)(result + 44052); v14[6] = 1; } } v14 += 11; --v16; } while ( v16 ); this[12602] = -1; } } } return result; } //----- (00405BB0) -------------------------------------------------------- int sub_405BB0() { sub_405BC0(); return atexit(unknown_libname_12); } //----- (00405BC0) -------------------------------------------------------- ofstream *sub_405BC0() { return ofstream::ofstream((ofstream *)&unk_32886C0); } //----- (00405C00) -------------------------------------------------------- char *__thiscall sub_405C00(char *this) { char *result; // eax int v2; // ecx _BYTE *v3; // edx result = this; v2 = 0; *(_DWORD *)result = &off_40FED0; result[4] = 8; *((_DWORD *)result + 2310) = 0; *((_DWORD *)result + 2311) = 0; *((_DWORD *)result + 2312) = 0; *((_DWORD *)result + 2313) = 0; *((_DWORD *)result + 2307) = 0; *((_DWORD *)result + 2308) = 0; *((_DWORD *)result + 2314) = 0; v3 = result + 8; do { v3[1] = 0; *v3 = v2++; v3 += 36; } while ( v2 < 256 ); return result; } // 40FED0: using guessed type _UNKNOWN *off_40FED0; //----- (00405C60) -------------------------------------------------------- char __thiscall sub_405C60(float *this) { float *v2; // esi int v3; // ebx char result; // al int v5; // [esp+0h] [ebp-20h] int v6; // [esp+0h] [ebp-20h] int v7; // [esp+4h] [ebp-1Ch] int v8; // [esp+4h] [ebp-1Ch] int v9; // [esp+18h] [ebp-8h] int v10; // [esp+18h] [ebp-8h] int v11; // [esp+1Ch] [ebp-4h] int v12; // [esp+1Ch] [ebp-4h] sub_402E60(); sub_402580(0.5, 0.5, 0.5); sub_402E60(); sub_402580(0.1, 0.1, 1.0); if ( (int)sub_4017C0() % 1000 >= 500 ) { v10 = *((int *)this + 2308); v12 = *((int *)this + 2307); *(float *)&v8 = *(float *)&v10 - 1.0; *(float *)&v6 = *(float *)&v12 + 0.69999999; sub_4029E0(v12, v10, 0, v6, v8, 0); } else { v9 = *((int *)this + 2308); v11 = *((int *)this + 2307); *(float *)&v7 = *(float *)&v9 - 1.0; *(float *)&v5 = *(float *)&v11 + 0.69999999; sub_402840(v11, v9, 0, v5, v7, 0); } v2 = this + 6; v3 = 256; do { if ( *((_BYTE *)v2 - 15) ) { sub_402E60(); *(v2 - 3) = (*v2 - *(v2 - 3)) * 0.33333334 + *(v2 - 3); *(v2 - 2) = (v2[1] - *(v2 - 2)) * 0.33333334 + *(v2 - 2); v2[3] = (v2[4] - v2[3]) * 0.33333334 + v2[3]; sub_402D40(*((_DWORD *)v2 - 3), *((_DWORD *)v2 - 2), *((_DWORD *)v2 - 1)); sub_4024A0(v2[3], 0.0, 0.0, 1.0); sub_401110(*((_BYTE *)v2 - 16)); sub_402F00(); } v2 += 9; --v3; } while ( v3 ); sub_402F00(); result = sub_402F00(); this[2307] = (this[2310] - this[2307]) * 0.76923078 + this[2307]; this[2308] = (this[2311] - this[2308]) * 0.76923078 + this[2308]; return result; } //----- (00405E20) -------------------------------------------------------- void __thiscall sub_405E20(int this, int a2) { int v2; // eax double v3; // st7 switch ( a2 ) { case 8: case 128: if ( *(float *)(this + 9240) > -13.0 ) *(float *)(this + 9240) = *(float *)(this + 9240) - 1.0; break; case 13: case 131: if ( *(float *)(this + 9244) < 9.0 ) goto LABEL_7; break; case 129: if ( *(float *)(this + 9244) > -8.0 ) *(float *)(this + 9244) = *(float *)(this + 9244) - 1.0; break; case 130: if ( *(float *)(this + 9240) < 12.0 ) goto LABEL_3; break; default: v2 = this + 36 * a2; *(_DWORD *)(v2 + 24) = *(_DWORD *)(this + 9240); *(_DWORD *)(v2 + 28) = *(_DWORD *)(this + 9244); if ( !*(_BYTE *)(v2 + 9) ) { *(_BYTE *)(v2 + 9) = 1; *(_DWORD *)(v2 + 12) = *(_DWORD *)(this + 9240); *(_DWORD *)(v2 + 16) = *(_DWORD *)(this + 9244); } *(_DWORD *)(v2 + 40) = 1135869952; *(_DWORD *)(this + 4 * (9 * a2 + 9)) = 0; if ( *(float *)(this + 9240) < 12.0 ) { LABEL_3: *(float *)(this + 9240) = *(float *)(this + 9240) + 1.0; } else { v3 = *(float *)(this + 9244); *(_DWORD *)(this + 9228) = -1051721728; *(_DWORD *)(this + 9240) = -1051721728; if ( v3 < 9.0 ) { LABEL_7: *(float *)(this + 9244) = *(float *)(this + 9244) + 1.0; } else { *(_DWORD *)(this + 9232) = -1056964608; *(_DWORD *)(this + 9244) = -1056964608; } } break; } } //----- (00406030) -------------------------------------------------------- int sub_406030() { sub_406040(); return atexit(unknown_libname_13); } //----- (00406040) -------------------------------------------------------- ofstream *sub_406040() { return ofstream::ofstream((ofstream *)&unk_3667A08); } //----- (00406080) -------------------------------------------------------- _BYTE *__thiscall sub_406080(_BYTE *this) { _DWORD *v2; // eax *(_DWORD *)this = &off_40FF04; this[4] = 9; v2 = sub_4064B0(); *((_DWORD *)this + 2) = v2; *((_DWORD *)this + 3) = v2; *(_BYTE *)v2 = 32; return this; } // 40FF04: using guessed type _UNKNOWN *off_40FF04; //----- (004060F0) -------------------------------------------------------- void __thiscall sub_4060F0(_DWORD *this) { *this = &off_40FF04; sub_406470(this, (_DWORD *)this[2]); sub_403130(this); } // 40FF04: using guessed type _UNKNOWN *off_40FF04; //----- (00406150) -------------------------------------------------------- char __thiscall sub_406150(_DWORD *this) { sub_402E60(); sub_402580(0.02, 0.02, 1.0); (*(void (__thiscall **)(_DWORD *, _DWORD))(*this + 36))(this, this[2]); return sub_402F00(); } //----- (00406190) -------------------------------------------------------- _DWORD *__fastcall sub_406190(_DWORD *a1, int a2, int a3) { _DWORD *result; // eax int v5; // edx _DWORD *v6; // ecx _DWORD *v7; // ecx _DWORD *v8; // edi switch ( a3 ) { case 8: result = (_DWORD *)a1[3]; v8 = (_DWORD *)result[4]; if ( v8 != result ) { result = (_DWORD *)(*(int (__thiscall **)(_DWORD *, _DWORD))(*a1 + 44))(a1, a1[3]); a1[3] = v8; } break; case 128: result = (_DWORD *)a1[3]; a1[3] = result[4]; break; case 129: v5 = a1[3]; while ( 1 ) { result = *(_DWORD **)(a1[3] + 16); if ( (int)result[7] > 1 ) break; a1[3] = result; if ( result == (_DWORD *)result[4] ) goto LABEL_19; } result = (_DWORD *)a1[3]; v6 = (_DWORD *)result[3]; if ( result == v6 ) { do { result = *(_DWORD **)(a1[3] + 8); a1[3] = result; } while ( result != (_DWORD *)result[2] ); } else { a1[3] = v6; } break; case 130: result = *(_DWORD **)(a1[3] + 4); a1[3] = result; break; case 131: v5 = a1[3]; while ( 1 ) { result = *(_DWORD **)(a1[3] + 16); if ( (int)result[7] > 1 ) break; a1[3] = result; if ( result == (_DWORD *)result[4] ) goto LABEL_19; } result = (_DWORD *)a1[3]; v7 = (_DWORD *)result[2]; if ( result != v7 ) { a1[3] = v7; return result; } v5 = *(_DWORD *)(result[4] + 4); LABEL_19: a1[3] = v5; break; default: result = (_DWORD *)(*(int (__fastcall **)(_DWORD *, int, _DWORD, int))(*a1 + 32))(a1, a2, a1[3], a3); a1[3] = result; break; } return result; } //----- (00406320) -------------------------------------------------------- int __thiscall sub_406320(void *this, int a2, char a3) { int v4; // esi int i; // eax v4 = (*(int (__thiscall **)(void *))(*(_DWORD *)this + 40))(this); *(_BYTE *)v4 = a3; if ( *(_DWORD *)(a2 + 28) ) { for ( i = *(_DWORD *)(a2 + 4); *(_DWORD *)(i + 8) != i; i = *(_DWORD *)(i + 8) ) ; *(_DWORD *)(i + 8) = v4; *(_DWORD *)(v4 + 12) = i; } else { *(_DWORD *)(a2 + 4) = v4; } *(_DWORD *)(v4 + 16) = a2; ++*(_DWORD *)(a2 + 28); (*(void (__thiscall **)(void *, int))(*(_DWORD *)this + 48))(this, a2); return v4; } //----- (00406370) -------------------------------------------------------- int __thiscall sub_406370(_DWORD *this, int a2) { int result; // eax if ( *(float *)(a2 + 20) != *(float *)(a2 + 24) ) *(float *)(a2 + 20) = (*(float *)(a2 + 24) - *(float *)(a2 + 20)) * 0.33333334 + *(float *)(a2 + 20); if ( *(float *)(a2 + 20) != 0.0 ) { sub_402E60(); sub_4024A0(*(float *)(a2 + 20), 0.0, 0.0, 1.0); } sub_402D40(1060320051, 0, 0); sub_401110(*(_BYTE *)a2); if ( this[3] == a2 ) { if ( (int)sub_4017C0() % 1000 >= 500 ) sub_4029E0(-1105618534, 1050253722, 0, 1059481190, -1082130432, 0); else sub_402840(-1105618534, 1050253722, 0, 1059481190, -1082130432, 0); } if ( *(_DWORD *)(a2 + 28) ) (*(void (__thiscall **)(_DWORD *, _DWORD))(*this + 36))(this, *(_DWORD *)(a2 + 4)); if ( *(float *)(a2 + 20) == 0.0 ) sub_402D40(-1087163597, 0, 0); else sub_402F00(); result = *(_DWORD *)(a2 + 8); if ( result != a2 ) return (*(int (__thiscall **)(_DWORD *, _DWORD))(*this + 36))(this, *(_DWORD *)(a2 + 8)); return result; } //----- (00406470) -------------------------------------------------------- void __thiscall sub_406470(void *this, _DWORD *Block) { if ( Block[7] ) (*(void (__thiscall **)(void *, _DWORD))(*(_DWORD *)this + 28))(this, Block[1]); if ( (_DWORD *)Block[2] != Block ) (*(void (__thiscall **)(void *, _DWORD))(*(_DWORD *)this + 28))(this, Block[2]); operator delete(Block); } //----- (004064B0) -------------------------------------------------------- _DWORD *sub_4064B0() { _DWORD *result; // eax result = operator new(0x20u); result[3] = result; result[7] = 0; result[6] = 0; result[1] = result; *(_BYTE *)result = 104; result[2] = result; result[4] = result; result[5] = 0; return result; } //----- (004064E0) -------------------------------------------------------- void __thiscall sub_4064E0(void *this, _DWORD *Block) { _DWORD *v2; // eax _DWORD *v3; // ebp _DWORD *v4; // edx _DWORD *v5; // eax _DWORD *v6; // edx int v7; // edi int v8; // ebx int v9; // eax int v10; // edi int v11; // eax int v12; // edx v2 = (_DWORD *)Block[4]; v3 = v2; if ( v2 != Block ) { v4 = (_DWORD *)Block[3]; if ( v4 == Block ) { v6 = (_DWORD *)Block[2]; if ( v6 == Block ) { v2[1] = v2; } else { v2[1] = v6; *(_DWORD *)(Block[2] + 16) = Block[4]; *(_DWORD *)(Block[2] + 12) = Block[2]; } } else { v5 = (_DWORD *)Block[2]; if ( v5 == Block ) { v4[2] = v4; } else { v4[2] = v5; *(_DWORD *)(Block[2] + 12) = Block[3]; } } --*(_DWORD *)(Block[4] + 28); if ( Block[7] ) { v7 = Block[4]; v8 = *(_DWORD *)(v7 + 4); v9 = v8; if ( v7 == v8 ) goto LABEL_15; while ( v9 != *(_DWORD *)(v9 + 8) ) v9 = *(_DWORD *)(v9 + 8); if ( v7 == v8 ) { LABEL_15: v3[1] = Block[1]; *(_DWORD *)(Block[1] + 16) = Block[4]; } else { *(_DWORD *)(v9 + 8) = Block[1]; *(_DWORD *)(Block[1] + 12) = v9; } v10 = 0; *(_DWORD *)(Block[4] + 28) += Block[7]; v11 = Block[4]; v12 = Block[1]; if ( *(int *)(v11 + 28) > 0 ) { do { *(_DWORD *)(v12 + 16) = v11; v11 = Block[4]; v12 = *(_DWORD *)(v12 + 8); ++v10; } while ( v10 < *(_DWORD *)(v11 + 28) ); } } (*(void (__thiscall **)(void *, _DWORD))(*(_DWORD *)this + 48))(this, Block[4]); operator delete(Block); } } //----- (004065D0) -------------------------------------------------------- int __stdcall sub_4065D0(int a1) { int result; // eax double v3; // st7 double v4; // st6 int v5; // ecx int v6; // [esp+4h] [ebp+4h] result = *(_DWORD *)(a1 + 28); if ( result ) { v6 = result + 1; result = *(_DWORD *)(a1 + 4); v3 = 360.0 / (double)v6; v4 = v3 - 180.0; while ( 1 ) { v5 = *(_DWORD *)(result + 8); *(float *)(result + 24) = v4; v4 = v4 + v3; if ( v5 == result ) break; result = v5; } } return result; } //----- (00406610) -------------------------------------------------------- int sub_406610() { sub_406620(); return atexit(unknown_libname_14); } //----- (00406620) -------------------------------------------------------- ofstream *sub_406620() { return ofstream::ofstream((ofstream *)&unk_3A46D50); } //----- (004066E6) -------------------------------------------------------- _DWORD *__thiscall sub_4066E6(ios *this, char a2) { _DWORD *v2; // esi v2 = (_DWORD *)((char *)this - 8); sub_406711(this); ios::~ios(this); if ( (a2 & 1) != 0 ) operator delete(v2); return v2; } //----- (00406711) -------------------------------------------------------- int __thiscall sub_406711(_DWORD *this) { *(_DWORD *)((char *)this + *(_DWORD *)(*(this - 2) + 4) - 8) = &ofstream::`vftable'; return sub_406D3C(this); } // 40FF40: using guessed type void *ofstream::`vftable'; //----- (00406CAC) -------------------------------------------------------- _DWORD *__thiscall sub_406CAC(ios *this, char a2) { _DWORD *v2; // esi v2 = (_DWORD *)((char *)this - 8); sub_406D3C(this); ios::~ios(this); if ( (a2 & 1) != 0 ) operator delete(v2); return v2; } //----- (00406D3C) -------------------------------------------------------- int __thiscall sub_406D3C(_DWORD *this) { int result; // eax result = *(_DWORD *)(*(this - 2) + 4); *(_DWORD *)((char *)this + result - 8) = &off_40FFB0; return result; } // 40FFB0: using guessed type int (__stdcall *off_40FFB0)(char); //----- (0040746F) -------------------------------------------------------- int __stdcall sub_40746F(int a1, int a2, int a3) { return -1; } //----- (004086AC) -------------------------------------------------------- int sub_4086AC() { return flsall(1); } // 4086B5: using guessed type _DWORD __cdecl flsall(_DWORD); //----- (00408C56) -------------------------------------------------------- void __noreturn sub_408C56() { _amsg_exit(0x19u); } // 408C56: using guessed type void __noreturn sub_408C56(); //----- (00409F8C) -------------------------------------------------------- void __noreturn sub_409F8C() { if ( dword_3A46E84 ) dword_3A46E84(); _NMSG_WRITE(0xAu); raise(22); _exit(3); } // 3A46E84: using guessed type int (*dword_3A46E84)(void); //----- (00409FE2) -------------------------------------------------------- void __thiscall __noreturn sub_409FE2(EXCEPTION_POINTERS *this) { int v1; // [esp-Ch] [ebp-24h] BYREF CPPEH_RECORD ms_exc; // [esp+0h] [ebp-18h] ms_exc.registration.ScopeTable = stru_4100C8; ms_exc.registration.ExceptionHandler = _except_handler3; ms_exc.registration.Next = (struct _EH3_EXCEPTION_REGISTRATION *)NtCurrentTeb()->NtTib.ExceptionList; ms_exc.exc_ptr = this; ms_exc.old_esp = (DWORD)&v1; ms_exc.registration.TryLevel = 0; if ( off_411754 ) { ms_exc.registration.TryLevel = 1; off_411754(); } ms_exc.registration.TryLevel = -1; sub_409F8C(); } // 4100C8: using guessed type _SCOPETABLE_ENTRY stru_4100C8[2]; // 411754: using guessed type void (__noreturn *off_411754)(); //----- (0040BF9B) -------------------------------------------------------- int __cdecl sub_40BF9B(int a1, int a2) { return _ld12cvt(a1, a2, &unk_411C00); } // 40BE2F: using guessed type _DWORD __cdecl _ld12cvt(_DWORD, _DWORD, _DWORD); //----- (0040BFB1) -------------------------------------------------------- int __cdecl sub_40BFB1(int a1, int a2) { return _ld12cvt(a1, a2, &unk_411C18); } // 40BE2F: using guessed type _DWORD __cdecl _ld12cvt(_DWORD, _DWORD, _DWORD); //----- (0040BFC7) -------------------------------------------------------- int __cdecl sub_40BFC7(int a1, int a2) { _BYTE v3[12]; // [esp+0h] [ebp-Ch] BYREF __strgtold12(v3, &a2, a2, 0, 0, 0, 0); return sub_40BF9B((int)v3, a1); } // 40D9EE: using guessed type _DWORD __cdecl __strgtold12(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); //----- (0040BFF4) -------------------------------------------------------- int __cdecl sub_40BFF4(int a1, int a2) { _BYTE v3[12]; // [esp+0h] [ebp-Ch] BYREF __strgtold12(v3, &a2, a2, 0, 0, 0, 0); return sub_40BFB1((int)v3, a1); } // 40D9EE: using guessed type _DWORD __cdecl __strgtold12(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); //----- (0040CEC1) -------------------------------------------------------- LONG (__stdcall *sub_40CEC1())(struct _EXCEPTION_POINTERS *ExceptionInfo) { LONG (__stdcall *result)(struct _EXCEPTION_POINTERS *); // eax result = SetUnhandledExceptionFilter(__CxxUnhandledExceptionFilter); lpfn = result; return result; } //----- (0040CED2) -------------------------------------------------------- LPTOP_LEVEL_EXCEPTION_FILTER sub_40CED2() { return SetUnhandledExceptionFilter(lpfn); } // nfuncs=373 queued=131 decompiled=131 lumina nreq=0 worse=0 better=0 // ALL OK, 131 function(s) have been successfully decompiled