diff --git a/.vscode/settings.json b/.vscode/settings.json index 43f9512..53fdbbc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -65,5 +65,12 @@ }, "cmake.configureSettings": { "CMAKE_TOOLCHAIN_FILE": "/root/vcpkg/scripts/buildsystems/vcpkg.cmake" - } + }, + "clangd.arguments": [ + "-log=verbose", + "-pretty", + "--background-index", + //"--query-driver=/bin/arm-buildroot-linux-gnueabihf-g++", //for cross compile usage + "--compile-commands-dir=${workspaceFolder}/build/" + ] } \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index ff37985..c31d446 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,11 +44,19 @@ add_executable(wcc src/wxml/compiler.cpp src/wxml/dom_lib/str_cache.cpp src/wxml/dom_lib/wxml_dom.cpp + src/utils/json.cpp src/utils/string_utils.cpp src/utils/file.cpp ) add_executable(wcsc src/wcsc.cpp + src/wcsc/usage.cpp + src/wxss/css_tree_lib/parser.cpp + src/wxss/common.cpp + src/wxss/x_compiler.cpp + src/utils/json.cpp + src/utils/string_utils.cpp + src/utils/file.cpp ) add_executable( resolve_path diff --git a/src/include/wcc.h b/src/include/json.h similarity index 81% rename from src/include/wcc.h rename to src/include/json.h index 2484142..ba254cd 100644 --- a/src/include/wcc.h +++ b/src/include/json.h @@ -1,5 +1,5 @@ -#ifndef __MAIN_H__ -#define __MAIN_H__ +#ifndef __WCC_H__ +#define __WCC_H__ #include #include diff --git a/src/include/wxss.h b/src/include/wxss.h new file mode 100644 index 0000000..e810c47 --- /dev/null +++ b/src/include/wxss.h @@ -0,0 +1,101 @@ +#ifndef __WXSS_H__ +#define __WXSS_H__ + +#include +#include +#include +#include +#include + +namespace WXSS +{ + std::string RemoveQuote(std::string const&); + int NewLintAndParseCSSList(std::map const&, std::vector &, std::string&, std::string&, int, bool, std::string const&, std::string const&); + int LintAndParseCSSList(std::map const&, std::string&, std::string&, std::string&, int, bool, bool, bool, std::string const&); + void LintAndParseCSS(std::string const&, std::string const&, std::string&, std::string&, bool, bool, bool, bool, std::string const&); + + class Token + { + private: + /* data */ + public: + Token(/* args */); + ~Token(); + std::string GetLiteral(void); + }; + + + namespace CSSTreeLib + { + class CSSSyntaxTree + { + private: + /* data */ + public: + std::string offset_0; + WXSS::Token offset_24; + std::vector> offset_120; + std::shared_ptr offset_140; + CSSSyntaxTree(/* args */); + ~CSSSyntaxTree(); + void GetHostRule(std::string &); + void Print2Stream(int, std::stringstream &); + void RenderCode(std::string &,bool); + }; + + class LexicalChecker + { + private: + /* data */ + public: + LexicalChecker(/* args */); + ~LexicalChecker(); + void Init(); + void Traval(std::shared_ptr &); + void GetInstance(void); + }; + + class Parser + { + private: + /* data */ + public: + Parser(/* args */); + ~Parser(); + int Parse(std::string const&, std::string const&, std::string&, std::string const&); + }; + + + } // namespace CSSTreeLib + + + class XCompiler + { + private: + /* data */ + public: + int offset_0 = 0; + int offset_4 = 0; + std::string offset_8; + std::map> offset_32; + std::map> offset_56; + std::map offset_136; + XCompiler(/* args */); + XCompiler(std::map const&, bool, std::string const&); + ~XCompiler(); + void DealRPX(std::string &, std::stringstream &); + void GetHostRule(std::string &); + void ShowTree(std::string &); + void GetCompiled(std::string const&, std::string&); + void GetJSCompiled(std::string const&, std::string&); + void GetWellFormattedJSCompiled(std::string const&, std::string&); + void GenExpr(std::shared_ptr, std::stringstream &, std::string &); + int GetPageCss(std::string const&, std::string&, uint); + void MarkImported(std::string const&); + int GetCommHead(std::vector &, std::string&, bool, std::string const&); + + }; + + +} // namespace WXSS +#endif \ No newline at end of file diff --git a/src/utils/json.cpp b/src/utils/json.cpp new file mode 100644 index 0000000..60937d6 --- /dev/null +++ b/src/utils/json.cpp @@ -0,0 +1,50 @@ +#include +#include +#include +#include + +std::string EscapeToJsonString(std::string const& a2) +{ + std::stringstream ret; + for (int i = 0; i < a2.length(); i++) + { + char cur = a2[i]; + if (cur == '\\' || cur == '"' || cur <= 0x1Fu) + { + ret << "\\u"; + ret << std::hex << std::setw(4) << std::setfill('0') << static_cast(cur); + } + else + { + ret << cur; + } + } + + return ret.str(); +} + +std::string DictToJsonString(std::map const& a2) +{ + std::stringstream ret; + ret << "{"; + bool isFirst = true; + for(auto kv: a2) + { + if (!isFirst) + { + ret << ","; + } + ret << "\""; + // key + ret << EscapeToJsonString(kv.first); + ret << "\":"; + + ret << "\""; + // value + ret << EscapeToJsonString(kv.second); + ret << "\""; + isFirst = false; + } + ret << "}"; + return ret.str(); +} diff --git a/src/wcc.cpp b/src/wcc.cpp index 40bcb2b..2f601c2 100644 --- a/src/wcc.cpp +++ b/src/wcc.cpp @@ -8,7 +8,7 @@ #include "include/usage.h" #include "include/string_utils.h" #include "include/wxml.h" -#include "include/wcc.h" +#include "include/json.h" using namespace std; @@ -507,49 +507,3 @@ int main(int argc, const char **argv) return 0; } - -std::string DictToJsonString(std::map const& a2) -{ - std::stringstream ret; - ret << "{"; - bool isFirst = true; - for(auto kv: a2) - { - if (!isFirst) - { - ret << ","; - } - ret << "\""; - // key - ret << EscapeToJsonString(kv.first); - ret << "\":"; - - ret << "\""; - // value - ret << EscapeToJsonString(kv.second); - ret << "\""; - isFirst = false; - } - ret << "}"; - return ret.str(); -} - -std::string EscapeToJsonString(std::string const& a2) -{ - stringstream ret; - for (int i = 0; i < a2.length(); i++) - { - char cur = a2[i]; - if (cur == '\\' || cur == '"' || cur <= 0x1Fu) - { - ret << "\\u"; - ret << std::hex << std::setw(4) << std::setfill('0') << static_cast(cur); - } - else - { - ret << cur; - } - } - - return ret.str(); -} \ No newline at end of file diff --git a/src/wcsc.cpp b/src/wcsc.cpp index d535912..2632ece 100644 --- a/src/wcsc.cpp +++ b/src/wcsc.cpp @@ -1,6 +1,284 @@ -#include -int main(int argc, char **argv) { +#include +#include +#include +#include "./include/usage.h" +#include "include/file.h" +#include "include/wxss.h" +#include "include/wxml.h" +#include "include/json.h" + +int main(int argc, const char **argv) { + // main - 0 + if (argc <= 1) + { + return usage(argc, argv); + } + // main - 5 + std::string configPath = ""; + std::vector v69; + for (int i = 1; i < argc; i++) + { + bool isUseConfigFile = false; + std::string configPath = "--config-path"; + if (!configPath.compare(argv[i])) + { + isUseConfigFile = true; + } + if (isUseConfigFile) + { + i++; + configPath = argv[i]; + } + else + { + v69.emplace_back(argv[i]); + } + } + // main - 10 + if (configPath.length() > 0) + { + // 使用配置文件 + std::string configData = ""; + readFile(configPath.data(), configData); + while (configData.length() > 0) { + std::string v104; + v104 = getNextArg(configData, "\n"); + v69.emplace_back(v104); + } + } + + // main - 15 + bool v56 = false; + std::vector v66; + std::string v75, v83; + int v29 = 0; + bool v30 = false; + bool v31 = false; + bool v32 = false; + bool v34 = false; + bool v35 = false; + bool v36 = false; + bool v37 = false; + std::string fileName; + std::string v76; + for (int i = 0; i < v69.size(); i++) { + std::string cur = v69[i]; + if (cur[0] != '-') + { + if (!v56) + { + v66.emplace_back(v69[i]); + continue; + } + v75 = i; + v56 = false; + continue; + } + switch(cur[1]) + { + case 'o': + { + if (v69.size() > i + 1) + { + i++; + fileName = v69[i]; + v56 = false; + continue; + } + } + break; + case 's': + { + if (cur[2] == 't') + { + v56 = false; + v34 = true; + continue; + } + if (cur[2] == 'd') + { + if (v69.size() > i + 1) + { + i++; + v56 = false; + v83 = v69[i + 1]; + v35 = true; + continue; + } + } + else if (v69.size() > i + 1) + { + v56 = false; + i++; + v32 = true; + continue; + } + } + break; + case 'l': + if (cur[2] == 'c') + { + v56 = false; + continue; + } + if (cur[2] == 'l') + { + v36 = true; + v56 = false; + continue; + } + break; + case 'd': + if (cur[2] == 'b') + { + v56 = false; + v37 = true; + continue; + } + break; + case 'j': + if (cur[2] == 's') + { + v56 = false; + v31 = true; + continue; + } + break; + case 'c': + if (cur[2] == 'p') + { + v56 = true; + continue; + } + break; + default: + if (cur[1] == 'p' && cur[2] == 'c') + { + v30 = true; + v29 = atoi(v69[i + 1].data()); + i++; + v56 = false; + continue; + } + break; + } + v56 = false; + if (!v69[i].compare("--subpackage") && v69.size() > i) + { + std::string v101 = ""; + v101.reserve(); + v101.append("./", 2); + v101.append(v69[i + 1]); + // TODO... 待检验 + v76 = v101; + } + } + // main - 20 + if (v66.begin() == v66.end() && !v32 && !v35) + { + return usage(argc, argv); + } + FILE * f = stdout; + if (fileName.length()) + { + f = fopen(fileName.data(), "w"); + } + std::map v77; + if (!v35) + { + for (int j=0; j < v66.size(); j++) + { + std::string fileContent; + if (readFile(v66[j].data(), fileContent)) + { + fprintf(stderr, "%s not found\n", v66[j].data()); + return 1; + } + v77[v66[j]] = fileContent; + } + } + + // main - 25 + std::string v88, v90; + std::vector v72; + if (!v30) + { + if (!v36) + { + int v25; + v25 = WXSS::LintAndParseCSSList(v77, v66[0], v88, v90, 0, v31, v37, v34, v75); + if (v25) + { + fprintf(stderr, "ERR: %s\nerror file count: %d\n", v90.data(), 0); + return 1; + } + return 0; + } + LABEL_102: + + std::string v96; + + std::string v94; + WXSS::XCompiler lt(v77, v37, v75); + // lt.offset_136.erase() + // lt.offset_136.erase() + + v96.assign(lt.offset_8); + std::map v92; + if (!lt.offset_4) + { + int ret = lt.GetCommHead(v72, v94, true, v76); + if (ret) + { + fprintf(stderr, "ERR: GetCommHead ret %d", ret); + } + for (int i = 0; i < v72.size(); i++) + { + std::string v98; + std::string cur = v72[i]; + std::string v101 = WXML::Rewrite::ToStringCode(cur); + int ret = lt.GetPageCss(v101, v98, 0); + if (ret) + { + fprintf(stderr, "INFO: GetPageCss fail ret %d", ret); + } + v92.emplace(cur, v98); + } + std::stringstream v104; + v104 << "{\"common\":\""; + v104 << EscapeToJsonString(v94); + + v104 << "\",\"pageWxss\":"; + v104 << DictToJsonString(v92); + v104 << "}"; + std::string v101 = v104.str(); + + } + fprintf(stderr, "ERR: wxss GetCompiledResult: %s, error file count: %d, ret %d", v96.data(), lt.offset_4, lt.offset_0); + return 1; + } + // main - 30 + for (int i = 0; i < v29; i++) + { + v72.push_back(v66[i]); + } + + // main - 35 + // main - 40 + if (v36) + { + goto LABEL_102; + } + int v25 = WXSS::NewLintAndParseCSSList(v77, v72, v88, v90, 0, v37, v75, v76); + if (v25) + { + fprintf(stderr, "ERR: %s\nerror file count: %d\n", v90.data(), 0); + return 1; + } + fprintf(f, "%s", v88.data()); + fclose(f); + // main - 45 return 0; } \ No newline at end of file diff --git a/src/wcsc/usage.cpp b/src/wcsc/usage.cpp new file mode 100644 index 0000000..ea425aa --- /dev/null +++ b/src/wcsc/usage.cpp @@ -0,0 +1,21 @@ +#include + +//----- (00401726) -------------------------------------------------------- +int usage(int argc, const char **argv) +{ + printf("*** WeChat Stylesheet Compiler, Version %s ***\n", "v0.4me_20190328_db"); + printf( + "Usage: %s [-lc] [-o OUTPUT] [-s ] [-st] [-js] [-db] [-cp ] [-pc ] <[-sd ] | [import_css_files..]>\n", + *argv); + printf(" -lc: need to lint the css\n"); + printf(" -sd: 'someclass { font-size: 18px }'\n"); + printf(" -s: read from stdin\n"); + printf(" -o: output destination (default stdout)\n"); + printf(" -st: print tree\n"); + printf(" -db: add debug attr\n"); + printf(" -js: js formate output\n"); + printf(" -cp: add class prefix\n"); + printf(" -pc: page wxss files count\n"); + return 0; +} \ No newline at end of file diff --git a/src/wxss/common.cpp b/src/wxss/common.cpp new file mode 100644 index 0000000..c2d28e7 --- /dev/null +++ b/src/wxss/common.cpp @@ -0,0 +1,15 @@ +#include "../include/wxss.h" + +namespace WXSS +{ + + std::string RemoveQuote(std::string const&) + { + throw "not implement"; + } + int LintAndParseCSSList(std::map const&, std::string&, std::string&, std::string&, int, bool, bool, bool, std::string const&) + { + throw "not implement"; + } + +} \ No newline at end of file diff --git a/src/wxss/css_tree_lib/css_syntax_tree.cpp b/src/wxss/css_tree_lib/css_syntax_tree.cpp new file mode 100644 index 0000000..a7f6049 --- /dev/null +++ b/src/wxss/css_tree_lib/css_syntax_tree.cpp @@ -0,0 +1,16 @@ +#include "../../include/wxss.h" + +namespace WXSS +{ + namespace CSSTreeLib + { + CSSSyntaxTree::CSSSyntaxTree(/* args */) + { + } + + CSSSyntaxTree::~CSSSyntaxTree() + { + } + } + +} // namespace WXSS \ No newline at end of file diff --git a/src/wxss/css_tree_lib/lexical_checker.cpp b/src/wxss/css_tree_lib/lexical_checker.cpp new file mode 100644 index 0000000..0b2f3f6 --- /dev/null +++ b/src/wxss/css_tree_lib/lexical_checker.cpp @@ -0,0 +1,13 @@ +#include "../../include/wxss.h" + +namespace WXSS +{ + namespace CSSTreeLib + { + void LexicalChecker::GetInstance(/* args */) + { + } + + } + +} // namespace WXSS \ No newline at end of file diff --git a/src/wxss/css_tree_lib/parser.cpp b/src/wxss/css_tree_lib/parser.cpp new file mode 100644 index 0000000..da3993c --- /dev/null +++ b/src/wxss/css_tree_lib/parser.cpp @@ -0,0 +1,22 @@ +#include "../../include/wxss.h" + +namespace WXSS +{ + namespace CSSTreeLib + { + + Parser::Parser(/* args */) + { + } + + Parser::~Parser() + { + } + + int Parser::Parse(std::string const&, std::string const&, std::string&, std::string const&) + { + throw "not implement"; + } + } + +} // namespace WXSS \ No newline at end of file diff --git a/src/wxss/token.cpp b/src/wxss/token.cpp new file mode 100644 index 0000000..f29d71d --- /dev/null +++ b/src/wxss/token.cpp @@ -0,0 +1,13 @@ +#include "../include/wxss.h" + +namespace WXSS +{ + + Token::Token(/* args */) + { + } + + Token::~Token() + { + } +} \ No newline at end of file diff --git a/src/wxss/x_compiler.cpp b/src/wxss/x_compiler.cpp new file mode 100644 index 0000000..2fc1e03 --- /dev/null +++ b/src/wxss/x_compiler.cpp @@ -0,0 +1,144 @@ +#include "../include/wxss.h" +#include "../include/wxa.h" + +namespace WXSS +{ + + XCompiler::XCompiler(/* args */) + { + } + + XCompiler::XCompiler(std::map const& a2, bool a3, std::string const& a4) + { + std::map _v64; + if (a3) + { + // GetInstance + } + else + { + // GetInstance + } + this->offset_0 = 0; + this->offset_4 = 0; + + std::string v55; + for (auto i = a2.begin(); i != a2.end(); i++) + { + WXSS::CSSTreeLib::Parser v29; + std::string v61; + std::string v77; + int v47 = v29.Parse(i->second, i->first, v61, a4); + if (v47) + { + this->offset_4++; + v55 += v61 + "\n"; + this->offset_0 = v47; + } + else + { + std::shared_ptr v57(new WXSS::CSSTreeLib::CSSSyntaxTree()); + WXSS::CSSTreeLib::LexicalChecker v31; + v31.Traval(v57); + std::string v42; + for (int j = 0; j < v57->offset_120.size(); j++) + { + auto cur = v57->offset_120[j]; + if (cur->offset_0 == "DIRECTIVE") + { + auto v8 = cur->offset_120; + v42 = i->first; + if (v8.size() > 1 && v8[0]->offset_0 == "@import") + { + std::string lit = v8[1]->offset_24.GetLiteral(); + std::string v64 = WXSS::RemoveQuote(lit); + std::string v70; + if (v64[0] == '/') + { + std::string v74 = "." + v64; + if (a2.end() != a2.find(v74)) + { + v70.assign(v74); + } + v74 += ".wxss"; + if (a2.end() != a2.find(v74)) + { + v70.assign(v74); + } + } + if (!v70.length()) + { + MMBizWxaAppComm::PathCombine(i->first, v64, v70); + } + if (a2.find(v70) == a2.end()) + { + v70 += ".wxss"; + } + if (a2.find(v70) == a2.end()) + { + v55 += "path `" + v64 + "` not found from `" + i->first + "`.\n"; + this->offset_4++; + this->offset_0 = 3; + } + else + { + auto v34 = this->offset_56; + std::vector v10 = v34[i->first]; + v10.push_back(v70); + std::shared_ptr v33(new std::string()); + v33->assign(v70); + cur->offset_140 = v33; + } + + } + + } + } + std::string v74 = v42; + std::shared_ptr v75(new WXSS::CSSTreeLib::CSSSyntaxTree()); + // this->offset_32. + // todo... + } + } + // end for + // XCompiler - 5 + if (!this->offset_0) + { + for (auto j = a2.begin(); j != a2.end(); j++) + { + _v64[j->first] = 0; + } + for (auto k = a2.begin(); k != a2.end(); k++) + { + std::string v32 = k->first; + + } + // XCompiler - 5 - 0 + while (true) + { + while (true) + { + /* code */ + break; + } + break; + + } + + // XCompiler - 5 - 5 + if (a2.size() != 0) // todo... + { + v55 += "I don't know what will happen if a snake eats its tail, but a file can not import itself."; + this->offset_0 = 4; + this->offset_4++; + } + } + + } + + XCompiler::~XCompiler() + { + } + + +} // namespace WXSS \ No newline at end of file diff --git a/test/wcsc.disassembly.cpp b/test/wcsc.disassembly.cpp new file mode 100644 index 0000000..984f11d --- /dev/null +++ b/test/wcsc.disassembly.cpp @@ -0,0 +1,180771 @@ +/* This file was generated by the Hex-Rays decompiler version 7.7.0.220118. + Copyright (c) 2007-2021 Hex-Rays + + Detected compiler: GNU C++ +*/ + +#include +#include + +#include + + +//------------------------------------------------------------------------- +// Function declarations + +#define __thiscall __cdecl // Test compile in C mode + +void __cdecl __mingw_invalidParameterHandler(const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t pReserved); +int pre_c_init(); // idb +void pre_cpp_init(); // idb +// int __usercall __tmainCRTStartup@(int@, int@, int@, int@, char); +int __cdecl atexit(_PVFV func); +int __gcc_register_frame(); +void __gcc_deregister_frame(void); // idb +int printf(char *, ...); +int fprintf(_iobuf *, char *, ...); +void __tcf_1(void); // idb +// void __usercall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(int@); +unsigned __int8 *__thiscall std::string::operator=(unsigned __int8 **this, int); +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str); +int __thiscall std::string::basic_string(void **this, char *Str); +// void __usercall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(int@); +int __cdecl Usage(int, const char **); +int __cdecl ReadFile(char *FileName, unsigned int **a2); +int __cdecl Trim(int, int); +int __cdecl GetNextArg(int, int *, int); +int __cdecl EscapeToJsonString(int, int); +int __cdecl DictToJsonString(int, int); +void __tcf_3(void); // idb +int snprintf(FILE *, int, int, ...); +// void __usercall std::_Rb_tree,std::less,std::allocator>::_M_erase(int@); +int __thiscall WXSS::CSSTreeLib::LexicalChecker::Traval(_DWORD **this, _DWORD *); +// void __usercall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(int@); +// void __usercall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(int@); +// void __usercall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(int@); +char *__cdecl WXSS::RemoveQuote(char *, char **); +int __stdcall WXSS::XCompiler::DealRPX(int *, int); +int __thiscall WXSS::XCompiler::GetHostRule(_DWORD *this, _DWORD *); +int __thiscall WXSS::XCompiler::ShowTree(_DWORD *this, _DWORD *); +void __tcf_1_0(void); // idb +void __tcf_2(void); // idb +// void __usercall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(int@); +void __thiscall std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(volatile signed __int32 **this, volatile signed __int32 *a2); +int __thiscall WXSS::XCompiler::GetCompiled(int *this, int a2, unsigned int **a3); +struct _Unwind_Exception *__thiscall WXSS::XCompiler::GetJSCompiled(int *this, int, _DWORD *); +struct _Unwind_Exception *__thiscall WXSS::XCompiler::GetWellFormattedJSCompiled(int *this, int, _DWORD *); +void __fastcall WXSS::CSSTreeLib::CSSSyntaxTree::~CSSSyntaxTree(int); +// void __usercall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(int@); +void __fastcall std::deque::~deque(int); +int __thiscall WXSS::XCompiler::GenExpr(int this, int, int, WXSS::Token *); +int __thiscall WXSS::XCompiler::GetPageCss(char *this, int *, _DWORD *, int); +int __thiscall WXSS::XCompiler::MarkImported(int this, int); +void *__thiscall WXSS::XCompiler::GetCommHead(int this, char **a2, _DWORD *a3, char a4, int *a5); +void __fastcall std::deque>::~deque(int); +struct _Unwind_Exception *__cdecl WXSS::LintAndParseCSS(int *a1, char **a2, unsigned int **a3, unsigned int **a4, char a5, char a6, char a7, char a8, int a9); +void __thiscall WXSS::XCompiler::XCompiler(char *this, _DWORD *, char, int); +struct _Unwind_Exception *__cdecl WXSS::LintAndParseCSSList(_DWORD *a1, int a2, unsigned int **a3, int a4, int a5, char a6, char a7, char a8, int a9); +struct _Unwind_Exception *__cdecl WXSS::NewLintAndParseCSSList(_DWORD *a1, char **a2, unsigned int **a3, int a4, int a5, char a6, int a7, int *a8); +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str); +void __cdecl MMBizWxaAppComm::SplitBySlash(_DWORD *a1, char **a2); +int __cdecl MMBizWxaAppComm::PathCombine(_DWORD *a1, _DWORD *a2, unsigned int **a3); +_DWORD __stdcall std::string::operator+=(_DWORD); // weak +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str); +int __cdecl WXML::RPX::accept(WXML::RPX *this, int (*)[266], bool *, int *); +int __cdecl WXML::RPX::acceptID(WXML::RPX *this, bool *); +int __cdecl WXML::RPX::acceptStr(WXML::RPX *this, bool *); +int __cdecl WXML::RPX::acceptNum(WXML::RPX *this, bool *); +int __cdecl WXML::RPX::acceptSymbol(WXML::RPX *this, char *, int *); +std::ostream::sentry *__cdecl WXML::Rewrite::ToStringCode(int, int, int); +std::ostream::sentry *__cdecl WXML::Rewrite::ToStringCode(int *, int); +int __cdecl WXML::Rewrite::ToStringCode3[abi:cxx11](int, int, int); +int __cdecl WXML::Rewrite::ToStringCode3(int, int *); +int __cdecl WXML::Rewrite::ToStringCode2[abi:cxx11](int, int, int); +int __cdecl WXML::Rewrite::ToStringCode2(int, int *); +void __cdecl WXML::Rewrite::ToStringCode(int *, int); +int __cdecl WXML::Rewrite::ToStringCode(int, int *); +int __thiscall std::string::basic_string(void **this, char *Str); +void __cdecl WXML::Rewrite::GetToken(int, int); +BOOL __cdecl WXML::Rewrite::RewriteRPX(int a1, unsigned int **a2, char *a3, char *Str); +int __cdecl WXML::Rewrite::RewriteImg(int a1, unsigned int **a2, int *a3, int a4, int a5); +int __thiscall std::string::_M_construct(void **this, unsigned __int8 *Src, size_t Size); +int __thiscall std::string::basic_string(void **this, char *Str); +std::ostream::sentry *__cdecl WXML::RenderStrToken(_DWORD *, int); +char __cdecl WXML::IsFloat(WXML *this); +char __cdecl WXML::IsFloat(int); +void __cdecl WXML::StrSplitList4RPX(char *a1, char *Str, char *SubStr, void **a4); +void __cdecl WXML::StrSplitList4ClassSuffix(char *a1, char *Str, void **a3); +void __cdecl WXML::GetStrForMakingCSS(char **, int); +void __tcf_1_1(void); // idb +unsigned __int8 *__thiscall std::string::operator=(unsigned __int8 **this, int); +int __thiscall std::string::basic_string(void **this, char *Str); +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str); +_DWORD *__thiscall std::string::operator+=(_DWORD *this, char *Str); +void __thiscall std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(int *this, int); +// void __usercall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(int@); +// void __usercall std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_erase(_DWORD *@); +void __tcf_0(void); // idb +void __fastcall WXSS::CSSTreeLib::CSSSyntaxTree::~CSSSyntaxTree(int); +// _DWORD *__usercall std::__relocate_a_1>@(_DWORD *@, _DWORD *@, _DWORD *@); +void __thiscall std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(volatile signed __int32 **this, volatile signed __int32 *a2); +int __thiscall WXSS::CSSTreeLib::Parser::Parse(int this, char **a2, int *a3, unsigned int **a4, int a5); +void __tcf_0_0(void); // idb +unsigned __int8 *__thiscall std::string::operator=(unsigned __int8 **this, int); +void __thiscall WXSS::Tokenizer::Tokenizer(int this, char *Str, int); +void WXSS::Tokenizer::InitTransitTable(); +int WXSS::Tokenizer::InitSubStrCheckingCaluseTable(); +int __cdecl WXSS::Tokenizer::TryGetAnotherTypeByAnySubStr(int, int, int, int); +// volatile signed __int32 **__usercall std::__relocate_a_1>@(volatile signed __int32 **@, volatile signed __int32 **@, volatile signed __int32 **@); +int __thiscall WXSS::Tokenizer::GetTokens(int *this, int a2, unsigned int **a3, int a4); +void __tcf_1_2(void); // idb +int __thiscall std::string::basic_string(void **this, char *Str); +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str); +int WXSS::CSSTreeLib::TransitTable::GetTopType(); +void __thiscall std::vector::_M_move_assign(void ***this, void ***a2); +// void __usercall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(int@); +int __thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=(_DWORD *this, _DWORD *); +void __fastcall WXSS::CSSTreeLib::TransitTable::Init(int); +// _DWORD *__usercall d_make_comp@(_DWORD *@, int@, int@, int); +// _DWORD *__usercall d_make_name@(_DWORD *@, int@, int@); +// int __usercall d_number@(int@); +// int __usercall d_call_offset@(int@, int@); +// _DWORD *__usercall d_ref_qualifier@(_DWORD *@, _DWORD *@); +// int __usercall d_discriminator@(int@); +// int __usercall d_count_templates_scopes@(int result@, int *@, int@); +// _DWORD *__usercall d_index_template_argument_part_0@(_DWORD *result@, int@); +void __cdecl d_growable_string_callback_adapter(void *Src, size_t Size, int); +int sprintf_constprop_0(FILE *, int, ...); +// BOOL __usercall next_is_type_qual_isra_0@(char *@); +// int __usercall d_append_char@(int@, char@
); +// _DWORD *__usercall d_lookup_template_argument@(int@, int@); +// size_t __usercall d_append_string@(int@, const char *Str@); +// _DWORD *__usercall d_find_pack@(int@, _DWORD *@, int@); +// _DWORD *__usercall d_template_param@(_DWORD *@); +// size_t __usercall d_append_num@(int@, int@); +// _DWORD *__usercall d_source_name@(int@); +// _DWORD *__usercall d_substitution@(int@, char@
); +// int __usercall d_print_java_identifier@(int result@, char *a2@, int a3@); +// int *__usercall d_type@(_DWORD *@, int, int, int, int, int, int, int, int, int, int, int); +// _DWORD *__usercall d_operator_name@(_DWORD *@); +// int __usercall d_parmlist@(_DWORD *@); +// _DWORD *__usercall d_bare_function_type@(_DWORD *@, int@); +// _DWORD *__usercall d_function_type@(int@); +// _DWORD *__usercall d_unqualified_name@(_DWORD *@); +// int *__usercall d_name@(_DWORD *@); +// unsigned int *__usercall d_encoding_part_0@(int@, int@); +// _DWORD *__usercall d_special_name@(_DWORD *@); +// unsigned int *__usercall d_expr_primary@(_DWORD *@); +// unsigned int *__usercall d_expression_1@(_DWORD *@); +// _DWORD *__usercall d_exprlist@(_DWORD *@, char@
); +// int **__usercall d_cv_qualifiers@(_DWORD *@, int **@, int@); +// unsigned int *__usercall d_template_arg@(_DWORD *a1@, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12); +// _DWORD *__usercall d_template_args_1@(_DWORD *@); +// unsigned int __usercall d_print_comp_inner@(unsigned int result@, int@); +// int __usercall d_print_comp@(int result@, int@); +// int __usercall d_print_mod@(int@, _DWORD *@); +// unsigned int __usercall d_print_function_type@(unsigned int a1@, int a2@, int **a3); +// unsigned int __usercall d_print_mod_list@(unsigned int result@, int **a2@, int a3); +// int __usercall d_print_array_type@(unsigned int a1@, int a2@, int **a3); +// int __usercall d_print_conversion@(int@, int@); +// int __usercall d_print_expr_op@(int@, _DWORD *@); +// BOOL __usercall d_demangle_callback_constprop_0@(char *@, void (__cdecl *)(char *, int, int)@, int@); +// int __usercall d_print_subexpr@(unsigned int a1@, _DWORD *a2@); +// int __usercall d_maybe_print_fold_expression@(unsigned int a1@, int a2@); +char *__cdecl __cxa_demangle(const char *lpmangled, char *lpout, size_t *lpoutlen, int *lpstatus); +unsigned int __cdecl __gcclibcxx_demangle_callback(char *, void (__cdecl *)(char *, int, int), int); +void __do_global_dtors(void); // idb +int __do_global_ctors(); +int __main(); +int _setargv(); +int __stdcall __dyn_tls_dtor(int, unsigned int, int); +int __stdcall __dyn_tls_init(int, int, int); +int __cdecl _matherr(struct _exception *Except); +void __cdecl fpreset(); +void __noreturn __report_error(char *Format, ...); +// _DWORD *__usercall mark_section_writable@(const void *@); +void _pei386_runtime_relocator(); +int (__cdecl *__cdecl __mingw_raise_matherr(int, int, double, double, double))(_DWORD); +void __cdecl __mingw_setusermatherr(_UserMathErrorFunctionPointer UserMathErrorFunction); +LONG __stdcall _gnu_exception_handler(_EXCEPTION_POINTERS *); +void __mingwthr_run_key_dtors_part_0(); +int __cdecl ___w64_mingwthr_add_key_dtor(int, int); +int __cdecl ___w64_mingwthr_remove_key_dtor(int); +int __cdecl __mingw_TLScallback(int, unsigned int); +int __cdecl _FindPESection(int, unsigned int); +const char *__cdecl _FindPESectionByName(char *Str); +int __cdecl __mingw_GetSectionForAddress(int); +int __mingw_GetSectionCount(); +int __cdecl _FindPESectionExec(int); +int _GetPEImageBase(); +BOOL __cdecl _IsNonwritableInCurrentImage(int); +int __cdecl __mingw_enum_import_library_names(int); +int __cdecl __gthr_win32_once(int, void (*)(void)); +int __cdecl __gthr_win32_key_create(int *, int); +DWORD __cdecl __gthr_win32_key_delete(DWORD dwTlsIndex); +LPVOID __cdecl __gthr_win32_getspecific(DWORD dwTlsIndex); +DWORD __cdecl __gthr_win32_setspecific(DWORD dwTlsIndex, LPVOID lpTlsValue); +HANDLE __cdecl __gthr_win32_mutex_init_function(_DWORD *); +int __cdecl __gthr_win32_mutex_destroy(int); +int __cdecl __gthr_win32_mutex_lock(int); +BOOL __cdecl __gthr_win32_mutex_unlock(int); +HANDLE __cdecl __gthr_win32_recursive_mutex_init_function(_DWORD *); +DWORD __cdecl __gthr_win32_recursive_mutex_lock(int); +int __cdecl __gthr_win32_recursive_mutex_trylock(int); +BOOL __cdecl __gthr_win32_recursive_mutex_unlock(int); +int __cdecl __gthr_win32_recursive_mutex_destroy(int); +// int __usercall _Unwind_RaiseException_Phase2@(_DWORD *@, _DWORD *@, int *@); +BOOL fc_key_init(); +void fc_key_init_once(); +LPVOID _Unwind_SjLj_GetContext(); +// int __usercall uw_install_context_constprop_0@(int@); +// int __usercall _Unwind_ForcedUnwind_Phase2@(_DWORD *@, void ***@, int *@); +void __cdecl _Unwind_SjLj_Register(struct SjLj_Function_Context *lpfctx); +void __cdecl _Unwind_SjLj_Unregister(struct SjLj_Function_Context *lpfctx); +void __cdecl _Unwind_SetGR(struct _Unwind_Context *lpuctx, int r, _Unwind_Word v); +int __cdecl _Unwind_GetIPInfo(int, _DWORD *); +int __cdecl _Unwind_SetIP(int, int); +int __cdecl _Unwind_GetLanguageSpecificData(int); +int _Unwind_GetRegionStart(); +int _Unwind_GetDataRelBase(); +int _Unwind_GetTextRelBase(); +_Unwind_Reason_Code __cdecl _Unwind_SjLj_RaiseException(struct _Unwind_Exception *lpuexcpt); +_Unwind_Reason_Code __cdecl _Unwind_SjLj_ForcedUnwind(struct _Unwind_Exception *lpuexcpt, _Unwind_Stop_Fn pfnstop, void *pdata); +void __cdecl _Unwind_SjLj_Resume(struct _Unwind_Exception *lpuexcpt); +_Unwind_Reason_Code __cdecl _Unwind_SjLj_Resume_or_Rethrow(struct _Unwind_Exception *lpuexcpt); +void __cdecl _Unwind_DeleteException(struct _Unwind_Exception *lpuexcpt); +_Unwind_Reason_Code __cdecl _Unwind_Backtrace(_Unwind_Trace_Fn pfntrace, void *lpdata); +void __cdecl emutls_destroy(int *); +// _DWORD *__usercall emutls_alloc@(size_t *@); +DWORD emutls_init(); +_DWORD *__cdecl __emutls_get_address(size_t *); +unsigned int *__cdecl __emutls_register_common(unsigned int *, unsigned int, unsigned int, unsigned int); +long double __cdecl __mingw_strtod(unsigned __int8 *, unsigned __int8 **); +long double __cdecl __mingw_strtof(unsigned __int8 *, unsigned __int8 **); +wint_t __cdecl btowc(int Ch); +int __cdecl __asctoe64(char *Str, long double *); +long double __cdecl strtold(const char *String, char **EndPtr); +int __cdecl wctob(wint_t WCh); +wctype_t __cdecl wctype(const char *name); +FILE *__cdecl fopen64(const char *FileName, const char *Mode); +int __cdecl fseeko64(FILE *Stream, fpos_t, int); +fpos_t __cdecl ftello64(FILE *Stream); +__int64 __cdecl lseek64(int FileHandle, __int64 Offset, int Origin); +int __cdecl __mingw_vfprintf(FILE *Stream, char *, int *); +int __cdecl __mingw_vsnprintf(FILE *, int, char *, int *); +int __cdecl __mingw_vsprintf(FILE *, char *, int *); +int *__cdecl __increment_D2A(int *); +// int __usercall rvOK_constprop_0_isra_0@(int *@, int *@, char *@, double, int, int, _DWORD *); +_DWORD *__cdecl __decrement_D2A(int); +int *__cdecl __set_ones_D2A(int *, int); +int __cdecl __strtodg(unsigned __int8 *, unsigned __int8 **, int *, int *, void *); +int *__cdecl __sum_D2A(int *, int *); +// unsigned int __usercall __m16m@(unsigned __int16@, int@, int@); +// BOOL __usercall __eshift_part_0@(__int16 *@, int@); +__int16 *__cdecl __emovi(int, int); +unsigned int __cdecl __eaddm(int, int); +unsigned int __cdecl __esubm(int, int); +BOOL __cdecl __edivm(int, int *); +int __cdecl __emulm(int, int); +__int16 *__cdecl __toe64(_WORD *, int); +int __cdecl __ecmp(int, int); +int __cdecl __enormlz(_WORD *); +__int16 __cdecl __emdnorm(int, int, int, int, int, int); +int __cdecl __emovo(_WORD *, int); +__int16 __cdecl __emul(int, int, int); +// int *__usercall __pformat_cvt@(unsigned int a1@, __int64 a2, int a3, int a4, int a5, int *a6, int *a7); +// int __usercall __pformat_putc@(int@, int@); +// int __usercall __pformat_wputchars@(int@, int@, int@); +// int __usercall __pformat_putchars@(_BYTE *@, int@, int@); +// int __usercall __pformat_puts@(char *@, int@); +// int __usercall __pformat_emit_inf_or_nan@(int@, int@, int@); +// int __usercall __pformat_xint@(int@, __int64, int, int, int); +int __cdecl __pformat_int(__int64, int, int, int); +// int __usercall __pformat_emit_radix_point@(int@); +// int __usercall __pformat_emit_float@(int@, char *@, int@, int); +// int __usercall __pformat_emit_efloat@(int@, char *@, int@, _DWORD *); +// void __usercall __pformat_efloat(_DWORD *@, long double); +// void __usercall __pformat_float(int@, long double); +// void __usercall __pformat_gfloat(_DWORD *@, long double); +// int __usercall __pformat_xldouble@(int@, long double); +int __cdecl __mingw_pformat(__int16, FILE *, int, char *, int *); +int *__cdecl __rv_alloc_D2A(int); +int *__cdecl __nrv_alloc_D2A(char *a1, char **a2, int a3); +void __cdecl __freedtoa(_DWORD *); +unsigned int __cdecl __quorem_D2A(int, int); +int *__cdecl __gdtoa(int *a1, int a2, int *a3, int *a4, unsigned int a5, int a6, int *a7, char **a8); +int __cdecl __gethex_D2A(unsigned __int8 **, int *, int *, int **, int); +int __cdecl __rshift_D2A(int, int); +int __cdecl __trailz_D2A(int); +int __mingw_hexdig_init_D2A(); +int __cdecl __hexnan_D2A(unsigned __int8 **, int *, int *); +// void __usercall dtoa_lock(int@); +void dtoa_lock_cleanup(void); // idb +int *__cdecl __Balloc_D2A(int); +void __cdecl __Bfree_D2A(void *Block); +int *__cdecl __multadd_D2A(int *, int, int); +_DWORD *__cdecl __i2b_D2A(int); +int *__cdecl __mult_D2A(int, int); +int *__cdecl __pow5mult_D2A(int *, int); +int *__cdecl __lshift_D2A(int *, int); +int __cdecl __cmp_D2A(int, int); +int *__cdecl __diff_D2A(int, int); +long double __cdecl __b2d_D2A(int, _DWORD *); +int *__cdecl __d2b_D2A(double, _DWORD *, _DWORD *); +int *__cdecl __s2b_D2A(int, int, int, int, int); +long double __cdecl __ratio_D2A(int, int); +int __cdecl __match_D2A(char **, char *); +size_t __cdecl __copybits_D2A(char *, int Val, size_t Size); +int __cdecl __any_on_D2A(int, int); +size_t __cdecl strnlen(const char *String, size_t MaxCount); +size_t __cdecl wcsnlen(const wchar_t *Source, size_t MaxCount); +// size_t __cdecl wcsxfrm(wchar_t *Destination, const wchar_t *Source, size_t MaxCount); +// size_t __cdecl wcslen(const wchar_t *String); +// size_t __cdecl wcsftime(wchar_t *Buffer, size_t SizeInWords, const wchar_t *Format, const struct tm *Tm); +// int __cdecl wcscoll(const wchar_t *String1, const wchar_t *String2); +// int __cdecl vfprintf(FILE *const Stream, const char *const Format, va_list ArgList); +// wint_t __cdecl ungetwc(wint_t Character, FILE *Stream); +// int __cdecl ungetc(int Character, FILE *Stream); +// wint_t __cdecl towupper(wint_t C); +// wint_t __cdecl towlower(wint_t C); +// size_t __cdecl strxfrm(char *Destination, const char *Source, size_t MaxCount); +// char *__cdecl strstr(const char *Str, const char *SubStr); +// char *__cdecl strncpy(char *Destination, const char *Source, size_t Count); +// int __cdecl strncmp(const char *Str1, const char *Str2, size_t MaxCount); +// size_t __cdecl strlen(const char *Str); +// size_t __cdecl strftime(char *Buffer, size_t SizeInBytes, const char *Format, const struct tm *Tm); +// char *__cdecl strerror(int ErrorMessage); +// char *__cdecl strcpy(char *Destination, const char *Source); +// int __cdecl strcoll(const char *String1, const char *String2); +// int __cdecl strcmp(const char *Str1, const char *Str2); +// _crt_signal_t __cdecl signal(int Signal, _crt_signal_t Function); +// int __cdecl setvbuf(FILE *Stream, char *Buffer, int Mode, size_t Size); +// char *__cdecl setlocale(int Category, const char *Locale); +// void *__cdecl realloc(void *Block, size_t Size); +// wint_t __cdecl putwc(wchar_t Character, FILE *Stream); +// int __cdecl putc(int Character, FILE *Stream); +// void *__cdecl memset(void *, int Val, size_t Size); +// void *__cdecl memmove(void *, const void *Src, size_t Size); +// void *__cdecl memcpy(void *, const void *Src, size_t Size); +// int __cdecl memcmp(const void *Buf1, const void *Buf2, size_t Size); +// void *__cdecl memchr(const void *Buf, int Val, size_t MaxCount); +// void *__cdecl malloc(size_t Size); +// struct lconv *__cdecl localeconv(); +// int __cdecl iswctype(wint_t C, wctype_t Type); +// int __cdecl isspace(int C); +// wint_t __cdecl getwc(FILE *Stream); +// int __cdecl getc(FILE *Stream); +// size_t __cdecl fwrite(const void *Buffer, size_t ElementSize, size_t ElementCount, FILE *Stream); +// int __cdecl fsetpos(FILE *Stream, const fpos_t *Position); +// void __cdecl free(void *Block); +// size_t __cdecl fread(void *Buffer, size_t ElementSize, size_t ElementCount, FILE *Stream); +// int __cdecl fputs(const char *Buffer, FILE *Stream); +// int __cdecl fputc(int Character, FILE *Stream); +// int fprintf(FILE *const Stream, const char *const Format, ...); +// FILE *__cdecl fopen(const char *FileName, const char *Mode); +// char *__cdecl fgets(char *Buffer, int MaxCount, FILE *Stream); +// int __cdecl fgetpos(FILE *Stream, fpos_t *Position); +// int __cdecl fflush(FILE *Stream); +// int __cdecl fclose(FILE *Stream); +// void __cdecl __noreturn exit(int Code); +// void *__cdecl calloc(size_t Count, size_t Size); +// int __cdecl atoi(const char *String); +// void __cdecl __noreturn abort(); +// int __cdecl write(int FileHandle, const void *Buf, unsigned int MaxCharCount); +// int __cdecl _strnicmp(const char *String1, const char *String2, size_t MaxCount); +// int __cdecl read(int FileHandle, void *DstBuf, unsigned int MaxCharCount); +// _onexit_t __cdecl _onexit(_onexit_t Func); +// void __cdecl _initterm(_PVFV *First, _PVFV *Last); +// int __cdecl _fileno(FILE *Stream); +// int __cdecl fileno(FILE *Stream); +// __int64 __cdecl _filelengthi64(int FileHandle); +// FILE *__cdecl fdopen(int FileHandle, const char *Format); +// int *__cdecl _errno(); +// int __cdecl close(int FileHandle); +// void __cdecl _cexit(); +// int __cdecl _amsg_exit(_DWORD); weak +// void __cdecl __set_app_type(_crt_app_type Type); +// int *__cdecl __p__fmode(); +// int *__cdecl __p__commode(); +// char **__cdecl __p__acmdln(); +// int __cdecl __getmainargs(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD); weak +int __cdecl __mbrtowc_cp(LPWSTR lpWideCharStr, BYTE *lpMultiByteStr, int, int *, UINT CodePage, unsigned int); +size_t __cdecl mbrtowc(wchar_t *DstCh, const char *SrcCh, size_t SizeInBytes, mbstate_t *State); +size_t __cdecl mbsrtowcs(wchar_t *Dest, const char **PSrc, size_t Count, mbstate_t *State); +size_t __cdecl mbrlen(const char *Ch, size_t SizeInBytes, mbstate_t *State); +int __cdecl __wcrtomb_cp(LPSTR lpMultiByteStr, __int16 a2, UINT CodePage, int cbMultiByte); +size_t __cdecl wcrtomb(char *Dest, wchar_t Source, mbstate_t *State); +size_t __cdecl wcsrtombs(char *Dest, const wchar_t **PSource, size_t Count, mbstate_t *State); +FILE *__cdecl __acrt_iob_func(unsigned int Ix); +_invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler Handler); +int __cdecl mingw_rand_s(int); +int __cdecl init_rand_s(int); +void __cdecl _lock_file(FILE *Stream); +void __cdecl _unlock_file(FILE *Stream); +int __cdecl ___mb_cur_max_func(); +int msvcrt___lc_codepage_func(); +int setlocale_codepage_hack(); +int init_codepage_func(); +unsigned int __cdecl ___lc_codepage_func(); +// char *__cdecl strchr(const char *Str, int Val); +// void __cdecl _unlock(FILE *Stream); weak +// int __cdecl _lock(_DWORD); weak +int __cdecl __mingwthr_key_dtor(int, int); +int __cdecl _txnal_cow_string_D1(); +void __cdecl _txnal_cow_string_D1_commit(volatile signed __int32 *Block); +void __cdecl _txnal_cow_string_C1_for_exceptions(struct _Unwind_Exception **); +void __cdecl _ZGTtNSt11logic_errorC2EPKc(struct _Unwind_Exception **); +void __cdecl _ZGTtNSt11logic_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(struct _Unwind_Exception **); +void __cdecl __noreturn _ZGTtNSt11logic_errorD0Ev(int); +int _ZGTtNSt11logic_errorD2Ev(); +void __cdecl _ZGTtNSt11range_errorC2EPKc(struct _Unwind_Exception **); +void __cdecl _ZGTtNSt11range_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(struct _Unwind_Exception **); +void __cdecl __noreturn _ZGTtNSt11range_errorD0Ev(int); +int _ZGTtNSt11range_errorD2Ev(); +void __cdecl _ZGTtNSt12domain_errorC2EPKc(struct _Unwind_Exception **); +void __cdecl _ZGTtNSt12domain_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(struct _Unwind_Exception **); +void __cdecl __noreturn _ZGTtNSt12domain_errorD0Ev(int); +int _ZGTtNSt12domain_errorD2Ev(); +void __cdecl _ZGTtNSt12length_errorC2EPKc(struct _Unwind_Exception **); +void __cdecl _ZGTtNSt12length_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(struct _Unwind_Exception **); +void __cdecl __noreturn _ZGTtNSt12length_errorD0Ev(int); +int _ZGTtNSt12length_errorD2Ev(); +void __cdecl _ZGTtNSt12out_of_rangeC2EPKc(struct _Unwind_Exception **); +void __cdecl _ZGTtNSt12out_of_rangeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(struct _Unwind_Exception **); +void __cdecl __noreturn _ZGTtNSt12out_of_rangeD0Ev(int); +int _ZGTtNSt12out_of_rangeD2Ev(); +void __cdecl _ZGTtNSt13runtime_errorC2EPKc(struct _Unwind_Exception **); +void __cdecl _ZGTtNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(struct _Unwind_Exception **); +void __cdecl __noreturn _ZGTtNSt13runtime_errorD0Ev(int); +int _ZGTtNSt13runtime_errorD2Ev(); +void __cdecl _ZGTtNSt14overflow_errorC2EPKc(struct _Unwind_Exception **); +void __cdecl _ZGTtNSt14overflow_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(struct _Unwind_Exception **); +void __cdecl __noreturn _ZGTtNSt14overflow_errorD0Ev(int); +int _ZGTtNSt14overflow_errorD2Ev(); +void __cdecl _ZGTtNSt15underflow_errorC2EPKc(struct _Unwind_Exception **); +void __cdecl _ZGTtNSt15underflow_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(struct _Unwind_Exception **); +void __cdecl __noreturn _ZGTtNSt15underflow_errorD0Ev(int); +int _ZGTtNSt15underflow_errorD2Ev(); +void __cdecl _ZGTtNSt16invalid_argumentC2EPKc(struct _Unwind_Exception **); +void __cdecl _ZGTtNSt16invalid_argumentC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(struct _Unwind_Exception **); +void __cdecl __noreturn _ZGTtNSt16invalid_argumentD0Ev(int); +int _ZGTtNSt16invalid_argumentD2Ev(); +// int __usercall get_adjusted_ptr@(int@, int@, int **@); +// char *__usercall parse_lsda_header@(int@, char *@, int@); +// int __usercall check_exception_spec@(int@, int@, int *@, int); +// int __usercall base_of_encoded_value@(char@); +void __cdecl __gxx_exception_cleanup(_Unwind_Reason_Code, void (**)(void)); +// char *__usercall read_encoded_value_with_base@(char a1@, char *a2@, char *a3@, int *a4); +void __cdecl __noreturn __cxxabiv1::__terminate(void (*)(void)); // idb +void __cdecl __noreturn __cxxabiv1::__unexpected(void (*)(void)); // idb +void __fastcall __cxxabiv1::__forced_unwind::~__forced_unwind(void *Block); +void __fastcall __cxxabiv1::__class_type_info::~__class_type_info(_DWORD *); +void __cdecl __cxxabiv1::__class_type_info::~__class_type_info(__cxxabiv1::__class_type_info *__hidden this); // idb +void __fastcall __cxxabiv1::__foreign_exception::~__foreign_exception(void *Block); +void __fastcall __cxxabiv1::__si_class_type_info::~__si_class_type_info(_DWORD *); +void __cdecl __cxxabiv1::__si_class_type_info::~__si_class_type_info(__cxxabiv1::__si_class_type_info *__hidden this); // idb +void __fastcall __cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info(_DWORD *); +_DWORD *__cdecl `anonymous namespace'::get_locale_mutex(); +void __fastcall `anonymous namespace'::io_error_category::~io_error_category(_DWORD *); +void __fastcall `anonymous namespace'::system_error_category::~system_error_category(void *Block); +void __fastcall `anonymous namespace'::generic_error_category::~generic_error_category(void *Block); +// void __usercall `anonymous namespace'::pool::free(int@); +// void __usercall `anonymous namespace'::pool::allocate(int a1@); +HANDLE `anonymous namespace'::init(); +int __stdcall zcc::shared_ptr::shared_ptr(void *Block); // idb +int __stdcall zcc::shared_ptr::shared_ptr(void *Block); // idb +void __thiscall zcc::shared_ptr::shared_ptr(_DWORD *this, int); +void __thiscall zcc::shared_ptr::shared_ptr(_DWORD *this, int); +void __thiscall zcc::shared_ptr::shared_ptr(_DWORD *this, int); +int __stdcall zcc::shared_ptr::shared_ptr(void *Block); // idb +void __fastcall WXSS::CSSTreeLib::NonTerminal::~NonTerminal(void *); +char __stdcall WXSS::CSSTreeLib::MarkHostRule::MarkGood(WXSS::CSSTreeLib::MarkHostRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::MarkHostRule::~MarkHostRule(void *); +bool __stdcall WXSS::CSSTreeLib::AttrDebugRule::MarkGood(WXSS::CSSTreeLib::AttrDebugRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::AttrDebugRule::~AttrDebugRule(void *); +// char __userpurge WXSS::CSSTreeLib::BlackListRule::MarkGood@(int@, WXSS::CSSTreeLib::BlackListRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::BlackListRule::~BlackListRule(void *); +void __fastcall WXSS::CSSTreeLib::BlackListRule::~BlackListRule(int); +void __thiscall WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode(int this, WXSS::Token *, unsigned __int8); +void __thiscall WXSS::CSSTreeLib::CSSSyntaxTree::GetHostRule(int this, WXSS::Token *); +unsigned int __thiscall WXSS::CSSTreeLib::CSSSyntaxTree::Print2Stream(int this, int, int); +int __fastcall WXSS::CSSTreeLib::CSSSyntaxTree::CSSSyntaxTree(int); +int __fastcall WXSS::CSSTreeLib::CSSSyntaxTree::CSSSyntaxTree(int); +void __stdcall WXSS::CSSTreeLib::RuleDebugRule::InsertOriginSelectorInfo(int *a1, unsigned int *a2, int a3); +bool __stdcall WXSS::CSSTreeLib::RuleDebugRule::MarkGood(WXSS::CSSTreeLib::RuleDebugRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::RuleDebugRule::~RuleDebugRule(void *); +int *WXSS::CSSTreeLib::LexicalChecker::GetInstance(); +int *WXSS::CSSTreeLib::LexicalChecker::GetInstance(); +// void __userpurge WXSS::CSSTreeLib::LexicalChecker::Init(int@, WXSS::CSSTreeLib::LexicalChecker *this, bool); +char __stdcall WXSS::CSSTreeLib::ReWriteRpxRule::MarkGood(WXSS::CSSTreeLib::ReWriteRpxRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::ReWriteRpxRule::~ReWriteRpxRule(void *); +char __stdcall WXSS::CSSTreeLib::MarkSelectorRule::MarkGood(WXSS::CSSTreeLib::MarkSelectorRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::MarkSelectorRule::~MarkSelectorRule(void *); +char __stdcall WXSS::CSSTreeLib::RewriteImgUrlRule::MarkGood(WXSS::CSSTreeLib::RewriteImgUrlRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::RewriteImgUrlRule::~RewriteImgUrlRule(void *); +char __stdcall WXSS::CSSTreeLib::RewriteSelectorRule::MarkGood(WXSS::CSSTreeLib::RewriteSelectorRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::RewriteSelectorRule::~RewriteSelectorRule(void *); +void __fastcall WXSS::CSSTreeLib::EPS::~EPS(void *); +int __fastcall WXSS::CSSTreeLib::Action::Action(int); +void __fastcall WXSS::CSSTreeLib::Action::~Action(void **); +void __fastcall WXSS::CSSTreeLib::Action::~Action(void **); +void __thiscall WXSS::CSSTreeLib::Action::~Action(void **ecx0, WXSS::CSSTreeLib::Action *this); +_DWORD WXSS::CSSTreeLib::Parser::Parser(WXSS::CSSTreeLib::Parser *__hidden this); // idb +void __fastcall WXSS::CSSTreeLib::Parser::~Parser(int); +// char __userpurge WXSS::CSSTreeLib::AndRules::MarkGood@(int@, WXSS::CSSTreeLib::AndRules *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::AndRules::~AndRules(void *); +void __fastcall WXSS::CSSTreeLib::AndRules::~AndRules(int); +int __fastcall WXSS::CSSTreeLib::Terminal::Terminal(int); +void __fastcall WXSS::CSSTreeLib::Terminal::~Terminal(void **); +void __fastcall WXSS::CSSTreeLib::Terminal::~Terminal(void **); +void __thiscall WXSS::CSSTreeLib::Terminal::~Terminal(void **ecx0, WXSS::CSSTreeLib::Terminal *this); +void __thiscall WXSS::CSSTreeLib::Terminal::~Terminal(void **ecx0, WXSS::CSSTreeLib::Terminal *this); +char __stdcall WXSS::CSSTreeLib::TrueRule::MarkGood(WXSS::CSSTreeLib::TrueRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::TrueRule::~TrueRule(void *); +// char __userpurge WXSS::CSSTreeLib::ChildRule::MarkGood@(int@, WXSS::CSSTreeLib::ChildRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::ChildRule::~ChildRule(_DWORD *); +void __fastcall WXSS::CSSTreeLib::ChildRule::~ChildRule(_DWORD *); +int __stdcall WXSS::CSSTreeLib::FalseRule::MarkGood(WXSS::CSSTreeLib::FalseRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::FalseRule::~FalseRule(void *); +// int __userpurge WXSS::CSSTreeLib::RuleChain::MarkGood@(int@, WXSS::CSSTreeLib::RuleChain *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::RuleChain::~RuleChain(void *); +void __fastcall WXSS::CSSTreeLib::RuleChain::~RuleChain(int); +// char __userpurge WXSS::CSSTreeLib::SPNotRule::MarkGood@(int@, WXSS::CSSTreeLib::SPNotRule *this, WXSS::CSSTreeLib::CSSSyntaxTree *); +void __fastcall WXSS::CSSTreeLib::SPNotRule::~SPNotRule(void *); +void __fastcall WXSS::CSSTreeLib::SPNotRule::~SPNotRule(int); +_DWORD *__thiscall WXSS::Token::operator=(_DWORD *this, int); +int __thiscall WXSS::Tokenizer::SubStrCheckingClause::SubStrCheckingClause(char *this, int, char *Source, int); +void __fastcall WXSS::XCompiler::~XCompiler(int); +void __fastcall __gnu_cxx::__scoped_lock::~__scoped_lock(int *); +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, FILE *, int, int); +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, int FileHandle, int, int); +void __fastcall __gnu_cxx::stdio_filebuf::stdio_filebuf(_DWORD *); +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, FILE *, int, int); +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, int FileHandle, int, int); +void __fastcall __gnu_cxx::stdio_filebuf::stdio_filebuf(_DWORD *); +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *); +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *); +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *); +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, FILE *, int, int); +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, int FileHandle, int, int); +void __fastcall __gnu_cxx::stdio_filebuf::stdio_filebuf(_DWORD *); +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, FILE *, int, int); +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, int FileHandle, int, int); +void __fastcall __gnu_cxx::stdio_filebuf::stdio_filebuf(_DWORD *); +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *); +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *); +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *); +int __cdecl __gnu_cxx::__concat_size_t(char *, unsigned int, unsigned int); +int __cdecl __gnu_cxx::__snprintf_lite(char *, unsigned int, const char *, char *); +int __thiscall __gnu_cxx::stdio_sync_filebuf::swap(int this, int); +int __fastcall __gnu_cxx::stdio_sync_filebuf::sync(int); +int __fastcall __gnu_cxx::stdio_sync_filebuf::uflow(int); +int __thiscall __gnu_cxx::stdio_sync_filebuf::xsgetn(int this, char *Buffer, size_t ElementCount); +size_t __thiscall __gnu_cxx::stdio_sync_filebuf::xsputn(FILE **this, void *Buffer, size_t ElementCount); +_DWORD *__thiscall __gnu_cxx::stdio_sync_filebuf::seekoff(_DWORD *this, int, fpos_t, int, int); +_DWORD *__thiscall __gnu_cxx::stdio_sync_filebuf::seekpos(_DWORD *this, FILE **, fpos_t, int, int, int); +int __thiscall __gnu_cxx::stdio_sync_filebuf::overflow(FILE **this, int Character); +int __thiscall __gnu_cxx::stdio_sync_filebuf::pbackfail(int this, int); +int __fastcall __gnu_cxx::stdio_sync_filebuf::underflow(int); +void __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, std::locale *); +int __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, int); +void __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, std::locale *); +int __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, int); +void __fastcall __gnu_cxx::stdio_sync_filebuf::~stdio_sync_filebuf(char *Block); +int __thiscall __gnu_cxx::stdio_sync_filebuf::operator=(int this, int); +int __thiscall __gnu_cxx::stdio_sync_filebuf::swap(int this, int); +int __fastcall __gnu_cxx::stdio_sync_filebuf::sync(int); +wint_t __fastcall __gnu_cxx::stdio_sync_filebuf::uflow(int); +int __thiscall __gnu_cxx::stdio_sync_filebuf::xsgetn(int this, int, int); +int __thiscall __gnu_cxx::stdio_sync_filebuf::xsputn(FILE **this, int, int); +_DWORD *__thiscall __gnu_cxx::stdio_sync_filebuf::seekoff(_DWORD *this, int, fpos_t, int, int); +_DWORD *__thiscall __gnu_cxx::stdio_sync_filebuf::seekpos(_DWORD *this, FILE **, fpos_t, int, int, int); +__int16 __thiscall __gnu_cxx::stdio_sync_filebuf::overflow(FILE **this, wchar_t Character); +int __thiscall __gnu_cxx::stdio_sync_filebuf::pbackfail(int this, wint_t Character); +wint_t __fastcall __gnu_cxx::stdio_sync_filebuf::underflow(int); +void __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(int this, std::locale *); +int __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, int); +void __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(int this, std::locale *); +int __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, int); +void __fastcall __gnu_cxx::stdio_sync_filebuf::~stdio_sync_filebuf(char *Block); +int __thiscall __gnu_cxx::stdio_sync_filebuf::operator=(int this, int); +void __fastcall __gnu_cxx::recursive_init_error::recursive_init_error(_DWORD *); +void __fastcall __gnu_cxx::recursive_init_error::~recursive_init_error(_DWORD *); +void __cdecl __gnu_cxx::recursive_init_error::~recursive_init_error(std::exception *); +void __fastcall __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error(_DWORD *); +void __cdecl __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error(std::exception *); +void __fastcall __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error(_DWORD *); +void __cdecl __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error(std::exception *); +void __cdecl __noreturn __gnu_cxx::__throw_insufficient_space(const char *Src, const char *); // idb +void __noreturn __gnu_cxx::__verbose_terminate_handler(void); // idb +void __noreturn __gnu_cxx::__throw_concurrence_lock_error(void); // idb +void __noreturn __gnu_cxx::__throw_concurrence_unlock_error(void); // idb +void __gnu_cxx::__freeres(void); +// char __userpurge __cxxabiv1::__class_type_info::__do_catch@(_DWORD *@, __cxxabiv1::__class_type_info *this, const std::type_info *, void **, unsigned int); +bool __thiscall __cxxabiv1::__class_type_info::__do_upcast(_DWORD *this, int, int, _DWORD *); +// int __userpurge __cxxabiv1::__class_type_info::__do_upcast@(int *@, __cxxabiv1::__class_type_info *this, const __class_type_info *, void **); +int __thiscall __cxxabiv1::__class_type_info::__do_dyncast(_DWORD *this, int, int, int, int, int, int, _DWORD *); +char __thiscall __cxxabiv1::__si_class_type_info::__do_upcast(int this, int, int, _DWORD *); +int __thiscall __cxxabiv1::__si_class_type_info::__do_dyncast(_DWORD *this, int, int, int, int, int, int, _DWORD *); +// int __userpurge __cxxabiv1::__si_class_type_info::__do_find_public_src@(int@, __cxxabiv1::__si_class_type_info *this, const __cxxabiv1::__class_type_info *, const void *, const __cxxabiv1::__class_type_info *, const void *); +int __thiscall __cxxabiv1::__vmi_class_type_info::__do_upcast(_DWORD *this, int, _DWORD *, _DWORD *); +int __thiscall __cxxabiv1::__vmi_class_type_info::__do_dyncast(_DWORD *this, int a2, int a3, int a4, char *a5, int a6, char *a7, int *a8); +// int __userpurge __cxxabiv1::__vmi_class_type_info::__do_find_public_src@(_DWORD *@, __cxxabiv1::__vmi_class_type_info *this, const __cxxabiv1::__class_type_info *, const void *, const __cxxabiv1::__class_type_info *, const void *); +int __thiscall `anonymous namespace'::io_error_category::message[abi:cxx11](int this, int, int); +_DWORD *__thiscall `anonymous namespace'::system_error_category::message[abi:cxx11](_DWORD *this, int, int ErrorMessage); +const char *__fastcall WXSS::Token::GetLiteral(_DWORD *); +int __thiscall std::wstring::_M_disjunct(unsigned int *this, unsigned int); +int __thiscall std::wstring::find_last_of(_DWORD *this, wchar_t *String, int); +int __thiscall std::wstring::find_last_of(_DWORD *this, _WORD *, unsigned int, int); +int __thiscall std::wstring::find_last_of(_DWORD *this, _WORD **, unsigned int); +int __thiscall std::wstring::find_last_of(_DWORD *this, __int16, unsigned int); +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, wchar_t *String, int a3); +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, _WORD *a2, unsigned int a3, int a4); +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, _WORD **a2, unsigned int a3); +unsigned int __thiscall std::wstring::_M_check_length(_DWORD *this, int, unsigned int, std::length_error *); +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, wchar_t *String, int a3); +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, _WORD *a2, unsigned int a3, int a4); +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, _WORD **a2, unsigned int a3); +int __thiscall std::wstring::find_last_not_of(_DWORD *this, __int16, unsigned int); +int __thiscall std::wstring::find_first_not_of(int *this, wchar_t *String, unsigned int); +int __thiscall std::wstring::find_first_not_of(int *this, _WORD *, unsigned int, int); +int __thiscall std::wstring::find_first_not_of(_DWORD *this, _DWORD *, unsigned int); +int __thiscall std::wstring::find_first_not_of(int *this, __int16, unsigned int); +int __thiscall std::wstring::at(int *this, unsigned int); +int __thiscall std::wstring::copy(int *this, _WORD *, unsigned int, unsigned int); +unsigned int __thiscall std::wstring::find(int *this, wchar_t *String, int a3); +unsigned int __thiscall std::wstring::find(int *this, _WORD *a2, unsigned int a3, unsigned int a4); +unsigned int __thiscall std::wstring::find(int *this, _WORD **a2, unsigned int a3); +int __thiscall std::wstring::find(int *this, __int16, unsigned int); +int __thiscall std::wstring::rfind(_DWORD *this, wchar_t *String, int); +int __thiscall std::wstring::rfind(_DWORD *this, _WORD *, unsigned int, unsigned int); +int __thiscall std::wstring::rfind(_DWORD *this, _WORD **, unsigned int); +int __thiscall std::wstring::rfind(_DWORD *this, __int16, unsigned int); +_DWORD *__thiscall std::wstring::substr(_DWORD *this, _DWORD *, unsigned int, unsigned int); +int __thiscall std::wstring::compare(wchar_t **this, wchar_t *String); +int __thiscall std::wstring::compare(_DWORD *this, _WORD **); +int __thiscall std::wstring::compare(_DWORD *this, unsigned int, unsigned int, wchar_t *String); +int __thiscall std::wstring::compare(int *this, unsigned int, unsigned int, _WORD *, unsigned int); +int __thiscall std::wstring::compare(int *this, unsigned int, unsigned int, _WORD **); +int __thiscall std::wstring::compare(int *this, unsigned int, unsigned int, _DWORD *, unsigned int, unsigned int); +unsigned int __thiscall std::wstring::_M_check(_DWORD *this, unsigned int, const char *); +// int __userpurge std::string::_M_disjunct@(_DWORD *@, std::string *this, const char *); +// const char *__userpurge std::string::find_last_of@(int *a1@, std::string *this, char *a3, unsigned int a4); +// const char *__userpurge std::string::find_last_of@(int *a1@, std::string *this, const char *a3, size_t MaxCount, unsigned int a5); +// const char *__userpurge std::string::find_last_of@(int *a1@, std::string **this, const std::string *a3, unsigned int a4); +// int __userpurge std::string::find_last_of@(_DWORD *@, std::string *this, unsigned int, unsigned int); +// int __userpurge std::string::find_first_of@(int *@, std::string *this, const char *, unsigned int); +// int __userpurge std::string::find_first_of@(int *@, std::string *this, const char *, size_t MaxCount, unsigned int); +// int __userpurge std::string::find_first_of@(int *@, std::string *this, const std::string *, unsigned int); +// char *__userpurge std::string::find_first_of@(int *@, std::string *this, unsigned int, unsigned int); +// char *__userpurge std::string::_M_check_length@(_DWORD *@, std::string *this, unsigned int, std::length_error *, const char *); +// int __userpurge std::string::find_last_not_of@(int *@, std::string *this, const char *, unsigned int); +// int __userpurge std::string::find_last_not_of@(int *@, std::string *this, const char *, size_t MaxCount, unsigned int); +// int __userpurge std::string::find_last_not_of@(int *@, std::string *this, const std::string *, unsigned int); +// int __userpurge std::string::find_last_not_of@(_DWORD *@, std::string *this, unsigned int, unsigned int); +// int __userpurge std::string::find_first_not_of@(int *@, std::string *this, const char *, unsigned int); +// int __userpurge std::string::find_first_not_of@(int *@, std::string *this, const char *, size_t MaxCount, unsigned int); +// int __userpurge std::string::find_first_not_of@(int *@, std::string *this, const std::string *, unsigned int); +// int __userpurge std::string::find_first_not_of@(int *@, std::string *this, unsigned int, unsigned int); +// char *__userpurge std::string::at@(int *@, std::string *this, unsigned int); +// size_t __userpurge std::string::copy@(_DWORD *a1@, std::string *this, size_t a3, unsigned int a4, unsigned int a5); +// int __userpurge std::string::find@(int *@, std::string *this, char *, unsigned int); +// int __userpurge std::string::find@(int *@, std::string *this, const char *, size_t Size, unsigned int); +// int __userpurge std::string::find@(int *@, std::string **this, const std::string *, unsigned int); +// char *__userpurge std::string::find@(int *@, std::string *this, unsigned int, unsigned int); +// int __userpurge std::string::rfind@(int *@, std::string *this, char *, unsigned int); +// int __userpurge std::string::rfind@(int *@, std::string *this, const char *, size_t Size, unsigned int); +// int __userpurge std::string::rfind@(int *@, std::string *this, const std::string *, unsigned int); +// int __userpurge std::string::rfind@(_DWORD *@, std::string *this, unsigned int, unsigned int); +int *__thiscall std::string::substr(int *ecx0, std::string *this, unsigned int, unsigned int); +// int __userpurge std::string::compare@(const void **@, std::string *this, const char *); +// int __userpurge std::string::compare@(const void **@, const void **this, const std::string *); +// int __userpurge std::string::compare@(int *@, std::string *this, unsigned int, char *Str, const char *); +// int __userpurge std::string::compare@(int *@, std::string *this, size_t, void *Buf2, const char *, unsigned int); +// int __userpurge std::string::compare@(int *@, std::string *this, unsigned int, const void **, const std::string *); +// int __userpurge std::string::compare@(_DWORD *@, std::string *this, unsigned int, _DWORD *, const std::string *, unsigned int, unsigned int); +// std::string *__userpurge std::string::_M_check@(_DWORD *@, std::string *this, const char *, const char *); +int __fastcall std::error_code::default_error_condition(int); +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int); +int __fastcall std::moneypunct::do_neg_format(int); +int __fastcall std::moneypunct::do_pos_format(int); +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int); +int __fastcall std::moneypunct::do_frac_digits(int); +int __fastcall std::moneypunct::do_decimal_point(int); +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int); +int __fastcall std::moneypunct::do_thousands_sep(int); +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int); +int __fastcall std::moneypunct::do_neg_format(int); +int __fastcall std::moneypunct::do_pos_format(int); +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int); +int __fastcall std::moneypunct::do_frac_digits(int); +int __fastcall std::moneypunct::do_decimal_point(int); +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int); +int __fastcall std::moneypunct::do_thousands_sep(int); +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int); +int __fastcall std::moneypunct::do_neg_format(int); +int __fastcall std::moneypunct::do_pos_format(int); +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int); +int __fastcall std::moneypunct::do_frac_digits(int); +int __fastcall std::moneypunct::do_decimal_point(int); +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int); +int __fastcall std::moneypunct::do_thousands_sep(int); +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int); +int __fastcall std::moneypunct::do_neg_format(int); +int __fastcall std::moneypunct::do_pos_format(int); +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int); +int __fastcall std::moneypunct::do_frac_digits(int); +int __fastcall std::moneypunct::do_decimal_point(int); +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int); +int __fastcall std::moneypunct::do_thousands_sep(int); +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *); +void __thiscall std::__timepunct::_M_put(const char **this, char *Buffer, size_t SizeInBytes, char *Format, struct tm *Tm); +void __thiscall std::__timepunct::_M_put(const char **this, wchar_t *Buffer, size_t SizeInWords, wchar_t *Format, struct tm *Tm); +struct _Unwind_Exception *__stdcall std::__use_cache>::operator()(int *); +struct _Unwind_Exception *__stdcall std::__use_cache>::operator()(int *); +int __fastcall std::runtime_error::what(int); +bool __fastcall std::__basic_file::is_open(_DWORD *); +int __thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_compare(int *this, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_compare(int *this, int, int, int, int); +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_transform(_DWORD *this, int, int, int); +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_transform(_DWORD *this, int, std::string *, int); +int __thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_compare(int *this, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_compare(int *this, int, int, int, int); +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_transform(_DWORD *this, int, int, int); +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_transform(_DWORD *this, int, int, int); +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_get(_DWORD *this, int, std::string *, int, int, int); +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_get(_DWORD *this, int, int, int, int, _BYTE **); +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_open(int *this, int, int); +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_open(int *this, _BYTE **, int); +int __thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_close(int *this, int); +int __thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_close(int *this, int); +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_get(_DWORD *this, int, int, int, int, int); +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_get(_DWORD *this, int, int, int, int, _WORD **); +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_open(int *this, int, int); +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_open(int *this, _BYTE **, int); +int __thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_close(int *this, int); +int __thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_close(int *this, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_date(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_date(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_time(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_time(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_year(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_year(int *this, int, int, int, int, int, int, int); +int __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::do_date_order(int); +int __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::do_date_order(int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_weekday(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_weekday(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_monthname(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_monthname(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_date(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_date(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_time(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_time(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_year(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_year(int *this, int, int, int, int, int, int, int); +int __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::do_date_order(int); +int __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::do_date_order(int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_weekday(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_weekday(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_monthname(int *this, int, int, int, int, int, int, int); +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_monthname(int *this, int, int, int, int, int, int, int); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get(int *this, __int64, int, int, unsigned __int8, int, int *, void **); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get(_DWORD *this, __int64, int, int, unsigned __int8, int, _DWORD *, int *); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get(_DWORD *this, __int64, int, int, unsigned __int8, int, _DWORD *, long double *); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get(_DWORD *this, __int64, int, int, unsigned __int8, int, int *, long double *); +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get(_DWORD *this, int, int, int, int, unsigned __int8, int, _DWORD *, int); +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get(_DWORD *this, int, int, int, int, unsigned __int8, int, _DWORD *, int *); +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get(_DWORD *this, int, int, int, int, unsigned __int8, int, _DWORD *, long double *); +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get(_DWORD *this, int, int, int, int, unsigned __int8, int, _DWORD *, long double *); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put(int *this, int, int, unsigned __int8, int, char, int); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put(int *this, int, int, unsigned __int8, int, char, std::string *); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put(int *this, int, int, unsigned __int8, int, char, long double); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put(int *this, int, int, unsigned __int8, int, char, long double); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put(int *this, int, int, unsigned __int8, int, unsigned __int16, int); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put(int *this, int, int, unsigned __int8, int, unsigned __int16, _DWORD *); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put(int *this, int, int, unsigned __int8, int, __int16, long double); +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put(int *this, int, int, unsigned __int8, int, __int16, long double); +volatile signed __int32 **__thiscall std::streambuf::getloc(volatile signed __int32 **this, int); +volatile signed __int32 **__thiscall std::wstreambuf::getloc(volatile signed __int32 **this, int); +int __thiscall std::__codecvt_utf8_base::do_in(int this, int a2, unsigned __int8 *a3, unsigned __int8 *a4, unsigned __int8 **a5, int a6, int a7, _DWORD *a8); +int __thiscall std::__codecvt_utf8_base::do_out(int this, int, unsigned int *, unsigned int *, unsigned int **, _BYTE *, _BYTE *, _DWORD *); +unsigned __int8 *__thiscall std::__codecvt_utf8_base::do_length(int this, int, unsigned __int8 *, unsigned __int8 *, int); +int __thiscall std::__codecvt_utf8_base::do_in(_DWORD *this, int, unsigned __int8 *, unsigned __int8 *, unsigned __int8 **, char *, char *, char **); +int __thiscall std::__codecvt_utf8_base::do_out(int this, int, unsigned __int16 *, unsigned __int16 *, unsigned __int16 **, _BYTE *, _BYTE *, _DWORD *); +unsigned __int8 *__thiscall std::__codecvt_utf8_base::do_length(int this, int, unsigned __int8 *, unsigned __int8 *, int); +int __thiscall std::__codecvt_utf8_base::do_in(_DWORD *this, int, unsigned __int8 *, unsigned __int8 *, unsigned __int8 **, char *, char *, char **); +int __thiscall std::__codecvt_utf8_base::do_out(int this, int, unsigned __int16 *, unsigned __int16 *, unsigned __int16 **, _BYTE *, _BYTE *, _DWORD *); +unsigned __int8 *__thiscall std::__codecvt_utf8_base::do_length(int this, int, unsigned __int8 *, unsigned __int8 *, int); +// char __userpurge std::__iosfail_type_info::__do_upcast@(int *@, std::__iosfail_type_info *this, const __cxxabiv1::__class_type_info *, void **); +bool __thiscall std::istreambuf_iterator::equal(_DWORD *this, int); +unsigned int __fastcall std::istreambuf_iterator::_M_get(int a1); +bool __thiscall std::istreambuf_iterator::equal(_WORD *this, int); +int __fastcall std::istreambuf_iterator::_M_get(int); +unsigned int __thiscall std::__codecvt_utf16_base::do_in(_DWORD *this, int a2, char *a3, char *a4, int *a5, int a6, int a7, _DWORD *a8); +int __thiscall std::__codecvt_utf16_base::do_out(_DWORD *this, int, unsigned int *, unsigned int *, unsigned int **, _WORD *, int, _DWORD *); +char *__thiscall std::__codecvt_utf16_base::do_length(_DWORD *this, int a2, char *a3, int a4, int a5); +int __thiscall std::__codecvt_utf16_base::do_in(unsigned int *this, int, unsigned __int16 *, unsigned __int16 *, unsigned __int16 **, int, int, int *); +int __thiscall std::__codecvt_utf16_base::do_out(_DWORD *this, int, unsigned __int16 *, unsigned __int16 *, unsigned __int16 **, _WORD *, int, int *); +char *__thiscall std::__codecvt_utf16_base::do_length(_DWORD *this, int a2, unsigned __int16 *a3, int a4, int a5); +int __thiscall std::__codecvt_utf16_base::do_in(unsigned int *this, int, unsigned __int16 *, unsigned __int16 *, unsigned __int16 **, int, int, int *); +int __thiscall std::__codecvt_utf16_base::do_out(_DWORD *this, int, unsigned __int16 *, unsigned __int16 *, unsigned __int16 **, _WORD *, int, int *); +char *__thiscall std::__codecvt_utf16_base::do_length(_DWORD *this, int a2, unsigned __int16 *a3, int a4, int a5); +int __thiscall std::__codecvt_utf8_utf16_base::do_in(int this, int a2, unsigned __int8 *a3, unsigned __int8 *a4, unsigned __int8 **a5, char *a6, char *a7, char **a8); +int __thiscall std::__codecvt_utf8_utf16_base::do_out(int this, int a2, char *a3, char *a4, unsigned int **a5, _BYTE *a6, _BYTE *a7, _DWORD *a8); +unsigned __int8 *__thiscall std::__codecvt_utf8_utf16_base::do_length(unsigned int *this, int, unsigned __int8 *, unsigned __int8 *, unsigned int); +int __thiscall std::__codecvt_utf8_utf16_base::do_in(_DWORD *this, int, unsigned __int8 *, unsigned __int8 *, unsigned __int8 **, char *, char *, char **); +int __thiscall std::__codecvt_utf8_utf16_base::do_out(int this, int, unsigned __int16 *, unsigned __int16 *, unsigned __int16 **, _BYTE *, _BYTE *, _DWORD *); +unsigned __int8 *__thiscall std::__codecvt_utf8_utf16_base::do_length(unsigned int *this, int, unsigned __int8 *, unsigned __int8 *, unsigned int); +int __thiscall std::__codecvt_utf8_utf16_base::do_in(int this, int, unsigned __int8 *, unsigned __int8 *, unsigned __int8 **, char *, char *, char **); +int __thiscall std::__codecvt_utf8_utf16_base::do_out(int this, int a2, char *a3, char *a4, unsigned __int16 **a5, _BYTE *a6, _BYTE *a7, _DWORD *a8); +unsigned __int8 *__thiscall std::__codecvt_utf8_utf16_base::do_length(unsigned int *this, int, unsigned __int8 *, unsigned __int8 *, unsigned int); +_DWORD *__thiscall std::_V2::error_category::_M_message[abi:cxx11](_DWORD *this, int, int); +void *__thiscall std::_V2::error_category::_M_message(void *ecx0, std::_V2::error_category *this, int); +int __thiscall std::_V2::error_category::equivalent(void *this, int, _DWORD *); +BOOL __thiscall std::map>::count(_DWORD *this, int); +unsigned __int8 *__thiscall std::ctype::do_tolower(_DWORD *this, unsigned __int8 *, unsigned __int8 *); +int __thiscall std::ctype::do_tolower(_DWORD *this, int); +unsigned __int8 *__thiscall std::ctype::do_toupper(_DWORD *this, unsigned __int8 *, unsigned __int8 *); +int __thiscall std::ctype::do_toupper(_DWORD *this, int); +int __fastcall std::ctype::_M_widen_init(int); +int __fastcall std::ctype::_M_narrow_init(int); +_BYTE *__thiscall std::ctype::widen(_BYTE *this, _BYTE *Src, _BYTE *, void *); +int __thiscall std::ctype::narrow(_BYTE *this, int, int); +_BYTE *__stdcall std::ctype::do_widen(_BYTE *Src, _BYTE *, void *); +int __stdcall std::ctype::do_widen(unsigned __int8); +_BYTE *__stdcall std::ctype::do_narrow(_BYTE *Src, _BYTE *, int, void *); +int __stdcall std::ctype::do_narrow(unsigned __int8, int); +wint_t *__thiscall std::ctype::do_scan_is(_WORD *this, unsigned __int16, wint_t *, unsigned int); +unsigned int __stdcall std::ctype::do_tolower(wint_t *, unsigned int); +wint_t __stdcall std::ctype::do_tolower(wint_t C); +unsigned int __stdcall std::ctype::do_toupper(wint_t *, unsigned int); +wint_t __stdcall std::ctype::do_toupper(wint_t C); +wint_t *__thiscall std::ctype::do_scan_not(_WORD *this, unsigned __int16, wint_t *, unsigned int); +int __stdcall std::ctype::_M_convert_to_wmask(unsigned __int16); +unsigned int __thiscall std::ctype::do_is(char *this, wint_t *, unsigned int, _WORD *); +int __thiscall std::ctype::do_is(_WORD *this, unsigned __int16, wint_t C); +unsigned __int8 *__thiscall std::ctype::do_widen(_WORD *this, unsigned __int8 *, unsigned __int8 *, int); +unsigned int __thiscall std::ctype::do_narrow(_BYTE *this, wint_t *, unsigned int, char, int); +int __thiscall std::ctype::do_narrow(_BYTE *this, wint_t WCh, int); +int __fastcall std::locale::id::_M_id(volatile signed __int32 *); +int *__thiscall std::locale::name[abi:cxx11](int *this, int a2); +int *__thiscall std::locale::name(int *ecx0, std::locale *this); +// _DWORD *__userpurge std::locale::facet::_M_cow_shim@(volatile signed __int32 *@, std::locale::facet *this, const std::locale::id *); +// _DWORD *__userpurge std::locale::facet::_M_sso_shim@(volatile signed __int32 *@, std::locale::facet *this, const std::locale::id *); +BOOL __thiscall std::locale::operator==(void *this, int); +unsigned int __thiscall std::vector::_M_check_len(_DWORD *this, unsigned int, std::length_error *); +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int); +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *); +int __thiscall std::string::_M_disjunct(unsigned int *this, unsigned int); +unsigned int __thiscall std::string::find_last_of(int *this, char *Str, unsigned int); +unsigned int __thiscall std::string::find_last_of(int *this, void *Buf, unsigned int, size_t MaxCount); +unsigned int __thiscall std::string::find_last_of(int *this, int a2, unsigned int a3); +int __thiscall std::string::find_last_of(int *this, char, unsigned int); +unsigned int __thiscall std::string::find_first_of(_DWORD *this, char *Str, unsigned int); +unsigned int __thiscall std::string::find_first_of(_DWORD *this, void *Buf, unsigned int, size_t MaxCount); +int __thiscall std::string::find_first_of(_DWORD *this, int, unsigned int); +char *__thiscall std::string::find_first_of(int *this, char, unsigned int); +unsigned int __thiscall std::string::_M_check_length(_DWORD *this, int, unsigned int, std::length_error *); +int __thiscall std::string::find_last_not_of(int *this, char *Str, unsigned int); +int __thiscall std::string::find_last_not_of(int *this, void *Buf, unsigned int, size_t MaxCount); +int __thiscall std::string::find_last_not_of(int *this, int, unsigned int); +int __thiscall std::string::find_last_not_of(int *this, char, unsigned int); +unsigned int __thiscall std::string::find_first_not_of(int *this, char *Str, unsigned int); +unsigned int __thiscall std::string::find_first_not_of(int *this, void *Buf, unsigned int, size_t MaxCount); +unsigned int __thiscall std::string::find_first_not_of(int *this, int a2, unsigned int a3); +int __thiscall std::string::find_first_not_of(_DWORD *this, char, unsigned int); +unsigned int __thiscall std::string::at(_DWORD *this, unsigned int); +size_t __thiscall std::string::copy(_DWORD *this, _BYTE *, size_t, unsigned int); +unsigned int __thiscall std::string::find(int *this, char *Str, int); +unsigned int __thiscall std::string::find(int *this, char *Buf2, unsigned int, size_t Size); +unsigned int __thiscall std::string::find(int *this, int, int); +char *__thiscall std::string::find(int *this, char, unsigned int); +int __thiscall std::string::rfind(int *this, char *Str, int); +int __thiscall std::string::rfind(int *this, void *Buf2, unsigned int, size_t Size); +int __thiscall std::string::rfind(int *this, int, unsigned int); +int __thiscall std::string::rfind(int *this, char, unsigned int); +_DWORD *__thiscall std::string::substr(_DWORD *this, _DWORD *, unsigned int, unsigned int); +int __thiscall std::string::compare(int this, char *Str); +int __thiscall std::string::compare(int this, int); +int __thiscall std::string::compare(_DWORD *this, unsigned int, unsigned int, char *Str); +int __thiscall std::string::compare(_DWORD *this, unsigned int, size_t, void *Buf2, unsigned int); +int __thiscall std::string::compare(_DWORD *this, unsigned int, size_t, int); +int __thiscall std::string::compare(_DWORD *this, unsigned int, size_t, _DWORD *, unsigned int, size_t); +unsigned int __thiscall std::string::_M_check(_DWORD *this, unsigned int, const char *); +bool __thiscall std::wstring::_M_disjunct(unsigned int *this, unsigned int); +int __thiscall std::wstring::find_last_of(_DWORD *this, wchar_t *String, int); +int __thiscall std::wstring::find_last_of(_DWORD *this, _WORD *, unsigned int, int); +int __thiscall std::wstring::find_last_of(_DWORD *this, int, unsigned int); +int __thiscall std::wstring::find_last_of(int *this, __int16, unsigned int); +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, wchar_t *String, int a3); +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, _WORD *a2, unsigned int a3, int a4); +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, int a2, unsigned int a3); +unsigned int __thiscall std::wstring::_M_check_length(_DWORD *this, int, unsigned int, std::length_error *); +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, wchar_t *String, int a3); +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, _WORD *a2, unsigned int a3, int a4); +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, int a2, unsigned int a3); +int __thiscall std::wstring::find_last_not_of(int *this, __int16, unsigned int); +int __thiscall std::wstring::find_first_not_of(int *this, wchar_t *String, unsigned int); +int __thiscall std::wstring::find_first_not_of(int *this, _WORD *, unsigned int, int); +int __thiscall std::wstring::find_first_not_of(int *this, _DWORD *, unsigned int); +int __thiscall std::wstring::find_first_not_of(_DWORD *this, __int16, unsigned int); +unsigned int __thiscall std::wstring::at(_DWORD *this, unsigned int a2); +int __thiscall std::wstring::copy(_DWORD *this, _WORD *, unsigned int, unsigned int); +unsigned int __thiscall std::wstring::find(int *this, wchar_t *String, int a3); +unsigned int __thiscall std::wstring::find(int *this, _WORD *a2, unsigned int a3, unsigned int a4); +unsigned int __thiscall std::wstring::find(int *this, int a2, unsigned int a3); +int __thiscall std::wstring::find(_DWORD *this, __int16, unsigned int); +int __thiscall std::wstring::rfind(_DWORD *this, wchar_t *String, int); +int __thiscall std::wstring::rfind(_DWORD *this, _WORD *, unsigned int, unsigned int); +int __thiscall std::wstring::rfind(_DWORD *this, int, unsigned int); +int __thiscall std::wstring::rfind(int *this, __int16, unsigned int); +_DWORD *__thiscall std::wstring::substr(_DWORD *this, _DWORD *, unsigned int, unsigned int); +int __thiscall std::wstring::compare(wchar_t **this, wchar_t *String); +int __thiscall std::wstring::compare(_DWORD *this, int); +int __thiscall std::wstring::compare(_DWORD *this, unsigned int, unsigned int, wchar_t *String); +int __thiscall std::wstring::compare(_DWORD *this, unsigned int, unsigned int, _WORD *, unsigned int); +int __thiscall std::wstring::compare(_DWORD *this, unsigned int, unsigned int, int); +int __thiscall std::wstring::compare(_DWORD *this, unsigned int, unsigned int, _DWORD *, unsigned int, unsigned int); +unsigned int __thiscall std::wstring::_M_check(_DWORD *this, unsigned int, const char *); +int __thiscall std::stringbuf::str(int this, int); +int __thiscall std::wstringbuf::str(int this, _DWORD *); +int __thiscall std::basic_stringstream,std::allocator>::str(int this, int); +int __thiscall std::basic_stringstream,std::allocator>::str(int this, _DWORD *); +int __thiscall std::istringstream::str(int this, int); +int __thiscall std::wistringstream::str(int this, _DWORD *); +int __thiscall std::ostringstream::str(int this, int); +int __thiscall std::wostringstream::str(int this, _DWORD *); +int __stdcall std::collate::_M_compare(char *, char *); // idb +int __stdcall std::collate::do_compare(_BYTE *, int, _BYTE *, int); +size_t __stdcall std::collate::_M_transform(char *Destination, char *Source, size_t MaxCount); +_DWORD *__thiscall std::collate::do_transform(_DWORD *this, int a2, _BYTE *a3, int a4); +int __thiscall std::collate::hash(void *this, char *, char *); +int __stdcall std::collate::do_hash(char *, char *); +void *__thiscall std::collate::transform(void *this, int, int, int); +int __stdcall std::collate::_M_compare(wchar_t *, wchar_t *); // idb +int __stdcall std::collate::do_compare(_WORD *, int, _WORD *, int); +size_t __stdcall std::collate::_M_transform(wchar_t *Destination, wchar_t *Source, size_t MaxCount); +_DWORD *__thiscall std::collate::do_transform(_DWORD *this, int a2, _WORD *a3, int a4); +int __thiscall std::collate::hash(void *this, unsigned __int16 *, unsigned int); +int __stdcall std::collate::do_hash(unsigned __int16 *, unsigned int); +void *__thiscall std::collate::transform(void *this, int, int, int); +void *__thiscall std::messages::get(void *this, int, int, int, int, int); +int __thiscall std::messages::open(void *this, int, int); +int __thiscall std::messages::open(void *this, int, int, int); +_DWORD *__thiscall std::messages::do_get(_DWORD *this, int, int, int, int, int); +int __stdcall std::messages::do_open(int, int); +void *__thiscall std::messages::get(void *this, int, int, int, int, int); +int __thiscall std::messages::open(void *this, int, int); +int __thiscall std::messages::open(void *this, int, int, int); +_DWORD *__thiscall std::messages::do_get(_DWORD *this, int, int, int, int, int); +int __stdcall std::messages::do_open(int, int); +_DWORD *__thiscall std::numpunct::do_grouping(_DWORD *this, int); +_DWORD *__thiscall std::numpunct::do_truename(_DWORD *this, int); +_DWORD *__thiscall std::numpunct::do_falsename(_DWORD *this, int); +_DWORD *__thiscall std::numpunct::grouping(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::numpunct::truename(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::numpunct::falsename(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::numpunct::do_grouping(_DWORD *this, int); +_DWORD *__thiscall std::numpunct::do_truename(_DWORD *this, int); +_DWORD *__thiscall std::numpunct::do_falsename(_DWORD *this, int); +_DWORD *__thiscall std::numpunct::grouping(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::numpunct::truename(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::numpunct::falsename(_DWORD *this, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_date(_DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_time(_DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_year(_DWORD *, int, _DWORD *, int, int, _DWORD *, int); +_DWORD *__stdcall std::time_get>::_M_extract_num(_DWORD *, int, _DWORD *, int, int *, signed int, int, unsigned int, int, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_weekday(_DWORD *, int, _DWORD *, int, int, _DWORD *, int); +unsigned __int64 __stdcall std::time_get>::_M_extract_name(unsigned __int64, _DWORD *, int, _DWORD *, int, int, int, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_monthname(_DWORD *, int, _DWORD *, int, int, _DWORD *, int); +_DWORD *__stdcall std::time_get>::_M_extract_via_format(_DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *, char *); +_DWORD *__stdcall std::time_get>::_M_extract_wday_or_month(_DWORD *, int, _DWORD *, int, unsigned int *, int, unsigned int, int, _DWORD *); +_DWORD *__thiscall std::time_get>::get(void *this, _DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *, unsigned __int8 *, unsigned __int8 *); +_DWORD *__thiscall std::time_get>::get(void *this, _DWORD *a2, int a3, _DWORD *a4, int a5, int a6, _DWORD *a7, _DWORD *a8, char a9, char a10); +_DWORD *__stdcall std::time_get>::do_get(_DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *, char, char); +int *__stdcall std::time_get>::do_get_date(int *, int, _DWORD *, int, int, _DWORD *, _DWORD *); +int *__stdcall std::time_get>::do_get_time(int *, int, _DWORD *, int, int, _DWORD *, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_year(_DWORD *, unsigned __int16, _DWORD *, __int16, int, _DWORD *, int); +_DWORD *__stdcall std::time_get>::_M_extract_num(_DWORD *, unsigned __int16, _DWORD *, __int16, int *, signed int, int, unsigned int, int, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_weekday(_DWORD *, int, _DWORD *, __int16, int, _DWORD *, int); +int *__stdcall std::time_get>::_M_extract_name(int *a1, int a2, _DWORD *a3, int a4, int **a5, int a6, int a7, int a8, _DWORD *a9); +_DWORD *__stdcall std::time_get>::do_get_monthname(_DWORD *, int, _DWORD *, __int16, int, _DWORD *, int); +int *__stdcall std::time_get>::_M_extract_via_format(int *, int, _DWORD *, int, int, _DWORD *, _DWORD *, wchar_t *String); +_DWORD *__stdcall std::time_get>::_M_extract_wday_or_month(_DWORD *, int, _DWORD *, __int16, unsigned int *, int, unsigned int, int, _DWORD *); +int *__thiscall std::time_get>::get(void *this, int *, int, _DWORD *, int, int, _DWORD *, _DWORD *, unsigned __int16 *, unsigned __int16 *); +int *__thiscall std::time_get>::get(void *this, int *a2, int a3, _DWORD *a4, int a5, int a6, _DWORD *a7, _DWORD *a8, char a9, char a10); +int *__stdcall std::time_get>::do_get(int *, int, _DWORD *, int, int, _DWORD *, _DWORD *, char, char); +_DWORD *__stdcall std::money_get>::_M_extract(_DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *); +_DWORD *__stdcall std::money_get>::_M_extract(_DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *); +__int64 __stdcall std::money_get>::do_get(__int64, _DWORD *, int, char, int, _DWORD *, int *); +__int64 __stdcall std::money_get>::do_get(__int64, _DWORD *, int, char, int, _DWORD *, long double *); +_DWORD *__stdcall std::money_get>::_M_extract(_DWORD *, __int16, _DWORD *, __int16, int, _DWORD *, _DWORD *); +_DWORD *__stdcall std::money_get>::_M_extract(_DWORD *, __int16, _DWORD *, __int16, int, _DWORD *, _DWORD *); +struct _Unwind_Exception *__stdcall std::money_get>::do_get(_DWORD *, __int16, _DWORD *, __int16, char, int, _DWORD *, int *); +struct _Unwind_Exception *__stdcall std::money_get>::do_get(_DWORD *, __int16, _DWORD *, __int16, char, int, _DWORD *, long double *); +int __thiscall std::money_put>::put(void *this, __int64, unsigned __int8, int, char, int); +__int64 __stdcall std::money_put>::do_put(__int64, char, int, char, int); +__int64 __thiscall std::money_put>::do_put(void *this, __int64, int, int, int, long double); +__int64 __stdcall std::money_put>::_M_insert(__int64, int, char, int); +__int64 __stdcall std::money_put>::_M_insert(__int64, int, char, int); +int __thiscall std::money_put>::put(void *this, __int64 a2, unsigned __int8 a3, int a4, __int16 a5, int a6); +__int64 __stdcall std::money_put>::do_put(__int64, char, int, __int16, int); +__int64 __thiscall std::money_put>::do_put(void *this, __int64, int, int, int, long double); +__int64 __stdcall std::money_put>::_M_insert(__int64, int, __int16, int); +__int64 __stdcall std::money_put>::_M_insert(__int64, int, __int16, int); +int __stdcall std::codecvt::do_in(int a1, unsigned __int8 *a2, unsigned __int8 *a3, unsigned __int8 **a4, int a5, int a6, _DWORD *a7); +int __stdcall std::codecvt::do_out(int a1, unsigned int *a2, unsigned int *a3, unsigned int **a4, _BYTE *a5, _BYTE *a6, _DWORD *a7); +unsigned __int8 *__stdcall std::codecvt::do_length(int, unsigned __int8 *, unsigned __int8 *, int); +int __stdcall std::codecvt::do_in(int a1, unsigned __int8 *a2, unsigned __int8 *a3, unsigned __int8 **a4, int a5, int a6, _DWORD *a7); +int __stdcall std::codecvt::do_out(int, unsigned int *, unsigned int *, unsigned int **, _BYTE *, _BYTE *, _DWORD *); +unsigned __int8 *__stdcall std::codecvt::do_length(int, unsigned __int8 *, unsigned __int8 *, int); +int __stdcall std::codecvt::do_in(int, unsigned __int8 *, unsigned __int8 *, unsigned __int8 **, char *, char *, char **); +int __stdcall std::codecvt::do_out(int a1, char *a2, char *a3, unsigned __int16 **a4, _BYTE *a5, _BYTE *a6, _DWORD *a7); +unsigned __int8 *__stdcall std::codecvt::do_length(int, unsigned __int8 *, unsigned __int8 *, unsigned int); +int __stdcall std::codecvt::do_in(int, unsigned __int8 *, unsigned __int8 *, unsigned __int8 **, char *, char *, char **); +int __stdcall std::codecvt::do_out(int, unsigned __int16 *, unsigned __int16 *, unsigned __int16 **, _BYTE *, _BYTE *, _BYTE **); +unsigned __int8 *__stdcall std::codecvt::do_length(int, unsigned __int8 *, unsigned __int8 *, unsigned int); +BOOL __cdecl std::codecvt::do_encoding(); +int __cdecl std::codecvt::do_max_length(); +int __stdcall std::codecvt::do_in(unsigned int *, char *, unsigned int, char **, wchar_t *, unsigned int, wchar_t **); +int __stdcall std::codecvt::do_out(unsigned int *, wchar_t *, unsigned int, wchar_t **, char *, unsigned int, char **); +int __stdcall std::codecvt::do_length(unsigned int *, char *, unsigned int, int); +int __stdcall std::collate::_M_compare(char *, char *); // idb +int __stdcall std::collate::do_compare(void *, _BYTE *, void *, int); +size_t __stdcall std::collate::_M_transform(char *Destination, char *Source, size_t MaxCount); +unsigned int *__thiscall std::collate::do_transform(unsigned int *this, int a2, _BYTE *a3, int a4); +int __thiscall std::collate::hash(void *this, char *, char *); +int __stdcall std::collate::do_hash(char *, char *); +void *__thiscall std::collate::transform(void *this, int, int, int); +int __stdcall std::collate::_M_compare(wchar_t *, wchar_t *); // idb +int __stdcall std::collate::do_compare(void *, _WORD *, void *, int); +size_t __stdcall std::collate::_M_transform(wchar_t *Destination, wchar_t *Source, size_t MaxCount); +unsigned int *__thiscall std::collate::do_transform(unsigned int *this, int a2, _WORD *a3, int a4); +int __thiscall std::collate::hash(void *this, unsigned __int16 *, unsigned int); +int __stdcall std::collate::do_hash(unsigned __int16 *, unsigned int); +void *__thiscall std::collate::transform(void *this, int, int, int); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, int, _DWORD *, int, int, _DWORD *, int *); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, int, _DWORD *, int, int, _DWORD *, int *); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, int, _DWORD *, int, int, _DWORD *, int *); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, int, _DWORD *, int, int, _DWORD *, _WORD *); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, int, _DWORD *, int, int, _DWORD *, int *); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *); +unsigned __int64 __stdcall std::num_get>::_M_extract_int(unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +unsigned __int64 __stdcall std::num_get>::_M_extract_int(unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +unsigned __int64 __stdcall std::num_get>::_M_extract_int(unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +unsigned __int64 __stdcall std::num_get>::_M_extract_int(unsigned __int64, _DWORD *, int, int, _DWORD *, _WORD *); +unsigned __int64 __stdcall std::num_get>::_M_extract_int(unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +unsigned __int64 __stdcall std::num_get>::_M_extract_int(unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *); +unsigned __int64 __stdcall std::num_get>::_M_extract_float(unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +int __thiscall std::num_get>::get(void *this, unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *); +int __thiscall std::num_get>::get(void *this, unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +int __thiscall std::num_get>::get(void *this, unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +int __thiscall std::num_get>::get(void *this, unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +int __thiscall std::num_get>::get(void *this, unsigned __int64, _DWORD *, int, int, _DWORD *, _WORD *); +int __thiscall std::num_get>::get(void *this, unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +int __thiscall std::num_get>::get(void *this, unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *); +unsigned __int64 __stdcall std::num_get>::do_get(unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *); +unsigned __int64 __stdcall std::num_get>::do_get(unsigned __int64, _DWORD *, int, int, int *, _BYTE *); +int __stdcall std::num_get>::do_get(unsigned __int64, _DWORD *, int, int, _DWORD *, double *); +int __stdcall std::num_get>::do_get(unsigned __int64, _DWORD *, int, int, _DWORD *, long double *); +int __stdcall std::num_get>::do_get(unsigned __int64, _DWORD *, int, int, _DWORD *, float *); +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, unsigned __int16, _DWORD *, __int16, int, _DWORD *, int *); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, unsigned __int16, _DWORD *, __int16, int, _DWORD *, int *); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, unsigned __int16, _DWORD *, __int16, int, _DWORD *, int *); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, unsigned __int16, _DWORD *, __int16, int, _DWORD *, _WORD *); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, unsigned __int16, _DWORD *, __int16, int, _DWORD *, int *); +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11](_DWORD *, unsigned __int16, _DWORD *, __int16, int, _DWORD *, _DWORD *); +__int64 __stdcall std::num_get>::_M_extract_int(__int64, _DWORD *, __int16, int, _DWORD *, int *); +__int64 __stdcall std::num_get>::_M_extract_int(__int64, _DWORD *, __int16, int, _DWORD *, int *); +__int64 __stdcall std::num_get>::_M_extract_int(__int64, _DWORD *, __int16, int, _DWORD *, int *); +__int64 __stdcall std::num_get>::_M_extract_int(__int64, _DWORD *, __int16, int, _DWORD *, _WORD *); +__int64 __stdcall std::num_get>::_M_extract_int(__int64, _DWORD *, __int16, int, _DWORD *, _DWORD *); +__int64 __stdcall std::num_get>::_M_extract_int(__int64, _DWORD *, __int16, int, _DWORD *, _DWORD *); +__int64 __stdcall std::num_get>::_M_extract_float(__int64, _DWORD *, __int16, int, _DWORD *, int *); +int __thiscall std::num_get>::get(void *this, __int64, _DWORD *, int, int, _DWORD *, int *); +int __thiscall std::num_get>::get(void *this, __int64, _DWORD *, int, int, _DWORD *, int *); +int __thiscall std::num_get>::get(void *this, __int64, _DWORD *, int, int, _DWORD *, int *); +int __thiscall std::num_get>::get(void *this, __int64, _DWORD *, int, int, _DWORD *, int *); +int __thiscall std::num_get>::get(void *this, __int64, _DWORD *, int, int, _DWORD *, _WORD *); +int __thiscall std::num_get>::get(void *this, __int64, _DWORD *, int, int, _DWORD *, _DWORD *); +int __thiscall std::num_get>::get(void *this, __int64, _DWORD *, int, int, _DWORD *, _DWORD *); +int __stdcall std::num_get>::do_get(__int64, _DWORD *, __int16, int, _DWORD *, _DWORD *); +__int64 __stdcall std::num_get>::do_get(__int64, _DWORD *, __int16, int, int *, _BYTE *); +std::locale::facet *__stdcall std::num_get>::do_get(__int64, _DWORD *, __int16, int, _DWORD *, double *); +std::locale::facet *__stdcall std::num_get>::do_get(__int64, _DWORD *, __int16, int, _DWORD *, long double *); +std::locale::facet *__stdcall std::num_get>::do_get(__int64, _DWORD *, __int16, int, _DWORD *, float *); +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); // weak +_BYTE *__stdcall std::num_put>::_M_group_int(char *, int, char, int, _BYTE *, _BYTE *, _DWORD *); +int __stdcall std::num_put>::_M_insert_int(int, int, int *, int, int); +int __stdcall std::num_put>::_M_insert_int(int, int, _DWORD *, int, int); +int __stdcall std::num_put>::_M_insert_int(int, int, int *, int, __int64); +int __stdcall std::num_put>::_M_insert_int(int, int, _DWORD *, int, int, int); +_BYTE *__stdcall std::num_put>::_M_group_float(char *, int, char, char *Src, int, _BYTE *, _DWORD *); +int __thiscall std::num_put>::_M_insert_float(void *this, int, int, int *, int, char, double); +int __thiscall std::num_put>::_M_insert_float(void *this, int, int, int *, int, char, long double); +int __thiscall std::num_put>::put(void *this, int, int, _DWORD *, char, int); +int __thiscall std::num_put>::put(void *this, int, int, int *, char, double); +int __thiscall std::num_put>::put(void *this, int, int, int *, char, long double); +int __thiscall std::num_put>::put(void *this, int, int, int *, char, int); +int __thiscall std::num_put>::put(void *this, int, int, _DWORD *, char, int); +int __thiscall std::num_put>::put(void *this, int, int, int *, char, __int64); +int __thiscall std::num_put>::put(void *this, int, int, _DWORD *, char, int, int); +int __stdcall std::num_put>::_M_pad(char a1, int a2, _DWORD *a3, char *a4, char *a5, int *a6); +int __stdcall std::num_put>::do_put(int, int, _DWORD *, char, int); +int *__stdcall std::num_put>::do_put(int *, int, int *, int, int); +int __thiscall std::num_put>::do_put(void *this, int, int, int *, char, double); +int __thiscall std::num_put>::do_put(void *this, int, int, int *, char, long double); +int __stdcall std::num_put>::do_put(int, int, int *, char, int); +int __stdcall std::num_put>::do_put(int, int, _DWORD *, char, int); +int __stdcall std::num_put>::do_put(int, int, int *, char, __int64); +int __stdcall std::num_put>::do_put(int, int, _DWORD *, char, int, int); +int __stdcall std::num_put>::_M_group_int(char *, int, __int16, int, _WORD *, char *, int *); +int __stdcall std::num_put>::_M_insert_int(int, int, _DWORD *, int, int); +int __stdcall std::num_put>::_M_insert_int(int, int, _DWORD *, int, int); +int __stdcall std::num_put>::_M_insert_int(int, int, _DWORD *, int, __int64); +int __stdcall std::num_put>::_M_insert_int(int, int, _DWORD *, int, int, int); +int __stdcall std::num_put>::_M_group_float(char *, int, __int16, char *Src, _WORD *, char *, _DWORD *); +int *__thiscall std::num_put>::_M_insert_float(void *this, int *, int, std::__num_base *, int, void *, double); +int __thiscall std::num_put>::_M_insert_float(void *this, int, int, int *, int, char, long double); +int __thiscall std::num_put>::put(void *this, int, int, _DWORD *, unsigned __int16, int); +int *__thiscall std::num_put>::put(void *this, int *, int, std::__num_base *, unsigned __int16, double); +int __thiscall std::num_put>::put(void *this, int, int, int *, unsigned __int16, long double); +int __thiscall std::num_put>::put(void *this, int, int, _DWORD *, unsigned __int16, int); +int __thiscall std::num_put>::put(void *this, int, int, _DWORD *, unsigned __int16, int); +int __thiscall std::num_put>::put(void *this, int, int, _DWORD *, unsigned __int16, __int64); +int __thiscall std::num_put>::put(void *this, int, int, _DWORD *, unsigned __int16, int, int); +_WORD *__stdcall std::num_put>::_M_pad(__int16 a1, int a2, _DWORD *a3, _WORD *Size, _WORD *a5, int *a6); +int __stdcall std::num_put>::do_put(int a1, int a2, _DWORD *a3, __int16 a4, int a5); +int __stdcall std::num_put>::do_put(int, int, _DWORD *, unsigned __int16, int); +int *__thiscall std::num_put>::do_put(void *this, int *a2, int a3, std::__num_base *a4, __int16 a5, double a6); +int __thiscall std::num_put>::do_put(void *this, int a2, int a3, int *a4, __int16 a5, long double a6); +int __stdcall std::num_put>::do_put(int, int, _DWORD *, unsigned __int16, int); +int __stdcall std::num_put>::do_put(int, int, _DWORD *, unsigned __int16, int); +int __stdcall std::num_put>::do_put(int, int, _DWORD *, unsigned __int16, __int64); +int __stdcall std::num_put>::do_put(int, int, _DWORD *, unsigned __int16, int, int); +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::find(_DWORD *this, int); +_DWORD *__thiscall std::messages::_M_convert_from_char(_DWORD *this, int, int); +void *__thiscall std::messages::get(void *this, int, int, int, int, int); +int __thiscall std::messages::open(void *this, int, int); +int __thiscall std::messages::open(void *this, int, int, int); +_DWORD *__thiscall std::messages::do_get(_DWORD *this, int, int, int, int, std::string *); +int __stdcall std::messages::do_open(int, int); +_DWORD *__thiscall std::messages::_M_convert_from_char(_DWORD *this, int, int); +void *__thiscall std::messages::get(void *this, int, int, int, int, int); +int __thiscall std::messages::open(void *this, int, int); +int __thiscall std::messages::open(void *this, int, int, int); +_DWORD *__thiscall std::messages::do_get(_DWORD *this, int, int, int, int, _DWORD *); +int __stdcall std::messages::do_open(int, int); +_DWORD *__thiscall std::numpunct::do_grouping(_DWORD *this, int); +_DWORD *__thiscall std::numpunct::do_truename(_DWORD *this, int); +_DWORD *__thiscall std::numpunct::do_falsename(_DWORD *this, int); +int __fastcall std::numpunct::do_decimal_point(int); +int __fastcall std::numpunct::do_thousands_sep(int); +_DWORD *__thiscall std::numpunct::grouping(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::numpunct::truename(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::numpunct::falsename(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::numpunct::do_grouping(_DWORD *this, int); +_DWORD *__thiscall std::numpunct::do_truename(_DWORD *this, int); +_DWORD *__thiscall std::numpunct::do_falsename(_DWORD *this, int); +int __fastcall std::numpunct::do_decimal_point(int); +int __fastcall std::numpunct::do_thousands_sep(int); +_DWORD *__thiscall std::numpunct::grouping(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::numpunct::truename(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::numpunct::falsename(_DWORD *this, _DWORD *); +int __stdcall std::time_get>::do_get_date(unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *); +int __stdcall std::time_get>::do_get_time(unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_year(_DWORD *, int, _DWORD *, int, int, _DWORD *, int); +_DWORD *__stdcall std::time_get>::_M_extract_num(_DWORD *, int, _DWORD *, int, int *, signed int, int, unsigned int, int, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_weekday(unsigned __int64, _DWORD *, int, int, _DWORD *, int); +unsigned __int64 __stdcall std::time_get>::_M_extract_name(unsigned __int64, _DWORD *, int, int **, int, int, int, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_monthname(unsigned __int64, _DWORD *, int, int, _DWORD *, int); +unsigned __int64 __stdcall std::time_get>::_M_extract_via_format(unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *, char *); +int __stdcall std::time_get>::_M_extract_wday_or_month(unsigned __int64, _DWORD *, int, unsigned int *, int, unsigned int, int, _DWORD *); +_DWORD *__stdcall std::time_get>::get(_DWORD *a1, unsigned int a2, _DWORD *a3, int a4, int a5, _DWORD *a6, _DWORD *a7, unsigned __int8 *a8, unsigned __int8 *a9); +int __stdcall std::time_get>::get(unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *, char, char); +int __stdcall std::time_get>::do_get(unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *, char, char); +_DWORD *__stdcall std::time_get>::do_get_date(__int64, _DWORD *, int, int, _DWORD *, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_time(__int64, _DWORD *, int, int, _DWORD *, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_year(_DWORD *, unsigned __int16, _DWORD *, __int16, int, _DWORD *, int); +_DWORD *__stdcall std::time_get>::_M_extract_num(_DWORD *, unsigned __int16, _DWORD *, __int16, int *, signed int, int, unsigned int, int, _DWORD *); +_DWORD *__stdcall std::time_get>::do_get_weekday(_DWORD *, int, _DWORD *, __int16, int, _DWORD *, int); +int *__stdcall std::time_get>::_M_extract_name(int *a1, int a2, _DWORD *a3, int a4, int **a5, int a6, int a7, int a8, _DWORD *a9); +_DWORD *__stdcall std::time_get>::do_get_monthname(_DWORD *, int, _DWORD *, __int16, int, _DWORD *, int); +__int64 __stdcall std::time_get>::_M_extract_via_format(__int64, _DWORD *, int, int, _DWORD *, _DWORD *, wchar_t *); +_DWORD *__stdcall std::time_get>::_M_extract_wday_or_month(_DWORD *, int, _DWORD *, __int16, unsigned int *, int, unsigned int, int, _DWORD *); +_DWORD *__thiscall std::time_get>::get(void *this, _DWORD *, int, _DWORD *, int, _DWORD *, _DWORD *, _DWORD *, unsigned __int16 *, unsigned __int16 *); +_DWORD *__stdcall std::time_get>::get(__int64, _DWORD *, int, int, _DWORD *, _DWORD *, char, char); +_DWORD *__stdcall std::time_get>::do_get(__int64, _DWORD *, int, int, _DWORD *, _DWORD *, char, char); +_DWORD *__thiscall std::time_put>::put(void *this, _DWORD *, int, int, char, int, unsigned __int8 *, unsigned __int8 *); +int __stdcall std::time_put>::do_put(int, char, int, int, struct tm *, char, char); +_DWORD *__thiscall std::time_put>::put(void *this, _DWORD *, int, int, unsigned __int16, int, unsigned __int16 *, unsigned __int16 *); +int __stdcall std::time_put>::do_put(int, char, int, int, struct tm *, char, char); +int __fastcall std::ios::fill(int); +int __thiscall std::ios::widen(int *this, int); +int __thiscall std::ios::narrow(_DWORD *this, int, int); +int __fastcall std::wios::fill(int); +int __thiscall std::wios::widen(_DWORD *this, char); +int __thiscall std::wios::narrow(_DWORD *this, unsigned __int16, char); +unsigned __int64 __stdcall std::money_get>::_M_extract(unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +unsigned __int64 __stdcall std::money_get>::_M_extract(unsigned __int64, _DWORD *, int, int, _DWORD *, int *); +unsigned __int64 __stdcall std::money_get>::do_get(unsigned __int64, _DWORD *, int, char, int, _DWORD *, int *); +unsigned __int64 __stdcall std::money_get>::do_get(unsigned __int64, _DWORD *, int, char, int, _DWORD *, long double *); +__int64 __stdcall std::money_get>::_M_extract(__int64, _DWORD *, __int16, int, _DWORD *, int *); +__int64 __stdcall std::money_get>::_M_extract(__int64, _DWORD *, __int16, int, _DWORD *, int *); +struct _Unwind_Exception *__stdcall std::money_get>::do_get(__int64, _DWORD *, __int16, char, int, _DWORD *, int *); +struct _Unwind_Exception *__stdcall std::money_get>::do_get(__int64, _DWORD *, __int16, char, int, _DWORD *, long double *); +int __thiscall std::money_put>::put(void *this, __int64, unsigned __int8, int, char, struct _Unwind_Exception **); +__int64 __stdcall std::money_put>::do_put(__int64, char, int, char, struct _Unwind_Exception **); +__int64 __thiscall std::money_put>::do_put(void *this, __int64, int, int, int, long double); +__int64 __stdcall std::money_put>::_M_insert(__int64, int, char, struct _Unwind_Exception **); +__int64 __stdcall std::money_put>::_M_insert(__int64, int, char, struct _Unwind_Exception **); +int __thiscall std::money_put>::put(void *this, __int64 a2, unsigned __int8 a3, int a4, __int16 a5, char **a6); +__int64 __stdcall std::money_put>::do_put(__int64, char, int, __int16, char **); +__int64 __thiscall std::money_put>::do_put(void *this, __int64, int, int, int, long double); +__int64 __stdcall std::money_put>::_M_insert(__int64, int, __int16, char **); +__int64 __stdcall std::money_put>::_M_insert(__int64, int, __int16, char **); +// bool __userpurge std::type_info::__do_catch@(std::type_info *@, std::type_info *this, const type_info *, void **, unsigned int); +bool __thiscall std::type_info::operator==(_DWORD *this, int); +int *__fastcall std::wstring::_M_leak_hard(int **); +_DWORD *__cdecl std::wstring::_S_construct(unsigned int, __int16); +_DWORD *__cdecl std::wstring::_S_construct<__gnu_cxx::__normal_iterator>(_WORD *Src, int); +_DWORD *__cdecl std::wstring::_S_construct(_WORD *Src, int); +_DWORD *__cdecl std::wstring::_S_construct(_WORD *Src, int); +int __cdecl std::wstring::_S_copy_chars(_WORD *, unsigned __int16 *Src, size_t Size); +int __cdecl std::wstring::_S_copy_chars(_WORD *, unsigned __int16 *Src, size_t Size); +int __cdecl std::wstring::_S_copy_chars(_WORD *, unsigned __int16 *Src, size_t Size); +int __cdecl std::wstring::_S_copy_chars(_WORD *, unsigned __int16 *Src, size_t Size); +void __fastcall std::wstring::shrink_to_fit(int *); +int **__thiscall std::wstring::_M_replace_aux(int **this, int, int, unsigned int, __int16); +int **__thiscall std::wstring::_M_replace_safe(int **this, int, int, _WORD *Src, int); +_DWORD *__cdecl std::wstring::_S_construct_aux_2(unsigned int, __int16); +char *__thiscall std::wstring::at(int **this, unsigned int); +char *__fastcall std::wstring::end(int **); +void __thiscall std::wstring::_Rep::_M_destroy(void *Block, int); +void __thiscall std::wstring::_Rep::_M_dispose(volatile signed __int32 *Block, int); +_DWORD *__thiscall std::wstring::_Rep::_M_grab(int this, int, int); +_DWORD *__thiscall std::wstring::_Rep::_M_clone(int *this, int, int); +_DWORD *__cdecl std::wstring::_Rep::_S_create(unsigned int, unsigned int); +char *__fastcall std::wstring::back(int **); +int **__thiscall std::wstring::rend(int **this, int **); +int __thiscall std::wstring::swap(int *this, int *); +int *__fastcall std::wstring::begin(int **); +int __fastcall std::wstring::clear(int **); +char *__thiscall std::wstring::erase(int **this, int); +char *__thiscall std::wstring::erase(int **this, char *, int); +int **__thiscall std::wstring::erase(int **this, unsigned int, unsigned int); +int *__fastcall std::wstring::front(int **); +unsigned int *__thiscall std::wstring::append(unsigned int *this, wchar_t *String); +unsigned int *__thiscall std::wstring::append(unsigned int *this, char *a2, unsigned int a3); +int *__thiscall std::wstring::append(int *this, _DWORD *); +int *__thiscall std::wstring::append(int *this, _DWORD *, unsigned int, unsigned int); +int *__thiscall std::wstring::append(int *this, unsigned int, __int16); +_DWORD *__thiscall std::wstring::assign(_DWORD *this, int *); +int **__thiscall std::wstring::assign(int **this, wchar_t *String); +int **__thiscall std::wstring::assign(int **this, char *Src, unsigned int); +int *__thiscall std::wstring::assign(int *this, _DWORD *); +int **__thiscall std::wstring::assign(int **this, _DWORD *, unsigned int, unsigned int); +int **__thiscall std::wstring::assign(int **this, unsigned int, __int16); +int __thiscall std::wstring::insert(int **this, int, unsigned int, unsigned __int16); +_WORD *__thiscall std::wstring::insert(int **this, int, __int16); +int **__thiscall std::wstring::insert(int **this, int, wchar_t *String); +int **__thiscall std::wstring::insert(int **this, unsigned int a2, char *Src, unsigned int a4); +int **__thiscall std::wstring::insert(int **this, int a2, char **a3); +int **__thiscall std::wstring::insert(int **this, int, _DWORD *, unsigned int, unsigned int); +int **__thiscall std::wstring::insert(int **this, unsigned int, unsigned int, __int16); +_DWORD *__thiscall std::wstring::rbegin(_DWORD *this, int **); +int *__thiscall std::wstring::resize(int *this, unsigned int); +int *__thiscall std::wstring::resize(int *this, unsigned int, __int16); +int *__fastcall std::wstring::_M_leak(int **); +int **__thiscall std::wstring::replace(int **this, int, int, _WORD *, int); +int **__thiscall std::wstring::replace(int **this, int, int, wchar_t *String); +int **__thiscall std::wstring::replace(int **this, int, int, _WORD *, int); +int **__thiscall std::wstring::replace(int **this, int, int, _WORD **); +int **__thiscall std::wstring::replace(int **this, int, int, _WORD *, int); +int **__thiscall std::wstring::replace(int **this, int, int, _WORD *, int); +int **__thiscall std::wstring::replace(int **this, int, int, unsigned int, __int16); +int **__thiscall std::wstring::replace(int **this, int, int, wchar_t *String); +int **__thiscall std::wstring::replace(int **this, unsigned int, unsigned int, _WORD *Src, unsigned int); +int **__thiscall std::wstring::replace(int **this, int, int, _WORD **); +int **__thiscall std::wstring::replace(int **this, int, int, _DWORD *, unsigned int, unsigned int); +int **__thiscall std::wstring::replace(int **this, unsigned int, unsigned int, unsigned int, __int16); +void __thiscall std::wstring::reserve(int *this, unsigned int); +int __fastcall std::wstring::pop_back(int **); +int __cdecl std::wstring::_M_assign(_WORD *, int, __int16); +int __thiscall std::wstring::_M_mutate(int **this, int, int, int); +int __thiscall std::wstring::push_back(int *this, __int16); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, wchar_t *String, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *, int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, unsigned int, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, int *, unsigned int, unsigned int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, int *, unsigned int, unsigned int, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *, int, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, unsigned int, __int16, int); +_WORD *__fastcall std::wstring::basic_string(_DWORD *); +int __thiscall std::wstring::basic_string<__gnu_cxx::__normal_iterator>(_DWORD *this, _WORD *Src, int, int); +int __thiscall std::wstring::basic_string(_DWORD *this, _WORD *Src, int, int); +int __thiscall std::wstring::basic_string(_DWORD *this, _WORD *Src, int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, wchar_t *String, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *, int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, unsigned int, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, int *, unsigned int, unsigned int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, int *, unsigned int, unsigned int, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *, int, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, unsigned int, __int16, int); +_WORD *__fastcall std::wstring::basic_string(_DWORD *); +int __thiscall std::wstring::basic_string<__gnu_cxx::__normal_iterator>(_DWORD *this, _WORD *Src, int, int); +int __thiscall std::wstring::basic_string(_DWORD *this, _WORD *Src, int, int); +int __thiscall std::wstring::basic_string(_DWORD *this, _WORD *Src, int, int); +void __fastcall std::wstring::~wstring(int *); +void __fastcall std::wstring::~wstring(int *); +_DWORD *__thiscall std::wstring::operator=(_DWORD *this, int *); +int **__thiscall std::wstring::operator=(int **this, wchar_t *String); +int *__thiscall std::wstring::operator=(int *this, _DWORD *); +int **__thiscall std::wstring::operator=(int **this, char *, int); +int **__thiscall std::wstring::operator=(int **this, __int16); +char *__thiscall std::wstring::operator[](int **this, int); +unsigned int *__thiscall std::wstring::operator+=(unsigned int *this, wchar_t *String); +int *__thiscall std::wstring::operator+=(int *this, __int16); +// void __userpurge std::iostream::swap(_DWORD *@, std::iostream *this, std::iostream *); +void __thiscall std::iostream::iostream(_DWORD *this, int *); +void __thiscall std::iostream::iostream(_DWORD *this, int); +void __fastcall std::iostream::iostream(int); +int __thiscall std::iostream::iostream(int *this, int *, _DWORD *); +void __thiscall std::iostream::iostream(int *this, int *, int); +void __thiscall std::iostream::iostream(_DWORD *ecx0, std::iostream *this); +void __fastcall std::iostream::~iostream(_DWORD *); +void __thiscall std::iostream::~iostream(_DWORD *ecx0, std::iostream *this); +_DWORD *__thiscall std::iostream::operator=(_DWORD *this, _DWORD *); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int); +// std::istream::sentry *__userpurge std::istream::get@(std::istream::sentry *@, std::istream *this, char *, int); +// std::istream::sentry *__userpurge std::istream::get@(std::istream::sentry *@, std::istream *this, char *, unsigned __int8, char); +std::istream::sentry *__thiscall std::istream::get(std::istream::sentry *this, _DWORD *); +std::istream::sentry *__thiscall std::istream::get(std::istream::sentry *this, _DWORD *, unsigned __int8); +// std::istream::sentry *__userpurge std::istream::get@(std::istream::sentry *@, std::istream *this, char *); +int __fastcall std::istream::get(std::istream::sentry *); +struct _Unwind_Exception *__fastcall std::istream::peek(std::istream::sentry *a1); +// std::istream::sentry *__userpurge std::istream::read@(std::istream::sentry *@, std::istream *this, char *, int); +// void __userpurge std::istream::swap(_DWORD *@, std::istream *this, std::istream *); +int __fastcall std::istream::sync(std::istream::sentry *); +std::istream::sentry *__thiscall std::istream::seekg(std::istream::sentry *this, int, int, int, int); +std::istream::sentry *__thiscall std::istream::seekg(std::istream::sentry *this, int, int, int); +_DWORD *__thiscall std::istream::tellg(_DWORD *ecx0, std::istream *this); +std::istream::sentry *__fastcall std::istream::unget(std::istream::sentry *); +// std::istream::sentry *__userpurge std::istream::ignore@(std::istream::sentry *@, std::istream *this, int); +// std::istream::sentry *__userpurge std::istream::ignore@(std::istream::sentry *@, std::istream *this, int, int); +std::istream::sentry *__fastcall std::istream::ignore(std::istream::sentry *); +// void __userpurge std::istream::sentry::sentry(_BYTE *@, std::istream::sentry *this, std::istream *, bool); +// void __userpurge std::istream::sentry::sentry(_BYTE *@, std::istream::sentry *this, std::istream *, bool); +// std::istream::sentry *__userpurge std::istream::getline@(std::istream::sentry *@, std::istream *this, char *, int); +// std::istream::sentry *__userpurge std::istream::getline@(std::istream::sentry *a1@, std::istream *this, char *a3, char a4, char a5); +// std::istream::sentry *__userpurge std::istream::putback@(std::istream::sentry *@, std::istream *this, char); +// struct _Unwind_Exception *__userpurge std::istream::readsome@(std::istream::sentry *@, std::istream *this, char *, int); +void __thiscall std::istream::istream(_DWORD *this, int *); +void __thiscall std::istream::istream(_DWORD *this, int); +void __fastcall std::istream::istream(int); +int __thiscall std::istream::istream(int *this, int *, _DWORD *); +BOOL __thiscall std::istream::istream(int *this, int *, int); +BOOL __thiscall std::istream::istream(_DWORD *ecx0, std::istream *this); +void __fastcall std::istream::~istream(_DWORD *); +_DWORD *__thiscall std::istream::operator=(_DWORD *this, _DWORD *); +int __thiscall std::istream::operator>>(void *this, int (__cdecl *)(void *)); +char *__thiscall std::istream::operator>>(char *this, void (__cdecl *)(char *)); +char *__thiscall std::istream::operator>>(char *this, void (__cdecl *)(char *)); +std::istream::sentry *__thiscall std::istream::operator>>(std::istream::sentry *this, _DWORD *); +std::istream::sentry *__thiscall std::istream::operator>>(std::istream::sentry *this, _DWORD *); +std::istream::sentry *__thiscall std::istream::operator>>(std::istream::sentry *this, _WORD *); +// std::ostream::sentry *__userpurge std::ostream::put@(std::ostream::sentry *@, std::ostream *this, char); +// void __userpurge std::ostream::swap(_DWORD *@, std::ostream *this, std::ostream *); +_DWORD *__fastcall std::ostream::flush(_DWORD *); +_DWORD *__thiscall std::ostream::seekp(_DWORD *this, int, int, int, int); +_DWORD *__thiscall std::ostream::seekp(_DWORD *this, int, int, int); +_DWORD *__thiscall std::ostream::tellp(_DWORD *ecx0, std::ostream *this); +// std::ostream::sentry *__userpurge std::ostream::write@(std::ostream::sentry *@, std::ostream *this, const char *, int); +// int __userpurge std::ostream::sentry::sentry@(int@, std::ostream::sentry *this, std::ostream *); +// int __userpurge std::ostream::sentry::sentry@(int@, std::ostream::sentry *this, std::ostream *); +void __fastcall std::ostream::sentry::~sentry(int); +void __fastcall std::ostream::sentry::~sentry(int); +// const char *__userpurge std::ostream::_M_write@(_DWORD *@, std::ostream *this, const char *, int); +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, int); +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, unsigned __int8); +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, double); +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, long double); +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, int); +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, int); +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, int, int); +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, int, int); +void __thiscall std::ostream::ostream(_DWORD *this, _DWORD *); +void __thiscall std::ostream::ostream(_DWORD *this, int); +// int __userpurge std::ostream::ostream@(int@, std::ostream *this, std::iostream *); +void __fastcall std::ostream::ostream(int); +int __thiscall std::ostream::ostream(_DWORD *this, _DWORD *, _DWORD *); +BOOL __thiscall std::ostream::ostream(int *this, int *, int); +void __fastcall std::ostream::~ostream(_DWORD *); +_DWORD *__thiscall std::ostream::operator=(_DWORD *this, _DWORD *); +int __thiscall std::ostream::operator<<(void *this, int (__cdecl *)(void *)); +char *__thiscall std::ostream::operator<<(char *this, void (__cdecl *)(char *)); +char *__thiscall std::ostream::operator<<(char *this, void (__cdecl *)(char *)); +std::ostream::sentry *__thiscall std::ostream::operator<<(std::ostream::sentry *this, _DWORD *); +std::ostream::sentry *__thiscall std::ostream::operator<<(std::ostream::sentry *this, float); +_DWORD __stdcall std::ostream::operator<<(_DWORD); // weak +char *__fastcall std::string::_M_leak_hard(char **); +_DWORD *__cdecl std::string::_S_construct(size_t Size, char); +int __cdecl std::string::_S_construct<__gnu_cxx::__normal_iterator>(_BYTE *Src, int); +int __cdecl std::string::_S_construct(_BYTE *Src, int); +int __cdecl std::string::_S_construct(_BYTE *Src, int); +void __fastcall std::string::shrink_to_fit(int *); +// char **__userpurge std::string::_M_replace_aux@(char **@, std::string *this, unsigned int, size_t Size, char, char); +// char **__userpurge std::string::_M_replace_safe@(char **@, std::string *this, unsigned int, _BYTE *Src, size_t Size, unsigned int); +_DWORD *__cdecl std::string::_S_construct_aux_2(size_t Size, char); +// char *__userpurge std::string::at@(char **a1@, std::string *this, unsigned int a3); +char *__fastcall std::string::end(char **); +void __thiscall std::string::_Rep::_M_destroy(void *Block, int); +void __thiscall std::string::_Rep::_M_dispose(volatile signed __int32 *Block, int); +volatile signed __int32 *__thiscall std::string::_Rep::_M_grab(volatile signed __int32 *this, int, int); +_DWORD *__thiscall std::string::_Rep::_M_clone(int this, int, int); +_DWORD *__cdecl std::string::_Rep::_S_create(unsigned int, unsigned int); +char *__fastcall std::string::back(char **); +char **__thiscall std::string::rend(char **ecx0, char **this); +// int __userpurge std::string::swap@(int *@, std::string *this, std::string *); +char *__fastcall std::string::begin(char **); +void __fastcall std::string::clear(char **); +char *__thiscall std::string::erase(char **this, int); +char *__thiscall std::string::erase(char **this, char *, char *); +// char **__userpurge std::string::erase@(char **@, std::string *this, unsigned int, unsigned int); +char *__fastcall std::string::front(char **); +// unsigned int *__userpurge std::string::append@(unsigned int *a1@, std::string *this, const char *a3); +// unsigned int *__userpurge std::string::append@(unsigned int *a1@, std::string *this, size_t Size, unsigned int a4); +// int *__userpurge std::string::append@(int *@, std::string *this, const std::string *); +// int *__userpurge std::string::append@(int *@, std::string *this, const std::string *, size_t, unsigned int); +// int *__userpurge std::string::append@(int *@, size_t this, char, char); +_DWORD *__thiscall std::string::assign(_DWORD *this, int *); +// char **__userpurge std::string::assign@(char **@, std::string *this, const char *); +// char **__userpurge std::string::assign@(char **@, std::string *this, size_t Size, unsigned int); +// int *__userpurge std::string::assign@(int *@, std::string *this, const std::string *); +// char **__userpurge std::string::assign@(char **@, std::string *this, const std::string *, size_t, unsigned int); +// char **__userpurge std::string::assign@(char **@, size_t this, char, char); +char *__thiscall std::string::insert(char **this, int, char); +void __thiscall std::string::insert(char **this, int, size_t Size, char); +// char **__userpurge std::string::insert@(char **@, std::string *this, char *Str, const char *); +// char **__userpurge std::string::insert@(char **a1@, size_t this, char *Src, size_t Size, unsigned int a5); +// char **__userpurge std::string::insert@(char **@, std::string *this, char **, const std::string *); +// char **__userpurge std::string::insert@(char **@, std::string *this, _DWORD *, const std::string *, size_t, unsigned int); +// char **__userpurge std::string::insert@(char **@, std::string *this, size_t Size, char, char); +_DWORD *__thiscall std::string::rbegin(_DWORD *ecx0, char **this); +// void __userpurge std::string::resize(int *@, std::string *this, unsigned int); +// void __userpurge std::string::resize(int *@, size_t this, char, char); +char *__fastcall std::string::_M_leak(char **); +char **__thiscall std::string::replace(char **this, int, int, char *Str); +char **__thiscall std::string::replace(char **this, int, int, char **); +char **__thiscall std::string::replace(char **this, int, int, size_t Size, char); +// char **__userpurge std::string::replace@(char **@, std::string *this, unsigned int, char *Str, const char *); +// char **__userpurge std::string::replace@(char **a1@, size_t this, size_t a3, char *Src, size_t Size, unsigned int a6); +// char **__userpurge std::string::replace@(char **@, std::string *this, unsigned int, char **, const std::string *); +// char **__userpurge std::string::replace@(char **@, std::string *this, unsigned int, _DWORD *, const std::string *, size_t, unsigned int); +// char **__userpurge std::string::replace@(char **@, std::string *this, unsigned int, size_t, char, char); +// void __userpurge std::string::reserve(int *@, std::string *this, unsigned int); +void __fastcall std::string::pop_back(char **); +// void __userpurge std::string::_M_mutate(char **@, size_t this, unsigned int, unsigned int, unsigned int); +// int __userpurge std::string::push_back@(int *@, std::string *this, char); +_BYTE *__thiscall std::string::string(_DWORD *this, _DWORD *); +_BYTE *__thiscall std::string::string(_DWORD *this, _DWORD *, int); +int __thiscall std::string::string(_DWORD *this, char *Str, int); +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, size_t Size, int); +_BYTE *__thiscall std::string::string(_DWORD *this, int); +// _DWORD *__userpurge std::string::string@(_DWORD *@, std::string *this, const std::string *); +_DWORD *__thiscall std::string::string(_DWORD *this, _DWORD *, int); +int __thiscall std::string::string(int *this, _DWORD *, unsigned int, int); +// int __userpurge std::string::string@(int *@, std::string *this, const std::string *, unsigned int, unsigned int); +int __thiscall std::string::string(int *this, int *, unsigned int, unsigned int, int); +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, size_t Size, int); +char *__thiscall std::string::string(char **this, size_t Size, char *a3, int a4); +_BYTE *__fastcall std::string::string(_DWORD *); +int __thiscall std::string::string<__gnu_cxx::__normal_iterator>(_DWORD *this, unsigned __int8 *Src, int, int); +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, int, int); +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, int, int); +_BYTE *__thiscall std::string::string(_DWORD *this, _DWORD *); +_BYTE *__thiscall std::string::string(_DWORD *this, _DWORD *, int); +int __thiscall std::string::string(_DWORD *this, char *Str, int); +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, size_t Size, int); +_BYTE *__thiscall std::string::string(_DWORD *this, int); +// _DWORD *__userpurge std::string::string@(_DWORD *@, std::string *this, const std::string *); +_DWORD *__thiscall std::string::string(_DWORD *this, _DWORD *, int); +int __thiscall std::string::string(int *this, _DWORD *, unsigned int, int); +// int __userpurge std::string::string@(int *@, std::string *this, const std::string *, unsigned int, unsigned int); +int __thiscall std::string::string(int *this, int *, unsigned int, unsigned int, int); +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, size_t Size, int); +char *__thiscall std::string::string(char **this, size_t Size, char *a3, int a4); +_BYTE *__fastcall std::string::string(_DWORD *); +int __thiscall std::string::string<__gnu_cxx::__normal_iterator>(_DWORD *this, unsigned __int8 *Src, int, int); +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, int, int); +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, int, int); +void __fastcall std::string::~string(int *); +void __fastcall std::string::~string(int *); +_DWORD *__thiscall std::string::operator=(_DWORD *this, int *); +char **__thiscall std::string::operator=(char **this, std::string *Str); +int *__thiscall std::string::operator=(int *this, _DWORD *); +char **__thiscall std::string::operator=(char **this, std::string *, size_t); +char **__thiscall std::string::operator=(char **this, char); +char *__thiscall std::string::operator[](char **this, int); +unsigned int *__thiscall std::string::operator+=(unsigned int *this, std::string *Str); +int *__thiscall std::string::operator+=(int *this, char); +int __cdecl std::__num_base::_S_format_float(std::__num_base *this, const std::ios_base *, char *); +void __fastcall std::bad_typeid::~bad_typeid(_DWORD *); +void __cdecl std::bad_typeid::~bad_typeid(std::exception *); +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +_DWORD *__thiscall std::__timepunct::_M_initialize_timepunct(_DWORD *this, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int, char *Str1, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int, char *Str1, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int); +void __fastcall std::__timepunct::~__timepunct(_DWORD *Block); +void __fastcall std::__timepunct::~__timepunct(_DWORD *); +void __fastcall std::__timepunct::~__timepunct(_DWORD *); +_DWORD *__thiscall std::__timepunct::_M_initialize_timepunct(_DWORD *this, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int, char *Str1, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int, char *Str1, int); +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int); +void __fastcall std::__timepunct::~__timepunct(_DWORD *Block); +void __fastcall std::__timepunct::~__timepunct(_DWORD *); +void __fastcall std::__timepunct::~__timepunct(_DWORD *); +// void __userpurge std::logic_error::logic_error(_DWORD *@, std::logic_error *this, const char *); +void __thiscall std::logic_error::logic_error(_DWORD *this, int); +// void __userpurge std::logic_error::logic_error(_DWORD *@, std::logic_error *this, const std::logic_error *); +// void __userpurge std::logic_error::logic_error(_DWORD *@, std::logic_error *this, const std::string *); +void __fastcall std::logic_error::~logic_error(void *); +void __cdecl std::logic_error::~logic_error(std::exception *); +int *__thiscall std::logic_error::operator=(int *this, int); +int *__thiscall std::logic_error::operator=(int *this, int); +// void __userpurge std::range_error::range_error(_DWORD *@, std::range_error *this, const char *); +void __thiscall std::range_error::range_error(_DWORD *this, int); +// void __userpurge std::range_error::range_error(_DWORD *@, std::range_error *this, const std::string *); +void __fastcall std::range_error::~range_error(_DWORD *); +void __cdecl std::range_error::~range_error(std::exception *); +// int __usercall std::_Destroy_aux::__destroy *>@(int@, int, int); +// int __usercall std::_Destroy_aux::__destroy *>@(int@, int, int); +// int __usercall std::_Destroy_aux::__destroy@(int@, void **, void **); +// unsigned __int8 *__usercall std::`anonymous namespace'::utf16_span@(unsigned __int8 *@, unsigned __int8 *@, unsigned int@, unsigned int, char); +int __cdecl std::`anonymous namespace'::__x86_rdrand(); +int __cdecl std::`anonymous namespace'::__x86_rdseed(std::_anonymous_namespace_ *this); +int __cdecl std::`anonymous namespace'::__winxp_rand_s(); +// int __usercall std::`anonymous namespace'::read_utf16_bom@(int@, int *@); +int __cdecl std::`anonymous namespace'::__x86_rdseed_rdrand(); +// int __usercall std::`anonymous namespace'::read_utf8_code_point@(unsigned __int8 **@, unsigned int@); +// int __usercall std::`anonymous namespace'::read_utf8_code_point@(unsigned __int8 **@, unsigned int@); +// int __usercall std::`anonymous namespace'::write_utf8_code_point@(int@, unsigned int@); +// int __usercall std::`anonymous namespace'::write_utf8_code_point@(_BYTE **@, unsigned int@); +// int __usercall std::`anonymous namespace'::ucs2_in@(unsigned __int16 **@, int *@, unsigned int@, char); +// int __usercall std::`anonymous namespace'::ucs2_out@(unsigned __int16 **@, _DWORD *@, unsigned int@, char); +// int __usercall std::`anonymous namespace'::utf16_in@(unsigned __int8 **@, char **@, unsigned int@, char, int); +// int __usercall std::`anonymous namespace'::utf16_out@(unsigned __int16 **@, _BYTE **@, unsigned int@, int); +int __fastcall std::__basic_file::fd(FILE **); +_BYTE *__thiscall std::__basic_file::open(_BYTE *this, char *FileName, char, int); +FILE *__thiscall std::__basic_file::open(_BYTE *this, wchar_t *FileName, char); +int __fastcall std::__basic_file::sync(FILE **); +int __fastcall std::__basic_file::close(int); +int __thiscall std::__basic_file::xsgetn(FILE **this, void *DstBuf, unsigned int MaxCharCount); +unsigned int __thiscall std::__basic_file::xsputn(FILE **this, char *, unsigned int); +__int64 __thiscall std::__basic_file::seekoff(FILE **this, __int64, int); +void __cdecl __noreturn sub_4AA025(int, int, int, int, int, int, int, int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int); // idb +_BYTE *__thiscall std::__basic_file::sys_open(_BYTE *this, FILE *Stream, int); +FILE **__thiscall std::__basic_file::sys_open(FILE **this, int FileHandle, char); +int __thiscall std::__basic_file::xsputn_2(FILE **this, char *, unsigned int, char *, unsigned int); +int __fastcall std::__basic_file::showmanyc(FILE **); +void __thiscall std::__basic_file::__basic_file(_BYTE *this, int); +FILE *__fastcall std::__basic_file::~__basic_file(int); +void __thiscall std::__cow_string::__cow_string(_DWORD *this, _DWORD *); +// int __userpurge std::__cow_string::__cow_string@(_DWORD *@, std::__cow_string *this, size_t, unsigned int); +int __thiscall std::__cow_string::__cow_string(_DWORD *this, int); +// void __userpurge std::__cow_string::__cow_string(_DWORD *@, std::__cow_string *this, const std::__cow_string *); +_DWORD *__fastcall std::__cow_string::__cow_string(_DWORD *); +void __fastcall std::__cow_string::~__cow_string(int *); +int *__thiscall std::__cow_string::operator=(int *this, std::string *); +int *__thiscall std::__cow_string::operator=(int *this, std::string *); +void __thiscall std::__shared_ptr::__shared_ptr(_DWORD *this, _DWORD *); +void __thiscall std::__shared_ptr::__shared_ptr(int *this, int *); +volatile signed __int32 **__thiscall std::__shared_ptr::operator=(volatile signed __int32 **this, volatile signed __int32 **); +int __thiscall std::__shared_ptr::__shared_ptr(_DWORD *this, _DWORD *); +void __thiscall std::__shared_ptr::__shared_ptr(_DWORD *this, _DWORD *); +volatile signed __int32 **__thiscall std::__shared_ptr::operator=(volatile signed __int32 **this, volatile signed __int32 **); +_DWORD *__thiscall std::__sso_string::__sso_string(_DWORD *this, _DWORD *); +// _BYTE *__userpurge std::__sso_string::__sso_string@(int@, std::__sso_string *this, size_t Size, unsigned int); +_BYTE *__thiscall std::__sso_string::__sso_string(char *this, int); +// void __userpurge std::__sso_string::__sso_string(_DWORD *@, std::__sso_string *this, const std::__sso_string *); +// _BYTE *__userpurge std::__sso_string::__sso_string@(int@, std::__sso_string **this, const std::string *); +void __fastcall std::__sso_string::~__sso_string(void **); +_DWORD *__thiscall std::__sso_string::operator=(_DWORD *this, int); +void *__thiscall std::__sso_string::operator=(void *this, int); +void __thiscall std::ctype_byname::ctype_byname(_DWORD *this, int **, int); +void __fastcall std::ctype_byname::~ctype_byname(_DWORD *Block); +void __thiscall std::ctype_byname::ctype_byname(_DWORD *this, int **, int); +void __fastcall std::ctype_byname::~ctype_byname(_DWORD *Block); +void __fastcall std::ctype_byname::~ctype_byname(_DWORD *); +// void __userpurge std::domain_error::domain_error(_DWORD *@, std::domain_error *this, const char *); +void __thiscall std::domain_error::domain_error(_DWORD *this, int); +// void __userpurge std::domain_error::domain_error(_DWORD *@, std::domain_error *this, const std::string *); +void __fastcall std::domain_error::~domain_error(_DWORD *); +void __cdecl std::domain_error::~domain_error(std::exception *); +// void __userpurge std::length_error::length_error(_DWORD *@, std::length_error *this, const char *); +void __thiscall std::length_error::length_error(_DWORD *this, int); +// void __userpurge std::length_error::length_error(_DWORD *@, std::length_error *this, const std::string *); +void __fastcall std::length_error::~length_error(_DWORD *); +void __cdecl std::length_error::~length_error(std::exception *); +// void __userpurge std::out_of_range::out_of_range(_DWORD *@, std::out_of_range *this, const char *); +void __thiscall std::out_of_range::out_of_range(_DWORD *this, int); +// void __userpurge std::out_of_range::out_of_range(_DWORD *@, std::out_of_range *this, const std::string *); +void __fastcall std::out_of_range::~out_of_range(_DWORD *); +void __cdecl std::out_of_range::~out_of_range(std::exception *); +void __thiscall std::system_error::system_error(_DWORD *this, int, int, char *Str); +void __thiscall std::system_error::system_error(_DWORD *this, int, int, int); +void __fastcall std::system_error::~system_error(_DWORD *); +void __cdecl std::system_error::~system_error(std::exception *); +int __cdecl std::__facet_shims::__time_get(int, int, int, int, int, int, int, int, int, char); +int __cdecl std::__facet_shims::__time_get(int, int, int, int, int, int, int, int, int, char); +int __cdecl std::__facet_shims::__time_get(int, int, int, int, int, int, int, int, int, char); +int __cdecl std::__facet_shims::__time_get(int, int, int, int, int, int, int, int, int, char); +__int64 __cdecl std::__facet_shims::__money_get(int, int, __int64, int, int, unsigned __int8, int, _DWORD *, int, _DWORD *); +__int64 __cdecl std::__facet_shims::__money_get(int, int *, __int64, int, int, unsigned __int8, int, _DWORD *, int, _DWORD *); +struct _Unwind_Exception *__cdecl std::__facet_shims::__money_get(int, int, int, int, int, int, unsigned __int8, int, _DWORD *, int, _DWORD *); +struct _Unwind_Exception *__cdecl std::__facet_shims::__money_get(int, int *, int, int, int, int, unsigned __int8, int, _DWORD *, int, _DWORD *); +__int64 __cdecl std::__facet_shims::__money_put(int, int, int, int, unsigned __int8, int, char, long double, int); +__int64 __cdecl std::__facet_shims::__money_put(int, int, int, int, unsigned __int8, int, char, long double, int); +__int64 __cdecl std::__facet_shims::__money_put(int, int, int, int, unsigned __int8, int, unsigned __int16, long double, int); +__int64 __cdecl std::__facet_shims::__money_put(int, int, int, int, unsigned __int8, int, unsigned __int16, long double, int); +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(_DWORD *Block); +void __cdecl std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(std::locale::facet *); +void __cdecl std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(std::locale::facet *); +void __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(_DWORD *Block); +void __cdecl std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(std::locale::facet *); +void __cdecl std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(std::locale::facet *); +void __fastcall std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(_DWORD *Block); +void __cdecl std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(std::locale::facet *); +void __cdecl std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(std::locale::facet *); +void __fastcall std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(_DWORD *Block); +void __cdecl std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(std::locale::facet *); +void __cdecl std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(std::locale::facet *); +void __fastcall std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(_DWORD *Block); +void __cdecl std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(std::locale::facet *); +void __cdecl std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(std::locale::facet *); +void __fastcall std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(_DWORD *Block); +void __cdecl std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(std::locale::facet *); +void __cdecl std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(std::locale::facet *); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *); +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *); +void __cdecl std::__facet_shims::`anonymous namespace'::__destroy_string(int *); +void __cdecl std::__facet_shims::`anonymous namespace'::__destroy_string(void **Block); +void __cdecl std::__facet_shims::`anonymous namespace'::__destroy_string(int *); +void __cdecl std::__facet_shims::`anonymous namespace'::__destroy_string(void **Block); +void __cdecl std::__facet_shims::__messages_get(int, int, _DWORD *, std::string *, int, int, unsigned __int8 *, size_t); +void __cdecl std::__facet_shims::__messages_get(int, int, _DWORD *, int, int, int, _BYTE *, int); +void __cdecl std::__facet_shims::__messages_get(int, int, _DWORD *, int, int, int, _WORD *, int); +void __cdecl std::__facet_shims::__messages_get(int, int, _DWORD *, int, int, int, _WORD *, int); +struct _Unwind_Exception *__cdecl std::__facet_shims::__messages_open(int, int, unsigned __int8 *, size_t, int); +struct _Unwind_Exception *__cdecl std::__facet_shims::__messages_open(int, int, _BYTE *, int, int); +struct _Unwind_Exception *__cdecl std::__facet_shims::__messages_open(int, int, unsigned __int8 *, size_t, int); +struct _Unwind_Exception *__cdecl std::__facet_shims::__messages_open(int, int, _BYTE *, int, int); +int __cdecl std::__facet_shims::__messages_close(int, int, int); +int __cdecl std::__facet_shims::__messages_close(int, int, int); +int __cdecl std::__facet_shims::__messages_close(int, int, int); +int __cdecl std::__facet_shims::__messages_close(int, int, int); +int __cdecl std::__facet_shims::__collate_compare(int, int, int, int, int, int); +int __cdecl std::__facet_shims::__collate_compare(int, int, int, int, int, int); +int __cdecl std::__facet_shims::__collate_compare(int, int, int, int, int, int); +int __cdecl std::__facet_shims::__collate_compare(int, int, int, int, int, int); +void __cdecl std::__facet_shims::__collate_transform(int, int, _DWORD *, std::string *, int); +void __cdecl std::__facet_shims::__collate_transform(int, int, _DWORD *, int, int); +void __cdecl std::__facet_shims::__collate_transform(int, int, _DWORD *, int, int); +void __cdecl std::__facet_shims::__collate_transform(int, int, _DWORD *, int, int); +int __cdecl std::__facet_shims::__time_get_dateorder(int, int); +int __cdecl std::__facet_shims::__time_get_dateorder(int, int); +int __cdecl std::__facet_shims::__time_get_dateorder(int, int); +int __cdecl std::__facet_shims::__time_get_dateorder(int, int); +void __cdecl std::__facet_shims::__numpunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__numpunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__numpunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__numpunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int, int *, int); +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int, int *, int); +// void __userpurge std::__ios_failure::__ios_failure(_DWORD *@, std::__ios_failure *this, int, int); +void __fastcall std::__ios_failure::~__ios_failure(void (__cdecl ***a1)(std::ios_base::failure *__hidden this)); +void __fastcall std::__ios_failure::~__ios_failure(void (__cdecl ***a1)(std::ios_base::failure *__hidden this)); +void __fastcall std::bad_exception::~bad_exception(void *Block); +void __cdecl std::bad_exception::~bad_exception(void *); // idb +unsigned int __thiscall std::filebuf::_M_set_buffer(_DWORD *this, int); +int __thiscall std::filebuf::_M_get_ext_pos(int this, int); +int __fastcall std::filebuf::_M_destroy_pback(int); +int __fastcall std::filebuf::_M_terminate_output(int); +bool __thiscall std::filebuf::_M_convert_to_external(int this, char *, unsigned int); +void __fastcall std::filebuf::_M_destroy_internal_buffer(int); +void __fastcall std::filebuf::_M_allocate_internal_buffer(int); +_DWORD *__thiscall std::filebuf::open(_DWORD *this, char *, int); +_DWORD *__thiscall std::filebuf::open(_DWORD *this, wchar_t *, int); +int __thiscall std::filebuf::swap(int this, int); +int __fastcall std::filebuf::sync(_DWORD *); +struct _Unwind_Exception *__fastcall std::filebuf::close(struct _Unwind_Exception *); +char __thiscall std::filebuf::imbue(char *this, int a2); +int __thiscall std::filebuf::setbuf(int this, __int64); +int __thiscall std::filebuf::xsgetn(_DWORD *this, char *, signed int); +int __thiscall std::filebuf::xsputn(int this, unsigned __int8 *, signed int); +_DWORD *__thiscall std::filebuf::_M_seek(_DWORD *this, int, __int64, int, int); +_DWORD *__thiscall std::filebuf::seekoff(_DWORD *this, int, __int64, int, int); +_DWORD *__thiscall std::filebuf::seekpos(_DWORD *this, int, __int64, int, int, int); +int __thiscall std::filebuf::overflow(int this, int); +int __thiscall std::filebuf::pbackfail(char *this, int); +int __fastcall std::filebuf::showmanyc(_DWORD *); +int __fastcall std::filebuf::underflow(int); +int __thiscall std::filebuf::basic_filebuf(int this, std::locale *); +void __fastcall std::filebuf::basic_filebuf(int); +int __thiscall std::filebuf::basic_filebuf(int this, std::locale *); +void __fastcall std::filebuf::basic_filebuf(int); +void __fastcall std::filebuf::~filebuf(struct _Unwind_Exception *); +void __fastcall std::filebuf::~filebuf(struct _Unwind_Exception *); +void __fastcall std::filebuf::~filebuf(struct _Unwind_Exception *); +int __thiscall std::filebuf::operator=(int this, int); +unsigned int __thiscall std::wfilebuf::_M_set_buffer(_DWORD *this, int); +int __thiscall std::wfilebuf::_M_get_ext_pos(int this, int); +int __fastcall std::wfilebuf::_M_destroy_pback(int); +int __fastcall std::wfilebuf::_M_terminate_output(int); +bool __thiscall std::wfilebuf::_M_convert_to_external(int this, char *, unsigned int); +void __fastcall std::wfilebuf::_M_destroy_internal_buffer(int); +void __fastcall std::wfilebuf::_M_allocate_internal_buffer(int); +_DWORD *__thiscall std::wfilebuf::open(_DWORD *this, char *, int); +_DWORD *__thiscall std::wfilebuf::open(_DWORD *this, wchar_t *, int); +int __thiscall std::wfilebuf::swap(int this, int); +int __fastcall std::wfilebuf::sync(_DWORD *); +struct _Unwind_Exception *__fastcall std::wfilebuf::close(struct _Unwind_Exception *); +char __thiscall std::wfilebuf::imbue(char *this, int a2); +int __thiscall std::wfilebuf::setbuf(int this, __int64); +int __thiscall std::wfilebuf::xsgetn(_DWORD *this, char *, signed int); +int __thiscall std::wfilebuf::xsputn(int this, char *, signed int); +_DWORD *__thiscall std::wfilebuf::_M_seek(_DWORD *this, int, __int64, int, int); +_DWORD *__thiscall std::wfilebuf::seekoff(_DWORD *this, int, __int64, int, int); +_DWORD *__thiscall std::wfilebuf::seekpos(_DWORD *this, int, __int64, int, int, int); +int __thiscall std::wfilebuf::overflow(int this, int); +int __thiscall std::wfilebuf::pbackfail(char *this, int); +int __fastcall std::wfilebuf::showmanyc(_DWORD *); +int __fastcall std::wfilebuf::underflow(int); +int __thiscall std::wfilebuf::basic_filebuf(int this, std::locale *); +void __fastcall std::wfilebuf::basic_filebuf(int); +int __thiscall std::wfilebuf::basic_filebuf(int this, std::locale *); +void __fastcall std::wfilebuf::basic_filebuf(int); +void __fastcall std::wfilebuf::~wfilebuf(struct _Unwind_Exception *); +void __fastcall std::wfilebuf::~wfilebuf(struct _Unwind_Exception *); +void __fastcall std::wfilebuf::~wfilebuf(struct _Unwind_Exception *); +int __thiscall std::wfilebuf::operator=(int this, int); +int __thiscall std::fstream::open(int *this, char *, int); +int __thiscall std::fstream::open(int *this, wchar_t *, int); +int __thiscall std::fstream::open(int *this, char **, int); +void __thiscall std::fstream::swap(_DWORD *this, _DWORD *); +struct _Unwind_Exception *__fastcall std::fstream::close(_DWORD *); +void __thiscall std::fstream::basic_fstream(_DWORD *this, int *); +void __thiscall std::fstream::basic_fstream(_DWORD *this, char *, int); +void __thiscall std::fstream::basic_fstream(_DWORD *this, wchar_t *, int); +void __thiscall std::fstream::basic_fstream(_DWORD *this, char **, int); +void __fastcall std::fstream::basic_fstream(int); +void __thiscall std::fstream::basic_fstream(int *this, int *, _DWORD *); +void __thiscall std::fstream::basic_fstream(int *this, int *, char *, int); +void __thiscall std::fstream::basic_fstream(int *this, int *, wchar_t *, int); +void __thiscall std::fstream::basic_fstream(int *this, int *, char **, int); +void __thiscall std::fstream::basic_fstream(int *this, int *); +void __fastcall std::fstream::~fstream(_DWORD *); +void __fastcall std::fstream::~fstream(int); +void __thiscall std::fstream::~fstream(int *this, int *); +_DWORD *__thiscall std::fstream::operator=(_DWORD *this, _DWORD *); +int __thiscall std::wfstream::open(int *this, char *, int); +int __thiscall std::wfstream::open(int *this, wchar_t *, int); +int __thiscall std::wfstream::open(int *this, char **, int); +void __thiscall std::wfstream::swap(_DWORD *this, _DWORD *); +struct _Unwind_Exception *__fastcall std::wfstream::close(_DWORD *); +void __thiscall std::wfstream::basic_fstream(_DWORD *this, int *); +void __thiscall std::wfstream::basic_fstream(_DWORD *this, char *, int); +void __thiscall std::wfstream::basic_fstream(_DWORD *this, wchar_t *, int); +void __thiscall std::wfstream::basic_fstream(_DWORD *this, char **, int); +void __fastcall std::wfstream::basic_fstream(int); +void __thiscall std::wfstream::basic_fstream(int *this, int *, _DWORD *); +void __thiscall std::wfstream::basic_fstream(int *this, int *, char *, int); +void __thiscall std::wfstream::basic_fstream(int *this, int *, wchar_t *, int); +void __thiscall std::wfstream::basic_fstream(int *this, int *, char **, int); +void __thiscall std::wfstream::basic_fstream(int *this, int *); +void __fastcall std::wfstream::~wfstream(_DWORD *); +void __fastcall std::wfstream::~wfstream(int); +void __thiscall std::wfstream::~wfstream(int *this, int *); +_DWORD *__thiscall std::wfstream::operator=(_DWORD *this, _DWORD *); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +char *__thiscall std::wistream::_M_extract(char *this, int a2); +_DWORD *__thiscall std::wistream::get(_DWORD *this, _WORD *, int); +_DWORD *__thiscall std::wistream::get(_DWORD *this, _WORD *, int, __int16); +_DWORD *__thiscall std::wistream::get(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::wistream::get(_DWORD *this, _DWORD *, __int16); +_DWORD *__thiscall std::wistream::get(_DWORD *this, _WORD *); +int __fastcall std::wistream::get(_DWORD *); +int __fastcall std::wistream::peek(_DWORD *); +_DWORD *__thiscall std::wistream::read(_DWORD *this, int, int); +void __thiscall std::wistream::swap(_DWORD *this, _DWORD *); +int __fastcall std::wistream::sync(_DWORD *); +_DWORD *__thiscall std::wistream::seekg(_DWORD *this, int, int, int, int); +_DWORD *__thiscall std::wistream::seekg(_DWORD *this, int, int, int); +_DWORD *__thiscall std::wistream::tellg(_DWORD *this, _DWORD *); +int *__fastcall std::wistream::unget(int *); +_DWORD *__thiscall std::wistream::ignore(_DWORD *this, int); +_DWORD *__thiscall std::wistream::ignore(_DWORD *this, int, __int16); +_DWORD *__fastcall std::wistream::ignore(_DWORD *); +void __thiscall std::wistream::sentry::sentry(_BYTE *this, _DWORD *, char); +void __thiscall std::wistream::sentry::sentry(_BYTE *this, _DWORD *, char); +_DWORD *__thiscall std::wistream::getline(_DWORD *this, char *, int); +_DWORD *__thiscall std::wistream::getline(_DWORD *this, char *, int, __int16); +int *__thiscall std::wistream::putback(int *this, unsigned __int16); +struct _Unwind_Exception *__thiscall std::wistream::readsome(_DWORD *this, int, int); +void __thiscall std::wistream::basic_istream(_DWORD *this, int *); +void __thiscall std::wistream::basic_istream(_DWORD *this, int); +void __fastcall std::wistream::basic_istream(int); +int __thiscall std::wistream::basic_istream(int *this, int *, _DWORD *); +BOOL __thiscall std::wistream::basic_istream(int *this, int *, int); +BOOL __thiscall std::wistream::basic_istream(int *this, int *); +void __fastcall std::wistream::~wistream(char *Block); +_DWORD *__thiscall std::wistream::operator=(_DWORD *this, _DWORD *); +int __thiscall std::wistream::operator>>(void *this, int (__cdecl *)(void *)); +char *__thiscall std::wistream::operator>>(char *this, void (__cdecl *)(char *)); +char *__thiscall std::wistream::operator>>(char *this, void (__cdecl *)(char *)); +_DWORD *__thiscall std::wistream::operator>>(_DWORD *this, _DWORD *); +char *__thiscall std::wistream::operator>>(char *this, _DWORD *a2); +char *__thiscall std::wistream::operator>>(char *this, _WORD *a2); +int *__thiscall std::wostream::put(int *this, unsigned __int16); +void __thiscall std::wostream::swap(_DWORD *this, _DWORD *); +_DWORD *__fastcall std::wostream::flush(_DWORD *); +_DWORD *__thiscall std::wostream::seekp(_DWORD *this, int, int, int, int); +_DWORD *__thiscall std::wostream::seekp(_DWORD *this, int, int, int); +_DWORD *__thiscall std::wostream::tellp(_DWORD *this, int *); +int *__thiscall std::wostream::write(int *this, int, int); +int __thiscall std::wostream::sentry::sentry(_DWORD *this, int *); +int __thiscall std::wostream::sentry::sentry(_DWORD *this, int *); +void __fastcall std::wostream::sentry::~sentry(int); +void __fastcall std::wostream::sentry::~sentry(int); +int __thiscall std::wostream::_M_write(_DWORD *this, int, int); +int *__thiscall std::wostream::_M_insert(int *this, int); +int *__thiscall std::wostream::_M_insert(int *this, unsigned __int8); +int *__thiscall std::wostream::_M_insert(int *this, double); +int *__thiscall std::wostream::_M_insert(int *this, long double); +int *__thiscall std::wostream::_M_insert(int *this, int); +int *__thiscall std::wostream::_M_insert(int *this, int); +int *__thiscall std::wostream::_M_insert(int *this, int, int); +int *__thiscall std::wostream::_M_insert(int *this, int, int); +void __thiscall std::wostream::basic_ostream(_DWORD *this, _DWORD *); +void __thiscall std::wostream::basic_ostream(_DWORD *this, int); +int __thiscall std::wostream::basic_ostream(_DWORD *this, int); +void __fastcall std::wostream::basic_ostream(int); +int __thiscall std::wostream::basic_ostream(_DWORD *this, _DWORD *, _DWORD *); +BOOL __thiscall std::wostream::basic_ostream(int *this, int *, int); +void __fastcall std::wostream::~wostream(char *Block); +_DWORD *__thiscall std::wostream::operator=(_DWORD *this, _DWORD *); +int __thiscall std::wostream::operator<<(void *this, int (__cdecl *)(void *)); +char *__thiscall std::wostream::operator<<(char *this, void (__cdecl *)(char *)); +char *__thiscall std::wostream::operator<<(char *this, void (__cdecl *)(char *)); +int *__thiscall std::wostream::operator<<(int *this, _DWORD *); +int *__thiscall std::wostream::operator<<(int *this, float); +void __thiscall std::random_device::_M_init_pretr1(_DWORD *this, unsigned __int8 **); +// void __userpurge std::random_device::_M_init_pretr1(_DWORD *@, std::random_device **this, const std::string *); +int __fastcall std::random_device::_M_fini(int *); +// void __userpurge std::random_device::_M_init(_DWORD *@, std::random_device *this, const char *, unsigned int); +void *__thiscall std::random_device::_M_init(_DWORD *this, int); +// void __userpurge std::random_device::_M_init(_DWORD *@, std::random_device **this, const std::string *); +int __fastcall std::random_device::_M_getval(int); +// void __userpurge std::runtime_error::runtime_error(_DWORD *@, std::runtime_error *this, const char *); +void __thiscall std::runtime_error::runtime_error(_DWORD *this, int); +// void __userpurge std::runtime_error::runtime_error(_DWORD *@, std::runtime_error *this, const std::runtime_error *); +// void __userpurge std::runtime_error::runtime_error(_DWORD *@, std::runtime_error *this, const std::string *); +void __fastcall std::runtime_error::~runtime_error(void *); +void __cdecl std::runtime_error::~runtime_error(std::exception *); +int *__thiscall std::runtime_error::operator=(int *this, int); +int *__thiscall std::runtime_error::operator=(int *this, int); +int __fastcall std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(volatile signed __int32 **); +int __thiscall std::ifstream::open(int *this, char *, int); +int __thiscall std::ifstream::open(int *this, wchar_t *, int); +int __thiscall std::ifstream::open(int *this, char **, int); +void __thiscall std::ifstream::swap(_DWORD *this, _DWORD *); +struct _Unwind_Exception *__fastcall std::ifstream::close(_DWORD *); +void __thiscall std::ifstream::basic_ifstream(_DWORD *this, int *); +void __thiscall std::ifstream::basic_ifstream(_DWORD *this, char *, int); +void __thiscall std::ifstream::basic_ifstream(_DWORD *this, wchar_t *, int); +void __thiscall std::ifstream::basic_ifstream(_DWORD *this, char **, int); +void __fastcall std::ifstream::basic_ifstream(int); +void __thiscall std::ifstream::basic_ifstream(int *this, int *, _DWORD *); +void __thiscall std::ifstream::basic_ifstream(int *this, int *, char *, int); +void __thiscall std::ifstream::basic_ifstream(int *this, int *, wchar_t *, int); +void __thiscall std::ifstream::basic_ifstream(int *this, int *, char **, int); +void __thiscall std::ifstream::basic_ifstream(int *this, int *); +void __fastcall std::ifstream::~ifstream(_DWORD *); +void __fastcall std::ifstream::~ifstream(int); +void __thiscall std::ifstream::~ifstream(int *this, int *); +_DWORD *__thiscall std::ifstream::operator=(_DWORD *this, _DWORD *); +int __thiscall std::wifstream::open(int *this, char *, int); +int __thiscall std::wifstream::open(int *this, wchar_t *, int); +int __thiscall std::wifstream::open(int *this, char **, int); +void __thiscall std::wifstream::swap(_DWORD *this, _DWORD *); +struct _Unwind_Exception *__fastcall std::wifstream::close(_DWORD *); +void __thiscall std::wifstream::basic_ifstream(_DWORD *this, int *); +void __thiscall std::wifstream::basic_ifstream(_DWORD *this, char *, int); +void __thiscall std::wifstream::basic_ifstream(_DWORD *this, wchar_t *, int); +void __thiscall std::wifstream::basic_ifstream(_DWORD *this, char **, int); +void __fastcall std::wifstream::basic_ifstream(int); +void __thiscall std::wifstream::basic_ifstream(int *this, int *, _DWORD *); +void __thiscall std::wifstream::basic_ifstream(int *this, int *, char *, int); +void __thiscall std::wifstream::basic_ifstream(int *this, int *, wchar_t *, int); +void __thiscall std::wifstream::basic_ifstream(int *this, int *, char **, int); +void __thiscall std::wifstream::basic_ifstream(int *this, int *); +void __fastcall std::wifstream::~wifstream(_DWORD *); +void __fastcall std::wifstream::~wifstream(int); +void __thiscall std::wifstream::~wifstream(int *this, int *); +_DWORD *__thiscall std::wifstream::operator=(_DWORD *this, _DWORD *); +void __thiscall std::wiostream::swap(_DWORD *this, _DWORD *); +void __thiscall std::wiostream::basic_iostream(_DWORD *this, int *); +void __thiscall std::wiostream::basic_iostream(_DWORD *this, int); +void __fastcall std::wiostream::basic_iostream(int); +int __thiscall std::wiostream::basic_iostream(int *this, int *, _DWORD *); +void __thiscall std::wiostream::basic_iostream(int *this, int *, int); +void __thiscall std::wiostream::basic_iostream(int *this, int *); +void __fastcall std::wiostream::~basic_iostream(char *Block); +int __thiscall std::wiostream::~basic_iostream(int *this, int *); +_DWORD *__thiscall std::wiostream::operator=(_DWORD *this, _DWORD *); +int __thiscall std::ofstream::open(int *this, char *, int); +int __thiscall std::ofstream::open(int *this, wchar_t *, int); +int __thiscall std::ofstream::open(int *this, char **, int); +void __thiscall std::ofstream::swap(_DWORD *this, _DWORD *); +struct _Unwind_Exception *__fastcall std::ofstream::close(_DWORD *); +void __thiscall std::ofstream::basic_ofstream(_DWORD *this, _DWORD *); +void __thiscall std::ofstream::basic_ofstream(_DWORD *this, char *, int); +void __thiscall std::ofstream::basic_ofstream(_DWORD *this, wchar_t *, int); +void __thiscall std::ofstream::basic_ofstream(_DWORD *this, char **, int); +void __fastcall std::ofstream::basic_ofstream(int); +void __thiscall std::ofstream::basic_ofstream(int *this, int *, _DWORD *); +void __thiscall std::ofstream::basic_ofstream(int *this, int *, char *, int); +void __thiscall std::ofstream::basic_ofstream(int *this, int *, wchar_t *, int); +void __thiscall std::ofstream::basic_ofstream(int *this, int *, char **, int); +void __thiscall std::ofstream::basic_ofstream(int *this, int *); +void __fastcall std::ofstream::~ofstream(_DWORD *); +void __fastcall std::ofstream::~ofstream(int); +void __thiscall std::ofstream::~ofstream(int *this, int *); +_DWORD *__thiscall std::ofstream::operator=(_DWORD *this, _DWORD *); +int __thiscall std::wofstream::open(int *this, char *, int); +int __thiscall std::wofstream::open(int *this, wchar_t *, int); +int __thiscall std::wofstream::open(int *this, char **, int); +void __thiscall std::wofstream::swap(_DWORD *this, _DWORD *); +struct _Unwind_Exception *__fastcall std::wofstream::close(_DWORD *); +void __thiscall std::wofstream::basic_ofstream(_DWORD *this, _DWORD *); +void __thiscall std::wofstream::basic_ofstream(_DWORD *this, char *, int); +void __thiscall std::wofstream::basic_ofstream(_DWORD *this, wchar_t *, int); +void __thiscall std::wofstream::basic_ofstream(_DWORD *this, char **, int); +void __fastcall std::wofstream::basic_ofstream(int); +void __thiscall std::wofstream::basic_ofstream(int *this, int *, _DWORD *); +void __thiscall std::wofstream::basic_ofstream(int *this, int *, char *, int); +void __thiscall std::wofstream::basic_ofstream(int *this, int *, wchar_t *, int); +void __thiscall std::wofstream::basic_ofstream(int *this, int *, char **, int); +void __thiscall std::wofstream::basic_ofstream(int *this, int *); +void __fastcall std::wofstream::~wofstream(_DWORD *); +void __fastcall std::wofstream::~wofstream(int); +void __thiscall std::wofstream::~wofstream(int *this, int *); +_DWORD *__thiscall std::wofstream::operator=(_DWORD *this, _DWORD *); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int **, int); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***, int); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***, int); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int **, int); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***, int); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***, int); +void __fastcall std::codecvt_byname::~codecvt_byname(_DWORD *Block); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int **, int); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***, int); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***, int); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int **, int); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***, int); +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***, int); +void __fastcall std::codecvt_byname::~codecvt_byname(_DWORD *Block); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***, int); +void __fastcall std::collate_byname::~collate_byname(_DWORD *Block); +void __fastcall std::collate_byname::~collate_byname(_DWORD *); +void __fastcall std::collate_byname::~collate_byname(_DWORD *); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***, int); +void __fastcall std::collate_byname::~collate_byname(_DWORD *Block); +void __fastcall std::collate_byname::~collate_byname(_DWORD *); +void __fastcall std::collate_byname::~collate_byname(_DWORD *); +// void __userpurge std::overflow_error::overflow_error(_DWORD *@, std::overflow_error *this, const char *); +void __thiscall std::overflow_error::overflow_error(_DWORD *this, int); +// void __userpurge std::overflow_error::overflow_error(_DWORD *@, std::overflow_error *this, const std::string *); +void __fastcall std::overflow_error::~overflow_error(_DWORD *); +void __cdecl std::overflow_error::~overflow_error(std::exception *); +void __fastcall std::_Rb_tree_header::_Rb_tree_header(_DWORD *); +void __fastcall std::_Sp_counted_ptr::_M_destroy(void *Block); +void __fastcall std::_Sp_counted_ptr::_M_dispose(int); +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr(void *Block); +void __fastcall std::_Sp_counted_ptr::_M_destroy(void *Block); +void __fastcall std::_Sp_counted_ptr::_M_dispose(int); +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr(void *Block); +void __fastcall std::_Sp_counted_ptr::_M_destroy(void *Block); +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr(void *Block); +void __fastcall std::_Sp_counted_ptr::_M_destroy(void *Block); +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr(void *Block); +void __fastcall std::_Sp_counted_ptr::_M_destroy(void *Block); +void __fastcall std::_Sp_counted_ptr::_M_dispose(int); +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr(void *Block); +void __fastcall std::_Sp_counted_ptr::_M_destroy(void *Block); +void __fastcall std::_Sp_counted_ptr::_M_dispose(int); +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr(void *Block); +_DWORD *__thiscall std::streambuf::pubseekoff(_DWORD *this, int, int, int, int, int); +_DWORD *__thiscall std::streambuf::pubseekpos(_DWORD *this, int, int, int, int, int, int); +void __thiscall std::streambuf::swap(int this, int); +int __stdcall std::streambuf::imbue(int); // weak +int __thiscall std::streambuf::sputc(_DWORD *this, unsigned __int8); +int __fastcall std::streambuf::uflow(_DWORD *); +int __fastcall std::streambuf::sbumpc(_DWORD *); +void *__thiscall std::streambuf::setbuf(void *this, int, int); +int __fastcall std::streambuf::snextc(_DWORD *); +int (*__fastcall std::streambuf::stossc(_DWORD *))(void); +int __thiscall std::streambuf::xsgetn(_DWORD *this, char *, int); +int __thiscall std::streambuf::xsputn(_DWORD *this, unsigned __int8 *, int); +_DWORD *__thiscall std::streambuf::seekoff(_DWORD *this, int, int, int, int, int); +_DWORD *__thiscall std::streambuf::seekpos(_DWORD *this, int, int, int, int, int, int); +int __fastcall std::streambuf::sungetc(_DWORD *); +int __stdcall std::streambuf::overflow(int); +volatile signed __int32 **__thiscall std::streambuf::pubimbue(volatile signed __int32 **this, volatile signed __int32 **, volatile signed __int32 **); +int __stdcall std::streambuf::pbackfail(int); +void *__thiscall std::streambuf::pubsetbuf(void *this, int a2, int a3); +int __thiscall std::streambuf::sputbackc(_DWORD *this, unsigned __int8); +int std::streambuf::underflow(); +// volatile signed __int32 *__userpurge std::streambuf::basic_streambuf@(_DWORD *@, std::locale *, const std::locale *); +void __fastcall std::streambuf::~streambuf(char *Block); +volatile signed __int32 **__thiscall std::streambuf::operator=(volatile signed __int32 **this, int); +_DWORD *__thiscall std::wstreambuf::pubseekoff(_DWORD *this, int, int, int, int, int); +_DWORD *__thiscall std::wstreambuf::pubseekpos(_DWORD *this, int, int, int, int, int, int); +void __thiscall std::wstreambuf::swap(int this, int); +int __stdcall std::wstreambuf::imbue(int); // weak +int __thiscall std::wstreambuf::sputc(_DWORD *this, int); +int __fastcall std::wstreambuf::uflow(_DWORD *); +int __fastcall std::wstreambuf::sbumpc(_DWORD *); +void *__thiscall std::wstreambuf::setbuf(void *this, int, int); +int __fastcall std::wstreambuf::snextc(_DWORD *); +int (*__fastcall std::wstreambuf::stossc(_DWORD *))(void); +int __thiscall std::wstreambuf::xsgetn(_DWORD *this, char *, int); +int __thiscall std::wstreambuf::xsputn(_DWORD *this, char *, int); +_DWORD *__thiscall std::wstreambuf::seekoff(_DWORD *this, int, int, int, int, int); +_DWORD *__thiscall std::wstreambuf::seekpos(_DWORD *this, int, int, int, int, int, int); +int __fastcall std::wstreambuf::sungetc(_DWORD *); +int __stdcall std::wstreambuf::overflow(int); +volatile signed __int32 **__thiscall std::wstreambuf::pubimbue(volatile signed __int32 **this, volatile signed __int32 **, volatile signed __int32 **); +int __stdcall std::wstreambuf::pbackfail(int); +void *__thiscall std::wstreambuf::pubsetbuf(void *this, int a2, int a3); +int __thiscall std::wstreambuf::sputbackc(_DWORD *this, int); +int std::wstreambuf::underflow(); +// volatile signed __int32 *__userpurge std::wstreambuf::basic_streambuf@(_DWORD *@, std::locale *, const std::locale *); +void __fastcall std::wstreambuf::~wstreambuf(char *Block); +volatile signed __int32 **__thiscall std::wstreambuf::operator=(volatile signed __int32 **this, int); +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **, int); +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **, int); +void __fastcall std::messages_byname::~messages_byname(_DWORD *Block); +void __fastcall std::messages_byname::~messages_byname(_DWORD *); +void __fastcall std::messages_byname::~messages_byname(_DWORD *); +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **, int); +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **, int); +void __fastcall std::messages_byname::~messages_byname(_DWORD *Block); +void __fastcall std::messages_byname::~messages_byname(_DWORD *); +void __fastcall std::messages_byname::~messages_byname(_DWORD *); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *Block); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *Block); +void __fastcall std::time_get_byname>::~time_get_byname(_DWORD *Block); +void __fastcall std::time_get_byname>::~time_get_byname(_DWORD *Block); +void __fastcall std::time_put_byname>::~time_put_byname(_DWORD *Block); +void __fastcall std::time_put_byname>::~time_put_byname(_DWORD *Block); +// void __userpurge std::underflow_error::underflow_error(_DWORD *@, std::underflow_error *this, const char *); +void __thiscall std::underflow_error::underflow_error(_DWORD *this, int); +// void __userpurge std::underflow_error::underflow_error(_DWORD *@, std::underflow_error *this, const std::string *); +void __fastcall std::underflow_error::~underflow_error(_DWORD *); +void __cdecl std::underflow_error::~underflow_error(std::exception *); +int __fastcall std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(volatile signed __int32 *); +void __fastcall std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy(int); +void __thiscall std::__numpunct_cache::_M_cache(int this, int); +void __fastcall std::__numpunct_cache::~__numpunct_cache(void *); +void __cdecl std::__numpunct_cache::~__numpunct_cache(std::locale::facet *); +void __cdecl std::__numpunct_cache::~__numpunct_cache(std::locale::facet *); +void __thiscall std::__numpunct_cache::_M_cache(int this, int); +void __fastcall std::__numpunct_cache::~__numpunct_cache(void *); +void __cdecl std::__numpunct_cache::~__numpunct_cache(std::locale::facet *); +void __cdecl std::__numpunct_cache::~__numpunct_cache(std::locale::facet *); +// void __userpurge std::invalid_argument::invalid_argument(_DWORD *@, std::invalid_argument *this, const char *); +void __thiscall std::invalid_argument::invalid_argument(_DWORD *this, int); +// void __userpurge std::invalid_argument::invalid_argument(_DWORD *@, std::invalid_argument *this, const std::string *); +void __fastcall std::invalid_argument::~invalid_argument(_DWORD *); +void __cdecl std::invalid_argument::~invalid_argument(std::exception *); +void __fastcall std::__timepunct_cache::~__timepunct_cache(_DWORD *Block); +void __fastcall std::__timepunct_cache::~__timepunct_cache(_DWORD *Block); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block); +void __thiscall std::__moneypunct_cache::_M_cache(int this, int); +void __fastcall std::__moneypunct_cache::~__moneypunct_cache(void *); +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *); +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *); +void __thiscall std::__moneypunct_cache::_M_cache(int this, int); +void __fastcall std::__moneypunct_cache::~__moneypunct_cache(void *); +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *); +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *); +void __thiscall std::__moneypunct_cache::_M_cache(int this, int); +void __fastcall std::__moneypunct_cache::~__moneypunct_cache(void *); +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *); +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *); +void __thiscall std::__moneypunct_cache::_M_cache(int this, int); +void __fastcall std::__moneypunct_cache::~__moneypunct_cache(void *); +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *); +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *); +void __fastcall std::__codecvt_utf8_base::~__codecvt_utf8_base(_DWORD *Block); +void __fastcall std::__codecvt_utf8_base::~__codecvt_utf8_base(_DWORD *Block); +void __fastcall std::__codecvt_utf8_base::~__codecvt_utf8_base(_DWORD *Block); +void __fastcall std::__iosfail_type_info::~__iosfail_type_info(_DWORD *); +void __fastcall std::__codecvt_utf16_base::~__codecvt_utf16_base(_DWORD *Block); +void __fastcall std::__codecvt_utf16_base::~__codecvt_utf16_base(_DWORD *Block); +void __fastcall std::__codecvt_utf16_base::~__codecvt_utf16_base(_DWORD *Block); +void __fastcall std::bad_array_new_length::~bad_array_new_length(_DWORD *); +void __cdecl std::bad_array_new_length::~bad_array_new_length(std::exception *); +void __fastcall std::__codecvt_utf8_utf16_base::~__codecvt_utf8_utf16_base(_DWORD *Block); +void __fastcall std::__codecvt_utf8_utf16_base::~__codecvt_utf8_utf16_base(_DWORD *Block); +void __fastcall std::__codecvt_utf8_utf16_base::~__codecvt_utf8_utf16_base(_DWORD *Block); +void __fastcall std::_V2::error_category::~error_category(void *Block); +void __cdecl std::_V2::error_category::~error_category(std::_V2::error_category *__hidden this); // idb +void (__cdecl ***std::_V2::system_category())(_anonymous_namespace_::system_error_category *__hidden this); +char *__thiscall std::map>::operator[](_DWORD *this, int); +char *__thiscall std::map::operator[](_DWORD *this, int); +char *__thiscall std::map>::operator[](_DWORD *this, _DWORD *); +char *__thiscall std::map>::operator[](_DWORD *this, int); +void **__thiscall std::map::operator[](void **this, int); +void **__thiscall std::map::operator[](void **this, int); +_DWORD *__thiscall std::map>>::operator[](_DWORD *this, _DWORD *); +void __thiscall std::pair>::pair(_DWORD *this, _DWORD *); +void __thiscall std::pair>::pair,true>(_DWORD *this, int); +void __fastcall std::pair>::~pair(int); +void __fastcall std::pair::~pair(void **); +int __cdecl std::__pad>::_S_pad(_DWORD *a1, void *Src, char *a3, char *a4, int a5, int a6); +_WORD *__cdecl std::__pad>::_S_pad(_DWORD *, void *Src, _WORD *Size, _WORD *, int, int); +int __thiscall std::ctype::ctype(_DWORD *this, void **, char, int); +int __thiscall std::ctype::ctype(_DWORD *this, int, void **, char, int); +void __fastcall std::ctype::~ctype(void **Block); +void __fastcall std::ctype::~ctype(int); +int __fastcall std::ctype::_M_initialize_ctype(int); +int __thiscall std::ctype::ctype(_DWORD *this, char, int); +void __thiscall std::ctype::ctype(_DWORD *this, int); +void __fastcall std::ctype::~ctype(_DWORD *Block); +void __fastcall std::ctype::~ctype(_DWORD *); +int __fastcall std::deque>::back(_DWORD *); +int __fastcall std::deque>::pop_back(_DWORD *); +void __thiscall std::deque>::push_back(int this, int *); +int __fastcall std::deque>::pop_back(_DWORD *); +void __thiscall std::deque>::push_back(int this, int *); +void __thiscall std::deque::_M_push_back_aux(int this, int); +void __thiscall std::deque::push_back(_DWORD *this, int); +std::locale *std::locale::_S_initialize(); +std::locale *std::locale::_S_initialize_once(); +std::locale *__cdecl std::locale::_S_normalize_category(std::locale *this); +// void __userpurge std::locale::_Impl::_M_init_extra(int@, std::locale::_Impl *this, std::locale::facet **); +// void __userpurge std::locale::_Impl::_M_init_extra(int@, std::locale::_Impl *this, int *, int **, const char *, const char *); +// void __userpurge std::locale::_Impl::_M_install_cache(int@, std::locale::_Impl *this, const std::locale::facet *, unsigned int); +// void __userpurge std::locale::_Impl::_M_install_facet(_DWORD *@, std::locale::_Impl *this, const std::locale::id *, const std::locale::facet *); +// void __userpurge std::locale::_Impl::_M_replace_facet(_DWORD *@, std::locale::_Impl *this, const std::locale::_Impl *, const std::locale::id *); +// int __userpurge std::locale::_Impl::_M_replace_category@(int result@, _DWORD *@, std::locale::_Impl *this, volatile signed __int32 **, const std::locale::id *const *); +// void __userpurge std::locale::_Impl::_Impl(_DWORD *@, std::locale::_Impl *this, const std::locale::_Impl *, unsigned int); +// void __userpurge std::locale::_Impl::_Impl(_DWORD *@, std::locale::_Impl *this, unsigned int); +void __fastcall std::locale::_Impl::~_Impl(_DWORD *); +int *const *std::locale::facet::_S_get_c_name(); +int std::locale::facet::_S_get_c_locale(); +int __cdecl std::locale::facet::_S_clone_c_locale(); +int **__cdecl std::locale::facet::_S_create_c_locale(std::locale::facet *this, int **); +int **std::locale::facet::_S_initialize_once(); +std::locale::facet *__cdecl std::locale::facet::_S_destroy_c_locale(std::locale::facet *this); +void __fastcall std::locale::facet::~facet(void *Block); +void __cdecl std::locale::facet::~facet(std::locale::facet *__hidden this); // idb +std::locale *__cdecl std::locale::global(std::locale *this, volatile signed __int32 **); +_DWORD *std::locale::classic(); +// std::locale *__userpurge std::locale::locale@(_DWORD *@, std::locale *this, std::locale::_Impl *); +// volatile signed __int32 *__userpurge std::locale::locale@(volatile signed __int32 **@, volatile signed __int32 **this, const std::locale *); +void __fastcall std::locale::locale(_DWORD *); +void __fastcall std::locale::~locale(_DWORD **); +volatile signed __int32 **__thiscall std::locale::operator=(volatile signed __int32 **this, volatile signed __int32 **); +char *__thiscall std::vector>::_M_realloc_insert const&>(void **this, char *a2, _DWORD *a3); +void __thiscall std::vector>::push_back(void **this, _DWORD *a2); +char *__thiscall std::vector>::_M_realloc_insert const&>(void **this, char *a2, _DWORD *a3); +char *__thiscall std::vector>::push_back(void **this, _DWORD *a2); +void __thiscall std::vector>::vector(_DWORD *this, _DWORD *); +void __fastcall std::vector>::~vector(void **); +char *__thiscall std::vector>::_M_realloc_insert const&>(void **this, char *a2, _DWORD *a3); +void __thiscall std::vector>::push_back(void **this, _DWORD *a2); +void __fastcall std::vector>::~vector(void **); +void __thiscall std::vector::_M_realloc_insert(struct _Unwind_Exception **this, void **, _DWORD *); +void __thiscall std::vector::push_back(int this, _DWORD *); +void __fastcall std::vector::~vector(void ***); +char *__thiscall std::vector::_M_realloc_insert(char **this, char *, int *); +char *__thiscall std::vector::push_back(int this, int *); +void __fastcall std::vector::~vector(void **); +_DWORD *__thiscall std::vector::emplace_back(char **this, _DWORD *a2); +void __thiscall std::vector::_M_realloc_insert(char **this, char *a2, int a3); +unsigned int __thiscall std::vector::_M_realloc_insert(char **this, char *a2, _DWORD *a3); +void __thiscall std::vector::push_back(char **this, int a2); +void __fastcall std::vector::~vector(void ***); +char *__thiscall std::vector>::emplace_back>(void **this, _DWORD *a2); +char *__thiscall std::vector>::_M_realloc_insert>(void **this, char *a2, _DWORD *a3); +void __fastcall std::vector>::~vector(void **); +void __thiscall std::vector>>::emplace_back>>(char **this, _DWORD *); +char *__thiscall std::vector>>::_M_realloc_insert>>(char **this, char *a2, _DWORD *a3); +char *__thiscall std::vector>::_M_realloc_insert>(void **this, char *a2, _DWORD *a3); +void __fastcall std::vector>::~vector(void **); +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int, int, int); +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +void __fastcall std::moneypunct::~moneypunct(_DWORD *); +void __thiscall std::string::_M_destroy(void **this, int); +void __fastcall std::string::_M_dispose(void **); +unsigned int **__thiscall std::string::_M_replace(unsigned int **this, size_t a2, size_t a3, char *Src, size_t a5); +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, size_t Size, char); +_BYTE *__thiscall std::string::_M_construct<__gnu_cxx::__normal_iterator>(_DWORD *this, _BYTE *Src, int, int); +_BYTE *__thiscall std::string::_M_construct<__gnu_cxx::__normal_iterator>(_DWORD *this, _BYTE *Src, int, int); +int __thiscall std::string::_M_construct(void **this, unsigned __int8 *Src, size_t Size); +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int, int); +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int); +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int); +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int); +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int); +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int, int); +int __cdecl std::string::_S_copy_chars(_BYTE *, unsigned __int8 *Src, size_t Size); +void __fastcall std::string::shrink_to_fit(_DWORD *); +_DWORD *__thiscall std::string::_M_replace_aux(_DWORD *this, size_t, int, size_t, char); +_BYTE *__thiscall std::string::_M_construct_aux_2(_DWORD *this, size_t Size, char); +unsigned int __thiscall std::string::at(_DWORD *this, unsigned int); +_BYTE *__thiscall std::string::swap(_DWORD *this, _DWORD *); +char *__thiscall std::string::erase(int *this, char *); +_BYTE *__thiscall std::string::erase(int *this, _BYTE *a2, int a3); +int __thiscall std::string::erase(int *this, int); +_BYTE *__thiscall std::string::erase(int *this, _BYTE *a2, int a3); +int *__thiscall std::string::erase(int *this, unsigned int, unsigned int); +_DWORD *__thiscall std::string::append(_DWORD *this, char *Str); +_DWORD *__thiscall std::string::append(_DWORD *this, _BYTE *Src, size_t Size); +_DWORD *__thiscall std::string::append(_DWORD *this, int); +_DWORD *__thiscall std::string::append(_DWORD *this, _DWORD *a2, unsigned int a3, size_t a4); +_DWORD *__thiscall std::string::append(_DWORD *this, _BYTE *Src, size_t Size); +_DWORD *__thiscall std::string::append(_DWORD *this, size_t, char); +_DWORD *__thiscall std::string::assign(_DWORD *this, int); +unsigned int **__thiscall std::string::assign(unsigned int **this, char *Str); +unsigned int **__thiscall std::string::assign(unsigned int **this, char *a2, size_t a3); +void *__thiscall std::string::assign(void *this, int); +unsigned int **__thiscall std::string::assign(unsigned int **this, _DWORD *a2, unsigned int a3, size_t a4); +unsigned int **__thiscall std::string::assign(unsigned int **this, char *a2, size_t a3); +_DWORD *__thiscall std::string::assign(_DWORD *this, size_t, char); +size_t __thiscall std::string::insert(unsigned int **this, int a2, char *a3, size_t a4); +size_t __thiscall std::string::insert(_DWORD *this, int, char); +size_t __thiscall std::string::insert(_DWORD *this, int, size_t, char); +unsigned int **__thiscall std::string::insert(unsigned int **this, int a2, char *a3, size_t a4); +size_t __thiscall std::string::insert(_DWORD *this, int, char); +_DWORD *__thiscall std::string::insert(_DWORD *this, int, size_t, char); +unsigned int **__thiscall std::string::insert(unsigned int **this, unsigned int a2, char *Str); +unsigned int **__thiscall std::string::insert(unsigned int **this, unsigned int a2, char *a3, size_t a4); +unsigned int **__thiscall std::string::insert(unsigned int **this, unsigned int a2, int a3); +unsigned int **__thiscall std::string::insert(unsigned int **this, unsigned int a2, _DWORD *a3, char *a4, size_t a5); +_DWORD *__thiscall std::string::insert(_DWORD *this, unsigned int, size_t, char); +unsigned int **__thiscall std::string::insert<__gnu_cxx::__normal_iterator>(unsigned int **this, int a2, char *a3, int a4); +_DWORD *__thiscall std::string::resize(int *this, _DWORD *); +_DWORD *__thiscall std::string::resize(int *this, _DWORD *, char); +int __cdecl std::string::_S_copy(_BYTE *, unsigned __int8 *Src, int Size); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, int a4); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *Str); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *Str); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, int a4); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, unsigned int a2, unsigned int a3, char *Str); +unsigned int **__thiscall std::string::replace(unsigned int **this, unsigned int a2, unsigned int a3, char *a4, size_t a5); +unsigned int **__thiscall std::string::replace(unsigned int **this, unsigned int a2, unsigned int a3, int a4); +unsigned int **__thiscall std::string::replace(unsigned int **this, unsigned int a2, unsigned int a3, _DWORD *a4, unsigned int a5, size_t a6); +_DWORD *__thiscall std::string::replace(_DWORD *this, unsigned int, unsigned int, size_t, char); +void __thiscall std::string::reserve(_DWORD *this, unsigned int); +int __thiscall std::string::_M_erase(int *this, int, int); +_DWORD *__thiscall std::string::_M_append(_DWORD *this, _BYTE *Src, size_t Size); +void __thiscall std::string::_M_assign(int this, int); +void *__stdcall std::string::_M_create(unsigned int *, unsigned int); +int __thiscall std::string::_M_mutate(int this, size_t Size, int a3, _BYTE *a4, size_t a5); +_DWORD *__thiscall std::string::push_back(_DWORD *this, char); +_DWORD *__thiscall std::string::basic_string(_DWORD *this, _DWORD *); +_BYTE *__thiscall std::string::basic_string(_DWORD *this, int, int); +_BYTE *__thiscall std::string::basic_string(_DWORD *this, char *Str, int); +_BYTE *__thiscall std::string::basic_string(char *this, int); +_BYTE *__thiscall std::string::basic_string(char *this, int, int); +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *, unsigned int, int); +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *, unsigned int, int); +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *, unsigned int, unsigned int, int); +_BYTE *__thiscall std::string::basic_string(char *this, size_t Size, char, int); +_BYTE *__thiscall std::string::basic_string<__gnu_cxx::__normal_iterator,void>(char *this, char *Src, int, int); +_BYTE *__thiscall std::string::basic_string(char *this, char *Src, int, int); +_DWORD *__thiscall std::string::basic_string(_DWORD *this, _DWORD *); +_BYTE *__thiscall std::string::basic_string(_DWORD *this, int, int); +_BYTE *__thiscall std::string::basic_string(_DWORD *this, char *Str, int); +_BYTE *__thiscall std::string::basic_string(char *this, int); +_BYTE *__thiscall std::string::basic_string(char *this, int, int); +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *, unsigned int, int); +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *, unsigned int, int); +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *, unsigned int, unsigned int, int); +_BYTE *__thiscall std::string::basic_string(char *this, size_t Size, char, int); +_BYTE *__thiscall std::string::basic_string<__gnu_cxx::__normal_iterator,void>(char *this, char *Src, int, int); +_BYTE *__thiscall std::string::basic_string(char *this, char *Src, int, int); +void __fastcall std::string::~string(void **); +void __fastcall std::string::~string(void **); +_DWORD *__thiscall std::string::operator=(_DWORD *this, _DWORD *); +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str); +void *__thiscall std::string::operator=(void *this, int); +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *a2, size_t a3); +_DWORD *__thiscall std::string::operator=(_DWORD *this, char); +_DWORD *__thiscall std::string::operator+=(_DWORD *this, char *Str); +_DWORD *__thiscall std::string::operator+=(_DWORD *this, int); +_DWORD *__thiscall std::string::operator+=(_DWORD *this, _BYTE *Src, size_t Size); +_DWORD *__thiscall std::string::operator+=(_DWORD *this, char); +void __thiscall std::wstring::_M_destroy(void **this, int); +void __fastcall std::wstring::_M_dispose(void **); +unsigned int **__thiscall std::wstring::_M_replace(unsigned int **this, int a2, unsigned int a3, char *Src, unsigned int a5); +int __thiscall std::wstring::_M_construct(_DWORD *this, unsigned int, __int16); +_WORD *__thiscall std::wstring::_M_construct<__gnu_cxx::__normal_iterator>(_DWORD *this, _WORD *Src, int, int); +_WORD *__thiscall std::wstring::_M_construct<__gnu_cxx::__normal_iterator>(_DWORD *this, _WORD *Src, int, int); +_WORD *__thiscall std::wstring::_M_construct(_DWORD *this, _WORD *Src, int, int); +_WORD *__thiscall std::wstring::_M_construct(_DWORD *this, _WORD *Src, int); +_WORD *__thiscall std::wstring::_M_construct(_DWORD *this, _WORD *Src, int); +_WORD *__thiscall std::wstring::_M_construct(_DWORD *this, _WORD *Src, int, int); +_WORD *__thiscall std::wstring::_M_construct(_DWORD *this, _WORD *Src, int); +int __cdecl std::wstring::_S_copy_chars(_WORD *, unsigned __int16 *Src, size_t Size); +int __cdecl std::wstring::_S_copy_chars(_WORD *, unsigned __int16 *Src, size_t Size); +int __cdecl std::wstring::_S_copy_chars(_WORD *, unsigned __int16 *Src, size_t Size); +int __cdecl std::wstring::_S_copy_chars(_WORD *, unsigned __int16 *Src, size_t Size); +void __fastcall std::wstring::shrink_to_fit(_DWORD *); +_DWORD *__thiscall std::wstring::_M_replace_aux(_DWORD *this, int, int, unsigned int, __int16); +int __thiscall std::wstring::_M_construct_aux_2(_DWORD *this, unsigned int, __int16); +unsigned int __thiscall std::wstring::at(_DWORD *this, unsigned int a2); +_WORD *__thiscall std::wstring::swap(_DWORD *this, _DWORD *); +char *__thiscall std::wstring::erase(int *this, char *); +_WORD *__thiscall std::wstring::erase(int *this, _WORD *, int); +int __thiscall std::wstring::erase(int *this, int); +_WORD *__thiscall std::wstring::erase(int *this, _WORD *, int); +int *__thiscall std::wstring::erase(int *this, unsigned int, unsigned int); +_DWORD *__thiscall std::wstring::append(_DWORD *this, wchar_t *String); +_DWORD *__thiscall std::wstring::append(_DWORD *this, _WORD *Src, unsigned int); +_DWORD *__thiscall std::wstring::append(_DWORD *this, int); +_DWORD *__thiscall std::wstring::append(_DWORD *this, _DWORD *, unsigned int, unsigned int); +_DWORD *__thiscall std::wstring::append(_DWORD *this, _WORD *Src, unsigned int); +_DWORD *__thiscall std::wstring::append(_DWORD *this, unsigned int, __int16); +_DWORD *__thiscall std::wstring::assign(_DWORD *this, _DWORD *); +unsigned int **__thiscall std::wstring::assign(unsigned int **this, wchar_t *String); +unsigned int **__thiscall std::wstring::assign(unsigned int **this, char *a2, int a3); +void *__thiscall std::wstring::assign(void *this, int); +unsigned int **__thiscall std::wstring::assign(unsigned int **this, _DWORD *a2, unsigned int a3, unsigned int a4); +unsigned int **__thiscall std::wstring::assign(unsigned int **this, char *a2, int a3); +_DWORD *__thiscall std::wstring::assign(_DWORD *this, unsigned int, __int16); +unsigned int __thiscall std::wstring::insert(unsigned int **this, int a2, char *a3, int a4); +int __thiscall std::wstring::insert(_DWORD *this, int, unsigned int, __int16); +int __thiscall std::wstring::insert(_DWORD *this, int, __int16); +unsigned int **__thiscall std::wstring::insert(unsigned int **this, int a2, char *a3, int a4); +_DWORD *__thiscall std::wstring::insert(_DWORD *this, int, unsigned int, __int16); +int __thiscall std::wstring::insert(_DWORD *this, int, __int16); +unsigned int **__thiscall std::wstring::insert(unsigned int **this, unsigned int a2, wchar_t *String); +unsigned int **__thiscall std::wstring::insert(unsigned int **this, unsigned int a2, char *a3, int a4); +unsigned int **__thiscall std::wstring::insert(unsigned int **this, unsigned int a2, int a3); +unsigned int **__thiscall std::wstring::insert(unsigned int **this, unsigned int a2, _DWORD *a3, unsigned int a4, unsigned int a5); +_DWORD *__thiscall std::wstring::insert(_DWORD *this, unsigned int, unsigned int, __int16); +unsigned int **__thiscall std::wstring::insert<__gnu_cxx::__normal_iterator>(unsigned int **this, int a2, char *a3, int a4); +_DWORD *__thiscall std::wstring::resize(int *this, unsigned int); +_DWORD *__thiscall std::wstring::resize(int *this, unsigned int, __int16); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, int a4); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, wchar_t *String); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, wchar_t *String); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, int a4); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, unsigned int a2, unsigned int a3, wchar_t *String); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, unsigned int a2, unsigned int a3, char *a4, int a5); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, unsigned int a2, unsigned int a3, int a4); +unsigned int **__thiscall std::wstring::replace(unsigned int **this, unsigned int a2, unsigned int a3, _DWORD *a4, unsigned int a5, unsigned int a6); +_DWORD *__thiscall std::wstring::replace(_DWORD *this, unsigned int, unsigned int, unsigned int, __int16); +void __thiscall std::wstring::reserve(int this, unsigned int); +int __thiscall std::wstring::_M_erase(int *this, int, int); +_DWORD *__thiscall std::wstring::_M_append(_DWORD *this, _WORD *Src, int); +void __thiscall std::wstring::_M_assign(int this, int); +void *__stdcall std::wstring::_M_create(unsigned int *, unsigned int); +int __thiscall std::wstring::_M_mutate(int this, int a2, int a3, _WORD *a4, int a5); +int __cdecl std::wstring::_S_assign(_WORD *, int, __int16); +_DWORD *__thiscall std::wstring::push_back(_DWORD *this, __int16); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, wchar_t *String, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, unsigned int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, unsigned int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, unsigned int, unsigned int, int); +int __thiscall std::wstring::basic_string(_DWORD *this, unsigned int, __int16, int); +_WORD *__thiscall std::wstring::basic_string<__gnu_cxx::__normal_iterator,void>(_DWORD *this, _WORD *Src, int, int); +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, wchar_t *String, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, unsigned int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, unsigned int, int); +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *, unsigned int, unsigned int, int); +int __thiscall std::wstring::basic_string(_DWORD *this, unsigned int, __int16, int); +_WORD *__thiscall std::wstring::basic_string<__gnu_cxx::__normal_iterator,void>(_DWORD *this, _WORD *Src, int, int); +void __fastcall std::wstring::~wstring(void **); +void __fastcall std::wstring::~wstring(void **); +_DWORD *__thiscall std::wstring::operator=(_DWORD *this, int); +unsigned int **__thiscall std::wstring::operator=(unsigned int **this, wchar_t *String); +void *__thiscall std::wstring::operator=(void *this, int); +unsigned int **__thiscall std::wstring::operator=(unsigned int **this, char *a2, int a3); +_DWORD *__thiscall std::wstring::operator=(_DWORD *this, __int16); +_DWORD *__thiscall std::wstring::operator+=(_DWORD *this, wchar_t *String); +_DWORD *__thiscall std::wstring::operator+=(_DWORD *this, int); +_DWORD *__thiscall std::wstring::operator+=(_DWORD *this, _WORD *Src, unsigned int); +char *__thiscall std::wstring::operator+=(char *this, __int16 a2); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***, int); +void __fastcall std::collate_byname::~collate_byname(_DWORD *Block); +void __fastcall std::collate_byname::~collate_byname(_DWORD *); +void __fastcall std::collate_byname::~collate_byname(_DWORD *); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **, int); +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***, int); +void __fastcall std::collate_byname::~collate_byname(_DWORD *Block); +void __fastcall std::collate_byname::~collate_byname(_DWORD *); +void __fastcall std::collate_byname::~collate_byname(_DWORD *); +unsigned int __thiscall std::stringbuf::__xfer_bufptrs::__xfer_bufptrs(_DWORD *this, _DWORD *, int); +unsigned int __thiscall std::stringbuf::__xfer_bufptrs::__xfer_bufptrs(_DWORD *this, _DWORD *, int); +int __fastcall std::stringbuf::__xfer_bufptrs::~__xfer_bufptrs(int); +int __fastcall std::stringbuf::__xfer_bufptrs::~__xfer_bufptrs(int); +_DWORD *__thiscall std::stringbuf::_M_stringbuf_init(_DWORD *this, int); +int __thiscall std::stringbuf::str(int this, int); +void __thiscall std::stringbuf::swap(volatile signed __int32 **this, _DWORD *a2); +_DWORD *__thiscall std::stringbuf::setbuf(int this, _DWORD *, int); +int __thiscall std::stringbuf::_M_sync(_DWORD *this, _DWORD *, int, unsigned int); +_DWORD *__thiscall std::stringbuf::seekoff(_DWORD *this, _DWORD *, __int64, int, unsigned int); +_DWORD *__thiscall std::stringbuf::seekpos(_DWORD *this, _DWORD *, __int64, int, int, int); +int __thiscall std::stringbuf::_M_pbump(_DWORD *this, int, int, __int64); +int __thiscall std::stringbuf::overflow(_DWORD *this, int); +int __thiscall std::stringbuf::pbackfail(int this, int); +void __thiscall std::stringbuf::basic_stringbuf(_DWORD *this, std::locale *); +std::locale *__thiscall std::stringbuf::basic_stringbuf(_DWORD *this, std::locale **, int); +void __thiscall std::stringbuf::basic_stringbuf(_DWORD *this, int, int); +char *__thiscall std::stringbuf::basic_stringbuf(_DWORD *this, int); +int __fastcall std::stringbuf::basic_stringbuf(int); +void __thiscall std::stringbuf::basic_stringbuf(_DWORD *this, std::locale *); +std::locale *__thiscall std::stringbuf::basic_stringbuf(_DWORD *this, std::locale **, int); +void __thiscall std::stringbuf::basic_stringbuf(_DWORD *this, int, int); +char *__thiscall std::stringbuf::basic_stringbuf(_DWORD *this, int); +int __fastcall std::stringbuf::basic_stringbuf(int); +void __fastcall std::stringbuf::~stringbuf(_DWORD *Block); +void __fastcall std::stringbuf::~stringbuf(int); +_DWORD *__thiscall std::stringbuf::operator=(_DWORD *this, int a2); +unsigned int __thiscall std::wstringbuf::__xfer_bufptrs::__xfer_bufptrs(_DWORD *this, _DWORD *, int); +unsigned int __thiscall std::wstringbuf::__xfer_bufptrs::__xfer_bufptrs(_DWORD *this, _DWORD *, int); +int __fastcall std::wstringbuf::__xfer_bufptrs::~__xfer_bufptrs(int); +int __fastcall std::wstringbuf::__xfer_bufptrs::~__xfer_bufptrs(int); +_DWORD *__thiscall std::wstringbuf::_M_stringbuf_init(_DWORD *this, int); +_DWORD *__thiscall std::wstringbuf::str(int this, int a2); +void __thiscall std::wstringbuf::swap(volatile signed __int32 **this, _DWORD *a2); +_DWORD *__thiscall std::wstringbuf::setbuf(_DWORD *this, _DWORD *, int); +_DWORD *__thiscall std::wstringbuf::_M_sync(_DWORD *this, _DWORD *a2, int a3, unsigned int a4); +_DWORD *__thiscall std::wstringbuf::seekoff(_DWORD *this, int, __int64, int, unsigned int); +_DWORD *__thiscall std::wstringbuf::seekpos(_DWORD *this, _DWORD *, __int64, int, int, int); +int __thiscall std::wstringbuf::_M_pbump(_DWORD *this, int, int, __int64); +int __thiscall std::wstringbuf::overflow(_DWORD *this, unsigned __int16); +int __thiscall std::wstringbuf::pbackfail(int this, int); +void __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, std::locale *); +int __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, std::locale **, int); +void __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, int, int); +int __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, int); +int __fastcall std::wstringbuf::basic_stringbuf(int); +void __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, std::locale *); +int __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, std::locale **, int); +void __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, int, int); +int __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, int); +int __fastcall std::wstringbuf::basic_stringbuf(int); +void __fastcall std::wstringbuf::~wstringbuf(_DWORD *Block); +void __fastcall std::wstringbuf::~wstringbuf(int); +_DWORD *__thiscall std::wstringbuf::operator=(_DWORD *this, int a2); +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **, int); +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **, int); +void __fastcall std::messages_byname::~messages_byname(_DWORD *Block); +void __fastcall std::messages_byname::~messages_byname(_DWORD *); +void __fastcall std::messages_byname::~messages_byname(_DWORD *); +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **, int); +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **, int); +void __fastcall std::messages_byname::~messages_byname(_DWORD *Block); +void __fastcall std::messages_byname::~messages_byname(_DWORD *); +void __fastcall std::messages_byname::~messages_byname(_DWORD *); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *Block); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **, int); +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *Block); +void __fastcall std::time_get_byname>::~time_get_byname(_DWORD *Block); +void __fastcall std::time_get_byname>::~time_get_byname(_DWORD *Block); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **, int); +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, struct _Unwind_Exception **, int); +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block); +int __thiscall std::basic_stringstream,std::allocator>::str(int this, int); +void __thiscall std::basic_stringstream,std::allocator>::swap(volatile signed __int32 **this, _DWORD *a2); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(_DWORD *this, int *); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(_DWORD *this, int, int); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(_DWORD *this, int); +void __fastcall std::basic_stringstream,std::allocator>::basic_stringstream(int); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(int *this, int *, _DWORD *); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(int *this, int *, int, int); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(int *this, int *, int); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(int *this, int *); +void __fastcall std::basic_stringstream,std::allocator>::~basic_stringstream(_DWORD *Block); +void __fastcall std::basic_stringstream,std::allocator>::~basic_stringstream(int); +int __thiscall std::basic_stringstream,std::allocator>::~basic_stringstream(char *this, int *); +_DWORD *__thiscall std::basic_stringstream,std::allocator>::operator=(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::basic_stringstream,std::allocator>::str(int this, int a2); +void __thiscall std::basic_stringstream,std::allocator>::swap(volatile signed __int32 **this, _DWORD *a2); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(_DWORD *this, _DWORD *); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(_DWORD *this, int, int); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(_DWORD *this, int); +void __fastcall std::basic_stringstream,std::allocator>::basic_stringstream(int); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(int *this, int *, _DWORD *); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(int *this, int *, int, int); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(int *this, int *, int); +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream(int *this, int *); +void __fastcall std::basic_stringstream,std::allocator>::~basic_stringstream(_DWORD *Block); +void __fastcall std::basic_stringstream,std::allocator>::~basic_stringstream(int); +int __thiscall std::basic_stringstream,std::allocator>::~basic_stringstream(char *this, int *); +_DWORD *__thiscall std::basic_stringstream,std::allocator>::operator=(_DWORD *this, _DWORD *); +int __thiscall std::istringstream::str(int this, int); +void __thiscall std::istringstream::swap(volatile signed __int32 **this, _DWORD *a2); +void __thiscall std::istringstream::basic_istringstream(_DWORD *this, _DWORD *); +void __thiscall std::istringstream::basic_istringstream(_DWORD *this, int, int); +void __thiscall std::istringstream::basic_istringstream(_DWORD *this, int); +void __fastcall std::istringstream::basic_istringstream(int); +void __thiscall std::istringstream::basic_istringstream(int *this, int *, _DWORD *); +void __thiscall std::istringstream::basic_istringstream(int *this, int *, int, int); +void __thiscall std::istringstream::basic_istringstream(int *this, int *, int); +void __thiscall std::istringstream::basic_istringstream(int *this, int *); +void __fastcall std::istringstream::~istringstream(_DWORD *Block); +void __fastcall std::istringstream::~istringstream(int); +int __thiscall std::istringstream::~istringstream(int *this, int *); +_DWORD *__thiscall std::istringstream::operator=(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::wistringstream::str(int this, int a2); +void __thiscall std::wistringstream::swap(volatile signed __int32 **this, _DWORD *a2); +void __thiscall std::wistringstream::basic_istringstream(_DWORD *this, _DWORD *); +void __thiscall std::wistringstream::basic_istringstream(_DWORD *this, int, int); +void __thiscall std::wistringstream::basic_istringstream(_DWORD *this, int); +void __fastcall std::wistringstream::basic_istringstream(int); +void __thiscall std::wistringstream::basic_istringstream(int *this, int *, _DWORD *); +void __thiscall std::wistringstream::basic_istringstream(int *this, int *, int, int); +void __thiscall std::wistringstream::basic_istringstream(int *this, int *, int); +void __thiscall std::wistringstream::basic_istringstream(int *this, int *); +void __fastcall std::wistringstream::~wistringstream(_DWORD *Block); +void __fastcall std::wistringstream::~wistringstream(int); +int __thiscall std::wistringstream::~wistringstream(int *this, int *); +_DWORD *__thiscall std::wistringstream::operator=(_DWORD *this, _DWORD *); +int __thiscall std::ostringstream::str(int this, int); +void __thiscall std::ostringstream::swap(volatile signed __int32 **this, _DWORD *a2); +void __thiscall std::ostringstream::basic_ostringstream(_DWORD *this, _DWORD *); +void __thiscall std::ostringstream::basic_ostringstream(_DWORD *this, int, int); +void __thiscall std::ostringstream::basic_ostringstream(_DWORD *this, int); +void __fastcall std::ostringstream::basic_ostringstream(int); +void __thiscall std::ostringstream::basic_ostringstream(int *this, int *, _DWORD *); +void __thiscall std::ostringstream::basic_ostringstream(int *this, int *, int, int); +void __thiscall std::ostringstream::basic_ostringstream(int *this, int *, int); +void __thiscall std::ostringstream::basic_ostringstream(int *this, int *); +void __fastcall std::ostringstream::~ostringstream(_DWORD *Block); +void __fastcall std::ostringstream::~ostringstream(int); +int __thiscall std::ostringstream::~ostringstream(int *this, int *); +_DWORD *__thiscall std::ostringstream::operator=(_DWORD *this, _DWORD *); +_DWORD *__thiscall std::wostringstream::str(int this, int a2); +void __thiscall std::wostringstream::swap(volatile signed __int32 **this, _DWORD *a2); +void __thiscall std::wostringstream::basic_ostringstream(_DWORD *this, _DWORD *); +void __thiscall std::wostringstream::basic_ostringstream(_DWORD *this, int, int); +void __thiscall std::wostringstream::basic_ostringstream(_DWORD *this, int); +void __fastcall std::wostringstream::basic_ostringstream(int); +void __thiscall std::wostringstream::basic_ostringstream(int *this, int *, _DWORD *); +void __thiscall std::wostringstream::basic_ostringstream(int *this, int *, int, int); +void __thiscall std::wostringstream::basic_ostringstream(int *this, int *, int); +void __thiscall std::wostringstream::basic_ostringstream(int *this, int *); +void __fastcall std::wostringstream::~wostringstream(_DWORD *Block); +void __fastcall std::wostringstream::~wostringstream(int); +int __thiscall std::wostringstream::~wostringstream(int *this, int *); +_DWORD *__thiscall std::wostringstream::operator=(_DWORD *this, _DWORD *); +int __thiscall std::collate::collate(_DWORD *this, char, int); +void __thiscall std::collate::collate(_DWORD *this, int); +int __thiscall std::collate::collate(_DWORD *this, char, int); +void __thiscall std::collate::collate(_DWORD *this, int); +void __fastcall std::collate::~collate(_DWORD *Block); +void __fastcall std::collate::~collate(_DWORD *); +void __fastcall std::collate::~collate(_DWORD *); +int __thiscall std::collate::collate(_DWORD *this, char, int); +void __thiscall std::collate::collate(_DWORD *this, int); +int __thiscall std::collate::collate(_DWORD *this, char, int); +void __thiscall std::collate::collate(_DWORD *this, int); +void __fastcall std::collate::~collate(_DWORD *Block); +void __fastcall std::collate::~collate(_DWORD *); +void __fastcall std::collate::~collate(_DWORD *); +void __thiscall std::messages::messages(_DWORD *this, int, int, int); +void __thiscall std::messages::messages(_DWORD *this, int); +void __thiscall std::messages::messages(_DWORD *this, int, int, int); +void __thiscall std::messages::messages(_DWORD *this, int); +void __fastcall std::messages::~messages(_DWORD *Block); +void __fastcall std::messages::~messages(_DWORD *); +void __fastcall std::messages::~messages(_DWORD *); +void __thiscall std::messages::messages(_DWORD *this, int, int, int); +void __thiscall std::messages::messages(_DWORD *this, int); +void __thiscall std::messages::messages(_DWORD *this, int, int, int); +void __thiscall std::messages::messages(_DWORD *this, int); +void __fastcall std::messages::~messages(_DWORD *Block); +void __fastcall std::messages::~messages(_DWORD *); +void __fastcall std::messages::~messages(_DWORD *); +_DWORD *__thiscall std::numpunct::_M_initialize_numpunct(_DWORD *this, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int); +void __fastcall std::numpunct::~numpunct(_DWORD *); +void __fastcall std::numpunct::~numpunct(_DWORD *); +int __thiscall std::numpunct::_M_initialize_numpunct(_DWORD *this, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int); +void __fastcall std::numpunct::~numpunct(_DWORD *); +void __fastcall std::numpunct::~numpunct(_DWORD *); +void __fastcall std::time_get>::~time_get(_DWORD *Block); +void __fastcall std::time_get>::~time_get(_DWORD *Block); +void __fastcall std::money_get>::~money_get(_DWORD *Block); +void __fastcall std::money_get>::~money_get(_DWORD *Block); +void __fastcall std::money_put>::~money_put(_DWORD *Block); +void __fastcall std::money_put>::~money_put(_DWORD *Block); +void __fastcall std::codecvt::~codecvt(_DWORD *Block); +void __fastcall std::codecvt::~codecvt(_DWORD *Block); +void __fastcall std::codecvt::~codecvt(_DWORD *Block); +void __fastcall std::codecvt::~codecvt(_DWORD *Block); +int __thiscall std::codecvt::codecvt(_DWORD *this, char, int); +void __thiscall std::codecvt::codecvt(_DWORD *this, int); +void __fastcall std::codecvt::~codecvt(_DWORD *); +void __fastcall std::codecvt::~codecvt(_DWORD *); +int __thiscall std::codecvt::codecvt(_DWORD *this, char, int); +void __thiscall std::codecvt::codecvt(_DWORD *this, int); +void __fastcall std::codecvt::~codecvt(_DWORD *); +void __fastcall std::codecvt::~codecvt(_DWORD *); +int __thiscall std::collate::collate(_DWORD *this, char, int); +void __thiscall std::collate::collate(_DWORD *this, int); +int __thiscall std::collate::collate(_DWORD *this, char, int); +void __thiscall std::collate::collate(_DWORD *this, int); +void __fastcall std::collate::~collate(_DWORD *Block); +void __fastcall std::collate::~collate(_DWORD *); +void __fastcall std::collate::~collate(_DWORD *); +int __thiscall std::collate::collate(_DWORD *this, char, int); +void __thiscall std::collate::collate(_DWORD *this, int); +int __thiscall std::collate::collate(_DWORD *this, char, int); +void __thiscall std::collate::collate(_DWORD *this, int); +void __fastcall std::collate::~collate(_DWORD *Block); +void __fastcall std::collate::~collate(_DWORD *); +void __fastcall std::collate::~collate(_DWORD *); +void __fastcall std::num_get>::~num_get(_DWORD *Block); +void __fastcall std::num_get>::~num_get(_DWORD *Block); +void __fastcall std::num_put>::~num_put(_DWORD *Block); +void __fastcall std::num_put>::~num_put(_DWORD *Block); +char *__thiscall std::_Rb_tree,std::less,std::allocator>::_M_insert_unique(_DWORD *this, int); +_DWORD *__thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_insert_node(_DWORD *this, int, _DWORD *, _DWORD *); +int __thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos(_DWORD *this, int); +_DWORD *__thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_hint_unique_pos(_DWORD *this, _DWORD *a2, int a3); +_DWORD *__thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::find(_DWORD *this, int); +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_insert_node(_DWORD *this, int, _DWORD *, _DWORD *); +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_emplace_unique>(_DWORD *this, _DWORD *); +int __thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos(_DWORD *this, int); +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos(_DWORD *this, _DWORD *a2, int a3); +void __fastcall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree(int); +int __thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos(_DWORD *this, int); +_DWORD *__thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_hint_unique_pos(_DWORD *this, _DWORD *a2, int a3); +void __fastcall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree(int); +int __thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos(_DWORD *this, int); +_DWORD *__thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_hint_unique_pos(_DWORD *this, _DWORD *a2, int a3); +int __thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos(_DWORD *this, int); +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos(_DWORD *this, _DWORD *a2, int a3); +int __thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos(_DWORD *this, int); +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos(_DWORD *this, _DWORD *a2, int a3); +void __fastcall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree(int); +_DWORD *__thiscall std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_get_insert_unique_pos(_DWORD *this, _DWORD *a2); +_DWORD *__thiscall std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_get_insert_hint_unique_pos(_DWORD *this, _DWORD *a2, int *a3); +void __fastcall std::bad_cast::~bad_cast(_DWORD *); +void __cdecl std::bad_cast::~bad_cast(std::exception *); +// int *__userpurge std::ios_base::_M_grow_words@(_DWORD *a1@, unsigned int this, char a3, bool a4); +int __cdecl std::ios_base::sync_with_stdio(std::ios_base *this); +void __thiscall std::ios_base::_M_call_callbacks(_DWORD *this, int); +_DWORD *__thiscall std::ios_base::register_callback(_DWORD *this, int, int); +void __fastcall std::ios_base::_M_dispose_callbacks(int); +void std::ios_base::Init::Init(); +void std::ios_base::Init::Init(); +void __cdecl std::ios_base::Init::~Init(); +volatile signed __int32 **__thiscall std::ios_base::imbue(volatile signed __int32 **ecx0, volatile signed __int32 **this, volatile signed __int32 **); +void __fastcall std::ios_base::_M_init(int); +// volatile signed __int32 **__userpurge std::ios_base::_M_move@(int@, std::ios_base *this, std::ios_base *); +// void __userpurge std::ios_base::_M_swap(std::ios_base **a1@, std::ios_base *this, std::ios_base *a3); +void __thiscall std::ios_base::failure[abi:cxx11]::failure(_DWORD *this, char *, int *); +void __thiscall std::ios_base::failure[abi:cxx11]::failure(_DWORD *this, int); +void __thiscall std::ios_base::failure[abi:cxx11]::failure(_DWORD *this, int, int *); +void __fastcall std::ios_base::failure[abi:cxx11]::~failure(_DWORD *Block); +// void __userpurge std::ios_base::failure::failure(_DWORD *@, std::ios_base::failure *this, const std::string *); +void __fastcall std::ios_base::failure::~failure(_DWORD *); +void __cdecl std::ios_base::failure::~failure(std::ios_base::failure *__hidden this); // idb +void __fastcall std::ios_base::ios_base(_DWORD *); +void __fastcall std::ios_base::~ios_base(int); +void __fastcall std::ios_base::~ios_base(int); +void __thiscall std::messages::messages(_DWORD *this, int, int, int); +void __thiscall std::messages::messages(_DWORD *this, int); +void __thiscall std::messages::messages(_DWORD *this, int, int, int); +void __thiscall std::messages::messages(_DWORD *this, int); +void __fastcall std::messages::~messages(_DWORD *Block); +void __fastcall std::messages::~messages(_DWORD *); +void __fastcall std::messages::~messages(_DWORD *); +void __thiscall std::messages::messages(_DWORD *this, int, int, int); +void __thiscall std::messages::messages(_DWORD *this, int); +void __thiscall std::messages::messages(_DWORD *this, int, int, int); +void __thiscall std::messages::messages(_DWORD *this, int); +void __fastcall std::messages::~messages(_DWORD *Block); +void __fastcall std::messages::~messages(_DWORD *); +void __fastcall std::messages::~messages(_DWORD *); +_DWORD *__thiscall std::numpunct::_M_initialize_numpunct(_DWORD *this, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int); +void __fastcall std::numpunct::~numpunct(_DWORD *); +void __fastcall std::numpunct::~numpunct(_DWORD *); +int __thiscall std::numpunct::_M_initialize_numpunct(_DWORD *this, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int, int); +void __thiscall std::numpunct::numpunct(_DWORD *this, int); +void __fastcall std::numpunct::~numpunct(_DWORD *); +void __fastcall std::numpunct::~numpunct(_DWORD *); +void __fastcall std::time_get>::~time_get(_DWORD *Block); +void __fastcall std::time_get>::~time_get(_DWORD *Block); +void __fastcall std::time_put>::~time_put(_DWORD *Block); +void __fastcall std::time_put>::~time_put(_DWORD *Block); +void __fastcall std::bad_alloc::~bad_alloc(_DWORD *); +void __cdecl std::bad_alloc::~bad_alloc(std::exception *); +int __thiscall std::ios::exceptions(_DWORD *this, int); +int __thiscall std::ios::_M_setstate(_DWORD *this, int); +void *__thiscall std::ios::_M_cache_locale(_DWORD *this, int); +int __thiscall std::ios::fill(int this, char); +BOOL __thiscall std::ios::init(int this, int); +int __thiscall std::ios::move(int this, std::ios_base *); +int __thiscall std::ios::move(int this, std::ios_base *); +void __thiscall std::ios::swap(int this, std::ios_base *); +int __thiscall std::ios::clear(_DWORD *this, int); +volatile signed __int32 **__thiscall std::ios::imbue(volatile signed __int32 **this, volatile signed __int32 **, volatile signed __int32 **); +int __thiscall std::ios::rdbuf(_DWORD *this, int); +int __thiscall std::ios::copyfmt(int this, _DWORD *); +int __thiscall std::ios::setstate(_DWORD *this, int); +void __thiscall std::ios::basic_ios(int this, int); +int __fastcall std::ios::basic_ios(int); +void __thiscall std::ios::basic_ios(int this, int); +int __fastcall std::ios::basic_ios(int); +void __fastcall std::ios::~ios(_DWORD *Block); +int __thiscall std::wios::exceptions(_DWORD *this, int); +int __thiscall std::wios::_M_setstate(_DWORD *this, int); +void *__thiscall std::wios::_M_cache_locale(_DWORD *this, int); +int __thiscall std::wios::fill(int this, __int16); +BOOL __thiscall std::wios::init(int this, int); +int __thiscall std::wios::move(int this, std::ios_base *); +int __thiscall std::wios::move(int this, std::ios_base *); +void __thiscall std::wios::swap(int this, std::ios_base *); +int __thiscall std::wios::clear(_DWORD *this, int); +volatile signed __int32 **__thiscall std::wios::imbue(volatile signed __int32 **this, volatile signed __int32 **, volatile signed __int32 **); +int __thiscall std::wios::rdbuf(_DWORD *this, int); +int __thiscall std::wios::copyfmt(int this, _DWORD *); +int __thiscall std::wios::setstate(_DWORD *this, int); +void __thiscall std::wios::basic_ios(int this, int); +int __fastcall std::wios::basic_ios(int); +void __thiscall std::wios::basic_ios(int this, int); +int __fastcall std::wios::basic_ios(int); +void __fastcall std::wios::~wios(_DWORD *Block); +void __fastcall std::exception::~exception(void *Block); +void __cdecl std::exception::~exception(std::exception *__hidden this); // idb +void __fastcall std::money_get>::~money_get(_DWORD *Block); +void __fastcall std::money_get>::~money_get(_DWORD *Block); +void __fastcall std::money_put>::~money_put(_DWORD *Block); +void __fastcall std::money_put>::~money_put(_DWORD *Block); +void __fastcall std::type_info::~type_info(void *Block); +void __cdecl std::type_info::~type_info(std::type_info *__hidden this); // idb +void __noreturn std::unexpected(void); // idb +_BYTE *__cdecl std::__int_to_char(_BYTE *a1, unsigned int a2, int a3, __int16 a4, char a5); +_BYTE *__cdecl std::__int_to_char(_BYTE *a1, unsigned int a2, unsigned int a3, int a4, __int16 a5, char a6); +int __cdecl std::__int_to_char(_WORD *, unsigned int, int, __int16, char); +int __cdecl std::__int_to_char(_WORD *, unsigned int, unsigned int, int, __int16, char); +void (*std::get_terminate(void))(void); +_BYTE *__cdecl std::__add_grouping(_BYTE *, char, char *, int, _BYTE *, _BYTE *); +_WORD *__cdecl std::__add_grouping(_WORD *, __int16, char *, int, char *, char *); +void __cdecl std::__convert_to_v(unsigned __int8 *, double *, _DWORD *); +void __cdecl std::__convert_to_v(char *String, long double *, _DWORD *); +void __cdecl std::__convert_to_v(unsigned __int8 *, float *, _DWORD *); +void (*std::get_unexpected(void))(void); +int std::get_new_handler(void); +int std::__convert_from_v(int *const *, char *, int, char *, ...); +std::ostream::sentry *__cdecl std::__ostream_insert>(std::ostream::sentry *, int, int); +int *__cdecl std::__ostream_insert>(int *, int, int); +int __cdecl std::__copy_streambufs>(_DWORD *, _DWORD *); +int __cdecl std::__copy_streambufs>(_DWORD *, _DWORD *); +int __cdecl std::__verify_grouping(char *, unsigned int, int); +int __cdecl std::__verify_grouping(char *, unsigned int, const char **); +void (__cdecl ***std::iostream_category(void))(_anonymous_namespace_::io_error_category *__hidden); +int __cdecl std::_Rb_tree_decrement(_DWORD *); +int __cdecl std::_Rb_tree_increment(int); +int __cdecl std::_Rb_tree_increment(int); +bool std::uncaught_exception(void); +int std::uncaught_exceptions(void); +int __cdecl std::_Rb_tree_black_count(_DWORD *, _DWORD *); +int __cdecl std::_Rb_tree_rotate_left(int, _DWORD *); +int __cdecl std::_Rb_tree_rotate_right(int, _DWORD *); +int __cdecl std::__copy_streambufs_eof>(_DWORD *, _DWORD *, _BYTE *); +int __cdecl std::__copy_streambufs_eof>(_DWORD *, _DWORD *, _BYTE *); +void __cdecl std::__destroy_ios_failure(void (__cdecl ***a1)(std::ios_base::failure *__hidden this)); +int __cdecl std::__verify_grouping_impl(const char *, unsigned int, const char *, unsigned int); +void __cdecl std::__construct_ios_failure(_DWORD *, char *); +bool __cdecl std::__is_ios_failure_handler(const __cxxabiv1::__class_type_info *); +void __noreturn std::__throw_out_of_range_fmt(char *Str, ...); +int *__cdecl std::_Rb_tree_rebalance_for_erase(int *, _DWORD *); +_DWORD *__cdecl std::_Rb_tree_insert_and_rebalance(char, _DWORD *, _DWORD *, _DWORD *); +_DWORD *__cdecl std::ws>(_DWORD *); +_DWORD *__cdecl std::ws>(_DWORD *); +std::ios_base *__cdecl std::hex(std::ios_base *); +_DWORD *__cdecl std::endl>(std::ostream::sentry *); +_DWORD *__cdecl std::endl>(int *); +std::ostream::sentry *__cdecl std::ends>(std::ostream::sentry *); +int *__cdecl std::ends>(int *); +std::istream::sentry *__cdecl std::getline,std::allocator>(std::istream::sentry *, _DWORD *); +std::istream::sentry *__cdecl std::getline,std::allocator>(std::istream::sentry *a1, _DWORD *a2, char a3); +_DWORD *__cdecl std::getline,std::allocator>(_DWORD *, _DWORD *, __int16); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +int __cdecl std::has_facet>>(int); +void __noreturn std::terminate(void); // idb +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +void *__cdecl std::use_facet>>(int); +bool __cdecl std::operator==(int, int); +bool __cdecl std::operator==(int, char *); +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *, char *Str); +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *, char *Str); +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *, char *Str); +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *, char); +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *, char); +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *, char); +_DWORD *__cdecl std::operator<<>(_DWORD *, int); +_DWORD *__cdecl std::operator<<>(_DWORD *, char); +std::ostream::sentry *__cdecl std::operator<<(std::ostream::sentry *, int *); +int *__cdecl std::operator<<>(int *, wchar_t *String); +int *__cdecl std::operator<<>(int *, char *Str); +int *__cdecl std::operator<<>(int *, __int16); +_DWORD *__cdecl std::operator<<>(_DWORD *, int); +_DWORD *__cdecl std::operator<<>(_DWORD *, __int16); +int *__cdecl std::operator<<>(int *, char); +unsigned int __cdecl std::operator<(int, int); +int __cdecl std::operator+(int, char *Str, int); // idb +_DWORD *__cdecl std::operator+(_DWORD *, int, int); +int __cdecl std::operator+(int, char, int); +int *__cdecl std::operator+(int *, char *Str, std::string *); +int *__cdecl std::operator+(int *, _DWORD *, std::string *); +int *__cdecl std::operator+(int *, char, std::string *); +int __cdecl std::operator+(int, wchar_t *String, int); // idb +_DWORD *__cdecl std::operator+(_DWORD *, int, int); +int __cdecl std::operator+(int, __int16, int); +int *__cdecl std::operator+(int *, wchar_t *String, _DWORD *); +int *__cdecl std::operator+(int *, _DWORD *, _DWORD *); +int *__cdecl std::operator+(int *, __int16, _DWORD *); +std::istream::sentry *__cdecl std::operator>>>(std::istream::sentry *, char *); +std::istream::sentry *__cdecl std::operator>>>(std::istream::sentry *, _BYTE *); +_DWORD *__cdecl std::operator>>>(_DWORD *, int); +_DWORD *__cdecl std::operator>>>(_DWORD *, char); +std::istream::sentry *__cdecl std::operator>>(std::istream::sentry *, _DWORD *); +int *__cdecl std::operator>>>(int *, _WORD *); +_DWORD *__cdecl std::operator>>>(_DWORD *, _WORD *); +_DWORD *__cdecl std::operator>>>(_DWORD *, int); +_DWORD *__cdecl std::operator>>>(_DWORD *, __int16); +void __fastcall `non-virtual thunk to'std::iostream::~iostream(int); +void __fastcall `non-virtual thunk to'std::fstream::~fstream(int); +void __fastcall `non-virtual thunk to'std::fstream::~fstream(int); +void __fastcall `non-virtual thunk to'std::wfstream::~wfstream(int); +void __fastcall `non-virtual thunk to'std::wfstream::~wfstream(int); +void __fastcall `non-virtual thunk to'std::wiostream::~basic_iostream(int); +void __fastcall `non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream(int); +void __fastcall `non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream(int); +void __fastcall `non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream(int); +void __fastcall `non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream(int); +void __fastcall `virtual thunk to'std::iostream::~iostream(_DWORD *); +void __fastcall `virtual thunk to'std::istream::~istream(_DWORD *); +void __fastcall `virtual thunk to'std::ostream::~ostream(_DWORD *); +void __fastcall `virtual thunk to'std::fstream::~fstream(_DWORD *); +void __fastcall `virtual thunk to'std::fstream::~fstream(_DWORD *); +void __fastcall `virtual thunk to'std::wfstream::~wfstream(_DWORD *); +void __fastcall `virtual thunk to'std::wfstream::~wfstream(_DWORD *); +void __fastcall `virtual thunk to'std::wistream::~wistream(_DWORD *); +void __fastcall `virtual thunk to'std::wostream::~wostream(_DWORD *); +void __fastcall `virtual thunk to'std::ifstream::~ifstream(_DWORD *); +void __fastcall `virtual thunk to'std::ifstream::~ifstream(_DWORD *); +void __fastcall `virtual thunk to'std::wifstream::~wifstream(_DWORD *); +void __fastcall `virtual thunk to'std::wifstream::~wifstream(_DWORD *); +void __fastcall `virtual thunk to'std::wiostream::~basic_iostream(_DWORD *); +void __fastcall `virtual thunk to'std::ofstream::~ofstream(_DWORD *); +void __fastcall `virtual thunk to'std::ofstream::~ofstream(_DWORD *); +void __fastcall `virtual thunk to'std::wofstream::~wofstream(_DWORD *); +void __fastcall `virtual thunk to'std::wofstream::~wofstream(_DWORD *); +void __fastcall `virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream(_DWORD *); +void __fastcall `virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream(_DWORD *); +void __fastcall `virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream(_DWORD *); +void __fastcall `virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream(_DWORD *); +void __fastcall `virtual thunk to'std::istringstream::~istringstream(_DWORD *); +void __fastcall `virtual thunk to'std::istringstream::~istringstream(_DWORD *); +void __fastcall `virtual thunk to'std::wistringstream::~wistringstream(_DWORD *); +void __fastcall `virtual thunk to'std::wistringstream::~wistringstream(_DWORD *); +void __fastcall `virtual thunk to'std::ostringstream::~ostringstream(_DWORD *); +void __fastcall `virtual thunk to'std::ostringstream::~ostringstream(_DWORD *); +void __fastcall `virtual thunk to'std::wostringstream::~wostringstream(_DWORD *); +void __fastcall `virtual thunk to'std::wostringstream::~wostringstream(_DWORD *); +int __fastcall std::filebuf::close(void)::__close_sentry::~__close_sentry(int *); +int __fastcall std::wfilebuf::close(void)::__close_sentry::~__close_sentry(int *); +void __cdecl operator delete[](void *Block); +void __cdecl operator delete(void *Block); +void __cdecl operator delete(void *Block); +_DWORD __cdecl operator new[](unsigned int); // idb +int __cdecl operator new[](unsigned int); +void *__cdecl operator new(size_t); +_DWORD *__cxa_allocate_dependent_exception(); +void *__cdecl __cxa_allocate_exception(size_t thrown_size); +void *__cdecl __cxa_begin_catch(void *); +void __cdecl __noreturn __cxa_call_terminate(_Unwind_Exception *); +void __cdecl __noreturn __cxa_call_unexpected(void *); +struct type_info *__cxa_current_exception_type(void); +void __noreturn __cxa_deleted_virtual(void); +void __cxa_end_catch(void); +void __cdecl __cxa_free_dependent_exception(char *Block); +void __cdecl __cxa_free_exception(void *); +_DWORD *__cxa_get_globals(); +_DWORD *__cxa_get_globals_fast(); +void __cdecl __cxa_guard_abort(__guard *); +int __cdecl __cxa_guard_acquire(__guard *); +void __cdecl __cxa_guard_release(__guard *); +int __cdecl __cxa_init_primary_exception(int, int, int); +void __noreturn __cxa_pure_virtual(void); +void __noreturn __cxa_rethrow(void); +void __cdecl __noreturn __cxa_throw(void *, struct type_info *lptinfo, void (__cdecl *)(void *)); +void *__cdecl __dynamic_cast(const void *lpsrc, const struct __class_type_info *lpstype, const struct __class_type_info *lpdtype, ptrdiff_t s2d); +int __cdecl __gxx_personality_sj0(int, int, __int64, _Unwind_Exception *v, struct _Unwind_Context *lpuctx); +void __tcf_0_1(void); // idb +void __tcf_0_2(void); // idb +void __tcf_0_3(void); // idb +void __cdecl __tcf_0_4(std::_V2::error_category *); +void __tcf_0_5(void); // idb +void __tcf_1_3(void); // idb +int __cdecl main(int argc, const char **argv, const char **envp); +int _GLOBAL__sub_I__Z5UsageiPPKc(); +int _GLOBAL__sub_I__ZN4WXSS11RemoveQuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(); +int _GLOBAL__sub_I__ZN4WXSS10CSSTreeLib6Parser5ParseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RS7_S9_(); +int _GLOBAL__sub_I__ZN4WXSS9Tokenizer2TTE(); +int _GLOBAL__sub_I__ZN4WXSS10CSSTreeLib12TransitTable10GetTopTypeEv(); +void __noreturn __cxxabiv1::throw_recursive_init_exception(void); // idb +void __noreturn std::__throw_bad_exception(void); // idb +void __noreturn std::__throw_bad_alloc(void); // idb +void __noreturn std::__throw_bad_cast(void); // idb +void __noreturn std::__throw_bad_typeid(void); // idb +void __cdecl __noreturn std::__throw_logic_error(std::logic_error *); // idb +void __cdecl __noreturn std::__throw_domain_error(std::domain_error *); // idb +void __cdecl __noreturn std::__throw_invalid_argument(std::invalid_argument *); // idb +void __cdecl __noreturn std::__throw_length_error(std::length_error *); // idb +void __cdecl __noreturn std::__throw_out_of_range(std::out_of_range *); // idb +void __cdecl __noreturn std::__throw_runtime_error(std::runtime_error *); // idb +void __cdecl __noreturn std::__throw_range_error(std::range_error *); // idb +void __cdecl __noreturn std::__throw_overflow_error(std::overflow_error *); // idb +void __cdecl __noreturn std::__throw_underflow_error(std::underflow_error *); // idb +void __cdecl __noreturn d_type_cold(int, int, int, int, int, int, int, int, int, int, int); +int _GLOBAL__sub_I__ZN9__gnu_cxx9__freeresEv(); +void __noreturn __cxa_bad_cast(void); +void __noreturn __cxa_bad_typeid(void); +void __noreturn __cxa_throw_bad_array_new_length(void); +void __cdecl __noreturn std::__throw_ios_failure(char *); +void __cdecl __noreturn std::__throw_ios_failure(std::__ios_failure *, std::runtime_error *); // idb +void __cdecl __noreturn std::__throw_system_error(int); // idb +int _GLOBAL__sub_I__ZSt20__throw_system_errori(); +int __cdecl ____mb_cur_max_func(); +unsigned int __cdecl ____lc_codepage_func(); +// int __stdcall _IAT_start__(_DWORD); weak + +//------------------------------------------------------------------------- +// Data declarations + +int __CTOR_LIST__[] = { -1 }; // weak +DWORD _data_start__ = 10u; // idb +int WXML::RPX::acceptNum(char const*,int &)::canAccept[266] = +{ + 65536, + 1, + 0, + 16777472, + 1634027556, + 1280464228, + 1227104292, + 807412836, + 1768316767, + 1600087404, + 0, + 1634027556, + 1280464228, + 1227104292, + 807412836, + 1768316767, + 1600087404, + 0, + 0, + 1634027556, + 1280464228, + 1227104292, + 807412836, + 1768316767, + 1600087404, + 0, + 0, + 5305940, + 5305948, + 5305859, + 5305866, + 5305877, + 5305896, + 5305957, + 5305967, + 5305982, + 5305994, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // idb +int WXML::RPX::acceptStr(char const*,int &)::canAccept[266] = +{ + 0, + 16777472, + 1634027556, + 1280464228, + 1227104292, + 807412836, + 1768316767, + 1600087404, + 0, + 1634027556, + 1280464228, + 1227104292, + 807412836, + 1768316767, + 1600087404, + 0, + 0, + 1634027556, + 1280464228, + 1227104292, + 807412836, + 1768316767, + 1600087404, + 0, + 0, + 5305940, + 5305948, + 5305859, + 5305866, + 5305877, + 5305896, + 5305957, + 5305967, + 5305982, + 5305994, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // idb +int WXML::RPX::acceptID(char const*,int &)::canAccept[266] = +{ + 1210319104, + 1432641893, + 539249746, + 610552100, + 1600073760, + 1701603686, + 24415, + 1210318848, + 1432641893, + 539249746, + 610552100, + 1600073760, + 1701603686, + 24415, + 0, + 1210318848, + 1432641893, + 539249746, + 610552100, + 1600073760, + 1701603686, + 24415, + 0, + -162267136, + -161742768, + -167575472, + -167116720, + -166395824, + -165150640, + -161152944, + -160497584, + -159514544, + -158728112, + 80, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // idb +char *WXSS::Tokenizer::DIRECTIVES = "@import"; // idb +int *data_1 = &dword_505ACC; // weak +int _CRT_MT = 2; // weak +int once_0 = 0; // weak +int dword_50B0F8 = -1; // weak +int use_fc_key = -1; // weak +int once_0_0 = 0; // weak +int dword_50B104 = -1; // weak +int fpi_0[6] = { 53, -1074, 971, 1, 0, 14 }; // weak +int fpi0_0[6] = { 24, -149, 104, 1, 0, 14 }; // weak +int _MINGW_INSTALL_DEBUG_MATHERR = -1; // weak +int fpi_0_0[6] = { 64, -16445, 16320, 1, 0, 14 }; // weak +void *pmem_next = &private_mem; // weak +FILE *(__cdecl *___acrt_iob_func)(unsigned int Ix) = &__acrt_iob_func; +int (__cdecl *_rand_s)(int) = &init_rand_s; // weak +__guard `guard variable for'`anonymous namespace'::get_locale_mutex(void)::locale_mutex = 0; // idb +__guard `guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec = 0; // idb +__guard `guard variable for'`anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex = 0; // idb +__guard `guard variable for'WXSS::CSSTreeLib::TransitTable::GetInstance(void)::ret = 0; // idb +__guard `guard variable for'WXSS::CSSTreeLib::LexicalChecker* WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc = 0; // idb +__guard `guard variable for'WXSS::CSSTreeLib::LexicalChecker* WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc = 0; // idb +void (*__cxxabiv1::__terminate_handler)(void) = &__gnu_cxx::__verbose_terminate_handler; // idb +void (*__cxxabiv1::__unexpected_handler)(void) = &std::terminate; // idb +_DWORD `anonymous namespace'::fake_mutex[4] = { 0, 0, 0, 0 }; // weak +_DWORD `anonymous namespace'::messages_c[4] = { 0, 0, 0, 0 }; // weak +_DWORD `anonymous namespace'::messages_w[4] = { 0, 0, 0, 0 }; // weak +_UNKNOWN `anonymous namespace'::numpunct_c; // weak +int dword_50B324 = 0; // weak +int dword_50B328 = 0; // weak +_UNKNOWN `anonymous namespace'::numpunct_w; // weak +int dword_50B330 = 0; // weak +int dword_50B334 = 0; // weak +_UNKNOWN `anonymous namespace'::time_get_c; // weak +int dword_50B33C = 0; // weak +_UNKNOWN `anonymous namespace'::time_get_w; // weak +int dword_50B344 = 0; // weak +_UNKNOWN `anonymous namespace'::time_put_c; // weak +int dword_50B34C = 0; // weak +_UNKNOWN `anonymous namespace'::time_put_w; // weak +int dword_50B354 = 0; // weak +_UNKNOWN `anonymous namespace'::codecvt_c16; // weak +int dword_50B35C = 0; // weak +_UNKNOWN `anonymous namespace'::codecvt_c32; // weak +int dword_50B364 = 0; // weak +_UNKNOWN `anonymous namespace'::money_get_c; // weak +int dword_50B36C = 0; // weak +_UNKNOWN `anonymous namespace'::money_get_w; // weak +int dword_50B374 = 0; // weak +_UNKNOWN `anonymous namespace'::money_put_c; // weak +int dword_50B37C = 0; // weak +_UNKNOWN `anonymous namespace'::money_put_w; // weak +int dword_50B384 = 0; // weak +_DWORD `anonymous namespace'::timepunct_c[5] = { 0, 0, 0, 0, 0 }; // weak +_DWORD `anonymous namespace'::timepunct_w[5] = { 0, 0, 0, 0, 0 }; // weak +_DWORD `anonymous namespace'::c_locale_impl[5] = { 0, 0, 0, 0, 0 }; // weak +_UNKNOWN `anonymous namespace'::moneypunct_cf; // weak +int dword_50B3CC = 0; // weak +int dword_50B3D0 = 0; // weak +_UNKNOWN `anonymous namespace'::moneypunct_ct; // weak +int dword_50B3D8 = 0; // weak +int dword_50B3DC = 0; // weak +_UNKNOWN `anonymous namespace'::moneypunct_wf; // weak +int dword_50B3E4 = 0; // weak +int dword_50B3E8 = 0; // weak +_UNKNOWN `anonymous namespace'::moneypunct_wt; // weak +int dword_50B3F0 = 0; // weak +int dword_50B3F4 = 0; // weak +_UNKNOWN `anonymous namespace'::codecvt_c16_c8; // weak +int dword_50B3FC = 0; // weak +_UNKNOWN `anonymous namespace'::codecvt_c32_c8; // weak +int dword_50B404 = 0; // weak +_DWORD `anonymous namespace'::emergency_pool[2] = { 0, 0 }; // weak +int dword_50B410 = 0; // weak +void *Block = NULL; // idb +int dword_50B418 = 0; // weak +int `anonymous namespace'::numpunct_cache_c = 0; // weak +int dword_50B424 = 0; // weak +int dword_50B428 = 0; // weak +int dword_50B42C = 0; // weak +char byte_50B430 = '\0'; // weak +int dword_50B434 = 0; // weak +int dword_50B438 = 0; // weak +int dword_50B43C = 0; // weak +int dword_50B440 = 0; // weak +__int16 word_50B444 = 0; // weak +char byte_50B484 = '\0'; // weak +int `anonymous namespace'::numpunct_cache_w = 0; // weak +int dword_50B4A4 = 0; // weak +int dword_50B4A8 = 0; // weak +int dword_50B4AC = 0; // weak +char byte_50B4B0 = '\0'; // weak +int dword_50B4B4 = 0; // weak +int dword_50B4B8 = 0; // weak +int dword_50B4BC = 0; // weak +int dword_50B4C0 = 0; // weak +int dword_50B4C4 = 0; // weak +char byte_50B544 = '\0'; // weak +int `anonymous namespace'::timepunct_cache_c = 0; // weak +int dword_50B564 = 0; // weak +int dword_50B568 = 0; // weak +int dword_50B56C = 0; // weak +int dword_50B570 = 0; // weak +int dword_50B574 = 0; // weak +int dword_50B578 = 0; // weak +int dword_50B57C = 0; // weak +int dword_50B580 = 0; // weak +int dword_50B584 = 0; // weak +int dword_50B588 = 0; // weak +int dword_50B58C = 0; // weak +int dword_50B590 = 0; // weak +int dword_50B594 = 0; // weak +int dword_50B598 = 0; // weak +int dword_50B59C = 0; // weak +int dword_50B5A0 = 0; // weak +int dword_50B5A4 = 0; // weak +int dword_50B5A8 = 0; // weak +int dword_50B5AC = 0; // weak +int dword_50B5B0 = 0; // weak +int dword_50B5B4 = 0; // weak +int dword_50B5B8 = 0; // weak +int dword_50B5BC = 0; // weak +int dword_50B5C0 = 0; // weak +int dword_50B5C4 = 0; // weak +int dword_50B5C8 = 0; // weak +int dword_50B5CC = 0; // weak +int dword_50B5D0 = 0; // weak +int dword_50B5D4 = 0; // weak +int dword_50B5D8 = 0; // weak +int dword_50B5DC = 0; // weak +int dword_50B5E0 = 0; // weak +int dword_50B5E4 = 0; // weak +int dword_50B5E8 = 0; // weak +int dword_50B5EC = 0; // weak +int dword_50B5F0 = 0; // weak +int dword_50B5F4 = 0; // weak +int dword_50B5F8 = 0; // weak +int dword_50B5FC = 0; // weak +int dword_50B600 = 0; // weak +int dword_50B604 = 0; // weak +int dword_50B608 = 0; // weak +int dword_50B60C = 0; // weak +int dword_50B610 = 0; // weak +int dword_50B614 = 0; // weak +int dword_50B618 = 0; // weak +int dword_50B61C = 0; // weak +int dword_50B620 = 0; // weak +char byte_50B624 = '\0'; // weak +int `anonymous namespace'::timepunct_cache_w = 0; // weak +int dword_50B644 = 0; // weak +int dword_50B648 = 0; // weak +int dword_50B64C = 0; // weak +int dword_50B650 = 0; // weak +int dword_50B654 = 0; // weak +int dword_50B658 = 0; // weak +int dword_50B65C = 0; // weak +int dword_50B660 = 0; // weak +int dword_50B664 = 0; // weak +int dword_50B668 = 0; // weak +int dword_50B66C = 0; // weak +int dword_50B670 = 0; // weak +int dword_50B674 = 0; // weak +int dword_50B678 = 0; // weak +int dword_50B67C = 0; // weak +int dword_50B680 = 0; // weak +int dword_50B684 = 0; // weak +int dword_50B688 = 0; // weak +int dword_50B68C = 0; // weak +int dword_50B690 = 0; // weak +int dword_50B694 = 0; // weak +int dword_50B698 = 0; // weak +int dword_50B69C = 0; // weak +int dword_50B6A0 = 0; // weak +int dword_50B6A4 = 0; // weak +int dword_50B6A8 = 0; // weak +int dword_50B6AC = 0; // weak +int dword_50B6B0 = 0; // weak +int dword_50B6B4 = 0; // weak +int dword_50B6B8 = 0; // weak +int dword_50B6BC = 0; // weak +int dword_50B6C0 = 0; // weak +int dword_50B6C4 = 0; // weak +int dword_50B6C8 = 0; // weak +int dword_50B6CC = 0; // weak +int dword_50B6D0 = 0; // weak +int dword_50B6D4 = 0; // weak +int dword_50B6D8 = 0; // weak +int dword_50B6DC = 0; // weak +int dword_50B6E0 = 0; // weak +int dword_50B6E4 = 0; // weak +int dword_50B6E8 = 0; // weak +int dword_50B6EC = 0; // weak +int dword_50B6F0 = 0; // weak +int dword_50B6F4 = 0; // weak +int dword_50B6F8 = 0; // weak +int dword_50B6FC = 0; // weak +int dword_50B700 = 0; // weak +char byte_50B704 = '\0'; // weak +int `anonymous namespace'::moneypunct_cache_cf = 0; // weak +int dword_50B724 = 0; // weak +int dword_50B728 = 0; // weak +int dword_50B72C = 0; // weak +__int16 word_50B730 = 0; // weak +char byte_50B732 = '\0'; // weak +int dword_50B734 = 0; // weak +int dword_50B738 = 0; // weak +int dword_50B73C = 0; // weak +int dword_50B740 = 0; // weak +int dword_50B744 = 0; // weak +int dword_50B748 = 0; // weak +int dword_50B74C = 0; // weak +int dword_50B750 = 0; // weak +int dword_50B754 = 0; // weak +char byte_50B763 = '\0'; // weak +int `anonymous namespace'::moneypunct_cache_ct = 0; // weak +int dword_50B784 = 0; // weak +int dword_50B788 = 0; // weak +int dword_50B78C = 0; // weak +__int16 word_50B790 = 0; // weak +char byte_50B792 = '\0'; // weak +int dword_50B794 = 0; // weak +int dword_50B798 = 0; // weak +int dword_50B79C = 0; // weak +int dword_50B7A0 = 0; // weak +int dword_50B7A4 = 0; // weak +int dword_50B7A8 = 0; // weak +int dword_50B7AC = 0; // weak +int dword_50B7B0 = 0; // weak +int dword_50B7B4 = 0; // weak +char byte_50B7C3 = '\0'; // weak +int `anonymous namespace'::moneypunct_cache_wf = 0; // weak +int dword_50B7E4 = 0; // weak +int dword_50B7E8 = 0; // weak +int dword_50B7EC = 0; // weak +char byte_50B7F0 = '\0'; // weak +int dword_50B7F2 = 0; // weak +int dword_50B7F8 = 0; // weak +int dword_50B7FC = 0; // weak +int dword_50B800 = 0; // weak +int dword_50B804 = 0; // weak +int dword_50B808 = 0; // weak +int dword_50B80C = 0; // weak +int dword_50B810 = 0; // weak +int dword_50B814 = 0; // weak +int dword_50B818 = 0; // weak +char byte_50B832 = '\0'; // weak +int `anonymous namespace'::moneypunct_cache_wt = 0; // weak +int dword_50B844 = 0; // weak +int dword_50B848 = 0; // weak +int dword_50B84C = 0; // weak +char byte_50B850 = '\0'; // weak +int dword_50B852 = 0; // weak +int dword_50B858 = 0; // weak +int dword_50B85C = 0; // weak +int dword_50B860 = 0; // weak +int dword_50B864 = 0; // weak +int dword_50B868 = 0; // weak +int dword_50B86C = 0; // weak +int dword_50B870 = 0; // weak +int dword_50B874 = 0; // weak +int dword_50B878 = 0; // weak +char byte_50B892 = '\0'; // weak +__int16 `anonymous namespace'::name_c = 0; // weak +_DWORD `anonymous namespace'::ctype_c[136] = +{ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // weak +_DWORD `anonymous namespace'::ctype_w[184] = +{ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // weak +_DWORD `anonymous namespace'::c_locale = 0; // weak +int `anonymous namespace'::name_vec = 0; // weak +int dword_50BDC8 = 0; // weak +int dword_50BDCC = 0; // weak +int dword_50BDD0 = 0; // weak +int dword_50BDD4 = 0; // weak +int dword_50BDD8 = 0; // weak +_UNKNOWN `anonymous namespace'::cache_vec; // weak +_DWORD `anonymous namespace'::codecvt_c[3] = { 0, 0, 0 }; // weak +_DWORD `anonymous namespace'::codecvt_w[3] = { 0, 0, 0 }; // weak +_UNKNOWN `anonymous namespace'::collate_c; // weak +int dword_50BEBC = 0; // weak +int dword_50BEC0 = 0; // weak +_UNKNOWN `anonymous namespace'::collate_w; // weak +int dword_50BEC8 = 0; // weak +int dword_50BECC = 0; // weak +_UNKNOWN `anonymous namespace'::facet_vec; // weak +_UNKNOWN `anonymous namespace'::num_get_c; // weak +int dword_50BFA4 = 0; // weak +_UNKNOWN `anonymous namespace'::num_get_w; // weak +int dword_50BFAC = 0; // weak +_UNKNOWN `anonymous namespace'::num_put_c; // weak +int dword_50BFB4 = 0; // weak +_UNKNOWN `anonymous namespace'::num_put_w; // weak +int dword_50BFBC = 0; // weak +int `anonymous namespace'::static_mutex = 0; // weak +void (__cdecl **`anonymous namespace'::generic_category_instance)(_anonymous_namespace_::generic_error_category *__hidden this) = &off_519A1C; // weak +_UNKNOWN __gnu_internal::buf_cin_sync; // weak +int dword_50BFE4 = 0; // weak +int dword_50BFE8 = 0; // weak +int dword_50BFEC = 0; // weak +int dword_50BFF0 = 0; // weak +int dword_50BFF4 = 0; // weak +int dword_50BFF8 = 0; // weak +_DWORD dword_50BFFC = 0; // weak +int dword_50C000 = 0; // weak +int dword_50C004 = 0; // weak +_UNKNOWN __gnu_internal::buf_cerr_sync; // weak +int dword_50C024 = 0; // weak +int dword_50C028 = 0; // weak +int dword_50C02C = 0; // weak +int dword_50C030 = 0; // weak +int dword_50C034 = 0; // weak +int dword_50C038 = 0; // weak +_DWORD dword_50C03C = 0; // weak +int dword_50C040 = 0; // weak +int dword_50C044 = 0; // weak +_UNKNOWN __gnu_internal::buf_cout_sync; // weak +int dword_50C064 = 0; // weak +int dword_50C068 = 0; // weak +int dword_50C06C = 0; // weak +int dword_50C070 = 0; // weak +int dword_50C074 = 0; // weak +int dword_50C078 = 0; // weak +_DWORD dword_50C07C = 0; // weak +int dword_50C080 = 0; // weak +int dword_50C084 = 0; // weak +_UNKNOWN __gnu_internal::buf_wcin_sync; // weak +int dword_50C0A4 = 0; // weak +int dword_50C0A8 = 0; // weak +int dword_50C0AC = 0; // weak +int dword_50C0B0 = 0; // weak +int dword_50C0B4 = 0; // weak +int dword_50C0B8 = 0; // weak +_DWORD dword_50C0BC = 0; // weak +int dword_50C0C0 = 0; // weak +__int16 word_50C0C4 = 0; // weak +_UNKNOWN __gnu_internal::buf_wcerr_sync; // weak +int dword_50C0E4 = 0; // weak +int dword_50C0E8 = 0; // weak +int dword_50C0EC = 0; // weak +int dword_50C0F0 = 0; // weak +int dword_50C0F4 = 0; // weak +int dword_50C0F8 = 0; // weak +_DWORD dword_50C0FC = 0; // weak +int dword_50C100 = 0; // weak +__int16 word_50C104 = 0; // weak +_UNKNOWN __gnu_internal::buf_wcout_sync; // weak +int dword_50C124 = 0; // weak +int dword_50C128 = 0; // weak +int dword_50C12C = 0; // weak +int dword_50C130 = 0; // weak +int dword_50C134 = 0; // weak +int dword_50C138 = 0; // weak +_DWORD dword_50C13C = 0; // weak +int dword_50C140 = 0; // weak +__int16 word_50C144 = 0; // weak +char __gnu_internal::buf_cin[128] = +{ + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0' +}; // weak +char __gnu_internal::buf_cerr[128] = +{ + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0' +}; // weak +char __gnu_internal::buf_cout[128] = +{ + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0' +}; // weak +char __gnu_internal::buf_wcin[128] = +{ + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0' +}; // weak +char __gnu_internal::buf_wcerr[128] = +{ + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0' +}; // weak +char __gnu_internal::buf_wcout[128] = +{ + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0', + '\0' +}; // weak +char *std::__num_base::_S_atoms_in[3] = +{ + "-+xX0123456789abcdefABCDEF", + "-+xX0123456789abcdef0123456789ABCDEF", + "-0123456789" +}; // weak +char *std::__num_base::_S_atoms_out[2] = { "-+xX0123456789abcdef0123456789ABCDEF", "-0123456789" }; // weak +char *std::money_base::_S_atoms = "-0123456789"; // weak +signed __int32 std::moneypunct::id = 0; // weak +signed __int32 std::moneypunct::id = 0; // weak +signed __int32 std::moneypunct::id = 0; // weak +signed __int32 std::moneypunct::id = 0; // weak +signed __int32 std::__timepunct::id = 0; // weak +signed __int32 std::__timepunct::id = 0; // weak +_DWORD std::`anonymous namespace'::messages_c = 0; // weak +signed __int32 dword_50C4A8[3] = { 0, 0, 0 }; // weak +_DWORD std::`anonymous namespace'::messages_w = 0; // weak +signed __int32 dword_50C4B8[3] = { 0, 0, 0 }; // weak +int std::`anonymous namespace'::numpunct_c = 0; // weak +int dword_50C4C8 = 0; // weak +int dword_50C4CC = 0; // weak +int std::`anonymous namespace'::numpunct_w = 0; // weak +int dword_50C4D4 = 0; // weak +int dword_50C4D8 = 0; // weak +int std::`anonymous namespace'::time_get_c = 0; // weak +int dword_50C4E0 = 0; // weak +int std::`anonymous namespace'::time_get_w = 0; // weak +int dword_50C4E8 = 0; // weak +int std::`anonymous namespace'::money_get_c = 0; // weak +int dword_50C4F0 = 0; // weak +int std::`anonymous namespace'::money_get_w = 0; // weak +int dword_50C4F8 = 0; // weak +int std::`anonymous namespace'::money_put_c = 0; // weak +int dword_50C500 = 0; // weak +int std::`anonymous namespace'::money_put_w = 0; // weak +int dword_50C508 = 0; // weak +int std::`anonymous namespace'::moneypunct_cf = 0; // weak +int dword_50C510 = 0; // weak +int dword_50C514 = 0; // weak +int std::`anonymous namespace'::moneypunct_ct = 0; // weak +int dword_50C51C = 0; // weak +int dword_50C520 = 0; // weak +int std::`anonymous namespace'::moneypunct_wf = 0; // weak +int dword_50C528 = 0; // weak +int dword_50C52C = 0; // weak +int std::`anonymous namespace'::moneypunct_wt = 0; // weak +int dword_50C534 = 0; // weak +int dword_50C538 = 0; // weak +int std::`anonymous namespace'::collate_c = 0; // weak +int dword_50C540 = 0; // weak +int dword_50C544 = 0; // weak +int std::`anonymous namespace'::collate_w = 0; // weak +int dword_50C54C = 0; // weak +int dword_50C550 = 0; // weak +void *std::__timepunct_cache::_S_timezones[2] = { &off_51445E, &off_514462 }; // weak +wchar_t *std::__timepunct_cache::_S_timezones[14] = +{ + L"GMT", + &off_5143FC, + &off_514404, + &off_51440E, + &off_514416, + &off_51441E, + &off_514426, + &off_51442E, + &off_514436, + &off_51443E, + &off_514446, + &off_51444E, + &off_51441E, + &off_514456 +}; // weak +signed __int32 std::ctype::id = 0; // weak +signed __int32 std::ctype::id = 0; // weak +int std::locale::_S_classic = 0; // weak +int std::locale::id::_S_refcount = 0; // weak +int std::locale::facet::_S_c_locale = 0; // weak +_UNKNOWN std::locale::facet::_S_once; // weak +_UNKNOWN std::locale::_S_once; // weak +int std::locale::_S_global = 0; // weak +signed __int32 std::moneypunct::id = 0; // weak +signed __int32 std::moneypunct::id = 0; // weak +signed __int32 std::moneypunct::id = 0; // weak +signed __int32 std::moneypunct::id = 0; // weak +signed __int32 std::collate::id = 0; // weak +signed __int32 std::collate::id = 0; // weak +signed __int32 std::messages::id = 0; // weak +signed __int32 std::messages::id = 0; // weak +signed __int32 std::numpunct::id = 0; // weak +signed __int32 std::numpunct::id = 0; // weak +signed __int32 std::time_get>::id = 0; // weak +signed __int32 std::time_get>::id = 0; // weak +signed __int32 std::money_get>::id = 0; // weak +signed __int32 std::money_get>::id = 0; // weak +signed __int32 std::money_put>::id = 0; // weak +signed __int32 std::money_put>::id = 0; // weak +_UNKNOWN std::codecvt::id; // weak +_UNKNOWN std::codecvt::id; // weak +_UNKNOWN std::codecvt::id; // weak +_UNKNOWN std::codecvt::id; // weak +signed __int32 std::codecvt::id = 0; // weak +signed __int32 std::codecvt::id = 0; // weak +signed __int32 std::collate::id = 0; // weak +signed __int32 std::collate::id = 0; // weak +signed __int32 std::num_get>::id = 0; // weak +signed __int32 std::num_get>::id = 0; // weak +signed __int32 std::num_put>::id = 0; // weak +signed __int32 std::num_put>::id = 0; // weak +int std::ios_base::Init::_S_refcount = 0; // weak +char std::ios_base::Init::_S_synced_with_stdio = '\x01'; // weak +signed __int32 std::messages::id = 0; // weak +signed __int32 std::messages::id = 0; // weak +signed __int32 std::numpunct::id = 0; // weak +signed __int32 std::numpunct::id = 0; // weak +signed __int32 std::time_get>::id = 0; // weak +signed __int32 std::time_get>::id = 0; // weak +signed __int32 std::time_put>::id = 0; // weak +signed __int32 std::time_put>::id = 0; // weak +signed __int32 std::money_get>::id = 0; // weak +signed __int32 std::money_get>::id = 0; // weak +signed __int32 std::money_put>::id = 0; // weak +signed __int32 std::money_put>::id[5] = { 0, 0, 0, 0, 0 }; // weak +int std::cin = 0; // weak +int dword_50C6C4 = 0; // weak +int dword_50C6C8[28] = +{ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // weak +int dword_50C738 = 0; // weak +__int16 word_50C73C = 0; // weak +int dword_50C740 = 0; // weak +int dword_50C744 = 0; // weak +int dword_50C748 = 0; // weak +int dword_50C74C = 0; // weak +int std::cerr = 0; // weak +int dword_50C764 = 0; // weak +int dword_50C770 = 0; // weak +int dword_50C7D4 = 0; // weak +__int16 word_50C7D8 = 0; // weak +int dword_50C7DC = 0; // weak +int dword_50C7E0 = 0; // weak +int dword_50C7E4 = 0; // weak +int dword_50C7E8 = 0; // weak +int std::clog = 0; // weak +int dword_50C804[28] = +{ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // weak +int dword_50C874 = 0; // weak +__int16 word_50C878 = 0; // weak +int dword_50C87C = 0; // weak +int dword_50C880 = 0; // weak +int dword_50C884 = 0; // weak +int dword_50C888 = 0; // weak +int std::cout = 0; // weak +int dword_50C8A4[28] = +{ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // weak +int dword_50C914 = 0; // weak +__int16 word_50C918 = 0; // weak +int dword_50C91C = 0; // weak +int dword_50C920 = 0; // weak +int dword_50C924 = 0; // weak +int dword_50C928 = 0; // weak +int std::wcin = 0; // weak +int dword_50C944 = 0; // weak +int dword_50C948[28] = +{ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // weak +int dword_50C9B8 = 0; // weak +__int16 word_50C9BC = 0; // weak +char byte_50C9BE = '\0'; // weak +int dword_50C9C0 = 0; // weak +int dword_50C9C4 = 0; // weak +int dword_50C9C8 = 0; // weak +int dword_50C9CC = 0; // weak +int std::wcerr = 0; // weak +int dword_50C9E4 = 0; // weak +int dword_50C9F0 = 0; // weak +int dword_50CA54 = 0; // weak +__int16 word_50CA58 = 0; // weak +char byte_50CA5A = '\0'; // weak +int dword_50CA5C = 0; // weak +int dword_50CA60 = 0; // weak +int dword_50CA64 = 0; // weak +int dword_50CA68 = 0; // weak +int std::wclog = 0; // weak +int dword_50CA84[28] = +{ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // weak +int dword_50CAF4 = 0; // weak +__int16 word_50CAF8 = 0; // weak +char byte_50CAFA = '\0'; // weak +int dword_50CAFC = 0; // weak +int dword_50CB00 = 0; // weak +int dword_50CB04 = 0; // weak +int dword_50CB08 = 0; // weak +int std::wcout = 0; // weak +int dword_50CB24[28] = +{ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; // weak +int dword_50CB94 = 0; // weak +__int16 word_50CB98 = 0; // weak +char byte_50CB9A = '\0'; // weak +int dword_50CB9C = 0; // weak +int dword_50CBA0 = 0; // weak +int dword_50CBA4 = 0; // weak +int dword_50CBA8 = 0; // weak +_DWORD `anonymous namespace'::get_locale_mutex(void)::locale_mutex[2] = { 0, 0 }; // weak +_UNKNOWN `anonymous namespace'::get_static_mutex(void)::once; // weak +void (__cdecl **`anonymous namespace'::__io_category_instance(void)::__ec)(_anonymous_namespace_::io_error_category *__hidden this) = &off_5199CC; // weak +_DWORD `anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex[2] = { 0, 0 }; // weak +_UNKNOWN WXSS::CSSTreeLib::TransitTable::GetInstance(void)::ret; // weak +int dword_50CBE0 = 0; // weak +int dword_50CBE4 = 0; // weak +int dword_50CBE8 = 0; // weak +int dword_50CBEC = 0; // weak +int dword_50CBF0 = 0; // weak +char byte_50CBF4 = '\0'; // weak +int WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc = 0; // weak +int dword_50CBFC = 0; // weak +int dword_50CC00 = 0; // weak +int WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc = 0; // weak +int dword_50CC08 = 0; // weak +int dword_50CC0C = 0; // weak +char __gnu_cxx::__verbose_terminate_handler(void)::terminating = '\0'; // weak +size_t __emutls_v__ZZN12_GLOBAL__N_110get_globalEvE6global[4] = { 8u, 4u, 0u, 0u }; // weak +const char byte_50D216 = '\0'; // idb +const char asc_50D21C[] = "{\x00\"\x00,"; // idb +const char off_50DF84[] = { 'n', 'o', 't', '\0' }; // idb +const char byte_50DF9A = '\0'; // idb +const char asc_50E043[1] = "f"; // idb +void *off_50E044 = &unk_6D6F72; // weak +const char off_50EEF5[] = { ')', '\0', ']', '\0' }; // idb +_UNKNOWN unk_50F119; // weak +const char byte_50F1AA = '\0'; // idb +const char off_50F1AB[] = { 'r', 'p', 'x', '\0' }; // idb +const char off_50F1C8[] = { 'u', 'r', 'l', '\0' }; // idb +const char off_50F2CC[] = { '[', '1', ']', '\0' }; // idb +void *off_50F38C = (void *)0x444924; // weak +const char Source[] = { 'u', 'r', 'l', '\0' }; // idb +const char off_50F508[] = { 'r', 'p', 'x', '\0' }; // idb +const char byte_50F50C = '\0'; // idb +const char byte_50F6E6 = '\0'; // idb +const char asc_50F6EC[] = ";\x00:\x00}\x00$\x00+"; // idb +const char off_50F6FF[] = { '$', 'I', 'D', '\0' }; // idb +const char off_50F7B4[] = { '=', '\0', '{', '\0' }; // idb +const char off_50F7EE[] = { '*', '\0', '|', '\0' }; // idb +_UNKNOWN unk_5110A4; // weak +_UNKNOWN unk_5110A6; // weak +_UNKNOWN unk_5110A8; // weak +_UNKNOWN unk_5110AA; // weak +_UNKNOWN unk_5110AC; // weak +void *off_5110B8 = &unk_720074; // weak +void *off_5110C2 = &unk_610066; // weak +_UNKNOWN unk_5110D0; // weak +void *off_5110DC = &unk_720074; // weak +void *off_5110E6 = &unk_610066; // weak +_UNKNOWN unk_51183A; // weak +_UNKNOWN unk_511B8A; // weak +_BYTE byte_511F66[2] = { 0, 0 }; // weak +_UNKNOWN unk_5121D0; // weak +char byte_512239[] = { '0' }; // weak +_UNKNOWN unk_5125A2; // weak +void *off_512ECB = &unk_647473; // weak +void *off_513197 = &unk_6C6C75; // weak +_UNKNOWN unk_513574; // weak +_UNKNOWN unk_513576; // weak +_UNKNOWN unk_5137C4; // weak +void *cplus_demangle_operators = &unk_5137C4; // weak +void **off_513FC0 = &off_513E55; // weak +char *off_514128 = "decimal32"; // weak +char *off_51413C = "decimal64"; // weak +char *off_514150 = "decimal128"; // weak +char *off_514164 = "half"; // weak +char *off_514178 = "char8_t"; // weak +char *off_51418C = "char16_t"; // weak +char *off_5141A0 = "char32_t"; // weak +char *off_5141B4 = "decltype(nullptr)"; // weak +void *off_514522 = &loc_4D4100; // weak +_UNKNOWN unk_514526; // weak +void *off_514562 = &unk_6E7553; // weak +void *off_514566 = &unk_6E6F4D; // weak +void *off_51456A = &unk_657554; // weak +void *off_51456E = &unk_646557; // weak +void *off_514572 = &unk_756854; // weak +void *off_514576 = &unk_697246; // weak +void *off_51457A = &unk_746153; // weak +void *off_51459B = &unk_79614D; // weak +void *off_5145D4 = &unk_6E614A; // weak +void *off_5145D8 = &unk_626546; // weak +void *off_5145DC = &unk_72614D; // weak +void *off_5145E0 = &unk_727041; // weak +void *off_5145E4 = &unk_6E754A; // weak +void *off_5145E8 = &unk_6C754A; // weak +void *off_5145EC = &unk_677541; // weak +void *off_5145F0 = &unk_706553; // weak +void *off_5145F4 = &unk_74634F; // weak +void *off_5145F8 = &unk_766F4E; // weak +void *off_5145FC = &unk_636544; // weak +void *off_514600 = &unk_6D0025; // weak +_UNKNOWN unk_514624; // weak +void *off_514626 = (void *)0x4D0041; // weak +void *off_51462C = (void *)0x4D0050; // weak +void *off_514632 = &unk_750053; // weak +void *off_514640 = &unk_6F004D; // weak +void *off_51464E = &unk_750054; // weak +void *off_51465E = &unk_650057; // weak +void *off_514672 = &unk_680054; // weak +void *off_514684 = &unk_720046; // weak +void *off_514692 = &unk_610053; // weak +void *off_5146A4 = &unk_750053; // weak +void *off_5146AC = &unk_6F004D; // weak +void *off_5146B4 = &unk_750054; // weak +void *off_5146BC = &unk_650057; // weak +void *off_5146C4 = &unk_680054; // weak +void *off_5146CC = &unk_720046; // weak +void *off_5146D4 = &unk_610053; // weak +void *off_5146DC = &unk_61004A; // weak +void *off_5146EC = &unk_650046; // weak +void *off_5146FE = &unk_61004D; // weak +void *off_51470A = &unk_700041; // weak +void *off_514716 = &unk_61004D; // weak +void *off_51471E = &unk_75004A; // weak +void *off_514728 = &unk_75004A; // weak +void *off_514732 = &unk_750041; // weak +void *off_514740 = &unk_650053; // weak +void *off_514754 = &unk_63004F; // weak +void *off_514764 = &unk_6F004E; // weak +void *off_514776 = &unk_650044; // weak +void *off_514788 = &unk_61004A; // weak +void *off_514790 = &unk_650046; // weak +void *off_514798 = &unk_61004D; // weak +void *off_5147A0 = &unk_700041; // weak +void *off_5147A8 = &unk_75004A; // weak +void *off_5147B0 = &unk_75004A; // weak +void *off_5147B8 = &unk_750041; // weak +void *off_5147C0 = &unk_650053; // weak +void *off_5147C8 = &unk_63004F; // weak +void *off_5147D0 = &unk_6F004E; // weak +void *off_5147D8 = &unk_650044; // weak +const char byte_5147E0[4] = { '\0', '\0', '\0', '\0' }; // idb +int (__stdcall *__dyn_tls_init_callback)(_DWORD, _DWORD, _DWORD) = &__dyn_tls_init; // weak +char *CSWTCH_1[6] = +{ + "Argument domain error (DOMAIN)", + "Argument singularity (SIGN)", + "Overflow range error (OVERFLOW)", + "The result is too small to be represented (UNDERFLOW)", + "Total loss of significance (TLOSS)", + "Partial loss of significance (PLOSS)" +}; // weak +const char String1[] = { 'I', 'N', 'F', '\0' }; // idb +const char off_514C0A[] = { 'N', 'A', 'N', '\0' }; // idb +_UNKNOWN unk_514C14; // weak +_UNKNOWN __etens; // weak +_UNKNOWN unk_514CB0; // weak +int __eone = 0; // weak +char *cmap = "alnum"; // weak +__int16 word_514D44[] = { 263 }; // weak +int fivesbits[23] = +{ + 0, + 3, + 5, + 7, + 10, + 12, + 14, + 17, + 19, + 21, + 24, + 26, + 28, + 31, + 33, + 35, + 38, + 40, + 42, + 45, + 47, + 49, + 52 +}; // weak +void *off_514F07 = &loc_4E614E; // weak +void *off_514F0B = &unk_666E49; // weak +const wchar_t String = 40u; // idb +void *off_515099 = &loc_4E614E; // weak +_UNKNOWN unk_5150F4; // weak +double dbl_5150F8[4] = { 3.369835408745143e30, 0.0, 0.0, 0.0 }; // weak +int dword_51511C[] = { 0 }; // weak +double dbl_515138[] = { 0.0 }; // weak +double __tens_D2A[24] = +{ + 1.0, + 10.0, + 100.0, + 1000.0, + 10000.0, + 100000.0, + 1000000.0, + 1.0e7, + 1.0e8, + 1.0e9, + 1.0e10, + 1.0e11, + 1.0e12, + 1.0e13, + 1.0e14, + 1.0e15, + 1.0e16, + 1.0e17, + 1.0e18, + 1.0e19, + 1.0e20, + 1.0e21, + 1.0e22, + 0.0 +}; // weak +double __tinytens_D2A[4] = { 1.0e-16, 1.0e-32, 1.0e-64, 1.0e-128 }; // weak +double __bigtens_D2A[4] = { 1.0e16, 1.0e32, 1.0e64, 1.0e128 }; // weak +const WCHAR ModuleName = 109u; // idb +const WCHAR LibFileName = 97u; // idb +const WCHAR off_5152CC = 109u; // idb +int CSWTCH_112[7] = { 4, 1, 16, 2, 8, 0, 0 }; // weak +char *const CSWTCH_18 = "a"; // idb +int std::money_base::_S_default_pattern = 67109634; // weak +__int16 std::`anonymous namespace'::utf8_bom = -17425; // weak +char **std::locale::_S_categories = &__gnu_cxx::category_names; // weak +int std::locale::_S_twinned_facets[24] = +{ + 5293704, + 5293608, + 5293664, + 5293592, + 5293712, + 5293616, + 5293728, + 5293624, + 5293736, + 5293632, + 5293196, + 5293576, + 5293200, + 5293580, + 5293696, + 5293600, + 5293708, + 5293612, + 5293668, + 5293596, + 5293716, + 5293620, + 5293732, + 5293628 +}; // weak +int *const std::locale::facet::_S_c_name = (int *const)0x43; // idb +_UNKNOWN unk_515784; // weak +_UNKNOWN unk_515798; // weak +_UNKNOWN unk_5157AC; // weak +_UNKNOWN unk_5157C0; // weak +_UNKNOWN unk_5157D4; // weak +_UNKNOWN unk_5157E8; // weak +_UNKNOWN unk_515838; // weak +_UNKNOWN unk_51584C; // weak +_UNKNOWN unk_515860; // weak +_UNKNOWN unk_515874; // weak +_UNKNOWN unk_515888; // weak +_UNKNOWN unk_51589C; // weak +_UNKNOWN unk_5158B0; // weak +_UNKNOWN unk_5158C4; // weak +_UNKNOWN unk_5158D8; // weak +_UNKNOWN unk_5158EC; // weak +_UNKNOWN unk_515900; // weak +_UNKNOWN unk_515914; // weak +_UNKNOWN unk_515928; // weak +_UNKNOWN unk_51593C; // weak +_UNKNOWN unk_51598C; // weak +_UNKNOWN unk_5159A0; // weak +_UNKNOWN unk_5159B4; // weak +_UNKNOWN unk_5159C8; // weak +_UNKNOWN unk_5159DC; // weak +_UNKNOWN unk_5159F0; // weak +_UNKNOWN unk_515A40; // weak +_UNKNOWN unk_515A54; // weak +_UNKNOWN unk_515A68; // weak +_UNKNOWN unk_515A7C; // weak +_UNKNOWN unk_515A90; // weak +_UNKNOWN unk_515AA4; // weak +_UNKNOWN unk_515AB8; // weak +_UNKNOWN unk_515ACC; // weak +_UNKNOWN unk_515AE0; // weak +_UNKNOWN unk_515AF4; // weak +_UNKNOWN unk_515B08; // weak +_UNKNOWN unk_515B1C; // weak +_UNKNOWN unk_515B30; // weak +_UNKNOWN unk_515B44; // weak +int *`typeinfo for'__cxxabiv1::__forced_unwind = &off_519934; // weak +int *`typeinfo for'__cxxabiv1::__foreign_exception = &off_519934; // weak +int *`typeinfo for'__gnu_cxx::recursive_init_error = &off_519974; // weak +int *`typeinfo for'__gnu_cxx::__concurrence_lock_error = &off_519974; // weak +int *`typeinfo for'__gnu_cxx::__concurrence_unlock_error = &off_519974; // weak +int *`typeinfo for'std::locale::facet::__shim = &off_519934; // weak +int *`typeinfo for'std::locale::facet = &off_519934; // weak +int *`typeinfo for'std::moneypunct = &off_5199A0; // weak +int *`typeinfo for'std::moneypunct = &off_5199A0; // weak +int *`typeinfo for'std::moneypunct = &off_5199A0; // weak +int *`typeinfo for'std::moneypunct = &off_5199A0; // weak +int *`typeinfo for'std::collate = &off_519974; // weak +int *`typeinfo for'std::collate = &off_519974; // weak +int *`typeinfo for'std::messages = &off_5199A0; // weak +int *`typeinfo for'std::messages = &off_5199A0; // weak +int *`typeinfo for'std::numpunct = &off_519974; // weak +int *`typeinfo for'std::numpunct = &off_519974; // weak +int *`typeinfo for'std::time_get> = &off_5199A0; // weak +int *`typeinfo for'std::time_get> = &off_5199A0; // weak +int *`typeinfo for'std::money_get> = &off_519974; // weak +int *`typeinfo for'std::money_get> = &off_519974; // weak +int *`typeinfo for'std::money_put> = &off_519974; // weak +int *`typeinfo for'std::money_put> = &off_519974; // weak +int *`typeinfo for'std::ios_base::failure = &off_519974; // weak +int `typeinfo for'std::bad_typeid = 5347700; // weak +int *`typeinfo for'std::moneypunct = &off_5199A0; // weak +int *`typeinfo for'std::moneypunct = &off_5199A0; // weak +int *`typeinfo for'std::moneypunct = &off_5199A0; // weak +int *`typeinfo for'std::moneypunct = &off_5199A0; // weak +int *`typeinfo for'std::__timepunct = &off_519974; // weak +int *`typeinfo for'std::__timepunct = &off_519974; // weak +int *`typeinfo for'std::logic_error = &off_519974; // weak +int *`typeinfo for'std::range_error = &off_519974; // weak +int *`typeinfo for'std::domain_error = &off_519974; // weak +int *`typeinfo for'std::length_error = &off_519974; // weak +int *`typeinfo for'std::out_of_range = &off_519974; // weak +int *`typeinfo for'std::system_error = &off_519974; // weak +int *`typeinfo for'std::__ios_failure = &off_51B148; // weak +int *`typeinfo for'std::bad_exception = &off_519974; // weak +int *`typeinfo for'std::runtime_error = &off_519974; // weak +int *`typeinfo for'std::overflow_error = &off_519974; // weak +int *`typeinfo for'std::underflow_error = &off_519974; // weak +int *`typeinfo for'std::invalid_argument = &off_519974; // weak +int *`typeinfo for'std::bad_array_new_length = &off_519974; // weak +int *`typeinfo for'std::ctype = &off_5199A0; // weak +int *`typeinfo for'std::ctype = &off_519974; // weak +int *`typeinfo for'std::codecvt = &off_519974; // weak +int *`typeinfo for'std::codecvt = &off_519974; // weak +int *`typeinfo for'std::collate = &off_519974; // weak +int *`typeinfo for'std::collate = &off_519974; // weak +int *`typeinfo for'std::num_get> = &off_519974; // weak +int *`typeinfo for'std::num_get> = &off_519974; // weak +int *`typeinfo for'std::num_put> = &off_519974; // weak +int *`typeinfo for'std::num_put> = &off_519974; // weak +int *`typeinfo for'std::bad_cast = &off_519974; // weak +int *`typeinfo for'std::messages = &off_5199A0; // weak +int *`typeinfo for'std::messages = &off_5199A0; // weak +int *`typeinfo for'std::numpunct = &off_519974; // weak +int *`typeinfo for'std::numpunct = &off_519974; // weak +int *`typeinfo for'std::time_get> = &off_5199A0; // weak +int *`typeinfo for'std::time_get> = &off_5199A0; // weak +int *`typeinfo for'std::time_put> = &off_519974; // weak +int *`typeinfo for'std::time_put> = &off_519974; // weak +int *`typeinfo for'std::bad_alloc = &off_519974; // weak +int *`typeinfo for'std::money_get> = &off_519974; // weak +int *`typeinfo for'std::money_get> = &off_519974; // weak +int *`typeinfo for'std::money_put> = &off_519974; // weak +int *`typeinfo for'std::money_put> = &off_519974; // weak +void (__cdecl *off_519934)(__cxxabiv1::__class_type_info *__hidden this) = &__cxxabiv1::__class_type_info::~__class_type_info; // weak +void (__cdecl *off_519974)(__cxxabiv1::__si_class_type_info *__hidden this) = &__cxxabiv1::__si_class_type_info::~__si_class_type_info; // weak +void (__cdecl *off_5199A0)(__cxxabiv1::__vmi_class_type_info *__hidden this) = &__cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info; // weak +void (__cdecl *off_5199CC)(_anonymous_namespace_::io_error_category *__hidden this) = &`anonymous namespace'::io_error_category::~io_error_category; // weak +void (__cdecl *off_519A44)(WXSS::CSSTreeLib::NonTerminal *__hidden this) = &WXSS::CSSTreeLib::NonTerminal::~NonTerminal; // weak +void (__cdecl *off_519A58)(WXSS::CSSTreeLib::MarkHostRule *__hidden this) = &WXSS::CSSTreeLib::MarkHostRule::~MarkHostRule; // weak +void (__cdecl *off_519A70)(WXSS::CSSTreeLib::AttrDebugRule *__hidden this) = &WXSS::CSSTreeLib::AttrDebugRule::~AttrDebugRule; // weak +void (__cdecl *off_519A88)(WXSS::CSSTreeLib::BlackListRule *__hidden this) = &WXSS::CSSTreeLib::BlackListRule::~BlackListRule; // weak +void (__cdecl *off_519AA0)(WXSS::CSSTreeLib::RuleDebugRule *__hidden this) = &WXSS::CSSTreeLib::RuleDebugRule::~RuleDebugRule; // weak +void (__cdecl *off_519AB8)(WXSS::CSSTreeLib::ReWriteRpxRule *__hidden this) = &WXSS::CSSTreeLib::ReWriteRpxRule::~ReWriteRpxRule; // weak +void (__cdecl *off_519AD0)(WXSS::CSSTreeLib::MarkSelectorRule *__hidden this) = &WXSS::CSSTreeLib::MarkSelectorRule::~MarkSelectorRule; // weak +void (__cdecl *off_519AE8)(WXSS::CSSTreeLib::RewriteImgUrlRule *__hidden this) = &WXSS::CSSTreeLib::RewriteImgUrlRule::~RewriteImgUrlRule; // weak +void (__cdecl *off_519B00)(WXSS::CSSTreeLib::RewriteSelectorRule *__hidden this) = &WXSS::CSSTreeLib::RewriteSelectorRule::~RewriteSelectorRule; // weak +void (__cdecl *off_519B18)(WXSS::CSSTreeLib::EPS *__hidden this) = &WXSS::CSSTreeLib::EPS::~EPS; // weak +void (__cdecl *off_519B2C)(WXSS::CSSTreeLib::Action *__hidden this) = &WXSS::CSSTreeLib::Action::~Action; // weak +void (__cdecl *off_519B40)(WXSS::CSSTreeLib::AndRules *__hidden this) = &WXSS::CSSTreeLib::AndRules::~AndRules; // weak +void (__cdecl *off_519B58)(WXSS::CSSTreeLib::Terminal *__hidden this) = &WXSS::CSSTreeLib::Terminal::~Terminal; // weak +void (__cdecl *off_519B6C)(WXSS::CSSTreeLib::TrueRule *__hidden this) = &WXSS::CSSTreeLib::TrueRule::~TrueRule; // weak +void (__cdecl *off_519B84)(WXSS::CSSTreeLib::ChildRule *__hidden this) = &WXSS::CSSTreeLib::ChildRule::~ChildRule; // weak +void (__cdecl *off_519B9C)(WXSS::CSSTreeLib::FalseRule *__hidden this) = &WXSS::CSSTreeLib::FalseRule::~FalseRule; // weak +void (__cdecl *off_519BB4)(WXSS::CSSTreeLib::RuleChain *__hidden this) = &WXSS::CSSTreeLib::RuleChain::~RuleChain; // weak +void (__cdecl *off_519BCC)(WXSS::CSSTreeLib::SPNotRule *__hidden this) = &WXSS::CSSTreeLib::SPNotRule::~SPNotRule; // weak +int (*off_519BE4[2])() = +{ + &__gnu_cxx::stdio_filebuf::~stdio_filebuf, + &__gnu_cxx::stdio_filebuf::~stdio_filebuf +}; // weak +int (*off_519C24[2])() = +{ + &__gnu_cxx::stdio_filebuf::~stdio_filebuf, + &__gnu_cxx::stdio_filebuf::~stdio_filebuf +}; // weak +int (*off_519C64)() = &__gnu_cxx::stdio_sync_filebuf::~stdio_sync_filebuf; // weak +int (*off_519CA4)() = &__gnu_cxx::stdio_sync_filebuf::~stdio_sync_filebuf; // weak +void (__cdecl *off_519CE4)(__gnu_cxx::recursive_init_error *__hidden this) = &__gnu_cxx::recursive_init_error::~recursive_init_error; // weak +void (__cdecl *off_519CF8)(__gnu_cxx::__concurrence_lock_error *__hidden this) = &__gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error; // weak +void (__cdecl *off_519D0C)(__gnu_cxx::__concurrence_unlock_error *__hidden this) = &__gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error; // weak +int (*off_519D20)() = &std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim; // weak +int (*off_519D3C)() = &std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim; // weak +int (*off_519D58)() = &std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim; // weak +int (*off_519D74)() = &std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim; // weak +int (*off_519D90)() = &std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim; // weak +int (*off_519DAC)() = &std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim; // weak +int (*off_519DC8)() = &std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim; // weak +int (*off_519DE4)() = &std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim; // weak +int (*off_519E00)() = &std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim; // weak +int (*off_519E24)() = &std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim; // weak +int (*off_519E48)() = &std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim; // weak +int (*off_519E6C)() = &std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim; // weak +int (*off_519E90)() = &std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim; // weak +int (*off_519EB8)() = &std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim; // weak +int (*off_519EE4)() = &std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim; // weak +int (*off_519F0C)() = &std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim; // weak +int (*off_519F38)() = &std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim; // weak +int (*off_519F50)() = &std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim; // weak +int (*off_519F68)() = &std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim; // weak +int (*off_519F80)() = &std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim; // weak +int (*off_519F98)() = &std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim; // weak +int (*off_519FB0)() = &std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim; // weak +int (*off_519FC8)() = &std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim; // weak +int (*off_519FE0)() = &std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim; // weak +int (*off_519FF8)() = &std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim; // weak +int (*off_51A02C)() = &std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim; // weak +int (*off_51A060)() = &std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim; // weak +int (*off_51A094)() = &std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim; // weak +int (*off_51A0C8)() = &std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim; // weak +int (*off_51A0FC)() = &std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim; // weak +int (*off_51A130)() = &std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim; // weak +int (*off_51A164)() = &std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim; // weak +int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int) = &std::moneypunct::~moneypunct; // weak +int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int) = &std::moneypunct::~moneypunct; // weak +int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int) = &std::moneypunct::~moneypunct; // weak +int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int) = &std::moneypunct::~moneypunct; // weak +int (*off_51A2A0)() = &std::collate_byname::~collate_byname; // weak +int (*off_51A2BC)() = &std::collate_byname::~collate_byname; // weak +int (*off_51A2D8)() = &std::stringbuf::~stringbuf; // weak +int (*off_51A318)() = &std::wstringbuf::~wstringbuf; // weak +int (*off_51A358)() = &std::messages_byname::~messages_byname; // weak +int (*off_51A374)() = &std::messages_byname::~messages_byname; // weak +int (*off_51A390)() = &std::numpunct_byname::~numpunct_byname; // weak +int (*off_51A3B4)() = &std::numpunct_byname::~numpunct_byname; // weak +int (*off_51A430)() = &std::moneypunct_byname::~moneypunct_byname; // weak +int (*off_51A464)() = &std::moneypunct_byname::~moneypunct_byname; // weak +int (*off_51A498)() = &std::moneypunct_byname::~moneypunct_byname; // weak +int (*off_51A4CC)() = &std::moneypunct_byname::~moneypunct_byname; // weak +int (*off_51A504)() = &std::basic_stringstream,std::allocator>::~basic_stringstream; // weak +int (*off_51A518[2])() = +{ + &`non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream, + &`non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream +}; // weak +int (*off_51A52C[2])() = +{ + &`virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream, + &`virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream +}; // weak +int (*off_51A540)() = &std::basic_stringstream,std::allocator>::~basic_stringstream; // weak +int (*off_51A554[2])() = +{ + &`non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream, + &`non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream +}; // weak +int (*off_51A568[2])() = +{ + &`virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream, + &`virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream +}; // weak +int (*off_51A57C)() = &std::istringstream::~istringstream; // weak +int (*off_51A590[2])() = +{ + &`virtual thunk to'std::istringstream::~istringstream, + &`virtual thunk to'std::istringstream::~istringstream +}; // weak +int (*off_51A5A4)() = &std::wistringstream::~wistringstream; // weak +int (*off_51A5B8[2])() = +{ + &`virtual thunk to'std::wistringstream::~wistringstream, + &`virtual thunk to'std::wistringstream::~wistringstream +}; // weak +int (*off_51A5CC)() = &std::ostringstream::~ostringstream; // weak +int (*off_51A5E0[2])() = +{ + &`virtual thunk to'std::ostringstream::~ostringstream, + &`virtual thunk to'std::ostringstream::~ostringstream +}; // weak +int (*off_51A5F4)() = &std::wostringstream::~wostringstream; // weak +int (*off_51A608[2])() = +{ + &`virtual thunk to'std::wostringstream::~wostringstream, + &`virtual thunk to'std::wostringstream::~wostringstream +}; // weak +int (*off_51A618)() = &std::collate::~collate; // weak +int (*off_51A634)() = &std::collate::~collate; // weak +int (*off_51A650)() = &std::messages::~messages; // weak +int (*off_51A66C)() = &std::messages::~messages; // weak +int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int) = &std::numpunct::~numpunct; // weak +int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int) = &std::numpunct::~numpunct; // weak +int (*off_51A6D0)() = &std::time_get>::~time_get; // weak +int (*off_51A6FC)() = &std::time_get>::~time_get; // weak +int (*off_51A728)() = &std::money_get>::~money_get; // weak +int (*off_51A740)() = &std::money_get>::~money_get; // weak +int (*off_51A758)() = &std::money_put>::~money_put; // weak +int (*off_51A770)() = &std::money_put>::~money_put; // weak +int (*off_51A788)() = &std::ios_base::failure[abi:cxx11]::~failure; // weak +void (__cdecl *off_51A79C)(std::ios_base::failure *__hidden this) = &std::ios_base::failure::~failure; // weak +void (__cdecl *off_51A7B4)(std::iostream *__hidden this) = &std::iostream::~iostream; // weak +void (__cdecl *off_51A7C8[2])(std::iostream *__hidden this) = +{ + &`non-virtual thunk to'std::iostream::~iostream, + &`non-virtual thunk to'std::iostream::~iostream +}; // weak +void (__cdecl *off_51A7DC[2])(std::iostream *__hidden this) = +{ + &`virtual thunk to'std::iostream::~iostream, + &`virtual thunk to'std::iostream::~iostream +}; // weak +void (__cdecl *off_51A7F0)(std::istream *__hidden this) = &std::istream::~istream; // weak +void (__cdecl *off_51A804[2])(std::istream *__hidden this) = +{ + &`virtual thunk to'std::istream::~istream, + &`virtual thunk to'std::istream::~istream +}; // weak +void (__cdecl *off_51A818)(std::ostream *__hidden this) = &std::ostream::~ostream; // weak +void (__cdecl *off_51A82C[2])(std::ostream *__hidden this) = +{ + &`virtual thunk to'std::ostream::~ostream, + &`virtual thunk to'std::ostream::~ostream +}; // weak +void (__cdecl *off_51A83C)(std::bad_typeid *__hidden this) = &std::bad_typeid::~bad_typeid; // weak +int (*off_51A850)() = &std::moneypunct::~moneypunct; // weak +int (*off_51A884)() = &std::moneypunct::~moneypunct; // weak +int (*off_51A8B8)() = &std::moneypunct::~moneypunct; // weak +int (*off_51A8EC)() = &std::moneypunct::~moneypunct; // weak +int (*off_51A920)() = &std::__timepunct::~__timepunct; // weak +int (*off_51A930)() = &std::__timepunct::~__timepunct; // weak +void (__cdecl *off_51A940)(std::logic_error *__hidden this) = &std::logic_error::~logic_error; // weak +void (__cdecl *off_51A954)(std::range_error *__hidden this) = &std::range_error::~range_error; // weak +int (*off_51A968)() = &std::ctype_byname::~ctype_byname; // weak +int (*off_51A998)() = &std::ctype_byname::~ctype_byname; // weak +void (__cdecl *off_51A9D8)(std::domain_error *__hidden this) = &std::domain_error::~domain_error; // weak +void (__cdecl *off_51A9EC)(std::length_error *__hidden this) = &std::length_error::~length_error; // weak +void (__cdecl *off_51AA00)(std::out_of_range *__hidden this) = &std::out_of_range::~out_of_range; // weak +void (__cdecl *off_51AA14)(std::system_error *__hidden this) = &std::system_error::~system_error; // weak +void (__cdecl *off_51AA28)(std::__ios_failure *__hidden this) = &std::__ios_failure::~__ios_failure; // weak +void (__cdecl *off_51AA3C)(std::bad_exception *__hidden this) = &std::bad_exception::~bad_exception; // weak +int (*off_51AA50[2])() = { &std::filebuf::~filebuf, &std::filebuf::~filebuf }; // weak +int (*off_51AA90[2])() = { &std::wfilebuf::~wfilebuf, &std::wfilebuf::~wfilebuf }; // weak +int (*off_51AAD4[2])() = { &std::fstream::~fstream, &std::fstream::~fstream }; // weak +int (*off_51AAE8[2])() = +{ + &`non-virtual thunk to'std::fstream::~fstream, + &`non-virtual thunk to'std::fstream::~fstream +}; // weak +int (*off_51AAFC[2])() = +{ + &`virtual thunk to'std::fstream::~fstream, + &`virtual thunk to'std::fstream::~fstream +}; // weak +int (*off_51AB10[2])() = { &std::wfstream::~wfstream, &std::wfstream::~wfstream }; // weak +int (*off_51AB24[2])() = +{ + &`non-virtual thunk to'std::wfstream::~wfstream, + &`non-virtual thunk to'std::wfstream::~wfstream +}; // weak +int (*off_51AB38[2])() = +{ + &`virtual thunk to'std::wfstream::~wfstream, + &`virtual thunk to'std::wfstream::~wfstream +}; // weak +int (*off_51AB4C)() = &std::wistream::~wistream; // weak +int (*off_51AB60[2])() = +{ + &`virtual thunk to'std::wistream::~wistream, + &`virtual thunk to'std::wistream::~wistream +}; // weak +int (*off_51AB74)() = &std::wostream::~wostream; // weak +int (*off_51AB88[2])() = +{ + &`virtual thunk to'std::wostream::~wostream, + &`virtual thunk to'std::wostream::~wostream +}; // weak +void (__cdecl *off_51AB98)(std::runtime_error *__hidden this) = &std::runtime_error::~runtime_error; // weak +int (*off_51ABB0[2])() = { &std::ifstream::~ifstream, &std::ifstream::~ifstream }; // weak +int (*off_51ABC4[2])() = +{ + &`virtual thunk to'std::ifstream::~ifstream, + &`virtual thunk to'std::ifstream::~ifstream +}; // weak +int (*off_51ABD8[2])() = { &std::wifstream::~wifstream, &std::wifstream::~wifstream }; // weak +int (*off_51ABEC[2])() = +{ + &`virtual thunk to'std::wifstream::~wifstream, + &`virtual thunk to'std::wifstream::~wifstream +}; // weak +int (*off_51AC00)() = &std::wiostream::~basic_iostream; // weak +int (*off_51AC14[2])() = +{ + &`non-virtual thunk to'std::wiostream::~basic_iostream, + &`non-virtual thunk to'std::wiostream::~basic_iostream +}; // weak +int (*off_51AC28[2])() = +{ + &`virtual thunk to'std::wiostream::~basic_iostream, + &`virtual thunk to'std::wiostream::~basic_iostream +}; // weak +int (*off_51AC3C[2])() = { &std::ofstream::~ofstream, &std::ofstream::~ofstream }; // weak +int (*off_51AC50[2])() = +{ + &`virtual thunk to'std::ofstream::~ofstream, + &`virtual thunk to'std::ofstream::~ofstream +}; // weak +int (*off_51AC64[2])() = { &std::wofstream::~wofstream, &std::wofstream::~wofstream }; // weak +int (*off_51AC78[2])() = +{ + &`virtual thunk to'std::wofstream::~wofstream, + &`virtual thunk to'std::wofstream::~wofstream +}; // weak +int (*off_51AC88)() = &std::codecvt_byname::~codecvt_byname; // weak +int (*off_51ACB4)() = &std::codecvt_byname::~codecvt_byname; // weak +int (*off_51ACE0)() = &std::collate_byname::~collate_byname; // weak +int (*off_51ACFC)() = &std::collate_byname::~collate_byname; // weak +void (__cdecl *off_51AD18)(std::overflow_error *__hidden this) = &std::overflow_error::~overflow_error; // weak +int (*off_51AD2C)() = &std::_Sp_counted_ptr::~_Sp_counted_ptr; // weak +int (*off_51AD64)() = &std::_Sp_counted_ptr::~_Sp_counted_ptr; // weak +int (*off_51AD80)() = &std::_Sp_counted_ptr::~_Sp_counted_ptr; // weak +int (*off_51AD9C)() = &std::_Sp_counted_ptr::~_Sp_counted_ptr; // weak +int (*off_51ADB8)() = &std::_Sp_counted_ptr::~_Sp_counted_ptr; // weak +int (*off_51ADD4)() = &std::streambuf::~streambuf; // weak +int (*off_51AE14)() = &std::wstreambuf::~wstreambuf; // weak +int (*off_51AE54)() = &std::messages_byname::~messages_byname; // weak +int (*off_51AE70)() = &std::messages_byname::~messages_byname; // weak +int (*off_51AE8C)() = &std::numpunct_byname::~numpunct_byname; // weak +int (*off_51AEB0)() = &std::numpunct_byname::~numpunct_byname; // weak +void (__cdecl *off_51AF4C)(std::underflow_error *__hidden this) = &std::underflow_error::~underflow_error; // weak +int (*off_51AF60)() = &std::__numpunct_cache::~__numpunct_cache; // weak +int (*off_51AF70)() = &std::__numpunct_cache::~__numpunct_cache; // weak +void (__cdecl *off_51AF80)(std::invalid_argument *__hidden this) = &std::invalid_argument::~invalid_argument; // weak +int (*off_51AF94)() = &std::__timepunct_cache::~__timepunct_cache; // weak +int (*off_51AFA4)() = &std::__timepunct_cache::~__timepunct_cache; // weak +int (*off_51AFB4)() = &std::moneypunct_byname::~moneypunct_byname; // weak +int (*off_51AFE8)() = &std::moneypunct_byname::~moneypunct_byname; // weak +int (*off_51B01C)() = &std::moneypunct_byname::~moneypunct_byname; // weak +int (*off_51B050)() = &std::moneypunct_byname::~moneypunct_byname; // weak +int (*off_51B084)() = &std::__moneypunct_cache::~__moneypunct_cache; // weak +int (*off_51B094)() = &std::__moneypunct_cache::~__moneypunct_cache; // weak +int (*off_51B0A4)() = &std::__moneypunct_cache::~__moneypunct_cache; // weak +int (*off_51B0B4)() = &std::__moneypunct_cache::~__moneypunct_cache; // weak +int (*off_51B11C)() = &std::__codecvt_utf8_base::~__codecvt_utf8_base; // weak +void (__cdecl *off_51B148)(std::__iosfail_type_info *__hidden this) = &std::__iosfail_type_info::~__iosfail_type_info; // weak +int (*off_51B1CC)() = &std::__codecvt_utf16_base::~__codecvt_utf16_base; // weak +void (__cdecl *off_51B1F8)(std::bad_array_new_length *__hidden this) = &std::bad_array_new_length::~bad_array_new_length; // weak +_UNKNOWN unk_51B24C; // weak +_UNKNOWN unk_51B28C; // weak +_UNKNOWN unk_51B2B8; // weak +_UNKNOWN unk_51B2E4; // weak +_UNKNOWN unk_51B310; // weak +_UNKNOWN unk_51B33C; // weak +_UNKNOWN unk_51B368; // weak +int (*off_51B3EC)() = &std::__codecvt_utf8_utf16_base::~__codecvt_utf8_utf16_base; // weak +int (*off_51B418)() = &std::ctype::~ctype; // weak +int (*off_51B448)() = &std::ctype::~ctype; // weak +int (*off_51B488)() = &std::codecvt::~codecvt; // weak +int (*off_51B4B4)() = &std::codecvt::~codecvt; // weak +int (*off_51B4E0)() = &std::codecvt::~codecvt; // weak +int (*off_51B50C)() = &std::codecvt::~codecvt; // weak +int (__cdecl *off_51B538)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int) = &std::codecvt::~codecvt; // weak +int (__cdecl *off_51B564)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int) = &std::codecvt::~codecvt; // weak +int (*off_51B590)() = &std::collate::~collate; // weak +int (*off_51B5AC)() = &std::collate::~collate; // weak +int (*off_51B5C8)() = &std::num_get>::~num_get; // weak +int (*off_51B604)() = &std::num_get>::~num_get; // weak +int (*off_51B640)() = &std::num_put>::~num_put; // weak +int (*off_51B670)() = &std::num_put>::~num_put; // weak +void (__cdecl *off_51B6A0)(std::bad_cast *__hidden this) = &std::bad_cast::~bad_cast; // weak +void (__cdecl *off_51B6B4)(std::ios_base *__hidden this) = &std::ios_base::~ios_base; // weak +int (*off_51B6C4)() = &std::messages::~messages; // weak +int (*off_51B6E0)() = &std::messages::~messages; // weak +int (*off_51B6FC)() = &std::numpunct::~numpunct; // weak +int (*off_51B720)() = &std::numpunct::~numpunct; // weak +int (*off_51B744)() = &std::time_get>::~time_get; // weak +int (*off_51B76C)() = &std::time_get>::~time_get; // weak +int (*off_51B794)() = &std::time_put>::~time_put; // weak +int (*off_51B7A8)() = &std::time_put>::~time_put; // weak +void (__cdecl *off_51B7BC)(std::bad_alloc *__hidden this) = &std::bad_alloc::~bad_alloc; // weak +int (*off_51B7D0)() = &std::ios::~ios; // weak +int (*off_51B7E0)() = &std::wios::~wios; // weak +int (*off_51B804)() = &std::money_get>::~money_get; // weak +int (*off_51B81C)() = &std::money_get>::~money_get; // weak +int (*off_51B834)() = &std::money_put>::~money_put; // weak +int (*off_51B84C)() = &std::money_put>::~money_put; // weak +void *std::ctype::classic_table(void)::_S_classic_table = &unk_1000100; // weak +_TCHAR *__mingw_winmain_lpCmdLine; // idb +HINSTANCE __mingw_winmain_hInstance; // idb +_startupinfo startinfo; // idb +int has_cctor; // idb +int managedapp; // idb +int mainret; // idb +char **envp; // idb +char **argv; // idb +int argc; // idb +_UNKNOWN WXML::RPX::acceptNum(char const*,int &)::nextPos; // weak +int dword_51D0EC; // weak +int dword_51D0F4; // weak +int dword_51D0F8; // weak +int dword_51D100[264]; // weak +int dword_51D520; // weak +int dword_51D528[264]; // weak +int dword_51D948; // weak +int dword_51D950[266]; // weak +int dword_51DD78[266]; // weak +int dword_51E1A0[218]; // weak +char WXML::RPX::acceptNum(char const*,int &)::inited; // weak +_UNKNOWN WXML::RPX::acceptStr(char const*,int &)::nextPos; // weak +int dword_51E5A8; // weak +int dword_51E5BC; // weak +int dword_51E948[34]; // weak +int dword_51E9D0; // weak +int dword_51EAB8; // weak +int dword_51ED70[39]; // weak +int dword_51EE0C; // weak +int dword_51EEE0; // weak +int dword_51F198[266]; // weak +int dword_51F5C0[532]; // weak +char WXML::RPX::acceptStr(char const*,int &)::inited; // weak +_UNKNOWN WXML::RPX::acceptID(char const*,int &)::nextPos; // weak +int dword_51FF24[30]; // weak +int dword_51FF9C; // weak +int dword_51FFA4[217]; // weak +int dword_520308; // weak +int dword_52030C; // weak +int dword_520310; // weak +int dword_520314; // weak +int dword_520318; // weak +int dword_52031C; // weak +int dword_520320; // weak +int dword_520324; // weak +int dword_520328; // weak +int dword_52032C; // weak +int dword_52034C[30]; // weak +int dword_5203C4; // weak +int dword_5203CC[169]; // weak +char WXML::RPX::acceptID(char const*,int &)::inited; // weak +_UNKNOWN WXSS::Tokenizer::SCC; // weak +int dword_5206B8[1786]; // weak +int WXSS::Tokenizer::TT[]; // weak +int dword_522AA0[]; // weak +_UNKNOWN unk_7FFFFF; // weak +_UNKNOWN unk_1440001; // weak +int WXSS::Tokenizer::InitSubStrCheckingCaluseTable(void)::inited; // weak +int __native_startup_lock; // weak +int __native_startup_state; // weak +int _dowildcard; // weak +int mingw_initcharmax; // weak +int _newmode; // weak +int mingw_initltssuo_force; // weak +int mingw_initltsdyn_force; // weak +int mingw_initltsdrot_force; // weak +int _commode; +int mingw_app_type; // weak +int was_init_0; // weak +int maxSections; // weak +int the_secs; // weak +int (__cdecl *stUserMathErr)(_DWORD); // weak +int _fmode; +int (__stdcall *__mingw_oldexcpt_handler)(_DWORD); // weak +void *key_dtor_list; // idb +int __mingwthr_cs_init; // weak +struct _RTL_CRITICAL_SECTION __mingwthr_cs; // idb +DWORD fc_key; // idb +int fc_static; // weak +int emutls_size; // weak +DWORD emutls_key; // idb +int emutls_mutex; // weak +HANDLE hHandle; // idb +char __hexdig_D2A[48]; // weak +char byte_1522390; // weak +int p5s; // weak +_UNKNOWN private_mem; // weak +int freelist[]; // weak +int dword_1522D84; // weak +int dtoa_CS_init; // weak +struct _RTL_CRITICAL_SECTION dtoa_CritSec; // idb +struct _RTL_CRITICAL_SECTION CriticalSection; // idb +_UNKNOWN bss_1; // weak +_UNKNOWN internal_mbstate_1; // weak +_UNKNOWN internal_mbstate_2; // weak +int (__stdcall *pRtlGenRandom)(_DWORD, _DWORD); // weak +int msvcrt__lc_codepage; // weak +// extern HANDLE (__stdcall *CreateSemaphoreW)(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCWSTR lpName); +// extern void (__stdcall *DeleteCriticalSection)(LPCRITICAL_SECTION lpCriticalSection); +// extern void (__stdcall *EnterCriticalSection)(LPCRITICAL_SECTION lpCriticalSection); +// extern DWORD (__stdcall *GetCurrentThreadId)(); +// extern DWORD (__stdcall *GetLastError)(); +// extern HMODULE (__stdcall *GetModuleHandleW)(LPCWSTR lpModuleName); +// extern FARPROC (__stdcall *GetProcAddress)(HMODULE hModule, LPCSTR lpProcName); +// extern void (__stdcall *GetStartupInfoA)(LPSTARTUPINFOA lpStartupInfo); +// extern void (__stdcall *InitializeCriticalSection)(LPCRITICAL_SECTION lpCriticalSection); +// extern BOOL (__stdcall *IsDBCSLeadByteEx)(UINT CodePage, BYTE TestChar); +// extern void (__stdcall *LeaveCriticalSection)(LPCRITICAL_SECTION lpCriticalSection); +// extern HMODULE (__stdcall *LoadLibraryW)(LPCWSTR lpLibFileName); +// extern int (__stdcall *MultiByteToWideChar)(UINT CodePage, DWORD dwFlags, LPCCH lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar); +// extern BOOL (__stdcall *ReleaseSemaphore)(HANDLE hSemaphore, LONG lReleaseCount, LPLONG lpPreviousCount); +// extern void (__stdcall *SetLastError)(DWORD dwErrCode); +// extern LPTOP_LEVEL_EXCEPTION_FILTER (__stdcall *SetUnhandledExceptionFilter)(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter); +// extern void (__stdcall *Sleep)(DWORD dwMilliseconds); +// extern DWORD (__stdcall *TlsAlloc)(); +// extern BOOL (__stdcall *TlsFree)(DWORD dwTlsIndex); +// extern LPVOID (__stdcall *TlsGetValue)(DWORD dwTlsIndex); +// extern BOOL (__stdcall *TlsSetValue)(DWORD dwTlsIndex, LPVOID lpTlsValue); +// extern BOOL (__stdcall *VirtualProtect)(LPVOID lpAddress, SIZE_T dwSize, DWORD flNewProtect, PDWORD lpflOldProtect); +// extern SIZE_T (__stdcall *VirtualQuery)(LPCVOID lpAddress, PMEMORY_BASIC_INFORMATION lpBuffer, SIZE_T dwLength); +// extern DWORD (__stdcall *WaitForSingleObject)(HANDLE hHandle, DWORD dwMilliseconds); +// extern int (__stdcall *WideCharToMultiByte)(UINT CodePage, DWORD dwFlags, LPCWCH lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCCH lpDefaultChar, LPBOOL lpUsedDefaultChar); +// extern _UNKNOWN ___initenv; weak +// extern int *(__cdecl *__errno)(); +// extern int (__cdecl *__fstat64)(int FileHandle, struct _stat64 *Stat); +// extern int (__cdecl *__stricmp)(const char *String1, const char *String2); +// extern FILE *(__cdecl *__wfopen)(const wchar_t *FileName, const wchar_t *Mode); +// extern int (__cdecl *_isalpha)(int C); +_PVFV __xc_a = NULL; // idb +_PVFV __xc_z = NULL; // idb +_PVFV __crt_xc_end__ = NULL; // idb +_PVFV __xi_z = NULL; // idb + + +//----- (00401010) -------------------------------------------------------- +int pre_c_init() +{ + BOOL v0; // eax + __int16 v2; // dx + + v0 = 0; + mingw_initltsdrot_force = 1; + mingw_initltsdyn_force = 1; + mingw_initltssuo_force = 1; + mingw_initcharmax = 1; + if ( MEMORY[0x400000] == 23117 && *(_DWORD *)(MEMORY[0x40003C] + 0x400000) == 17744 ) + { + v2 = *(_WORD *)(MEMORY[0x40003C] + 4194328); + if ( v2 == 267 ) + { + if ( *(_DWORD *)(MEMORY[0x40003C] + 4194420) > 0xEu ) + v0 = *(_DWORD *)(MEMORY[0x40003C] + 4194536) != 0; + } + else if ( v2 == 523 && *(_DWORD *)(MEMORY[0x40003C] + 4194436) > 0xEu ) + { + v0 = *(_DWORD *)(MEMORY[0x40003C] + 4194552) != 0; + } + } + managedapp = v0; + if ( mingw_app_type ) + __set_app_type(_crt_gui_app); + else + __set_app_type(_crt_console_app); + *__p__fmode() = _fmode; + *__p__commode() = _commode; + _setargv(); + if ( _MINGW_INSTALL_DEBUG_MATHERR == 1 ) + __mingw_setusermatherr(_matherr); + return 0; +} +// 50B138: using guessed type int _MINGW_INSTALL_DEBUG_MATHERR; +// 15222D4: using guessed type int mingw_initcharmax; +// 15222DC: using guessed type int mingw_initltssuo_force; +// 15222E0: using guessed type int mingw_initltsdyn_force; +// 15222E4: using guessed type int mingw_initltsdrot_force; +// 15222F0: using guessed type int mingw_app_type; + +//----- (00401130) -------------------------------------------------------- +void pre_cpp_init() +{ + startinfo.newmode = _newmode; + __getmainargs(&argc, &argv, &envp, _dowildcard, &startinfo); +} +// 43FE38: using guessed type int __cdecl __getmainargs(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD); +// 15222D0: using guessed type int _dowildcard; +// 15222D8: using guessed type int _newmode; + +//----- (00401170) -------------------------------------------------------- +// write access to const memory has been detected, the output may be wrong! +int __usercall __tmainCRTStartup@(int a1@, int a2@, int a3@, int a4@, char a5) +{ + signed __int32 v5; // edi + signed __int32 v6; // eax + __int32 v7; // ebx + char **v8; // eax + char v9; // cl + _TCHAR *v10; // eax + char v11; // dl + char v12; // dl + DWORD wShowWindow; // eax + int v14; // ebx + size_t v15; // esi + char **v16; // eax + char **v17; // ebx + const char **v18; // edi + const char *v19; // eax + size_t Size; // esi + char *v21; // eax + int result; // eax + size_t v23; // [esp+14h] [ebp-7Ch] + char **v24; // [esp+18h] [ebp-78h] + const char **v25; // [esp+1Ch] [ebp-74h] + struct _STARTUPINFOA v26; // [esp+2Ch] [ebp-64h] BYREF + char *v27; // [esp+78h] [ebp-18h] + int v28; // [esp+7Ch] [ebp-14h] + int v29; // [esp+80h] [ebp-10h] + int v30; // [esp+84h] [ebp-Ch] + int v31; // [esp+88h] [ebp-8h] + int v32; // [esp+8Ch] [ebp-4h] + int retaddr; // [esp+90h] [ebp+0h] + + v32 = retaddr; + v31 = a2; + v30 = a3; + v29 = a4; + v28 = a1; + v27 = &a5; + memset(&v26, 0, sizeof(v26)); + if ( mingw_app_type ) + GetStartupInfoA(&v26); + v5 = *((_DWORD *)NtCurrentTeb() + 1); + while ( 1 ) + { + v6 = _InterlockedCompareExchange(&__native_startup_lock, v5, 0); + if ( !v6 ) + { + v7 = 0; + if ( __native_startup_state == 1 ) + goto LABEL_40; + goto LABEL_8; + } + if ( v5 == v6 ) + break; + Sleep(0x3E8u); + } + v7 = 1; + if ( __native_startup_state == 1 ) + { +LABEL_40: + _amsg_exit(31); + if ( __native_startup_state == 1 ) + goto LABEL_41; +LABEL_11: + if ( v7 ) + goto LABEL_12; + goto LABEL_42; + } +LABEL_8: + if ( __native_startup_state ) + { + has_cctor = 1; + } + else + { + __native_startup_state = 1; + _initterm(&__crt_xc_end__, &__xi_z); + } + if ( __native_startup_state != 1 ) + goto LABEL_11; +LABEL_41: + _initterm(&__xc_a, &__xc_z); + __native_startup_state = 2; + if ( v7 ) + goto LABEL_12; +LABEL_42: + _InterlockedExchange(&__native_startup_lock, v7); +LABEL_12: + if ( __dyn_tls_init_callback ) + __dyn_tls_init_callback(0, 2, 0); + _pei386_runtime_relocator(); + __mingw_oldexcpt_handler = (int (__stdcall *)(_DWORD))SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)_gnu_exception_handler); + _set_invalid_parameter_handler(__mingw_invalidParameterHandler); + fpreset(); + __mingw_winmain_hInstance = (HINSTANCE)0x400000; + v8 = __p__acmdln(); + v9 = 0; + v10 = *v8; + if ( !v10 ) + goto LABEL_27; + while ( 1 ) + { + v11 = *v10; + if ( *v10 <= 32 ) + break; + if ( v11 == 34 ) + v9 ^= 1u; +LABEL_19: + ++v10; + } + if ( !v11 ) + goto LABEL_26; + if ( (v9 & 1) != 0 ) + { + v9 = 1; + goto LABEL_19; + } + do + v12 = *++v10; + while ( v12 && v12 <= 32 ); +LABEL_26: + __mingw_winmain_lpCmdLine = v10; +LABEL_27: + if ( mingw_app_type ) + { + wShowWindow = 10; + if ( (v26.dwFlags & 1) != 0 ) + wShowWindow = v26.wShowWindow; + _data_start__ = wShowWindow; + } + v14 = argc; + v15 = 4 * argc + 4; + v16 = (char **)malloc(v15); + v24 = v16; + if ( v14 > 0 ) + { + v17 = v16; + v18 = (const char **)argv; + v23 = v15 - 4; + v25 = (const char **)((char *)argv + v15 - 4); + do + { + v19 = *v18; + ++v17; + ++v18; + Size = strlen(v19) + 1; + v21 = (char *)malloc(Size); + *(v17 - 1) = v21; + memcpy(v21, *(v18 - 1), Size); + } + while ( v25 != v18 ); + v16 = (char **)((char *)v24 + v23); + } + *v16 = 0; + argv = v24; + __main(); + ___initenv = envp; + result = main(argc, (const char **)argv, ___initenv); + mainret = result; + if ( !managedapp ) + exit(result); + if ( !has_cctor ) + { + _cexit(); + return mainret; + } + return result; +} +// 40137A: write access to const memory at 1523268 has been detected +// 401170: could not find valid save-restore pair for ebx +// 401170: could not find valid save-restore pair for ebp +// 401170: could not find valid save-restore pair for edi +// 401170: could not find valid save-restore pair for esi +// 4012B2: conditional instruction was optimized away because dl.1!=0 +// 43FE08: using guessed type int __cdecl _amsg_exit(_DWORD); +// 514980: using guessed type int (__stdcall *__dyn_tls_init_callback)(_DWORD, _DWORD, _DWORD); +// 15222C8: using guessed type int __native_startup_lock; +// 15222CC: using guessed type int __native_startup_state; +// 15222F0: using guessed type int mingw_app_type; +// 1522308: using guessed type int (__stdcall *__mingw_oldexcpt_handler)(_DWORD); + +//----- (004014B0) -------------------------------------------------------- +int __usercall WinMainCRTStartup@(int a1@, int a2@, int a3@, int a4@, char a5) +{ + mingw_app_type = 1; + return __tmainCRTStartup(a1, a2, a3, a4, a5); +} +// 15222F0: using guessed type int mingw_app_type; + +//----- (004014C0) -------------------------------------------------------- +int __usercall mainCRTStartup@(int a1@, int a2@, int a3@, int a4@, char a5) +{ + mingw_app_type = 0; + return __tmainCRTStartup(a1, a2, a3, a4, a5); +} +// 15222F0: using guessed type int mingw_app_type; + +//----- (004014D0) -------------------------------------------------------- +int __cdecl atexit(_PVFV func) +{ + return -(_onexit((_onexit_t)func) == 0); +} + +//----- (004014F0) -------------------------------------------------------- +int __gcc_register_frame() +{ + return atexit(__gcc_deregister_frame); +} + +//----- (00401520) -------------------------------------------------------- +int printf(char *a1, ...) +{ + FILE *v1; // eax + va_list va; // [esp+24h] [ebp+Ch] BYREF + + va_start(va, a1); + v1 = ___acrt_iob_func(1u); + return __mingw_vfprintf(v1, a1, (int *)va); +} + +//----- (00401550) -------------------------------------------------------- +int fprintf(_iobuf *a1, char *a2, ...) +{ + va_list va; // [esp+28h] [ebp+10h] BYREF + + va_start(va, a2); + return __mingw_vfprintf(a1, a2, (int *)va); +} + +//----- (00401571) -------------------------------------------------------- +void __tcf_1(void) +{ + std::ios_base::Init::~Init(); +} + +//----- (0040157C) -------------------------------------------------------- +void __usercall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase( + int a1@) +{ + int v2; // esi + void *v3; // [esp+0h] [ebp-18h] + + while ( a1 ) + { + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(*(_DWORD *)(a1 + 12)); + v2 = *(_DWORD *)(a1 + 8); + std::string::_M_dispose((void **)(a1 + 16)); + v3 = (void *)a1; + a1 = v2; + operator delete(v3); + } +} + +//----- (004015B0) -------------------------------------------------------- +unsigned __int8 *__thiscall std::string::operator=(unsigned __int8 **this, int a2) +{ + unsigned __int8 **v3; // eax + unsigned __int8 *v4; // ecx + unsigned __int8 *v5; // edx + unsigned __int8 *v6; // eax + unsigned __int8 **v7; // edx + unsigned __int8 *result; // eax + unsigned __int8 *v9; // [esp+18h] [ebp-20h] + + v3 = (unsigned __int8 **)*this; + v4 = *(unsigned __int8 **)a2; + v5 = *(unsigned __int8 **)(a2 + 4); + if ( *(_DWORD *)a2 == a2 + 8 ) + { + if ( v5 ) + std::string::_S_copy(v3, v4, *(_DWORD *)(a2 + 4)); + v6 = *(unsigned __int8 **)(a2 + 4); + v7 = (unsigned __int8 **)*this; + this[1] = v6; + v6[(_DWORD)v7] = 0; + } + else + { + if ( v3 == this + 2 ) + v3 = 0; + else + v9 = this[2]; + *this = v4; + this[1] = v5; + this[2] = *(unsigned __int8 **)(a2 + 8); + if ( v3 ) + { + *(_DWORD *)a2 = v3; + *(_DWORD *)(a2 + 8) = v9; + } + else + { + *(_DWORD *)a2 = a2 + 8; + } + } + result = *(unsigned __int8 **)a2; + *(_DWORD *)(a2 + 4) = 0; + *result = 0; + return result; +} +// 401617: variable 'v9' is possibly undefined + +//----- (00401638) -------------------------------------------------------- +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str) +{ + size_t v2; // eax + + v2 = strlen(Str); + return std::string::_M_replace(this, 0, (size_t)this[1], Str, v2); +} + +//----- (00401676) -------------------------------------------------------- +int __thiscall std::string::basic_string(void **this, char *Str) +{ + char *v3; // edi + int result; // eax + int v5; // edx + int v6[7]; // [esp+1Ch] [ebp-1Ch] BYREF + + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v6[0] = strlen(Str); + v3 = &Str[v6[0]]; + if ( v6[0] > 0xFu ) + { + *this = std::string::_M_create((unsigned int *)v6, 0); + this[2] = (void *)v6[0]; + } + std::string::_S_copy_chars(*this, (unsigned __int8 *)Str, (size_t)v3); + result = v6[0]; + v5 = (int)*this; + this[1] = (void *)v6[0]; + *(_BYTE *)(v5 + result) = 0; + return result; +} +// 401676: using guessed type size_t var_1C[7]; + +//----- (004016F4) -------------------------------------------------------- +void __usercall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase( + int a1@) +{ + int v2; // esi + void *v3; // [esp+0h] [ebp-28h] + + while ( a1 ) + { + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(*(_DWORD *)(a1 + 12)); + v2 = *(_DWORD *)(a1 + 8); + std::string::_M_dispose((void **)(a1 + 40)); + std::string::_M_dispose((void **)(a1 + 16)); + v3 = (void *)a1; + a1 = v2; + operator delete(v3); + } +} + +//----- (00401734) -------------------------------------------------------- +int __cdecl Usage(int a1, const char **a2) +{ + printf("*** WeChat Stylesheet Compiler, Version %s ***\n", "v0.4me_20190328_db"); + printf( + "Usage: %s [-lc] [-o OUTPUT] [-s ] [-st] [-js] [-db] [-cp ] [-pc ] <[-sd ] | [import_css_files..]>\n", + *a2); + printf(" -lc: need to lint the css\n"); + printf(" -sd: 'someclass { font-size: 18px }'\n"); + printf(" -s: read from stdin\n"); + printf(" -o: output destination (default stdout)\n"); + printf(" -st: print tree\n"); + printf(" -db: add debug attr\n"); + printf(" -js: js formate output\n"); + printf(" -cp: add class prefix\n"); + printf(" -pc: page wxss files count\n"); + return 0; +} + +//----- (004017D3) -------------------------------------------------------- +int __cdecl ReadFile(char *FileName, unsigned int **a2) +{ + FILE *v2; // eax + FILE *v3; // ebx + int v4; // edi + char Buffer[4]; // [esp+10h] [ebp-418h] BYREF + char v7[1020]; // [esp+14h] [ebp-414h] BYREF + + std::string::operator=(a2, (char *)&byte_50D216); + v2 = ___acrt_iob_func(0); + if ( FileName ) + v2 = fopen(FileName, "r"); + v3 = v2; + v4 = -1; + if ( v2 ) + { + *(_DWORD *)Buffer = 0; + memset(v7, 0, sizeof(v7)); + while ( fgets(Buffer, 1024, v3) ) + std::string::append(a2, Buffer); + v4 = 0; + if ( FileName ) + fclose(v3); + } + return v4; +} + +//----- (00401879) -------------------------------------------------------- +int __cdecl Trim(int a1, int a2) +{ + unsigned int v2; // eax + void *v4[6]; // [esp+50h] [ebp-38h] BYREF + void *v5[8]; // [esp+68h] [ebp-20h] BYREF + + std::string::basic_string((char *)a1, a2); + while ( *(_DWORD *)(a1 + 4) > 1u && **(_BYTE **)a1 == 32 ) + { + std::string::substr(v4, (_DWORD *)a1, 1u, 0xFFFFFFFF); + std::string::operator=((unsigned __int8 **)a1, (int)v4); + std::string::_M_dispose(v4); + } + while ( 1 ) + { + v2 = *(_DWORD *)(a1 + 4); + if ( v2 <= 1 || *(_BYTE *)(*(_DWORD *)a1 + v2 - 1) != 32 ) + break; + std::string::substr(v5, (_DWORD *)a1, 0, v2 - 1); + std::string::operator=((unsigned __int8 **)a1, (int)v5); + std::string::_M_dispose(v5); + } + return a1; +} + +//----- (0040199E) -------------------------------------------------------- +int __cdecl GetNextArg(int a1, int *a2, int a3) +{ + unsigned int v3; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-90h] + void *v6[2]; // [esp+58h] [ebp-50h] BYREF + char v7; // [esp+60h] [ebp-48h] BYREF + void *v8[6]; // [esp+70h] [ebp-38h] BYREF + void *v9[8]; // [esp+88h] [ebp-20h] BYREF + + v3 = std::string::find(a2, *(char **)a3, 0); + v6[1] = 0; + lpuexcpt = (struct _Unwind_Exception *)v3; + v6[0] = &v7; + v7 = 0; + if ( v3 == -1 ) + { + std::string::_M_assign((int)v6, (int)a2); + std::string::operator=((unsigned int **)a2, (char *)&byte_50D216); + } + else + { + std::string::substr(v8, a2, 0, v3); + std::string::operator=((unsigned __int8 **)v6, (int)v8); + std::string::_M_dispose(v8); + std::string::substr(v9, a2, (unsigned int)lpuexcpt + *(_DWORD *)(a3 + 4), 0xFFFFFFFF); + std::string::operator=((unsigned __int8 **)a2, (int)v9); + std::string::_M_dispose(v9); + } + Trim(a1, (int)v6); + std::string::_M_dispose(v6); + return a1; +} + +//----- (00401B15) -------------------------------------------------------- +int __cdecl EscapeToJsonString(int a1, int a2) +{ + unsigned __int8 v2; // al + char *v3; // eax + char *v4; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-110h] + unsigned __int8 v7; // [esp+57h] [ebp-D1h] BYREF + int v8; // [esp+58h] [ebp-D0h] BYREF + char v9[204]; // [esp+5Ch] [ebp-CCh] BYREF + + std::ostringstream::basic_ostringstream((int)&v8); + for ( lpuexcpt = *(struct _Unwind_Exception **)a2; + lpuexcpt != (struct _Unwind_Exception *)(*(_DWORD *)a2 + *(_DWORD *)(a2 + 4)); + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1) ) + { + v2 = *(_BYTE *)lpuexcpt; + if ( *(_BYTE *)lpuexcpt == 92 || v2 == 34 || v2 <= 0x1Fu ) + { + v3 = (char *)std::operator<<>((std::ostream::sentry *)&v8, "\\u"); + v4 = std::ostream::operator<<(v3, (void (__cdecl *)(char *))std::hex); + *(_DWORD *)&v4[*(_DWORD *)(*(_DWORD *)v4 - 12) + 8] = 4; + std::operator<<>(v4, 48); + std::ostream::operator<<(*(char *)lpuexcpt); + } + else + { + v7 = *(_BYTE *)lpuexcpt; + std::__ostream_insert>((std::ostream::sentry *)&v8, (int)&v7, 1); + } + } + std::stringbuf::str(a1, (int)v9); + std::ostringstream::~ostringstream((int)&v8); + return a1; +} +// 4A2900: using guessed type _DWORD __stdcall std::ostream::operator<<(_DWORD); +// 401B15: using guessed type char var_CC[204]; + +//----- (00401CB0) -------------------------------------------------------- +int __cdecl DictToJsonString(int a1, int a2) +{ + char v2; // al + std::ostream::sentry *v3; // eax + std::ostream::sentry *v4; // eax + std::ostream::sentry *v6; // [esp+14h] [ebp-124h] + std::ostream::sentry *v7; // [esp+14h] [ebp-124h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-120h] + char *v9[6]; // [esp+50h] [ebp-E8h] BYREF + char v10[4]; // [esp+68h] [ebp-D0h] BYREF + char v11[204]; // [esp+6Ch] [ebp-CCh] BYREF + + std::ostringstream::basic_ostringstream((int)v10); + std::operator<<>((std::ostream::sentry *)v10, (char *)asc_50D21C); + lpuexcpt = *(struct _Unwind_Exception **)(a2 + 12); + v2 = 1; + while ( (struct _Unwind_Exception *)(a2 + 4) != lpuexcpt ) + { + if ( !v2 ) + std::operator<<>((std::ostream::sentry *)v10, (char *)&asc_50D21C[4]); + v6 = std::operator<<>((std::ostream::sentry *)v10, (char *)&asc_50D21C[2]); + EscapeToJsonString((int)v9, (int)lpuexcpt + 16); + v3 = std::operator<<>(v6, v9[0]); + std::operator<<>(v3, "\":"); + std::string::_M_dispose((void **)v9); + v7 = std::operator<<>((std::ostream::sentry *)v10, (char *)&asc_50D21C[2]); + EscapeToJsonString((int)v9, (int)lpuexcpt + 40); + v4 = std::operator<<>(v7, v9[0]); + std::operator<<>(v4, (char *)&asc_50D21C[2]); + std::string::_M_dispose((void **)v9); + lpuexcpt = (struct _Unwind_Exception *)std::_Rb_tree_increment((int)lpuexcpt); + v2 = 0; + } + std::operator<<>((std::ostream::sentry *)v10, "}"); + std::stringbuf::str(a1, (int)v11); + std::ostringstream::~ostringstream((int)v10); + return a1; +} +// 401CB0: using guessed type char var_D0[4]; +// 401CB0: using guessed type char var_CC[204]; + +//----- (00401F3C) -------------------------------------------------------- +void __tcf_3(void) +{ + std::ios_base::Init::~Init(); +} + +//----- (00401F46) -------------------------------------------------------- +int snprintf(FILE *a1, int a2, int a3, ...) +{ + va_list va; // [esp+2Ch] [ebp+14h] BYREF + + va_start(va, a3); + return __mingw_vsnprintf( + a1, + a2, + "var BASE_DEVICE_WIDTH = 750;\n" + "var isIOS=navigator.userAgent.match(\"iPhone\");\n" + "var deviceWidth = window.screen.width || 375;\n" + "var deviceDPR = window.devicePixelRatio || 2;\n" + "var checkDeviceWidth = window.__checkDeviceWidth__ || function() {\n" + "var newDeviceWidth = window.screen.width || 375\n" + "var newDeviceDPR = window.devicePixelRatio || 2\n" + "var newDeviceHeight = window.screen.height || 375\n" + "if (window.screen.orientation && /^landscape/.test(window.screen.orientation.type || '')) newDeviceWidth = ne" + "wDeviceHeight\n" + "if (newDeviceWidth !== deviceWidth || newDeviceDPR !== deviceDPR) {\n" + "deviceWidth = newDeviceWidth\n" + "deviceDPR = newDeviceDPR\n" + "}\n" + "}\n" + "checkDeviceWidth()\n" + "var eps = 1e-4;\n" + "var transformRPX = window.__transformRpx__ || function(number, newDeviceWidth) {\n" + "if ( number === 0 ) return 0;\n" + "number = number / BASE_DEVICE_WIDTH * ( newDeviceWidth || deviceWidth );\n" + "number = Math.floor(number + eps);\n" + "if (number === 0) {\n" + "if (deviceDPR === 1 || !isIOS) {\n" + "return 1;\n" + "} else {\n" + "return 0.5;\n" + "}\n" + "}\n" + "return number;\n" + "}\n" + "window.__rpxRecalculatingFuncs__ = window.__rpxRecalculatingFuncs__ || [];\n" + "var __COMMON_STYLESHEETS__ = __COMMON_STYLESHEETS__||{}\n" + "%s\n" + "var setCssToHead = function(file, _xcInvalid, info) {\n" + "var Ca = {};\n" + "var css_id;\n" + "var info = info || {};\n" + "var _C = __COMMON_STYLESHEETS__\n" + "function makeup(file, opt) {\n" + "var _n = typeof(file) === \"string\";\n" + "if ( _n && Ca.hasOwnProperty(file)) return \"\";\n" + "if ( _n ) Ca[file] = 1;\n" + "var ex = _n ? _C[file] : file;\n" + "var res=\"\";\n" + "for (var i = ex.length - 1; i >= 0; i--) {\n" + "var content = ex[i];\n" + "if (typeof(content) === \"object\")\n" + "{\n" + "var op = content[0];\n" + "if ( op == 0 )\n" + "res = transformRPX(content[1], opt.deviceWidth) + \"px\" + res;\n" + "else if ( op == 1)\n" + "res = opt.suffix + res;\n" + "else if ( op == 2 )\n" + "res = makeup(content[1], opt) + res;\n" + "}\n" + "else\n" + "res = content + res\n" + "}\n" + "return res;\n" + "}\n" + "var styleSheetManager = window.__styleSheetManager2__\n" + "var rewritor = function(suffix, opt, style){\n" + "opt = opt || {};\n" + "suffix = suffix || \"\";\n" + "opt.suffix = suffix;\n" + "if ( opt.allowIllegalSelector != undefined && _xcInvalid != undefined )\n" + "{\n" + "if ( opt.allowIllegalSelector )\n" + "console.warn( \"For developer:\" + _xcInvalid );\n" + "else\n" + "{\n" + "console.error( _xcInvalid );\n" + "}\n" + "}\n" + "Ca={};\n" + "css = makeup(file, opt);\n" + "if (styleSheetManager) {\n" + "var key = (info.path || Math.random()) + ':' + suffix\n" + "if (!style) {\n" + "styleSheetManager.addItem(key, info.path);\n" + "window.__rpxRecalculatingFuncs__.push(function(size){\n" + "opt.deviceWidth = size.width;\n" + "rewritor(suffix, opt, true);\n" + "});\n" + "}\n" + "styleSheetManager.setCss(key, css);\n" + "return;\n" + "}\n" + "if ( !style )\n" + "{\n" + "var head = document.head || document.getElementsByTagName('head')[0];\n" + "style = document.createElement('style');\n" + "style.type = 'text/css';\n" + "style.setAttribute( \"wxss:path\", info.path );\n" + "head.appendChild(style);\n" + "window.__rpxRecalculatingFuncs__.push(function(size){\n" + "opt.deviceWidth = size.width;\n" + "rewritor(suffix, opt, style);\n" + "});\n" + "}\n" + "if (style.styleSheet) {\n" + "style.styleSheet.cssText = css;\n" + "} else {\n" + "if ( style.childNodes.length == 0 )\n" + "style.appendChild(document.createTextNode(css));\n" + "else\n" + "style.childNodes[0].nodeValue = css;\n" + "}\n" + "}\n" + "return rewritor;\n" + "}\n", + (int *)va); +} + +//----- (00401F70) -------------------------------------------------------- +void __usercall std::_Rb_tree,std::less,std::allocator>::_M_erase( + int a1@) +{ + int v2; // esi + void *v3; // [esp+0h] [ebp-18h] + + while ( a1 ) + { + std::_Rb_tree,std::less,std::allocator>::_M_erase(*(_DWORD *)(a1 + 12)); + v2 = *(_DWORD *)(a1 + 8); + std::string::_M_dispose((void **)(a1 + 16)); + v3 = (void *)a1; + a1 = v2; + operator delete(v3); + } +} + +//----- (00401FA4) -------------------------------------------------------- +int __thiscall WXSS::CSSTreeLib::LexicalChecker::Traval(_DWORD **this, _DWORD *a2) +{ + int result; // eax + + if ( *(_BYTE *)this ) + return (*(int (__thiscall **)(_DWORD *, _DWORD))(*this[1] + 8))(this[1], *a2); + return result; +} + +//----- (00401FC4) -------------------------------------------------------- +void __usercall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase( + int a1@) +{ + int v2; // esi + void *v3; // [esp+0h] [ebp-18h] + + while ( a1 ) + { + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(*(_DWORD *)(a1 + 12)); + v2 = *(_DWORD *)(a1 + 8); + std::string::_M_dispose((void **)(a1 + 16)); + v3 = (void *)a1; + a1 = v2; + operator delete(v3); + } +} + +//----- (00401FF8) -------------------------------------------------------- +void __usercall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase( + int a1@) +{ + int v2; // esi + void *v3; // [esp+0h] [ebp-18h] + + while ( a1 ) + { + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(*(_DWORD *)(a1 + 12)); + v2 = *(_DWORD *)(a1 + 8); + std::string::_M_dispose((void **)(a1 + 16)); + v3 = (void *)a1; + a1 = v2; + operator delete(v3); + } +} + +//----- (0040202C) -------------------------------------------------------- +void __usercall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase( + int a1@) +{ + int v2; // esi + void *v3; // [esp+0h] [ebp-28h] + + while ( a1 ) + { + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(*(_DWORD *)(a1 + 12)); + v2 = *(_DWORD *)(a1 + 8); + std::string::_M_dispose((void **)(a1 + 40)); + std::string::_M_dispose((void **)(a1 + 16)); + v3 = (void *)a1; + a1 = v2; + operator delete(v3); + } +} + +//----- (0040206C) -------------------------------------------------------- +char *__cdecl WXSS::RemoveQuote(char *a1, char **a2) +{ + char *v2; // edx + char v3; // cl + int v5; // [esp+1Fh] [ebp-9h] BYREF + + v2 = a2[1]; + if ( (unsigned int)v2 <= 2 ) + { + std::string::basic_string(a1, (char *)&byte_50DF9A, (int)&v5); + } + else + { + v3 = **a2; + if ( v3 == 39 || v3 == 34 ) + std::string::substr(a1, a2, 1u, (unsigned int)(v2 - 2)); + else + std::string::basic_string(a1, (int)a2); + } + return a1; +} + +//----- (004020D6) -------------------------------------------------------- +int __stdcall WXSS::XCompiler::DealRPX(int *a1, int a2) +{ + void *v3[8]; // [esp+58h] [ebp-20h] BYREF + + WXML::Rewrite::ToStringCode2((int)v3, a1); + WXML::GetStrForMakingCSS((char **)v3, a2); + std::string::_M_dispose(v3); + std::string::operator=((unsigned int **)a1, (char *)&byte_50DF9A); + return 0; +} + +//----- (00402184) -------------------------------------------------------- +int __thiscall WXSS::XCompiler::GetHostRule(_DWORD *this, _DWORD *a2) +{ + struct _Unwind_Exception *i; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-140h] + void *v6[2]; // [esp+50h] [ebp-108h] BYREF + char v7; // [esp+58h] [ebp-100h] BYREF + void *v8[6]; // [esp+68h] [ebp-F0h] BYREF + char v9[8]; // [esp+80h] [ebp-D8h] BYREF + char v10[4]; // [esp+88h] [ebp-D0h] BYREF + char v11[204]; // [esp+8Ch] [ebp-CCh] BYREF + + v6[1] = 0; + v6[0] = &v7; + v7 = 0; + for ( i = (struct _Unwind_Exception *)this[11]; ; i = (struct _Unwind_Exception *)std::_Rb_tree_increment((int)lpuexcpt) ) + { + lpuexcpt = i; + if ( i == (struct _Unwind_Exception *)(this + 9) ) + break; + WXSS::CSSTreeLib::CSSSyntaxTree::GetHostRule(*((_DWORD *)i + 10), (WXSS::Token *)v6); + } + std::basic_stringstream,std::allocator>::basic_stringstream((int)v9); + std::operator<<>((std::ostream::sentry *)v10, "setCssToHead(["); + WXSS::XCompiler::DealRPX((int *)v6, (int)v9); + std::operator<<>((std::ostream::sentry *)v10, "])"); + std::stringbuf::str((int)v8, (int)v11); + std::string::operator=(a2, v8); + std::string::_M_dispose(v8); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v9); + std::string::_M_dispose(v6); + return 0; +} +// 402184: using guessed type char var_D0[4]; +// 402184: using guessed type char var_CC[204]; + +//----- (0040234C) -------------------------------------------------------- +int __thiscall WXSS::XCompiler::ShowTree(_DWORD *this, _DWORD *a2) +{ + struct _Unwind_Exception *i; // eax + _DWORD *v3; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-130h] + int v7[6]; // [esp+58h] [ebp-F0h] BYREF + void *v8[3]; // [esp+70h] [ebp-D8h] BYREF + char v9[204]; // [esp+7Ch] [ebp-CCh] BYREF + + for ( i = (struct _Unwind_Exception *)this[11]; ; i = (struct _Unwind_Exception *)std::_Rb_tree_increment((int)lpuexcpt) ) + { + lpuexcpt = i; + if ( i == (struct _Unwind_Exception *)(this + 9) ) + break; + std::operator+((int)v7, "\n/* ", (int)i + 16); + v3 = std::string::append(v7, " */\n"); + std::string::basic_string(v8, v3); + std::string::operator+=(a2, (int)v8); + std::string::_M_dispose(v8); + std::string::_M_dispose((void **)v7); + std::basic_stringstream,std::allocator>::basic_stringstream((int)v8); + WXSS::CSSTreeLib::CSSSyntaxTree::Print2Stream(*((_DWORD *)lpuexcpt + 10), 0, (int)v8); + std::stringbuf::str((int)v7, (int)v9); + std::string::operator+=(a2, (int)v7); + std::string::_M_dispose((void **)v7); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v8); + } + return 0; +} +// 40234C: using guessed type char var_CC[204]; + +//----- (00402559) -------------------------------------------------------- +void __tcf_1_0(void) +{ + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&dword_50CC0C); +} +// 50CC0C: using guessed type int dword_50CC0C; + +//----- (00402563) -------------------------------------------------------- +void __tcf_2(void) +{ + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&dword_50CC00); +} +// 50CC00: using guessed type int dword_50CC00; + +//----- (0040256E) -------------------------------------------------------- +void __usercall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase( + int a1@) +{ + int v2; // esi + void *v3; // [esp+0h] [ebp-18h] + + while ( a1 ) + { + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(*(_DWORD *)(a1 + 12)); + v2 = *(_DWORD *)(a1 + 8); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 44)); + std::string::_M_dispose((void **)(a1 + 16)); + v3 = (void *)a1; + a1 = v2; + operator delete(v3); + } +} + +//----- (004025AA) -------------------------------------------------------- +void __thiscall std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( + volatile signed __int32 **this, + volatile signed __int32 *a2) +{ + if ( *this != a2 ) + { + if ( a2 ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy((int)a2); + if ( *this ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*this); + *this = a2; + } +} + +//----- (004025D6) -------------------------------------------------------- +int __thiscall WXSS::XCompiler::GetCompiled(int *this, int a2, unsigned int **a3) +{ + bool v3; // zf + int *v4; // eax + int v5; // edx + char *v6; // eax + char *v7; // eax + int v8; // edx + int v9; // eax + int *v10; // edx + char *v11; // eax + int *v13; // [esp+18h] [ebp-90h] + int v14; // [esp+1Ch] [ebp-8Ch] + int *v15; // [esp+20h] [ebp-88h] + int v16; // [esp+24h] [ebp-84h] + unsigned int i; // [esp+24h] [ebp-84h] + int v19; // [esp+68h] [ebp-40h] BYREF + volatile signed __int32 *v20; // [esp+6Ch] [ebp-3Ch] BYREF + void *v21[6]; // [esp+70h] [ebp-38h] BYREF + void *v22[2]; // [esp+88h] [ebp-20h] BYREF + char v23; // [esp+90h] [ebp-18h] BYREF + + v14 = *this; + if ( *this ) + return 6; + v13 = this + 27; + v16 = this[28]; + v15 = this + 27; + while ( v16 ) + { + v3 = (unsigned __int8)std::operator<(v16 + 16, a2) == 0; + v4 = v15; + if ( v3 ) + v4 = (int *)v16; + v5 = *(_DWORD *)(v16 + 12); + v15 = v4; + if ( v3 ) + v5 = *(_DWORD *)(v16 + 8); + v16 = v5; + } + if ( v13 == v15 || (unsigned __int8)std::operator<(a2, (int)(v15 + 4)) ) + { + if ( this + 9 == std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::find( + this + 8, + a2) ) + { + v14 = 1; + std::string::operator=(a3, (char *)&byte_50DF9A); + } + else + { + std::string::operator=(a3, (char *)&byte_50DF9A); + v7 = std::map>::operator[](this + 8, a2); + std::__shared_ptr::__shared_ptr(&v19, v7); + for ( i = 0; ; ++i ) + { + v8 = *(_DWORD *)(v19 + 120); + if ( (*(_DWORD *)(v19 + 124) - v8) >> 3 <= i ) + break; + if ( std::operator==(*(_DWORD *)(v8 + 8 * i), "DIRECTIVE") + && (v9 = *(_DWORD *)(*(_DWORD *)(v19 + 120) + 8 * i), + v10 = *(int **)(v9 + 120), + (unsigned int)(*(_DWORD *)(v9 + 124) - (_DWORD)v10) > 8) + && std::operator==(*v10, "@import") + && *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(v19 + 120) + 8 * i) + 140) ) + { + std::string::basic_string((char *)v21, *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(v19 + 120) + 8 * i) + 140)); + v22[0] = &v23; + v22[1] = 0; + v23 = 0; + WXSS::XCompiler::GetCompiled(this, (int)v21, (WXSS::Token *)v22); + std::string::operator+=(a3, (int)v22); + std::string::_M_dispose(v22); + std::string::_M_dispose(v21); + } + else + { + WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode( + *(_DWORD *)(*(_DWORD *)(v19 + 120) + 8 * i), + (WXSS::Token *)a3, + 1u); + } + } + v11 = std::map::operator[](this + 26, a2); + std::string::_M_assign((int)v11, (int)a3); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v20); + } + } + else + { + v6 = std::map::operator[](this + 26, a2); + std::string::_M_assign((int)a3, (int)v6); + } + return v14; +} + +//----- (0040292E) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall WXSS::XCompiler::GetJSCompiled(int *this, int a2, _DWORD *a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-70h] + void *v5[2]; // [esp+50h] [ebp-38h] BYREF + char v6; // [esp+58h] [ebp-30h] BYREF + void *v7[8]; // [esp+68h] [ebp-20h] BYREF + + v6 = 0; + v5[0] = &v6; + v5[1] = 0; + lpuexcpt = (struct _Unwind_Exception *)WXSS::XCompiler::GetCompiled(this, a2, (unsigned int **)v5); + if ( !lpuexcpt ) + { + WXML::Rewrite::ToStringCode2((int)v7, (int *)v5); + std::string::operator=(a3, v7); + std::string::_M_dispose(v7); + } + std::string::_M_dispose(v5); + return lpuexcpt; +} + +//----- (004029FC) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall WXSS::XCompiler::GetWellFormattedJSCompiled(int *this, int a2, _DWORD *a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-140h] + void *v5[2]; // [esp+50h] [ebp-108h] BYREF + char v6; // [esp+58h] [ebp-100h] BYREF + void *v7[6]; // [esp+68h] [ebp-F0h] BYREF + char v8[8]; // [esp+80h] [ebp-D8h] BYREF + char v9[4]; // [esp+88h] [ebp-D0h] BYREF + char v10[204]; // [esp+8Ch] [ebp-CCh] BYREF + + v5[1] = 0; + v5[0] = &v6; + v6 = 0; + lpuexcpt = WXSS::XCompiler::GetJSCompiled(this, a2, v5); + if ( !lpuexcpt ) + { + std::basic_stringstream,std::allocator>::basic_stringstream((int)v8); + std::operator<<>( + (std::ostream::sentry *)v9, + "var BASE_DEVICE_WIDTH = 750;\n" + "var isIOS=navigator.userAgent.match(\"iPhone\");\n" + "var deviceWidth = window.screen.width || 375;\n" + "var deviceDPR = window.devicePixelRatio || 2;\n" + "var checkDeviceWidth = window.__checkDeviceWidth__ || function() {\n" + "var newDeviceWidth = window.screen.width || 375\n" + "var newDeviceDPR = window.devicePixelRatio || 2\n" + "var newDeviceHeight = window.screen.height || 375\n" + "if (window.screen.orientation && /^landscape/.test(window.screen.orientation.type || '')) newDeviceWidth = newDevi" + "ceHeight\n" + "if (newDeviceWidth !== deviceWidth || newDeviceDPR !== deviceDPR) {\n" + "deviceWidth = newDeviceWidth\n" + "deviceDPR = newDeviceDPR\n" + "}\n" + "}\n" + "checkDeviceWidth()\n" + "var eps = 1e-4;\n" + "var transformRPX = window.__transformRpx__ || function(number, newDeviceWidth) {\n" + "if ( number === 0 ) return 0;\n" + "number = number / BASE_DEVICE_WIDTH * ( newDeviceWidth || deviceWidth );\n" + "number = Math.floor(number + eps);\n" + "if (number === 0) {\n" + "if (deviceDPR === 1 || !isIOS) {\n" + "return 1;\n" + "} else {\n" + "return 0.5;\n" + "}\n" + "}\n" + "return number;\n" + "}\n" + "window.__rpxRecalculatingFuncs__ = window.__rpxRecalculatingFuncs__ || [];\n" + "var __COMMON_STYLESHEETS__ = __COMMON_STYLESHEETS__||{}\n" + "%s\n" + "var setCssToHead = function(file, _xcInvalid, info) {\n" + "var Ca = {};\n" + "var css_id;\n" + "var info = info || {};\n" + "var _C = __COMMON_STYLESHEETS__\n" + "function makeup(file, opt) {\n" + "var _n = typeof(file) === \"string\";\n" + "if ( _n && Ca.hasOwnProperty(file)) return \"\";\n" + "if ( _n ) Ca[file] = 1;\n" + "var ex = _n ? _C[file] : file;\n" + "var res=\"\";\n" + "for (var i = ex.length - 1; i >= 0; i--) {\n" + "var content = ex[i];\n" + "if (typeof(content) === \"object\")\n" + "{\n" + "var op = content[0];\n" + "if ( op == 0 )\n" + "res = transformRPX(content[1], opt.deviceWidth) + \"px\" + res;\n" + "else if ( op == 1)\n" + "res = opt.suffix + res;\n" + "else if ( op == 2 )\n" + "res = makeup(content[1], opt) + res;\n" + "}\n" + "else\n" + "res = content + res\n" + "}\n" + "return res;\n" + "}\n" + "var styleSheetManager = window.__styleSheetManager2__\n" + "var rewritor = function(suffix, opt, style){\n" + "opt = opt || {};\n" + "suffix = suffix || \"\";\n" + "opt.suffix = suffix;\n" + "if ( opt.allowIllegalSelector != undefined && _xcInvalid != undefined )\n" + "{\n" + "if ( opt.allowIllegalSelector )\n" + "console.warn( \"For developer:\" + _xcInvalid );\n" + "else\n" + "{\n" + "console.error( _xcInvalid );\n" + "}\n" + "}\n" + "Ca={};\n" + "css = makeup(file, opt);\n" + "if (styleSheetManager) {\n" + "var key = (info.path || Math.random()) + ':' + suffix\n" + "if (!style) {\n" + "styleSheetManager.addItem(key, info.path);\n" + "window.__rpxRecalculatingFuncs__.push(function(size){\n" + "opt.deviceWidth = size.width;\n" + "rewritor(suffix, opt, true);\n" + "});\n" + "}\n" + "styleSheetManager.setCss(key, css);\n" + "return;\n" + "}\n" + "if ( !style )\n" + "{\n" + "var head = document.head || document.getElementsByTagName('head')[0];\n" + "style = document.createElement('style');\n" + "style.type = 'text/css';\n" + "style.setAttribute( \"wxss:path\", info.path );\n" + "head.appendChild(style);\n" + "window.__rpxRecalculatingFuncs__.push(function(size){\n" + "opt.deviceWidth = size.width;\n" + "rewritor(suffix, opt, style);\n" + "});\n" + "}\n" + "if (style.styleSheet) {\n" + "style.styleSheet.cssText = css;\n" + "} else {\n" + "if ( style.childNodes.length == 0 )\n" + "style.appendChild(document.createTextNode(css));\n" + "else\n" + "style.childNodes[0].nodeValue = css;\n" + "}\n" + "}\n" + "return rewritor;\n" + "}\n" + "setCssToHead(["); + WXML::GetStrForMakingCSS((char **)v5, (int)v8); + std::operator<<>( + (std::ostream::sentry *)v9, + "])( typeof __wxAppSuffixCode__ == \"undefined\"? undefined : __wxAppSuffixCode__ );"); + std::stringbuf::str((int)v7, (int)v10); + std::string::operator=(a3, v7); + std::string::_M_dispose(v7); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v8); + } + std::string::_M_dispose(v5); + return lpuexcpt; +} +// 4029FC: using guessed type char var_D0[4]; +// 4029FC: using guessed type char var_CC[204]; + +//----- (00402B9C) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::CSSSyntaxTree::~CSSSyntaxTree(int a1) +{ + int v2; // edx + + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 160)); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 152)); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 144)); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 136)); + std::_Destroy_aux::__destroy *>( + v2, + *(_DWORD *)(a1 + 120), + *(_DWORD *)(a1 + 124)); + if ( *(_DWORD *)(a1 + 120) ) + operator delete(*(void **)(a1 + 120)); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 32)); + std::string::_M_dispose((void **)a1); +} +// 402BDE: variable 'v2' is possibly undefined + +//----- (00402C06) -------------------------------------------------------- +void __usercall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase( + int a1@) +{ + int v2; // esi + void *v3; // [esp+0h] [ebp-28h] + + while ( a1 ) + { + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(*(_DWORD *)(a1 + 12)); + v2 = *(_DWORD *)(a1 + 8); + std::vector::~vector((void ***)(a1 + 40)); + std::string::_M_dispose((void **)(a1 + 16)); + v3 = (void *)a1; + a1 = v2; + operator delete(v3); + } +} + +//----- (00402C46) -------------------------------------------------------- +void __fastcall std::deque::~deque(int a1) +{ + void **v2; // edi + int v3; // edx + void ***v4; // esi + void **v5; // eax + void **v6; // edx + int v7; // edx + void **v8; // esi + unsigned int v9; // edi + void *v10; // eax + void **v11; // [esp+1Ch] [ebp-2Ch] + void **v12; // [esp+20h] [ebp-28h] + void **v13; // [esp+24h] [ebp-24h] + unsigned int v14; // [esp+28h] [ebp-20h] + int v15; // [esp+2Ch] [ebp-1Ch] + + v2 = *(void ***)(a1 + 24); + v13 = *(void ***)(a1 + 16); + v3 = *(_DWORD *)(a1 + 20); + v12 = *(void ***)(a1 + 28); + v15 = v3; + v4 = (void ***)(v3 + 4); + v14 = *(_DWORD *)(a1 + 36); + v5 = *(void ***)(a1 + 8); + while ( v14 > (unsigned int)v4 ) + { + v6 = *v4; + v11 = v5; + ++v4; + std::_Destroy_aux::__destroy((int)v6, v6, v6 + 126); + v5 = v11; + } + if ( v15 == v14 ) + { + std::_Destroy_aux::__destroy(v3, v5, v2); + } + else + { + std::_Destroy_aux::__destroy((int)v13, v5, v13); + std::_Destroy_aux::__destroy(v7, v12, v2); + } + if ( *(_DWORD *)a1 ) + { + v8 = *(void ***)(a1 + 20); + v9 = *(_DWORD *)(a1 + 36) + 4; + while ( v9 > (unsigned int)v8 ) + { + v10 = *v8++; + operator delete(v10); + } + operator delete(*(void **)a1); + } +} +// 402CB4: variable 'v7' is possibly undefined +// 402CBD: variable 'v3' is possibly undefined + +//----- (00402CF6) -------------------------------------------------------- +int __thiscall WXSS::XCompiler::GenExpr(int this, int a2, int a3, WXSS::Token *a4) +{ + int v4; // edx + int v5; // eax + int *v6; // edx + std::ostream::sentry *v7; // eax + int *v8; // eax + std::ostream::sentry *v9; // eax + std::ostream::sentry *v10; // eax + char *v11; // eax + std::ostream::sentry *v13; // [esp+10h] [ebp-78h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-70h] + void *v16[6]; // [esp+50h] [ebp-38h] BYREF + int v17; // [esp+68h] [ebp-20h] BYREF + volatile signed __int32 *v18; // [esp+6Ch] [ebp-1Ch] BYREF + + for ( lpuexcpt = 0; ; lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1) ) + { + v4 = *(_DWORD *)(*(_DWORD *)a2 + 120); + if ( (unsigned int)lpuexcpt >= (*(_DWORD *)(*(_DWORD *)a2 + 124) - v4) >> 3 ) + break; + if ( std::operator==(*(_DWORD *)(v4 + 8 * (_DWORD)lpuexcpt), "DIRECTIVE") + && (v5 = *(_DWORD *)(*(_DWORD *)(*(_DWORD *)a2 + 120) + 8 * (_DWORD)lpuexcpt), + v6 = *(int **)(v5 + 120), + (unsigned int)(*(_DWORD *)(v5 + 124) - (_DWORD)v6) > 8) + && std::operator==(*v6, "@import") + && *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(*(_DWORD *)a2 + 120) + 8 * (_DWORD)lpuexcpt) + 140) ) + { + std::string::basic_string( + (char *)v16, + *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(*(_DWORD *)a2 + 120) + 8 * (_DWORD)lpuexcpt) + 140)); + if ( (unsigned int)*std::map::operator[]((void **)(this + 128), (int)v16) > 1 ) + { + WXSS::XCompiler::DealRPX((int *)a4, a3); + v7 = std::operator<<>((std::ostream::sentry *)(a3 + 8), "[2,"); + v13 = std::operator<<>(v7, "\""); + v8 = (int *)std::map::operator[]((_DWORD *)(this + 152), (int)v16); + WXML::Rewrite::ToStringCode2((int)&v17, v8); + v9 = std::operator<<(v13, &v17); + v10 = std::operator<<>(v9, "\""); + std::operator<<>(v10, "],"); + std::string::_M_dispose((void **)&v17); + } + else + { + v11 = std::map>::operator[]( + (_DWORD *)(this + 32), + (int)v16); + std::__shared_ptr::__shared_ptr(&v17, v11); + WXSS::XCompiler::GenExpr(this, (int)&v17, a3, a4); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18); + } + std::string::_M_dispose(v16); + } + else + { + WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode( + *(_DWORD *)(*(_DWORD *)(*(_DWORD *)a2 + 120) + 8 * (_DWORD)lpuexcpt), + a4, + 1u); + } + } + return 0; +} + +//----- (00402F86) -------------------------------------------------------- +int __thiscall WXSS::XCompiler::GetPageCss(char *this, int *a2, _DWORD *a3, int a4) +{ + std::ostream::sentry *v4; // eax + std::ostream::sentry *v5; // eax + int v6; // eax + volatile signed __int32 *v7; // ecx + std::ostream::sentry *v8; // eax + std::ostream::sentry *v9; // eax + std::ostream::sentry *v10; // eax + std::ostream::sentry *v11; // eax + int *v12; // eax + std::ostream::sentry *v13; // eax + std::ostream::sentry *v14; // eax + char *v15; // eax + std::ostream::sentry *v16; // eax + std::ostream::sentry *v17; // eax + std::ostream::sentry *v18; // eax + std::ostream::sentry *v19; // eax + std::ostream::sentry *v21; // [esp+1Ch] [ebp-16Ch] + int v22; // [esp+20h] [ebp-168h] + std::ostream::sentry *v23; // [esp+24h] [ebp-164h] + std::ostream::sentry *v24; // [esp+24h] [ebp-164h] + struct _Unwind_Exception *lpuexcpta; // [esp+28h] [ebp-160h] + struct _Unwind_Exception *lpuexcptb; // [esp+28h] [ebp-160h] + int v28; // [esp+60h] [ebp-128h] + volatile signed __int32 *v29; // [esp+64h] [ebp-124h] BYREF + int v30; // [esp+68h] [ebp-120h] BYREF + int v31; // [esp+6Ch] [ebp-11Ch] + char v32; // [esp+70h] [ebp-118h] BYREF + void *v33; // [esp+80h] [ebp-108h] BYREF + volatile signed __int32 *v34; // [esp+84h] [ebp-104h] BYREF + int v35; // [esp+98h] [ebp-F0h] BYREF + int v36; // [esp+9Ch] [ebp-ECh] + char v37; // [esp+A0h] [ebp-E8h] BYREF + char v38[8]; // [esp+B0h] [ebp-D8h] BYREF + char v39[4]; // [esp+B8h] [ebp-D0h] BYREF + char v40[204]; // [esp+BCh] [ebp-CCh] BYREF + + v22 = *(_DWORD *)this; + if ( *(_DWORD *)this ) + return 6; + v23 = (std::ostream::sentry *)(this + 32); + if ( this + 36 == (char *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::find( + (_DWORD *)this + 8, + (int)a2) ) + { + std::basic_stringstream,std::allocator>::basic_stringstream((int)v38); + std::operator<<>((std::ostream::sentry *)v39, "setCssToHead([],undefined,{"); + v4 = std::operator<<>((std::ostream::sentry *)v39, "path:"); + lpuexcpta = std::operator<<>(v4, "\""); + WXML::Rewrite::ToStringCode2((int)&v35, a2); + v5 = std::operator<<(lpuexcpta, &v35); + std::operator<<>(v5, "\""); + std::string::_M_dispose((void **)&v35); + std::operator<<>((std::ostream::sentry *)v39, "})"); + std::stringbuf::str((int)&v35, (int)v40); + std::string::operator=(a3, &v35); + std::string::_M_dispose((void **)&v35); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v38); + return 1; + } + else + { + v31 = 0; + v30 = (int)&v32; + v32 = 0; + if ( *(_DWORD *)(*(_DWORD *)std::map>::operator[]( + v23, + (int)a2) + + 156) + && *(_DWORD *)(*(_DWORD *)(*(_DWORD *)std::map>::operator[]( + v23, + (int)a2) + + 156) + + 12) != -1 ) + { + v6 = *(_DWORD *)std::map>::operator[](v23, (int)a2); + v7 = *(volatile signed __int32 **)(v6 + 160); + v28 = *(_DWORD *)(v6 + 156); + v29 = v7; + if ( v7 ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy((int)v7); + std::basic_stringstream,std::allocator>::basic_stringstream((int)v38); + v21 = std::operator<<>( + (std::ostream::sentry *)v39, + "Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors.("); + WXML::Rewrite::ToStringCode2((int)&v35, a2); + v8 = std::operator<<(v21, &v35); + std::operator<<>(v8, ":"); + v9 = (std::ostream::sentry *)std::ostream::operator<<(*(_DWORD *)(v28 + 20)); + std::operator<<>(v9, ":"); + v10 = (std::ostream::sentry *)std::ostream::operator<<(*(_DWORD *)(v28 + 24)); + std::operator<<>(v10, (char *)off_50EEF5); + std::string::_M_dispose((void **)&v35); + std::stringbuf::str((int)&v33, (int)v40); + std::string::operator=(&v30, &v33); + std::string::_M_dispose(&v33); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v38); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v29); + } + std::basic_stringstream,std::allocator>::basic_stringstream((int)v38); + std::operator<<>((std::ostream::sentry *)v39, "setCssToHead(["); + if ( (unsigned int)*std::map::operator[]((void **)this + 32, (int)a2) <= 1 ) + { + v36 = 0; + v35 = (int)&v37; + v37 = 0; + v15 = std::map>::operator[](v23, (int)a2); + std::__shared_ptr::__shared_ptr(&v33, v15); + WXSS::XCompiler::GenExpr((int)this, (int)&v33, (int)v38, (WXSS::Token *)&v35); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v34); + if ( v36 ) + WXSS::XCompiler::DealRPX(&v35, (int)v38); + } + else + { + v11 = std::operator<<>((std::ostream::sentry *)v39, "[2,"); + v24 = std::operator<<>(v11, "\""); + v12 = (int *)std::map::operator[]((_DWORD *)this + 38, (int)a2); + WXML::Rewrite::ToStringCode2((int)&v35, v12); + v13 = std::operator<<(v24, &v35); + v14 = std::operator<<>(v13, "\""); + std::operator<<>(v14, (char *)&off_50EEF5[2]); + } + std::string::_M_dispose((void **)&v35); + std::operator<<>((std::ostream::sentry *)v39, (char *)&off_50EEF5[2]); + if ( v31 ) + { + v16 = std::operator<<>((std::ostream::sentry *)v39, ",\""); + v17 = std::operator<<(v16, &v30); + std::operator<<>(v17, "\""); + } + else + { + std::operator<<>((std::ostream::sentry *)v39, ",undefined"); + } + std::operator<<>((std::ostream::sentry *)v39, ",{"); + v18 = std::operator<<>((std::ostream::sentry *)v39, "path:"); + lpuexcptb = std::operator<<>(v18, "\""); + WXML::Rewrite::ToStringCode2((int)&v35, a2); + v19 = std::operator<<(lpuexcptb, &v35); + std::operator<<>(v19, "\""); + std::string::_M_dispose((void **)&v35); + std::operator<<>((std::ostream::sentry *)v39, "}"); + std::operator<<>((std::ostream::sentry *)v39, (char *)off_50EEF5); + std::stringbuf::str((int)&v35, (int)v40); + std::string::operator=(a3, &v35); + std::string::_M_dispose((void **)&v35); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v38); + std::string::_M_dispose((void **)&v30); + } + return v22; +} +// 4A2900: using guessed type _DWORD __stdcall std::ostream::operator<<(_DWORD); +// 402F86: using guessed type char var_D0[4]; + +//----- (0040373E) -------------------------------------------------------- +int __thiscall WXSS::XCompiler::MarkImported(int this, int a2) +{ + void *v2; // eax + char *v3; // ecx + void *v4; // eax + volatile signed __int32 **v5; // ecx + void **v6; // eax + char *v7; // eax + char *v8; // eax + int v11; // [esp+24h] [ebp-84h] + unsigned int i; // [esp+24h] [ebp-84h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-80h] + void *v14[6]; // [esp+60h] [ebp-48h] BYREF + void *v15[2]; // [esp+78h] [ebp-30h] BYREF + void **v16; // [esp+80h] [ebp-28h] + void *Block; // [esp+84h] [ebp-24h] + int v18; // [esp+88h] [ebp-20h] + char *v19; // [esp+8Ch] [ebp-1Ch] + void **v20; // [esp+90h] [ebp-18h] + void *v21; // [esp+94h] [ebp-14h] + int v22; // [esp+98h] [ebp-10h] + char *v23; // [esp+9Ch] [ebp-Ch] + + lpuexcpt = (struct _Unwind_Exception *)(this + 32); + if ( std::map>::count((_DWORD *)(this + 32), a2) ) + { + v15[1] = (void *)8; + v15[0] = operator new(0x20u); + v2 = operator new(0x1F8u); + Block = v2; + v21 = v2; + v3 = (char *)v15[0] + 12; + *((_DWORD *)v15[0] + 3) = v2; + v19 = v3; + v16 = (void **)v2; + v20 = (void **)v2; + v23 = v3; + v18 = (int)v2 + 504; + v22 = (int)v2 + 504; + std::deque::push_back(v15, a2); + while ( v16 != v20 ) + { + std::string::basic_string((char *)v14, (int)v16); + if ( v16 == (void **)(v18 - 24) ) + { + std::string::_M_dispose(v16); + operator delete(Block); + v4 = (void *)*((_DWORD *)v19 + 1); + v19 += 4; + Block = v4; + v18 = (int)v4 + 504; + v16 = (void **)v4; + } + else + { + std::string::_M_dispose(v16); + v16 += 6; + } + if ( *(_DWORD *)(*(_DWORD *)std::map>::operator[]( + lpuexcpt, + (int)v14) + + 156) + && *(_DWORD *)(*(_DWORD *)(*(_DWORD *)std::map>::operator[]( + lpuexcpt, + (int)v14) + + 156) + + 12) != -1 ) + { + v11 = *(_DWORD *)std::map>::operator[]( + lpuexcpt, + (int)v14); + v5 = (volatile signed __int32 **)(*(_DWORD *)std::map>::operator[]( + lpuexcpt, + a2) + + 160); + *(v5 - 1) = *(volatile signed __int32 **)(v11 + 156); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(v5, *(volatile signed __int32 **)(v11 + 160)); + } + v6 = std::map::operator[]((void **)(this + 128), (int)v14); + *v6 = (char *)*v6 + 1; + for ( i = 0; ; ++i ) + { + v7 = std::map>::operator[]((_DWORD *)(this + 56), (int)v14); + if ( -1431655765 * ((*((_DWORD *)v7 + 1) - *(_DWORD *)v7) >> 3) <= i ) + break; + v8 = std::map>::operator[]((_DWORD *)(this + 56), (int)v14); + std::deque::push_back(v15, *(_DWORD *)v8 + 24 * i); + } + std::string::_M_dispose(v14); + } + std::deque::~deque((int)v15); + } + return 0; +} + +//----- (00403AB6) -------------------------------------------------------- +void *__thiscall WXSS::XCompiler::GetCommHead(int this, char **a2, _DWORD *a3, char a4, int *a5) +{ + int j; // eax + int insert_unique_pos; // eax + _DWORD *v7; // edx + int k; // eax + int *v9; // eax + std::ostream::sentry *v10; // eax + std::ostream::sentry *v11; // eax + std::ostream::sentry *v12; // eax + std::ostream::sentry *v13; // eax + _DWORD *v14; // eax + void *Block; // [esp+20h] [ebp-198h] + void *Blocka; // [esp+20h] [ebp-198h] + void **Blockb; // [esp+20h] [ebp-198h] + void *Blockc; // [esp+20h] [ebp-198h] + unsigned int i; // [esp+24h] [ebp-194h] + int v21; // [esp+24h] [ebp-194h] + int v22; // [esp+24h] [ebp-194h] + unsigned int v23; // [esp+24h] [ebp-194h] + struct _Unwind_Exception *lpuexcpta; // [esp+28h] [ebp-190h] + char *v26; // [esp+68h] [ebp-150h] BYREF + int v27; // [esp+6Ch] [ebp-14Ch] + char v28; // [esp+70h] [ebp-148h] BYREF + int v29; // [esp+80h] [ebp-138h] BYREF + volatile signed __int32 *v30; // [esp+84h] [ebp-134h] BYREF + char v31; // [esp+88h] [ebp-130h] BYREF + int v32[6]; // [esp+98h] [ebp-120h] BYREF + const char *v33; // [esp+B0h] [ebp-108h] BYREF + int v34; // [esp+B4h] [ebp-104h] + char v35; // [esp+B8h] [ebp-100h] BYREF + void *v36[6]; // [esp+C8h] [ebp-F0h] BYREF + char v37[8]; // [esp+E0h] [ebp-D8h] BYREF + char v38[4]; // [esp+E8h] [ebp-D0h] BYREF + char v39[204]; // [esp+ECh] [ebp-CCh] BYREF + + if ( a4 + && std::map>::count((_DWORD *)(this + 32), (int)a5) ) + { + std::vector::push_back(a2, (int)a5); + } + for ( i = 0; i < -1431655765 * ((a2[1] - *a2) >> 3); ++i ) + { + Block = (void *)WXSS::XCompiler::MarkImported(this, (int)&(*a2)[24 * i]); + if ( Block ) + return Block; + } + std::basic_stringstream,std::allocator>::basic_stringstream((int)v37); + for ( j = *(_DWORD *)(this + 44); ; j = std::_Rb_tree_increment(v21) ) + { + v21 = j; + if ( this + 36 == j ) + break; + Blocka = (void *)(j + 16); + if ( (unsigned int)*std::map::operator[]((void **)(this + 128), j + 16) > 1 ) + { + std::string::basic_string((char *)&v33, (int)Blocka); + std::string::basic_string((char *)v36, (int)Blocka); + Blockb = (void **)operator new(0x40u); + std::string::basic_string(Blockb + 4, &v33); + std::string::basic_string(Blockb + 10, v36); + insert_unique_pos = std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + (_DWORD *)(this + 152), + (int)(Blockb + 4)); + if ( v7 ) + { + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_insert_node( + (_DWORD *)(this + 152), + insert_unique_pos, + v7, + Blockb); + } + else + { + std::string::_M_dispose(Blockb + 10); + std::string::_M_dispose(Blockb + 4); + operator delete(Blockb); + } + std::string::_M_dispose(v36); + std::string::_M_dispose((void **)&v33); + } + } + for ( k = *(_DWORD *)(this + 44); ; k = std::_Rb_tree_increment(v22) ) + { + v22 = k; + if ( this + 36 == k ) + break; + Blockc = (void *)(k + 16); + if ( (unsigned int)*std::map::operator[]((void **)(this + 128), k + 16) > 1 ) + { + v9 = (int *)std::map::operator[]((_DWORD *)(this + 152), (int)Blockc); + WXML::Rewrite::ToStringCode2((int)v32, v9); + v10 = std::operator<<>( + (std::ostream::sentry *)v38, + "if (!__COMMON_STYLESHEETS__.hasOwnProperty('"); + v11 = std::operator<<(v10, v32); + std::operator<<>(v11, "'))"); + v12 = std::operator<<>((std::ostream::sentry *)v38, "__COMMON_STYLESHEETS__['"); + v13 = std::operator<<(v12, v32); + std::operator<<>(v13, "']=["); + v34 = 0; + v33 = &v35; + v35 = 0; + std::__shared_ptr::__shared_ptr( + &v29, + (_DWORD *)(v22 + 40)); + WXSS::XCompiler::GenExpr(this, (int)&v29, (int)v37, (WXSS::Token *)&v33); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v30); + if ( v34 ) + WXSS::XCompiler::DealRPX((int *)&v33, (int)v37); + std::operator<<>((std::ostream::sentry *)v38, "];"); + std::string::_M_dispose((void **)&v33); + std::string::_M_dispose((void **)v32); + } + } + v27 = 0; + v26 = &v28; + v28 = 0; + if ( a4 ) + { + WXSS::XCompiler::GetPageCss((char *)this, a5, &v26, 1); + if ( v27 ) + { + std::string::basic_string((char *)v32, (int)&v26); + std::string::append(v32, "();"); + std::string::operator=(&v26, v32); + std::string::_M_dispose((void **)v32); + } + } + v30 = 0; + v29 = (int)&v31; + v31 = 0; + WXSS::XCompiler::GetHostRule((_DWORD *)this, &v29); + if ( v30 ) + std::string::operator+=(&v29, "();"); + std::stringbuf::str((int)&v33, (int)v39); + v23 = v34 + 3022; + std::string::_M_dispose((void **)&v33); + lpuexcpta = (struct _Unwind_Exception *)operator new[](v23); + std::stringbuf::str((int)&v33, (int)v39); + snprintf( + (FILE *)lpuexcpta, + v23, + (int)"var BASE_DEVICE_WIDTH = 750;\n" + "var isIOS=navigator.userAgent.match(\"iPhone\");\n" + "var deviceWidth = window.screen.width || 375;\n" + "var deviceDPR = window.devicePixelRatio || 2;\n" + "var checkDeviceWidth = window.__checkDeviceWidth__ || function() {\n" + "var newDeviceWidth = window.screen.width || 375\n" + "var newDeviceDPR = window.devicePixelRatio || 2\n" + "var newDeviceHeight = window.screen.height || 375\n" + "if (window.screen.orientation && /^landscape/.test(window.screen.orientation.type || '')) newDeviceWidth = newD" + "eviceHeight\n" + "if (newDeviceWidth !== deviceWidth || newDeviceDPR !== deviceDPR) {\n" + "deviceWidth = newDeviceWidth\n" + "deviceDPR = newDeviceDPR\n" + "}\n" + "}\n" + "checkDeviceWidth()\n" + "var eps = 1e-4;\n" + "var transformRPX = window.__transformRpx__ || function(number, newDeviceWidth) {\n" + "if ( number === 0 ) return 0;\n" + "number = number / BASE_DEVICE_WIDTH * ( newDeviceWidth || deviceWidth );\n" + "number = Math.floor(number + eps);\n" + "if (number === 0) {\n" + "if (deviceDPR === 1 || !isIOS) {\n" + "return 1;\n" + "} else {\n" + "return 0.5;\n" + "}\n" + "}\n" + "return number;\n" + "}\n" + "window.__rpxRecalculatingFuncs__ = window.__rpxRecalculatingFuncs__ || [];\n" + "var __COMMON_STYLESHEETS__ = __COMMON_STYLESHEETS__||{}\n" + "%s\n" + "var setCssToHead = function(file, _xcInvalid, info) {\n" + "var Ca = {};\n" + "var css_id;\n" + "var info = info || {};\n" + "var _C = __COMMON_STYLESHEETS__\n" + "function makeup(file, opt) {\n" + "var _n = typeof(file) === \"string\";\n" + "if ( _n && Ca.hasOwnProperty(file)) return \"\";\n" + "if ( _n ) Ca[file] = 1;\n" + "var ex = _n ? _C[file] : file;\n" + "var res=\"\";\n" + "for (var i = ex.length - 1; i >= 0; i--) {\n" + "var content = ex[i];\n" + "if (typeof(content) === \"object\")\n" + "{\n" + "var op = content[0];\n" + "if ( op == 0 )\n" + "res = transformRPX(content[1], opt.deviceWidth) + \"px\" + res;\n" + "else if ( op == 1)\n" + "res = opt.suffix + res;\n" + "else if ( op == 2 )\n" + "res = makeup(content[1], opt) + res;\n" + "}\n" + "else\n" + "res = content + res\n" + "}\n" + "return res;\n" + "}\n" + "var styleSheetManager = window.__styleSheetManager2__\n" + "var rewritor = function(suffix, opt, style){\n" + "opt = opt || {};\n" + "suffix = suffix || \"\";\n" + "opt.suffix = suffix;\n" + "if ( opt.allowIllegalSelector != undefined && _xcInvalid != undefined )\n" + "{\n" + "if ( opt.allowIllegalSelector )\n" + "console.warn( \"For developer:\" + _xcInvalid );\n" + "else\n" + "{\n" + "console.error( _xcInvalid );\n" + "}\n" + "}\n" + "Ca={};\n" + "css = makeup(file, opt);\n" + "if (styleSheetManager) {\n" + "var key = (info.path || Math.random()) + ':' + suffix\n" + "if (!style) {\n" + "styleSheetManager.addItem(key, info.path);\n" + "window.__rpxRecalculatingFuncs__.push(function(size){\n" + "opt.deviceWidth = size.width;\n" + "rewritor(suffix, opt, true);\n" + "});\n" + "}\n" + "styleSheetManager.setCss(key, css);\n" + "return;\n" + "}\n" + "if ( !style )\n" + "{\n" + "var head = document.head || document.getElementsByTagName('head')[0];\n" + "style = document.createElement('style');\n" + "style.type = 'text/css';\n" + "style.setAttribute( \"wxss:path\", info.path );\n" + "head.appendChild(style);\n" + "window.__rpxRecalculatingFuncs__.push(function(size){\n" + "opt.deviceWidth = size.width;\n" + "rewritor(suffix, opt, style);\n" + "});\n" + "}\n" + "if (style.styleSheet) {\n" + "style.styleSheet.cssText = css;\n" + "} else {\n" + "if ( style.childNodes.length == 0 )\n" + "style.appendChild(document.createTextNode(css));\n" + "else\n" + "style.childNodes[0].nodeValue = css;\n" + "}\n" + "}\n" + "return rewritor;\n" + "}\n", + v33); + std::string::_M_dispose((void **)&v33); + std::operator+((int)v32, (char *)lpuexcpta, (int)&v29); + v14 = std::string::append(v32, (int)&v26); + std::string::basic_string(&v33, v14); + std::string::operator=(a3, &v33); + std::string::_M_dispose((void **)&v33); + std::string::_M_dispose((void **)v32); + operator delete[](lpuexcpta); + std::string::_M_dispose((void **)&v29); + std::string::_M_dispose((void **)&v26); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v37); + return 0; +} +// 403CDA: variable 'v7' is possibly undefined +// 403AB6: using guessed type char var_D0[4]; + +//----- (0040428A) -------------------------------------------------------- +void __fastcall std::deque>::~deque(int a1) +{ + int v2; // edi + int v3; // edx + int *v4; // esi + int v5; // eax + int v6; // edx + int v7; // edx + void **v8; // esi + unsigned int v9; // edi + void *v10; // eax + int v11; // [esp+1Ch] [ebp-2Ch] + int v12; // [esp+20h] [ebp-28h] + int v13; // [esp+24h] [ebp-24h] + unsigned int v14; // [esp+28h] [ebp-20h] + int v15; // [esp+2Ch] [ebp-1Ch] + + v2 = *(_DWORD *)(a1 + 24); + v13 = *(_DWORD *)(a1 + 16); + v3 = *(_DWORD *)(a1 + 20); + v12 = *(_DWORD *)(a1 + 28); + v15 = v3; + v4 = (int *)(v3 + 4); + v14 = *(_DWORD *)(a1 + 36); + v5 = *(_DWORD *)(a1 + 8); + while ( v14 > (unsigned int)v4 ) + { + v6 = *v4; + v11 = v5; + ++v4; + std::_Destroy_aux::__destroy *>(v6, v6, v6 + 512); + v5 = v11; + } + if ( v15 == v14 ) + { + std::_Destroy_aux::__destroy *>(v3, v5, v2); + } + else + { + std::_Destroy_aux::__destroy *>(v13, v5, v13); + std::_Destroy_aux::__destroy *>(v7, v12, v2); + } + if ( *(_DWORD *)a1 ) + { + v8 = *(void ***)(a1 + 20); + v9 = *(_DWORD *)(a1 + 36) + 4; + while ( v9 > (unsigned int)v8 ) + { + v10 = *v8++; + operator delete(v10); + } + operator delete(*(void **)a1); + } +} +// 4042F8: variable 'v7' is possibly undefined +// 404301: variable 'v3' is possibly undefined + +//----- (00404339) -------------------------------------------------------- +struct _Unwind_Exception *__cdecl WXSS::LintAndParseCSS( + int *a1, + char **a2, + unsigned int **a3, + unsigned int **a4, + char a5, + char a6, + char a7, + char a8, + int a9) +{ + int *v9; // eax + WXSS::CSSTreeLib::Parser *v11; // [esp+0h] [ebp-1B8h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-190h] + volatile signed __int32 *v13; // [esp+68h] [ebp-150h] BYREF + volatile signed __int32 *v14; // [esp+6Ch] [ebp-14Ch] BYREF + void *v15[6]; // [esp+70h] [ebp-148h] BYREF + int v16[22]; // [esp+88h] [ebp-130h] BYREF + void *v17; // [esp+E0h] [ebp-D8h] BYREF + volatile signed __int32 *v18; // [esp+E4h] [ebp-D4h] BYREF + char v19[204]; // [esp+ECh] [ebp-CCh] BYREF + + WXSS::CSSTreeLib::Parser::Parser(v11); + lpuexcpt = (struct _Unwind_Exception *)WXSS::CSSTreeLib::Parser::Parse((int)v16, a2, a1, a4, a9); + if ( !lpuexcpt ) + { + v13 = 0; + v14 = 0; + std::__shared_ptr::__shared_ptr(&v17, v16); + std::__shared_ptr::operator=( + &v13, + (volatile signed __int32 **)&v17); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18); + std::string::operator=(a3, "/*"); + std::string::operator+=(a3, "v0.4me_20190328_db"); + std::string::operator+=(a3, "*/\n"); + if ( a6 ) + { + if ( a8 ) + v9 = WXSS::CSSTreeLib::LexicalChecker::GetInstance(); + else + v9 = WXSS::CSSTreeLib::LexicalChecker::GetInstance(); + WXSS::CSSTreeLib::LexicalChecker::Traval((_DWORD **)v9, &v13); + } + if ( a5 ) + { + std::basic_stringstream,std::allocator>::basic_stringstream((int)&v17); + WXSS::CSSTreeLib::CSSSyntaxTree::Print2Stream((int)v13, 0, (int)&v17); + std::stringbuf::str((int)v15, (int)v19); + std::string::operator+=(a3, (int)v15); + std::string::_M_dispose(v15); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)&v17); + } + else if ( a7 ) + { + WXML::Rewrite::ToStringCode2((int)&v17, (int *)a3); + std::string::operator+=(a3, (int)&v17); + std::string::_M_dispose(&v17); + } + else + { + WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode((int)v13, (WXSS::Token *)a3, 1u); + } + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v14); + } + WXSS::CSSTreeLib::Parser::~Parser((int)v16); + return lpuexcpt; +} +// 4043AE: variable 'v11' is possibly undefined +// 404339: using guessed type _DWORD var_130[22]; +// 404339: using guessed type char var_CC[204]; + +//----- (00404670) -------------------------------------------------------- +void __thiscall WXSS::XCompiler::XCompiler(char *this, _DWORD *a2, char a3, int a4) +{ + int *v4; // eax + _DWORD *i; // eax + int v6; // edx + int v7; // eax + int *v8; // edx + char *Literal; // eax + char *v10; // eax + int insert_unique_pos; // eax + _DWORD *v12; // edx + int j; // eax + int k; // eax + bool v15; // zf + char *v16; // eax + int v17; // edx + int v18; // edx + void **v19; // eax + int *v20; // eax + bool v21; // zf + int *v22; // eax + int v23; // edx + void **v24; // eax + char *v25; // eax + char *v26; // eax + void **v27; // eax + void **v28; // eax + WXSS::CSSTreeLib::Parser *v29; // [esp+0h] [ebp-158h] + bool v30; // [esp+1Bh] [ebp-13Dh] + int *v31; // [esp+20h] [ebp-138h] + int v32; // [esp+20h] [ebp-138h] + char *v33; // [esp+24h] [ebp-134h] + char *v34; // [esp+28h] [ebp-130h] + char *v35; // [esp+2Ch] [ebp-12Ch] + int *v36; // [esp+2Ch] [ebp-12Ch] + void **v37; // [esp+30h] [ebp-128h] + int v38; // [esp+34h] [ebp-124h] + int v39; // [esp+34h] [ebp-124h] + int v40; // [esp+34h] [ebp-124h] + void *v41; // [esp+34h] [ebp-124h] + _DWORD *v42; // [esp+38h] [ebp-120h] + char *v43; // [esp+38h] [ebp-120h] + int v44; // [esp+38h] [ebp-120h] + int v45; // [esp+38h] [ebp-120h] + unsigned int ii; // [esp+38h] [ebp-120h] + unsigned int v47; // [esp+3Ch] [ebp-11Ch] + int v48; // [esp+3Ch] [ebp-11Ch] + int v49; // [esp+3Ch] [ebp-11Ch] + unsigned int m; // [esp+3Ch] [ebp-11Ch] + int v51; // [esp+3Ch] [ebp-11Ch] + unsigned int n; // [esp+3Ch] [ebp-11Ch] + _DWORD *Block; // [esp+40h] [ebp-118h] + _DWORD *Blocka; // [esp+40h] [ebp-118h] + char *v55; // [esp+44h] [ebp-114h] + int v57; // [esp+80h] [ebp-D8h] BYREF + volatile signed __int32 *v58; // [esp+84h] [ebp-D4h] BYREF + int v59; // [esp+88h] [ebp-D0h] BYREF + volatile signed __int32 *v60; // [esp+8Ch] [ebp-CCh] BYREF + int *v61; // [esp+90h] [ebp-C8h] BYREF + int *v62; // [esp+94h] [ebp-C4h] + int v63; // [esp+98h] [ebp-C0h] BYREF + void *v64; // [esp+A8h] [ebp-B0h] BYREF + int v65; // [esp+ACh] [ebp-ACh] BYREF + int v66; // [esp+B0h] [ebp-A8h] + int *v67; // [esp+B4h] [ebp-A4h] + int *v68; // [esp+B8h] [ebp-A0h] + int v69; // [esp+BCh] [ebp-9Ch] + int v70; // [esp+C0h] [ebp-98h] BYREF + int v71; // [esp+C4h] [ebp-94h] BYREF + int v72[3]; // [esp+C8h] [ebp-90h] BYREF + int v73; // [esp+D4h] [ebp-84h] + int v74[6]; // [esp+D8h] [ebp-80h] BYREF + int v75; // [esp+F0h] [ebp-68h] BYREF + volatile signed __int32 *v76; // [esp+F4h] [ebp-64h] BYREF + void *v77[24]; // [esp+F8h] [ebp-60h] BYREF + + // char* this + v55 = this + 8; // this->offset_8 + this[16] = 0; + + // this->offset_8 + *((_DWORD *)this + 2) = this + 16; + *((_DWORD *)this + 3) = 0; + + // this->offset_36 + *((_DWORD *)this + 9) = 0; + // this->offset_40 + *((_DWORD *)this + 10) = 0; + *((_DWORD *)this + 11) = this + 36; + *((_DWORD *)this + 12) = this + 36; + *((_DWORD *)this + 13) = 0; + v34 = this + 56; + *((_DWORD *)this + 15) = 0; + *((_DWORD *)this + 16) = 0; + v35 = this + 60; + *((_DWORD *)this + 19) = 0; + *((_DWORD *)this + 17) = this + 60; + *((_DWORD *)this + 18) = this + 60; + v37 = (void **)(this + 80); + *((_DWORD *)this + 21) = 0; + *((_DWORD *)this + 22) = 0; + *((_DWORD *)this + 23) = this + 84; + *((_DWORD *)this + 24) = this + 84; + *((_DWORD *)this + 25) = 0; + *((_DWORD *)this + 29) = this + 108; + *((_DWORD *)this + 30) = this + 108; + *((_DWORD *)this + 27) = 0; + *((_DWORD *)this + 28) = 0; + *((_DWORD *)this + 31) = 0; + *((_DWORD *)this + 35) = this + 132; + *((_DWORD *)this + 36) = this + 132; + *((_DWORD *)this + 33) = 0; + *((_DWORD *)this + 34) = 0; + *((_DWORD *)this + 37) = 0; + *((_DWORD *)this + 39) = 0; + *((_DWORD *)this + 40) = 0; + *((_DWORD *)this + 41) = this + 156; + *((_DWORD *)this + 42) = this + 156; + *((_DWORD *)this + 43) = 0; + // XCompiler - 0 + if ( a3 ) + v4 = WXSS::CSSTreeLib::LexicalChecker::GetInstance(); + else + v4 = WXSS::CSSTreeLib::LexicalChecker::GetInstance(); + v31 = v4; + *(_DWORD *)this = 0; + *((_DWORD *)this + 1) = 0; + + for ( i = (_DWORD *)a2[3]; ; i = (_DWORD *)std::_Rb_tree_increment(v38) ) + { + v38 = (int)i; + Block = a2 + 1; + if ( a2 + 1 == i ) // end + break; + WXSS::CSSTreeLib::Parser::Parser(v29); + + v61 = &v63; // std::string + v62 = 0; + LOBYTE(v63) = 0; + + // int v38 + v42 = (_DWORD *)(v38 + 16); + v47 = WXSS::CSSTreeLib::Parser::Parse((int)v77, (char **)(v38 + 40), (int *)(v38 + 16), (unsigned int **)&v61, a4); + if ( v47 ) + { + ++*((_DWORD *)this + 1); + std::string::operator+=(v55, (int)&v61); + std::string::operator+=(v55, "\n"); + *(_DWORD *)this = v47; + } + else + { + std::__shared_ptr::__shared_ptr(&v57, v77); + WXSS::CSSTreeLib::LexicalChecker::Traval((_DWORD **)v31, &v57); + while ( 1 ) + { + v6 = *(_DWORD *)(v57 + 120); + if ( (*(_DWORD *)(v57 + 124) - v6) >> 3 <= v47 ) + break; + if ( std::operator==(*(_DWORD *)(v6 + 8 * v47), "DIRECTIVE") ) + { + v7 = *(_DWORD *)(*(_DWORD *)(v57 + 120) + 8 * v47); // current + v8 = *(int **)(v7 + 120); + if ( (unsigned int)(*(_DWORD *)(v7 + 124) - (_DWORD)v8) > 8 && std::operator==(*v8, "@import") ) + { + Literal = (char *)WXSS::Token::GetLiteral((_DWORD *)(*(_DWORD *)(*(_DWORD *)( + *(_DWORD *)(*(_DWORD *)(v57 + 120) + 8 * v47) // current + + 120) // v8 + + 8) + + 24)); + std::string::basic_string(v74, Literal, (int)&v70); + WXSS::RemoveQuote((char *)&v64, (char **)v74); + std::string::_M_dispose((void **)v74); + + v70 = (int)v72; + v71 = 0; + LOBYTE(v72[0]) = 0; + + std::string::substr(v74, &v64, 0, 1u); + v30 = std::operator==((int)v74, "/"); + std::string::_M_dispose((void **)v74); + if ( v30 ) + { + std::string::basic_string(v74, ".", (int)&v59); + std::string::operator+=(v74, (int)&v64); + if ( Block != std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::find( + a2, + (int)v74) ) + std::string::_M_assign((int)&v70, (int)v74); + std::string::operator+=(v74, ".wxss"); + if ( Block != std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::find( + a2, + (int)v74) ) + std::string::_M_assign((int)&v70, (int)v74); + std::string::_M_dispose((void **)v74); + } + if ( !v71 ) + MMBizWxaAppComm::PathCombine(v42, &v64, (unsigned int **)&v70); + if ( Block == std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::find( + a2, + (int)&v70) ) + std::string::operator+=(&v70, ".wxss"); + if ( Block == std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::find( + a2, + (int)&v70) ) + { + std::string::operator+=(v55, "path `"); + std::string::operator+=(v55, (int)&v64); + std::string::operator+=(v55, "` not found from `"); + std::string::operator+=(v55, (int)v42); + std::string::operator+=(v55, "`.\n"); + ++*((_DWORD *)this + 1); + *(_DWORD *)this = 3; + } + else + { + v10 = std::map>::operator[](v34, (int)v42); + std::vector::push_back((char **)v10, (int)&v70); + v33 = (char *)operator new(0x18u); + std::string::basic_string(v33, (int)&v70); + zcc::shared_ptr::shared_ptr(v33); + std::__shared_ptr::operator=( + (volatile signed __int32 **)(*(_DWORD *)(*(_DWORD *)(v57 + 120) + 8 * v47) + 140), + (volatile signed __int32 **)&v59); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v60); + } + std::string::_M_dispose((void **)&v70); + std::string::_M_dispose(&v64); + } + } + ++v47; + } + std::string::basic_string((char *)v74, (int)v42); + std::__shared_ptr::__shared_ptr(&v75, &v57); + Blocka = operator new(0x30u); + std::string::basic_string(Blocka + 4, v74); + std::__shared_ptr::__shared_ptr(Blocka + 10, &v75); + insert_unique_pos = std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>> + ::_M_get_insert_unique_pos( + (_DWORD *)this + 8, // this->offset_32 + (int)(Blocka + 4)); + if ( v12 ) + { + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_insert_node( + (_DWORD *)this + 8, + insert_unique_pos, + v12, + Blocka); + } + else + { + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)Blocka + 11); + std::string::_M_dispose((void **)Blocka + 4); + operator delete(Blocka); + } + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v76); + std::string::_M_dispose((void **)v74); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v58); + } + std::string::_M_dispose((void **)&v61); + WXSS::CSSTreeLib::Parser::~Parser((int)v77); + } + // end for + // XCompiler - 5 + + if ( !*(_DWORD *)this ) + { + v65 = 0; + v66 = 0; + v67 = &v65; + v68 = &v65; + v69 = 0; + for ( j = a2[3]; ; j = std::_Rb_tree_increment(v48) ) + { + v48 = j; + if ( Block == (_DWORD *)j ) + break; + *std::map::operator[](&v64, j + 16) = 0; + } + for ( k = a2[3]; ; k = std::_Rb_tree_increment(v39) ) + { + v39 = k; + if ( Block == (_DWORD *)k ) // end + break; + v32 = k + 16; + v49 = *((_DWORD *)this + 16); // this->offset_64 + v43 = v35; + while ( v49 ) + { + v15 = (unsigned __int8)std::operator<(v49 + 16, v32) == 0; + v16 = v43; + if ( v15 ) + v16 = (char *)v49; + v17 = *(_DWORD *)(v49 + 12); + v43 = v16; + if ( v15 ) + v17 = *(_DWORD *)(v49 + 8); + v49 = v17; + } + if ( v35 != v43 && !(unsigned __int8)std::operator<(v32, (int)(v43 + 16)) ) + { + for ( m = 0; ; ++m ) + { + v18 = *((_DWORD *)v43 + 10); + if ( -1431655765 * ((*((_DWORD *)v43 + 11) - v18) >> 3) <= m ) + break; + v19 = std::map::operator[](&v64, 24 * m + v18); + *v19 = (char *)*v19 + 1; + } + } + } + // XCompiler - 5 - 0 + v71 = 0; + v72[0] = 0; + v72[1] = (int)&v71; + v72[2] = (int)&v71; + v73 = 0; + while ( 1 ) + { + v20 = v67; + // v61 -> std::vector + v61 = 0; + v62 = 0; + v63 = 0; + while ( 1 ) + { + v44 = (int)v20; + if ( v20 == &v65 ) + break; + if ( !v20[10] ) + { + v40 = (int)(v20 + 4); + v51 = v72[0]; + v36 = &v71; + while ( v51 ) + { + v21 = (unsigned __int8)std::operator<(v51 + 16, v40) == 0; + v22 = v36; + if ( v21 ) + v22 = (int *)v51; + v23 = *(_DWORD *)(v51 + 12); + v36 = v22; + if ( v21 ) + v23 = *(_DWORD *)(v51 + 8); + v51 = v23; + } + if ( v36 == &v71 || (unsigned __int8)std::operator<(v40, (int)(v36 + 4)) ) + { + std::vector::push_back((char **)&v61, v40); + std::_Rb_tree,std::less,std::allocator>::_M_insert_unique( + &v70, + v40); + } + } + v20 = (int *)std::_Rb_tree_increment(v44); + } + if ( v62 == v61 ) // end + break; + for ( n = 0; -1431655765 * (((char *)v62 - (char *)v61) >> 3) > n; ++n ) + { + std::string::basic_string((char *)v74, (int)&v61[6 * n]); + v45 = 0; + if ( Block != std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::find( + a2, + (int)v74) ) // v74 ->cur + v45 = std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::find( + a2, + (int)v74)[11]; + v24 = std::map::operator[](v37, (int)v74); + *v24 = (char *)*v24 + v45; + for ( ii = 0; ; ++ii ) + { + v25 = std::map>::operator[](v34, (int)v74); + if ( -1431655765 * ((*((_DWORD *)v25 + 1) - *(_DWORD *)v25) >> 3) <= ii ) + break; + v26 = std::map>::operator[](v34, (int)v74); + std::string::basic_string((char *)v77, *(_DWORD *)v26 + 24 * ii); + v27 = std::map::operator[](&v64, (int)v77); + *v27 = (char *)*v27 - 1; + v41 = *std::map::operator[](v37, (int)v74); + v28 = std::map::operator[](v37, (int)v77); + *v28 = (char *)*v28 + (_DWORD)v41; + std::string::_M_dispose(v77); + } + std::string::_M_dispose((void **)v74); + } + std::vector::~vector((void ***)&v61); + } + // XCompiler - 5 - 5 + if ( a2[5] != v73 ) + { + std::string::operator+=( + v55, + "I don't know what will happen if a snake eats its tail, but a file can not import itself."); + *(_DWORD *)this = 4; + ++*((_DWORD *)this + 1); + } + std::vector::~vector((void ***)&v61); + std::_Rb_tree,std::less,std::allocator>::_M_erase(v72[0]); + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(v66); + } +} +// 404863: variable 'v29' is possibly undefined +// 404DFF: variable 'v12' is possibly undefined + +//----- (00405507) -------------------------------------------------------- +struct _Unwind_Exception *__cdecl WXSS::LintAndParseCSSList( + _DWORD *a1, + int a2, + unsigned int **a3, + int a4, + int a5, + char a6, + char a7, + char a8, + int a9) +{ + struct _Unwind_Exception *WellFormattedJSCompiled; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-F0h] + int v12[2]; // [esp+50h] [ebp-B8h] BYREF + char v13[176]; // [esp+58h] [ebp-B0h] BYREF + + WXSS::XCompiler::XCompiler((char *)v12, a1, a7, a9); + std::string::_M_assign(a4, (int)v13); + lpuexcpt = (struct _Unwind_Exception *)v12[0]; + if ( !v12[0] ) + { + std::string::operator=(a3, "/*"); + std::string::operator+=(a3, "v0.4me_20190328_db"); + std::string::operator+=(a3, "*/\n"); + if ( a8 ) + { + WellFormattedJSCompiled = (struct _Unwind_Exception *)WXSS::XCompiler::ShowTree(v12, a3); + } + else if ( a6 ) + { + WellFormattedJSCompiled = WXSS::XCompiler::GetWellFormattedJSCompiled(v12, a2, a3); + } + else + { + WellFormattedJSCompiled = (struct _Unwind_Exception *)WXSS::XCompiler::GetCompiled(v12, a2, a3); + } + lpuexcpt = WellFormattedJSCompiled; + } + WXSS::XCompiler::~XCompiler((int)v12); + return lpuexcpt; +} +// 405507: using guessed type char var_B0[176]; + +//----- (00405699) -------------------------------------------------------- +struct _Unwind_Exception *__cdecl WXSS::NewLintAndParseCSSList( + _DWORD *a1, + char **a2, + unsigned int **a3, + int a4, + int a5, + char a6, + int a7, + int *a8) +{ + unsigned int **v8; // eax + _DWORD *v9; // eax + char *v10; // edx + _DWORD *v11; // eax + unsigned int v12; // edx + char *v13; // eax + unsigned int v14; // edx + _DWORD *v15; // eax + _DWORD *v16; // eax + int PageCss; // [esp+20h] [ebp-1A8h] + unsigned int i; // [esp+24h] [ebp-1A4h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-1A0h] + void *v21[2]; // [esp+68h] [ebp-160h] BYREF + char v22; // [esp+70h] [ebp-158h] BYREF + void *v23[2]; // [esp+80h] [ebp-148h] BYREF + char v24; // [esp+88h] [ebp-140h] BYREF + int v25[6]; // [esp+98h] [ebp-130h] BYREF + void *v26[2]; // [esp+B0h] [ebp-118h] BYREF + unsigned int v27; // [esp+B8h] [ebp-110h] BYREF + void *v28[2]; // [esp+C8h] [ebp-100h] BYREF + unsigned int v29; // [esp+D0h] [ebp-F8h] BYREF + void *v30[6]; // [esp+E0h] [ebp-E8h] BYREF + void *v31[6]; // [esp+F8h] [ebp-D0h] BYREF + int v32[2]; // [esp+110h] [ebp-B8h] BYREF + char v33[176]; // [esp+118h] [ebp-B0h] BYREF + + WXSS::XCompiler::XCompiler((char *)v32, a1, a6, a7); + std::string::_M_assign(a4, (int)v33); + lpuexcpt = (struct _Unwind_Exception *)v32[0]; + if ( !v32[0] ) + { + v21[0] = &v22; + v21[1] = 0; + v22 = 0; + lpuexcpt = (struct _Unwind_Exception *)WXSS::XCompiler::GetCommHead((int)v32, a2, v21, 1, a8); + if ( !lpuexcpt ) + { + std::string::operator=(a3, "version=v0.4me_20190328_db="); + WXML::Rewrite::ToStringCode2((int)v28, (int *)v21); + v8 = std::string::insert((unsigned int **)v28, 0, "comm="); + std::string::basic_string(v30, v8); + v9 = std::string::append(v30, "="); + std::string::basic_string(v31, v9); + std::string::operator+=(a3, (int)v31); + std::string::_M_dispose(v31); + std::string::_M_dispose(v30); + std::string::_M_dispose(v28); + for ( i = 0; ; ++i ) + { + v10 = *a2; + if ( -1431655765 * ((a2[1] - *a2) >> 3) <= i ) + break; + v23[0] = &v24; + v23[1] = 0; + v24 = 0; + PageCss = WXSS::XCompiler::GetPageCss((char *)v32, (int *)&v10[24 * i], v23, 2); + if ( PageCss ) + { + std::string::_M_dispose(v23); + lpuexcpt = (struct _Unwind_Exception *)PageCss; + break; + } + WXML::Rewrite::ToStringCode2((int)v28, (int *)v23); + std::operator+((int)v25, (char *)&byte_50DF9A, (int)&(*a2)[24 * i]); + v11 = std::string::append(v25, "="); + std::string::basic_string(v26, v11); + v12 = 15; + v13 = (char *)v26[1] + (unsigned int)v28[1]; + if ( v26[0] != &v27 ) + v12 = v27; + if ( (unsigned int)v13 <= v12 ) + goto LABEL_14; + v14 = 15; + if ( v28[0] != &v29 ) + v14 = v29; + if ( (unsigned int)v13 > v14 ) +LABEL_14: + v15 = std::string::append(v26, (int)v28); + else + v15 = std::string::insert((unsigned int **)v28, 0, (int)v26); + std::string::basic_string(v30, v15); + v16 = std::string::append(v30, "="); + std::string::basic_string(v31, v16); + std::string::operator+=(a3, (int)v31); + std::string::_M_dispose(v31); + std::string::_M_dispose(v30); + std::string::_M_dispose(v26); + std::string::_M_dispose((void **)v25); + std::string::_M_dispose(v28); + std::string::_M_dispose(v23); + } + } + std::string::_M_dispose(v21); + } + WXSS::XCompiler::~XCompiler((int)v32); + return lpuexcpt; +} +// 405699: using guessed type char var_B0[176]; + +//----- (00405BB4) -------------------------------------------------------- +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str) +{ + size_t v2; // eax + + v2 = strlen(Str); + return std::string::_M_replace(this, 0, (size_t)this[1], Str, v2); +} + +//----- (00405BF1) -------------------------------------------------------- +void __cdecl MMBizWxaAppComm::SplitBySlash(_DWORD *a1, char **a2) +{ + int v2; // edx + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + void *v4[8]; // [esp+58h] [ebp-20h] BYREF + + lpuexcpt = 0; + v2 = -1; + while ( a1[1] > (int)lpuexcpt ) + { + if ( *((_BYTE *)lpuexcpt + *a1) == 47 ) + { + if ( (int)lpuexcpt - v2 > 1 ) + { + std::string::substr(v4, a1, v2 + 1, (unsigned int)lpuexcpt - v2 - 1); + std::vector::emplace_back(a2, v4); + std::string::_M_dispose(v4); + } + v2 = (int)lpuexcpt; + } + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + } + if ( (int)lpuexcpt - v2 > 1 ) + { + std::string::substr(v4, a1, v2 + 1, (unsigned int)lpuexcpt - v2 - 1); + std::vector::emplace_back(a2, v4); + std::string::_M_dispose(v4); + } +} + +//----- (00405D10) -------------------------------------------------------- +int __cdecl MMBizWxaAppComm::PathCombine(_DWORD *a1, _DWORD *a2, unsigned int **a3) +{ + bool v3; // zf + int v4; // eax + char *v6; // [esp+0h] [ebp-88h] + int v7; // [esp+14h] [ebp-74h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-70h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-70h] + char *v10; // [esp+50h] [ebp-38h] BYREF + char *v11; // [esp+54h] [ebp-34h] + char *v12; // [esp+58h] [ebp-30h] + char *v13; // [esp+5Ch] [ebp-2Ch] BYREF + int v14; // [esp+60h] [ebp-28h] + int v15; // [esp+64h] [ebp-24h] + void *v16; // [esp+68h] [ebp-20h] BYREF + size_t v17; // [esp+6Ch] [ebp-1Ch] + char v18[24]; // [esp+70h] [ebp-18h] BYREF + + v10 = 0; + v11 = 0; + v3 = a2[1] == 0; + v12 = 0; + v13 = 0; + v14 = 0; + v15 = 0; + if ( v3 || *(_BYTE *)*a2 != 47 ) + { + MMBizWxaAppComm::SplitBySlash(a1, &v10); + v4 = a1[1]; + if ( v4 ) + { + if ( *(_BYTE *)(*a1 + v4 - 1) != 47 ) + { + v11 -= 24; + std::string::_M_dispose((void **)v11); + } + } + } + MMBizWxaAppComm::SplitBySlash(a2, &v13); + for ( lpuexcpt = 0; + (unsigned int)lpuexcpt < -1431655765 * ((v14 - (int)v13) >> 3); + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1) ) + { + v7 = 24 * (_DWORD)lpuexcpt; + if ( !std::string::compare((int)&v13[24 * (_DWORD)lpuexcpt], "..") ) + { + if ( v10 != v11 ) + { + v11 -= 24; + std::string::_M_dispose((void **)v11); + } + } + else if ( std::string::compare((int)&v13[v7], ".") ) + { + if ( v11 == v12 ) + { + std::vector::_M_realloc_insert(&v10, v11, (int)&v13[v7]); + } + else + { + std::string::basic_string(v11, (int)&v13[v7]); + v11 += 24; + } + } + } + if ( a1[1] && *(_BYTE *)*a1 == 47 || a2[1] && *(_BYTE *)*a2 == 47 ) + v6 = "/"; + else + v6 = (char *)&unk_50F119; + std::string::operator=(a3, v6); + for ( lpuexcpta = 0; + (unsigned int)lpuexcpta < -1431655765 * ((v11 - v10) >> 3); + lpuexcpta = (struct _Unwind_Exception *)((char *)lpuexcpta + 1) ) + { + if ( lpuexcpta ) + { + v16 = v18; + std::string::_S_copy_chars(v18, "/", (size_t)""); + v17 = 1; + *((_BYTE *)v16 + 1) = 0; + std::string::_M_append(a3, v16, v17); + std::string::_M_dispose(&v16); + } + std::string::_M_append(a3, *(_BYTE **)&v10[24 * (_DWORD)lpuexcpta], *(_DWORD *)&v10[24 * (_DWORD)lpuexcpta + 4]); + } + std::vector::~vector((void ***)&v13); + std::vector::~vector((void ***)&v10); + return 0; +} + +//----- (00405FC6) -------------------------------------------------------- +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str) +{ + size_t v2; // eax + + v2 = strlen(Str); + return std::string::_M_replace(this, 0, (size_t)this[1], Str, v2); +} + +//----- (00406003) -------------------------------------------------------- +int __cdecl WXML::RPX::accept(WXML::RPX *this, int (*a2)[266], bool *a3, int *a4) +{ + int v4; // eax + int i; // edx + int v7; // esi + int result; // eax + + v4 = 0; + for ( i = *(_DWORD *)a3; ; --i ) + { + v7 = v4; + if ( i <= 0 ) + break; + v4 = *((_DWORD *)this + 266 * v4 + *(unsigned __int8 *)a4); + if ( v4 == -1 ) + break; + a4 = (int *)((char *)a4 + 1); + } + result = -1; + if ( *((_BYTE *)*a2 + v7) ) + { + *(_DWORD *)a3 = i; + return 0; + } + return result; +} + +//----- (00406046) -------------------------------------------------------- +int __cdecl WXML::RPX::acceptID(WXML::RPX *this, bool *a2) +{ + int v2; // eax + + if ( !WXML::RPX::acceptID(char const*,int &)::inited ) + { + memset(&WXML::RPX::acceptID(char const*,int &)::nextPos, 255, 0x850u); + v2 = 0; + dword_51FF9C = 1; + dword_5203C4 = 1; + do + { + dword_51FFA4[v2] = 1; + dword_51FF24[v2] = 1; + dword_5203CC[v2] = 1; + dword_52034C[v2++] = 1; + } + while ( v2 != 26 ); + dword_520308 = 1; + dword_52030C = 1; + dword_520310 = 1; + dword_520314 = 1; + dword_520318 = 1; + dword_52031C = 1; + dword_520320 = 1; + dword_520324 = 1; + dword_520328 = 1; + dword_52032C = 1; + WXML::RPX::acceptID(char const*,int &)::inited = 1; + } + return WXML::RPX::accept( + (WXML::RPX *)&WXML::RPX::acceptID(char const*,int &)::nextPos, + (int (*)[266])WXML::RPX::acceptID(char const*,int &)::canAccept, + a2, + (int *)this); +} +// 51FF24: using guessed type int dword_51FF24[30]; +// 51FF9C: using guessed type int dword_51FF9C; +// 51FFA4: using guessed type int dword_51FFA4[217]; +// 520308: using guessed type int dword_520308; +// 52030C: using guessed type int dword_52030C; +// 520310: using guessed type int dword_520310; +// 520314: using guessed type int dword_520314; +// 520318: using guessed type int dword_520318; +// 52031C: using guessed type int dword_52031C; +// 520320: using guessed type int dword_520320; +// 520324: using guessed type int dword_520324; +// 520328: using guessed type int dword_520328; +// 52032C: using guessed type int dword_52032C; +// 52034C: using guessed type int dword_52034C[30]; +// 5203C4: using guessed type int dword_5203C4; +// 5203CC: using guessed type int dword_5203CC[169]; +// 520670: using guessed type char WXML::RPX::acceptID(char const*,int &)::inited; + +//----- (00406145) -------------------------------------------------------- +int __cdecl WXML::RPX::acceptStr(WXML::RPX *this, bool *a2) +{ + int i; // eax + + if ( !WXML::RPX::acceptStr(char const*,int &)::inited ) + { + memset(&WXML::RPX::acceptStr(char const*,int &)::nextPos, 255, 0x18F0u); + for ( i = 0; i != 256; ++i ) + { + dword_51E948[i] = 1; + dword_51ED70[i] = 2; + dword_51F198[i] = 1; + dword_51F5C0[i] = 2; + } + dword_51E5A8 = 1; + dword_51E5BC = 2; + dword_51EAB8 = 3; + dword_51EEE0 = 4; + dword_51E9D0 = 5; + dword_51EE0C = 5; + WXML::RPX::acceptStr(char const*,int &)::inited = 1; + } + return WXML::RPX::accept( + (WXML::RPX *)&WXML::RPX::acceptStr(char const*,int &)::nextPos, + (int (*)[266])WXML::RPX::acceptStr(char const*,int &)::canAccept, + a2, + (int *)this); +} +// 51E5A8: using guessed type int dword_51E5A8; +// 51E5BC: using guessed type int dword_51E5BC; +// 51E948: using guessed type int dword_51E948[34]; +// 51E9D0: using guessed type int dword_51E9D0; +// 51EAB8: using guessed type int dword_51EAB8; +// 51ED70: using guessed type int dword_51ED70[39]; +// 51EE0C: using guessed type int dword_51EE0C; +// 51EEE0: using guessed type int dword_51EEE0; +// 51F198: using guessed type int dword_51F198[266]; +// 51F5C0: using guessed type int dword_51F5C0[532]; +// 51FE10: using guessed type char WXML::RPX::acceptStr(char const*,int &)::inited; + +//----- (0040620A) -------------------------------------------------------- +int __cdecl WXML::RPX::acceptNum(WXML::RPX *this, bool *a2) +{ + int v2; // eax + + if ( !WXML::RPX::acceptNum(char const*,int &)::inited ) + { + memset(&WXML::RPX::acceptNum(char const*,int &)::nextPos, 255, 0x14C8u); + v2 = 0; + dword_51D0EC = 1; + dword_51D0F4 = 1; + dword_51D0F8 = 3; + dword_51D520 = 3; + dword_51D948 = 4; + do + { + dword_51D100[v2] = 2; + dword_51D528[v2] = 2; + dword_51D950[v2] = 2; + dword_51DD78[v2] = 4; + dword_51E1A0[v2++] = 4; + } + while ( v2 != 10 ); + WXML::RPX::acceptNum(char const*,int &)::inited = 1; + } + return WXML::RPX::accept( + (WXML::RPX *)&WXML::RPX::acceptNum(char const*,int &)::nextPos, + (int (*)[266])WXML::RPX::acceptNum(char const*,int &)::canAccept, + a2, + (int *)this); +} +// 51D0EC: using guessed type int dword_51D0EC; +// 51D0F4: using guessed type int dword_51D0F4; +// 51D0F8: using guessed type int dword_51D0F8; +// 51D100: using guessed type int dword_51D100[264]; +// 51D520: using guessed type int dword_51D520; +// 51D528: using guessed type int dword_51D528[264]; +// 51D948: using guessed type int dword_51D948; +// 51D950: using guessed type int dword_51D950[266]; +// 51DD78: using guessed type int dword_51DD78[266]; +// 51E1A0: using guessed type int dword_51E1A0[218]; +// 51E508: using guessed type char WXML::RPX::acceptNum(char const*,int &)::inited; + +//----- (004062CE) -------------------------------------------------------- +int __cdecl WXML::RPX::acceptSymbol(WXML::RPX *this, char *a2, int *a3) +{ + WXML::RPX *v3; // ebx + int v4; // edi + int v5; // esi + + v3 = this; + v4 = *(_DWORD *)a2; + v5 = *(_DWORD *)a2 - 1; + *(_DWORD *)a2 = v5; + switch ( *((_BYTE *)this + 1) ) + { + case '(': + *a3 = 3; + break; + case ')': + *a3 = 4; + break; + case '+': + *a3 = 1; + break; + case ',': + *a3 = 6; + break; + case '-': + *a3 = 2; + break; + case '.': + *a3 = 5; + break; + default: + *(_DWORD *)a2 = v4; + if ( *(_BYTE *)this == 32 || *(_BYTE *)this == 9 ) + { + while ( *(int *)a2 > 0 && (*(_BYTE *)v3 == 32 || *(_BYTE *)v3 == 9) ) + { + v3 = (WXML::RPX *)((char *)v3 + 1); + --*(_DWORD *)a2; + } + *a3 = 7; + } + else + { + *(_DWORD *)a2 = v5; + *a3 = 0; + } + break; + } + return 0; +} + +//----- (00406366) -------------------------------------------------------- +std::ostream::sentry *__cdecl WXML::Rewrite::ToStringCode(int a1, int a2, int a3) +{ + int i; // ebx + char v4; // dl + std::ostream::sentry *result; // eax + char v6; // dl + int v7; // [esp+1Fh] [ebp-9h] BYREF + + for ( i = 0; i < a2; ++i ) + { + v4 = *(_BYTE *)(a1 + i); + if ( v4 == 39 ) + { + result = std::operator<<>((std::ostream::sentry *)(a3 + 8), "\\x27"); + continue; + } + if ( v4 <= 39 ) + { + if ( v4 == 34 ) + { + result = std::operator<<>((std::ostream::sentry *)(a3 + 8), "\\x22"); + continue; + } + if ( v4 > 34 ) + { + if ( v4 == 38 ) + { + result = std::operator<<>((std::ostream::sentry *)(a3 + 8), "\\x26"); + continue; + } + } + else + { + if ( v4 == 10 ) + { + result = std::operator<<>((std::ostream::sentry *)(a3 + 8), "\\n"); + continue; + } + if ( v4 == 13 ) + { + result = std::operator<<>((std::ostream::sentry *)(a3 + 8), "\\r"); + continue; + } + } + goto LABEL_31; + } + if ( v4 == 62 ) + { + result = std::operator<<>((std::ostream::sentry *)(a3 + 8), "\\x3e"); + continue; + } + if ( v4 <= 62 ) + { + if ( v4 == 60 ) + { + result = std::operator<<>((std::ostream::sentry *)(a3 + 8), "\\x3c"); + continue; + } + if ( v4 == 61 ) + { + result = std::operator<<>((std::ostream::sentry *)(a3 + 8), "\\x3d"); + continue; + } +LABEL_31: + LOBYTE(v7) = *(_BYTE *)(a1 + i); + result = std::__ostream_insert>((std::ostream::sentry *)(a3 + 8), (int)&v7, 1); + continue; + } + if ( v4 != 92 ) + goto LABEL_31; + v6 = *(_BYTE *)(a1 + i + 1); + if ( (unsigned __int8)(v6 - 92) > 0x18u ) + { + if ( v6 == 39 || v6 == 34 ) + { +LABEL_29: + result = std::operator<<>((std::ostream::sentry *)(a3 + 8), "\\"); + continue; + } + } + else if ( (((unsigned int)&unk_1440001 >> (v6 - 92)) & 1) != 0 ) + { + goto LABEL_29; + } + result = std::operator<<>((std::ostream::sentry *)(a3 + 8), "\\x5c"); + } + return result; +} + +//----- (0040647D) -------------------------------------------------------- +std::ostream::sentry *__cdecl WXML::Rewrite::ToStringCode(int *a1, int a2) +{ + return WXML::Rewrite::ToStringCode(*a1, a1[1], a2); +} + +//----- (004064A0) -------------------------------------------------------- +int __cdecl WXML::Rewrite::ToStringCode3[abi:cxx11](int a1, int a2, int a3) +{ + char v3; // al + char *v5; // [esp+4h] [ebp-134h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-120h] + char v7; // [esp+5Fh] [ebp-D9h] BYREF + _BYTE v8[8]; // [esp+60h] [ebp-D8h] BYREF + char v9[4]; // [esp+68h] [ebp-D0h] BYREF + char v10[204]; // [esp+6Ch] [ebp-CCh] BYREF + + std::basic_stringstream,std::allocator>::basic_stringstream((int)v8); + for ( lpuexcpt = 0; (int)lpuexcpt < a3; lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1) ) + { + v3 = *((_BYTE *)lpuexcpt + a2); + if ( v3 == 61 ) + { + v5 = "\\x3d"; + goto LABEL_12; + } + if ( v3 > 61 ) + { + if ( v3 == 62 ) + { + v5 = "\\x3e"; + goto LABEL_12; + } + } + else + { + if ( v3 == 38 ) + { + v5 = "\\x26"; + goto LABEL_12; + } + if ( v3 == 60 ) + { + v5 = "\\x3c"; +LABEL_12: + std::operator<<>((std::ostream::sentry *)v9, v5); + continue; + } + } + v7 = *((_BYTE *)lpuexcpt + a2); + std::__ostream_insert>((std::ostream::sentry *)v9, (int)&v7, 1); + } + std::stringbuf::str(a1, (int)v10); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v8); + return a1; +} +// 4064A0: using guessed type char var_D0[4]; +// 4064A0: using guessed type char var_CC[204]; + +//----- (0040661C) -------------------------------------------------------- +int __cdecl WXML::Rewrite::ToStringCode3(int a1, int *a2) +{ + WXML::Rewrite::ToStringCode3[abi:cxx11](a1, *a2, a2[1]); + return a1; +} + +//----- (00406642) -------------------------------------------------------- +int __cdecl WXML::Rewrite::ToStringCode2[abi:cxx11](int a1, int a2, int a3) +{ + char v3; // al + char *v5; // [esp+4h] [ebp-134h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-120h] + char v7; // [esp+5Fh] [ebp-D9h] BYREF + _BYTE v8[8]; // [esp+60h] [ebp-D8h] BYREF + char v9[4]; // [esp+68h] [ebp-D0h] BYREF + char v10[204]; // [esp+6Ch] [ebp-CCh] BYREF + + std::basic_stringstream,std::allocator>::basic_stringstream((int)v8); + for ( lpuexcpt = 0; (int)lpuexcpt < a3; lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1) ) + { + v3 = *((_BYTE *)lpuexcpt + a2); + if ( v3 == 39 ) + { + v5 = "\\x27"; + goto LABEL_22; + } + if ( v3 > 39 ) + { + if ( v3 == 62 ) + { + v5 = "\\x3e"; + goto LABEL_22; + } + if ( v3 > 62 ) + { + if ( v3 == 92 ) + { + v5 = "\\\\"; + goto LABEL_22; + } + } + else + { + if ( v3 == 60 ) + { + v5 = "\\x3c"; + goto LABEL_22; + } + if ( v3 == 61 ) + { + v5 = "\\x3d"; + goto LABEL_22; + } + } + } + else + { + if ( v3 == 34 ) + { + v5 = "\\x22"; + goto LABEL_22; + } + if ( v3 > 34 ) + { + if ( v3 == 38 ) + { + v5 = "\\x26"; + goto LABEL_22; + } + } + else + { + if ( v3 == 10 ) + { + v5 = "\\n"; + goto LABEL_22; + } + if ( v3 == 13 ) + { + v5 = "\\r"; +LABEL_22: + std::operator<<>((std::ostream::sentry *)v9, v5); + continue; + } + } + } + v7 = *((_BYTE *)lpuexcpt + a2); + std::__ostream_insert>((std::ostream::sentry *)v9, (int)&v7, 1); + } + std::stringbuf::str(a1, (int)v10); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v8); + return a1; +} +// 406642: using guessed type char var_D0[4]; +// 406642: using guessed type char var_CC[204]; + +//----- (0040680E) -------------------------------------------------------- +int __cdecl WXML::Rewrite::ToStringCode2(int a1, int *a2) +{ + WXML::Rewrite::ToStringCode2[abi:cxx11](a1, *a2, a2[1]); + return a1; +} + +//----- (00406834) -------------------------------------------------------- +void __cdecl WXML::Rewrite::ToStringCode(int *a1, int a2) +{ + void *v2; // ecx + _BYTE *v3; // eax + size_t v4; // eax + _BYTE *v5; // edx + int v6; // edx + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-130h] + void *Src; // [esp+58h] [ebp-F0h] BYREF + size_t Size; // [esp+5Ch] [ebp-ECh] + int v10[4]; // [esp+60h] [ebp-E8h] BYREF + char v11[12]; // [esp+70h] [ebp-D8h] BYREF + char v12[200]; // [esp+7Ch] [ebp-CCh] BYREF + + std::basic_stringstream,std::allocator>::basic_stringstream((int)v11); + WXML::Rewrite::ToStringCode(*a1, a1[1], (int)v11); + std::stringbuf::str((int)&Src, (int)v12); + v2 = Src; + v3 = *(_BYTE **)a2; + if ( Src == v10 ) + { + if ( Size ) + std::string::_S_copy(v3, (unsigned __int8 *)Src, Size); + v4 = Size; + v5 = *(_BYTE **)a2; + *(_DWORD *)(a2 + 4) = Size; + v5[v4] = 0; + } + else + { + if ( v3 == (_BYTE *)(a2 + 8) ) + v3 = 0; + else + lpuexcpt = *(struct _Unwind_Exception **)(a2 + 8); + *(_DWORD *)(a2 + 4) = Size; + v6 = v10[0]; + *(_DWORD *)a2 = v2; + *(_DWORD *)(a2 + 8) = v6; + if ( v3 ) + { + Src = v3; + v10[0] = (int)lpuexcpt; + } + else + { + Src = v10; + } + } + Size = 0; + *(_BYTE *)Src = 0; + std::string::_M_dispose(&Src); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v11); +} +// 40694C: variable 'lpuexcpt' is possibly undefined +// 406834: using guessed type char var_CC[200]; + +//----- (004069CD) -------------------------------------------------------- +int __cdecl WXML::Rewrite::ToStringCode(int a1, int *a2) +{ + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + *(_BYTE *)(a1 + 8) = 0; + WXML::Rewrite::ToStringCode(a2, a1); + return a1; +} + +//----- (00406A56) -------------------------------------------------------- +int __thiscall std::string::basic_string(void **this, char *Str) +{ + size_t v2; // eax + size_t v3; // eax + void **v5; // [esp+1Ch] [ebp-Ch] + + *this = this + 2; + v2 = -1; + if ( Str ) + { + v5 = this; + v3 = strlen(Str); + this = v5; + v2 = (size_t)&Str[v3]; + } + return std::string::_M_construct(this, (unsigned __int8 *)Str, v2); +} + +//----- (00406A91) -------------------------------------------------------- +void __cdecl WXML::Rewrite::GetToken(int a1, int a2) +{ + int v2; // eax + int v3; // ecx + _DWORD *v4; // ecx + int v5; // [esp+10h] [ebp-88h] + WXML::RPX *v6; // [esp+14h] [ebp-84h] + int lpuexcpt; // [esp+18h] [ebp-80h] + int v8; // [esp+54h] [ebp-44h] BYREF + bool v9[4]; // [esp+58h] [ebp-40h] BYREF + void *v10[2]; // [esp+5Ch] [ebp-3Ch] BYREF + char v11; // [esp+64h] [ebp-34h] BYREF + int v12; // [esp+74h] [ebp-24h] BYREF + void *v13[8]; // [esp+78h] [ebp-20h] BYREF + + v6 = *(WXML::RPX **)a1; + v2 = *(_DWORD *)(a1 + 4); + while ( 1 ) + { + v5 = v2; + if ( v2 <= 0 ) + break; + v8 = -1; + *(_DWORD *)v9 = v2; + lpuexcpt = WXML::RPX::acceptID(v6, v9); + if ( lpuexcpt ) + { + lpuexcpt = 1; + if ( WXML::RPX::acceptNum(v6, v9) ) + { + lpuexcpt = 2; + if ( WXML::RPX::acceptStr(v6, v9) ) + { + lpuexcpt = 3; + if ( !WXML::RPX::acceptSymbol(v6, (char *)v9, &v8) ) + lpuexcpt = (v8 == 7) + 3; + } + } + } + v10[0] = &v11; + std::string::_M_construct(v10, (unsigned __int8 *)v6, (size_t)v6 + v5 - *(_DWORD *)v9); + v12 = lpuexcpt; + std::string::basic_string(v13, v10); + v3 = *(_DWORD *)(a2 + 4); + if ( v3 == *(_DWORD *)(a2 + 8) ) + { + std::vector>::_M_realloc_insert>( + (void **)a2, + *(char **)(a2 + 4), + &v12); + } + else + { + v4 = (_DWORD *)(v3 + 4); + *(v4 - 1) = v12; + std::string::basic_string(v4, v13); + *(_DWORD *)(a2 + 4) += 28; + } + std::string::_M_dispose(v13); + std::string::_M_dispose(v10); + v2 = *(_DWORD *)v9; + v6 = (WXML::RPX *)((char *)v6 + v5 - *(_DWORD *)v9); + } +} + +//----- (00406C6E) -------------------------------------------------------- +BOOL __cdecl WXML::Rewrite::RewriteRPX(int a1, unsigned int **a2, char *a3, char *Str) +{ + int v4; // eax + int v5; // eax + _DWORD *v6; // eax + _DWORD *v7; // eax + char *v8; // eax + unsigned int v9; // edx + unsigned int v10; // edx + _DWORD *v11; // eax + char v12; // dl + size_t v13; // eax + int v15; // [esp+1Ch] [ebp-DCh] + char *v16; // [esp+1Ch] [ebp-DCh] + char v17; // [esp+23h] [ebp-D5h] + int v18; // [esp+24h] [ebp-D4h] + char *v19; // [esp+24h] [ebp-D4h] + unsigned int lpuexcpt; // [esp+28h] [ebp-D0h] + BOOL lpuexcpta; // [esp+28h] [ebp-D0h] + char *v22; // [esp+6Ch] [ebp-8Ch] BYREF + char *v23; // [esp+70h] [ebp-88h] + int v24; // [esp+74h] [ebp-84h] + void *v25[6]; // [esp+78h] [ebp-80h] BYREF + void *v26[6]; // [esp+90h] [ebp-68h] BYREF + void *v27[2]; // [esp+A8h] [ebp-50h] BYREF + unsigned int v28; // [esp+B0h] [ebp-48h] BYREF + void *v29[2]; // [esp+C0h] [ebp-38h] BYREF + unsigned int v30; // [esp+C8h] [ebp-30h] BYREF + void *v31[7]; // [esp+D8h] [ebp-20h] BYREF + + v22 = 0; + v23 = 0; + v24 = 0; + WXML::Rewrite::GetToken(a1, (int)&v22); + std::string::operator=(a2, (char *)&byte_50F1AA); + v17 = 1; + for ( lpuexcpt = 1; lpuexcpt < -1227133513 * ((v23 - v22) >> 2); ++lpuexcpt ) + { + v4 = 28 * (lpuexcpt - 1); + v18 = v4; + if ( *(_DWORD *)&v22[v4] == 1 + && (v5 = v4 + 28, v15 = v5, !*(_DWORD *)&v22[v5]) + && !std::string::compare((int)&v22[v5 + 4], (char *)off_50F1AB) ) + { + std::string::basic_string(v29, Str); + v16 = &v22[v15 + 4]; + v19 = &v22[v18 + 4]; + std::string::basic_string(v25, a3); + v6 = std::string::append(v25, (int)v19); + std::string::basic_string(v26, v6); + v7 = std::string::append(v26, (int)v16); + std::string::basic_string(v27, v7); + v8 = (char *)v27[1] + (unsigned int)v29[1]; + v9 = 15; + if ( v27[0] != &v28 ) + v9 = v28; + if ( (unsigned int)v8 <= v9 ) + goto LABEL_15; + v10 = 15; + if ( v29[0] != &v30 ) + v10 = v30; + if ( (unsigned int)v8 > v10 ) +LABEL_15: + v11 = std::string::append(v27, (int)v29); + else + v11 = std::string::insert((unsigned int **)v29, 0, (int)v27); + std::string::basic_string(v31, v11); + std::string::operator+=(v31); + std::string::_M_dispose(v31); + std::string::_M_dispose(v27); + std::string::_M_dispose(v26); + std::string::_M_dispose(v25); + std::string::_M_dispose(v29); + v12 = v17; + if ( ++lpuexcpt == -1227133513 * ((v23 - v22) >> 2) ) + v12 = 0; + v17 = v12; + } + else + { + std::string::operator+=(&v22[v18 + 4]); + } + } + if ( v22 != v23 && v17 ) + std::string::operator+=(v23 - 24); + v13 = (size_t)a2[1]; + if ( v13 == *(_DWORD *)(a1 + 4) ) + { + lpuexcpta = 0; + if ( v13 ) + lpuexcpta = memcmp(*a2, *(const void **)a1, v13) != 0; + } + else + { + lpuexcpta = 1; + } + std::vector>::~vector((void **)&v22); + return lpuexcpta; +} +// 405FC0: using guessed type _DWORD __stdcall std::string::operator+=(_DWORD); + +//----- (0040704C) -------------------------------------------------------- +int __cdecl WXML::Rewrite::RewriteImg(int a1, unsigned int **a2, int *a3, int a4, int a5) +{ + char *v5; // eax + std::ostream::sentry *v6; // eax + std::ostream::sentry *v7; // eax + std::ostream::sentry *v8; // eax + std::ostream::sentry *v9; // eax + std::ostream::sentry *v10; // eax + _DWORD *v11; // eax + char v12; // dl + int v14; // [esp+18h] [ebp-160h] + unsigned __int8 v15; // [esp+1Ch] [ebp-15Ch] + std::ostream::sentry *v16; // [esp+1Ch] [ebp-15Ch] + char v17; // [esp+23h] [ebp-155h] + char *Str1; // [esp+24h] [ebp-154h] + char *Str1a; // [esp+24h] [ebp-154h] + unsigned int lpuexcpt; // [esp+28h] [ebp-150h] + char *v21; // [esp+64h] [ebp-114h] BYREF + _BYTE *v22; // [esp+68h] [ebp-110h] + int v23; // [esp+6Ch] [ebp-10Ch] + char *v24; // [esp+70h] [ebp-108h] BYREF + int v25; // [esp+74h] [ebp-104h] + int v26; // [esp+88h] [ebp-F0h] BYREF + int v27; // [esp+8Ch] [ebp-ECh] + char v28; // [esp+90h] [ebp-E8h] BYREF + void *v29[2]; // [esp+A0h] [ebp-D8h] BYREF + char v30[4]; // [esp+A8h] [ebp-D0h] BYREF + char v31[200]; // [esp+ACh] [ebp-CCh] BYREF + + v21 = 0; + v22 = 0; + v23 = 0; + WXML::Rewrite::GetToken(a1, (int)&v21); + std::string::operator=(a2, (char *)&byte_50F1AA); + v17 = 1; + lpuexcpt = 1; + v15 = 0; + while ( lpuexcpt < -1227133513 * ((v22 - v21) >> 2) ) + { + Str1 = (char *)(28 * (lpuexcpt - 1)); + if ( !std::string::compare((int)&Str1[(_DWORD)v21 + 4], (char *)off_50F1C8) + && !std::string::compare((int)&Str1[(_DWORD)v21 + 32], "(") ) + { + std::string::basic_string((void **)&v24, (char *)&byte_50F1AA); + while ( -1227133513 * ((v22 - v21) >> 2) > ++lpuexcpt ) + { + if ( !std::string::compare((int)&v21[28 * lpuexcpt + 4], ")") ) + { + v14 = v25; + for ( Str1a = v24; &v24[v25] - Str1a > 0 && (*Str1a == 32 || *Str1a == 9); ++Str1a ) + ; + if ( !strncmp(Str1a, "http://", 7u) + || !strncmp(Str1a, "https://", 8u) + || !strncmp(Str1a, "//", 2u) + || !strncmp(Str1a, "data:", 5u) ) + { + v27 = 0; + v26 = (int)&v28; + v28 = 0; + std::string::reserve(&v26, v14 + 4); + if ( (unsigned int)(0x3FFFFFFF - v27) <= 3 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&v26, "url(", 4u); + std::string::append(&v26, (int)&v24); + v11 = std::string::append(&v26, ")"); + std::string::basic_string(v29, v11); + std::string::operator+=(v29); + std::string::_M_dispose(v29); + std::string::_M_dispose((void **)&v26); + } + else + { + std::basic_stringstream,std::allocator>::basic_stringstream((int)v29); + v16 = std::operator<<>((std::ostream::sentry *)v30, "url("); + std::string::basic_string((void **)&v26, Str1a); + v6 = std::operator<<(v16, &v26); + v7 = std::operator<<>(v6, "-do-not-use-local-path-"); + v8 = std::operator<<(v7, a3); + std::operator<<>(v8, "&"); + v9 = (std::ostream::sentry *)std::ostream::operator<<(a4); + std::operator<<>(v9, "&"); + v10 = (std::ostream::sentry *)std::ostream::operator<<(a5); + std::operator<<>(v10, ")"); + std::string::_M_dispose((void **)&v26); + std::stringbuf::str((int)&v26, (int)v31); + std::string::operator+=(&v26); + std::string::_M_dispose((void **)&v26); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v29); + v15 = 1; + } + v12 = v17; + if ( ++lpuexcpt == -1227133513 * ((v22 - v21) >> 2) ) + v12 = 0; + v17 = v12; + break; + } + v5 = &v21[28 * lpuexcpt]; + if ( *(_DWORD *)v5 != 4 ) + { + if ( *(_DWORD *)v5 == 2 ) + { + std::string::substr(v29, (_DWORD *)v5 + 1, 1u, *((_DWORD *)v5 + 2) - 2); + std::string::operator+=(v29); + std::string::_M_dispose(v29); + } + else + { + std::string::operator+=(v5 + 4); + } + } + } + std::string::_M_dispose((void **)&v24); + } + else + { + std::string::operator+=(&Str1[(_DWORD)v21 + 4]); + } + ++lpuexcpt; + } + if ( v22 != v21 && v17 ) + std::string::operator+=(v22 - 24); + std::vector>::~vector((void **)&v21); + return v15; +} +// 405FC0: using guessed type _DWORD __stdcall std::string::operator+=(_DWORD); +// 4A2900: using guessed type _DWORD __stdcall std::ostream::operator<<(_DWORD); +// 40704C: using guessed type char var_D0[4]; +// 40704C: using guessed type char var_CC[200]; + +//----- (004076D8) -------------------------------------------------------- +int __thiscall std::string::_M_construct(void **this, unsigned __int8 *Src, size_t Size) +{ + int result; // eax + int v5; // edx + int v6[7]; // [esp+1Ch] [ebp-1Ch] BYREF + + if ( !Src && Size ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v6[0] = Size - (_DWORD)Src; + if ( Size - (unsigned int)Src > 0xF ) + { + *this = std::string::_M_create((unsigned int *)v6, 0); + this[2] = (void *)v6[0]; + } + std::string::_S_copy_chars(*this, Src, Size); + result = v6[0]; + v5 = (int)*this; + this[1] = (void *)v6[0]; + *(_BYTE *)(v5 + result) = 0; + return result; +} +// 4076D8: using guessed type unsigned int var_1C[7]; + +//----- (00407750) -------------------------------------------------------- +int __thiscall std::string::basic_string(void **this, char *Str) +{ + size_t v2; // eax + size_t v3; // eax + void **v5; // [esp+1Ch] [ebp-Ch] + + *this = this + 2; + v2 = -1; + if ( Str ) + { + v5 = this; + v3 = strlen(Str); + this = v5; + v2 = (size_t)&Str[v3]; + } + return std::string::_M_construct(this, (unsigned __int8 *)Str, v2); +} + +//----- (0040778B) -------------------------------------------------------- +std::ostream::sentry *__cdecl WXML::RenderStrToken(_DWORD *a1, int a2) +{ + std::ostream::sentry *result; // eax + std::ostream::sentry *v3; // eax + std::ostream::sentry *v4; // eax + char *v5; // [esp+24h] [ebp+Ch] + + result = (std::ostream::sentry *)a2; + if ( *a1 ) + { + if ( *a1 != 1 ) + return result; + v4 = std::operator<<>((std::ostream::sentry *)(a2 + 8), "\""); + v3 = std::operator<<(v4, a1 + 1); + v5 = "\","; + } + else + { + v3 = std::operator<<((std::ostream::sentry *)(a2 + 8), a1 + 1); + v5 = ","; + } + return std::operator<<>(v3, v5); +} + +//----- (004077F8) -------------------------------------------------------- +char __cdecl WXML::IsFloat(WXML *this) +{ + int v1; // edx + char v2; // cl + char v3; // al + + v1 = ((*(_BYTE *)this - 43) & 0xFD) == 0; + v2 = 0; + while ( 1 ) + { + v3 = *((_BYTE *)this + v1); + if ( !v3 ) + return 1; + if ( v3 != 46 ) + break; + if ( v2 ) + return 0; + v2 = 1; +LABEL_7: + ++v1; + } + if ( (unsigned __int8)(v3 - 48) <= 9u ) + goto LABEL_7; + return 0; +} + +//----- (00407833) -------------------------------------------------------- +char __cdecl WXML::IsFloat(int a1) +{ + if ( *(_DWORD *)(a1 + 4) ) + return WXML::IsFloat(*(WXML **)a1); + else + return 0; +} + +//----- (0040784B) -------------------------------------------------------- +void __cdecl WXML::StrSplitList4RPX(char *a1, char *Str, char *SubStr, void **a4) +{ + char *v4; // eax + _DWORD *v5; // eax + size_t v6; // [esp+1Ch] [ebp-BCh] + size_t v7; // [esp+20h] [ebp-B8h] + char *Size; // [esp+24h] [ebp-B4h] + char *lpuexcpt; // [esp+28h] [ebp-B0h] + void *v10; // [esp+6Ch] [ebp-6Ch] BYREF + size_t v11; // [esp+70h] [ebp-68h] + char v12; // [esp+74h] [ebp-64h] BYREF + char *v13; // [esp+84h] [ebp-54h] BYREF + int v14; // [esp+88h] [ebp-50h] + char v15; // [esp+8Ch] [ebp-4Ch] BYREF + void *v16[2]; // [esp+9Ch] [ebp-3Ch] BYREF + char v17[16]; // [esp+A4h] [ebp-34h] BYREF + int v18; // [esp+B4h] [ebp-24h] BYREF + void *v19[8]; // [esp+B8h] [ebp-20h] BYREF + + if ( SubStr != 0 && Str != 0 && a1 ) + { + v7 = strlen(Str); + v6 = strlen(SubStr); + while ( 1 ) + { + v4 = strstr(a1, Str); + lpuexcpt = v4; + if ( !v4 ) + break; + if ( a1 != v4 ) + { + v16[0] = v17; + std::string::_M_construct(v16, (unsigned __int8 *)a1, (size_t)v4); + v18 = 1; + std::string::basic_string(v19, v16); + std::vector>::emplace_back>( + a4, + &v18); + std::string::_M_dispose(v19); + std::string::_M_dispose(v16); + } + a1 = &lpuexcpt[v7]; + Size = strstr(&lpuexcpt[v7], SubStr); + if ( !Size ) + { + std::string::basic_string(v16, lpuexcpt); + v18 = 1; + std::string::basic_string(v19, v16); + std::vector>::emplace_back>( + a4, + &v18); + goto LABEL_17; + } + v10 = &v12; + std::string::_M_construct(&v10, (unsigned __int8 *)a1, (size_t)Size); + if ( WXML::IsFloat((int)&v10) ) + { + v14 = 0; + v13 = &v15; + v15 = 0; + std::string::reserve(&v13, v11 + 3); + if ( (unsigned int)(0x3FFFFFFF - v14) <= 2 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&v13, "[0,", 3u); + std::string::_M_append(&v13, v10, v11); + v5 = std::string::append(&v13, "]"); + std::string::basic_string(v16, v5); + v18 = 0; + std::string::basic_string(v19, v16); + std::vector>::emplace_back>( + a4, + &v18); + std::string::_M_dispose(v19); + std::string::_M_dispose(v16); + std::string::_M_dispose((void **)&v13); + a1 = &Size[v6]; + } + else + { + v16[0] = v17; + std::string::_M_construct(v16, (unsigned __int8 *)lpuexcpt, (size_t)a1); + v18 = 1; + std::string::basic_string(v19, v16); + std::vector>::emplace_back>( + a4, + &v18); + std::string::_M_dispose(v19); + std::string::_M_dispose(v16); + } + std::string::_M_dispose(&v10); + } + if ( !*a1 ) + return; + std::string::basic_string(v16, a1); + v18 = 1; + std::string::basic_string(v19, v16); + std::vector>::emplace_back>(a4, &v18); +LABEL_17: + std::string::_M_dispose(v19); + std::string::_M_dispose(v16); + } +} + +//----- (00407C6A) -------------------------------------------------------- +void __cdecl WXML::StrSplitList4ClassSuffix(char *a1, char *Str, void **a3) +{ + char *v3; // eax + size_t i; // [esp+14h] [ebp-84h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-80h] + void *v6[2]; // [esp+5Ch] [ebp-3Ch] BYREF + char v7; // [esp+64h] [ebp-34h] BYREF + int v8; // [esp+74h] [ebp-24h] BYREF + void *v9[8]; // [esp+78h] [ebp-20h] BYREF + + if ( a1 && Str ) + { + for ( i = strlen(Str); ; a1 = (char *)lpuexcpt + i ) + { + v3 = strstr(a1, Str); + lpuexcpt = (struct _Unwind_Exception *)v3; + if ( !v3 ) + break; + if ( a1 != v3 ) + { + v6[0] = &v7; + std::string::_M_construct(v6, (unsigned __int8 *)a1, (size_t)v3); + v8 = 1; + std::string::basic_string(v9, v6); + std::vector>::emplace_back>(a3, &v8); + std::string::_M_dispose(v9); + std::string::_M_dispose(v6); + } + v8 = 0; + std::string::basic_string(v9, (char *)off_50F2CC); + std::vector>::emplace_back>(a3, &v8); + std::string::_M_dispose(v9); + } + if ( *a1 ) + { + std::string::basic_string(v6, a1); + v8 = 1; + std::string::basic_string(v9, v6); + std::vector>::emplace_back>(a3, &v8); + std::string::_M_dispose(v9); + std::string::_M_dispose(v6); + } + } +} + +//----- (00407E33) -------------------------------------------------------- +void __cdecl WXML::GetStrForMakingCSS(char **a1, int a2) +{ + char *v2; // eax + _DWORD *v3; // eax + char *v4; // eax + unsigned int i; // [esp+14h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + int v7; // [esp+58h] [ebp-20h] BYREF + int v8; // [esp+5Ch] [ebp-1Ch] + int v9; // [esp+60h] [ebp-18h] + int v10; // [esp+64h] [ebp-14h] BYREF + int v11; // [esp+68h] [ebp-10h] + int v12; // [esp+6Ch] [ebp-Ch] + + v2 = *a1; + v7 = 0; + v8 = 0; + v9 = 0; + WXML::StrSplitList4RPX(v2, "%%?", "rpx?%%", (void **)&v7); + for ( lpuexcpt = 0; + -1227133513 * ((v8 - v7) >> 2) > (unsigned int)lpuexcpt; + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1) ) + { + v3 = (_DWORD *)(v7 + 28 * (_DWORD)lpuexcpt); + if ( *v3 == 1 ) + { + v4 = (char *)v3[1]; + v10 = 0; + v11 = 0; + v12 = 0; + WXML::StrSplitList4ClassSuffix(v4, "%%HERESUFFIX%%", (void **)&v10); + for ( i = 0; -1227133513 * ((v11 - v10) >> 2) > i; ++i ) + WXML::RenderStrToken((_DWORD *)(28 * i + v10), a2); + std::vector>::~vector((void **)&v10); + } + else if ( !*v3 ) + { + WXML::RenderStrToken(v3, a2); + } + } + std::vector>::~vector((void **)&v7); +} + +//----- (00407FB8) -------------------------------------------------------- +void __tcf_1_1(void) +{ + std::ios_base::Init::~Init(); +} + +//----- (00407FC2) -------------------------------------------------------- +unsigned __int8 *__thiscall std::string::operator=(unsigned __int8 **this, int a2) +{ + unsigned __int8 **v3; // eax + unsigned __int8 *v4; // ecx + unsigned __int8 *v5; // edx + unsigned __int8 *v6; // eax + unsigned __int8 **v7; // edx + unsigned __int8 *result; // eax + unsigned __int8 *v9; // [esp+18h] [ebp-20h] + + v3 = (unsigned __int8 **)*this; + v4 = *(unsigned __int8 **)a2; + v5 = *(unsigned __int8 **)(a2 + 4); + if ( *(_DWORD *)a2 == a2 + 8 ) + { + if ( v5 ) + std::string::_S_copy(v3, v4, *(_DWORD *)(a2 + 4)); + v6 = *(unsigned __int8 **)(a2 + 4); + v7 = (unsigned __int8 **)*this; + this[1] = v6; + v6[(_DWORD)v7] = 0; + } + else + { + if ( v3 == this + 2 ) + v3 = 0; + else + v9 = this[2]; + *this = v4; + this[1] = v5; + this[2] = *(unsigned __int8 **)(a2 + 8); + if ( v3 ) + { + *(_DWORD *)a2 = v3; + *(_DWORD *)(a2 + 8) = v9; + } + else + { + *(_DWORD *)a2 = a2 + 8; + } + } + result = *(unsigned __int8 **)a2; + *(_DWORD *)(a2 + 4) = 0; + *result = 0; + return result; +} +// 408029: variable 'v9' is possibly undefined + +//----- (0040804A) -------------------------------------------------------- +int __thiscall std::string::basic_string(void **this, char *Str) +{ + char *v3; // edi + int result; // eax + int v5; // edx + int v6[7]; // [esp+1Ch] [ebp-1Ch] BYREF + + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v6[0] = strlen(Str); + v3 = &Str[v6[0]]; + if ( v6[0] > 0xFu ) + { + *this = std::string::_M_create((unsigned int *)v6, 0); + this[2] = (void *)v6[0]; + } + std::string::_S_copy_chars(*this, (unsigned __int8 *)Str, (size_t)v3); + result = v6[0]; + v5 = (int)*this; + this[1] = (void *)v6[0]; + *(_BYTE *)(v5 + result) = 0; + return result; +} +// 40804A: using guessed type size_t var_1C[7]; + +//----- (004080C8) -------------------------------------------------------- +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str) +{ + size_t v2; // eax + + v2 = strlen(Str); + return std::string::_M_replace(this, 0, (size_t)this[1], Str, v2); +} + +//----- (00408106) -------------------------------------------------------- +_DWORD *__thiscall std::string::operator+=(_DWORD *this, char *Str) +{ + unsigned int v2; // eax + + v2 = strlen(Str); + if ( v2 > 0x3FFFFFFF - this[1] ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + return std::string::_M_append(this, Str, v2); +} + +//----- (0040814C) -------------------------------------------------------- +void __thiscall std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(int *this, int a2) +{ + *this = a2; + if ( a2 ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy(a2); +} + +//----- (00408166) -------------------------------------------------------- +void __usercall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase( + int a1@) +{ + void **v2; // esi + char *v3; // edi + volatile signed __int32 **v4; // ecx + char *v5; // [esp+10h] [ebp-28h] + char **v6; // [esp+14h] [ebp-24h] + int v7; // [esp+1Ch] [ebp-1Ch] + + while ( a1 ) + { + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(*(_DWORD *)(a1 + 12)); + v2 = *(void ***)(a1 + 40); + v7 = *(_DWORD *)(a1 + 8); + v6 = *(char ***)(a1 + 44); + while ( v6 != (char **)v2 ) + { + v3 = (char *)*v2; + v5 = (char *)v2[1]; + while ( v5 != v3 ) + { + v4 = (volatile signed __int32 **)(v3 + 4); + v3 += 8; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v4); + } + if ( *v2 ) + operator delete(*v2); + v2 += 3; + } + if ( *(_DWORD *)(a1 + 40) ) + operator delete(*(void **)(a1 + 40)); + std::string::_M_dispose((void **)(a1 + 16)); + operator delete((void *)a1); + a1 = v7; + } +} + +//----- (004081F0) -------------------------------------------------------- +void __usercall std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_erase( + _DWORD *a1@) +{ + _DWORD *v2; // esi + _DWORD *v3; // [esp+0h] [ebp-18h] + + while ( a1 ) + { + std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_erase((_DWORD *)a1[3]); + v2 = (_DWORD *)a1[2]; + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(a1[7]); + v3 = a1; + a1 = v2; + operator delete(v3); + } +} + +//----- (00408224) -------------------------------------------------------- +void __tcf_0(void) +{ + std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_erase((_DWORD *)dword_50CBE4); +} +// 50CBE4: using guessed type int dword_50CBE4; + +//----- (0040822C) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::CSSSyntaxTree::~CSSSyntaxTree(int a1) +{ + int v2; // edi + int i; // esi + volatile signed __int32 **v4; // ecx + + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 160)); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 152)); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 144)); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 136)); + v2 = *(_DWORD *)(a1 + 124); + for ( i = *(_DWORD *)(a1 + 120); v2 != i; i += 8 ) + { + v4 = (volatile signed __int32 **)(i + 4); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v4); + } + if ( *(_DWORD *)(a1 + 120) ) + operator delete(*(void **)(a1 + 120)); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 32)); + std::string::_M_dispose((void **)a1); +} + +//----- (0040829F) -------------------------------------------------------- +_DWORD *__usercall std::__relocate_a_1>@( + _DWORD *a1@, + _DWORD *a2@, + _DWORD *a3@) +{ + int v4; // esi + _DWORD *v5; // edi + int *v6; // ecx + _DWORD *v8; // [esp+18h] [ebp-20h] + + while ( a1 != a2 ) + { + v4 = a1[2]; + v8 = a1; + v5 = a3 + 7; + *a3 = *a1; + a3[1] = a1[1]; + v6 = a3 + 2; + a3 += 23; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(v6, v4); + *(a3 - 20) = v8[3]; + *(a3 - 19) = v8[4]; + *(a3 - 18) = v8[5]; + *(a3 - 17) = v8[6]; + qmemcpy(v5, v8 + 7, 0x40u); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)v8 + 2); + a1 = v8 + 23; + } + return a3; +} + +//----- (00408314) -------------------------------------------------------- +void __thiscall std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( + volatile signed __int32 **this, + volatile signed __int32 *a2) +{ + if ( *this != a2 ) + { + if ( a2 ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy((int)a2); + if ( *this ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*this); + *this = a2; + } +} + +//----- (00408340) -------------------------------------------------------- +int __thiscall WXSS::CSSTreeLib::Parser::Parse(int this, char **a2, int *a3, unsigned int **a4, int a5) +{ + int v5; // eax + int v6; // ecx + _DWORD *v7; // eax + _DWORD *v8; // eax + _DWORD *v9; // edi + volatile signed __int32 *v10; // eax + int v11; // edx + int v12; // ecx + volatile signed __int32 *v13; // edx + _DWORD *v14; // eax + volatile signed __int32 *v15; // eax + int v16; // edx + int v17; // ecx + volatile signed __int32 *v18; // edx + volatile signed __int32 *v19; // eax + int *v20; // edi + char *v21; // edx + char *v22; // ecx + int v23; // ecx + int v24; // esi + int v25; // eax + int v26; // eax + int v27; // eax + _DWORD *v28; // edi + volatile signed __int32 **v29; // ecx + int i; // eax + int v31; // eax + volatile signed __int32 **v32; // ecx + std::ostream::sentry *v33; // eax + std::ostream::sentry *v34; // eax + std::ostream::sentry *v35; // eax + char *v36; // ecx + std::ostream::sentry *v37; // eax + std::ostream::sentry *v38; // eax + std::ostream::sentry *v39; // eax + std::ostream::sentry *v40; // edx + char *v41; // eax + char **v42; // ecx + std::ostream::sentry *v43; // eax + int *v44; // eax + int *v45; // eax + void **v46; // ecx + _DWORD *v47; // eax + int *v48; // eax + int v49; // edx + int v50; // eax + int v51; // edx + int v52; // edx + _DWORD *v53; // eax + _DWORD *v54; // ecx + bool v55; // sf + char *v56; // eax + char *v57; // edx + char *v58; // eax + std::ostream::sentry *v59; // eax + std::ostream::sentry *v60; // eax + std::ostream::sentry *v61; // eax + std::ostream::sentry *v62; // edx + char *v63; // eax + char **v64; // ecx + std::ostream::sentry *v65; // eax + int v66; // esi + int v67; // ecx + int *v68; // eax + int v69; // edx + volatile signed __int32 *v70; // eax + volatile signed __int32 *v72; // [esp+0h] [ebp-278h] + int v73; // [esp+0h] [ebp-278h] + int v74; // [esp+4h] [ebp-274h] + unsigned int v75; // [esp+20h] [ebp-258h] + int v76; // [esp+24h] [ebp-254h] + char *v77; // [esp+24h] [ebp-254h] + _DWORD *v78; // [esp+28h] [ebp-250h] + char *v79; // [esp+2Ch] [ebp-24Ch] + int Tokens; // [esp+30h] [ebp-248h] + void *v81; // [esp+34h] [ebp-244h] + void *v82; // [esp+3Ch] [ebp-23Ch] + _DWORD *v83; // [esp+3Ch] [ebp-23Ch] + char *v84; // [esp+3Ch] [ebp-23Ch] + char *j; // [esp+3Ch] [ebp-23Ch] + int *v86; // [esp+3Ch] [ebp-23Ch] + char *v87; // [esp+3Ch] [ebp-23Ch] + char *Str; // [esp+40h] [ebp-238h] + char *Stra; // [esp+40h] [ebp-238h] + char *Strb; // [esp+40h] [ebp-238h] + char *Strc; // [esp+40h] [ebp-238h] + struct _Unwind_Exception *lpuexcpte; // [esp+48h] [ebp-230h] + struct _Unwind_Exception *lpuexcpt; // [esp+48h] [ebp-230h] + struct _Unwind_Exception *lpuexcptf; // [esp+48h] [ebp-230h] + struct _Unwind_Exception *lpuexcptg; // [esp+48h] [ebp-230h] + struct _Unwind_Exception *lpuexcpta; // [esp+48h] [ebp-230h] + struct _Unwind_Exception *lpuexcpth; // [esp+48h] [ebp-230h] + struct _Unwind_Exception *lpuexcptb; // [esp+48h] [ebp-230h] + struct _Unwind_Exception *lpuexcptc; // [esp+48h] [ebp-230h] + int lpuexcptd; // [esp+48h] [ebp-230h] + struct _Unwind_Exception *v102; // [esp+80h] [ebp-1F8h] BYREF + volatile signed __int32 *v103; // [esp+84h] [ebp-1F4h] BYREF + struct _Unwind_Exception *v104; // [esp+88h] [ebp-1F0h] BYREF + volatile signed __int32 *v105; // [esp+8Ch] [ebp-1ECh] BYREF + int v106; // [esp+90h] [ebp-1E8h] + volatile signed __int32 *v107; // [esp+94h] [ebp-1E4h] BYREF + int v108; // [esp+98h] [ebp-1E0h] + volatile signed __int32 *v109; // [esp+9Ch] [ebp-1DCh] BYREF + char *v110; // [esp+A0h] [ebp-1D8h] + volatile signed __int32 *v111; // [esp+A4h] [ebp-1D4h] BYREF + _DWORD *v112; // [esp+A8h] [ebp-1D0h] + volatile signed __int32 *v113; // [esp+ACh] [ebp-1CCh] BYREF + int v114; // [esp+B0h] [ebp-1C8h] + volatile signed __int32 *v115; // [esp+B4h] [ebp-1C4h] BYREF + char *v116; // [esp+B8h] [ebp-1C0h] + volatile signed __int32 *v117; // [esp+BCh] [ebp-1BCh] BYREF + char *v118; // [esp+C0h] [ebp-1B8h] BYREF + char *v119; // [esp+C4h] [ebp-1B4h] + char *v120; // [esp+C8h] [ebp-1B0h] + char v121[24]; // [esp+CCh] [ebp-1ACh] BYREF + char v122[24]; // [esp+E4h] [ebp-194h] BYREF + struct _Unwind_Exception *v123; // [esp+FCh] [ebp-17Ch] BYREF + volatile signed __int32 *v124[5]; // [esp+100h] [ebp-178h] BYREF + void *v125[6]; // [esp+114h] [ebp-164h] BYREF + void *v126; // [esp+12Ch] [ebp-14Ch] BYREF + int v127; // [esp+144h] [ebp-134h] BYREF + volatile signed __int32 *v128; // [esp+148h] [ebp-130h] BYREF + volatile signed __int32 *v129; // [esp+14Ch] [ebp-12Ch] BYREF + int v130; // [esp+150h] [ebp-128h] + int v131; // [esp+154h] [ebp-124h] + int v132; // [esp+158h] [ebp-120h] + int v133; // [esp+15Ch] [ebp-11Ch] + char v134[64]; // [esp+160h] [ebp-118h] BYREF + _DWORD *v135; // [esp+1A0h] [ebp-D8h] BYREF + volatile signed __int32 *v136; // [esp+1A4h] [ebp-D4h] BYREF + char v137[4]; // [esp+1A8h] [ebp-D0h] BYREF + char v138[204]; // [esp+1ACh] [ebp-CCh] BYREF + + WXSS::Tokenizer::Tokenizer((int)v125, *a2, (int)a3); + v118 = 0; + v119 = 0; + v120 = 0; + Tokens = WXSS::Tokenizer::GetTokens((int *)v125, (int)&v118, a4, -1); + if ( Tokens ) + goto LABEL_107; + while ( *(_DWORD *)(this + 16) != *(_DWORD *)(this + 32) ) + std::deque>::pop_back((_DWORD *)(this + 8)); + while ( *(_DWORD *)(this + 56) != *(_DWORD *)(this + 72) ) + std::deque>::pop_back((_DWORD *)(this + 48)); + if ( !(_BYTE)`guard variable for'WXSS::CSSTreeLib::TransitTable::GetInstance(void)::ret + && __cxa_guard_acquire(&`guard variable for'WXSS::CSSTreeLib::TransitTable::GetInstance(void)::ret) ) + { + dword_50CBE0 = 0; + dword_50CBE4 = 0; + dword_50CBE8 = (int)&dword_50CBE0; + dword_50CBEC = (int)&dword_50CBE0; + dword_50CBF0 = 0; + byte_50CBF4 = 0; + __cxa_guard_release(&`guard variable for WXSS::CSSTreeLib::TransitTable::GetInstance(void)::ret); + atexit(__tcf_0); + } + WXSS::CSSTreeLib::TransitTable::Init((int)&WXSS::CSSTreeLib::TransitTable::GetInstance(void)::ret); + lpuexcpte = (struct _Unwind_Exception *)operator new(0xB0u); + WXSS::CSSTreeLib::CSSSyntaxTree::CSSSyntaxTree((int)lpuexcpte); + zcc::shared_ptr::shared_ptr(lpuexcpte); + *(_DWORD *)this = v127; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=((volatile signed __int32 **)(this + 4), v128); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v128); + std::string::operator=(*(unsigned int ***)this, "RULES"); + lpuexcpt = (struct _Unwind_Exception *)v119; + if ( v118 == v119 ) + goto LABEL_107; + v132 = 0; + v133 = 0; + v134[0] = 0; + v130 = 0; + v131 = 0; + v5 = *((_DWORD *)v119 - 18); + v128 = 0; + v132 = v5; + v129 = 0; + v127 = 8; + v133 = *((_DWORD *)v119 - 17); + if ( v119 == v120 ) + { + std::vector::_M_realloc_insert(&v118, v119, &v127); + v74 = v6; + } + else + { + *(_DWORD *)v119 = 8; + *((_DWORD *)lpuexcpt + 1) = v128; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count((int *)lpuexcpt + 2, (int)v129); + *((_DWORD *)lpuexcpt + 3) = v130; + v119 += 92; + *((_DWORD *)lpuexcpt + 4) = v131; + *((_DWORD *)lpuexcpt + 5) = v132; + *((_DWORD *)lpuexcpt + 6) = v133; + qmemcpy((char *)lpuexcpt + 28, v134, 0x40u); + } + v7 = operator new(0x78u); + *v7 = &off_519B58; + v7[1] = v7 + 3; + v7[2] = 0; + *((_BYTE *)v7 + 12) = 0; + v7[8] = 0; + v7[9] = 0; + *((_BYTE *)v7 + 56) = 0; + v7[7] = 1; + v7[10] = 0; + v7[11] = 0; + v7[12] = 0; + v7[13] = 0; + zcc::shared_ptr::shared_ptr(&v102, (int)v7); + lpuexcptf = v102; + std::string::basic_string((void **)&v135, "$"); + std::string::_M_assign((int)lpuexcptf + 4, (int)&v135); + std::string::_M_dispose((void **)&v135); + v78 = (_DWORD *)(this + 8); + std::deque>::push_back(this + 8, (int *)&v102); + v8 = operator new(8u); + *v8 = &off_519A44; + v8[1] = 0; + zcc::shared_ptr::shared_ptr(&v104, (int)v8); + lpuexcptg = v104; + *((_DWORD *)lpuexcptg + 1) = WXSS::CSSTreeLib::TransitTable::GetTopType(); + std::deque>::push_back(this + 8, (int *)&v104); + v9 = operator new(0x48u); + v106 = 0; + memset(v9, 0, 0x48u); + v107 = 0; + v112 = v9; + v113 = 0; + *v9 = v9 + 2; + v9[6] = v9 + 8; + v9[12] = v9 + 14; + v10 = (volatile signed __int32 *)operator new(0x10u); + v11 = (int)v112; + *((_DWORD *)v10 + 1) = 1; + v12 = v106; + *((_DWORD *)v10 + 2) = 1; + *v10 = (volatile signed __int32)&off_51AD2C; + *((_DWORD *)v10 + 3) = v9; + v106 = v11; + v13 = v107; + v112 = (_DWORD *)v12; + v107 = v10; + v113 = v13; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v113); + std::string::_M_assign(v106, (int)a3); + std::string::_M_assign(v106 + 24, a5); + v14 = operator new(0x5Cu); + v14[1] = 0; + v14[2] = 0; + *((_BYTE *)v14 + 28) = 0; + *v14 = 1; + v14[3] = 0; + v14[4] = 0; + v14[5] = 0; + v14[6] = 0; + v81 = v14; + v108 = 0; + v109 = 0; + v114 = (int)v14; + v115 = 0; + v15 = (volatile signed __int32 *)operator new(0x10u); + v16 = v114; + *((_DWORD *)v15 + 1) = 1; + v17 = v108; + *((_DWORD *)v15 + 2) = 1; + *v15 = (volatile signed __int32)&off_51AD9C; + *((_DWORD *)v15 + 3) = v81; + v108 = v16; + v18 = v109; + v114 = v17; + v109 = v15; + v115 = v18; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v115); + *(_DWORD *)(v108 + 12) = -1; + v79 = (char *)operator new(0x18u); + std::string::basic_string(v79, (int)a3); + v110 = 0; + v111 = 0; + v116 = v79; + v117 = 0; + v19 = (volatile signed __int32 *)operator new(0x10u); + v20 = (int *)v79; + v21 = v116; + *((_DWORD *)v19 + 1) = 1; + v22 = v110; + *((_DWORD *)v19 + 2) = 1; + *v19 = (volatile signed __int32)&off_51ADB8; + *((_DWORD *)v19 + 3) = v79; + v110 = v21; + v116 = v22; + v117 = v111; + v111 = v19; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v117); + v23 = v108; + *(_DWORD *)(v108 + 4) = v110; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=((volatile signed __int32 **)(v23 + 8), v111); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v111); + v116 = 0; + v117 = 0; + v75 = 0; + while ( 1 ) + { + v24 = this; + v25 = *(_DWORD *)(this + 32); + if ( *(_DWORD *)(this + 16) == v25 || v75 >= -373475417 * ((v119 - v118) >> 2) ) + break; + if ( v25 == *(_DWORD *)(this + 36) ) + v25 = *(_DWORD *)(*(_DWORD *)(this + 44) - 4) + 512; + v72 = *(volatile signed __int32 **)(v25 - 4); + v116 = *(char **)(v25 - 8); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(&v117, v72); + lpuexcpta = (struct _Unwind_Exception *)&v118[92 * v75]; + switch ( *(_DWORD *)lpuexcpta ) + { + case 1: + Str = (char *)lpuexcpta + 28; + break; + case 2: + Str = "$VALUE"; + break; + case 3: + Str = "$STRING"; + break; + case 4: + Str = "$NAME"; + break; + case 5: + Str = (char *)&off_50F38C; + break; + case 6: + Str = "$MULTI_EXPR"; + break; + case 7: + Str = "$$"; + break; + case 9: + Str = "$ESV"; + break; + default: + Str = "$"; + break; + } + if ( (*(int (__thiscall **)(char *, int, int))(*(_DWORD *)v116 + 8))(v116, v26, v74) == 1 ) + { + v27 = *((_DWORD *)v116 + 1); + if ( *Str != *(_BYTE *)v27 || strcmp(Str + 1, (const char *)(v27 + 1)) ) + { + std::basic_stringstream,std::allocator>::basic_stringstream((int)&v135); + if ( *Str != 36 || Str[1] ) + { + v37 = std::operator<<((std::ostream::sentry *)v137, a3); + std::operator<<>(v37, "("); + v38 = (std::ostream::sentry *)std::ostream::operator<<(*((_DWORD *)lpuexcpta + 5)); + std::operator<<>(v38, ":"); + v39 = (std::ostream::sentry *)std::ostream::operator<<(*((_DWORD *)lpuexcpta + 6)); + v40 = std::operator<<>(v39, "): error at token `"); + v41 = (char *)lpuexcpta + 28; + if ( *(_DWORD *)lpuexcpta != 1 ) + { + v41 = "$"; + if ( *(_DWORD *)lpuexcpta != 8 ) + { + v42 = (char **)*((_DWORD *)lpuexcpta + 1); + v41 = "UNKNOWN"; + if ( v42 ) + v41 = *v42; + } + } + v43 = std::operator<<>(v40, v41); + std::operator<<>(v43, "`"); + std::stringbuf::str((int)v122, (int)v138); + std::string::operator=((unsigned __int8 **)a4, (int)v122); + v36 = v122; + } + else + { + v33 = std::operator<<((std::ostream::sentry *)v137, a3); + std::operator<<>(v33, "("); + v34 = (std::ostream::sentry *)std::ostream::operator<<(*((_DWORD *)lpuexcpta + 5)); + std::operator<<>(v34, ":"); + v35 = (std::ostream::sentry *)std::ostream::operator<<(*((_DWORD *)lpuexcpta + 6)); + std::operator<<>(v35, "): unexpected end of input or bad input"); + std::stringbuf::str((int)v121, (int)v138); + std::string::operator=((unsigned __int8 **)a4, (int)v121); + v36 = v121; + } +LABEL_48: + std::string::_M_dispose((void **)v36); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)&v135); + Tokens = -1; + goto LABEL_106; + } + ++v75; + std::deque>::pop_back(v78); + if ( *Str != 36 || Str[1] ) + { + v82 = operator new(0xB0u); + WXSS::CSSTreeLib::CSSSyntaxTree::CSSSyntaxTree((int)v82); + zcc::shared_ptr::shared_ptr(v82); + v83 = v135; + v28 = v135; + v29 = (volatile signed __int32 **)(v135 + 8); + v135[6] = *(_DWORD *)lpuexcpta; + v28[7] = *((_DWORD *)lpuexcpta + 1); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(v29, *((volatile signed __int32 **)lpuexcpta + 2)); + v83[9] = *((_DWORD *)lpuexcpta + 3); + v83[10] = *((_DWORD *)lpuexcpta + 4); + v83[11] = *((_DWORD *)lpuexcpta + 5); + v83[12] = *((_DWORD *)lpuexcpta + 6); + for ( i = 0; i != 64; ++i ) + *((_BYTE *)v83 + i + 52) = *((_BYTE *)lpuexcpta + i + 28); + std::string::operator=((unsigned int **)v83, Str); + v31 = *((_DWORD *)lpuexcpta + 3); + v83[41] = v31; + v83[42] = *((_DWORD *)lpuexcpta + 4) + v31; + v83[37] = v106; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=((volatile signed __int32 **)v83 + 38, v107); + v20 = v83; + v83[39] = v108; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=((volatile signed __int32 **)v83 + 40, v109); + std::deque>::push_back(this + 48, (int *)&v135); + v32 = &v136; + goto LABEL_59; + } + } + else if ( (*(int (__fastcall **)(char *))(*(_DWORD *)v116 + 8))(v116) == 3 ) + { + std::deque>::pop_back(v78); + v84 = v116; + v76 = *((_DWORD *)v116 + 7); + if ( v76 == 2 ) + { + v20 = *(int **)(this + 56); + if ( *(int **)(this + 72) == v20 ) + { + std::string::operator=(a4, "interal error: "); + std::string::operator+=(a4, "1001"); + Tokens = 1001; + goto LABEL_106; + } + v44 = (int *)std::deque>::back((_DWORD *)(this + 48)); + std::__shared_ptr::__shared_ptr((int *)&v123, v44); + std::deque>::pop_back((_DWORD *)(this + 48)); + if ( *(_DWORD *)(this + 72) == *(_DWORD *)(this + 56) ) + { + std::string::operator=(a4, "interal error: "); + std::string::operator+=(a4, "1002"); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v124); + Tokens = 1002; + goto LABEL_106; + } + v45 = (int *)std::deque>::back((_DWORD *)(this + 48)); + std::__shared_ptr::__shared_ptr((int *)&v135, v45); + v46 = (void **)v135; + if ( v135[31] == v135[30] ) + v135[41] = *((_DWORD *)v123 + 41); + std::vector>::push_back(v46 + 30, &v123); + v135[42] = *((_DWORD *)v123 + 42); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v136); + } + else + { + Stra = (char *)*((_DWORD *)v116 + 8); + lpuexcpth = (struct _Unwind_Exception *)operator new(0xB0u); + WXSS::CSSTreeLib::CSSSyntaxTree::CSSSyntaxTree((int)lpuexcpth); + zcc::shared_ptr::shared_ptr(lpuexcpth); + lpuexcptb = v123; + std::string::_M_assign((int)v123, (int)(v84 + 4)); + for ( j = 0; ; ++j ) + { + v20 = (int *)Stra; + if ( (int)j >= (int)Stra ) + break; + if ( *(_DWORD *)(this + 72) == *(_DWORD *)(this + 56) ) + { + std::string::operator=(a4, "interal error: "); + std::string::operator+=(a4, "1003"); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v124); + Tokens = 1003; + goto LABEL_106; + } + v47 = (_DWORD *)std::deque>::back((_DWORD *)(this + 48)); + std::vector>::push_back((void **)lpuexcptb + 30, v47); + std::deque>::pop_back((_DWORD *)(this + 48)); + } + if ( (int)Stra > 0 ) + { + v20 = (int *)lpuexcptb; + v48 = (int *)*((_DWORD *)v123 + 30); + v49 = v48[2 * (_DWORD)Stra - 2]; + v50 = *v48; + *((_DWORD *)lpuexcptb + 41) = *(_DWORD *)(v49 + 164); + *((_DWORD *)lpuexcptb + 42) = *(_DWORD *)(v50 + 168); + *((_DWORD *)lpuexcptb + 37) = v106; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=((volatile signed __int32 **)lpuexcptb + 38, v107); + *((_DWORD *)lpuexcptb + 39) = v108; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=((volatile signed __int32 **)lpuexcptb + 40, v109); + } + if ( !v76 ) + { + v51 = *((_DWORD *)lpuexcptb + 31); + if ( *((_DWORD *)lpuexcptb + 30) != v51 ) + { + v20 = (int *)(v51 - 8); + Strb = (char *)*((_DWORD *)lpuexcptb + 30); + for ( lpuexcptc = (struct _Unwind_Exception *)(v51 - 8); + lpuexcptc > (struct _Unwind_Exception *)Strb; + lpuexcptc = (struct _Unwind_Exception *)((char *)lpuexcptc - 8) ) + { + std::__shared_ptr::__shared_ptr( + (int *)&v135, + (int *)Strb); + v20 = (int *)Strb; + *(_DWORD *)Strb = *(_DWORD *)lpuexcptc; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( + (volatile signed __int32 **)Strb + 1, + *((volatile signed __int32 **)lpuexcptc + 1)); + *(_DWORD *)lpuexcptc = v135; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( + (volatile signed __int32 **)lpuexcptc + 1, + v136); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v136); + Strb += 8; + } + } + } + std::deque>::push_back(this + 48, (int *)&v123); + } + v32 = v124; +LABEL_59: + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v32); + } + else if ( (*(int (__fastcall **)(char *))(*(_DWORD *)v116 + 8))(v116) == 2 ) + { + v86 = &dword_50CBE0; + v52 = *((_DWORD *)v116 + 1); + v53 = (_DWORD *)dword_50CBE4; + while ( v53 ) + { + v24 = (int)v86; + v54 = (_DWORD *)v53[3]; + if ( v52 <= v53[4] ) + v54 = (_DWORD *)v53[2]; + if ( v52 <= v53[4] ) + v24 = (int)v53; + v53 = v54; + v86 = (int *)v24; + } + if ( v86 != &dword_50CBE0 && v52 < v86[4] ) + v86 = &dword_50CBE0; + v73 = std::string::basic_string((void **)&v135, Str); + v77 = (char *)(v86 + 6); + v87 = (char *)v86[7]; + Strc = v77; + while ( v87 ) + { + v24 = (int)v87; + v55 = std::string::compare((int)(v87 + 16), (int)&v135) < 0; + v56 = Strc; + v73 = (int)v20; + v57 = (char *)*((_DWORD *)v87 + 3); + if ( !v55 ) + { + v57 = (char *)*((_DWORD *)v87 + 2); + v56 = v87; + } + v87 = v57; + Strc = v56; + } + if ( v77 != Strc ) + { + v55 = std::string::compare((int)&v135, (int)(Strc + 16)) < 0; + v58 = Strc; + if ( v55 ) + v58 = v77; + v73 = v24; + Strc = v58; + } + std::string::_M_dispose((void **)&v135); + v20 = (int *)v77; + if ( Strc == v77 || *((_DWORD *)Strc + 11) == *((_DWORD *)Strc + 10) ) + { + std::basic_stringstream,std::allocator>::basic_stringstream((int)&v135); + v59 = std::operator<<((std::ostream::sentry *)v137, a3); + std::operator<<>(v59, "("); + v60 = (std::ostream::sentry *)std::ostream::operator<<(*((_DWORD *)lpuexcpta + 5)); + std::operator<<>(v60, ":"); + v61 = (std::ostream::sentry *)std::ostream::operator<<(*((_DWORD *)lpuexcpta + 6)); + v62 = std::operator<<>(v61, "): unexpected token `"); + v63 = (char *)lpuexcpta + 28; + if ( *(_DWORD *)lpuexcpta != 1 ) + { + v63 = "$"; + if ( *(_DWORD *)lpuexcpta != 8 ) + { + v64 = (char **)*((_DWORD *)lpuexcpta + 1); + v63 = "UNKNOWN"; + if ( v64 ) + v63 = *v64; + } + } + v65 = std::operator<<>(v62, v63); + std::operator<<>(v65, "`"); + std::stringbuf::str((int)&v123, (int)v138); + std::string::operator=((unsigned __int8 **)a4, (int)&v123); + v36 = (char *)&v123; + goto LABEL_48; + } + std::deque>::pop_back(v78); + for ( lpuexcptd = ((*(_DWORD *)(*((_DWORD *)Strc + 10) + 4) - **((_DWORD **)Strc + 10)) >> 3) - 1; + lpuexcptd >= 0; + --lpuexcptd ) + { + v66 = lpuexcptd; + v67 = *(_DWORD *)(**((_DWORD **)Strc + 10) + 8 * lpuexcptd); + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v67 + 8))(v67, v73) == 4 ) + break; + v20 = (int *)(**((_DWORD **)Strc + 10) + 8 * lpuexcptd); + std::deque>::push_back((int)v78, v20); + v73 = v66; + } + } + } + if ( *(_DWORD *)(this + 72) == *(_DWORD *)(this + 56) ) + { + std::string::operator=(a4, "interal error: "); + std::string::operator+=(a4, "1004"); + Tokens = 1004; + } + else + { + v68 = (int *)std::deque>::back((_DWORD *)(this + 48)); + v69 = *v68; + v70 = (volatile signed __int32 *)v68[1]; + *(_DWORD *)this = v69; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=((volatile signed __int32 **)(this + 4), v70); + } +LABEL_106: + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v117); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v109); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v107); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v105); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v103); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v129); +LABEL_107: + std::vector::~vector((void **)&v118); + std::string::_M_dispose(&v126); + std::string::_M_dispose(v125); + return Tokens; +} +// 409494: conditional instruction was optimized away because sf.1==0 +// 408652: variable 'v6' is possibly undefined +// 408BB5: variable 'v26' is possibly undefined +// 408BB5: variable 'v74' is possibly undefined +// 4A2900: using guessed type _DWORD __stdcall std::ostream::operator<<(_DWORD); +// 50CBE0: using guessed type int dword_50CBE0; +// 50CBE4: using guessed type int dword_50CBE4; +// 50CBE8: using guessed type int dword_50CBE8; +// 50CBEC: using guessed type int dword_50CBEC; +// 50CBF0: using guessed type int dword_50CBF0; +// 50CBF4: using guessed type char byte_50CBF4; +// 50F38C: using guessed type void *off_50F38C; +// 519A44: using guessed type void (__cdecl *off_519A44)(WXSS::CSSTreeLib::NonTerminal *__hidden this); +// 519B58: using guessed type void (__cdecl *off_519B58)(WXSS::CSSTreeLib::Terminal *__hidden this); +// 51AD2C: using guessed type int (*off_51AD2C)(); +// 51AD9C: using guessed type int (*off_51AD9C)(); +// 51ADB8: using guessed type int (*off_51ADB8)(); +// 408340: using guessed type char var_D0[4]; + +//----- (00409984) -------------------------------------------------------- +void __tcf_0_0(void) +{ + std::ios_base::Init::~Init(); +} + +//----- (0040998E) -------------------------------------------------------- +unsigned __int8 *__thiscall std::string::operator=(unsigned __int8 **this, int a2) +{ + unsigned __int8 **v3; // eax + unsigned __int8 *v4; // ecx + unsigned __int8 *v5; // edx + unsigned __int8 *v6; // eax + unsigned __int8 **v7; // edx + unsigned __int8 *result; // eax + unsigned __int8 *v9; // [esp+18h] [ebp-20h] + + v3 = (unsigned __int8 **)*this; + v4 = *(unsigned __int8 **)a2; + v5 = *(unsigned __int8 **)(a2 + 4); + if ( *(_DWORD *)a2 == a2 + 8 ) + { + if ( v5 ) + std::string::_S_copy(v3, v4, *(_DWORD *)(a2 + 4)); + v6 = *(unsigned __int8 **)(a2 + 4); + v7 = (unsigned __int8 **)*this; + this[1] = v6; + v6[(_DWORD)v7] = 0; + } + else + { + if ( v3 == this + 2 ) + v3 = 0; + else + v9 = this[2]; + *this = v4; + this[1] = v5; + this[2] = *(unsigned __int8 **)(a2 + 8); + if ( v3 ) + { + *(_DWORD *)a2 = v3; + *(_DWORD *)(a2 + 8) = v9; + } + else + { + *(_DWORD *)a2 = a2 + 8; + } + } + result = *(unsigned __int8 **)a2; + *(_DWORD *)(a2 + 4) = 0; + *result = 0; + return result; +} +// 4099F5: variable 'v9' is possibly undefined + +//----- (00409A16) -------------------------------------------------------- +void __thiscall WXSS::Tokenizer::Tokenizer(int this, char *Str, int a3) +{ + size_t v3; // eax + int v4; // [esp+14h] [ebp-44h] + + *(_DWORD *)(this + 4) = 0; + *(_DWORD *)this = this + 8; + *(_BYTE *)(this + 8) = 0; + v4 = this + 24; + *(_DWORD *)(this + 28) = 0; + *(_DWORD *)(this + 24) = this + 32; + *(_BYTE *)(this + 32) = 0; + v3 = strlen(Str); + std::string::_M_replace((unsigned int **)this, 0, 0, Str, v3); + std::string::_M_assign(v4, a3); +} + +//----- (00409AF4) -------------------------------------------------------- +void WXSS::Tokenizer::InitTransitTable() +{ + const char *i; // edx + int v1; // eax + const char *j; // edx + int v3; // eax + const char *k; // edx + int v5; // eax + const char *m; // edx + int v7; // eax + const char *v8; // edx + int v9; // eax + const char *v10; // edx + int v11; // eax + const char *n; // edx + int v13; // eax + const char *v14; // edx + int v15; // eax + const char *ii; // edx + int v17; // eax + const char *jj; // edx + int v19; // eax + const char *v20; // edx + int v21; // eax + const char *kk; // edx + int v23; // eax + const char *v24; // edx + int v25; // eax + const char *mm; // edx + int v27; // eax + const char *nn; // edx + int v29; // eax + const char *i1; // edx + int v31; // eax + const char *i2; // edx + int v33; // eax + + if ( !WXSS::Tokenizer::InitTransitTable(void)::bInited ) + { + WXSS::Tokenizer::InitTransitTable(void)::bInited = 1; + for ( i = " \n\t\r"; ; ++i ) + { + v1 = *i; + if ( !(_BYTE)v1 ) + break; + dword_5232A0[2 * v1] = 134217729; + dword_5232A4[2 * v1] = 0; + } + for ( j = ".abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; ; ++j ) + { + v3 = *j; + if ( !(_BYTE)v3 ) + break; + dword_5232A0[2 * v3] = 2; + dword_5232A4[2 * v3] = 0; + } + for ( k = "0123456789"; ; ++k ) + { + v5 = *k; + if ( !(_BYTE)v5 ) + break; + dword_5232A0[2 * v5] = 5; + dword_5232A4[2 * v5] = 0; + } + for ( m = "#*,{}[]:()~=|>\"+^@;"; ; ++m ) + { + v7 = *m; + if ( !(_BYTE)v7 ) + break; + dword_5232A0[2 * v7] = 1114113; + dword_5232A4[2 * v7] = 0; + } + dword_523678 = 1114116; + v8 = ".abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; + dword_52367C = 0; + dword_5232A0[0] = 1; + dword_5232A4[0] = 0; + dword_5233B0 = 6; + dword_5233B4 = 0; + dword_5233D8 = 7; + dword_5233DC = 0; + dword_5234A0 = 23; + dword_5234A4 = 0; + dword_5233B8 = 3; + dword_5233BC = 0; + dword_523AA0 = -1; + dword_523AA4 = -1; + dword_5233C0 = 33619969; + dword_5233C4 = 0; + dword_53A678 = 88211481; + dword_53A67C = 0; + dword_53A2A0 = -1; + dword_53A2A4 = -1; + dword_53AAA0 = 24; + dword_53AAA4 = 0; + dword_53B678 = 1114113; + dword_53B67C = 0; + dword_53BAA0 = -1; + dword_53BAA4 = -1; + while ( 1 ) + { + v9 = *v8; + if ( !(_BYTE)v9 ) + break; + dword_5392A0[2 * v9] = 2; + ++v8; + dword_5392A4[2 * v9] = 0; + } + dword_539AA0 = 68288513; + v10 = ".abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; + dword_539AA4 = 0; + while ( 1 ) + { + v11 = *v10; + if ( !(_BYTE)v11 ) + break; + dword_5272A0[2 * v11] = 5; + ++v10; + dword_5272A4[2 * v11] = 0; + } + for ( n = "0123456789"; ; ++n ) + { + v13 = *n; + if ( !(_BYTE)v13 ) + break; + dword_5272A0[2 * v13] = 5; + dword_5272A4[2 * v13] = 0; + } + dword_5273C8 = 589825; + v14 = ".abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; + dword_5273CC = 0; + dword_527AA0 = 67502081; + dword_527AA4 = 0; + dword_5283B0 = 327681; + dword_5283B4 = 0; + dword_528AA0 = 6; + dword_528AA4 = 0; + dword_5293D8 = 327681; + dword_5293DC = 0; + dword_529AA0 = 7; + dword_529AA4 = 0; + dword_523418 = 134217743; + dword_52341C = 0; + dword_5313F0 = 16; + dword_5313F4 = 0; + dword_531AA0 = 134217729; + dword_531AA4 = 0; + dword_5323F0 = 17; + dword_5323F4 = 0; + dword_532AA0 = 16; + dword_532AA4 = 0; + dword_533418 = 134217729; + dword_53341C = 0; + dword_5333F0 = 67108880; + dword_5333F4 = 0; + dword_533AA0 = 16; + dword_533AA4 = 0; + dword_526418 = 134217746; + dword_52641C = 0; + dword_5343F0 = 19; + dword_5343F4 = 0; + dword_534AA0 = 134217732; + dword_534AA4 = 0; + dword_5353F0 = 20; + dword_5353F4 = 0; + dword_535AA0 = 19; + dword_535AA4 = 0; + dword_536418 = 134217732; + dword_53641C = 0; + dword_5363F0 = 67108883; + dword_5363F4 = 0; + dword_536AA0 = 19; + dword_536AA4 = 0; + while ( 1 ) + { + v15 = *v14; + if ( !(_BYTE)v15 ) + break; + dword_5242A0[2 * v15] = 2; + ++v14; + dword_5242A4[2 * v15] = 0; + } + for ( ii = "0123456789"; ; ++ii ) + { + v17 = *ii; + if ( !(_BYTE)v17 ) + break; + dword_5242A0[2 * v17] = 2; + dword_5242A4[2 * v17] = 0; + } + for ( jj = " \n\t\r"; ; ++jj ) + { + v19 = *jj; + if ( !(_BYTE)v19 ) + break; + dword_5242A0[2 * v19] = 67764225; + dword_5242A4[2 * v19] = 0; + } + dword_5243B0 = 67764225; + v20 = ".abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; + dword_5243B4 = 0; + dword_524AA0 = 67764225; + dword_524AA4 = 0; + while ( 1 ) + { + v21 = *v20; + if ( !(_BYTE)v21 ) + break; + dword_5252A0[2 * v21] = 3; + ++v20; + dword_5252A4[2 * v21] = 0; + } + for ( kk = "0123456789"; ; ++kk ) + { + v23 = *kk; + if ( !(_BYTE)v23 ) + break; + dword_5252A0[2 * v23] = 3; + dword_5252A4[2 * v23] = 0; + } + dword_525AA0 = 69337089; + v24 = " \n\t\r"; + dword_525AA4 = 0; + while ( 1 ) + { + v25 = *v24; + if ( !(_BYTE)v25 ) + break; + dword_5262A0[2 * v25] = 134217732; + ++v24; + dword_5262A4[2 * v25] = 0; + } + for ( mm = ".abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; ; ++mm ) + { + v27 = *mm; + if ( !(_BYTE)v27 ) + break; + dword_5262A0[2 * v27] = 8; + dword_5262A4[2 * v27] = 0; + } + for ( nn = ".abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; ; ++nn ) + { + v29 = *nn; + if ( !(_BYTE)v29 ) + break; + dword_52A2A0[2 * v29] = 8; + dword_52A2A4[2 * v29] = 0; + } + for ( i1 = "0123456789"; ; ++i1 ) + { + v31 = *i1; + if ( !(_BYTE)v31 ) + break; + dword_52A2A0[2 * v31] = 8; + dword_52A2A4[2 * v31] = 0; + } + for ( i2 = " \n\t\r"; ; ++i2 ) + { + v33 = *i2; + if ( !(_BYTE)v33 ) + break; + dword_52A2A0[2 * v33] = 67764228; + dword_52A2A4[2 * v33] = 0; + } + dword_52A470 = 67764228; + dword_52A474 = 0; + dword_52A688 = 67764228; + dword_52A68C = 0; + dword_52A478 = 67764228; + dword_52A47C = 0; + dword_52AAA0 = -1; + dword_52AAA4 = -1; + dword_526470 = 1114121; + dword_526474 = 0; + dword_526478 = 1114116; + dword_52647C = 0; + dword_526688 = 1114113; + dword_52668C = 0; + dword_526AA0 = -1; + dword_526AA4 = -1; + dword_52B478 = 84279300; + dword_52B47C = 0; + dword_52B688 = 84279300; + dword_52B68C = 0; + dword_52B3E0 = 10; + dword_52B3E4 = 0; + dword_52B3B0 = 11; + dword_52B3B4 = 0; + dword_52B3D8 = 13; + dword_52B3DC = 0; + dword_52C3E8 = 9; + dword_52C3EC = 0; + dword_52C3B0 = 12; + dword_52C3B4 = 0; + dword_52C3D8 = 14; + dword_52C3DC = 0; + dword_52CAA0 = 10; + dword_52CAA4 = 0; + dword_52D3B0 = 9; + dword_52D3B4 = 0; + dword_52F3D8 = 9; + dword_52F3DC = 0; + dword_52E3B0 = 10; + dword_52E3B4 = 0; + dword_5303D8 = 10; + dword_5303DC = 0; + dword_52DAA0 = 11; + dword_52DAA4 = 0; + dword_52FAA0 = 13; + dword_52FAA4 = 0; + dword_52EAA0 = 12; + dword_52EAA4 = 0; + dword_530AA0 = 14; + dword_530AA4 = 0; + dword_52BAA0 = 9; + dword_52BAA4 = 0; + } +} +// 5232A0: using guessed type int dword_5232A0[]; +// 5232A4: using guessed type int dword_5232A4[67]; +// 5233B0: using guessed type int dword_5233B0; +// 5233B4: using guessed type int dword_5233B4; +// 5233B8: using guessed type int dword_5233B8; +// 5233BC: using guessed type int dword_5233BC; +// 5233C0: using guessed type int dword_5233C0; +// 5233C4: using guessed type int dword_5233C4; +// 5233D8: using guessed type int dword_5233D8; +// 5233DC: using guessed type int dword_5233DC; +// 523418: using guessed type int dword_523418; +// 52341C: using guessed type int dword_52341C; +// 5234A0: using guessed type int dword_5234A0; +// 5234A4: using guessed type int dword_5234A4; +// 523678: using guessed type int dword_523678; +// 52367C: using guessed type int dword_52367C; +// 523AA0: using guessed type int dword_523AA0; +// 523AA4: using guessed type int dword_523AA4; +// 5242A0: using guessed type int dword_5242A0[]; +// 5242A4: using guessed type int dword_5242A4[67]; +// 5243B0: using guessed type int dword_5243B0; +// 5243B4: using guessed type int dword_5243B4; +// 524AA0: using guessed type int dword_524AA0; +// 524AA4: using guessed type int dword_524AA4; +// 5252A0: using guessed type int dword_5252A0[]; +// 5252A4: using guessed type int dword_5252A4[511]; +// 525AA0: using guessed type int dword_525AA0; +// 525AA4: using guessed type int dword_525AA4; +// 5262A0: using guessed type int dword_5262A0[]; +// 5262A4: using guessed type int dword_5262A4[93]; +// 526418: using guessed type int dword_526418; +// 52641C: using guessed type int dword_52641C; +// 526470: using guessed type int dword_526470; +// 526474: using guessed type int dword_526474; +// 526478: using guessed type int dword_526478; +// 52647C: using guessed type int dword_52647C; +// 526688: using guessed type int dword_526688; +// 52668C: using guessed type int dword_52668C; +// 526AA0: using guessed type int dword_526AA0; +// 526AA4: using guessed type int dword_526AA4; +// 5272A0: using guessed type int dword_5272A0[]; +// 5272A4: using guessed type int dword_5272A4[73]; +// 5273C8: using guessed type int dword_5273C8; +// 5273CC: using guessed type int dword_5273CC; +// 527AA0: using guessed type int dword_527AA0; +// 527AA4: using guessed type int dword_527AA4; +// 5283B0: using guessed type int dword_5283B0; +// 5283B4: using guessed type int dword_5283B4; +// 528AA0: using guessed type int dword_528AA0; +// 528AA4: using guessed type int dword_528AA4; +// 5293D8: using guessed type int dword_5293D8; +// 5293DC: using guessed type int dword_5293DC; +// 529AA0: using guessed type int dword_529AA0; +// 529AA4: using guessed type int dword_529AA4; +// 52A2A0: using guessed type int dword_52A2A0[]; +// 52A2A4: using guessed type int dword_52A2A4[115]; +// 52A470: using guessed type int dword_52A470; +// 52A474: using guessed type int dword_52A474; +// 52A478: using guessed type int dword_52A478; +// 52A47C: using guessed type int dword_52A47C; +// 52A688: using guessed type int dword_52A688; +// 52A68C: using guessed type int dword_52A68C; +// 52AAA0: using guessed type int dword_52AAA0; +// 52AAA4: using guessed type int dword_52AAA4; +// 52B3B0: using guessed type int dword_52B3B0; +// 52B3B4: using guessed type int dword_52B3B4; +// 52B3D8: using guessed type int dword_52B3D8; +// 52B3DC: using guessed type int dword_52B3DC; +// 52B3E0: using guessed type int dword_52B3E0; +// 52B3E4: using guessed type int dword_52B3E4; +// 52B478: using guessed type int dword_52B478; +// 52B47C: using guessed type int dword_52B47C; +// 52B688: using guessed type int dword_52B688; +// 52B68C: using guessed type int dword_52B68C; +// 52BAA0: using guessed type int dword_52BAA0; +// 52BAA4: using guessed type int dword_52BAA4; +// 52C3B0: using guessed type int dword_52C3B0; +// 52C3B4: using guessed type int dword_52C3B4; +// 52C3D8: using guessed type int dword_52C3D8; +// 52C3DC: using guessed type int dword_52C3DC; +// 52C3E8: using guessed type int dword_52C3E8; +// 52C3EC: using guessed type int dword_52C3EC; +// 52CAA0: using guessed type int dword_52CAA0; +// 52CAA4: using guessed type int dword_52CAA4; +// 52D3B0: using guessed type int dword_52D3B0; +// 52D3B4: using guessed type int dword_52D3B4; +// 52DAA0: using guessed type int dword_52DAA0; +// 52DAA4: using guessed type int dword_52DAA4; +// 52E3B0: using guessed type int dword_52E3B0; +// 52E3B4: using guessed type int dword_52E3B4; +// 52EAA0: using guessed type int dword_52EAA0; +// 52EAA4: using guessed type int dword_52EAA4; +// 52F3D8: using guessed type int dword_52F3D8; +// 52F3DC: using guessed type int dword_52F3DC; +// 52FAA0: using guessed type int dword_52FAA0; +// 52FAA4: using guessed type int dword_52FAA4; +// 5303D8: using guessed type int dword_5303D8; +// 5303DC: using guessed type int dword_5303DC; +// 530AA0: using guessed type int dword_530AA0; +// 530AA4: using guessed type int dword_530AA4; +// 5313F0: using guessed type int dword_5313F0; +// 5313F4: using guessed type int dword_5313F4; +// 531AA0: using guessed type int dword_531AA0; +// 531AA4: using guessed type int dword_531AA4; +// 5323F0: using guessed type int dword_5323F0; +// 5323F4: using guessed type int dword_5323F4; +// 532AA0: using guessed type int dword_532AA0; +// 532AA4: using guessed type int dword_532AA4; +// 5333F0: using guessed type int dword_5333F0; +// 5333F4: using guessed type int dword_5333F4; +// 533418: using guessed type int dword_533418; +// 53341C: using guessed type int dword_53341C; +// 533AA0: using guessed type int dword_533AA0; +// 533AA4: using guessed type int dword_533AA4; +// 5343F0: using guessed type int dword_5343F0; +// 5343F4: using guessed type int dword_5343F4; +// 534AA0: using guessed type int dword_534AA0; +// 534AA4: using guessed type int dword_534AA4; +// 5353F0: using guessed type int dword_5353F0; +// 5353F4: using guessed type int dword_5353F4; +// 535AA0: using guessed type int dword_535AA0; +// 535AA4: using guessed type int dword_535AA4; +// 5363F0: using guessed type int dword_5363F0; +// 5363F4: using guessed type int dword_5363F4; +// 536418: using guessed type int dword_536418; +// 53641C: using guessed type int dword_53641C; +// 536AA0: using guessed type int dword_536AA0; +// 536AA4: using guessed type int dword_536AA4; +// 5392A0: using guessed type int dword_5392A0[]; +// 5392A4: using guessed type int dword_5392A4[511]; +// 539AA0: using guessed type int dword_539AA0; +// 539AA4: using guessed type int dword_539AA4; +// 53A2A0: using guessed type int dword_53A2A0; +// 53A2A4: using guessed type int dword_53A2A4; +// 53A678: using guessed type int dword_53A678; +// 53A67C: using guessed type int dword_53A67C; +// 53AAA0: using guessed type int dword_53AAA0; +// 53AAA4: using guessed type int dword_53AAA4; +// 53B678: using guessed type int dword_53B678; +// 53B67C: using guessed type int dword_53B67C; +// 53BAA0: using guessed type int dword_53BAA0; +// 53BAA4: using guessed type int dword_53BAA4; +// 15222A4: using guessed type char WXSS::Tokenizer::InitTransitTable(void)::bInited; + +//----- (0040A292) -------------------------------------------------------- +int WXSS::Tokenizer::InitSubStrCheckingCaluseTable() +{ + int result; // eax + char v1[56]; // [esp+14h] [ebp-38h] BYREF + + if ( !WXSS::Tokenizer::InitSubStrCheckingCaluseTable(void)::inited ) + { + WXSS::Tokenizer::InitSubStrCheckingCaluseTable(void)::inited = 1; + WXSS::Tokenizer::SubStrCheckingClause::SubStrCheckingClause(v1, 9, (char *)Source, 9); + qmemcpy(&WXSS::Tokenizer::SCC, v1, 0x1Cu); + WXSS::Tokenizer::SubStrCheckingClause::SubStrCheckingClause(v1, 9, (char *)off_50F508, 9); + qmemcpy((char *)&WXSS::Tokenizer::SCC + 28, v1, 0x1Cu); + WXSS::Tokenizer::SubStrCheckingClause::SubStrCheckingClause(v1, 10, (char *)Source, 9); + qmemcpy((char *)&WXSS::Tokenizer::SCC + 56, v1, 0x1Cu); + WXSS::Tokenizer::SubStrCheckingClause::SubStrCheckingClause(v1, 10, (char *)off_50F508, 9); + qmemcpy((char *)&WXSS::Tokenizer::SCC + 84, v1, 0x1Cu); + result = WXSS::Tokenizer::SubStrCheckingClause::SubStrCheckingClause(v1, 0, (char *)&byte_50F50C, 0); + qmemcpy((char *)&WXSS::Tokenizer::SCC + 112, v1, 0x1Cu); + } + return result; +} +// 15222A0: using guessed type int WXSS::Tokenizer::InitSubStrCheckingCaluseTable(void)::inited; + +//----- (0040A39E) -------------------------------------------------------- +int __cdecl WXSS::Tokenizer::TryGetAnotherTypeByAnySubStr(int a1, int a2, int a3, int a4) +{ + char *v4; // ebx + int v5; // esi + unsigned int v6; // edi + unsigned int v7; // ecx + + if ( !a4 ) + { + v4 = (char *)&WXSS::Tokenizer::SCC; + v5 = 0; + v6 = a2 + 1; + while ( *(_DWORD *)v4 ) + { + if ( a3 == *(_DWORD *)v4 ) + { + v7 = *((_DWORD *)v4 + 1); + if ( v6 >= v7 && !strncmp(v4 + 8, (const char *)(a1 + v6 - v7), *((_DWORD *)v4 + 1)) ) + return dword_5206B8[7 * v5]; + } + ++v5; + v4 += 28; + } + } + return a4; +} +// 5206B8: using guessed type int dword_5206B8[1786]; + +//----- (0040A409) -------------------------------------------------------- +volatile signed __int32 **__usercall std::__relocate_a_1>@( + volatile signed __int32 **a1@, + volatile signed __int32 **a2@, + volatile signed __int32 **a3@) +{ + volatile signed __int32 *v4; // ecx + volatile signed __int32 **v5; // edi + volatile signed __int32 **v7; // [esp+8h] [ebp-20h] + volatile signed __int32 **v8; // [esp+8h] [ebp-20h] + + while ( a1 != a2 ) + { + *a3 = *a1; + a3[1] = a1[1]; + v4 = a1[2]; + a3[2] = v4; + if ( v4 ) + { + v7 = a1; + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy((int)v4); + a1 = v7; + } + v5 = a3 + 7; + v8 = a1; + a3 += 23; + *(a3 - 20) = a1[3]; + *(a3 - 19) = a1[4]; + *(a3 - 18) = a1[5]; + *(a3 - 17) = a1[6]; + qmemcpy(v5, a1 + 7, 0x40u); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(a1 + 2); + a1 = v8 + 23; + } + return a3; +} + +//----- (0040A480) -------------------------------------------------------- +int __thiscall WXSS::Tokenizer::GetTokens(int *this, int a2, unsigned int **a3, int a4) +{ + int v4; // eax + unsigned int v5; // eax + volatile signed __int32 **v6; // ecx + size_t v7; // eax + struct _Unwind_Exception *v8; // ebx + int AnotherTypeByAnySubStr; // eax + unsigned __int8 v10; // cl + struct _Unwind_Exception *v11; // ebx + std::ostream::sentry *v12; // eax + std::ostream::sentry *v13; // eax + std::ostream::sentry *v14; // eax + std::ostream::sentry *v15; // eax + std::ostream::sentry *v16; // eax + std::ostream::sentry *v17; // eax + std::ostream::sentry *v18; // eax + char i; // al + char j; // cl + unsigned __int8 v21; // cl + int v22; // eax + volatile signed __int32 *v23; // eax + int v24; // ecx + const char **v25; // edx + volatile signed __int32 *v26; // edx + std::ostream::sentry *v27; // eax + std::ostream::sentry *v28; // eax + const char *v29; // eax + int v30; // ebx + char *v31; // ebx + int v33; // [esp+14h] [ebp-1C4h] + int v35; // [esp+1Ch] [ebp-1BCh] + unsigned int v36; // [esp+20h] [ebp-1B8h] + int v37; // [esp+24h] [ebp-1B4h] + int v38; // [esp+24h] [ebp-1B4h] + unsigned int v39; // [esp+24h] [ebp-1B4h] + int k; // [esp+24h] [ebp-1B4h] + int v41; // [esp+28h] [ebp-1B0h] + int v42; // [esp+2Ch] [ebp-1ACh] + int v43; // [esp+30h] [ebp-1A8h] + char v44; // [esp+37h] [ebp-1A1h] + int v45; // [esp+38h] [ebp-1A0h] + int v46; // [esp+3Ch] [ebp-19Ch] + int v47; // [esp+3Ch] [ebp-19Ch] + _BYTE **Block; // [esp+40h] [ebp-198h] + char *String1; // [esp+44h] [ebp-194h] + char *String1a; // [esp+44h] [ebp-194h] + unsigned __int8 *String1b; // [esp+44h] [ebp-194h] + volatile signed __int32 *String1c; // [esp+44h] [ebp-194h] + char *String1d; // [esp+44h] [ebp-194h] + struct _Unwind_Exception *lpuexcpt; // [esp+48h] [ebp-190h] BYREF + const char **v55; // [esp+84h] [ebp-154h] + volatile signed __int32 *v56; // [esp+88h] [ebp-150h] BYREF + void *v57[6]; // [esp+8Ch] [ebp-14Ch] BYREF + void *v58; // [esp+A4h] [ebp-134h] BYREF + const char **v59; // [esp+A8h] [ebp-130h] + volatile signed __int32 *v60; // [esp+ACh] [ebp-12Ch] BYREF + char *v61; // [esp+B0h] [ebp-128h] + unsigned int v62; // [esp+B4h] [ebp-124h] + int v63; // [esp+B8h] [ebp-120h] + int v64; // [esp+BCh] [ebp-11Ch] + char Destination[64]; // [esp+C0h] [ebp-118h] BYREF + int v66; // [esp+100h] [ebp-D8h] BYREF + volatile signed __int32 *v67; // [esp+104h] [ebp-D4h] BYREF + volatile signed __int32 *v68; // [esp+108h] [ebp-D0h] BYREF + char *v69; // [esp+10Ch] [ebp-CCh] BYREF + unsigned int v70; // [esp+110h] [ebp-C8h] + int v71; // [esp+114h] [ebp-C4h] + int v72; // [esp+118h] [ebp-C0h] + char v73[184]; // [esp+11Ch] [ebp-BCh] BYREF + + WXSS::Tokenizer::InitTransitTable(); + WXSS::Tokenizer::InitSubStrCheckingCaluseTable(); + v36 = this[1]; + v4 = 1; + if ( a4 > 0 ) + v4 = a4; + v42 = v4; + v45 = *this; + v5 = v36 / 7; + if ( v36 > 0x9BD37A9 ) + std::__throw_length_error((std::length_error *)"vector::reserve"); + v6 = *(volatile signed __int32 ***)a2; + lpuexcpt = *(struct _Unwind_Exception **)(a2 + 8); + if ( v5 > -373475417 * ((lpuexcpt - (struct _Unwind_Exception *)v6) >> 2) ) + { + lpuexcpt = 0; + v7 = 92 * v5; + String1 = (char *)v7; + v46 = *(_DWORD *)(a2 + 4) - (_DWORD)v6; + if ( v36 > 6 ) + lpuexcpt = (struct _Unwind_Exception *)operator new(v7); + std::__relocate_a_1>( + *(volatile signed __int32 ***)a2, + *(volatile signed __int32 ***)(a2 + 4), + (volatile signed __int32 **)lpuexcpt); + if ( *(_DWORD *)a2 ) + operator delete(*(void **)a2); + v8 = lpuexcpt; + *(_DWORD *)a2 = lpuexcpt; + *(_DWORD *)(a2 + 4) = (char *)v8 + v46; + *(_DWORD *)(a2 + 8) = (char *)lpuexcpt + (_DWORD)String1; + } + v33 = 4194305; + AnotherTypeByAnySubStr = 0; + v37 = 1; + v41 = 1; + v35 = 1; + v47 = 0; + for ( String1a = 0; ; String1a = v31 ) + { + if ( v47 > (int)v36 ) + return 0; + if ( !--v33 ) + { + std::string::_M_replace(a3, 0, (size_t)a3[1], "something must be wrong", 0x17u); + return -1; + } + v10 = *(_BYTE *)(v45 + v47); + if ( v47 == v36 ) + v10 = 0; + v44 = v10; + lpuexcpt = (struct _Unwind_Exception *)WXSS::Tokenizer::TT[1024 * v42 + 2 * v10]; + v11 = lpuexcpt; + AnotherTypeByAnySubStr = WXSS::Tokenizer::TryGetAnotherTypeByAnySubStr(v45, v47, v42, AnotherTypeByAnySubStr); + if ( !v11 ) + { + lpuexcpt = (struct _Unwind_Exception *)dword_522AA0[1024 * v42]; + if ( !lpuexcpt ) + { + std::basic_stringstream,std::allocator>::basic_stringstream((int)&v66); + std::operator<<>((std::ostream::sentry *)&v68, "no transition for "); + v12 = (std::ostream::sentry *)std::ostream::operator<<(v42); + v13 = std::operator<<>(v12, " with input "); + std::operator<<>(v13, v44); + std::stringbuf::str((int)&v58, (int)&v69); + std::string::operator=((unsigned __int8 **)a3, (int)&v58); + std::string::_M_dispose(&v58); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)&v66); + return -1; + } + } + if ( lpuexcpt == (struct _Unwind_Exception *)-1 ) + break; + v42 = (unsigned __int16)lpuexcpt; + if ( ((unsigned int)lpuexcpt & 0x30000) != 0 ) + { + v43 = (((unsigned int)lpuexcpt & 0x20000) == 0) + v47 - 1; + if ( !AnotherTypeByAnySubStr ) + { + AnotherTypeByAnySubStr = 2; + if ( !_bittest((const signed __int32 *)&lpuexcpt, 0x12u) ) + { + AnotherTypeByAnySubStr = 4; + if ( !_bittest((const signed __int32 *)&lpuexcpt, 0x13u) ) + { + AnotherTypeByAnySubStr = 6; + if ( !_bittest((const signed __int32 *)&lpuexcpt, 0x16u) ) + { + AnotherTypeByAnySubStr = 5; + if ( !_bittest((const signed __int32 *)&lpuexcpt, 0x15u) ) + AnotherTypeByAnySubStr = ((unsigned int)lpuexcpt & 0x2000000) == 0 ? 1 : 7; + } + } + } + } + if ( (int)String1a <= v43 ) + { + v58 = (void *)AnotherTypeByAnySubStr; + v59 = 0; + v61 = String1a; + v60 = 0; + v63 = v35; + Destination[0] = 0; + v64 = v37; + v62 = (((unsigned int)lpuexcpt & 0x20000) == 0) + v47 - (_DWORD)String1a; + if ( AnotherTypeByAnySubStr == 1 ) + { + strncpy(Destination, &String1a[v45], (((unsigned int)lpuexcpt & 0x20000) == 0) + v47 - (_DWORD)String1a); + Destination[v43 - (_DWORD)String1a + 1] = 0; + } + else + { + v38 = (((unsigned int)lpuexcpt & 0x20000) == 0) + v47 - 1; + if ( _bittest((const signed __int32 *)&lpuexcpt, 0x18u) ) + { + for ( i = String1a[v45]; + (char *)v43 != String1a && (unsigned __int8)(i - 10) <= 0x16u && ((0x400009u >> (i - 10)) & 1) != 0; + i = String1a[v45] ) + { + if ( i == 10 ) + ++v63; + ++String1a; + } + v38 = (((unsigned int)lpuexcpt & 0x20000) == 0) + v47 - 1; + for ( j = *(_BYTE *)(v45 + v43); (int)String1a < v38; j = *(_BYTE *)(v45 + v38) ) + { + v21 = j - 10; + if ( v21 > 0x16u || ((0x400009u >> v21) & 1) == 0 ) + break; + --v38; + } + } + v61 = String1a; + Block = (_BYTE **)operator new(0x18u); + v39 = v38 - (_DWORD)String1a + 1; + String1b = (unsigned __int8 *)&String1a[v45]; + *Block = Block + 2; + if ( &String1b[v39] && !String1b ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v66 = v39; + if ( v39 > 0xF ) + { + *Block = std::string::_M_create((unsigned int *)&v66, 0); + Block[2] = (_BYTE *)v66; + } + std::string::_S_copy_chars(*Block, String1b, (size_t)&String1b[v39]); + v22 = v66; + Block[1] = (_BYTE *)v66; + (*Block)[v22] = 0; + v55 = 0; + v56 = 0; + v66 = (int)Block; + v67 = 0; + v23 = (volatile signed __int32 *)operator new(0x10u); + v24 = (int)v55; + *((_DWORD *)v23 + 1) = 1; + *((_DWORD *)v23 + 2) = 1; + *((_DWORD *)v23 + 3) = Block; + v25 = (const char **)v66; + *v23 = (volatile signed __int32)&off_51ADB8; + v55 = v25; + v26 = v56; + v66 = v24; + v56 = v23; + v67 = v26; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v67); + v59 = v55; + String1c = v56; + if ( v56 != v60 ) + { + if ( v56 ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy((int)v56); + if ( v60 ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v60); + v60 = String1c; + } + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v56); + v62 = v39; + } + if ( v58 != (void *)1 ) + { + if ( !v59 ) + { + std::basic_stringstream,std::allocator>::basic_stringstream((int)&v66); + std::operator<<>((std::ostream::sentry *)&v68, "pos: "); + v27 = (std::ostream::sentry *)std::ostream::operator<<(v47); + v28 = std::operator<<>(v27, "f739 error"); + std::endl>(v28); + std::stringbuf::str((int)v57, (int)&v69); + std::string::operator=((unsigned __int8 **)a3, (int)v57); + std::string::_M_dispose(v57); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)&v66); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v60); + return -1; + } + if ( v58 == (void *)4 ) + { + String1d = (char *)*v59; + if ( !__stricmp(*v59, "@media") + || !__stricmp(String1d, "@keyframes") + || !__stricmp(String1d, "@-webkit-keyframes") + || !__stricmp(String1d, "@supports") ) + { + v42 = 24; + } + for ( k = 0; (&WXSS::Tokenizer::DIRECTIVES)[k]; ++k ) + { + if ( !__stricmp(String1d, (&WXSS::Tokenizer::DIRECTIVES)[k]) ) + { + v73[0] = 0; + v67 = 0; + v29 = (&WXSS::Tokenizer::DIRECTIVES)[k]; + v68 = 0; + v66 = 1; + v69 = 0; + v70 = 0; + v71 = 0; + v72 = 0; + strcpy(v73, v29); + v69 = v61; + v71 = v63; + v72 = v64; + v70 = v62; + std::vector::push_back(a2, &v66); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v68); + goto LABEL_77; + } + } + } + } + std::vector::push_back(a2, (int *)&v58); +LABEL_77: + String1a = (char *)(v43 + 1); + v37 = v41 + 1; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v60); + } + AnotherTypeByAnySubStr = 0; + } + if ( _bittest((const signed __int32 *)&lpuexcpt, 0x1Au) ) + { + --v47; + } + else + { + if ( v44 == 10 ) + { + ++v35; + v41 = 0; + } + ++v41; + } + ++v47; + v30 = v37; + if ( ((unsigned int)lpuexcpt & 0x8000000) != 0 ) + v30 = v41; + v37 = v30; + v31 = String1a; + if ( ((unsigned int)lpuexcpt & 0x8000000) != 0 ) + v31 = (char *)v47; + } + std::basic_stringstream,std::allocator>::basic_stringstream((int)&v66); + v14 = std::operator<<((std::ostream::sentry *)&v68, this + 6); + std::operator<<>(v14, "("); + v15 = (std::ostream::sentry *)std::ostream::operator<<(v35); + std::operator<<>(v15, ":"); + v16 = (std::ostream::sentry *)std::ostream::operator<<(v41); + v17 = std::operator<<>(v16, "): unexpected `"); + v18 = std::operator<<>(v17, v44); + std::operator<<>(v18, "` at pos "); + std::ostream::operator<<(v47 + 1); + if ( !v47 && (unsigned __int8)v44 > 0xFDu ) + std::operator<<>( + (std::ostream::sentry *)&v68, + " (shoud you check if there's any BOM at the begin of file)"); + std::stringbuf::str((int)&v58, (int)&v69); + std::string::operator=((unsigned __int8 **)a3, (int)&v58); + std::string::_M_dispose(&v58); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)&v66); + return (int)lpuexcpt; +} +// 4A2900: using guessed type _DWORD __stdcall std::ostream::operator<<(_DWORD); +// 51ADB8: using guessed type int (*off_51ADB8)(); +// 5222A0: using guessed type int WXSS::Tokenizer::TT[]; +// 522AA0: using guessed type int dword_522AA0[]; +// 40A480: using guessed type char Destination[64]; +// 40A480: using guessed type char var_BC[184]; + +//----- (0040B118) -------------------------------------------------------- +void __tcf_1_2(void) +{ + std::ios_base::Init::~Init(); +} + +//----- (0040B122) -------------------------------------------------------- +int __thiscall std::string::basic_string(void **this, char *Str) +{ + char *v3; // edi + int result; // eax + int v5; // edx + int v6[7]; // [esp+1Ch] [ebp-1Ch] BYREF + + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v6[0] = strlen(Str); + v3 = &Str[v6[0]]; + if ( v6[0] > 0xFu ) + { + *this = std::string::_M_create((unsigned int *)v6, 0); + this[2] = (void *)v6[0]; + } + std::string::_S_copy_chars(*this, (unsigned __int8 *)Str, (size_t)v3); + result = v6[0]; + v5 = (int)*this; + this[1] = (void *)v6[0]; + *(_BYTE *)(v5 + result) = 0; + return result; +} +// 40B122: using guessed type size_t var_1C[7]; + +//----- (0040B1A0) -------------------------------------------------------- +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str) +{ + size_t v2; // eax + + v2 = strlen(Str); + return std::string::_M_replace(this, 0, (size_t)this[1], Str, v2); +} + +//----- (0040B1DE) -------------------------------------------------------- +int WXSS::CSSTreeLib::TransitTable::GetTopType() +{ + return 25; +} + +//----- (0040B1E4) -------------------------------------------------------- +void __thiscall std::vector::_M_move_assign(void ***this, void ***a2) +{ + void **v2; // ebx + void **v3; // edx + void **v4; // edi + int v5; // edi + void **v6[9]; // [esp+4h] [ebp-24h] BYREF + + v2 = this[1]; + v3 = this[2]; + v4 = *a2; + v6[0] = *this; + v6[1] = v2; + *this = v4; + v5 = (int)a2[1]; + v6[2] = v3; + this[1] = (void **)v5; + this[2] = a2[2]; + *a2 = 0; + a2[1] = 0; + a2[2] = 0; + std::vector::~vector(v6); +} + +//----- (0040B238) -------------------------------------------------------- +void __usercall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase( + int a1@) +{ + int v2; // esi + void *v3; // [esp+0h] [ebp-28h] + + while ( a1 ) + { + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(*(_DWORD *)(a1 + 12)); + v2 = *(_DWORD *)(a1 + 8); + std::vector::~vector((void ***)(a1 + 40)); + std::string::_M_dispose((void **)(a1 + 16)); + v3 = (void *)a1; + a1 = v2; + operator delete(v3); + } +} + +//----- (0040B278) -------------------------------------------------------- +int __thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + _DWORD *this, + _DWORD *a2) +{ + int result; // eax + int v4; // edi + + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(this[2]); + this[2] = 0; + this[3] = this + 1; + this[4] = this + 1; + result = a2[2]; + this[5] = 0; + if ( result ) + { + v4 = a2[1]; + this[2] = result; + this[1] = v4; + this[3] = a2[3]; + this[4] = a2[4]; + *(_DWORD *)(result + 4) = this + 1; + result = a2[5]; + this[5] = result; + a2[2] = 0; + a2[3] = a2 + 1; + a2[4] = a2 + 1; + a2[5] = 0; + } + return result; +} + +//----- (0040B2EC) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::TransitTable::Init(int a1) +{ + _DWORD *v1; // eax + _DWORD *v2; // eax + _DWORD *v3; // eax + _DWORD *v4; // eax + int v5; // eax + _DWORD *v6; // eax + int v7; // eax + _DWORD *v8; // eax + _DWORD *v9; // eax + _DWORD *v10; // eax + _DWORD *v11; // eax + int v12; // eax + _DWORD *v13; // eax + _DWORD *v14; // eax + int v15; // eax + _DWORD *v16; // eax + _DWORD *v17; // eax + _DWORD *v18; // eax + _DWORD *v19; // eax + _DWORD *v20; // eax + int v21; // eax + _DWORD *v22; // eax + int v23; // eax + _DWORD *v24; // eax + _DWORD *v25; // eax + _DWORD *v26; // eax + _DWORD *v27; // eax + _DWORD *v28; // eax + int v29; // eax + _DWORD *v30; // eax + _DWORD *v31; // eax + _DWORD *v32; // eax + _DWORD *v33; // eax + int v34; // eax + _DWORD *v35; // eax + _DWORD *v36; // eax + _DWORD *v37; // eax + int v38; // eax + _DWORD *v39; // eax + _DWORD *v40; // eax + _DWORD *v41; // eax + _DWORD *v42; // eax + _DWORD *v43; // eax + int v44; // eax + _DWORD *v45; // eax + _DWORD *v46; // eax + _DWORD *v47; // eax + int v48; // eax + _DWORD *v49; // eax + _DWORD *v50; // eax + _DWORD *v51; // eax + int v52; // eax + _DWORD *v53; // eax + _DWORD *v54; // eax + _DWORD *v55; // eax + int v56; // eax + _DWORD *v57; // eax + _DWORD *v58; // eax + _DWORD *v59; // eax + int v60; // eax + _DWORD *v61; // eax + _DWORD *v62; // eax + _DWORD *v63; // eax + int v64; // eax + _DWORD *v65; // eax + _DWORD *v66; // eax + _DWORD *v67; // eax + int v68; // eax + _DWORD *v69; // eax + _DWORD *v70; // eax + _DWORD *v71; // eax + int v72; // eax + _DWORD *v73; // eax + _DWORD *v74; // eax + _DWORD *v75; // eax + _DWORD *v76; // eax + _DWORD *v77; // eax + int v78; // eax + _DWORD *v79; // eax + _DWORD *v80; // eax + _DWORD *v81; // eax + int v82; // eax + _DWORD *v83; // eax + _DWORD *v84; // eax + _DWORD *v85; // eax + _DWORD *v86; // eax + int v87; // eax + _DWORD *v88; // eax + int v89; // eax + _DWORD *v90; // eax + _DWORD *v91; // eax + _DWORD *v92; // eax + _DWORD *v93; // eax + int v94; // eax + _DWORD *v95; // eax + _DWORD *v96; // eax + _DWORD *v97; // eax + _DWORD *v98; // eax + int v99; // eax + _DWORD *v100; // eax + _DWORD *v101; // eax + int v102; // eax + _DWORD *v103; // eax + _DWORD *v104; // eax + int v105; // eax + _DWORD *v106; // eax + int v107; // eax + _DWORD *v108; // eax + _DWORD *v109; // eax + _DWORD *v110; // eax + _DWORD *v111; // eax + int v112; // eax + _DWORD *v113; // eax + _DWORD *v114; // eax + _DWORD *v115; // eax + _DWORD *v116; // eax + _DWORD *v117; // eax + _DWORD *v118; // eax + _DWORD *v119; // eax + _DWORD *v120; // eax + _DWORD *v121; // eax + _DWORD *v122; // eax + int v123; // eax + _DWORD *v124; // eax + _DWORD *v125; // eax + _DWORD *v126; // eax + _DWORD *v127; // eax + _DWORD *v128; // eax + _DWORD *v129; // eax + int v130; // eax + _DWORD *v131; // eax + int v132; // eax + _DWORD *v133; // eax + _DWORD *v134; // eax + _DWORD *v135; // eax + _DWORD *v136; // eax + _DWORD *v137; // eax + _DWORD *v138; // eax + int v139; // eax + _DWORD *v140; // eax + int v141; // eax + _DWORD *v142; // eax + _DWORD *v143; // eax + int v144; // eax + _DWORD *v145; // eax + _DWORD *v146; // eax + int v147; // eax + _DWORD *v148; // eax + _DWORD *v149; // eax + _DWORD *v150; // eax + _DWORD *v151; // eax + _DWORD *v152; // eax + _DWORD *v153; // eax + _DWORD *v154; // eax + _DWORD *v155; // eax + _DWORD *v156; // eax + _DWORD *v157; // eax + int v158; // eax + _DWORD *v159; // eax + _DWORD *v160; // eax + _DWORD *v161; // eax + int v162; // eax + _DWORD *v163; // eax + _DWORD *v164; // eax + _DWORD *v165; // eax + int v166; // eax + _DWORD *v167; // eax + _DWORD *v168; // eax + _DWORD *v169; // eax + int v170; // eax + _DWORD *v171; // eax + _DWORD *v172; // eax + _DWORD *v173; // eax + int v174; // eax + _DWORD *v175; // eax + _DWORD *v176; // eax + _DWORD *v177; // eax + _DWORD *v178; // eax + _DWORD *v179; // eax + int v180; // eax + _DWORD *v181; // eax + _DWORD *v182; // eax + _DWORD *v183; // eax + _DWORD *v184; // eax + _DWORD *v185; // eax + int v186; // eax + _DWORD *v187; // eax + _DWORD *v188; // eax + _DWORD *v189; // eax + int v190; // eax + int v191; // eax + _DWORD *v192; // eax + _DWORD *v193; // eax + _DWORD *v194; // eax + _DWORD *v195; // eax + int v196; // eax + _DWORD *v197; // eax + _DWORD *v198; // eax + _DWORD *v199; // eax + _DWORD *v200; // eax + int v201; // eax + _DWORD *v202; // eax + _DWORD *v203; // eax + _DWORD *v204; // eax + int v205; // eax + int v206; // eax + _DWORD *v207; // eax + _DWORD *v208; // eax + _DWORD *v209; // eax + int v210; // eax + int v211; // eax + _DWORD *v212; // eax + _DWORD *v213; // eax + _DWORD *v214; // eax + _DWORD *v215; // eax + int v216; // eax + _DWORD *v217; // eax + _DWORD *v218; // eax + _DWORD *v219; // eax + int v220; // eax + _DWORD *v221; // eax + _DWORD *v222; // eax + _DWORD *v223; // eax + _DWORD *v224; // eax + int v225; // eax + _DWORD *v226; // eax + _DWORD *v227; // eax + _DWORD *v228; // eax + _DWORD *v229; // eax + int v230; // eax + _DWORD *v231; // eax + _DWORD *v232; // eax + _DWORD *v233; // eax + int v234; // eax + int v235; // eax + _DWORD *v236; // eax + _DWORD *v237; // eax + _DWORD *v238; // eax + _DWORD *v239; // eax + int v240; // eax + _DWORD *v241; // eax + _DWORD *v242; // eax + _DWORD *v243; // eax + _DWORD *v244; // eax + int v245; // eax + _DWORD *v246; // eax + int v247; // eax + _DWORD *v248; // eax + _DWORD *v249; // eax + _DWORD *v250; // eax + _DWORD *v251; // eax + _DWORD *v252; // eax + _DWORD *v253; // eax + int v254; // eax + _DWORD *v255; // eax + _DWORD *v256; // eax + _DWORD *v257; // eax + _DWORD *v258; // eax + _DWORD *v259; // eax + _DWORD *v260; // eax + _DWORD *v261; // eax + _DWORD *v262; // eax + int v263; // eax + _DWORD *v264; // eax + _DWORD *v265; // eax + int v266; // eax + _DWORD *v267; // eax + _DWORD *v268; // eax + _DWORD *v269; // eax + _DWORD *v270; // eax + _DWORD *v271; // eax + _DWORD *v272; // eax + _DWORD *v273; // eax + _DWORD *v274; // eax + _DWORD *v275; // eax + _DWORD *v276; // eax + _DWORD *v277; // eax + _DWORD *v278; // eax + _DWORD *v279; // eax + int v280; // eax + _DWORD *v281; // eax + _DWORD *v282; // eax + _DWORD *v283; // eax + _DWORD *v284; // eax + _DWORD *v285; // eax + _DWORD *v286; // eax + int v287; // eax + _DWORD *v288; // eax + int v289; // eax + _DWORD *v290; // eax + _DWORD *v291; // eax + _DWORD *v292; // eax + int v293; // eax + _DWORD *v294; // eax + int v295; // eax + _DWORD *v296; // eax + _DWORD *v297; // eax + _DWORD *v298; // eax + int v299; // eax + _DWORD *v300; // eax + int v301; // eax + _DWORD *v302; // eax + _DWORD *v303; // eax + _DWORD *v304; // eax + _DWORD *v305; // eax + int v306; // eax + _DWORD *v307; // eax + _DWORD *v308; // eax + int v309; // eax + _DWORD *v310; // eax + _DWORD *v311; // eax + int v312; // eax + _DWORD *v313; // eax + _DWORD *v314; // eax + int v315; // eax + _DWORD *v316; // eax + _DWORD *v317; // eax + int v318; // eax + _DWORD *v319; // eax + _DWORD *v320; // eax + int v321; // eax + _DWORD *v322; // eax + _DWORD *v323; // eax + int v324; // eax + _DWORD *v325; // eax + _DWORD *v326; // eax + int v327; // eax + _DWORD *v328; // eax + _DWORD *v329; // eax + int v330; // eax + _DWORD *v331; // eax + _DWORD *v332; // eax + int v333; // eax + _DWORD *v334; // eax + _DWORD *v335; // eax + int v336; // eax + _DWORD *v337; // eax + _DWORD *v338; // eax + _DWORD *v339; // eax + int v340; // eax + _DWORD *v341; // eax + int v342; // eax + _DWORD *v343; // eax + _DWORD *v344; // eax + _DWORD *v345; // eax + _DWORD *v346; // eax + int v347; // eax + _DWORD *v348; // eax + _DWORD *v349; // eax + int v350; // eax + _DWORD *v351; // eax + _DWORD *v352; // eax + int v353; // eax + _DWORD *v354; // eax + _DWORD *v355; // eax + int v356; // eax + _DWORD *v357; // eax + _DWORD *v358; // eax + int v359; // eax + _DWORD *v360; // eax + _DWORD *v361; // eax + int v362; // eax + _DWORD *v363; // eax + _DWORD *v364; // eax + int v365; // eax + _DWORD *v366; // eax + _DWORD *v367; // eax + int v368; // eax + _DWORD *v369; // eax + _DWORD *v370; // eax + int v371; // eax + _DWORD *v372; // eax + _DWORD *v373; // eax + int v374; // eax + _DWORD *v375; // eax + int v376; // eax + _DWORD *v377; // eax + _DWORD *v378; // eax + int v379; // eax + _DWORD *v380; // eax + _DWORD *v381; // eax + int v382; // eax + _DWORD *v383; // eax + _DWORD *v384; // eax + int v385; // eax + _DWORD *v386; // eax + _DWORD *v387; // eax + int v388; // eax + _DWORD *v389; // eax + _DWORD *v390; // eax + _DWORD *v391; // eax + _DWORD *v392; // eax + int v393; // eax + _DWORD *v394; // eax + _DWORD *v395; // eax + int v396; // eax + _DWORD *v397; // eax + _DWORD *v398; // eax + int v399; // eax + _DWORD *v400; // eax + _DWORD *v401; // eax + int v402; // eax + _DWORD *v403; // eax + _DWORD *v404; // eax + int v405; // eax + _DWORD *v406; // eax + _DWORD *v407; // eax + int v408; // eax + _DWORD *v409; // eax + _DWORD *v410; // eax + int v411; // eax + _DWORD *v412; // eax + _DWORD *v413; // eax + int v414; // eax + _DWORD *v415; // eax + _DWORD *v416; // eax + int v417; // eax + _DWORD *v418; // eax + _DWORD *v419; // eax + int v420; // eax + _DWORD *v421; // eax + int v422; // eax + _DWORD *v423; // eax + _DWORD *v424; // eax + int v425; // eax + _DWORD *v426; // eax + _DWORD *v427; // eax + int v428; // eax + _DWORD *v429; // eax + _DWORD *v430; // eax + int v431; // eax + _DWORD *v432; // eax + _DWORD *v433; // eax + int v434; // eax + _DWORD *v435; // eax + _DWORD *v436; // eax + _DWORD *v437; // eax + _DWORD *v438; // eax + int v439; // eax + _DWORD *v440; // eax + int v441; // eax + _DWORD *v442; // eax + int v443; // eax + _DWORD *v444; // eax + _DWORD *v445; // eax + _DWORD *v446; // eax + _DWORD *v447; // eax + _DWORD *v448; // eax + _DWORD *v449; // eax + int v450; // eax + _DWORD *v451; // eax + _DWORD *v452; // eax + int v453; // eax + _DWORD *v454; // eax + _DWORD *v455; // eax + _DWORD *v456; // eax + _DWORD *v457; // eax + _DWORD *v458; // eax + _DWORD *v459; // eax + _DWORD *v460; // eax + _DWORD *v461; // eax + int v462; // eax + _DWORD *v463; // eax + _DWORD *v464; // eax + _DWORD *v465; // eax + _DWORD *v466; // eax + _DWORD *v467; // eax + int v468; // eax + _DWORD *v469; // eax + _DWORD *v470; // eax + _DWORD *v471; // eax + int v472; // eax + _DWORD *v473; // eax + _DWORD *v474; // eax + _DWORD *v475; // eax + int v476; // eax + _DWORD *v477; // eax + _DWORD *v478; // eax + _DWORD *v479; // eax + int v480; // eax + _DWORD *v481; // eax + _DWORD *v482; // eax + _DWORD *v483; // eax + int v484; // eax + _DWORD *v485; // eax + _DWORD *v486; // eax + _DWORD *v487; // eax + int v488; // eax + _DWORD *v489; // eax + _DWORD *v490; // eax + _DWORD *v491; // eax + _DWORD *v492; // eax + _DWORD *v493; // eax + _DWORD *v494; // eax + _DWORD *v495; // eax + _DWORD *v496; // eax + _DWORD *v497; // eax + _DWORD *v498; // eax + _DWORD *v499; // eax + _DWORD *v500; // eax + _DWORD *v501; // eax + _DWORD *v502; // eax + _DWORD *v503; // eax + _DWORD *v504; // eax + _DWORD *v505; // eax + _DWORD *v506; // eax + _DWORD *v507; // eax + _DWORD *v508; // eax + _DWORD *v509; // eax + _DWORD *v510; // eax + _DWORD *v511; // eax + _DWORD *v512; // eax + _DWORD *v513; // eax + _DWORD *v514; // eax + _DWORD *v515; // eax + _DWORD *v516; // eax + _DWORD *v517; // eax + _DWORD *v518; // eax + _DWORD *v519; // eax + _DWORD *v520; // eax + _DWORD *v521; // eax + int v522; // eax + _DWORD *v523; // eax + int v524; // eax + _DWORD *v525; // eax + _DWORD *v526; // eax + int v527; // eax + _DWORD *v528; // eax + _DWORD *v529; // eax + int v530; // eax + _DWORD *v531; // eax + _DWORD *v532; // eax + _DWORD *v533; // eax + _DWORD *v534; // eax + int v535; // eax + _DWORD *v536; // eax + _DWORD *v537; // eax + int v538; // eax + _DWORD *v539; // eax + _DWORD *v540; // eax + int v541; // eax + _DWORD *v542; // eax + _DWORD *v543; // eax + int v544; // eax + _DWORD *v545; // eax + _DWORD *v546; // eax + int v547; // eax + _DWORD *v548; // eax + _DWORD *v549; // eax + int v550; // eax + _DWORD *v551; // eax + int v552; // eax + _DWORD *v553; // eax + _DWORD *v554; // eax + int v555; // eax + _DWORD *v556; // eax + _DWORD *v557; // eax + int v558; // eax + _DWORD *v559; // eax + _DWORD *v560; // eax + int v561; // eax + _DWORD *v562; // eax + _DWORD *v563; // eax + int v564; // eax + _DWORD *v565; // eax + _DWORD *v566; // eax + _DWORD *v567; // eax + int v568; // eax + _DWORD *v569; // eax + _DWORD *v570; // eax + _DWORD *v571; // eax + _DWORD *v572; // eax + _DWORD *v573; // eax + _DWORD *v574; // eax + _DWORD *v575; // eax + _DWORD *v576; // eax + _DWORD *v577; // eax + _DWORD *v578; // eax + _DWORD *v579; // eax + _DWORD *v580; // eax + _DWORD *v581; // eax + _DWORD *v582; // eax + _DWORD *v583; // eax + int v584; // eax + _DWORD *v585; // eax + _DWORD *v586; // eax + int v587; // eax + _DWORD *v588; // eax + _DWORD *v589; // eax + _DWORD *v590; // eax + _DWORD *v591; // eax + _DWORD *v592; // eax + _DWORD *v593; // eax + _DWORD *v594; // eax + _DWORD *v595; // eax + int v596; // eax + _DWORD *v597; // eax + _DWORD *v598; // eax + _DWORD *v599; // eax + _DWORD *v600; // eax + int v601; // eax + _DWORD *v602; // eax + _DWORD *v603; // eax + _DWORD *v604; // eax + _DWORD *v605; // eax + _DWORD *v606; // eax + _DWORD *v607; // eax + _DWORD *v608; // eax + _DWORD *v609; // eax + _DWORD *v610; // eax + _DWORD *v611; // eax + int v612; // eax + _DWORD *v613; // eax + _DWORD *v614; // eax + _DWORD *v615; // eax + _DWORD *v616; // eax + _DWORD *v617; // eax + _DWORD *v618; // eax + _DWORD *v619; // eax + _DWORD *v620; // eax + _DWORD *v621; // eax + _DWORD *v622; // eax + void *v623; // [esp+10h] [ebp-A8h] + int v624; // [esp+10h] [ebp-A8h] + void *v625; // [esp+10h] [ebp-A8h] + int v626; // [esp+10h] [ebp-A8h] + void *v627; // [esp+10h] [ebp-A8h] + int v628; // [esp+10h] [ebp-A8h] + void *v629; // [esp+10h] [ebp-A8h] + int v630; // [esp+10h] [ebp-A8h] + void *v631; // [esp+10h] [ebp-A8h] + int v632; // [esp+10h] [ebp-A8h] + void *v633; // [esp+10h] [ebp-A8h] + int v634; // [esp+10h] [ebp-A8h] + void *v635; // [esp+10h] [ebp-A8h] + int v636; // [esp+10h] [ebp-A8h] + void *v637; // [esp+10h] [ebp-A8h] + int v638; // [esp+10h] [ebp-A8h] + void *v639; // [esp+10h] [ebp-A8h] + int v640; // [esp+10h] [ebp-A8h] + void *v641; // [esp+10h] [ebp-A8h] + int v642; // [esp+10h] [ebp-A8h] + void *v643; // [esp+10h] [ebp-A8h] + int v644; // [esp+10h] [ebp-A8h] + void *v645; // [esp+10h] [ebp-A8h] + int v646; // [esp+10h] [ebp-A8h] + void *v647; // [esp+10h] [ebp-A8h] + int v648; // [esp+10h] [ebp-A8h] + void *v649; // [esp+10h] [ebp-A8h] + int v650; // [esp+10h] [ebp-A8h] + void *v651; // [esp+10h] [ebp-A8h] + int v652; // [esp+10h] [ebp-A8h] + void *v653; // [esp+10h] [ebp-A8h] + int v654; // [esp+10h] [ebp-A8h] + void *v655; // [esp+10h] [ebp-A8h] + int v656; // [esp+10h] [ebp-A8h] + void *v657; // [esp+10h] [ebp-A8h] + int v658; // [esp+10h] [ebp-A8h] + void *v659; // [esp+10h] [ebp-A8h] + int v660; // [esp+10h] [ebp-A8h] + void *v661; // [esp+10h] [ebp-A8h] + int v662; // [esp+10h] [ebp-A8h] + void *v663; // [esp+10h] [ebp-A8h] + int v664; // [esp+10h] [ebp-A8h] + void *v665; // [esp+10h] [ebp-A8h] + int v666; // [esp+10h] [ebp-A8h] + void *v667; // [esp+10h] [ebp-A8h] + int v668; // [esp+10h] [ebp-A8h] + void *v669; // [esp+10h] [ebp-A8h] + int v670; // [esp+10h] [ebp-A8h] + void *v671; // [esp+10h] [ebp-A8h] + int v672; // [esp+10h] [ebp-A8h] + void *v673; // [esp+10h] [ebp-A8h] + int v674; // [esp+10h] [ebp-A8h] + void *v675; // [esp+10h] [ebp-A8h] + int v676; // [esp+10h] [ebp-A8h] + void *v677; // [esp+10h] [ebp-A8h] + int v678; // [esp+10h] [ebp-A8h] + void *v679; // [esp+10h] [ebp-A8h] + int v680; // [esp+10h] [ebp-A8h] + void *v681; // [esp+10h] [ebp-A8h] + int v682; // [esp+10h] [ebp-A8h] + void *v683; // [esp+10h] [ebp-A8h] + int v684; // [esp+10h] [ebp-A8h] + void *v685; // [esp+10h] [ebp-A8h] + int v686; // [esp+10h] [ebp-A8h] + void *v687; // [esp+10h] [ebp-A8h] + int v688; // [esp+10h] [ebp-A8h] + void *v689; // [esp+10h] [ebp-A8h] + int v690; // [esp+10h] [ebp-A8h] + void *v691; // [esp+10h] [ebp-A8h] + int v692; // [esp+10h] [ebp-A8h] + void *v693; // [esp+10h] [ebp-A8h] + int v694; // [esp+10h] [ebp-A8h] + void *v695; // [esp+10h] [ebp-A8h] + int v696; // [esp+10h] [ebp-A8h] + void *v697; // [esp+10h] [ebp-A8h] + int v698; // [esp+10h] [ebp-A8h] + void *v699; // [esp+10h] [ebp-A8h] + int v700; // [esp+10h] [ebp-A8h] + void *v701; // [esp+10h] [ebp-A8h] + int v702; // [esp+10h] [ebp-A8h] + void *v703; // [esp+10h] [ebp-A8h] + int v704; // [esp+10h] [ebp-A8h] + void *v705; // [esp+10h] [ebp-A8h] + int v706; // [esp+10h] [ebp-A8h] + void *v707; // [esp+10h] [ebp-A8h] + int v708; // [esp+10h] [ebp-A8h] + void *v709; // [esp+10h] [ebp-A8h] + int v710; // [esp+10h] [ebp-A8h] + void *v711; // [esp+10h] [ebp-A8h] + int v712; // [esp+10h] [ebp-A8h] + void *v713; // [esp+10h] [ebp-A8h] + int v714; // [esp+10h] [ebp-A8h] + void *v715; // [esp+10h] [ebp-A8h] + int v716; // [esp+10h] [ebp-A8h] + void *v717; // [esp+10h] [ebp-A8h] + int v718; // [esp+10h] [ebp-A8h] + void *v719; // [esp+10h] [ebp-A8h] + int v720; // [esp+10h] [ebp-A8h] + void *v721; // [esp+10h] [ebp-A8h] + int v722; // [esp+10h] [ebp-A8h] + void *v723; // [esp+10h] [ebp-A8h] + int v724; // [esp+10h] [ebp-A8h] + void *v725; // [esp+10h] [ebp-A8h] + int v726; // [esp+10h] [ebp-A8h] + void *v727; // [esp+10h] [ebp-A8h] + int v728; // [esp+10h] [ebp-A8h] + void *v729; // [esp+10h] [ebp-A8h] + int v730; // [esp+10h] [ebp-A8h] + void *v731; // [esp+10h] [ebp-A8h] + int v732; // [esp+10h] [ebp-A8h] + void *v733; // [esp+10h] [ebp-A8h] + int v734; // [esp+10h] [ebp-A8h] + void *v735; // [esp+10h] [ebp-A8h] + int v736; // [esp+10h] [ebp-A8h] + void *v737; // [esp+10h] [ebp-A8h] + int v738; // [esp+10h] [ebp-A8h] + void *v739; // [esp+10h] [ebp-A8h] + int v740; // [esp+10h] [ebp-A8h] + void *v741; // [esp+10h] [ebp-A8h] + int v742; // [esp+10h] [ebp-A8h] + void *v743; // [esp+10h] [ebp-A8h] + int v744; // [esp+10h] [ebp-A8h] + void *v745; // [esp+10h] [ebp-A8h] + int v746; // [esp+10h] [ebp-A8h] + void *v747; // [esp+10h] [ebp-A8h] + int v748; // [esp+10h] [ebp-A8h] + void *v749; // [esp+10h] [ebp-A8h] + int v750; // [esp+10h] [ebp-A8h] + void *v751; // [esp+10h] [ebp-A8h] + int v752; // [esp+10h] [ebp-A8h] + void *v753; // [esp+10h] [ebp-A8h] + int v754; // [esp+10h] [ebp-A8h] + void *v755; // [esp+10h] [ebp-A8h] + int v756; // [esp+10h] [ebp-A8h] + void *v757; // [esp+10h] [ebp-A8h] + int v758; // [esp+10h] [ebp-A8h] + void *v759; // [esp+10h] [ebp-A8h] + int v760; // [esp+10h] [ebp-A8h] + void *v761; // [esp+10h] [ebp-A8h] + int v762; // [esp+10h] [ebp-A8h] + void *v763; // [esp+10h] [ebp-A8h] + int v764; // [esp+10h] [ebp-A8h] + void *v765; // [esp+10h] [ebp-A8h] + int v766; // [esp+10h] [ebp-A8h] + void *v767; // [esp+10h] [ebp-A8h] + int v768; // [esp+10h] [ebp-A8h] + void *v769; // [esp+10h] [ebp-A8h] + int v770; // [esp+10h] [ebp-A8h] + void *v771; // [esp+10h] [ebp-A8h] + int v772; // [esp+10h] [ebp-A8h] + void *v773; // [esp+10h] [ebp-A8h] + int v774; // [esp+10h] [ebp-A8h] + void *v775; // [esp+10h] [ebp-A8h] + int v776; // [esp+10h] [ebp-A8h] + void *v777; // [esp+10h] [ebp-A8h] + int v778; // [esp+10h] [ebp-A8h] + void *v779; // [esp+10h] [ebp-A8h] + int v780; // [esp+10h] [ebp-A8h] + void *v781; // [esp+10h] [ebp-A8h] + int v782; // [esp+10h] [ebp-A8h] + void *v783; // [esp+10h] [ebp-A8h] + int v784; // [esp+10h] [ebp-A8h] + void *v785; // [esp+10h] [ebp-A8h] + int v786; // [esp+10h] [ebp-A8h] + void *v787; // [esp+10h] [ebp-A8h] + int v788; // [esp+10h] [ebp-A8h] + void *v789; // [esp+10h] [ebp-A8h] + int v790; // [esp+10h] [ebp-A8h] + void *v791; // [esp+10h] [ebp-A8h] + int v792; // [esp+10h] [ebp-A8h] + void *v793; // [esp+10h] [ebp-A8h] + int v794; // [esp+10h] [ebp-A8h] + void *v795; // [esp+10h] [ebp-A8h] + int v796; // [esp+10h] [ebp-A8h] + void *v797; // [esp+10h] [ebp-A8h] + int v798; // [esp+10h] [ebp-A8h] + void *v799; // [esp+10h] [ebp-A8h] + int v800; // [esp+10h] [ebp-A8h] + void *v801; // [esp+10h] [ebp-A8h] + int v802; // [esp+10h] [ebp-A8h] + void *v803; // [esp+10h] [ebp-A8h] + int v804; // [esp+10h] [ebp-A8h] + void *v805; // [esp+10h] [ebp-A8h] + int v806; // [esp+10h] [ebp-A8h] + void *v807; // [esp+10h] [ebp-A8h] + int v808; // [esp+10h] [ebp-A8h] + void *v809; // [esp+10h] [ebp-A8h] + int v810; // [esp+10h] [ebp-A8h] + void *v811; // [esp+10h] [ebp-A8h] + int v812; // [esp+10h] [ebp-A8h] + void *v813; // [esp+10h] [ebp-A8h] + int v814; // [esp+10h] [ebp-A8h] + void *v815; // [esp+10h] [ebp-A8h] + int v816; // [esp+10h] [ebp-A8h] + void *v817; // [esp+10h] [ebp-A8h] + int v818; // [esp+10h] [ebp-A8h] + void *v819; // [esp+10h] [ebp-A8h] + int v820; // [esp+10h] [ebp-A8h] + void *v821; // [esp+10h] [ebp-A8h] + int v822; // [esp+10h] [ebp-A8h] + void *v823; // [esp+10h] [ebp-A8h] + int v824; // [esp+10h] [ebp-A8h] + void *v825; // [esp+10h] [ebp-A8h] + int v826; // [esp+10h] [ebp-A8h] + void *v827; // [esp+10h] [ebp-A8h] + int v828; // [esp+10h] [ebp-A8h] + void *v829; // [esp+10h] [ebp-A8h] + int v830; // [esp+10h] [ebp-A8h] + void *v831; // [esp+10h] [ebp-A8h] + int v832; // [esp+10h] [ebp-A8h] + void *v833; // [esp+10h] [ebp-A8h] + int v834; // [esp+10h] [ebp-A8h] + void *v835; // [esp+10h] [ebp-A8h] + int v836; // [esp+10h] [ebp-A8h] + void *v837; // [esp+10h] [ebp-A8h] + int v838; // [esp+10h] [ebp-A8h] + void *v839; // [esp+10h] [ebp-A8h] + int v840; // [esp+10h] [ebp-A8h] + void *v841; // [esp+10h] [ebp-A8h] + int v842; // [esp+10h] [ebp-A8h] + void *v843; // [esp+10h] [ebp-A8h] + int v844; // [esp+10h] [ebp-A8h] + void *v845; // [esp+10h] [ebp-A8h] + int v846; // [esp+10h] [ebp-A8h] + void *v847; // [esp+10h] [ebp-A8h] + int v848; // [esp+10h] [ebp-A8h] + void *v849; // [esp+10h] [ebp-A8h] + int v850; // [esp+10h] [ebp-A8h] + void *v851; // [esp+10h] [ebp-A8h] + int v852; // [esp+10h] [ebp-A8h] + void *v853; // [esp+10h] [ebp-A8h] + int v854; // [esp+10h] [ebp-A8h] + void *v855; // [esp+10h] [ebp-A8h] + int v856; // [esp+10h] [ebp-A8h] + void *v857; // [esp+10h] [ebp-A8h] + int v858; // [esp+10h] [ebp-A8h] + void *v859; // [esp+10h] [ebp-A8h] + int v860; // [esp+10h] [ebp-A8h] + void *v861; // [esp+10h] [ebp-A8h] + int v862; // [esp+10h] [ebp-A8h] + void *v863; // [esp+10h] [ebp-A8h] + int v864; // [esp+10h] [ebp-A8h] + void *v865; // [esp+10h] [ebp-A8h] + int v866; // [esp+10h] [ebp-A8h] + void *v867; // [esp+10h] [ebp-A8h] + int v868; // [esp+10h] [ebp-A8h] + void *v869; // [esp+10h] [ebp-A8h] + int v870; // [esp+10h] [ebp-A8h] + void *v871; // [esp+10h] [ebp-A8h] + int v872; // [esp+10h] [ebp-A8h] + void *v873; // [esp+10h] [ebp-A8h] + int v874; // [esp+10h] [ebp-A8h] + void *v875; // [esp+10h] [ebp-A8h] + int v876; // [esp+10h] [ebp-A8h] + void *v877; // [esp+10h] [ebp-A8h] + int v878; // [esp+10h] [ebp-A8h] + void *v879; // [esp+10h] [ebp-A8h] + int v880; // [esp+10h] [ebp-A8h] + void *v881; // [esp+10h] [ebp-A8h] + int v882; // [esp+10h] [ebp-A8h] + void *v883; // [esp+10h] [ebp-A8h] + int v884; // [esp+10h] [ebp-A8h] + void *v885; // [esp+10h] [ebp-A8h] + int v886; // [esp+10h] [ebp-A8h] + void *v887; // [esp+10h] [ebp-A8h] + int v888; // [esp+10h] [ebp-A8h] + void *v889; // [esp+10h] [ebp-A8h] + int v890; // [esp+10h] [ebp-A8h] + void *v891; // [esp+10h] [ebp-A8h] + int v892; // [esp+10h] [ebp-A8h] + void *v893; // [esp+10h] [ebp-A8h] + int v894; // [esp+10h] [ebp-A8h] + void *v895; // [esp+10h] [ebp-A8h] + int v896; // [esp+10h] [ebp-A8h] + void *v897; // [esp+10h] [ebp-A8h] + int v898; // [esp+10h] [ebp-A8h] + void *v899; // [esp+10h] [ebp-A8h] + int v900; // [esp+10h] [ebp-A8h] + void *v901; // [esp+10h] [ebp-A8h] + int v902; // [esp+10h] [ebp-A8h] + void *v903; // [esp+10h] [ebp-A8h] + int v904; // [esp+10h] [ebp-A8h] + void *v905; // [esp+10h] [ebp-A8h] + int v906; // [esp+10h] [ebp-A8h] + void *v907; // [esp+10h] [ebp-A8h] + int v908; // [esp+10h] [ebp-A8h] + void *v909; // [esp+10h] [ebp-A8h] + int v910; // [esp+10h] [ebp-A8h] + void *v911; // [esp+10h] [ebp-A8h] + int v912; // [esp+10h] [ebp-A8h] + void *v913; // [esp+10h] [ebp-A8h] + int v914; // [esp+10h] [ebp-A8h] + void *v915; // [esp+10h] [ebp-A8h] + int v916; // [esp+10h] [ebp-A8h] + void *v917; // [esp+10h] [ebp-A8h] + int v918; // [esp+10h] [ebp-A8h] + void *v919; // [esp+10h] [ebp-A8h] + int v920; // [esp+10h] [ebp-A8h] + void *v921; // [esp+10h] [ebp-A8h] + int v922; // [esp+10h] [ebp-A8h] + void *v923; // [esp+10h] [ebp-A8h] + int v924; // [esp+10h] [ebp-A8h] + void *v925; // [esp+10h] [ebp-A8h] + int v926; // [esp+10h] [ebp-A8h] + void *v927; // [esp+10h] [ebp-A8h] + int v928; // [esp+10h] [ebp-A8h] + void *v929; // [esp+10h] [ebp-A8h] + int v930; // [esp+10h] [ebp-A8h] + void *v931; // [esp+10h] [ebp-A8h] + int v932; // [esp+10h] [ebp-A8h] + void *v933; // [esp+10h] [ebp-A8h] + int v934; // [esp+10h] [ebp-A8h] + void *v935; // [esp+10h] [ebp-A8h] + int v936; // [esp+10h] [ebp-A8h] + void *v937; // [esp+10h] [ebp-A8h] + int v938; // [esp+10h] [ebp-A8h] + void *v939; // [esp+10h] [ebp-A8h] + int v940; // [esp+10h] [ebp-A8h] + void *v941; // [esp+10h] [ebp-A8h] + int v942; // [esp+10h] [ebp-A8h] + void *v943; // [esp+10h] [ebp-A8h] + int v944; // [esp+10h] [ebp-A8h] + void *v945; // [esp+10h] [ebp-A8h] + int v946; // [esp+10h] [ebp-A8h] + void *v947; // [esp+10h] [ebp-A8h] + int v948; // [esp+10h] [ebp-A8h] + void *v949; // [esp+10h] [ebp-A8h] + int v950; // [esp+10h] [ebp-A8h] + void *v951; // [esp+10h] [ebp-A8h] + int v952; // [esp+10h] [ebp-A8h] + void *v953; // [esp+10h] [ebp-A8h] + int v954; // [esp+10h] [ebp-A8h] + void *v955; // [esp+10h] [ebp-A8h] + int v956; // [esp+10h] [ebp-A8h] + void *v957; // [esp+10h] [ebp-A8h] + int v958; // [esp+10h] [ebp-A8h] + void *v959; // [esp+10h] [ebp-A8h] + int v960; // [esp+10h] [ebp-A8h] + void *v961; // [esp+10h] [ebp-A8h] + int v962; // [esp+10h] [ebp-A8h] + void *v963; // [esp+10h] [ebp-A8h] + int v964; // [esp+10h] [ebp-A8h] + void *v965; // [esp+10h] [ebp-A8h] + int v966; // [esp+10h] [ebp-A8h] + void *v967; // [esp+10h] [ebp-A8h] + int v968; // [esp+10h] [ebp-A8h] + void *v969; // [esp+10h] [ebp-A8h] + int v970; // [esp+10h] [ebp-A8h] + void *v971; // [esp+10h] [ebp-A8h] + int v972; // [esp+10h] [ebp-A8h] + void *v973; // [esp+10h] [ebp-A8h] + int v974; // [esp+10h] [ebp-A8h] + void *v975; // [esp+10h] [ebp-A8h] + int v976; // [esp+10h] [ebp-A8h] + void *v977; // [esp+10h] [ebp-A8h] + int v978; // [esp+10h] [ebp-A8h] + void *v979; // [esp+10h] [ebp-A8h] + int v980; // [esp+10h] [ebp-A8h] + void *v981; // [esp+10h] [ebp-A8h] + int v982; // [esp+10h] [ebp-A8h] + void *v983; // [esp+10h] [ebp-A8h] + int v984; // [esp+10h] [ebp-A8h] + void *v985; // [esp+10h] [ebp-A8h] + int v986; // [esp+10h] [ebp-A8h] + void *v987; // [esp+10h] [ebp-A8h] + int v988; // [esp+10h] [ebp-A8h] + void *v989; // [esp+10h] [ebp-A8h] + int v990; // [esp+10h] [ebp-A8h] + void *v991; // [esp+10h] [ebp-A8h] + int v992; // [esp+10h] [ebp-A8h] + void *v993; // [esp+10h] [ebp-A8h] + int v994; // [esp+10h] [ebp-A8h] + void *v995; // [esp+10h] [ebp-A8h] + int v996; // [esp+10h] [ebp-A8h] + void *v997; // [esp+10h] [ebp-A8h] + int v998; // [esp+10h] [ebp-A8h] + void *v999; // [esp+10h] [ebp-A8h] + int v1000; // [esp+10h] [ebp-A8h] + void *v1001; // [esp+10h] [ebp-A8h] + int v1002; // [esp+10h] [ebp-A8h] + void *v1003; // [esp+10h] [ebp-A8h] + int v1004; // [esp+10h] [ebp-A8h] + void *v1005; // [esp+10h] [ebp-A8h] + int v1006; // [esp+10h] [ebp-A8h] + void *v1007; // [esp+10h] [ebp-A8h] + int v1008; // [esp+10h] [ebp-A8h] + void *v1009; // [esp+10h] [ebp-A8h] + int v1010; // [esp+10h] [ebp-A8h] + void *v1011; // [esp+10h] [ebp-A8h] + int v1012; // [esp+10h] [ebp-A8h] + void *v1013; // [esp+10h] [ebp-A8h] + int v1014; // [esp+10h] [ebp-A8h] + void *v1015; // [esp+10h] [ebp-A8h] + int v1016; // [esp+10h] [ebp-A8h] + void *v1017; // [esp+10h] [ebp-A8h] + int v1018; // [esp+10h] [ebp-A8h] + void *v1019; // [esp+10h] [ebp-A8h] + int v1020; // [esp+10h] [ebp-A8h] + void *v1021; // [esp+10h] [ebp-A8h] + int v1022; // [esp+10h] [ebp-A8h] + void *v1023; // [esp+10h] [ebp-A8h] + int v1024; // [esp+10h] [ebp-A8h] + void *v1025; // [esp+10h] [ebp-A8h] + int v1026; // [esp+10h] [ebp-A8h] + void *v1027; // [esp+10h] [ebp-A8h] + int v1028; // [esp+10h] [ebp-A8h] + void *v1029; // [esp+10h] [ebp-A8h] + int v1030; // [esp+10h] [ebp-A8h] + void *v1031; // [esp+10h] [ebp-A8h] + int v1032; // [esp+10h] [ebp-A8h] + void *v1033; // [esp+10h] [ebp-A8h] + int v1034; // [esp+10h] [ebp-A8h] + void *v1035; // [esp+10h] [ebp-A8h] + int v1036; // [esp+10h] [ebp-A8h] + void *v1037; // [esp+10h] [ebp-A8h] + int v1038; // [esp+10h] [ebp-A8h] + void *v1039; // [esp+10h] [ebp-A8h] + int v1040; // [esp+10h] [ebp-A8h] + void *v1041; // [esp+10h] [ebp-A8h] + int v1042; // [esp+10h] [ebp-A8h] + void *v1043; // [esp+10h] [ebp-A8h] + int v1044; // [esp+10h] [ebp-A8h] + void *v1045; // [esp+10h] [ebp-A8h] + int v1046; // [esp+10h] [ebp-A8h] + void *v1047; // [esp+10h] [ebp-A8h] + int v1048; // [esp+10h] [ebp-A8h] + void *v1049; // [esp+10h] [ebp-A8h] + int v1050; // [esp+10h] [ebp-A8h] + void *v1051; // [esp+10h] [ebp-A8h] + int v1052; // [esp+10h] [ebp-A8h] + void *v1053; // [esp+10h] [ebp-A8h] + int v1054; // [esp+10h] [ebp-A8h] + void *v1055; // [esp+10h] [ebp-A8h] + int v1056; // [esp+10h] [ebp-A8h] + void *v1057; // [esp+10h] [ebp-A8h] + int v1058; // [esp+10h] [ebp-A8h] + void *v1059; // [esp+10h] [ebp-A8h] + int v1060; // [esp+10h] [ebp-A8h] + void *v1061; // [esp+10h] [ebp-A8h] + int v1062; // [esp+10h] [ebp-A8h] + void *v1063; // [esp+10h] [ebp-A8h] + int v1064; // [esp+10h] [ebp-A8h] + void *v1065; // [esp+10h] [ebp-A8h] + int v1066; // [esp+10h] [ebp-A8h] + void *v1067; // [esp+10h] [ebp-A8h] + int v1068; // [esp+10h] [ebp-A8h] + void *v1069; // [esp+10h] [ebp-A8h] + int v1070; // [esp+10h] [ebp-A8h] + void *v1071; // [esp+10h] [ebp-A8h] + int v1072; // [esp+10h] [ebp-A8h] + void *v1073; // [esp+10h] [ebp-A8h] + int v1074; // [esp+10h] [ebp-A8h] + void *v1075; // [esp+10h] [ebp-A8h] + int v1076; // [esp+10h] [ebp-A8h] + void *v1077; // [esp+10h] [ebp-A8h] + int v1078; // [esp+10h] [ebp-A8h] + void *v1079; // [esp+10h] [ebp-A8h] + int v1080; // [esp+10h] [ebp-A8h] + void *v1081; // [esp+10h] [ebp-A8h] + int v1082; // [esp+10h] [ebp-A8h] + void *v1083; // [esp+10h] [ebp-A8h] + int v1084; // [esp+10h] [ebp-A8h] + void *v1085; // [esp+10h] [ebp-A8h] + int v1086; // [esp+10h] [ebp-A8h] + void *v1087; // [esp+10h] [ebp-A8h] + int v1088; // [esp+10h] [ebp-A8h] + void *v1089; // [esp+10h] [ebp-A8h] + int v1090; // [esp+10h] [ebp-A8h] + void *v1091; // [esp+10h] [ebp-A8h] + int v1092; // [esp+10h] [ebp-A8h] + void *v1093; // [esp+10h] [ebp-A8h] + int v1094; // [esp+10h] [ebp-A8h] + void *v1095; // [esp+10h] [ebp-A8h] + int v1096; // [esp+10h] [ebp-A8h] + void *v1097; // [esp+10h] [ebp-A8h] + int v1098; // [esp+10h] [ebp-A8h] + void *v1099; // [esp+10h] [ebp-A8h] + int v1100; // [esp+10h] [ebp-A8h] + void *v1101; // [esp+10h] [ebp-A8h] + int v1102; // [esp+10h] [ebp-A8h] + void *v1103; // [esp+10h] [ebp-A8h] + int v1104; // [esp+10h] [ebp-A8h] + void *v1105; // [esp+10h] [ebp-A8h] + int v1106; // [esp+10h] [ebp-A8h] + void *v1107; // [esp+10h] [ebp-A8h] + int v1108; // [esp+10h] [ebp-A8h] + void *v1109; // [esp+10h] [ebp-A8h] + int v1110; // [esp+10h] [ebp-A8h] + void *v1111; // [esp+10h] [ebp-A8h] + int v1112; // [esp+10h] [ebp-A8h] + void *v1113; // [esp+10h] [ebp-A8h] + int v1114; // [esp+10h] [ebp-A8h] + void *v1115; // [esp+10h] [ebp-A8h] + int v1116; // [esp+10h] [ebp-A8h] + void *v1117; // [esp+10h] [ebp-A8h] + int v1118; // [esp+10h] [ebp-A8h] + void *v1119; // [esp+10h] [ebp-A8h] + int v1120; // [esp+10h] [ebp-A8h] + void *v1121; // [esp+10h] [ebp-A8h] + int v1122; // [esp+10h] [ebp-A8h] + void *v1123; // [esp+10h] [ebp-A8h] + int v1124; // [esp+10h] [ebp-A8h] + void *v1125; // [esp+10h] [ebp-A8h] + int v1126; // [esp+10h] [ebp-A8h] + void *v1127; // [esp+10h] [ebp-A8h] + int v1128; // [esp+10h] [ebp-A8h] + void *v1129; // [esp+10h] [ebp-A8h] + int v1130; // [esp+10h] [ebp-A8h] + void *v1131; // [esp+10h] [ebp-A8h] + int v1132; // [esp+10h] [ebp-A8h] + void *v1133; // [esp+10h] [ebp-A8h] + int v1134; // [esp+10h] [ebp-A8h] + void *v1135; // [esp+10h] [ebp-A8h] + int v1136; // [esp+10h] [ebp-A8h] + void *v1137; // [esp+10h] [ebp-A8h] + int v1138; // [esp+10h] [ebp-A8h] + void *v1139; // [esp+10h] [ebp-A8h] + int v1140; // [esp+10h] [ebp-A8h] + void *v1141; // [esp+10h] [ebp-A8h] + int v1142; // [esp+10h] [ebp-A8h] + void *v1143; // [esp+10h] [ebp-A8h] + int v1144; // [esp+10h] [ebp-A8h] + void *v1145; // [esp+10h] [ebp-A8h] + int v1146; // [esp+10h] [ebp-A8h] + void *v1147; // [esp+10h] [ebp-A8h] + int v1148; // [esp+10h] [ebp-A8h] + void *v1149; // [esp+10h] [ebp-A8h] + int v1150; // [esp+10h] [ebp-A8h] + void *v1151; // [esp+10h] [ebp-A8h] + int v1152; // [esp+10h] [ebp-A8h] + void *v1153; // [esp+10h] [ebp-A8h] + int v1154; // [esp+10h] [ebp-A8h] + void *v1155; // [esp+10h] [ebp-A8h] + int v1156; // [esp+10h] [ebp-A8h] + void *v1157; // [esp+10h] [ebp-A8h] + int v1158; // [esp+10h] [ebp-A8h] + void *v1159; // [esp+10h] [ebp-A8h] + int v1160; // [esp+10h] [ebp-A8h] + void *v1161; // [esp+10h] [ebp-A8h] + int v1162; // [esp+10h] [ebp-A8h] + void *v1163; // [esp+10h] [ebp-A8h] + int v1164; // [esp+10h] [ebp-A8h] + void *v1165; // [esp+10h] [ebp-A8h] + int v1166; // [esp+10h] [ebp-A8h] + void *v1167; // [esp+10h] [ebp-A8h] + int v1168; // [esp+10h] [ebp-A8h] + void *v1169; // [esp+10h] [ebp-A8h] + int v1170; // [esp+10h] [ebp-A8h] + void *v1171; // [esp+10h] [ebp-A8h] + int v1172; // [esp+10h] [ebp-A8h] + void *v1173; // [esp+10h] [ebp-A8h] + int v1174; // [esp+10h] [ebp-A8h] + void *v1175; // [esp+10h] [ebp-A8h] + int v1176; // [esp+10h] [ebp-A8h] + void *v1177; // [esp+10h] [ebp-A8h] + int v1178; // [esp+10h] [ebp-A8h] + void *v1179; // [esp+10h] [ebp-A8h] + int v1180; // [esp+10h] [ebp-A8h] + void *v1181; // [esp+10h] [ebp-A8h] + int v1182; // [esp+10h] [ebp-A8h] + void *v1183; // [esp+10h] [ebp-A8h] + int v1184; // [esp+10h] [ebp-A8h] + void *v1185; // [esp+10h] [ebp-A8h] + int v1186; // [esp+10h] [ebp-A8h] + void *v1187; // [esp+10h] [ebp-A8h] + int v1188; // [esp+10h] [ebp-A8h] + void *v1189; // [esp+10h] [ebp-A8h] + int v1190; // [esp+10h] [ebp-A8h] + void *v1191; // [esp+10h] [ebp-A8h] + int v1192; // [esp+10h] [ebp-A8h] + void *v1193; // [esp+10h] [ebp-A8h] + int v1194; // [esp+10h] [ebp-A8h] + void *v1195; // [esp+10h] [ebp-A8h] + int v1196; // [esp+10h] [ebp-A8h] + void *v1197; // [esp+10h] [ebp-A8h] + int v1198; // [esp+10h] [ebp-A8h] + void *v1199; // [esp+10h] [ebp-A8h] + int v1200; // [esp+10h] [ebp-A8h] + void *v1201; // [esp+10h] [ebp-A8h] + int v1202; // [esp+10h] [ebp-A8h] + void *v1203; // [esp+10h] [ebp-A8h] + int v1204; // [esp+10h] [ebp-A8h] + void *v1205; // [esp+10h] [ebp-A8h] + int v1206; // [esp+10h] [ebp-A8h] + char *v1207; // [esp+14h] [ebp-A4h] + char *v1208; // [esp+14h] [ebp-A4h] + char *v1209; // [esp+14h] [ebp-A4h] + char *v1210; // [esp+14h] [ebp-A4h] + char *v1211; // [esp+14h] [ebp-A4h] + char *v1212; // [esp+14h] [ebp-A4h] + char *v1213; // [esp+14h] [ebp-A4h] + char *v1214; // [esp+14h] [ebp-A4h] + char *v1215; // [esp+14h] [ebp-A4h] + char *v1216; // [esp+14h] [ebp-A4h] + char *v1217; // [esp+14h] [ebp-A4h] + char *v1218; // [esp+14h] [ebp-A4h] + char *v1219; // [esp+14h] [ebp-A4h] + char *v1220; // [esp+14h] [ebp-A4h] + char *v1221; // [esp+14h] [ebp-A4h] + char *v1222; // [esp+14h] [ebp-A4h] + char *v1223; // [esp+14h] [ebp-A4h] + char *v1224; // [esp+14h] [ebp-A4h] + char *v1225; // [esp+14h] [ebp-A4h] + char *v1226; // [esp+14h] [ebp-A4h] + char *v1227; // [esp+14h] [ebp-A4h] + char *v1228; // [esp+14h] [ebp-A4h] + char *v1229; // [esp+14h] [ebp-A4h] + char *v1230; // [esp+14h] [ebp-A4h] + char *v1231; // [esp+14h] [ebp-A4h] + char *v1232; // [esp+14h] [ebp-A4h] + char *v1233; // [esp+14h] [ebp-A4h] + char *v1234; // [esp+14h] [ebp-A4h] + char *v1235; // [esp+14h] [ebp-A4h] + char *v1236; // [esp+14h] [ebp-A4h] + char *v1237; // [esp+14h] [ebp-A4h] + char *v1238; // [esp+14h] [ebp-A4h] + char *v1239; // [esp+14h] [ebp-A4h] + char *v1240; // [esp+14h] [ebp-A4h] + char *v1241; // [esp+14h] [ebp-A4h] + char *v1242; // [esp+14h] [ebp-A4h] + char *v1243; // [esp+14h] [ebp-A4h] + char *v1244; // [esp+14h] [ebp-A4h] + char *v1245; // [esp+14h] [ebp-A4h] + char *v1246; // [esp+14h] [ebp-A4h] + char *v1247; // [esp+14h] [ebp-A4h] + char *v1248; // [esp+14h] [ebp-A4h] + char *v1249; // [esp+14h] [ebp-A4h] + char *v1250; // [esp+14h] [ebp-A4h] + char *v1251; // [esp+14h] [ebp-A4h] + char *v1252; // [esp+14h] [ebp-A4h] + char *v1253; // [esp+14h] [ebp-A4h] + char *v1254; // [esp+14h] [ebp-A4h] + char *v1255; // [esp+14h] [ebp-A4h] + char *v1256; // [esp+14h] [ebp-A4h] + char *v1257; // [esp+14h] [ebp-A4h] + char *v1258; // [esp+14h] [ebp-A4h] + char *v1259; // [esp+14h] [ebp-A4h] + char *v1260; // [esp+14h] [ebp-A4h] + char *v1261; // [esp+14h] [ebp-A4h] + char *v1262; // [esp+14h] [ebp-A4h] + char *v1263; // [esp+14h] [ebp-A4h] + char *v1264; // [esp+14h] [ebp-A4h] + char *v1265; // [esp+14h] [ebp-A4h] + char *v1266; // [esp+14h] [ebp-A4h] + char *v1267; // [esp+14h] [ebp-A4h] + char *v1268; // [esp+14h] [ebp-A4h] + char *v1269; // [esp+14h] [ebp-A4h] + char *v1270; // [esp+14h] [ebp-A4h] + char *v1271; // [esp+14h] [ebp-A4h] + char *v1272; // [esp+14h] [ebp-A4h] + char *v1273; // [esp+14h] [ebp-A4h] + char *v1274; // [esp+14h] [ebp-A4h] + char *v1275; // [esp+14h] [ebp-A4h] + char *v1276; // [esp+14h] [ebp-A4h] + char *v1277; // [esp+14h] [ebp-A4h] + char *v1278; // [esp+14h] [ebp-A4h] + char *v1279; // [esp+14h] [ebp-A4h] + char *v1280; // [esp+14h] [ebp-A4h] + char *v1281; // [esp+14h] [ebp-A4h] + char *v1282; // [esp+14h] [ebp-A4h] + char *v1283; // [esp+14h] [ebp-A4h] + char *v1284; // [esp+14h] [ebp-A4h] + char *v1285; // [esp+14h] [ebp-A4h] + char *v1286; // [esp+14h] [ebp-A4h] + char *v1287; // [esp+14h] [ebp-A4h] + char *v1288; // [esp+14h] [ebp-A4h] + char *v1289; // [esp+14h] [ebp-A4h] + char *v1290; // [esp+14h] [ebp-A4h] + char *v1291; // [esp+14h] [ebp-A4h] + char *v1292; // [esp+14h] [ebp-A4h] + char *v1293; // [esp+14h] [ebp-A4h] + char *v1294; // [esp+14h] [ebp-A4h] + char *v1295; // [esp+14h] [ebp-A4h] + char *v1296; // [esp+14h] [ebp-A4h] + char *v1297; // [esp+14h] [ebp-A4h] + char *v1298; // [esp+14h] [ebp-A4h] + char *v1299; // [esp+14h] [ebp-A4h] + char *v1300; // [esp+14h] [ebp-A4h] + char *v1301; // [esp+14h] [ebp-A4h] + char *v1302; // [esp+14h] [ebp-A4h] + char *v1303; // [esp+14h] [ebp-A4h] + char *v1304; // [esp+14h] [ebp-A4h] + char *v1305; // [esp+14h] [ebp-A4h] + char *v1306; // [esp+14h] [ebp-A4h] + char *v1307; // [esp+14h] [ebp-A4h] + char *v1308; // [esp+14h] [ebp-A4h] + char *v1309; // [esp+14h] [ebp-A4h] + char *v1310; // [esp+14h] [ebp-A4h] + char *v1311; // [esp+14h] [ebp-A4h] + char *v1312; // [esp+14h] [ebp-A4h] + char *v1313; // [esp+14h] [ebp-A4h] + char *v1314; // [esp+14h] [ebp-A4h] + char *v1315; // [esp+14h] [ebp-A4h] + char *v1316; // [esp+14h] [ebp-A4h] + char *v1317; // [esp+14h] [ebp-A4h] + char *v1318; // [esp+14h] [ebp-A4h] + char *v1319; // [esp+14h] [ebp-A4h] + char *v1320; // [esp+14h] [ebp-A4h] + char *v1321; // [esp+14h] [ebp-A4h] + char *v1322; // [esp+14h] [ebp-A4h] + char *v1323; // [esp+14h] [ebp-A4h] + char *v1324; // [esp+14h] [ebp-A4h] + char *v1325; // [esp+14h] [ebp-A4h] + char *v1326; // [esp+14h] [ebp-A4h] + char *v1327; // [esp+14h] [ebp-A4h] + char *v1328; // [esp+14h] [ebp-A4h] + char *v1329; // [esp+14h] [ebp-A4h] + char *v1330; // [esp+14h] [ebp-A4h] + char *v1331; // [esp+14h] [ebp-A4h] + char *v1332; // [esp+14h] [ebp-A4h] + char *v1333; // [esp+14h] [ebp-A4h] + char *v1334; // [esp+14h] [ebp-A4h] + char *v1335; // [esp+14h] [ebp-A4h] + char *v1336; // [esp+14h] [ebp-A4h] + char *v1337; // [esp+14h] [ebp-A4h] + char *v1338; // [esp+14h] [ebp-A4h] + char *v1339; // [esp+14h] [ebp-A4h] + char *v1340; // [esp+14h] [ebp-A4h] + char *v1341; // [esp+14h] [ebp-A4h] + char *v1342; // [esp+14h] [ebp-A4h] + char *v1343; // [esp+14h] [ebp-A4h] + char *v1344; // [esp+14h] [ebp-A4h] + char *v1345; // [esp+14h] [ebp-A4h] + char *v1346; // [esp+14h] [ebp-A4h] + char *v1347; // [esp+14h] [ebp-A4h] + char *v1348; // [esp+14h] [ebp-A4h] + char *v1349; // [esp+14h] [ebp-A4h] + char *v1350; // [esp+14h] [ebp-A4h] + char *v1351; // [esp+14h] [ebp-A4h] + char *v1352; // [esp+14h] [ebp-A4h] + char *v1353; // [esp+14h] [ebp-A4h] + char *v1354; // [esp+14h] [ebp-A4h] + char *v1355; // [esp+14h] [ebp-A4h] + char *v1356; // [esp+14h] [ebp-A4h] + char *v1357; // [esp+14h] [ebp-A4h] + char *v1358; // [esp+14h] [ebp-A4h] + char *v1359; // [esp+14h] [ebp-A4h] + char *v1360; // [esp+14h] [ebp-A4h] + char *v1361; // [esp+14h] [ebp-A4h] + char *v1362; // [esp+14h] [ebp-A4h] + char *v1363; // [esp+14h] [ebp-A4h] + char *v1364; // [esp+14h] [ebp-A4h] + char *v1365; // [esp+14h] [ebp-A4h] + char *v1366; // [esp+14h] [ebp-A4h] + char *v1367; // [esp+14h] [ebp-A4h] + char *v1368; // [esp+14h] [ebp-A4h] + char *v1369; // [esp+14h] [ebp-A4h] + char *v1370; // [esp+14h] [ebp-A4h] + char *v1371; // [esp+14h] [ebp-A4h] + char *v1372; // [esp+14h] [ebp-A4h] + char *v1373; // [esp+14h] [ebp-A4h] + char *v1374; // [esp+14h] [ebp-A4h] + char *v1375; // [esp+14h] [ebp-A4h] + char *v1376; // [esp+14h] [ebp-A4h] + char *v1377; // [esp+14h] [ebp-A4h] + char *v1378; // [esp+14h] [ebp-A4h] + char *v1379; // [esp+14h] [ebp-A4h] + char *v1380; // [esp+14h] [ebp-A4h] + char *v1381; // [esp+14h] [ebp-A4h] + char *v1382; // [esp+14h] [ebp-A4h] + char *v1383; // [esp+14h] [ebp-A4h] + char *v1384; // [esp+14h] [ebp-A4h] + char *v1385; // [esp+14h] [ebp-A4h] + char *v1386; // [esp+14h] [ebp-A4h] + char *v1387; // [esp+14h] [ebp-A4h] + char *v1388; // [esp+14h] [ebp-A4h] + char *v1389; // [esp+14h] [ebp-A4h] + char *v1390; // [esp+14h] [ebp-A4h] + char *v1391; // [esp+14h] [ebp-A4h] + char *v1392; // [esp+14h] [ebp-A4h] + char *v1393; // [esp+14h] [ebp-A4h] + char *v1394; // [esp+14h] [ebp-A4h] + char *v1395; // [esp+14h] [ebp-A4h] + char *v1396; // [esp+14h] [ebp-A4h] + char *v1397; // [esp+14h] [ebp-A4h] + char *v1398; // [esp+14h] [ebp-A4h] + char *v1399; // [esp+14h] [ebp-A4h] + char *lpuexcpta; // [esp+18h] [ebp-A0h] + int v1402; // [esp+54h] [ebp-64h] BYREF + volatile signed __int32 *v1403; // [esp+58h] [ebp-60h] BYREF + int v1404; // [esp+5Ch] [ebp-5Ch] BYREF + volatile signed __int32 *v1405; // [esp+60h] [ebp-58h] BYREF + int v1406; // [esp+64h] [ebp-54h] BYREF + volatile signed __int32 *v1407; // [esp+68h] [ebp-50h] BYREF + int v1408; // [esp+6Ch] [ebp-4Ch] BYREF + volatile signed __int32 *v1409; // [esp+70h] [ebp-48h] BYREF + int v1410; // [esp+74h] [ebp-44h] BYREF + volatile signed __int32 *v1411; // [esp+78h] [ebp-40h] BYREF + int v1412; // [esp+7Ch] [ebp-3Ch] BYREF + volatile signed __int32 *v1413; // [esp+80h] [ebp-38h] BYREF + int v1414; // [esp+84h] [ebp-34h] BYREF + volatile signed __int32 *v1415; // [esp+88h] [ebp-30h] BYREF + int v1416; // [esp+8Ch] [ebp-2Ch] BYREF + volatile signed __int32 *v1417; // [esp+90h] [ebp-28h] BYREF + int v1418; // [esp+94h] [ebp-24h] + _DWORD *v1419; // [esp+98h] [ebp-20h] BYREF + volatile signed __int32 *v1420; // [esp+9Ch] [ebp-1Ch] BYREF + int v1421; // [esp+A0h] [ebp-18h] + + if ( !*(_BYTE *)(a1 + 24) ) + { + *(_BYTE *)(a1 + 24) = 1; + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v2 = std::map>>::operator[]((_DWORD *)a1, v1); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v2, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 1; + v3 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1207 = std::map>::operator[](v3, &v1419); + std::vector::_M_move_assign((void ***)v1207, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v4 = operator new(4u); + *v4 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v4); + std::vector>::push_back((void **)&v1416, &v1412); + v623 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v623); + zcc::shared_ptr::shared_ptr(&v1414, (int)v623); + v624 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v624 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v5 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v5 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1207, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + v1414 = 1; + v6 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1208 = std::map>::operator[](v6, &v1419); + std::vector::_M_move_assign((void ***)v1208, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v625 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v625); + zcc::shared_ptr::shared_ptr(&v1412, (int)v625); + v626 = v1412; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + std::string::_M_assign(v626 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v627 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v627); + zcc::shared_ptr::shared_ptr(&v1414, (int)v627); + v628 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v628 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v7 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v7 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1208, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 1; + v8 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1209 = std::map>::operator[](v8, &v1419); + std::vector::_M_move_assign((void ***)v1209, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v629 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v629); + zcc::shared_ptr::shared_ptr(&v1414, (int)v629); + v630 = v1414; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + std::string::_M_assign(v630 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v9 = operator new(8u); + *v9 = &off_519A44; + v9[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v9); + v1419[1] = 30; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1209, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + v1414 = 1; + v10 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1210 = std::map>::operator[](v10, &v1419); + std::vector::_M_move_assign((void ***)v1210, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v11 = operator new(4u); + *v11 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v11); + std::vector>::push_back((void **)&v1416, &v1412); + v631 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v631); + zcc::shared_ptr::shared_ptr(&v1414, (int)v631); + v632 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v632 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v12 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v12 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1210, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 1; + v13 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1211 = std::map>::operator[](v13, &v1419); + std::vector::_M_move_assign((void ***)v1211, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v14 = operator new(4u); + *v14 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v14); + std::vector>::push_back((void **)&v1416, &v1412); + v633 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v633); + zcc::shared_ptr::shared_ptr(&v1414, (int)v633); + v634 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v634 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v15 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v15 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1211, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 2; + v17 = std::map>>::operator[]((_DWORD *)a1, v16); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v17, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 2; + v18 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1212 = std::map>::operator[](v18, &v1419); + std::vector::_M_move_assign((void ***)v1212, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v635 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v635); + zcc::shared_ptr::shared_ptr(&v1414, (int)v635); + v636 = v1414; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v636 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v19 = operator new(8u); + *v19 = &off_519A44; + v19[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v19); + v1419[1] = 27; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1212, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 2; + v20 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1213 = std::map>::operator[](v20, &v1419); + std::vector::_M_move_assign((void ***)v1213, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v637 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v637); + zcc::shared_ptr::shared_ptr(&v1410, (int)v637); + v638 = v1410; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + std::string::_M_assign(v638 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v639 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v639); + zcc::shared_ptr::shared_ptr(&v1412, (int)v639); + v640 = v1412; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v640 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v641 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v641); + zcc::shared_ptr::shared_ptr(&v1414, (int)v641); + v642 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v642 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v21 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v21 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1213, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 2; + v22 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1214 = std::map>::operator[](v22, &v1419); + std::vector::_M_move_assign((void ***)v1214, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v643 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v643); + zcc::shared_ptr::shared_ptr(&v1412, (int)v643); + v644 = v1412; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + std::string::_M_assign(v644 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v645 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v645); + zcc::shared_ptr::shared_ptr(&v1414, (int)v645); + v646 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v646 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v23 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v23 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1214, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 2; + v24 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1215 = std::map>::operator[](v24, &v1419); + std::vector::_M_move_assign((void ***)v1215, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v647 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v647); + zcc::shared_ptr::shared_ptr(&v1412, (int)v647); + v648 = v1412; + std::string::basic_string((void **)&v1419, "["); + std::string::_M_assign(v648 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v649 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v649); + zcc::shared_ptr::shared_ptr(&v1414, (int)v649); + v650 = v1414; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v650 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v25 = operator new(8u); + *v25 = &off_519A44; + v25[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v25); + v1419[1] = 28; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1215, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 2; + v26 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1216 = std::map>::operator[](v26, &v1419); + std::vector::_M_move_assign((void ***)v1216, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v651 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v651); + zcc::shared_ptr::shared_ptr(&v1414, (int)v651); + v652 = v1414; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + std::string::_M_assign(v652 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v27 = operator new(8u); + *v27 = &off_519A44; + v27[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v27); + v1419[1] = 5; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1216, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 2; + v28 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1217 = std::map>::operator[](v28, &v1419); + std::vector::_M_move_assign((void ***)v1217, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v653 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v653); + zcc::shared_ptr::shared_ptr(&v1410, (int)v653); + v654 = v1410; + std::string::basic_string((void **)&v1419, ">"); + std::string::_M_assign(v654 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v655 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v655); + zcc::shared_ptr::shared_ptr(&v1412, (int)v655); + v656 = v1412; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v656 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v657 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v657); + zcc::shared_ptr::shared_ptr(&v1414, (int)v657); + v658 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v658 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v29 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v29 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1217, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 3; + v31 = std::map>>::operator[]((_DWORD *)a1, v30); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v31, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 3; + v32 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1218 = std::map>::operator[](v32, &v1419); + std::vector::_M_move_assign((void ***)v1218, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v33 = operator new(8u); + *v33 = &off_519A44; + v33[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v33); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v659 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v659); + zcc::shared_ptr::shared_ptr(&v1414, (int)v659); + v660 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v660 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v34 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v34 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v35 = operator new(8u); + *v35 = &off_519A44; + v35[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v35); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1218, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@charset"); + v1414 = 3; + v36 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1219 = std::map>::operator[](v36, &v1419); + std::vector::_M_move_assign((void ***)v1219, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v37 = operator new(8u); + *v37 = &off_519A44; + v37[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v37); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v661 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v661); + zcc::shared_ptr::shared_ptr(&v1414, (int)v661); + v662 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v662 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v38 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v38 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v39 = operator new(8u); + *v39 = &off_519A44; + v39[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v39); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1219, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 3; + v40 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1220 = std::map>::operator[](v40, &v1419); + std::vector::_M_move_assign((void ***)v1220, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v41 = operator new(4u); + *v41 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v41); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1220, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 3; + v42 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1221 = std::map>::operator[](v42, &v1419); + std::vector::_M_move_assign((void ***)v1221, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v43 = operator new(8u); + *v43 = &off_519A44; + v43[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v43); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v663 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v663); + zcc::shared_ptr::shared_ptr(&v1414, (int)v663); + v664 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v664 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v44 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v44 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v45 = operator new(8u); + *v45 = &off_519A44; + v45[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v45); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1221, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@media"); + v1414 = 3; + v46 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1222 = std::map>::operator[](v46, &v1419); + std::vector::_M_move_assign((void ***)v1222, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v47 = operator new(8u); + *v47 = &off_519A44; + v47[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v47); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v665 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v665); + zcc::shared_ptr::shared_ptr(&v1414, (int)v665); + v666 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v666 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v48 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v48 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v49 = operator new(8u); + *v49 = &off_519A44; + v49[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v49); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1222, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@keyframes"); + v1414 = 3; + v50 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1223 = std::map>::operator[](v50, &v1419); + std::vector::_M_move_assign((void ***)v1223, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v51 = operator new(8u); + *v51 = &off_519A44; + v51[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v51); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v667 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v667); + zcc::shared_ptr::shared_ptr(&v1414, (int)v667); + v668 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v668 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v52 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v52 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v53 = operator new(8u); + *v53 = &off_519A44; + v53[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v53); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1223, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@supports"); + v1414 = 3; + v54 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1224 = std::map>::operator[](v54, &v1419); + std::vector::_M_move_assign((void ***)v1224, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v55 = operator new(8u); + *v55 = &off_519A44; + v55[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v55); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v669 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v669); + zcc::shared_ptr::shared_ptr(&v1414, (int)v669); + v670 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v670 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v56 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v56 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v57 = operator new(8u); + *v57 = &off_519A44; + v57[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v57); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1224, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@-webkit-keyframes"); + v1414 = 3; + v58 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1225 = std::map>::operator[](v58, &v1419); + std::vector::_M_move_assign((void ***)v1225, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v59 = operator new(8u); + *v59 = &off_519A44; + v59[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v59); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v671 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v671); + zcc::shared_ptr::shared_ptr(&v1414, (int)v671); + v672 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v672 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v60 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v60 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v61 = operator new(8u); + *v61 = &off_519A44; + v61[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v61); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1225, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@import"); + v1414 = 3; + v62 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1226 = std::map>::operator[](v62, &v1419); + std::vector::_M_move_assign((void ***)v1226, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v63 = operator new(8u); + *v63 = &off_519A44; + v63[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v63); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v673 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v673); + zcc::shared_ptr::shared_ptr(&v1414, (int)v673); + v674 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v674 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v64 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v64 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v65 = operator new(8u); + *v65 = &off_519A44; + v65[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v65); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1226, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 3; + v66 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1227 = std::map>::operator[](v66, &v1419); + std::vector::_M_move_assign((void ***)v1227, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v67 = operator new(8u); + *v67 = &off_519A44; + v67[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v67); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v675 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v675); + zcc::shared_ptr::shared_ptr(&v1414, (int)v675); + v676 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v676 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v68 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v68 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v69 = operator new(8u); + *v69 = &off_519A44; + v69[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v69); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1227, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 3; + v70 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1228 = std::map>::operator[](v70, &v1419); + std::vector::_M_move_assign((void ***)v1228, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v71 = operator new(8u); + *v71 = &off_519A44; + v71[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v71); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v677 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v677); + zcc::shared_ptr::shared_ptr(&v1414, (int)v677); + v678 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v678 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v72 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v72 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v73 = operator new(8u); + *v73 = &off_519A44; + v73[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v73); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1228, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + v1414 = 3; + v74 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1229 = std::map>::operator[](v74, &v1419); + std::vector::_M_move_assign((void ***)v1229, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v75 = operator new(4u); + *v75 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v75); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1229, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 3; + v76 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1230 = std::map>::operator[](v76, &v1419); + std::vector::_M_move_assign((void ***)v1230, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v77 = operator new(8u); + *v77 = &off_519A44; + v77[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v77); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v679 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v679); + zcc::shared_ptr::shared_ptr(&v1414, (int)v679); + v680 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v680 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v78 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v78 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v79 = operator new(8u); + *v79 = &off_519A44; + v79[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v79); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1230, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 3; + v80 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1231 = std::map>::operator[](v80, &v1419); + std::vector::_M_move_assign((void ***)v1231, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v81 = operator new(8u); + *v81 = &off_519A44; + v81[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v81); + *(_DWORD *)(v1412 + 4) = 14; + std::vector>::push_back((void **)&v1416, &v1412); + v681 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v681); + zcc::shared_ptr::shared_ptr(&v1414, (int)v681); + v682 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v682 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v82 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v82 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v83 = operator new(8u); + *v83 = &off_519A44; + v83[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v83); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1231, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 4; + v85 = std::map>>::operator[]((_DWORD *)a1, v84); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v85, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 4; + v86 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1232 = std::map>::operator[](v86, &v1419); + std::vector::_M_move_assign((void ***)v1232, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v683 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v683); + zcc::shared_ptr::shared_ptr(&v1410, (int)v683); + v684 = v1410; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v684 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v685 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v685); + zcc::shared_ptr::shared_ptr(&v1412, (int)v685); + v686 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v686 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v687 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v687); + zcc::shared_ptr::shared_ptr(&v1414, (int)v687); + v688 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v688 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v87 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v87 + 32) = 6; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1232, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$VALUE"); + v1414 = 4; + v88 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1233 = std::map>::operator[](v88, &v1419); + std::vector::_M_move_assign((void ***)v1233, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v689 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v689); + zcc::shared_ptr::shared_ptr(&v1410, (int)v689); + v690 = v1410; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v690 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v691 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v691); + zcc::shared_ptr::shared_ptr(&v1412, (int)v691); + v692 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v692 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v693 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v693); + zcc::shared_ptr::shared_ptr(&v1414, (int)v693); + v694 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v694 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v89 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v89 + 32) = 6; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1233, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 5; + v91 = std::map>>::operator[]((_DWORD *)a1, v90); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v91, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "nth-last-child"); + v1414 = 5; + v92 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1234 = std::map>::operator[](v92, &v1419); + std::vector::_M_move_assign((void ***)v1234, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v695 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v695); + zcc::shared_ptr::shared_ptr(&v1406, (int)v695); + v696 = v1406; + std::string::basic_string((void **)&v1419, "nth-last-child"); + std::string::_M_assign(v696 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v697 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v697); + zcc::shared_ptr::shared_ptr(&v1408, (int)v697); + v698 = v1408; + std::string::basic_string((void **)&v1419, "("); + std::string::_M_assign(v698 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v93 = operator new(8u); + *v93 = &off_519A44; + v93[1] = 0; + zcc::shared_ptr::shared_ptr(&v1410, (int)v93); + *(_DWORD *)(v1410 + 4) = 29; + std::vector>::push_back((void **)&v1416, &v1410); + v699 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v699); + zcc::shared_ptr::shared_ptr(&v1412, (int)v699); + v700 = v1412; + std::string::basic_string((void **)&v1419, ")"); + std::string::_M_assign(v700 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v701 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v701); + zcc::shared_ptr::shared_ptr(&v1414, (int)v701); + v702 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v702 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v94 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v94 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1234, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 5; + v95 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1235 = std::map>::operator[](v95, &v1419); + std::vector::_M_move_assign((void ***)v1235, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v703 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v703); + zcc::shared_ptr::shared_ptr(&v1414, (int)v703); + v704 = v1414; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v704 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v96 = operator new(8u); + *v96 = &off_519A44; + v96[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v96); + v1419[1] = 18; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1235, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "nth-last-of-type"); + v1414 = 5; + v97 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1236 = std::map>::operator[](v97, &v1419); + std::vector::_M_move_assign((void ***)v1236, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v705 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v705); + zcc::shared_ptr::shared_ptr(&v1406, (int)v705); + v706 = v1406; + std::string::basic_string((void **)&v1419, "nth-last-of-type"); + std::string::_M_assign(v706 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v707 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v707); + zcc::shared_ptr::shared_ptr(&v1408, (int)v707); + v708 = v1408; + std::string::basic_string((void **)&v1419, "("); + std::string::_M_assign(v708 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v98 = operator new(8u); + *v98 = &off_519A44; + v98[1] = 0; + zcc::shared_ptr::shared_ptr(&v1410, (int)v98); + *(_DWORD *)(v1410 + 4) = 29; + std::vector>::push_back((void **)&v1416, &v1410); + v709 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v709); + zcc::shared_ptr::shared_ptr(&v1412, (int)v709); + v710 = v1412; + std::string::basic_string((void **)&v1419, ")"); + std::string::_M_assign(v710 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v711 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v711); + zcc::shared_ptr::shared_ptr(&v1414, (int)v711); + v712 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v712 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v99 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v99 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1236, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "nth-child"); + v1414 = 5; + v100 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1237 = std::map>::operator[](v100, &v1419); + std::vector::_M_move_assign((void ***)v1237, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v713 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v713); + zcc::shared_ptr::shared_ptr(&v1406, (int)v713); + v714 = v1406; + std::string::basic_string((void **)&v1419, "nth-child"); + std::string::_M_assign(v714 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v715 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v715); + zcc::shared_ptr::shared_ptr(&v1408, (int)v715); + v716 = v1408; + std::string::basic_string((void **)&v1419, "("); + std::string::_M_assign(v716 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v101 = operator new(8u); + *v101 = &off_519A44; + v101[1] = 0; + zcc::shared_ptr::shared_ptr(&v1410, (int)v101); + *(_DWORD *)(v1410 + 4) = 29; + std::vector>::push_back((void **)&v1416, &v1410); + v717 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v717); + zcc::shared_ptr::shared_ptr(&v1412, (int)v717); + v718 = v1412; + std::string::basic_string((void **)&v1419, ")"); + std::string::_M_assign(v718 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v719 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v719); + zcc::shared_ptr::shared_ptr(&v1414, (int)v719); + v720 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v720 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v102 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v102 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1237, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "nth-of-type"); + v1414 = 5; + v103 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1238 = std::map>::operator[](v103, &v1419); + std::vector::_M_move_assign((void ***)v1238, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v721 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v721); + zcc::shared_ptr::shared_ptr(&v1406, (int)v721); + v722 = v1406; + std::string::basic_string((void **)&v1419, "nth-of-type"); + std::string::_M_assign(v722 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v723 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v723); + zcc::shared_ptr::shared_ptr(&v1408, (int)v723); + v724 = v1408; + std::string::basic_string((void **)&v1419, "("); + std::string::_M_assign(v724 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v104 = operator new(8u); + *v104 = &off_519A44; + v104[1] = 0; + zcc::shared_ptr::shared_ptr(&v1410, (int)v104); + *(_DWORD *)(v1410 + 4) = 29; + std::vector>::push_back((void **)&v1416, &v1410); + v725 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v725); + zcc::shared_ptr::shared_ptr(&v1412, (int)v725); + v726 = v1412; + std::string::basic_string((void **)&v1419, ")"); + std::string::_M_assign(v726 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v727 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v727); + zcc::shared_ptr::shared_ptr(&v1414, (int)v727); + v728 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v728 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v105 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v105 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1238, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 5; + v106 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1239 = std::map>::operator[](v106, &v1419); + std::vector::_M_move_assign((void ***)v1239, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v729 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v729); + zcc::shared_ptr::shared_ptr(&v1410, (int)v729); + v730 = v1410; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + std::string::_M_assign(v730 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v731 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v731); + zcc::shared_ptr::shared_ptr(&v1412, (int)v731); + v732 = v1412; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v732 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v733 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v733); + zcc::shared_ptr::shared_ptr(&v1414, (int)v733); + v734 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v734 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v107 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v107 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1239, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 6; + v109 = std::map>>::operator[]((_DWORD *)a1, v108); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v109, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 6; + v110 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1240 = std::map>::operator[](v110, &v1419); + std::vector::_M_move_assign((void ***)v1240, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v111 = operator new(8u); + *v111 = &off_519A44; + v111[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v111); + *(_DWORD *)(v1412 + 4) = 10; + std::vector>::push_back((void **)&v1416, &v1412); + v735 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v735); + zcc::shared_ptr::shared_ptr(&v1414, (int)v735); + v736 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v736 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTRS"); + v112 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v112 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v113 = operator new(8u); + *v113 = &off_519A44; + v113[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v113); + v1419[1] = 6; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1240, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + v1414 = 6; + v114 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1241 = std::map>::operator[](v114, &v1419); + std::vector::_M_move_assign((void ***)v1241, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v115 = operator new(4u); + *v115 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v115); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1241, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 6; + v116 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1242 = std::map>::operator[](v116, &v1419); + std::vector::_M_move_assign((void ***)v1242, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v117 = operator new(4u); + *v117 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v117); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1242, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 7; + v119 = std::map>>::operator[]((_DWORD *)a1, v118); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v119, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ")"); + v1414 = 7; + v120 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1243 = std::map>::operator[](v120, &v1419); + std::vector::_M_move_assign((void ***)v1243, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v121 = operator new(4u); + *v121 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v121); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1243, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 7; + v122 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1244 = std::map>::operator[](v122, &v1419); + std::vector::_M_move_assign((void ***)v1244, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v737 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v737); + zcc::shared_ptr::shared_ptr(&v1410, (int)v737); + v738 = v1410; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + std::string::_M_assign(v738 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v739 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v739); + zcc::shared_ptr::shared_ptr(&v1412, (int)v739); + v740 = v1412; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v740 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v741 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v741); + zcc::shared_ptr::shared_ptr(&v1414, (int)v741); + v742 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v742 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "EXPRESS"); + v123 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v123 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + v124 = operator new(8u); + *v124 = &off_519A44; + v124[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v124); + v1419[1] = 7; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1244, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 7; + v125 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1245 = std::map>::operator[](v125, &v1419); + std::vector::_M_move_assign((void ***)v1245, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v126 = operator new(4u); + *v126 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v126); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1245, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 8; + v128 = std::map>>::operator[]((_DWORD *)a1, v127); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v128, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 8; + v129 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1246 = std::map>::operator[](v129, &v1419); + std::vector::_M_move_assign((void ***)v1246, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v743 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v743); + zcc::shared_ptr::shared_ptr(&v1410, (int)v743); + v744 = v1410; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v744 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v745 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v745); + zcc::shared_ptr::shared_ptr(&v1412, (int)v745); + v746 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v746 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v747 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v747); + zcc::shared_ptr::shared_ptr(&v1414, (int)v747); + v748 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v748 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v130 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v130 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1246, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$VALUE"); + v1414 = 8; + v131 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1247 = std::map>::operator[](v131, &v1419); + std::vector::_M_move_assign((void ***)v1247, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v749 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v749); + zcc::shared_ptr::shared_ptr(&v1410, (int)v749); + v750 = v1410; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v750 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v751 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v751); + zcc::shared_ptr::shared_ptr(&v1412, (int)v751); + v752 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v752 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v753 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v753); + zcc::shared_ptr::shared_ptr(&v1414, (int)v753); + v754 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v754 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v132 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v132 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1247, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F7B4); + v1414 = 8; + v133 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1248 = std::map>::operator[](v133, &v1419); + std::vector::_M_move_assign((void ***)v1248, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v755 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v755); + zcc::shared_ptr::shared_ptr(&v1414, (int)v755); + v756 = v1414; + std::string::basic_string((void **)&v1419, (char *)off_50F7B4); + std::string::_M_assign(v756 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v134 = operator new(8u); + *v134 = &off_519A44; + v134[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v134); + v1419[1] = 16; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1248, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 9; + v136 = std::map>>::operator[]((_DWORD *)a1, v135); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v136, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 9; + v137 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1249 = std::map>::operator[](v137, &v1419); + std::vector::_M_move_assign((void ***)v1249, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v138 = operator new(4u); + *v138 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v138); + std::vector>::push_back((void **)&v1416, &v1412); + v757 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v757); + zcc::shared_ptr::shared_ptr(&v1414, (int)v757); + v758 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v758 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v139 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v139 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1249, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + v1414 = 9; + v140 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1250 = std::map>::operator[](v140, &v1419); + std::vector::_M_move_assign((void ***)v1250, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v759 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v759); + zcc::shared_ptr::shared_ptr(&v1412, (int)v759); + v760 = v1412; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + std::string::_M_assign(v760 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v761 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v761); + zcc::shared_ptr::shared_ptr(&v1414, (int)v761); + v762 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v762 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v141 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v141 + 32) = 4; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1250, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + v1414 = 9; + v142 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1251 = std::map>::operator[](v142, &v1419); + std::vector::_M_move_assign((void ***)v1251, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v143 = operator new(4u); + *v143 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v143); + std::vector>::push_back((void **)&v1416, &v1412); + v763 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v763); + zcc::shared_ptr::shared_ptr(&v1414, (int)v763); + v764 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v764 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v144 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v144 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1251, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 9; + v145 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1252 = std::map>::operator[](v145, &v1419); + std::vector::_M_move_assign((void ***)v1252, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v146 = operator new(4u); + *v146 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v146); + std::vector>::push_back((void **)&v1416, &v1412); + v765 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v765); + zcc::shared_ptr::shared_ptr(&v1414, (int)v765); + v766 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v766 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v147 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v147 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1252, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 10; + v149 = std::map>>::operator[]((_DWORD *)a1, v148); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v149, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 10; + v150 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1253 = std::map>::operator[](v150, &v1419); + std::vector::_M_move_assign((void ***)v1253, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v767 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v767); + zcc::shared_ptr::shared_ptr(&v1414, (int)v767); + v768 = v1414; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v768 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v151 = operator new(8u); + *v151 = &off_519A44; + v151[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v151); + v1419[1] = 1; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1253, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 11; + v153 = std::map>>::operator[]((_DWORD *)a1, v152); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v153, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 11; + v154 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1254 = std::map>::operator[](v154, &v1419); + std::vector::_M_move_assign((void ***)v1254, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v155 = operator new(4u); + *v155 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v155); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1254, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 11; + v156 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1255 = std::map>::operator[](v156, &v1419); + std::vector::_M_move_assign((void ***)v1255, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v157 = operator new(8u); + *v157 = &off_519A44; + v157[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v157); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v769 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v769); + zcc::shared_ptr::shared_ptr(&v1414, (int)v769); + v770 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v770 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v158 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v158 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v159 = operator new(8u); + *v159 = &off_519A44; + v159[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v159); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1255, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 11; + v160 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1256 = std::map>::operator[](v160, &v1419); + std::vector::_M_move_assign((void ***)v1256, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v161 = operator new(8u); + *v161 = &off_519A44; + v161[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v161); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v771 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v771); + zcc::shared_ptr::shared_ptr(&v1414, (int)v771); + v772 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v772 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v162 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v162 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v163 = operator new(8u); + *v163 = &off_519A44; + v163[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v163); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1256, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 11; + v164 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1257 = std::map>::operator[](v164, &v1419); + std::vector::_M_move_assign((void ***)v1257, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v165 = operator new(8u); + *v165 = &off_519A44; + v165[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v165); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v773 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v773); + zcc::shared_ptr::shared_ptr(&v1414, (int)v773); + v774 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v774 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v166 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v166 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v167 = operator new(8u); + *v167 = &off_519A44; + v167[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v167); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1257, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 11; + v168 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1258 = std::map>::operator[](v168, &v1419); + std::vector::_M_move_assign((void ***)v1258, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v169 = operator new(8u); + *v169 = &off_519A44; + v169[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v169); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v775 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v775); + zcc::shared_ptr::shared_ptr(&v1414, (int)v775); + v776 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v776 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v170 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v170 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v171 = operator new(8u); + *v171 = &off_519A44; + v171[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v171); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1258, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 11; + v172 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1259 = std::map>::operator[](v172, &v1419); + std::vector::_M_move_assign((void ***)v1259, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v173 = operator new(8u); + *v173 = &off_519A44; + v173[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v173); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v777 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v777); + zcc::shared_ptr::shared_ptr(&v1414, (int)v777); + v778 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v778 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v174 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v174 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v175 = operator new(8u); + *v175 = &off_519A44; + v175[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v175); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1259, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + v1414 = 11; + v176 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1260 = std::map>::operator[](v176, &v1419); + std::vector::_M_move_assign((void ***)v1260, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v177 = operator new(4u); + *v177 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v177); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1260, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 11; + v178 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1261 = std::map>::operator[](v178, &v1419); + std::vector::_M_move_assign((void ***)v1261, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v179 = operator new(8u); + *v179 = &off_519A44; + v179[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v179); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v779 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v779); + zcc::shared_ptr::shared_ptr(&v1414, (int)v779); + v780 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v780 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v180 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v180 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v181 = operator new(8u); + *v181 = &off_519A44; + v181[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v181); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1261, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 12; + v183 = std::map>>::operator[]((_DWORD *)a1, v182); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v183, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@charset"); + v1414 = 12; + v184 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1262 = std::map>::operator[](v184, &v1419); + std::vector::_M_move_assign((void ***)v1262, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v781 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v781); + zcc::shared_ptr::shared_ptr(&v1408, (int)v781); + v782 = v1408; + std::string::basic_string((void **)&v1419, "@charset"); + std::string::_M_assign(v782 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v783 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v783); + zcc::shared_ptr::shared_ptr(&v1410, (int)v783); + v784 = v1410; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v784 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v185 = operator new(8u); + *v185 = &off_519A44; + v185[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v185); + *(_DWORD *)(v1412 + 4) = 20; + std::vector>::push_back((void **)&v1416, &v1412); + v785 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v785); + zcc::shared_ptr::shared_ptr(&v1414, (int)v785); + v786 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v786 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v186 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v186 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v187 = operator new(8u); + *v187 = &off_519A44; + v187[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v187); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1262, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@-webkit-keyframes"); + v1414 = 12; + v188 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1263 = std::map>::operator[](v188, &v1419); + std::vector::_M_move_assign((void ***)v1263, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v787 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v787); + zcc::shared_ptr::shared_ptr(&v1402, (int)v787); + v788 = v1402; + std::string::basic_string((void **)&v1419, "@-webkit-keyframes"); + std::string::_M_assign(v788 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1402); + v789 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v789); + zcc::shared_ptr::shared_ptr(&v1404, (int)v789); + v790 = v1404; + std::string::basic_string((void **)&v1419, "$MULTI_EXPR"); + std::string::_M_assign(v790 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1404); + v791 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v791); + zcc::shared_ptr::shared_ptr(&v1406, (int)v791); + v792 = v1406; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v792 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v189 = operator new(8u); + *v189 = &off_519A44; + v189[1] = 0; + zcc::shared_ptr::shared_ptr(&v1408, (int)v189); + *(_DWORD *)(v1408 + 4) = 12; + std::vector>::push_back((void **)&v1416, &v1408); + v793 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v793); + zcc::shared_ptr::shared_ptr(&v1410, (int)v793); + v794 = v1410; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + std::string::_M_assign(v794 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v795 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v795); + zcc::shared_ptr::shared_ptr(&v1412, (int)v795); + v796 = v1412; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v796 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1412 + 4), "MULTIRULE"); + v190 = v1412; + *(_DWORD *)(v1412 + 28) = 0; + *(_DWORD *)(v190 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1412); + v797 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v797); + zcc::shared_ptr::shared_ptr(&v1414, (int)v797); + v798 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v798 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v191 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v191 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v192 = operator new(8u); + *v192 = &off_519A44; + v192[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v192); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1263, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1405); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1403); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 12; + v193 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1264 = std::map>::operator[](v193, &v1419); + std::vector::_M_move_assign((void ***)v1264, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v194 = operator new(8u); + *v194 = &off_519A44; + v194[1] = 0; + zcc::shared_ptr::shared_ptr(&v1408, (int)v194); + *(_DWORD *)(v1408 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1408); + v799 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v799); + zcc::shared_ptr::shared_ptr(&v1410, (int)v799); + v800 = v1410; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v800 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v195 = operator new(8u); + *v195 = &off_519A44; + v195[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v195); + *(_DWORD *)(v1412 + 4) = 22; + std::vector>::push_back((void **)&v1416, &v1412); + v801 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v801); + zcc::shared_ptr::shared_ptr(&v1414, (int)v801); + v802 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v802 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v196 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v196 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v197 = operator new(8u); + *v197 = &off_519A44; + v197[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v197); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1264, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 12; + v198 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1265 = std::map>::operator[](v198, &v1419); + std::vector::_M_move_assign((void ***)v1265, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v199 = operator new(8u); + *v199 = &off_519A44; + v199[1] = 0; + zcc::shared_ptr::shared_ptr(&v1408, (int)v199); + *(_DWORD *)(v1408 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1408); + v803 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v803); + zcc::shared_ptr::shared_ptr(&v1410, (int)v803); + v804 = v1410; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v804 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v200 = operator new(8u); + *v200 = &off_519A44; + v200[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v200); + *(_DWORD *)(v1412 + 4) = 22; + std::vector>::push_back((void **)&v1416, &v1412); + v805 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v805); + zcc::shared_ptr::shared_ptr(&v1414, (int)v805); + v806 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v806 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v201 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v201 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v202 = operator new(8u); + *v202 = &off_519A44; + v202[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v202); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1265, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@keyframes"); + v1414 = 12; + v203 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1266 = std::map>::operator[](v203, &v1419); + std::vector::_M_move_assign((void ***)v1266, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v807 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v807); + zcc::shared_ptr::shared_ptr(&v1402, (int)v807); + v808 = v1402; + std::string::basic_string((void **)&v1419, "@keyframes"); + std::string::_M_assign(v808 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1402); + v809 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v809); + zcc::shared_ptr::shared_ptr(&v1404, (int)v809); + v810 = v1404; + std::string::basic_string((void **)&v1419, "$MULTI_EXPR"); + std::string::_M_assign(v810 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1404); + v811 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v811); + zcc::shared_ptr::shared_ptr(&v1406, (int)v811); + v812 = v1406; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v812 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v204 = operator new(8u); + *v204 = &off_519A44; + v204[1] = 0; + zcc::shared_ptr::shared_ptr(&v1408, (int)v204); + *(_DWORD *)(v1408 + 4) = 12; + std::vector>::push_back((void **)&v1416, &v1408); + v813 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v813); + zcc::shared_ptr::shared_ptr(&v1410, (int)v813); + v814 = v1410; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + std::string::_M_assign(v814 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v815 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v815); + zcc::shared_ptr::shared_ptr(&v1412, (int)v815); + v816 = v1412; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v816 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1412 + 4), "MULTIRULE"); + v205 = v1412; + *(_DWORD *)(v1412 + 28) = 0; + *(_DWORD *)(v205 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1412); + v817 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v817); + zcc::shared_ptr::shared_ptr(&v1414, (int)v817); + v818 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v818 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v206 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v206 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v207 = operator new(8u); + *v207 = &off_519A44; + v207[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v207); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1266, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1405); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1403); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@supports"); + v1414 = 12; + v208 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1267 = std::map>::operator[](v208, &v1419); + std::vector::_M_move_assign((void ***)v1267, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v819 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v819); + zcc::shared_ptr::shared_ptr(&v1402, (int)v819); + v820 = v1402; + std::string::basic_string((void **)&v1419, "@supports"); + std::string::_M_assign(v820 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1402); + v821 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v821); + zcc::shared_ptr::shared_ptr(&v1404, (int)v821); + v822 = v1404; + std::string::basic_string((void **)&v1419, "$MULTI_EXPR"); + std::string::_M_assign(v822 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1404); + v823 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v823); + zcc::shared_ptr::shared_ptr(&v1406, (int)v823); + v824 = v1406; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v824 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v209 = operator new(8u); + *v209 = &off_519A44; + v209[1] = 0; + zcc::shared_ptr::shared_ptr(&v1408, (int)v209); + *(_DWORD *)(v1408 + 4) = 12; + std::vector>::push_back((void **)&v1416, &v1408); + v825 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v825); + zcc::shared_ptr::shared_ptr(&v1410, (int)v825); + v826 = v1410; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + std::string::_M_assign(v826 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v827 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v827); + zcc::shared_ptr::shared_ptr(&v1412, (int)v827); + v828 = v1412; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v828 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1412 + 4), "MULTIRULE"); + v210 = v1412; + *(_DWORD *)(v1412 + 28) = 0; + *(_DWORD *)(v210 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1412); + v829 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v829); + zcc::shared_ptr::shared_ptr(&v1414, (int)v829); + v830 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v830 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v211 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v211 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v212 = operator new(8u); + *v212 = &off_519A44; + v212[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v212); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1267, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1405); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1403); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 12; + v213 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1268 = std::map>::operator[](v213, &v1419); + std::vector::_M_move_assign((void ***)v1268, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v214 = operator new(8u); + *v214 = &off_519A44; + v214[1] = 0; + zcc::shared_ptr::shared_ptr(&v1408, (int)v214); + *(_DWORD *)(v1408 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1408); + v831 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v831); + zcc::shared_ptr::shared_ptr(&v1410, (int)v831); + v832 = v1410; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v832 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v215 = operator new(8u); + *v215 = &off_519A44; + v215[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v215); + *(_DWORD *)(v1412 + 4) = 22; + std::vector>::push_back((void **)&v1416, &v1412); + v833 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v833); + zcc::shared_ptr::shared_ptr(&v1414, (int)v833); + v834 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v834 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v216 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v216 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v217 = operator new(8u); + *v217 = &off_519A44; + v217[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v217); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1268, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@import"); + v1414 = 12; + v218 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1269 = std::map>::operator[](v218, &v1419); + std::vector::_M_move_assign((void ***)v1269, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v835 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v835); + zcc::shared_ptr::shared_ptr(&v1408, (int)v835); + v836 = v1408; + std::string::basic_string((void **)&v1419, "@import"); + std::string::_M_assign(v836 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v837 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v837); + zcc::shared_ptr::shared_ptr(&v1410, (int)v837); + v838 = v1410; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v838 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v219 = operator new(8u); + *v219 = &off_519A44; + v219[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v219); + *(_DWORD *)(v1412 + 4) = 21; + std::vector>::push_back((void **)&v1416, &v1412); + v839 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v839); + zcc::shared_ptr::shared_ptr(&v1414, (int)v839); + v840 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v840 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v220 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v220 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v221 = operator new(8u); + *v221 = &off_519A44; + v221[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v221); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1269, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 12; + v222 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1270 = std::map>::operator[](v222, &v1419); + std::vector::_M_move_assign((void ***)v1270, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v223 = operator new(8u); + *v223 = &off_519A44; + v223[1] = 0; + zcc::shared_ptr::shared_ptr(&v1408, (int)v223); + *(_DWORD *)(v1408 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1408); + v841 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v841); + zcc::shared_ptr::shared_ptr(&v1410, (int)v841); + v842 = v1410; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v842 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v224 = operator new(8u); + *v224 = &off_519A44; + v224[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v224); + *(_DWORD *)(v1412 + 4) = 22; + std::vector>::push_back((void **)&v1416, &v1412); + v843 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v843); + zcc::shared_ptr::shared_ptr(&v1414, (int)v843); + v844 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v844 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v225 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v225 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v226 = operator new(8u); + *v226 = &off_519A44; + v226[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v226); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1270, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 12; + v227 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1271 = std::map>::operator[](v227, &v1419); + std::vector::_M_move_assign((void ***)v1271, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v228 = operator new(8u); + *v228 = &off_519A44; + v228[1] = 0; + zcc::shared_ptr::shared_ptr(&v1408, (int)v228); + *(_DWORD *)(v1408 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1408); + v845 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v845); + zcc::shared_ptr::shared_ptr(&v1410, (int)v845); + v846 = v1410; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v846 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v229 = operator new(8u); + *v229 = &off_519A44; + v229[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v229); + *(_DWORD *)(v1412 + 4) = 22; + std::vector>::push_back((void **)&v1416, &v1412); + v847 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v847); + zcc::shared_ptr::shared_ptr(&v1414, (int)v847); + v848 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v848 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v230 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v230 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v231 = operator new(8u); + *v231 = &off_519A44; + v231[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v231); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1271, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@media"); + v1414 = 12; + v232 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1272 = std::map>::operator[](v232, &v1419); + std::vector::_M_move_assign((void ***)v1272, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v849 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v849); + zcc::shared_ptr::shared_ptr(&v1402, (int)v849); + v850 = v1402; + std::string::basic_string((void **)&v1419, "@media"); + std::string::_M_assign(v850 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1402); + v851 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v851); + zcc::shared_ptr::shared_ptr(&v1404, (int)v851); + v852 = v1404; + std::string::basic_string((void **)&v1419, "$MULTI_EXPR"); + std::string::_M_assign(v852 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1404); + v853 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v853); + zcc::shared_ptr::shared_ptr(&v1406, (int)v853); + v854 = v1406; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v854 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v233 = operator new(8u); + *v233 = &off_519A44; + v233[1] = 0; + zcc::shared_ptr::shared_ptr(&v1408, (int)v233); + *(_DWORD *)(v1408 + 4) = 12; + std::vector>::push_back((void **)&v1416, &v1408); + v855 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v855); + zcc::shared_ptr::shared_ptr(&v1410, (int)v855); + v856 = v1410; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + std::string::_M_assign(v856 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v857 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v857); + zcc::shared_ptr::shared_ptr(&v1412, (int)v857); + v858 = v1412; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v858 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1412 + 4), "MULTIRULE"); + v234 = v1412; + *(_DWORD *)(v1412 + 28) = 0; + *(_DWORD *)(v234 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1412); + v859 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v859); + zcc::shared_ptr::shared_ptr(&v1414, (int)v859); + v860 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v860 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v235 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v235 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v236 = operator new(8u); + *v236 = &off_519A44; + v236[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v236); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1272, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1405); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1403); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 12; + v237 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1273 = std::map>::operator[](v237, &v1419); + std::vector::_M_move_assign((void ***)v1273, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v238 = operator new(8u); + *v238 = &off_519A44; + v238[1] = 0; + zcc::shared_ptr::shared_ptr(&v1408, (int)v238); + *(_DWORD *)(v1408 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1408); + v861 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v861); + zcc::shared_ptr::shared_ptr(&v1410, (int)v861); + v862 = v1410; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v862 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v239 = operator new(8u); + *v239 = &off_519A44; + v239[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v239); + *(_DWORD *)(v1412 + 4) = 22; + std::vector>::push_back((void **)&v1416, &v1412); + v863 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v863); + zcc::shared_ptr::shared_ptr(&v1414, (int)v863); + v864 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v864 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULES"); + v240 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v240 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v241 = operator new(8u); + *v241 = &off_519A44; + v241[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v241); + v1419[1] = 3; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1273, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 13; + v243 = std::map>>::operator[]((_DWORD *)a1, v242); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v243, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 13; + v244 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1274 = std::map>::operator[](v244, &v1419); + std::vector::_M_move_assign((void ***)v1274, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v865 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v865); + zcc::shared_ptr::shared_ptr(&v1410, (int)v865); + v866 = v1410; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v866 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v867 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v867); + zcc::shared_ptr::shared_ptr(&v1412, (int)v867); + v868 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v868 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v869 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v869); + zcc::shared_ptr::shared_ptr(&v1414, (int)v869); + v870 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v870 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v245 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v245 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1274, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$VALUE"); + v1414 = 13; + v246 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1275 = std::map>::operator[](v246, &v1419); + std::vector::_M_move_assign((void ***)v1275, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v871 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v871); + zcc::shared_ptr::shared_ptr(&v1410, (int)v871); + v872 = v1410; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v872 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v873 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v873); + zcc::shared_ptr::shared_ptr(&v1412, (int)v873); + v874 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v874 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v875 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v875); + zcc::shared_ptr::shared_ptr(&v1414, (int)v875); + v876 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v876 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v247 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v247 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1275, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 14; + v249 = std::map>>::operator[]((_DWORD *)a1, v248); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v249, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@charset"); + v1414 = 14; + v250 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1276 = std::map>::operator[](v250, &v1419); + std::vector::_M_move_assign((void ***)v1276, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v877 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v877); + zcc::shared_ptr::shared_ptr(&v1412, (int)v877); + v878 = v1412; + std::string::basic_string((void **)&v1419, "@charset"); + std::string::_M_assign(v878 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v879 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v879); + zcc::shared_ptr::shared_ptr(&v1414, (int)v879); + v880 = v1414; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v880 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v251 = operator new(8u); + *v251 = &off_519A44; + v251[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v251); + v1419[1] = 20; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1276, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@-webkit-keyframes"); + v1414 = 14; + v252 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1277 = std::map>::operator[](v252, &v1419); + std::vector::_M_move_assign((void ***)v1277, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v881 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v881); + zcc::shared_ptr::shared_ptr(&v1404, (int)v881); + v882 = v1404; + std::string::basic_string((void **)&v1419, "@-webkit-keyframes"); + std::string::_M_assign(v882 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1404); + v883 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v883); + zcc::shared_ptr::shared_ptr(&v1406, (int)v883); + v884 = v1406; + std::string::basic_string((void **)&v1419, "$MULTI_EXPR"); + std::string::_M_assign(v884 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v885 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v885); + zcc::shared_ptr::shared_ptr(&v1408, (int)v885); + v886 = v1408; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v886 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v253 = operator new(8u); + *v253 = &off_519A44; + v253[1] = 0; + zcc::shared_ptr::shared_ptr(&v1410, (int)v253); + *(_DWORD *)(v1410 + 4) = 12; + std::vector>::push_back((void **)&v1416, &v1410); + v887 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v887); + zcc::shared_ptr::shared_ptr(&v1412, (int)v887); + v888 = v1412; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + std::string::_M_assign(v888 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v889 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v889); + zcc::shared_ptr::shared_ptr(&v1414, (int)v889); + v890 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v890 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "MULTIRULE"); + v254 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v254 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1277, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1405); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 14; + v255 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1278 = std::map>::operator[](v255, &v1419); + std::vector::_M_move_assign((void ***)v1278, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v256 = operator new(8u); + *v256 = &off_519A44; + v256[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v256); + *(_DWORD *)(v1412 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1412); + v891 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v891); + zcc::shared_ptr::shared_ptr(&v1414, (int)v891); + v892 = v1414; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v892 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v257 = operator new(8u); + *v257 = &off_519A44; + v257[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v257); + v1419[1] = 22; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1278, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 14; + v258 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1279 = std::map>::operator[](v258, &v1419); + std::vector::_M_move_assign((void ***)v1279, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v259 = operator new(8u); + *v259 = &off_519A44; + v259[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v259); + *(_DWORD *)(v1412 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1412); + v893 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v893); + zcc::shared_ptr::shared_ptr(&v1414, (int)v893); + v894 = v1414; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v894 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v260 = operator new(8u); + *v260 = &off_519A44; + v260[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v260); + v1419[1] = 22; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1279, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@keyframes"); + v1414 = 14; + v261 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1280 = std::map>::operator[](v261, &v1419); + std::vector::_M_move_assign((void ***)v1280, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v895 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v895); + zcc::shared_ptr::shared_ptr(&v1404, (int)v895); + v896 = v1404; + std::string::basic_string((void **)&v1419, "@keyframes"); + std::string::_M_assign(v896 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1404); + v897 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v897); + zcc::shared_ptr::shared_ptr(&v1406, (int)v897); + v898 = v1406; + std::string::basic_string((void **)&v1419, "$MULTI_EXPR"); + std::string::_M_assign(v898 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v899 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v899); + zcc::shared_ptr::shared_ptr(&v1408, (int)v899); + v900 = v1408; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v900 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v262 = operator new(8u); + *v262 = &off_519A44; + v262[1] = 0; + zcc::shared_ptr::shared_ptr(&v1410, (int)v262); + *(_DWORD *)(v1410 + 4) = 12; + std::vector>::push_back((void **)&v1416, &v1410); + v901 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v901); + zcc::shared_ptr::shared_ptr(&v1412, (int)v901); + v902 = v1412; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + std::string::_M_assign(v902 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v903 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v903); + zcc::shared_ptr::shared_ptr(&v1414, (int)v903); + v904 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v904 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "MULTIRULE"); + v263 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v263 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1280, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1405); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@supports"); + v1414 = 14; + v264 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1281 = std::map>::operator[](v264, &v1419); + std::vector::_M_move_assign((void ***)v1281, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v905 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v905); + zcc::shared_ptr::shared_ptr(&v1404, (int)v905); + v906 = v1404; + std::string::basic_string((void **)&v1419, "@supports"); + std::string::_M_assign(v906 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1404); + v907 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v907); + zcc::shared_ptr::shared_ptr(&v1406, (int)v907); + v908 = v1406; + std::string::basic_string((void **)&v1419, "$MULTI_EXPR"); + std::string::_M_assign(v908 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v909 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v909); + zcc::shared_ptr::shared_ptr(&v1408, (int)v909); + v910 = v1408; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v910 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v265 = operator new(8u); + *v265 = &off_519A44; + v265[1] = 0; + zcc::shared_ptr::shared_ptr(&v1410, (int)v265); + *(_DWORD *)(v1410 + 4) = 12; + std::vector>::push_back((void **)&v1416, &v1410); + v911 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v911); + zcc::shared_ptr::shared_ptr(&v1412, (int)v911); + v912 = v1412; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + std::string::_M_assign(v912 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v913 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v913); + zcc::shared_ptr::shared_ptr(&v1414, (int)v913); + v914 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v914 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "MULTIRULE"); + v266 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v266 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1281, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1405); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 14; + v267 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1282 = std::map>::operator[](v267, &v1419); + std::vector::_M_move_assign((void ***)v1282, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v268 = operator new(8u); + *v268 = &off_519A44; + v268[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v268); + *(_DWORD *)(v1412 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1412); + v915 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v915); + zcc::shared_ptr::shared_ptr(&v1414, (int)v915); + v916 = v1414; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v916 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v269 = operator new(8u); + *v269 = &off_519A44; + v269[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v269); + v1419[1] = 22; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1282, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@import"); + v1414 = 14; + v270 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1283 = std::map>::operator[](v270, &v1419); + std::vector::_M_move_assign((void ***)v1283, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v917 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v917); + zcc::shared_ptr::shared_ptr(&v1412, (int)v917); + v918 = v1412; + std::string::basic_string((void **)&v1419, "@import"); + std::string::_M_assign(v918 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v919 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v919); + zcc::shared_ptr::shared_ptr(&v1414, (int)v919); + v920 = v1414; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v920 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v271 = operator new(8u); + *v271 = &off_519A44; + v271[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v271); + v1419[1] = 21; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1283, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 14; + v272 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1284 = std::map>::operator[](v272, &v1419); + std::vector::_M_move_assign((void ***)v1284, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v273 = operator new(8u); + *v273 = &off_519A44; + v273[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v273); + *(_DWORD *)(v1412 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1412); + v921 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v921); + zcc::shared_ptr::shared_ptr(&v1414, (int)v921); + v922 = v1414; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v922 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v274 = operator new(8u); + *v274 = &off_519A44; + v274[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v274); + v1419[1] = 22; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1284, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 14; + v275 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1285 = std::map>::operator[](v275, &v1419); + std::vector::_M_move_assign((void ***)v1285, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v276 = operator new(8u); + *v276 = &off_519A44; + v276[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v276); + *(_DWORD *)(v1412 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1412); + v923 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v923); + zcc::shared_ptr::shared_ptr(&v1414, (int)v923); + v924 = v1414; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v924 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v277 = operator new(8u); + *v277 = &off_519A44; + v277[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v277); + v1419[1] = 22; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1285, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@media"); + v1414 = 14; + v278 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1286 = std::map>::operator[](v278, &v1419); + std::vector::_M_move_assign((void ***)v1286, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v925 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v925); + zcc::shared_ptr::shared_ptr(&v1404, (int)v925); + v926 = v1404; + std::string::basic_string((void **)&v1419, "@media"); + std::string::_M_assign(v926 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1404); + v927 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v927); + zcc::shared_ptr::shared_ptr(&v1406, (int)v927); + v928 = v1406; + std::string::basic_string((void **)&v1419, "$MULTI_EXPR"); + std::string::_M_assign(v928 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1406); + v929 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v929); + zcc::shared_ptr::shared_ptr(&v1408, (int)v929); + v930 = v1408; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v930 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v279 = operator new(8u); + *v279 = &off_519A44; + v279[1] = 0; + zcc::shared_ptr::shared_ptr(&v1410, (int)v279); + *(_DWORD *)(v1410 + 4) = 12; + std::vector>::push_back((void **)&v1416, &v1410); + v931 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v931); + zcc::shared_ptr::shared_ptr(&v1412, (int)v931); + v932 = v1412; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + std::string::_M_assign(v932 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v933 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v933); + zcc::shared_ptr::shared_ptr(&v1414, (int)v933); + v934 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v934 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "MULTIRULE"); + v280 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v280 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1286, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1405); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 14; + v281 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1287 = std::map>::operator[](v281, &v1419); + std::vector::_M_move_assign((void ***)v1287, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v282 = operator new(8u); + *v282 = &off_519A44; + v282[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v282); + *(_DWORD *)(v1412 + 4) = 24; + std::vector>::push_back((void **)&v1416, &v1412); + v935 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v935); + zcc::shared_ptr::shared_ptr(&v1414, (int)v935); + v936 = v1414; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + std::string::_M_assign(v936 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v283 = operator new(8u); + *v283 = &off_519A44; + v283[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v283); + v1419[1] = 22; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1287, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 15; + v285 = std::map>>::operator[]((_DWORD *)a1, v284); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v285, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 15; + v286 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1288 = std::map>::operator[](v286, &v1419); + std::vector::_M_move_assign((void ***)v1288, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v937 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v937); + zcc::shared_ptr::shared_ptr(&v1410, (int)v937); + v938 = v1410; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v938 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v939 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v939); + zcc::shared_ptr::shared_ptr(&v1412, (int)v939); + v940 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v940 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v941 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v941); + zcc::shared_ptr::shared_ptr(&v1414, (int)v941); + v942 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v942 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v287 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v287 + 32) = 6; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1288, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$VALUE"); + v1414 = 15; + v288 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1289 = std::map>::operator[](v288, &v1419); + std::vector::_M_move_assign((void ***)v1289, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v943 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v943); + zcc::shared_ptr::shared_ptr(&v1410, (int)v943); + v944 = v1410; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v944 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v945 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v945); + zcc::shared_ptr::shared_ptr(&v1412, (int)v945); + v946 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v946 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v947 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v947); + zcc::shared_ptr::shared_ptr(&v1414, (int)v947); + v948 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v948 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v289 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v289 + 32) = 6; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1289, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 16; + v291 = std::map>>::operator[]((_DWORD *)a1, v290); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v291, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 16; + v292 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1290 = std::map>::operator[](v292, &v1419); + std::vector::_M_move_assign((void ***)v1290, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v949 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v949); + zcc::shared_ptr::shared_ptr(&v1410, (int)v949); + v950 = v1410; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v950 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v951 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v951); + zcc::shared_ptr::shared_ptr(&v1412, (int)v951); + v952 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v952 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v953 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v953); + zcc::shared_ptr::shared_ptr(&v1414, (int)v953); + v954 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v954 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v293 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v293 + 32) = 6; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1290, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$VALUE"); + v1414 = 16; + v294 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1291 = std::map>::operator[](v294, &v1419); + std::vector::_M_move_assign((void ***)v1291, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v955 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v955); + zcc::shared_ptr::shared_ptr(&v1410, (int)v955); + v956 = v1410; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v956 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v957 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v957); + zcc::shared_ptr::shared_ptr(&v1412, (int)v957); + v958 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v958 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v959 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v959); + zcc::shared_ptr::shared_ptr(&v1414, (int)v959); + v960 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v960 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v295 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v295 + 32) = 6; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1291, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 17; + v297 = std::map>>::operator[]((_DWORD *)a1, v296); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v297, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 17; + v298 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1292 = std::map>::operator[](v298, &v1419); + std::vector::_M_move_assign((void ***)v1292, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v961 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v961); + zcc::shared_ptr::shared_ptr(&v1410, (int)v961); + v962 = v1410; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v962 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v963 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v963); + zcc::shared_ptr::shared_ptr(&v1412, (int)v963); + v964 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v964 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v965 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v965); + zcc::shared_ptr::shared_ptr(&v1414, (int)v965); + v966 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v966 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v299 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v299 + 32) = 6; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1292, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$VALUE"); + v1414 = 17; + v300 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1293 = std::map>::operator[](v300, &v1419); + std::vector::_M_move_assign((void ***)v1293, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v967 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v967); + zcc::shared_ptr::shared_ptr(&v1410, (int)v967); + v968 = v1410; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v968 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v969 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v969); + zcc::shared_ptr::shared_ptr(&v1412, (int)v969); + v970 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v970 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v971 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v971); + zcc::shared_ptr::shared_ptr(&v1414, (int)v971); + v972 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v972 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v301 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v301 + 32) = 6; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1293, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 18; + v303 = std::map>>::operator[]((_DWORD *)a1, v302); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v303, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 18; + v304 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1294 = std::map>::operator[](v304, &v1419); + std::vector::_M_move_assign((void ***)v1294, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v305 = operator new(4u); + *v305 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v305); + std::vector>::push_back((void **)&v1416, &v1412); + v973 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v973); + zcc::shared_ptr::shared_ptr(&v1414, (int)v973); + v974 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v974 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v306 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v306 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1294, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ")"); + v1414 = 18; + v307 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1295 = std::map>::operator[](v307, &v1419); + std::vector::_M_move_assign((void ***)v1295, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v308 = operator new(4u); + *v308 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v308); + std::vector>::push_back((void **)&v1416, &v1412); + v975 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v975); + zcc::shared_ptr::shared_ptr(&v1414, (int)v975); + v976 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v976 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v309 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v309 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1295, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "("); + v1414 = 18; + v310 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1296 = std::map>::operator[](v310, &v1419); + std::vector::_M_move_assign((void ***)v1296, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v977 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v977); + zcc::shared_ptr::shared_ptr(&v1408, (int)v977); + v978 = v1408; + std::string::basic_string((void **)&v1419, "("); + std::string::_M_assign(v978 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1408); + v311 = operator new(8u); + *v311 = &off_519A44; + v311[1] = 0; + zcc::shared_ptr::shared_ptr(&v1410, (int)v311); + *(_DWORD *)(v1410 + 4) = 2; + std::vector>::push_back((void **)&v1416, &v1410); + v979 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v979); + zcc::shared_ptr::shared_ptr(&v1412, (int)v979); + v980 = v1412; + std::string::basic_string((void **)&v1419, ")"); + std::string::_M_assign(v980 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v981 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v981); + zcc::shared_ptr::shared_ptr(&v1414, (int)v981); + v982 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v982 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v312 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v312 + 32) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1296, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 18; + v313 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1297 = std::map>::operator[](v313, &v1419); + std::vector::_M_move_assign((void ***)v1297, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v314 = operator new(4u); + *v314 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v314); + std::vector>::push_back((void **)&v1416, &v1412); + v983 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v983); + zcc::shared_ptr::shared_ptr(&v1414, (int)v983); + v984 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v984 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v315 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v315 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1297, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ","); + v1414 = 18; + v316 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1298 = std::map>::operator[](v316, &v1419); + std::vector::_M_move_assign((void ***)v1298, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v317 = operator new(4u); + *v317 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v317); + std::vector>::push_back((void **)&v1416, &v1412); + v985 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v985); + zcc::shared_ptr::shared_ptr(&v1414, (int)v985); + v986 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v986 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v318 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v318 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1298, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 18; + v319 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1299 = std::map>::operator[](v319, &v1419); + std::vector::_M_move_assign((void ***)v1299, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v320 = operator new(4u); + *v320 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v320); + std::vector>::push_back((void **)&v1416, &v1412); + v987 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v987); + zcc::shared_ptr::shared_ptr(&v1414, (int)v987); + v988 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v988 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v321 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v321 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1299, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 18; + v322 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1300 = std::map>::operator[](v322, &v1419); + std::vector::_M_move_assign((void ***)v1300, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v323 = operator new(4u); + *v323 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v323); + std::vector>::push_back((void **)&v1416, &v1412); + v989 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v989); + zcc::shared_ptr::shared_ptr(&v1414, (int)v989); + v990 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v990 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v324 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v324 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1300, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + v1414 = 18; + v325 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1301 = std::map>::operator[](v325, &v1419); + std::vector::_M_move_assign((void ***)v1301, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v326 = operator new(4u); + *v326 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v326); + std::vector>::push_back((void **)&v1416, &v1412); + v991 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v991); + zcc::shared_ptr::shared_ptr(&v1414, (int)v991); + v992 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v992 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v327 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v327 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1301, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 18; + v328 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1302 = std::map>::operator[](v328, &v1419); + std::vector::_M_move_assign((void ***)v1302, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v329 = operator new(4u); + *v329 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v329); + std::vector>::push_back((void **)&v1416, &v1412); + v993 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v993); + zcc::shared_ptr::shared_ptr(&v1414, (int)v993); + v994 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v994 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v330 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v330 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1302, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 18; + v331 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1303 = std::map>::operator[](v331, &v1419); + std::vector::_M_move_assign((void ***)v1303, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v332 = operator new(4u); + *v332 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v332); + std::vector>::push_back((void **)&v1416, &v1412); + v995 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v995); + zcc::shared_ptr::shared_ptr(&v1414, (int)v995); + v996 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v996 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v333 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v333 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1303, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 18; + v334 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1304 = std::map>::operator[](v334, &v1419); + std::vector::_M_move_assign((void ***)v1304, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v335 = operator new(4u); + *v335 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v335); + std::vector>::push_back((void **)&v1416, &v1412); + v997 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v997); + zcc::shared_ptr::shared_ptr(&v1414, (int)v997); + v998 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v998 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "F_SELECTOR"); + v336 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v336 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1304, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 19; + v338 = std::map>>::operator[]((_DWORD *)a1, v337); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v338, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 19; + v339 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1305 = std::map>::operator[](v339, &v1419); + std::vector::_M_move_assign((void ***)v1305, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v999 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v999); + zcc::shared_ptr::shared_ptr(&v1410, (int)v999); + v1000 = v1410; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v1000 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v1001 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1001); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1001); + v1002 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v1002 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1003 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1003); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1003); + v1004 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1004 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v340 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v340 + 32) = 6; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1305, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$VALUE"); + v1414 = 19; + v341 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1306 = std::map>::operator[](v341, &v1419); + std::vector::_M_move_assign((void ***)v1306, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1005 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1005); + zcc::shared_ptr::shared_ptr(&v1410, (int)v1005); + v1006 = v1410; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v1006 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v1007 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1007); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1007); + v1008 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v1008 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1009 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1009); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1009); + v1010 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1010 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v342 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v342 + 32) = 6; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1306, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 20; + v344 = std::map>>::operator[]((_DWORD *)a1, v343); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v344, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 20; + v345 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1307 = std::map>::operator[](v345, &v1419); + std::vector::_M_move_assign((void ***)v1307, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v346 = operator new(4u); + *v346 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v346); + std::vector>::push_back((void **)&v1416, &v1412); + v1011 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1011); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1011); + v1012 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1012 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v347 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v347 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1307, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@charset"); + v1414 = 20; + v348 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1308 = std::map>::operator[](v348, &v1419); + std::vector::_M_move_assign((void ***)v1308, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v349 = operator new(4u); + *v349 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v349); + std::vector>::push_back((void **)&v1416, &v1412); + v1013 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1013); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1013); + v1014 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1014 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v350 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v350 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1308, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 20; + v351 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1309 = std::map>::operator[](v351, &v1419); + std::vector::_M_move_assign((void ***)v1309, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v352 = operator new(4u); + *v352 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v352); + std::vector>::push_back((void **)&v1416, &v1412); + v1015 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1015); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1015); + v1016 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1016 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v353 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v353 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1309, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 20; + v354 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1310 = std::map>::operator[](v354, &v1419); + std::vector::_M_move_assign((void ***)v1310, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v355 = operator new(4u); + *v355 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v355); + std::vector>::push_back((void **)&v1416, &v1412); + v1017 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1017); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1017); + v1018 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1018 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v356 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v356 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1310, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@media"); + v1414 = 20; + v357 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1311 = std::map>::operator[](v357, &v1419); + std::vector::_M_move_assign((void ***)v1311, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v358 = operator new(4u); + *v358 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v358); + std::vector>::push_back((void **)&v1416, &v1412); + v1019 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1019); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1019); + v1020 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1020 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v359 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v359 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1311, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@keyframes"); + v1414 = 20; + v360 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1312 = std::map>::operator[](v360, &v1419); + std::vector::_M_move_assign((void ***)v1312, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v361 = operator new(4u); + *v361 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v361); + std::vector>::push_back((void **)&v1416, &v1412); + v1021 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1021); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1021); + v1022 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1022 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v362 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v362 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1312, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@supports"); + v1414 = 20; + v363 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1313 = std::map>::operator[](v363, &v1419); + std::vector::_M_move_assign((void ***)v1313, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v364 = operator new(4u); + *v364 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v364); + std::vector>::push_back((void **)&v1416, &v1412); + v1023 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1023); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1023); + v1024 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1024 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v365 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v365 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1313, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@-webkit-keyframes"); + v1414 = 20; + v366 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1314 = std::map>::operator[](v366, &v1419); + std::vector::_M_move_assign((void ***)v1314, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v367 = operator new(4u); + *v367 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v367); + std::vector>::push_back((void **)&v1416, &v1412); + v1025 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1025); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1025); + v1026 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1026 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v368 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v368 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1314, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 20; + v369 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1315 = std::map>::operator[](v369, &v1419); + std::vector::_M_move_assign((void ***)v1315, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v370 = operator new(4u); + *v370 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v370); + std::vector>::push_back((void **)&v1416, &v1412); + v1027 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1027); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1027); + v1028 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1028 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v371 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v371 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1315, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@import"); + v1414 = 20; + v372 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1316 = std::map>::operator[](v372, &v1419); + std::vector::_M_move_assign((void ***)v1316, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v373 = operator new(4u); + *v373 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v373); + std::vector>::push_back((void **)&v1416, &v1412); + v1029 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1029); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1029); + v1030 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1030 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v374 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v374 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1316, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + v1414 = 20; + v375 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1317 = std::map>::operator[](v375, &v1419); + std::vector::_M_move_assign((void ***)v1317, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1031 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1031); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1031); + v1032 = v1412; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + std::string::_M_assign(v1032 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1033 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1033); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1033); + v1034 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1034 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v376 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v376 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1317, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 20; + v377 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1318 = std::map>::operator[](v377, &v1419); + std::vector::_M_move_assign((void ***)v1318, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v378 = operator new(4u); + *v378 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v378); + std::vector>::push_back((void **)&v1416, &v1412); + v1035 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1035); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1035); + v1036 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1036 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v379 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v379 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1318, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + v1414 = 20; + v380 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1319 = std::map>::operator[](v380, &v1419); + std::vector::_M_move_assign((void ***)v1319, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v381 = operator new(4u); + *v381 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v381); + std::vector>::push_back((void **)&v1416, &v1412); + v1037 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1037); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1037); + v1038 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1038 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v382 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v382 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1319, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 20; + v383 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1320 = std::map>::operator[](v383, &v1419); + std::vector::_M_move_assign((void ***)v1320, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v384 = operator new(4u); + *v384 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v384); + std::vector>::push_back((void **)&v1416, &v1412); + v1039 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1039); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1039); + v1040 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1040 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v385 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v385 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1320, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 20; + v386 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1321 = std::map>::operator[](v386, &v1419); + std::vector::_M_move_assign((void ***)v1321, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v387 = operator new(4u); + *v387 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v387); + std::vector>::push_back((void **)&v1416, &v1412); + v1041 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1041); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1041); + v1042 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1042 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v388 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v388 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1321, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 21; + v390 = std::map>>::operator[]((_DWORD *)a1, v389); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v390, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 21; + v391 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1322 = std::map>::operator[](v391, &v1419); + std::vector::_M_move_assign((void ***)v1322, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v392 = operator new(4u); + *v392 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v392); + std::vector>::push_back((void **)&v1416, &v1412); + v1043 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1043); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1043); + v1044 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1044 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v393 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v393 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1322, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@charset"); + v1414 = 21; + v394 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1323 = std::map>::operator[](v394, &v1419); + std::vector::_M_move_assign((void ***)v1323, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v395 = operator new(4u); + *v395 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v395); + std::vector>::push_back((void **)&v1416, &v1412); + v1045 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1045); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1045); + v1046 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1046 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v396 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v396 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1323, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 21; + v397 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1324 = std::map>::operator[](v397, &v1419); + std::vector::_M_move_assign((void ***)v1324, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v398 = operator new(4u); + *v398 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v398); + std::vector>::push_back((void **)&v1416, &v1412); + v1047 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1047); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1047); + v1048 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1048 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v399 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v399 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1324, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 21; + v400 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1325 = std::map>::operator[](v400, &v1419); + std::vector::_M_move_assign((void ***)v1325, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v401 = operator new(4u); + *v401 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v401); + std::vector>::push_back((void **)&v1416, &v1412); + v1049 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1049); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1049); + v1050 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1050 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v402 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v402 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1325, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@media"); + v1414 = 21; + v403 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1326 = std::map>::operator[](v403, &v1419); + std::vector::_M_move_assign((void ***)v1326, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v404 = operator new(4u); + *v404 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v404); + std::vector>::push_back((void **)&v1416, &v1412); + v1051 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1051); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1051); + v1052 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1052 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v405 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v405 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1326, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@keyframes"); + v1414 = 21; + v406 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1327 = std::map>::operator[](v406, &v1419); + std::vector::_M_move_assign((void ***)v1327, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v407 = operator new(4u); + *v407 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v407); + std::vector>::push_back((void **)&v1416, &v1412); + v1053 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1053); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1053); + v1054 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1054 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v408 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v408 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1327, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@supports"); + v1414 = 21; + v409 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1328 = std::map>::operator[](v409, &v1419); + std::vector::_M_move_assign((void ***)v1328, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v410 = operator new(4u); + *v410 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v410); + std::vector>::push_back((void **)&v1416, &v1412); + v1055 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1055); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1055); + v1056 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1056 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v411 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v411 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1328, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@-webkit-keyframes"); + v1414 = 21; + v412 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1329 = std::map>::operator[](v412, &v1419); + std::vector::_M_move_assign((void ***)v1329, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v413 = operator new(4u); + *v413 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v413); + std::vector>::push_back((void **)&v1416, &v1412); + v1057 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1057); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1057); + v1058 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1058 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v414 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v414 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1329, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 21; + v415 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1330 = std::map>::operator[](v415, &v1419); + std::vector::_M_move_assign((void ***)v1330, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v416 = operator new(4u); + *v416 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v416); + std::vector>::push_back((void **)&v1416, &v1412); + v1059 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1059); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1059); + v1060 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1060 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v417 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v417 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1330, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@import"); + v1414 = 21; + v418 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1331 = std::map>::operator[](v418, &v1419); + std::vector::_M_move_assign((void ***)v1331, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v419 = operator new(4u); + *v419 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v419); + std::vector>::push_back((void **)&v1416, &v1412); + v1061 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1061); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1061); + v1062 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1062 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v420 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v420 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1331, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + v1414 = 21; + v421 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1332 = std::map>::operator[](v421, &v1419); + std::vector::_M_move_assign((void ***)v1332, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1063 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1063); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1063); + v1064 = v1412; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + std::string::_M_assign(v1064 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1065 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1065); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1065); + v1066 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1066 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v422 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v422 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1332, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 21; + v423 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1333 = std::map>::operator[](v423, &v1419); + std::vector::_M_move_assign((void ***)v1333, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v424 = operator new(4u); + *v424 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v424); + std::vector>::push_back((void **)&v1416, &v1412); + v1067 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1067); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1067); + v1068 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1068 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v425 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v425 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1333, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + v1414 = 21; + v426 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1334 = std::map>::operator[](v426, &v1419); + std::vector::_M_move_assign((void ***)v1334, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v427 = operator new(4u); + *v427 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v427); + std::vector>::push_back((void **)&v1416, &v1412); + v1069 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1069); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1069); + v1070 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1070 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v428 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v428 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1334, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 21; + v429 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1335 = std::map>::operator[](v429, &v1419); + std::vector::_M_move_assign((void ***)v1335, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v430 = operator new(4u); + *v430 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v430); + std::vector>::push_back((void **)&v1416, &v1412); + v1071 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1071); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1071); + v1072 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1072 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v431 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v431 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1335, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 21; + v432 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1336 = std::map>::operator[](v432, &v1419); + std::vector::_M_move_assign((void ***)v1336, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v433 = operator new(4u); + *v433 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v433); + std::vector>::push_back((void **)&v1416, &v1412); + v1073 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1073); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1073); + v1074 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1074 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "DIRECTIVE"); + v434 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v434 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1336, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 22; + v436 = std::map>>::operator[]((_DWORD *)a1, v435); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v436, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 22; + v437 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1337 = std::map>::operator[](v437, &v1419); + std::vector::_M_move_assign((void ***)v1337, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1075 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1075); + zcc::shared_ptr::shared_ptr(&v1404, (int)v1075); + v1076 = v1404; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v1076 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1404); + v438 = operator new(8u); + *v438 = &off_519A44; + v438[1] = 0; + zcc::shared_ptr::shared_ptr(&v1406, (int)v438); + *(_DWORD *)(v1406 + 4) = 1; + std::vector>::push_back((void **)&v1416, &v1406); + v1077 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1077); + zcc::shared_ptr::shared_ptr(&v1408, (int)v1077); + v1078 = v1408; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1078 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1408 + 4), "ATTRS"); + v439 = v1408; + *(_DWORD *)(v1408 + 28) = 0; + *(_DWORD *)(v439 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1408); + v440 = operator new(8u); + *v440 = &off_519A44; + v440[1] = 0; + zcc::shared_ptr::shared_ptr(&v1410, (int)v440); + *(_DWORD *)(v1410 + 4) = 6; + std::vector>::push_back((void **)&v1416, &v1410); + v1079 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1079); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1079); + v1080 = v1412; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + std::string::_M_assign(v1080 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1081 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1081); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1081); + v1082 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1082 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULE"); + v441 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v441 + 32) = 4; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1337, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1409); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1407); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1405); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + v1414 = 22; + v442 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1338 = std::map>::operator[](v442, &v1419); + std::vector::_M_move_assign((void ***)v1338, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1083 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1083); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1083); + v1084 = v1412; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + std::string::_M_assign(v1084 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1085 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1085); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1085); + v1086 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1086 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "RULE"); + v443 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v443 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1338, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 23; + v445 = std::map>>::operator[]((_DWORD *)a1, v444); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v445, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 23; + v446 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1339 = std::map>::operator[](v446, &v1419); + std::vector::_M_move_assign((void ***)v1339, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1087 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1087); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1087); + v1088 = v1412; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v1088 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v447 = operator new(8u); + *v447 = &off_519A44; + v447[1] = 0; + zcc::shared_ptr::shared_ptr(&v1414, (int)v447); + *(_DWORD *)(v1414 + 4) = 27; + std::vector>::push_back((void **)&v1416, &v1414); + v448 = operator new(8u); + *v448 = &off_519A44; + v448[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v448); + v1419[1] = 32; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1339, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 23; + v449 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1340 = std::map>::operator[](v449, &v1419); + std::vector::_M_move_assign((void ***)v1340, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1089 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1089); + zcc::shared_ptr::shared_ptr(&v1410, (int)v1089); + v1090 = v1410; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + std::string::_M_assign(v1090 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v1091 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1091); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1091); + v1092 = v1412; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v1092 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1093 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1093); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1093); + v1094 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1094 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v450 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v450 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v451 = operator new(8u); + *v451 = &off_519A44; + v451[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v451); + v1419[1] = 32; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1340, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 23; + v452 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1341 = std::map>::operator[](v452, &v1419); + std::vector::_M_move_assign((void ***)v1341, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1095 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1095); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1095); + v1096 = v1412; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + std::string::_M_assign(v1096 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1097 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1097); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1097); + v1098 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1098 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v453 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v453 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v454 = operator new(8u); + *v454 = &off_519A44; + v454[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v454); + v1419[1] = 32; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1341, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 23; + v455 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1342 = std::map>::operator[](v455, &v1419); + std::vector::_M_move_assign((void ***)v1342, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1099 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1099); + zcc::shared_ptr::shared_ptr(&v1410, (int)v1099); + v1100 = v1410; + std::string::basic_string((void **)&v1419, "["); + std::string::_M_assign(v1100 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v1101 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1101); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1101); + v1102 = v1412; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v1102 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v456 = operator new(8u); + *v456 = &off_519A44; + v456[1] = 0; + zcc::shared_ptr::shared_ptr(&v1414, (int)v456); + *(_DWORD *)(v1414 + 4) = 28; + std::vector>::push_back((void **)&v1416, &v1414); + v457 = operator new(8u); + *v457 = &off_519A44; + v457[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v457); + v1419[1] = 32; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1342, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 23; + v458 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1343 = std::map>::operator[](v458, &v1419); + std::vector::_M_move_assign((void ***)v1343, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1103 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1103); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1103); + v1104 = v1412; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + std::string::_M_assign(v1104 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v459 = operator new(8u); + *v459 = &off_519A44; + v459[1] = 0; + zcc::shared_ptr::shared_ptr(&v1414, (int)v459); + *(_DWORD *)(v1414 + 4) = 5; + std::vector>::push_back((void **)&v1416, &v1414); + v460 = operator new(8u); + *v460 = &off_519A44; + v460[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v460); + v1419[1] = 32; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1343, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 23; + v461 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1344 = std::map>::operator[](v461, &v1419); + std::vector::_M_move_assign((void ***)v1344, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1105 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1105); + zcc::shared_ptr::shared_ptr(&v1410, (int)v1105); + v1106 = v1410; + std::string::basic_string((void **)&v1419, ">"); + std::string::_M_assign(v1106 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v1107 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1107); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1107); + v1108 = v1412; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v1108 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1109 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1109); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1109); + v1110 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1110 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v462 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v462 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + v463 = operator new(8u); + *v463 = &off_519A44; + v463[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v463); + v1419[1] = 32; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1344, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 24; + v465 = std::map>>::operator[]((_DWORD *)a1, v464); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v465, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 24; + v466 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1345 = std::map>::operator[](v466, &v1419); + std::vector::_M_move_assign((void ***)v1345, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v467 = operator new(8u); + *v467 = &off_519A44; + v467[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v467); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v1111 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1111); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1111); + v1112 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1112 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTORS"); + v468 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v468 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v469 = operator new(8u); + *v469 = &off_519A44; + v469[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v469); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1345, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 24; + v470 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1346 = std::map>::operator[](v470, &v1419); + std::vector::_M_move_assign((void ***)v1346, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v471 = operator new(8u); + *v471 = &off_519A44; + v471[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v471); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v1113 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1113); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1113); + v1114 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1114 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTORS"); + v472 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v472 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v473 = operator new(8u); + *v473 = &off_519A44; + v473[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v473); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1346, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 24; + v474 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1347 = std::map>::operator[](v474, &v1419); + std::vector::_M_move_assign((void ***)v1347, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v475 = operator new(8u); + *v475 = &off_519A44; + v475[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v475); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v1115 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1115); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1115); + v1116 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1116 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTORS"); + v476 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v476 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v477 = operator new(8u); + *v477 = &off_519A44; + v477[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v477); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1347, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 24; + v478 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1348 = std::map>::operator[](v478, &v1419); + std::vector::_M_move_assign((void ***)v1348, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v479 = operator new(8u); + *v479 = &off_519A44; + v479[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v479); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v1117 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1117); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1117); + v1118 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1118 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTORS"); + v480 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v480 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v481 = operator new(8u); + *v481 = &off_519A44; + v481[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v481); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1348, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 24; + v482 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1349 = std::map>::operator[](v482, &v1419); + std::vector::_M_move_assign((void ***)v1349, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v483 = operator new(8u); + *v483 = &off_519A44; + v483[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v483); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v1119 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1119); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1119); + v1120 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1120 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTORS"); + v484 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v484 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v485 = operator new(8u); + *v485 = &off_519A44; + v485[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v485); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1349, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 24; + v486 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1350 = std::map>::operator[](v486, &v1419); + std::vector::_M_move_assign((void ***)v1350, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v487 = operator new(8u); + *v487 = &off_519A44; + v487[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v487); + *(_DWORD *)(v1412 + 4) = 23; + std::vector>::push_back((void **)&v1416, &v1412); + v1121 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1121); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1121); + v1122 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1122 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTORS"); + v488 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v488 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v489 = operator new(8u); + *v489 = &off_519A44; + v489[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v489); + v1419[1] = 11; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1350, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 25; + v491 = std::map>>::operator[]((_DWORD *)a1, v490); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v491, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 25; + v492 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1351 = std::map>::operator[](v492, &v1419); + std::vector::_M_move_assign((void ***)v1351, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v493 = operator new(8u); + *v493 = &off_519A44; + v493[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v493); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1351, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@charset"); + v1414 = 25; + v494 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1352 = std::map>::operator[](v494, &v1419); + std::vector::_M_move_assign((void ***)v1352, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v495 = operator new(8u); + *v495 = &off_519A44; + v495[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v495); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1352, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 25; + v496 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1353 = std::map>::operator[](v496, &v1419); + std::vector::_M_move_assign((void ***)v1353, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v497 = operator new(4u); + *v497 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v497); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1353, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 25; + v498 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1354 = std::map>::operator[](v498, &v1419); + std::vector::_M_move_assign((void ***)v1354, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v499 = operator new(8u); + *v499 = &off_519A44; + v499[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v499); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1354, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@media"); + v1414 = 25; + v500 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1355 = std::map>::operator[](v500, &v1419); + std::vector::_M_move_assign((void ***)v1355, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v501 = operator new(8u); + *v501 = &off_519A44; + v501[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v501); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1355, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@keyframes"); + v1414 = 25; + v502 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1356 = std::map>::operator[](v502, &v1419); + std::vector::_M_move_assign((void ***)v1356, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v503 = operator new(8u); + *v503 = &off_519A44; + v503[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v503); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1356, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@supports"); + v1414 = 25; + v504 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1357 = std::map>::operator[](v504, &v1419); + std::vector::_M_move_assign((void ***)v1357, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v505 = operator new(8u); + *v505 = &off_519A44; + v505[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v505); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1357, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@-webkit-keyframes"); + v1414 = 25; + v506 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1358 = std::map>::operator[](v506, &v1419); + std::vector::_M_move_assign((void ***)v1358, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v507 = operator new(8u); + *v507 = &off_519A44; + v507[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v507); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1358, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "@import"); + v1414 = 25; + v508 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1359 = std::map>::operator[](v508, &v1419); + std::vector::_M_move_assign((void ***)v1359, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v509 = operator new(8u); + *v509 = &off_519A44; + v509[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v509); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1359, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 25; + v510 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1360 = std::map>::operator[](v510, &v1419); + std::vector::_M_move_assign((void ***)v1360, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v511 = operator new(8u); + *v511 = &off_519A44; + v511[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v511); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1360, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 25; + v512 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1361 = std::map>::operator[](v512, &v1419); + std::vector::_M_move_assign((void ***)v1361, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v513 = operator new(8u); + *v513 = &off_519A44; + v513[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v513); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1361, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 25; + v514 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1362 = std::map>::operator[](v514, &v1419); + std::vector::_M_move_assign((void ***)v1362, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v515 = operator new(8u); + *v515 = &off_519A44; + v515[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v515); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1362, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 25; + v516 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1363 = std::map>::operator[](v516, &v1419); + std::vector::_M_move_assign((void ***)v1363, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v517 = operator new(8u); + *v517 = &off_519A44; + v517[1] = 0; + zcc::shared_ptr::shared_ptr(&v1416, (int)v517); + *(_DWORD *)(v1416 + 4) = 12; + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1363, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 26; + v519 = std::map>>::operator[]((_DWORD *)a1, v518); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v519, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 26; + v520 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1364 = std::map>::operator[](v520, &v1419); + std::vector::_M_move_assign((void ***)v1364, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v521 = operator new(4u); + *v521 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v521); + std::vector>::push_back((void **)&v1416, &v1412); + v1123 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1123); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1123); + v1124 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1124 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v522 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v522 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1364, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + v1414 = 26; + v523 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1365 = std::map>::operator[](v523, &v1419); + std::vector::_M_move_assign((void ***)v1365, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1125 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1125); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1125); + v1126 = v1412; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + std::string::_M_assign(v1126 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1127 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1127); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1127); + v1128 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1128 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v524 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v524 + 32) = 4; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1365, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[4]); + v1414 = 26; + v525 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1366 = std::map>::operator[](v525, &v1419); + std::vector::_M_move_assign((void ***)v1366, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v526 = operator new(4u); + *v526 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v526); + std::vector>::push_back((void **)&v1416, &v1412); + v1129 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1129); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1129); + v1130 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1130 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v527 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v527 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1366, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 26; + v528 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1367 = std::map>::operator[](v528, &v1419); + std::vector::_M_move_assign((void ***)v1367, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v529 = operator new(4u); + *v529 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v529); + std::vector>::push_back((void **)&v1416, &v1412); + v1131 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1131); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1131); + v1132 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1132 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v530 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v530 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1367, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 27; + v532 = std::map>>::operator[]((_DWORD *)a1, v531); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v532, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 27; + v533 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1368 = std::map>::operator[](v533, &v1419); + std::vector::_M_move_assign((void ***)v1368, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v534 = operator new(4u); + *v534 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v534); + std::vector>::push_back((void **)&v1416, &v1412); + v1133 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1133); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1133); + v1134 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1134 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v535 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v535 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1368, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 27; + v536 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1369 = std::map>::operator[](v536, &v1419); + std::vector::_M_move_assign((void ***)v1369, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v537 = operator new(4u); + *v537 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v537); + std::vector>::push_back((void **)&v1416, &v1412); + v1135 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1135); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1135); + v1136 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1136 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v538 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v538 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1369, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ")"); + v1414 = 27; + v539 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1370 = std::map>::operator[](v539, &v1419); + std::vector::_M_move_assign((void ***)v1370, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v540 = operator new(4u); + *v540 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v540); + std::vector>::push_back((void **)&v1416, &v1412); + v1137 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1137); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1137); + v1138 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1138 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v541 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v541 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1370, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 27; + v542 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1371 = std::map>::operator[](v542, &v1419); + std::vector::_M_move_assign((void ***)v1371, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v543 = operator new(4u); + *v543 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v543); + std::vector>::push_back((void **)&v1416, &v1412); + v1139 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1139); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1139); + v1140 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1140 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v544 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v544 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1371, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ","); + v1414 = 27; + v545 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1372 = std::map>::operator[](v545, &v1419); + std::vector::_M_move_assign((void ***)v1372, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v546 = operator new(4u); + *v546 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v546); + std::vector>::push_back((void **)&v1416, &v1412); + v1141 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1141); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1141); + v1142 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1142 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v547 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v547 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1372, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 27; + v548 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1373 = std::map>::operator[](v548, &v1419); + std::vector::_M_move_assign((void ***)v1373, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v549 = operator new(4u); + *v549 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v549); + std::vector>::push_back((void **)&v1416, &v1412); + v1143 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1143); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1143); + v1144 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1144 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v550 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v550 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1373, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "~"); + v1414 = 27; + v551 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1374 = std::map>::operator[](v551, &v1419); + std::vector::_M_move_assign((void ***)v1374, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1145 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1145); + zcc::shared_ptr::shared_ptr(&v1410, (int)v1145); + v1146 = v1410; + std::string::basic_string((void **)&v1419, "~"); + std::string::_M_assign(v1146 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v1147 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1147); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1147); + v1148 = v1412; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v1148 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1149 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1149); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1149); + v1150 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1150 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v552 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v552 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1374, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + v1414 = 27; + v553 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1375 = std::map>::operator[](v553, &v1419); + std::vector::_M_move_assign((void ***)v1375, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v554 = operator new(4u); + *v554 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v554); + std::vector>::push_back((void **)&v1416, &v1412); + v1151 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1151); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1151); + v1152 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1152 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v555 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v555 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1375, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 27; + v556 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1376 = std::map>::operator[](v556, &v1419); + std::vector::_M_move_assign((void ***)v1376, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v557 = operator new(4u); + *v557 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v557); + std::vector>::push_back((void **)&v1416, &v1412); + v1153 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1153); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1153); + v1154 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1154 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v558 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v558 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1376, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 27; + v559 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1377 = std::map>::operator[](v559, &v1419); + std::vector::_M_move_assign((void ***)v1377, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v560 = operator new(4u); + *v560 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v560); + std::vector>::push_back((void **)&v1416, &v1412); + v1155 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1155); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1155); + v1156 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1156 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v561 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v561 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1377, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 27; + v562 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1378 = std::map>::operator[](v562, &v1419); + std::vector::_M_move_assign((void ***)v1378, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v563 = operator new(4u); + *v563 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1412, (int)v563); + std::vector>::push_back((void **)&v1416, &v1412); + v1157 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1157); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1157); + v1158 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1158 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v564 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v564 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1378, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 28; + v566 = std::map>>::operator[]((_DWORD *)a1, v565); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v566, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "]"); + v1414 = 28; + v567 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1379 = std::map>::operator[](v567, &v1419); + std::vector::_M_move_assign((void ***)v1379, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1159 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1159); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1159); + v1160 = v1412; + std::string::basic_string((void **)&v1419, "]"); + std::string::_M_assign(v1160 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1161 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1161); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1161); + v1162 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1162 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "U_SELECTOR"); + v568 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v568 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1379, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$$"); + v1414 = 28; + v569 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1380 = std::map>::operator[](v569, &v1419); + std::vector::_M_move_assign((void ***)v1380, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1163 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1163); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1163); + v1164 = v1412; + std::string::basic_string((void **)&v1419, "$$"); + std::string::_M_assign(v1164 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1165 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1165); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1165); + v1166 = v1414; + std::string::basic_string((void **)&v1419, (char *)off_50F7B4); + std::string::_M_assign(v1166 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v570 = operator new(8u); + *v570 = &off_519A44; + v570[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v570); + v1419[1] = 17; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1380, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F7EE); + v1414 = 28; + v571 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1381 = std::map>::operator[](v571, &v1419); + std::vector::_M_move_assign((void ***)v1381, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1167 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1167); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1167); + v1168 = v1412; + std::string::basic_string((void **)&v1419, (char *)off_50F7EE); + std::string::_M_assign(v1168 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1169 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1169); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1169); + v1170 = v1414; + std::string::basic_string((void **)&v1419, (char *)off_50F7B4); + std::string::_M_assign(v1170 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v572 = operator new(8u); + *v572 = &off_519A44; + v572[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v572); + v1419[1] = 19; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1381, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "~"); + v1414 = 28; + v573 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1382 = std::map>::operator[](v573, &v1419); + std::vector::_M_move_assign((void ***)v1382, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1171 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1171); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1171); + v1172 = v1414; + std::string::basic_string((void **)&v1419, "~"); + std::string::_M_assign(v1172 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v574 = operator new(8u); + *v574 = &off_519A44; + v574[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v574); + v1419[1] = 8; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1382, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F7B4); + v1414 = 28; + v575 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1383 = std::map>::operator[](v575, &v1419); + std::vector::_M_move_assign((void ***)v1383, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1173 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1173); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1173); + v1174 = v1414; + std::string::basic_string((void **)&v1419, (char *)off_50F7B4); + std::string::_M_assign(v1174 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v576 = operator new(8u); + *v576 = &off_519A44; + v576[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v576); + v1419[1] = 13; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1383, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&off_50F7EE[2]); + v1414 = 28; + v577 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1384 = std::map>::operator[](v577, &v1419); + std::vector::_M_move_assign((void ***)v1384, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1175 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1175); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1175); + v1176 = v1412; + std::string::basic_string((void **)&v1419, (char *)&off_50F7EE[2]); + std::string::_M_assign(v1176 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1177 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1177); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1177); + v1178 = v1414; + std::string::basic_string((void **)&v1419, (char *)off_50F7B4); + std::string::_M_assign(v1178 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v578 = operator new(8u); + *v578 = &off_519A44; + v578[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v578); + v1419[1] = 4; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1384, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "^"); + v1414 = 28; + v579 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1385 = std::map>::operator[](v579, &v1419); + std::vector::_M_move_assign((void ***)v1385, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1179 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1179); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1179); + v1180 = v1412; + std::string::basic_string((void **)&v1419, "^"); + std::string::_M_assign(v1180 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1181 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1181); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1181); + v1182 = v1414; + std::string::basic_string((void **)&v1419, (char *)off_50F7B4); + std::string::_M_assign(v1182 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v580 = operator new(8u); + *v580 = &off_519A44; + v580[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v580); + v1419[1] = 15; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1385, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 29; + v582 = std::map>>::operator[]((_DWORD *)a1, v581); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v582, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 29; + v583 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1386 = std::map>::operator[](v583, &v1419); + std::vector::_M_move_assign((void ***)v1386, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1183 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1183); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1183); + v1184 = v1412; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v1184 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1185 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1185); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1185); + v1186 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1186 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "EXPRESS"); + v584 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v584 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v585 = operator new(8u); + *v585 = &off_519A44; + v585[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v585); + v1419[1] = 7; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1386, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$VALUE"); + v1414 = 29; + v586 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1387 = std::map>::operator[](v586, &v1419); + std::vector::_M_move_assign((void ***)v1387, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1187 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1187); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1187); + v1188 = v1412; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v1188 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1189 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1189); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1189); + v1190 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1190 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "EXPRESS"); + v587 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v587 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v588 = operator new(8u); + *v588 = &off_519A44; + v588[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v588); + v1419[1] = 7; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1387, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 30; + v590 = std::map>>::operator[]((_DWORD *)a1, v589); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v590, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$VALUE"); + v1414 = 30; + v591 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1388 = std::map>::operator[](v591, &v1419); + std::vector::_M_move_assign((void ***)v1388, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1191 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1191); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1191); + v1192 = v1414; + std::string::basic_string((void **)&v1419, "$VALUE"); + std::string::_M_assign(v1192 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v592 = operator new(8u); + *v592 = &off_519A44; + v592[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v592); + v1419[1] = 26; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1388, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$ESV"); + v1414 = 30; + v593 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1389 = std::map>::operator[](v593, &v1419); + std::vector::_M_move_assign((void ***)v1389, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1193 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1193); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1193); + v1194 = v1414; + std::string::basic_string((void **)&v1419, "$ESV"); + std::string::_M_assign(v1194 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1414); + v594 = operator new(8u); + *v594 = &off_519A44; + v594[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v594); + v1419[1] = 9; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1389, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + v1414 = 30; + v595 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1390 = std::map>::operator[](v595, &v1419); + std::vector::_M_move_assign((void ***)v1390, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1195 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1195); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1195); + v1196 = v1412; + std::string::basic_string((void **)&v1419, (char *)asc_50F6EC); + std::string::_M_assign(v1196 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1197 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1197); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1197); + v1198 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1198 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTR"); + v596 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v596 + 32) = 3; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1390, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 31; + v598 = std::map>>::operator[]((_DWORD *)a1, v597); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v598, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 31; + v599 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1391 = std::map>::operator[](v599, &v1419); + std::vector::_M_move_assign((void ***)v1391, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1199 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1199); + zcc::shared_ptr::shared_ptr(&v1410, (int)v1199); + v1200 = v1410; + std::string::basic_string((void **)&v1419, "$NAME"); + std::string::_M_assign(v1200 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1410); + v600 = operator new(8u); + *v600 = &off_519A44; + v600[1] = 0; + zcc::shared_ptr::shared_ptr(&v1412, (int)v600); + *(_DWORD *)(v1412 + 4) = 1; + std::vector>::push_back((void **)&v1416, &v1412); + v1201 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1201); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1201); + v1202 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1202 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "ATTRS"); + v601 = v1414; + *(_DWORD *)(v1414 + 28) = 0; + *(_DWORD *)(v601 + 32) = 1; + std::vector>::push_back((void **)&v1416, &v1414); + v602 = operator new(8u); + *v602 = &off_519A44; + v602[1] = 0; + zcc::shared_ptr::shared_ptr(&v1419, (int)v602); + v1419[1] = 6; + std::vector>::push_back((void **)&v1416, &v1419); + std::vector::push_back((int)v1391, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1420); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1411); + std::vector>::~vector((void **)&v1416); + std::_Rb_tree_header::_Rb_tree_header(&v1420); + v1416 = 32; + v604 = std::map>>::operator[]((_DWORD *)a1, v603); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::operator=( + v604, + &v1419); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[6]); + v1414 = 32; + v605 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1392 = std::map>::operator[](v605, &v1419); + std::vector::_M_move_assign((void ***)v1392, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v606 = operator new(4u); + *v606 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v606); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1392, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)off_50F6FF); + v1414 = 32; + v607 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1393 = std::map>::operator[](v607, &v1419); + std::vector::_M_move_assign((void ***)v1393, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v608 = operator new(4u); + *v608 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v608); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1393, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[8]); + v1414 = 32; + v609 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1394 = std::map>::operator[](v609, &v1419); + std::vector::_M_move_assign((void ***)v1394, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v610 = operator new(4u); + *v610 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v610); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1394, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ","); + v1414 = 32; + v611 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1395 = std::map>::operator[](v611, &v1419); + std::vector::_M_move_assign((void ***)v1395, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + v1203 = operator new(0x78u); + WXSS::CSSTreeLib::Terminal::Terminal((int)v1203); + zcc::shared_ptr::shared_ptr(&v1412, (int)v1203); + v1204 = v1412; + std::string::basic_string((void **)&v1419, ","); + std::string::_M_assign(v1204 + 4, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::vector>::push_back((void **)&v1416, &v1412); + v1205 = operator new(0x3Cu); + WXSS::CSSTreeLib::Action::Action((int)v1205); + zcc::shared_ptr::shared_ptr(&v1414, (int)v1205); + v1206 = v1414; + std::string::basic_string((void **)&v1419, (char *)&byte_50F6E6); + std::string::_M_assign(v1206 + 36, (int)&v1419); + std::string::_M_dispose((void **)&v1419); + std::string::operator=((unsigned int **)(v1414 + 4), "SELECTOR"); + v612 = v1414; + *(_DWORD *)(v1414 + 28) = 2; + *(_DWORD *)(v612 + 32) = 2; + std::vector>::push_back((void **)&v1416, &v1414); + std::vector::push_back((int)v1395, &v1416); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1415); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1413); + std::vector>::~vector((void **)&v1416); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "$NAME"); + v1414 = 32; + v613 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1396 = std::map>::operator[](v613, &v1419); + std::vector::_M_move_assign((void ***)v1396, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v614 = operator new(4u); + *v614 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v614); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1396, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&off_50F7B4[2]); + v1414 = 32; + v615 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1397 = std::map>::operator[](v615, &v1419); + std::vector::_M_move_assign((void ***)v1397, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v616 = operator new(4u); + *v616 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v616); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1397, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, (char *)&asc_50F6EC[2]); + v1414 = 32; + v617 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1398 = std::map>::operator[](v617, &v1419); + std::vector::_M_move_assign((void ***)v1398, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v618 = operator new(4u); + *v618 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v618); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1398, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, "["); + v1414 = 32; + v619 = std::map>>::operator[]((_DWORD *)a1, &v1414); + v1399 = std::map>::operator[](v619, &v1419); + std::vector::_M_move_assign((void ***)v1399, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v620 = operator new(4u); + *v620 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v620); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)v1399, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + v1416 = 0; + v1417 = 0; + v1418 = 0; + std::string::basic_string((void **)&v1419, ">"); + v1414 = 32; + v621 = std::map>>::operator[]((_DWORD *)a1, &v1414); + lpuexcpta = std::map>::operator[](v621, &v1419); + std::vector::_M_move_assign((void ***)lpuexcpta, (void ***)&v1416); + std::string::_M_dispose((void **)&v1419); + std::vector::~vector((void ***)&v1416); + v1419 = 0; + v1420 = 0; + v1421 = 0; + v622 = operator new(4u); + *v622 = &off_519B18; + zcc::shared_ptr::shared_ptr(&v1416, (int)v622); + std::vector>::push_back((void **)&v1419, &v1416); + std::vector::push_back((int)lpuexcpta, &v1419); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v1417); + std::vector>::~vector((void **)&v1419); + } +} +// 40B360: variable 'v1' is possibly undefined +// 40BC87: variable 'v16' is possibly undefined +// 40C9B2: variable 'v30' is possibly undefined +// 40E537: variable 'v84' is possibly undefined +// 40EAC6: variable 'v90' is possibly undefined +// 40FD89: variable 'v108' is possibly undefined +// 4101E5: variable 'v118' is possibly undefined +// 41071D: variable 'v127' is possibly undefined +// 410E53: variable 'v135' is possibly undefined +// 4115D3: variable 'v148' is possibly undefined +// 4117BB: variable 'v152' is possibly undefined +// 41269E: variable 'v182' is possibly undefined +// 415427: variable 'v242' is possibly undefined +// 4159B6: variable 'v248' is possibly undefined +// 417AC7: variable 'v284' is possibly undefined +// 418056: variable 'v290' is possibly undefined +// 4185E5: variable 'v296' is possibly undefined +// 418B74: variable 'v302' is possibly undefined +// 419FF0: variable 'v337' is possibly undefined +// 41A57F: variable 'v343' is possibly undefined +// 41BFFD: variable 'v389' is possibly undefined +// 41DA7B: variable 'v435' is possibly undefined +// 41E0CE: variable 'v444' is possibly undefined +// 41EFD9: variable 'v464' is possibly undefined +// 41FCBC: variable 'v490' is possibly undefined +// 420AC9: variable 'v518' is possibly undefined +// 421249: variable 'v531' is possibly undefined +// 422675: variable 'v565' is possibly undefined +// 423509: variable 'v581' is possibly undefined +// 423A0C: variable 'v589' is possibly undefined +// 423FAC: variable 'v597' is possibly undefined +// 42429E: variable 'v603' is possibly undefined +// 519A44: using guessed type void (__cdecl *off_519A44)(WXSS::CSSTreeLib::NonTerminal *__hidden this); +// 519B18: using guessed type void (__cdecl *off_519B18)(WXSS::CSSTreeLib::EPS *__hidden this); + +//----- (0042A1F0) -------------------------------------------------------- +_DWORD *__usercall d_make_comp@(_DWORD *a1@, int a2@, int a3@, int a4) +{ + int v5; // ebx + _DWORD *v6; // ecx + _DWORD *result; // eax + + switch ( a2 ) + { + case 0: + case 5: + case 6: + case 7: + case 8: + case 24: + case 39: + case 44: + case 50: + case 51: + case 65: + case 66: + case 70: + case 71: + case 72: + return 0; + case 1: + case 2: + case 3: + case 4: + case 11: + case 33: + case 43: + case 45: + case 55: + case 56: + case 57: + case 58: + case 59: + case 61: + case 62: + case 64: + case 76: + case 78: + if ( a3 ) + goto LABEL_3; + return 0; + case 9: + case 10: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 34: + case 35: + case 36: + case 37: + case 38: + case 40: + case 48: + case 52: + case 53: + case 54: + case 60: + case 63: + case 67: + case 68: + case 69: + case 73: + case 74: + case 75: + if ( !a3 ) + return 0; + goto LABEL_4; + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 41: + case 46: + case 47: + case 77: + case 79: + case 80: + goto LABEL_4; + case 42: + case 49: +LABEL_3: + if ( !a4 ) + return 0; +LABEL_4: + v5 = a1[5]; + if ( v5 >= a1[6] ) + return 0; + v6 = (_DWORD *)(a1[4] + 20 * v5); + v6[1] = 0; + v6[2] = 0; + a1[5] = v5 + 1; + *v6 = a2; + v6[4] = a4; + result = v6; + v6[3] = a3; + return result; + default: + return 0; + } +} + +//----- (0042A270) -------------------------------------------------------- +_DWORD *__usercall d_make_name@(_DWORD *a1@, int a2@, int a3@) +{ + int v4; // ecx + _DWORD *v6; // edx + _DWORD *result; // eax + + v4 = a1[5]; + if ( v4 >= a1[6] ) + return 0; + v6 = (_DWORD *)(a1[4] + 20 * v4); + v6[1] = 0; + v6[2] = 0; + a1[5] = v4 + 1; + if ( !a2 || a3 <= 0 ) + return 0; + v6[1] = 0; + result = v6; + v6[2] = 0; + *v6 = 0; + v6[3] = a2; + v6[4] = a3; + return result; +} + +//----- (0042A2D0) -------------------------------------------------------- +int __usercall d_number@(int a1@) +{ + char *v1; // ebx + char v2; // cl + _BYTE *v3; // ebx + signed int v4; // esi + int v5; // ecx + int v7; // [esp+0h] [ebp-14h] + + v1 = *(char **)(a1 + 12); + v2 = *v1; + if ( *v1 != 110 ) + { + if ( (unsigned __int8)(v2 - 48) <= 9u ) + { + v7 = 0; + goto LABEL_4; + } + return 0; + } + *(_DWORD *)(a1 + 12) = v1 + 1; + v2 = v1[1]; + if ( (unsigned __int8)(v2 - 48) > 9u ) + return 0; + v7 = 1; + ++v1; +LABEL_4: + v3 = v1 + 1; + v4 = 0; + v5 = (char)(v2 - 48); + while ( 1 ) + { + *(_DWORD *)(a1 + 12) = v3; + v4 = v5 + 10 * v4; + LOBYTE(v5) = *v3 - 48; + if ( (unsigned __int8)v5 > 9u ) + break; + v5 = (char)v5; + ++v3; + if ( (int)((0x7FFFFFFF - (char)v5) / 0xAu) < v4 ) + return -1; + } + if ( v7 ) + return -v4; + return v4; +} + +//----- (0042A3A0) -------------------------------------------------------- +int __usercall d_call_offset@(int a1@, int a2@) +{ + _BYTE *v3; // eax + _BYTE *v4; // eax + _BYTE *v6; // eax + + if ( !a2 ) + { + v3 = *(_BYTE **)(a1 + 12); + if ( !*v3 ) + return 0; + *(_DWORD *)(a1 + 12) = v3 + 1; + a2 = (char)*v3; + } + if ( a2 != 104 ) + { + if ( a2 != 118 ) + return 0; + d_number(a1); + v4 = *(_BYTE **)(a1 + 12); + if ( *v4 != 95 ) + return 0; + *(_DWORD *)(a1 + 12) = v4 + 1; + } + d_number(a1); + v6 = *(_BYTE **)(a1 + 12); + if ( *v6 != 95 ) + return 0; + *(_DWORD *)(a1 + 12) = v6 + 1; + return 1; +} + +//----- (0042A400) -------------------------------------------------------- +_DWORD *__usercall d_ref_qualifier@(_DWORD *a1@, _DWORD *a2@) +{ + _DWORD *result; // eax + char *v4; // edx + char v5; // cl + int v6; // ebp + int v7; // esi + int v8; // edi + + result = a2; + v4 = (char *)a1[3]; + v5 = *v4; + if ( *v4 == 82 || v5 == 79 ) + { + v6 = a1[11]; + v7 = 32; + v8 = v6 + 3; + if ( v5 == 82 ) + { + v8 = v6 + 2; + v7 = 31; + } + a1[11] = v8; + a1[3] = v4 + 1; + return d_make_comp(a1, v7, (int)result, 0); + } + return result; +} + +//----- (0042A470) -------------------------------------------------------- +int __usercall d_discriminator@(int a1@) +{ + _BYTE *v2; // eax + int v3; // edx + int result; // eax + int v5; // eax + _BYTE *v6; // edx + + v2 = *(_BYTE **)(a1 + 12); + if ( *v2 != 95 ) + return 1; + *(_DWORD *)(a1 + 12) = v2 + 1; + if ( v2[1] != 95 ) + { + v3 = d_number(a1); + result = 0; + if ( v3 < 0 ) + return result; + return 1; + } + *(_DWORD *)(a1 + 12) = v2 + 2; + v5 = d_number(a1); + if ( v5 < 0 ) + return 0; + if ( v5 <= 9 ) + return 1; + v6 = *(_BYTE **)(a1 + 12); + result = 0; + if ( *v6 == 95 ) + { + *(_DWORD *)(a1 + 12) = v6 + 1; + return 1; + } + return result; +} + +//----- (0042A4D0) -------------------------------------------------------- +int __usercall d_count_templates_scopes@(int result@, int *a2@, int a3@) +{ + _DWORD *v3; // esi + int *v4; // ebx + int v5; // edx + int *v6; // eax + int v7; // ecx + + if ( a2 ) + { + v3 = (_DWORD *)result; + v4 = a2; + while ( 2 ) + { + result = v4[2]; + if ( result <= 1 ) + { + v5 = v3[71]; + if ( v5 <= 1024 ) + { + v4[2] = result + 1; + result = *v4; + switch ( *v4 ) + { + case 1: + case 2: + case 3: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 37: + case 38: + case 40: + case 41: + case 42: + case 43: + case 45: + case 46: + case 47: + case 48: + case 49: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 67: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + goto LABEL_11; + case 4: + ++v3[81]; +LABEL_11: + v6 = (int *)v4[3]; + goto LABEL_12; + case 7: + case 8: + case 51: + v4 = (int *)v4[4]; + goto LABEL_7; + case 35: + case 36: + v6 = (int *)v4[3]; + if ( *v6 == 5 ) + ++v3[78]; +LABEL_12: + v3[71] = v5 + 1; + d_count_templates_scopes((int)v3, v6, a3); + result = d_count_templates_scopes((int)v3, (int *)v4[4], v7); + --v3[71]; + return result; + case 44: + case 68: + case 69: + case 70: + case 71: + v4 = (int *)v4[3]; +LABEL_7: + if ( !v4 ) + return result; + continue; + default: + return result; + } + } + } + break; + } + } + return result; +} +// 42A54A: variable 'v7' is possibly undefined + +//----- (0042A580) -------------------------------------------------------- +_DWORD *__usercall d_index_template_argument_part_0@(_DWORD *result@, int a2@) +{ + if ( result ) + { + while ( *result == 47 ) + { + if ( a2 <= 0 ) + { + if ( a2 ) + return 0; + return (_DWORD *)result[3]; + } + result = (_DWORD *)result[4]; + --a2; + if ( !result ) + return result; + } + } + return 0; +} + +//----- (0042A5D0) -------------------------------------------------------- +void __cdecl d_growable_string_callback_adapter(void *Src, size_t Size, int a3) +{ + size_t v3; // ebx + int v4; // edx + size_t v5; // eax + void *v6; // eax + + v3 = *(_DWORD *)(a3 + 8); + v4 = *(_DWORD *)(a3 + 12); + v5 = Size + *(_DWORD *)(a3 + 4) + 1; + if ( v5 > v3 ) + { + if ( v4 ) + return; + if ( v3 || (v3 = 2, v5 > 2) ) + { + do + v3 *= 2; + while ( v5 > v3 ); + } + v6 = realloc(*(void **)a3, v3); + if ( !v6 ) + { + free(*(void **)a3); + *(_DWORD *)a3 = 0; + *(_DWORD *)(a3 + 4) = 0; + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 12) = 1; + return; + } + *(_DWORD *)a3 = v6; + v4 = *(_DWORD *)(a3 + 12); + *(_DWORD *)(a3 + 8) = v3; + } + if ( !v4 ) + { + memcpy((void *)(*(_DWORD *)a3 + *(_DWORD *)(a3 + 4)), Src, Size); + *(_BYTE *)(*(_DWORD *)(a3 + 4) + Size + *(_DWORD *)a3) = 0; + *(_DWORD *)(a3 + 4) += Size; + } +} + +//----- (0042A690) -------------------------------------------------------- +int sprintf_constprop_0(FILE *a1, int a2, ...) +{ + va_list va; // [esp+28h] [ebp+Ch] BYREF + + va_start(va, a2); + return __mingw_vsprintf(a1, "%d", (int *)va); +} + +//----- (0042A6C0) -------------------------------------------------------- +BOOL __usercall next_is_type_qual_isra_0@(char *a1@) +{ + char v2; // al + + v2 = *a1; + if ( v2 == 86 || v2 == 114 || v2 == 75 ) + return 1; + if ( v2 == 68 ) + return (a1[1] & 0xDF) == 79 || (unsigned __int8)(a1[1] - 119) <= 1u; + return 0; +} + +//----- (0042A720) -------------------------------------------------------- +int __usercall d_append_char@(int a1@, char a2@
) +{ + int result; // eax + int v4; // ecx + int v5; // eax + char v6; // [esp+1Ch] [ebp-10h] + + result = *(_DWORD *)(a1 + 256); + if ( result == 255 ) + { + v5 = *(_DWORD *)(a1 + 268); + v6 = a2; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v5); + ++*(_DWORD *)(a1 + 296); + a2 = v6; + result = 0; + v4 = 1; + } + else + { + v4 = result + 1; + } + *(_DWORD *)(a1 + 256) = v4; + *(_BYTE *)(a1 + result) = a2; + *(_BYTE *)(a1 + 260) = a2; + return result; +} + +//----- (0042A790) -------------------------------------------------------- +_DWORD *__usercall d_lookup_template_argument@(int a1@, int a2@) +{ + _DWORD *result; // eax + int v4; // edx + + result = *(_DWORD **)(a1 + 272); + if ( result ) + { + v4 = *(_DWORD *)(a2 + 12); + result = *(_DWORD **)(result[1] + 16); + if ( v4 >= 0 && result ) + { + while ( 1 ) + { + if ( *result != 47 ) + return 0; + if ( !v4 ) + break; + result = (_DWORD *)result[4]; + --v4; + if ( !result ) + return result; + } + return (_DWORD *)result[3]; + } + } + else + { + *(_DWORD *)(a1 + 280) = 1; + } + return result; +} + +//----- (0042A7F0) -------------------------------------------------------- +size_t __usercall d_append_string@(int a1@, const char *Str@) +{ + const char *v3; // ebx + size_t result; // eax + size_t v5; // edi + const char *v6; // edi + size_t v7; // ecx + char v8; // dl + int v9; // eax + char v10; // [esp+1Fh] [ebp-Dh] + + v3 = Str; + result = strlen(Str); + if ( result ) + { + v5 = result; + result = *(_DWORD *)(a1 + 256); + v6 = &v3[v5]; + do + { + v8 = *v3; + if ( result == 255 ) + { + v9 = *(_DWORD *)(a1 + 268); + v10 = *v3; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v9); + ++*(_DWORD *)(a1 + 296); + v8 = v10; + v7 = 0; + result = 1; + } + else + { + v7 = result++; + } + ++v3; + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v7) = v8; + *(_BYTE *)(a1 + 260) = v8; + } + while ( v6 != v3 ); + } + return result; +} + +//----- (0042A890) -------------------------------------------------------- +_DWORD *__usercall d_find_pack@(int a1@, _DWORD *a2@, int a3@) +{ + _DWORD *v4; // ebx + _DWORD *result; // eax + int v6; // edx + + if ( !a2 ) + return 0; + v4 = a2; + while ( 2 ) + { + switch ( *v4 ) + { + case 0: + case 6: + case 0x18: + case 0x27: + case 0x2C: + case 0x32: + case 0x41: + case 0x42: + case 0x46: + case 0x47: + case 0x48: + case 0x4B: + case 0x4C: + return 0; + case 5: + result = *(_DWORD **)(a1 + 272); + if ( result ) + { + v6 = v4[3]; + result = *(_DWORD **)(result[1] + 16); + if ( v6 >= 0 ) + { + if ( !result ) + return 0; + while ( 1 ) + { + if ( *result != 47 ) + return 0; + if ( !v6 ) + break; + result = (_DWORD *)result[4]; + --v6; + if ( !result ) + return 0; + } + result = (_DWORD *)result[3]; + } + if ( !result || *result != 47 ) + return 0; + } + else + { + *(_DWORD *)(a1 + 280) = 1; + } + break; + case 7: + case 8: + case 0x33: + goto LABEL_10; + default: + result = d_find_pack(a1, (_DWORD *)v4[3], a3); + if ( result ) + return result; +LABEL_10: + v4 = (_DWORD *)v4[4]; + if ( !v4 ) + return 0; + continue; + } + return result; + } +} +// 42A8CD: variable 'a3' is possibly undefined + +//----- (0042A930) -------------------------------------------------------- +_DWORD *__usercall d_template_param@(_DWORD *a1@) +{ + _BYTE *v2; // eax + char v3; // dl + int v4; // ecx + _BYTE *v5; // eax + int v6; // edx + _DWORD *result; // eax + + v2 = (_BYTE *)a1[3]; + if ( *v2 != 84 ) + return 0; + a1[3] = v2 + 1; + v3 = v2[1]; + if ( v3 == 95 ) + { + v4 = 0; + a1[3] = v2 + 2; + } + else + { + if ( v3 == 110 ) + return 0; + v4 = d_number((int)a1) + 1; + if ( v4 < 0 ) + return 0; + v5 = (_BYTE *)a1[3]; + if ( *v5 != 95 ) + return 0; + a1[3] = v5 + 1; + } + v6 = a1[5]; + if ( v6 < a1[6] ) + { + result = (_DWORD *)(a1[4] + 20 * v6); + result[1] = 0; + result[2] = 0; + a1[5] = v6 + 1; + *result = 5; + result[3] = v4; + return result; + } + return 0; +} + +//----- (0042A9C0) -------------------------------------------------------- +size_t __usercall d_append_num@(int a1@, int a2@) +{ + FILE *p_Str; // ebx + size_t result; // eax + size_t v5; // edi + FILE *v6; // edi + size_t v7; // ecx + char ptr; // dl + int v9; // eax + char v10; // [esp+1Fh] [ebp-2Dh] + FILE Str; // [esp+27h] [ebp-25h] BYREF + + p_Str = &Str; + sprintf_constprop_0(&Str, (int)"%d", a2); + result = strlen((const char *)&Str); + if ( result ) + { + v5 = result; + result = *(_DWORD *)(a1 + 256); + v6 = (FILE *)((char *)&Str + v5); + do + { + ptr = (char)p_Str->_ptr; + if ( result == 255 ) + { + v9 = *(_DWORD *)(a1 + 268); + v10 = (char)p_Str->_ptr; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v9); + ++*(_DWORD *)(a1 + 296); + ptr = v10; + v7 = 0; + result = 1; + } + else + { + v7 = result++; + } + p_Str = (FILE *)((char *)p_Str + 1); + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v7) = ptr; + *(_BYTE *)(a1 + 260) = ptr; + } + while ( v6 != p_Str ); + } + return result; +} +// 42A9C0: using guessed type FILE var_25; + +//----- (0042AA70) -------------------------------------------------------- +_DWORD *__usercall d_source_name@(int a1@) +{ + int v2; // eax + int v3; // ebp + int v4; // ecx + _BYTE *v5; // eax + _DWORD *result; // eax + int v7; // edx + int v8; // eax + char v9; // [esp+3h] [ebp-11h] + + v2 = d_number(a1); + if ( v2 > 0 ) + { + v3 = *(_DWORD *)(a1 + 12); + v4 = v2; + if ( v2 > *(_DWORD *)(a1 + 4) - v3 ) + goto LABEL_18; + v5 = (_BYTE *)(v3 + v2); + *(_DWORD *)(a1 + 12) = v3 + v4; + if ( (*(_BYTE *)(a1 + 8) & 4) != 0 && *v5 == 36 ) + { + *(_DWORD *)(a1 + 12) = v5 + 1; + if ( v4 <= 9 ) + goto LABEL_7; + } + else if ( v4 <= 9 ) + { + goto LABEL_7; + } + if ( *(_DWORD *)v3 == 1330399071 && *(_DWORD *)(v3 + 4) == 1598832962 ) + { + v9 = *(_BYTE *)(v3 + 8); + if ( (v9 == 95 || v9 == 46 || v9 == 36) && *(_BYTE *)(v3 + 9) == 78 ) + { + v7 = *(_DWORD *)(a1 + 20); + *(_DWORD *)(a1 + 44) = *(_DWORD *)(a1 + 44) + 22 - v4; + if ( v7 < *(_DWORD *)(a1 + 24) ) + { + v8 = *(_DWORD *)(a1 + 16); + *(_DWORD *)(a1 + 20) = v7 + 1; + result = (_DWORD *)(v8 + 20 * v7); + result[1] = 0; + result[2] = 0; + *result = 0; + result[3] = "(anonymous namespace)"; + result[4] = 21; + goto LABEL_8; + } +LABEL_18: + result = 0; + goto LABEL_8; + } + } +LABEL_7: + result = d_make_name((_DWORD *)a1, v3, v4); +LABEL_8: + *(_DWORD *)(a1 + 40) = result; + return result; + } + return 0; +} + +//----- (0042AB80) -------------------------------------------------------- +_DWORD *__usercall d_substitution@(int a1@, char a2@
) +{ + _BYTE *v3; // eax + int v5; // edx + BOOL v6; // eax + char v7; // cl + const char *v8; // eax + _DWORD *comp; // esi + unsigned int v11; // eax + unsigned int i; // ecx + char *v13; // eax + unsigned int v14; // ecx + int v15; // esi + int v16; // edx + int v17; // ebp + int v18; // edi + _DWORD *v19; // edi + int v20; // ecx + int v21; // eax + _BYTE *v22; // eax + int v23; // edi + _DWORD *v24; // eax + int v25; // eax + BOOL v26; // [esp+4h] [ebp-18h] + int v27; // [esp+8h] [ebp-14h] + + v3 = *(_BYTE **)(a1 + 12); + if ( *v3 != 83 ) + return 0; + *(_DWORD *)(a1 + 12) = v3 + 1; + LOBYTE(v5) = v3[1]; + if ( !(_BYTE)v5 ) + { +LABEL_3: + v26 = (*(_BYTE *)(a1 + 8) & 8) != 0; + if ( (*(_BYTE *)(a1 + 8) & 8) == 0 && (a2 & 1) != 0 ) + { + v6 = 1; + if ( (unsigned __int8)(**(_BYTE **)(a1 + 12) - 67) > 1u ) + v6 = (*(_BYTE *)(a1 + 8) & 8) != 0; + v26 = v6; + } + v7 = 116; + v8 = "t"; + while ( (_BYTE)v5 != v7 ) + { + v8 += 28; + if ( v8 == (const char *)&unk_5137C4 ) + return 0; + v7 = *v8; + } + v15 = *((_DWORD *)v8 + 5); + v16 = *(_DWORD *)(a1 + 20); + v17 = *(_DWORD *)(a1 + 24); + if ( v15 ) + { + v27 = *((_DWORD *)v8 + 6); + if ( v16 >= v17 ) + { + v19 = 0; + } + else + { + v18 = 5 * v16++; + v19 = (_DWORD *)(*(_DWORD *)(a1 + 16) + 4 * v18); + v19[1] = 0; + v19[2] = 0; + *(_DWORD *)(a1 + 20) = v16; + *v19 = 24; + v19[3] = v15; + v19[4] = v27; + } + *(_DWORD *)(a1 + 40) = v19; + } + if ( v26 ) + { + v20 = *((_DWORD *)v8 + 3); + v21 = *((_DWORD *)v8 + 4); + } + else + { + v20 = *((_DWORD *)v8 + 1); + v21 = *((_DWORD *)v8 + 2); + } + *(_DWORD *)(a1 + 44) += v21; + if ( v16 >= v17 ) + { + comp = 0; + } + else + { + comp = (_DWORD *)(*(_DWORD *)(a1 + 16) + 20 * v16); + comp[1] = 0; + comp[2] = 0; + *(_DWORD *)(a1 + 20) = v16 + 1; + *comp = 24; + comp[3] = v20; + comp[4] = v21; + } + v22 = *(_BYTE **)(a1 + 12); + if ( *v22 != 66 ) + return comp; + v23 = *(_DWORD *)(a1 + 40); + do + { + *(_DWORD *)(a1 + 12) = v22 + 1; + v24 = d_source_name(a1); + comp = d_make_comp((_DWORD *)a1, 76, (int)comp, (int)v24); + v22 = *(_BYTE **)(a1 + 12); + } + while ( *v22 == 66 ); + *(_DWORD *)(a1 + 40) = v23; + if ( comp ) + { + v25 = *(_DWORD *)(a1 + 32); + if ( v25 < *(_DWORD *)(a1 + 36) ) + { + *(_DWORD *)(*(_DWORD *)(a1 + 28) + 4 * v25) = comp; + *(_DWORD *)(a1 + 32) = v25 + 1; + return comp; + } + } + return 0; + } + *(_DWORD *)(a1 + 12) = v3 + 2; + v5 = (char)v3[1]; + if ( (unsigned __int8)(v5 - 48) > 9u ) + { + if ( (_BYTE)v5 != 95 ) + { + if ( (unsigned __int8)(v5 - 65) > 0x19u ) + goto LABEL_3; +LABEL_16: + v11 = 0; + if ( (unsigned __int8)(v5 - 48) > 9u ) + goto LABEL_22; +LABEL_17: + for ( i = v5 + 36 * v11 - 48; v11 <= i; i = v5 + 36 * v11 - 55 ) + { + v13 = *(char **)(a1 + 12); + v5 = *v13; + if ( (_BYTE)v5 ) + { + *(_DWORD *)(a1 + 12) = v13 + 1; + v5 = *v13; + if ( (_BYTE)v5 == 95 ) + { + v14 = i + 1; + goto LABEL_26; + } + } + v11 = i; + if ( (unsigned __int8)(v5 - 48) <= 9u ) + goto LABEL_17; +LABEL_22: + if ( (unsigned __int8)(v5 - 65) > 0x19u ) + return 0; + } + return 0; + } + } + else if ( (_BYTE)v5 != 95 ) + { + goto LABEL_16; + } + v14 = 0; +LABEL_26: + if ( *(_DWORD *)(a1 + 32) <= v14 ) + return 0; + return *(_DWORD **)(*(_DWORD *)(a1 + 28) + 4 * v14); +} + +//----- (0042ADC0) -------------------------------------------------------- +int __usercall d_print_java_identifier@(int result@, char *a2@, int a3@) +{ + unsigned int v3; // edi + int v4; // ebx + char *i; // ebp + int v6; // ecx + char v7; // dl + unsigned int v8; // esi + _BYTE *v9; // ebx + int v10; // eax + char v11; // cl + int v12; // eax + _BYTE *v13; // esi + int v14; // eax + int v15; // [esp+14h] [ebp-28h] + char v16; // [esp+14h] [ebp-28h] + unsigned int v17; // [esp+14h] [ebp-28h] + int v18; // [esp+18h] [ebp-24h] + char *v19; // [esp+1Ch] [ebp-20h] + + v3 = (unsigned int)&a2[a3]; + if ( a2 < &a2[a3] ) + { + v4 = result; + for ( i = a2; v3 > (unsigned int)i; ++i ) + { + v7 = *i; + result = *(_DWORD *)(v4 + 256); + if ( (int)(v3 - (_DWORD)i) <= 3 || v7 != 95 || i[1] != 95 || i[2] != 85 || v3 <= (unsigned int)(i + 3) ) + { +LABEL_3: + if ( result == 255 ) + { + v12 = *(_DWORD *)(v4 + 268); + *(_BYTE *)(v4 + 255) = 0; + v16 = v7; + (*(void (__cdecl **)(int, int, int))(v4 + 264))(v4, 255, v12); + ++*(_DWORD *)(v4 + 296); + v7 = v16; + result = 0; + v6 = 1; + } + else + { + v6 = result + 1; + } + *(_DWORD *)(v4 + 256) = v6; + *(_BYTE *)(v4 + result) = v7; + *(_BYTE *)(v4 + 260) = v7; + continue; + } + v18 = v4; + v8 = 0; + v9 = i + 3; + v15 = result; + while ( 1 ) + { + v11 = *v9; + LOBYTE(v10) = *v9 - 48; + if ( (unsigned __int8)v10 <= 9u ) + { + v10 = (char)v10; + goto LABEL_15; + } + if ( (unsigned __int8)(v11 - 65) > 5u ) + break; + v10 = (char)(v11 - 55); +LABEL_15: + ++v9; + v8 = v10 + 16 * v8; + if ( (_BYTE *)v3 == v9 ) + { + result = v15; + v4 = v18; + goto LABEL_3; + } + } + if ( (unsigned __int8)(v11 - 97) <= 5u ) + { + v10 = (char)(v11 - 87); + goto LABEL_15; + } + result = v15; + v17 = v8; + v13 = v9; + v19 = v9; + v4 = v18; + if ( v3 <= (unsigned int)v13 || v17 > 0xFF || v11 != 95 ) + goto LABEL_3; + if ( result == 255 ) + { + v14 = *(_DWORD *)(v18 + 268); + *(_BYTE *)(v18 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(v18 + 264))(v18, 255, v14); + ++*(_DWORD *)(v18 + 296); + result = 0; + } + i = v19; + *(_DWORD *)(v18 + 256) = result + 1; + *(_BYTE *)(v18 + result) = v17; + *(_BYTE *)(v18 + 260) = v17; + } + } + return result; +} + +//----- (0042AF70) -------------------------------------------------------- +int *__usercall d_type@( + _DWORD *a1@, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8, + int a9, + int a10, + int a11, + int a12) +{ + char *v13; // esi + int v14; // edi + unsigned int *v15; // eax + unsigned int *name; // esi + int *result; // eax + int **v18; // esi + int *v19; // eax + int *v20; // edx + int *v21; // ecx + int v22; // edx + int v23; // edx + int v24; // ecx + int v25; // edx + int v26; // edx + char v27; // al + _BYTE *v28; // edx + int *v29; // eax + int *v30; // eax + int *v31; // eax + int *v32; // eax + _DWORD *v33; // eax + int *v34; // eax + int *comp; // esi + _BYTE *v36; // eax + int *v37; // eax + _BYTE *v38; // esi + int v39; // ecx + _DWORD *v40; // ecx + _BYTE *v41; // edx + char v42; // al + char *v43; // esi + char *v44; // ecx + int *v45; // eax + int *v46; // esi + int *v47; // eax + int v48; // esi + unsigned int *v49; // eax + _BYTE *v50; // edx + int v51; // eax + int *v52; // edi + unsigned __int8 v53; // al + char *v54; // eax + char v55; // dl + int v56; // edx + int v57; // eax + int v58; // edx + int v59; // eax + int v60; // edx + int v61; // edx + int v62; // edx + int v63; // edx + int v64; // eax + unsigned int *v65; // esi + _BYTE *v66; // eax + int *v67; // eax + int v68; // edx + int v69; // edx + int v70; // edx + int *v71; // eax + int v72; // edx + _DWORD *v73; // eax + int v74; // ebp + int v75; // edi + _DWORD *v76; // ecx + int *v77; // edx + int v78; // eax + int v79; // edi + unsigned int *v80; // eax + int v81; // [esp+0h] [ebp-4Ch] + _DWORD *v82; // [esp+0h] [ebp-4Ch] + int v83; // [esp+0h] [ebp-4Ch] + int v84; // [esp+4h] [ebp-48h] + int v85; // [esp+4h] [ebp-48h] + int v86; // [esp+8h] [ebp-44h] + int v87; // [esp+8h] [ebp-44h] + int v88; // [esp+Ch] [ebp-40h] + int v89; // [esp+Ch] [ebp-40h] + int v90; // [esp+10h] [ebp-3Ch] + int v91; // [esp+10h] [ebp-3Ch] + int v92; // [esp+14h] [ebp-38h] + int v93; // [esp+14h] [ebp-38h] + int v94; // [esp+18h] [ebp-34h] + int v95; // [esp+18h] [ebp-34h] + int v96; // [esp+1Ch] [ebp-30h] + int v97; // [esp+1Ch] [ebp-30h] + int v98; // [esp+1Ch] [ebp-30h] + int v99; // [esp+20h] [ebp-2Ch] + int v100; // [esp+20h] [ebp-2Ch] + int v101; // [esp+24h] [ebp-28h] + int v102; // [esp+24h] [ebp-28h] + int v103; // [esp+28h] [ebp-24h] + int v104; // [esp+28h] [ebp-24h] + int *v105; // [esp+2Ch] [ebp-20h] BYREF + + v13 = (char *)a1[3]; + if ( next_is_type_qual_isra_0(v13) ) + { + v18 = d_cv_qualifiers(a1, &v105, 0); + if ( v18 ) + { + v19 = *(_BYTE *)a1[3] == 70 + ? d_function_type((int)a1) + : d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + *v18 = v19; + v20 = v19; + if ( v19 ) + { + result = v105; + if ( (unsigned int)(*v20 - 31) <= 1 ) + { + v21 = (int *)v20[3]; + v20[3] = (int)v105; + v105 = *v18; + *v18 = v21; + result = v105; + } + if ( result ) + { + v22 = a1[8]; + if ( v22 < a1[9] ) + { + *(_DWORD *)(a1[7] + 4 * v22) = result; + a1[8] = v22 + 1; + return result; + } + } + } + } + } + else + { + switch ( *v13 ) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case 'N': + case 'Z': + result = d_name(a1); + v105 = result; + goto LABEL_19; + case 'A': + v41 = v13 + 1; + a1[3] = v13 + 1; + v42 = v13[1]; + if ( v42 == 95 ) + { + name = 0; +LABEL_53: + a1[3] = v41 + 1; + v45 = d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + result = d_make_comp(a1, 42, (int)name, (int)v45); + v105 = result; + goto LABEL_19; + } + if ( (unsigned __int8)(v42 - 48) > 9u ) + { + v14 = a1[12]; + a1[12] = 1; + v15 = d_expression_1(a1); + a1[12] = v14; + name = v15; + if ( !v15 ) + return 0; +LABEL_52: + v41 = (_BYTE *)a1[3]; + if ( *v41 != 95 ) + return 0; + goto LABEL_53; + } + v43 = v13 + 2; + do + { + v44 = v43; + a1[3] = v43++; + } + while ( (unsigned __int8)(*v44 - 48) <= 9u ); + name = d_make_name(a1, (int)v41, v44 - v41); + if ( name ) + goto LABEL_52; + break; + case 'C': + a1[3] = v13 + 1; + v34 = d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + result = d_make_comp(a1, 37, (int)v34, 0); + v105 = result; + goto LABEL_19; + case 'D': + a1[3] = v13 + 1; + if ( !v13[1] ) + return 0; + a1[3] = v13 + 2; + switch ( v13[1] ) + { + case 'F': + v51 = a1[5]; + if ( v51 >= a1[6] ) + { + MEMORY[0] = 0; + BUG(); + } + v52 = (int *)(a1[4] + 20 * v51); + v52[1] = 0; + v52[2] = 0; + v105 = v52; + a1[5] = v51 + 1; + *v52 = 44; + v53 = v13[2] - 48; + *((_WORD *)v52 + 8) = v53 <= 9u; + if ( v53 <= 9u ) + { + d_number((int)a1); + v52 = v105; + } + v52[3] = (int)d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + if ( !v105[3] ) + return 0; + d_number((int)a1); + v54 = (char *)a1[3]; + v55 = *v54; + if ( *v54 ) + { + a1[3] = v54 + 1; + v55 = *v54; + } + result = v105; + *((_WORD *)v105 + 9) = v55 == 115; + return result; + case 'T': + case 't': + v48 = a1[12]; + a1[12] = 1; + v49 = d_expression_1(a1); + a1[12] = v48; + result = d_make_comp(a1, 67, (int)v49, 0); + v105 = result; + if ( result ) + { + v50 = (_BYTE *)a1[3]; + if ( *v50 ) + { + a1[3] = v50 + 1; + if ( *v50 == 69 ) + goto LABEL_20; + } + } + return 0; + case 'a': + v58 = a1[5]; + if ( v58 >= a1[6] ) + return 0; + v59 = a1[4]; + a1[5] = v58 + 1; + result = (int *)(v59 + 20 * v58); + result[1] = 0; + result[2] = 0; + *result = 0; + result[3] = (int)"auto"; + result[4] = 4; + return result; + case 'c': + v56 = a1[5]; + if ( v56 >= a1[6] ) + return 0; + v57 = a1[4]; + a1[5] = v56 + 1; + result = (int *)(v57 + 20 * v56); + result[1] = 0; + result[2] = 0; + *result = 0; + result[3] = (int)"decltype(auto)"; + result[4] = 14; + return result; + case 'd': + v68 = a1[5]; + if ( v68 >= a1[6] ) + { + v105 = 0; + BUG(); + } + result = (int *)(a1[4] + 20 * v68); + result[1] = 0; + result[2] = 0; + a1[5] = v68 + 1; + *result = 39; + result[3] = (int)&off_51413C; + a1[11] += 9; + return result; + case 'e': + v63 = a1[5]; + if ( v63 >= a1[6] ) + { + v105 = 0; + BUG(); + } + result = (int *)(a1[4] + 20 * v63); + result[1] = 0; + result[2] = 0; + a1[5] = v63 + 1; + *result = 39; + result[3] = (int)&off_514150; + a1[11] += 10; + return result; + case 'f': + v61 = a1[5]; + if ( v61 >= a1[6] ) + { + v105 = 0; + BUG(); + } + result = (int *)(a1[4] + 20 * v61); + result[1] = 0; + result[2] = 0; + a1[5] = v61 + 1; + *result = 39; + result[3] = (int)&off_514128; + a1[11] += 9; + return result; + case 'h': + v60 = a1[5]; + if ( v60 >= a1[6] ) + { + v105 = 0; + BUG(); + } + result = (int *)(a1[4] + 20 * v60); + result[1] = 0; + result[2] = 0; + a1[5] = v60 + 1; + *result = 39; + result[3] = (int)&off_514164; + a1[11] += 4; + return result; + case 'i': + v72 = a1[5]; + if ( v72 >= a1[6] ) + { + v105 = 0; + BUG(); + } + result = (int *)(a1[4] + 20 * v72); + result[1] = 0; + result[2] = 0; + a1[5] = v72 + 1; + *result = 39; + result[3] = (int)&off_5141A0; + a1[11] += 8; + return result; + case 'n': + v69 = a1[5]; + if ( v69 >= a1[6] ) + { + v105 = 0; + BUG(); + } + result = (int *)(a1[4] + 20 * v69); + result[1] = 0; + result[2] = 0; + a1[5] = v69 + 1; + *result = 39; + result[3] = (int)&off_5141B4; + a1[11] += 17; + return result; + case 'p': + v71 = d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + result = d_make_comp(a1, 75, (int)v71, 0); + v105 = result; + goto LABEL_19; + case 's': + v62 = a1[5]; + if ( v62 >= a1[6] ) + { + v105 = 0; + BUG(); + } + result = (int *)(a1[4] + 20 * v62); + result[1] = 0; + result[2] = 0; + a1[5] = v62 + 1; + *result = 39; + result[3] = (int)&off_51418C; + a1[11] += 8; + return result; + case 'u': + v70 = a1[5]; + if ( v70 >= a1[6] ) + { + v105 = 0; + BUG(); + } + result = (int *)(a1[4] + 20 * v70); + result[1] = 0; + result[2] = 0; + a1[5] = v70 + 1; + *result = 39; + result[3] = (int)&off_514178; + a1[11] += 7; + return result; + case 'v': + if ( v13[2] == 95 ) + { + v79 = a1[12]; + a1[12] = 1; + a1[3] = v13 + 3; + v80 = d_expression_1(a1); + a1[12] = v79; + v65 = v80; + if ( !v80 ) + return 0; + } + else + { + v64 = a1[5]; + if ( v64 >= a1[6] ) + return 0; + v65 = (unsigned int *)(a1[4] + 20 * v64); + v65[1] = 0; + v65[2] = 0; + a1[5] = v64 + 1; + *v65 = 66; + v65[3] = d_number((int)a1); + } + v66 = (_BYTE *)a1[3]; + if ( *v66 != 95 ) + return 0; + a1[3] = v66 + 1; + v67 = d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + result = d_make_comp(a1, 45, (int)v65, (int)v67); + v105 = result; + break; + default: + return 0; + } + goto LABEL_19; + case 'F': + result = d_function_type((int)a1); + v105 = result; + goto LABEL_19; + case 'G': + a1[3] = v13 + 1; + v32 = d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + result = d_make_comp(a1, 38, (int)v32, 0); + v105 = result; + goto LABEL_19; + case 'M': + a1[3] = v13 + 1; + v46 = d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + if ( !v46 ) + return 0; + v47 = d_type(a1, v83, v85, v87, v89, v91, v93, v95, v97, v100, v102, v104); + if ( !v47 ) + return 0; + result = d_make_comp(a1, 43, (int)v46, (int)v47); + v105 = result; + goto LABEL_19; + case 'O': + a1[3] = v13 + 1; + v31 = d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + result = d_make_comp(a1, 36, (int)v31, 0); + v105 = result; + goto LABEL_19; + case 'P': + a1[3] = v13 + 1; + v30 = d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + result = d_make_comp(a1, 34, (int)v30, 0); + v105 = result; + goto LABEL_19; + case 'R': + a1[3] = v13 + 1; + v29 = d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + result = d_make_comp(a1, 35, (int)v29, 0); + v105 = result; + goto LABEL_19; + case 'S': + v27 = v13[1]; + if ( (unsigned __int8)(v27 - 48) <= 9u || v27 == 95 || (unsigned __int8)(v27 - 65) <= 0x19u ) + { + result = d_substitution((int)a1, 0); + v28 = (_BYTE *)a1[3]; + v105 = result; + if ( *v28 != 73 ) + return result; + a1[3] = v28 + 1; + v82 = d_template_args_1(a1); + result = d_make_comp(a1, 4, (int)v105, (int)v82); + goto LABEL_27; + } + result = d_name(a1); + v105 = result; + if ( !result ) + return 0; + if ( *result == 24 ) + return result; + goto LABEL_20; + case 'T': + result = d_template_param(a1); + v38 = (_BYTE *)a1[3]; + v105 = result; + if ( *v38 != 73 ) + goto LABEL_19; + if ( a1[13] ) + { + v74 = a1[5]; + v75 = a1[8]; + v98 = a1[11]; + a1[3] = v38 + 1; + v76 = d_template_args_1(a1); + if ( *(_BYTE *)a1[3] == 73 ) + { + v77 = v105; + if ( !v105 ) + return 0; + v78 = a1[8]; + if ( v78 >= a1[9] ) + return 0; + *(_DWORD *)(a1[7] + 4 * v78) = v105; + a1[8] = v78 + 1; + result = d_make_comp(a1, 4, (int)v77, (int)v76); + v105 = result; + } + else + { + a1[3] = v38; + a1[5] = v74; + a1[11] = v98; + result = v105; + a1[8] = v75; + } + } + else + { + if ( !result ) + return 0; + v39 = a1[8]; + if ( v39 >= a1[9] ) + return 0; + *(_DWORD *)(a1[7] + 4 * v39) = result; + a1[8] = v39 + 1; + v40 = 0; + if ( (unsigned __int8)(*v38 - 73) <= 1u ) + { + a1[3] = v38 + 1; + v40 = d_template_args_1(a1); + } + result = d_make_comp(a1, 4, (int)v105, (int)v40); +LABEL_27: + v105 = result; + } +LABEL_19: + if ( !result ) + return 0; +LABEL_20: + v26 = a1[8]; + if ( v26 < a1[9] ) + { + *(_DWORD *)(a1[7] + 4 * v26) = result; + result = v105; + a1[8] = v26 + 1; + return result; + } + return 0; + case 'U': + a1[3] = v13 + 1; + v105 = d_source_name((int)a1); + comp = v105; + v36 = (_BYTE *)a1[3]; + if ( *v36 == 73 ) + { + a1[3] = v36 + 1; + v73 = d_template_args_1(a1); + comp = d_make_comp(a1, 4, (int)v105, (int)v73); + } + v37 = d_type(a1, v81, v84, v86, v88, v90, v92, v94, v96, v99, v101, v103); + result = d_make_comp(a1, 33, (int)v37, (int)comp); + v105 = result; + goto LABEL_19; + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'l': + case 'm': + case 'n': + case 'o': + case 's': + case 't': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': + v23 = a1[5]; + v24 = 20 * (char)(*v13 - 97) + 5324576; + if ( v23 >= a1[6] ) + d_type_cold(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); + result = (int *)(a1[4] + 20 * v23); + result[1] = 0; + result[2] = 0; + a1[5] = v23 + 1; + v25 = *(_DWORD *)(v24 + 4); + *result = 39; + result[3] = v24; + a1[11] += v25; + a1[3] = v13 + 1; + return result; + case 'u': + a1[3] = v13 + 1; + v33 = d_source_name((int)a1); + result = d_make_comp(a1, 40, (int)v33, 0); + v105 = result; + goto LABEL_19; + default: + return 0; + } + } + return 0; +} +// 42AFED: variable 'v81' is possibly undefined +// 42AFED: variable 'v84' is possibly undefined +// 42AFED: variable 'v86' is possibly undefined +// 42AFED: variable 'v88' is possibly undefined +// 42AFED: variable 'v90' is possibly undefined +// 42AFED: variable 'v92' is possibly undefined +// 42AFED: variable 'v94' is possibly undefined +// 42AFED: variable 'v96' is possibly undefined +// 42AFED: variable 'v99' is possibly undefined +// 42AFED: variable 'v101' is possibly undefined +// 42AFED: variable 'v103' is possibly undefined +// 42B3C3: variable 'v83' is possibly undefined +// 42B3C3: variable 'v85' is possibly undefined +// 42B3C3: variable 'v87' is possibly undefined +// 42B3C3: variable 'v89' is possibly undefined +// 42B3C3: variable 'v91' is possibly undefined +// 42B3C3: variable 'v93' is possibly undefined +// 42B3C3: variable 'v95' is possibly undefined +// 42B3C3: variable 'v97' is possibly undefined +// 42B3C3: variable 'v100' is possibly undefined +// 42B3C3: variable 'v102' is possibly undefined +// 42B3C3: variable 'v104' is possibly undefined +// 514128: using guessed type char *off_514128; +// 51413C: using guessed type char *off_51413C; +// 514150: using guessed type char *off_514150; +// 514164: using guessed type char *off_514164; +// 514178: using guessed type char *off_514178; +// 51418C: using guessed type char *off_51418C; +// 5141A0: using guessed type char *off_5141A0; +// 5141B4: using guessed type char *off_5141B4; + +//----- (0042B8F0) -------------------------------------------------------- +_DWORD *__usercall d_operator_name@(_DWORD *a1@) +{ + unsigned __int8 *v2; // eax + unsigned __int8 v3; // si + unsigned __int8 v4; // cl + int v5; // edx + unsigned __int8 v6; // bp + void **v7; // edi + _BYTE *v8; // ecx + bool v9; // cc + _DWORD *result; // eax + int v11; // edx + char v12; // bl + _DWORD *v13; // eax + int v14; // edx + _DWORD *v15; // ecx + int v16; // ebx + int *v17; // eax + int v18; // [esp+0h] [ebp-3Ch] + int v19; // [esp+4h] [ebp-38h] + int v20; // [esp+8h] [ebp-34h] + int v21; // [esp+Ch] [ebp-30h] + int v22; // [esp+10h] [ebp-2Ch] + int v23; // [esp+14h] [ebp-28h] + int v24; // [esp+18h] [ebp-24h] + int v25; // [esp+18h] [ebp-24h] + int v26; // [esp+1Ch] [ebp-20h] + _DWORD *v27; // [esp+1Ch] [ebp-20h] + int v28; // [esp+20h] [ebp-1Ch] + int v29; // [esp+24h] [ebp-18h] + int v30; // [esp+28h] [ebp-14h] + + v2 = (unsigned __int8 *)a1[3]; + if ( !*v2 ) + { + v4 = 0; + v3 = 0; + goto LABEL_3; + } + a1[3] = v2 + 1; + v3 = *v2; + v4 = v2[1]; + if ( !v4 ) + { +LABEL_3: + v27 = a1; + v5 = 0; + v6 = v4; + v25 = 69; + while ( 1 ) + { + v7 = &cplus_demangle_operators + 4 * v5 + 4 * ((v25 - v5) / 2); + v8 = *v7; + v9 = *(_BYTE *)*v7 <= v3; + if ( *(_BYTE *)*v7 == v3 ) + { + v9 = v8[1] <= v6; + if ( v8[1] == v6 ) + break; + } + if ( v9 ) + v5 += (v25 - v5) / 2 + 1; + else + v25 = v5 + (v25 - v5) / 2; + if ( v5 == v25 ) + return 0; + } + v11 = v27[5]; + if ( v11 < v27[6] ) + { + result = (_DWORD *)(v27[4] + 20 * v11); + result[1] = 0; + result[2] = 0; + v27[5] = v11 + 1; + *result = 50; + result[3] = v7; + return result; + } + return 0; + } + a1[3] = v2 + 2; + v4 = v2[1]; + if ( v3 == 118 ) + { + v12 = v4 - 48; + if ( (unsigned __int8)(v4 - 48) > 9u ) + goto LABEL_3; + v13 = d_source_name((int)a1); + v14 = a1[5]; + v15 = v13; + if ( v14 >= a1[6] ) + return 0; + result = (_DWORD *)(a1[4] + 20 * v14); + result[1] = 0; + result[2] = 0; + a1[5] = v14 + 1; + if ( !v15 ) + return 0; + result[1] = 0; + result[2] = 0; + *result = 51; + result[3] = v12; + result[4] = v15; + } + else + { + if ( v4 != 118 || v3 != 99 ) + goto LABEL_3; + v16 = a1[13]; + a1[13] = a1[12] == 0; + v17 = d_type(a1, v18, v19, v20, v21, v22, v23, v24, v26, v28, v29, v30); + if ( a1[13] ) + result = d_make_comp(a1, 53, (int)v17, 0); + else + result = d_make_comp(a1, 52, (int)v17, 0); + a1[13] = v16; + } + return result; +} +// 42BA71: variable 'v18' is possibly undefined +// 42BA71: variable 'v19' is possibly undefined +// 42BA71: variable 'v20' is possibly undefined +// 42BA71: variable 'v21' is possibly undefined +// 42BA71: variable 'v22' is possibly undefined +// 42BA71: variable 'v23' is possibly undefined +// 42BA71: variable 'v24' is possibly undefined +// 42BA71: variable 'v26' is possibly undefined +// 42BA71: variable 'v28' is possibly undefined +// 42BA71: variable 'v29' is possibly undefined +// 42BA71: variable 'v30' is possibly undefined +// 5139A0: using guessed type void *cplus_demangle_operators; + +//----- (0042BAB0) -------------------------------------------------------- +int __usercall d_parmlist@(_DWORD *a1@) +{ + char *v2; // ebp + char v3; // al + int *v4; // esi + _DWORD *comp; // eax + int *v6; // ecx + int result; // eax + _DWORD *v8; // edx + int v9; // edx + int v10; // [esp+0h] [ebp-3Ch] + int v11; // [esp+4h] [ebp-38h] + int v12; // [esp+8h] [ebp-34h] + int v13; // [esp+Ch] [ebp-30h] + int v14; // [esp+10h] [ebp-2Ch] + int v15; // [esp+14h] [ebp-28h] + int v16; // [esp+18h] [ebp-24h] + int v17[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = (char *)a1[3]; + v17[0] = 0; + v3 = *v2; + if ( v3 == 0 || v3 == 69 ) + return 0; + v4 = v17; + if ( v3 == 46 ) + return 0; + do + { + if ( (v3 == 82 || v3 == 79) && v2[1] == 69 ) + break; + v6 = d_type(a1, v10, v11, v12, v13, v14, v15, v16, v17[0], v17[1], v17[2], v17[3]); + if ( !v6 ) + return 0; + comp = d_make_comp(a1, 46, (int)v6, 0); + *v4 = (int)comp; + if ( !comp ) + return 0; + v2 = (char *)a1[3]; + v4 = comp + 4; + v3 = *v2; + if ( *v2 == 69 || *v2 == 0 ) + break; + } + while ( v3 != 46 ); + result = v17[0]; + if ( !v17[0] ) + return 0; + if ( !*(_DWORD *)(v17[0] + 16) ) + { + v8 = *(_DWORD **)(v17[0] + 12); + if ( *v8 == 39 ) + { + v9 = v8[3]; + if ( *(_DWORD *)(v9 + 16) == 9 ) + { + a1[11] -= *(_DWORD *)(v9 + 4); + *(_DWORD *)(result + 12) = 0; + } + } + } + return result; +} +// 42BB31: variable 'v10' is possibly undefined +// 42BB31: variable 'v11' is possibly undefined +// 42BB31: variable 'v12' is possibly undefined +// 42BB31: variable 'v13' is possibly undefined +// 42BB31: variable 'v14' is possibly undefined +// 42BB31: variable 'v15' is possibly undefined +// 42BB31: variable 'v16' is possibly undefined +// 42BAB0: using guessed type int var_20[8]; + +//----- (0042BB80) -------------------------------------------------------- +#error "42BB95: call analysis failed (funcsize=40)" + +//----- (0042BBF0) -------------------------------------------------------- +_DWORD *__usercall d_function_type@(int a1@) +{ + unsigned int v2; // ecx + _BYTE *v3; // edx + _DWORD *result; // eax + _DWORD *v5; // eax + _BYTE *v6; // edx + + if ( (*(_BYTE *)(a1 + 10) & 4) != 0 ) + { + v3 = *(_BYTE **)(a1 + 12); + if ( *v3 == 70 ) + goto LABEL_8; + return 0; + } + v2 = *(_DWORD *)(a1 + 56); + if ( v2 > 0x800 ) + return 0; + v3 = *(_BYTE **)(a1 + 12); + *(_DWORD *)(a1 + 56) = v2 + 1; + result = 0; + if ( *v3 != 70 ) + { +LABEL_4: + *(_DWORD *)(a1 + 56) = v2; + return result; + } +LABEL_8: + *(_DWORD *)(a1 + 12) = v3 + 1; + if ( v3[1] == 89 ) + *(_DWORD *)(a1 + 12) = v3 + 2; + v5 = d_bare_function_type((_DWORD *)a1, 1); + result = d_ref_qualifier((_DWORD *)a1, v5); + v6 = *(_BYTE **)(a1 + 12); + if ( *v6 == 69 ) + *(_DWORD *)(a1 + 12) = v6 + 1; + else + result = 0; + if ( (*(_BYTE *)(a1 + 10) & 4) == 0 ) + { + v2 = *(_DWORD *)(a1 + 56) - 1; + goto LABEL_4; + } + return result; +} + +//----- (0042BC80) -------------------------------------------------------- +_DWORD *__usercall d_unqualified_name@(_DWORD *a1@) +{ + char *v2; // eax + char v3; // cl + _DWORD *v4; // eax + _DWORD *comp; // esi + char v6; // dl + char v8; // dl + char *v9; // ecx + char v10; // dl + int v11; // eax + bool v12; // sf + int v13; // ecx + int v14; // eax + int v15; // edx + int v16; // edi + _DWORD *v17; // eax + int v18; // eax + int v19; // edx + _BYTE *v20; // eax + _DWORD *v21; // eax + _DWORD *v22; // edi + int v23; // edx + int v24; // ecx + int v25; // edi + char v26; // dl + int v27; // eax + int v28; // ecx + int v29; // edx + int v30; // ecx + int v31; // edi + int v32; // eax + int v33; // edx + int v34; // [esp+0h] [ebp-3Ch] + int v35; // [esp+4h] [ebp-38h] + int v36; // [esp+8h] [ebp-34h] + int v37; // [esp+Ch] [ebp-30h] + int v38; // [esp+10h] [ebp-2Ch] + int v39; // [esp+14h] [ebp-28h] + int v40; // [esp+18h] [ebp-24h] + int v41; // [esp+1Ch] [ebp-20h] + int v42; // [esp+20h] [ebp-1Ch] + int v43; // [esp+24h] [ebp-18h] + int v44; // [esp+28h] [ebp-14h] + + v2 = (char *)a1[3]; + v3 = *v2; + if ( (unsigned __int8)(*v2 - 48) > 9u ) + { + if ( (unsigned __int8)(v3 - 97) <= 0x19u ) + { + if ( v3 == 111 && v2[1] == 110 ) + a1[3] = v2 + 2; + v4 = d_operator_name(a1); + comp = v4; + if ( v4 ) + { + if ( *v4 == 50 ) + { + v18 = v4[3]; + v19 = *(_DWORD *)(v18 + 8); + v20 = *(_BYTE **)v18; + a1[11] += v19 + 7; + if ( *v20 == 108 && v20[1] == 105 && !v20[2] ) + { + v21 = d_source_name((int)a1); + comp = d_make_comp(a1, 55, (int)comp, (int)v21); + v2 = (char *)a1[3]; + v6 = *v2; + goto LABEL_7; + } + } + } +LABEL_6: + v2 = (char *)a1[3]; + v6 = *v2; + goto LABEL_7; + } + if ( (unsigned __int8)(v3 - 67) > 1u ) + { + if ( v3 != 76 ) + { + if ( v3 != 85 ) + return 0; + v8 = v2[1]; + if ( v8 == 108 ) + { + v9 = v2 + 1; + a1[3] = v2 + 1; + v6 = v2[1]; + if ( v6 == 108 ) + { + a1[3] = v2 + 2; + v25 = d_parmlist(a1); + v2 = (char *)a1[3]; + v6 = *v2; + if ( !v25 || v6 != 69 ) + goto LABEL_43; + a1[3] = v2 + 1; + v26 = v2[1]; + if ( v26 == 95 ) + { + v2 += 2; + v28 = 0; + a1[3] = v2; + } + else + { + if ( v26 == 110 ) + return 0; + v27 = d_number((int)a1); + v12 = v27 + 1 < 0; + v28 = v27 + 1; + v2 = (char *)a1[3]; + v6 = *v2; + if ( v12 || v6 != 95 ) + goto LABEL_43; + a1[3] = ++v2; + } + v29 = a1[5]; + if ( v29 < a1[6] ) + { + comp = (_DWORD *)(a1[4] + 20 * v29); + comp[1] = 0; + comp[2] = 0; + a1[5] = v29 + 1; + v15 = a1[8]; + *comp = 70; + comp[3] = v25; + comp[4] = v28; + if ( v15 < a1[9] ) + goto LABEL_22; + } + goto LABEL_64; + } + } + else + { + if ( v8 != 116 ) + return 0; + v9 = v2 + 1; + a1[3] = v2 + 1; + v6 = v2[1]; + if ( v6 == 116 ) + { + a1[3] = v2 + 2; + v10 = v2[2]; + if ( v10 == 95 ) + { + v13 = 0; + a1[3] = v2 + 3; +LABEL_20: + v14 = a1[5]; + if ( v14 < a1[6] ) + { + comp = (_DWORD *)(a1[4] + 20 * v14); + v15 = a1[8]; + comp[1] = 0; + comp[2] = 0; + a1[5] = v14 + 1; + v2 = (char *)a1[3]; + *comp = 72; + comp[3] = v13; + if ( v15 < a1[9] ) + { +LABEL_22: + *(_DWORD *)(a1[7] + 4 * v15) = comp; + a1[8] = v15 + 1; + v6 = *v2; + goto LABEL_7; + } + goto LABEL_64; + } + goto LABEL_71; + } + if ( v10 != 110 ) + { + v11 = d_number((int)a1); + v12 = v11 + 1 < 0; + v13 = v11 + 1; + v2 = (char *)a1[3]; + v6 = *v2; + if ( !v12 && v6 == 95 ) + { + a1[3] = v2 + 1; + goto LABEL_20; + } +LABEL_43: + comp = 0; + goto LABEL_7; + } + return 0; + } + } + v2 = v9; + comp = 0; + goto LABEL_7; + } + a1[3] = v2 + 1; + comp = d_source_name((int)a1); + if ( comp && d_discriminator((int)a1) ) + goto LABEL_6; + return 0; + } + v22 = (_DWORD *)a1[10]; + v41 = (int)v22; + if ( v22 && (!*v22 || *v22 == 24) ) + { + a1[11] += v22[4]; + v6 = *v2; + v3 = *v2; + if ( *v2 != 67 ) + { + if ( v6 != 68 ) + goto LABEL_43; + goto LABEL_40; + } + } + else if ( v3 != 67 ) + { +LABEL_40: + switch ( v2[1] ) + { + case '0': + v23 = 1; + goto LABEL_46; + case '1': + v23 = 2; + goto LABEL_46; + case '2': + v23 = 3; + goto LABEL_46; + case '4': + v23 = 4; + goto LABEL_46; + case '5': + v23 = 5; +LABEL_46: + v24 = a1[5]; + a1[3] = v2 + 2; + if ( v24 < a1[6] && (comp = (_DWORD *)(a1[4] + 20 * v24), comp[1] = 0, comp[2] = 0, a1[5] = v24 + 1, v22) ) + { + comp[1] = 0; + comp[2] = 0; + *comp = 8; + comp[3] = v23; + comp[4] = v22; + v6 = v2[2]; + v2 += 2; + } + else + { + v6 = v2[2]; + comp = 0; + v2 += 2; + } + break; + default: + v6 = v3; + comp = 0; + break; + } +LABEL_7: + if ( v6 != 66 ) + return comp; + goto LABEL_24; + } + v30 = v2[1]; + if ( (_BYTE)v30 == 73 ) + { + a1[3] = v2 + 1; + v33 = v2[2]; + if ( (unsigned __int8)(v33 - 49) > 4u ) + { + v6 = v2[1]; + comp = 0; + ++v2; + goto LABEL_7; + } + v31 = v33 - 48; + a1[3] = v2 + 3; + d_type(a1, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44); + v41 = a1[10]; + } + else + { + if ( (unsigned __int8)(v30 - 49) > 4u ) + return 0; + v31 = v30 - 48; + a1[3] = v2 + 2; + } + v32 = a1[5]; + if ( v32 < a1[6] ) + { + comp = (_DWORD *)(a1[4] + 20 * v32); + comp[1] = 0; + comp[2] = 0; + a1[5] = v32 + 1; + if ( v41 ) + { + comp[1] = 0; + comp[2] = 0; + *comp = 7; + comp[3] = v31; + comp[4] = v41; + goto LABEL_6; + } + } +LABEL_71: + v2 = (char *)a1[3]; +LABEL_64: + v6 = *v2; + comp = 0; + goto LABEL_7; + } + comp = d_source_name((int)a1); + v2 = (char *)a1[3]; + if ( *v2 != 66 ) + return comp; +LABEL_24: + v16 = a1[10]; + do + { + a1[3] = v2 + 1; + v17 = d_source_name((int)a1); + comp = d_make_comp(a1, 76, (int)comp, (int)v17); + v2 = (char *)a1[3]; + } + while ( *v2 == 66 ); + a1[10] = v16; + return comp; +} +// 42C122: variable 'v34' is possibly undefined +// 42C122: variable 'v35' is possibly undefined +// 42C122: variable 'v36' is possibly undefined +// 42C122: variable 'v37' is possibly undefined +// 42C122: variable 'v38' is possibly undefined +// 42C122: variable 'v39' is possibly undefined +// 42C122: variable 'v40' is possibly undefined +// 42C122: variable 'v42' is possibly undefined +// 42C122: variable 'v43' is possibly undefined +// 42C122: variable 'v44' is possibly undefined + +//----- (0042C160) -------------------------------------------------------- +int *__usercall d_name@(_DWORD *a1@) +{ + char *v2; // edx + char v3; // al + int *v4; // esi + _BYTE *v5; // eax + char v7; // al + _DWORD *v8; // esi + _BYTE *v9; // eax + char v10; // dl + int *v11; // eax + int *v12; // edi + _BYTE *v13; // eax + int v14; // edx + _DWORD *v15; // ecx + _DWORD *v17; // edx + int v18; // eax + int v19; // ecx + _DWORD *v20; // ecx + int *comp; // eax + int v22; // edx + _DWORD *v23; // eax + int **v24; // ebp + unsigned __int8 *v25; // edx + _DWORD *v26; // eax + int *v27; // edi + int v28; // ebx + _DWORD *v29; // esi + unsigned int v30; // eax + int *v31; // eax + int v32; // edx + int v33; // eax + int v34; // ecx + char v35; // dl + int v36; // ebp + _BYTE *v37; // eax + int *v38; // edx + int v39; // eax + _DWORD *v40; // ebx + int *v41; // eax + _BYTE *v42; // eax + _DWORD *v43; // eax + int v44; // eax + int v45; // edx + int v46; // eax + int v47; // [esp+0h] [ebp-4Ch] + int v48; // [esp+4h] [ebp-48h] + int v49; // [esp+8h] [ebp-44h] + int v50; // [esp+Ch] [ebp-40h] + int v51; // [esp+10h] [ebp-3Ch] + int v52; // [esp+14h] [ebp-38h] + int v53; // [esp+18h] [ebp-34h] + int *v54; // [esp+1Ch] [ebp-30h] + int *v55; // [esp+1Ch] [ebp-30h] + int v56; // [esp+20h] [ebp-2Ch] + int v57; // [esp+24h] [ebp-28h] + int v58; // [esp+28h] [ebp-24h] + int *v59; // [esp+2Ch] [ebp-20h] BYREF + + v2 = (char *)a1[3]; + v3 = *v2; + if ( *v2 == 85 ) + return d_unqualified_name(a1); + if ( v3 > 85 ) + { + if ( v3 != 90 ) + goto LABEL_21; + a1[3] = v2 + 1; + v7 = v2[1]; + if ( v7 == 71 || v7 == 84 ) + v8 = d_special_name(a1); + else + v8 = d_encoding_part_0((int)a1, 0); + if ( !v8 ) + return 0; + v9 = (_BYTE *)a1[3]; + if ( *v9 != 69 ) + return 0; + a1[3] = v9 + 1; + v10 = v9[1]; + if ( v10 == 115 ) + { + a1[3] = v9 + 2; + if ( !d_discriminator((int)a1) ) + return 0; + v44 = a1[5]; + if ( v44 < a1[6] ) + { + v45 = a1[4]; + a1[5] = v44 + 1; + v12 = (int *)(v45 + 20 * v44); + v12[1] = 0; + v12[2] = 0; + *v12 = 0; + v12[3] = (int)"string literal"; + v12[4] = 14; + goto LABEL_18; + } + } + else + { + if ( v10 != 100 ) + { + v11 = d_name(a1); + v12 = v11; + if ( v11 && ((*v11 - 70) & 0xFFFFFFFD) != 0 && !d_discriminator((int)a1) ) + return 0; + goto LABEL_18; + } + a1[3] = v9 + 2; + v35 = v9[2]; + if ( v35 == 95 ) + { + v36 = 0; + a1[3] = v9 + 3; + } + else + { + if ( v35 == 110 ) + return 0; + v36 = d_number((int)a1) + 1; + if ( v36 < 0 ) + return 0; + v37 = (_BYTE *)a1[3]; + if ( *v37 != 95 ) + return 0; + a1[3] = v37 + 1; + } + v38 = d_name(a1); + if ( v38 ) + { + if ( ((*v38 - 70) & 0xFFFFFFFD) != 0 ) + { + v55 = v38; + v46 = d_discriminator((int)a1); + v38 = v55; + if ( !v46 ) + return 0; + } + } + v39 = a1[5]; + if ( v39 < a1[6] ) + { + v12 = (int *)(a1[4] + 20 * v39); + v12[1] = 0; + v12[2] = 0; + a1[5] = v39 + 1; + *v12 = 71; + v12[4] = v36; + v12[3] = (int)v38; + goto LABEL_18; + } + } + v12 = 0; +LABEL_18: + if ( *v8 == 3 ) + { + v43 = (_DWORD *)v8[4]; + if ( *v43 == 41 ) + v43[3] = 0; + } + return d_make_comp(a1, 2, (int)v8, (int)v12); + } + if ( v3 != 78 ) + { + if ( v3 == 83 ) + { + if ( v2[1] != 116 ) + { + v4 = d_substitution((int)a1, 0); + v5 = (_BYTE *)a1[3]; + if ( *v5 != 73 ) + return v4; + goto LABEL_62; + } + a1[3] = v2 + 2; + v17 = d_unqualified_name(a1); + v18 = a1[5]; + if ( v18 >= a1[6] ) + { + v20 = 0; + } + else + { + v19 = a1[4]; + a1[5] = v18 + 1; + v20 = (_DWORD *)(v19 + 20 * v18); + v20[1] = 0; + v20[2] = 0; + *v20 = 0; + v20[3] = &off_512ECB; + v20[4] = 3; + } + comp = d_make_comp(a1, 1, (int)v20, (int)v17); + a1[11] += 3; + v4 = comp; + v5 = (_BYTE *)a1[3]; + if ( *v5 == 73 ) + { + if ( !v4 ) + return 0; + v22 = a1[8]; + if ( v22 >= a1[9] ) + return 0; + *(_DWORD *)(a1[7] + 4 * v22) = v4; + a1[8] = v22 + 1; + if ( (unsigned __int8)(*v5 - 73) > 1u ) + { + v23 = 0; + return d_make_comp(a1, 4, (int)v4, (int)v23); + } +LABEL_62: + a1[3] = v5 + 1; + v23 = d_template_args_1(a1); + return d_make_comp(a1, 4, (int)v4, (int)v23); + } + return v4; + } +LABEL_21: + v4 = d_unqualified_name(a1); + v13 = (_BYTE *)a1[3]; + if ( *v13 != 73 ) + return v4; + if ( !v4 ) + return 0; + v14 = a1[8]; + if ( v14 >= a1[9] ) + return 0; + *(_DWORD *)(a1[7] + 4 * v14) = v4; + v15 = 0; + a1[8] = v14 + 1; + if ( (unsigned __int8)(*v13 - 73) <= 1u ) + { + a1[3] = v13 + 1; + v15 = d_template_args_1(a1); + } + return d_make_comp(a1, 4, (int)v4, (int)v15); + } + a1[3] = v2 + 1; + v24 = d_cv_qualifiers(a1, &v59, 1); + if ( !v24 ) + return 0; + v54 = d_ref_qualifier(a1, 0); + if ( !*(_BYTE *)a1[3] ) + { +LABEL_51: + *v24 = 0; + return 0; + } + v25 = (unsigned __int8 *)a1[3]; + v26 = a1; + v27 = 0; + v28 = *v25; + v29 = v26; + while ( 1 ) + { + if ( (_BYTE)v28 == 68 ) + { + if ( (v25[1] & 0xDF) == 84 ) + v31 = d_type(v29, v47, v48, v49, v50, v51, v52, v53, (int)v54, v56, v57, v58); + else + v31 = d_unqualified_name(v29); +LABEL_55: + v32 = 1; + if ( v27 ) + goto LABEL_44; + goto LABEL_56; + } + v30 = v28 - 48; + if ( (unsigned __int8)(v28 - 48) <= 0x1Cu ) + goto LABEL_58; + if ( (unsigned __int8)(v28 - 97) <= 0x19u ) + break; + if ( (_BYTE)v28 == 85 ) + { + v31 = d_unqualified_name(v29); + if ( v27 ) + { +LABEL_43: + v32 = 1; +LABEL_44: + v27 = d_make_comp(v29, v32, (int)v27, (int)v31); + goto LABEL_45; + } +LABEL_56: + v25 = (unsigned __int8 *)v29[3]; + v27 = v31; + goto LABEL_46; + } + if ( (_BYTE)v28 != 83 ) + goto LABEL_75; + v31 = d_substitution((int)v29, 1); + if ( v27 ) + goto LABEL_43; + v25 = (unsigned __int8 *)v29[3]; + v27 = v31; +LABEL_50: + v28 = *v25; + if ( !(_BYTE)v28 ) + goto LABEL_51; + } + do + { + v31 = d_unqualified_name(v29); + if ( v27 ) + goto LABEL_43; + v27 = v31; +LABEL_45: + v25 = (unsigned __int8 *)v29[3]; + if ( (_BYTE)v28 == 83 ) + goto LABEL_50; +LABEL_46: + LOBYTE(v28) = *v25; + if ( *v25 != 69 ) + { + if ( !v27 ) + goto LABEL_51; + v33 = v29[8]; + if ( v33 >= v29[9] ) + goto LABEL_51; + *(_DWORD *)(v29[7] + 4 * v33) = v27; + v29[8] = v33 + 1; + goto LABEL_50; + } + v30 = 21; +LABEL_58: + v34 = 268960767; + } + while ( _bittest(&v34, v30) ); + if ( (_BYTE)v28 == 73 ) + { + if ( !v27 ) + goto LABEL_51; + v29[3] = v25 + 1; + v31 = d_template_args_1(v29); + v32 = 4; + goto LABEL_44; + } +LABEL_75: + if ( (_BYTE)v28 == 84 ) + { + v31 = d_template_param(v29); + goto LABEL_55; + } + if ( (_BYTE)v28 != 69 ) + { + if ( !v27 || (_BYTE)v28 != 77 ) + goto LABEL_51; + v29[3] = ++v25; + goto LABEL_50; + } + *v24 = v27; + v40 = v29; + if ( v27 ) + { + if ( v54 ) + { + v41 = v59; + v59 = v54; + v54[3] = (int)v41; + } + v42 = (_BYTE *)v29[3]; + if ( *v42 == 69 ) + { + v4 = v59; + v40[3] = v42 + 1; + return v4; + } + } + return 0; +} +// 42C475: variable 'v47' is possibly undefined +// 42C475: variable 'v48' is possibly undefined +// 42C475: variable 'v49' is possibly undefined +// 42C475: variable 'v50' is possibly undefined +// 42C475: variable 'v51' is possibly undefined +// 42C475: variable 'v52' is possibly undefined +// 42C475: variable 'v53' is possibly undefined +// 42C475: variable 'v54' is possibly undefined +// 42C475: variable 'v56' is possibly undefined +// 42C475: variable 'v57' is possibly undefined +// 42C475: variable 'v58' is possibly undefined +// 512ECB: using guessed type void *off_512ECB; + +//----- (0042C730) -------------------------------------------------------- +unsigned int *__usercall d_encoding_part_0@(int a1@, int a2@) +{ + int *v4; // eax + int *v5; // ebx + int v6; // eax + int *i; // edx + int v8; // eax + char v10; // al + unsigned int *v11; // edx + unsigned int v12; // eax + int v13; // edx + _DWORD *v14; // eax + unsigned int *v15; // edx + unsigned int v16; // eax + + v4 = d_name((_DWORD *)a1); + if ( !v4 ) + return 0; + v5 = v4; + if ( !a2 || (*(_BYTE *)(a1 + 8) & 1) != 0 ) + { + v10 = **(_BYTE **)(a1 + 12); + if ( v10 && v10 != 69 ) + { + v11 = (unsigned int *)v5; + while ( 1 ) + { + v12 = *v11; + if ( *v11 == 4 ) + break; + if ( *v11 > 4 ) + { + if ( v12 != 77 ) + { + if ( v12 <= 0x4D ) + { + if ( v12 - 28 > 4 ) + { +LABEL_21: + v13 = 0; + goto LABEL_22; + } + } + else if ( v12 - 79 > 1 ) + { + goto LABEL_21; + } + } + v11 = (unsigned int *)v11[3]; + } + else + { + if ( v12 != 2 ) + goto LABEL_21; + v11 = (unsigned int *)v11[4]; + } + if ( !v11 ) + goto LABEL_21; + } + v15 = (unsigned int *)v11[3]; + if ( v15 ) + { + while ( 1 ) + { + v16 = *v15; + if ( *v15 > 8 ) + break; + if ( v16 > 6 ) + goto LABEL_21; + if ( v16 - 1 <= 1 ) + { + v15 = (unsigned int *)v15[4]; + if ( v15 ) + continue; + } + goto LABEL_42; + } + v13 = v16 != 53; + } + else + { +LABEL_42: + v13 = 1; + } +LABEL_22: + v14 = d_bare_function_type((_DWORD *)a1, v13); + if ( !v14 ) + return 0; + if ( !a2 && *v5 == 2 && *v14 == 41 ) + v14[3] = 0; + return d_make_comp((_DWORD *)a1, 3, (int)v5, (int)v14); + } + return (unsigned int *)v5; + } + while ( 1 ) + { + v6 = *v5; + if ( *v5 == 77 ) + goto LABEL_27; + if ( (unsigned int)*v5 <= 0x4D ) + break; + if ( (unsigned int)(v6 - 79) > 1 ) + return (unsigned int *)v5; +LABEL_27: + v5 = (int *)v5[3]; + } + if ( (unsigned int)(v6 - 28) <= 4 ) + goto LABEL_27; + if ( v6 != 2 ) + return (unsigned int *)v5; + for ( i = (int *)v5[4]; i; v5[4] = (int)i ) + { + v8 = *i; + if ( *i != 77 ) + { + if ( (unsigned int)*i > 0x4D ) + { + if ( (unsigned int)(v8 - 79) > 1 ) + return (unsigned int *)v5; + } + else if ( (unsigned int)(v8 - 28) > 4 ) + { + return (unsigned int *)v5; + } + } + i = (int *)i[3]; + } + return 0; +} + +//----- (0042C900) -------------------------------------------------------- +_DWORD *__usercall d_special_name@(_DWORD *a1@) +{ + int v2; // ecx + _BYTE *v3; // eax + char v4; // dl + int v5; // eax + _BYTE *v6; // edx + _BYTE *v7; // esi + int v8; // edi + _DWORD *comp; // ebp + char v10; // al + int v11; // edx + _DWORD *name; // eax + _DWORD *result; // eax + char v14; // al + int *v15; // edi + int v16; // eax + _DWORD *v17; // esi + char v18; // al + _DWORD *v19; // ecx + int *v20; // eax + bool v21; // zf + char v22; // al + _DWORD *v23; // ecx + _DWORD *v24; // ecx + int *v25; // eax + int *v26; // eax + int *v27; // esi + _BYTE *v28; // eax + int *v29; // eax + int *v30; // eax + unsigned int *v31; // eax + char v32; // al + _DWORD *v33; // ecx + char v34; // al + _DWORD *v35; // ecx + char v36; // al + _DWORD *v37; // ecx + int *v38; // eax + int *v39; // eax + int *v40; // eax + int *v41; // eax + int *v42; // eax + int v43; // ecx + char v44; // al + int v45; // [esp+0h] [ebp-3Ch] + int v46; // [esp+0h] [ebp-3Ch] + int v47; // [esp+4h] [ebp-38h] + int v48; // [esp+4h] [ebp-38h] + int v49; // [esp+8h] [ebp-34h] + int v50; // [esp+8h] [ebp-34h] + int v51; // [esp+Ch] [ebp-30h] + int v52; // [esp+Ch] [ebp-30h] + int v53; // [esp+10h] [ebp-2Ch] + int v54; // [esp+10h] [ebp-2Ch] + int v55; // [esp+14h] [ebp-28h] + int v56; // [esp+14h] [ebp-28h] + int v57; // [esp+18h] [ebp-24h] + int v58; // [esp+18h] [ebp-24h] + int v59; // [esp+1Ch] [ebp-20h] + int v60; // [esp+1Ch] [ebp-20h] + int v61; // [esp+1Ch] [ebp-20h] + int v62; // [esp+1Ch] [ebp-20h] + int v63; // [esp+20h] [ebp-1Ch] + int v64; // [esp+20h] [ebp-1Ch] + int v65; // [esp+24h] [ebp-18h] + int v66; // [esp+24h] [ebp-18h] + int v67; // [esp+28h] [ebp-14h] + int v68; // [esp+28h] [ebp-14h] + + v2 = a1[11]; + a1[11] = v2 + 20; + v3 = (_BYTE *)a1[3]; + if ( *v3 == 84 ) + { + a1[3] = v3 + 1; + if ( v3[1] ) + { + a1[3] = v3 + 2; + v14 = v3[1] - 65; + switch ( v14 ) + { + case 0: + v31 = d_template_arg(a1, v45, v47, v49, v51, v53, v55, v57, v59, v63, v65, v67); + result = d_make_comp(a1, 48, (int)v31, 0); + break; + case 2: + v27 = d_type(a1, v45, v47, v49, v51, v53, v55, v57, v59, v63, v65, v67); + if ( d_number((int)a1) < 0 ) + return 0; + v28 = (_BYTE *)a1[3]; + if ( *v28 != 95 ) + return 0; + a1[3] = v28 + 1; + v29 = d_type(a1, v46, v48, v50, v52, v54, v56, v58, v61, v64, v66, v68); + a1[11] += 5; + result = d_make_comp(a1, 11, (int)v29, (int)v27); + break; + case 5: + v26 = d_type(a1, v45, v47, v49, v51, v53, v55, v57, v59, v63, v65, v67); + result = d_make_comp(a1, 14, (int)v26, 0); + break; + case 7: + v30 = d_name(a1); + result = d_make_comp(a1, 20, (int)v30, 0); + break; + case 8: + v25 = d_type(a1, v45, v47, v49, v51, v53, v55, v57, v59, v63, v65, v67); + result = d_make_comp(a1, 12, (int)v25, 0); + break; + case 9: + v42 = d_type(a1, v45, v47, v49, v51, v53, v55, v57, v59, v63, v65, v67); + result = d_make_comp(a1, 18, (int)v42, 0); + break; + case 18: + v41 = d_type(a1, v45, v47, v49, v51, v53, v55, v57, v59, v63, v65, v67); + result = d_make_comp(a1, 13, (int)v41, 0); + break; + case 19: + a1[11] = v2 + 10; + v40 = d_type(a1, v45, v47, v49, v51, v53, v55, v57, v59, v63, v65, v67); + result = d_make_comp(a1, 10, (int)v40, 0); + break; + case 21: + a1[11] = v2 + 15; + v39 = d_type(a1, v45, v47, v49, v51, v53, v55, v57, v59, v63, v65, v67); + result = d_make_comp(a1, 9, (int)v39, 0); + break; + case 22: + v38 = d_name(a1); + result = d_make_comp(a1, 21, (int)v38, 0); + break; + case 34: + if ( !d_call_offset((int)a1, 0) || !d_call_offset((int)a1, 0) ) + return 0; + v36 = *(_BYTE *)a1[3]; + if ( v36 == 71 || v36 == 84 ) + v37 = d_special_name(a1); + else + v37 = d_encoding_part_0((int)a1, 0); + result = d_make_comp(a1, 17, (int)v37, 0); + break; + case 39: + if ( !d_call_offset((int)a1, 104) ) + return 0; + v34 = *(_BYTE *)a1[3]; + if ( v34 == 71 || v34 == 84 ) + v35 = d_special_name(a1); + else + v35 = d_encoding_part_0((int)a1, 0); + result = d_make_comp(a1, 15, (int)v35, 0); + break; + case 53: + if ( !d_call_offset((int)a1, 118) ) + return 0; + v32 = *(_BYTE *)a1[3]; + if ( v32 == 71 || v32 == 84 ) + v33 = d_special_name(a1); + else + v33 = d_encoding_part_0((int)a1, 0); + result = d_make_comp(a1, 16, (int)v33, 0); + break; + default: + return 0; + } + return result; + } + return 0; + } + if ( *v3 != 71 ) + return 0; + a1[3] = v3 + 1; + if ( !v3[1] ) + return 0; + a1[3] = v3 + 2; + v4 = v3[1]; + if ( v4 == 84 ) + { + if ( !v3[2] ) + goto LABEL_86; + a1[3] = v3 + 3; + v21 = v3[2] == 110; + v22 = v3[3]; + if ( v21 ) + { + if ( v22 == 71 || v22 == 84 ) + v24 = d_special_name(a1); + else + v24 = d_encoding_part_0((int)a1, 0); + return d_make_comp(a1, 74, (int)v24, 0); + } + if ( v22 == 71 || v22 == 84 ) + v23 = d_special_name(a1); + else +LABEL_86: + v23 = d_encoding_part_0((int)a1, 0); + return d_make_comp(a1, 73, (int)v23, 0); + } + if ( v4 <= 84 ) + { + if ( v4 == 65 ) + { + v18 = v3[2]; + if ( v18 == 71 || v18 == 84 ) + v19 = d_special_name(a1); + else + v19 = d_encoding_part_0((int)a1, 0); + return d_make_comp(a1, 23, (int)v19, 0); + } + if ( v4 == 82 ) + { + v15 = d_name(a1); + v16 = a1[5]; + if ( v16 >= a1[6] ) + { + v17 = 0; + } + else + { + v17 = (_DWORD *)(a1[4] + 20 * v16); + v17[1] = 0; + v17[2] = 0; + a1[5] = v16 + 1; + *v17 = 66; + v17[3] = d_number((int)a1); + } + return d_make_comp(a1, 22, (int)v15, (int)v17); + } + return 0; + } + if ( v4 != 86 ) + { + if ( v4 == 114 ) + { + v5 = d_number((int)a1); + if ( v5 > 1 ) + { + v6 = (_BYTE *)a1[3]; + if ( *v6 ) + { + v7 = v6 + 1; + a1[3] = v6 + 1; + if ( *v6 == 95 ) + { + v8 = v5 - 1; + comp = 0; + while ( *v7 ) + { + if ( *v7 == 36 ) + { + v10 = v7[1]; + switch ( v10 ) + { + case 'S': + v60 = 47; + break; + case '_': + v60 = 46; + break; + case '$': + v60 = 36; + break; + default: + return 0; + } + v11 = a1[5]; + v7 = (_BYTE *)(a1[3] + 2); + if ( v11 >= a1[6] ) + { + a1[3] = v7; + return 0; + } + v8 -= 2; + name = (_DWORD *)(a1[4] + 20 * v11); + name[1] = 0; + name[2] = 0; + a1[5] = v11 + 1; + *name = 65; + name[3] = v60; + a1[3] = v7; + } + else + { + v43 = 0; + do + { + if ( ++v43 >= v8 ) + break; + v44 = v7[v43]; + if ( !v44 ) + break; + } + while ( v44 != 36 ); + v62 = v43; + name = d_make_name(a1, (int)v7, v43); + v7 = (_BYTE *)(v62 + a1[3]); + v8 -= v62; + a1[3] = v7; + if ( !name ) + return 0; + } + if ( comp ) + { + comp = d_make_comp(a1, 64, (int)comp, (int)name); + if ( !comp ) + return 0; + } + else + { + comp = name; + } + if ( v8 <= 0 ) + return d_make_comp(a1, 63, (int)comp, 0); + } + } + } + } + } + return 0; + } + v20 = d_name(a1); + return d_make_comp(a1, 19, (int)v20, 0); +} +// 42CBF5: variable 'v45' is possibly undefined +// 42CBF5: variable 'v47' is possibly undefined +// 42CBF5: variable 'v49' is possibly undefined +// 42CBF5: variable 'v51' is possibly undefined +// 42CBF5: variable 'v53' is possibly undefined +// 42CBF5: variable 'v55' is possibly undefined +// 42CBF5: variable 'v57' is possibly undefined +// 42CBF5: variable 'v59' is possibly undefined +// 42CBF5: variable 'v63' is possibly undefined +// 42CBF5: variable 'v65' is possibly undefined +// 42CBF5: variable 'v67' is possibly undefined +// 42CC61: variable 'v46' is possibly undefined +// 42CC61: variable 'v48' is possibly undefined +// 42CC61: variable 'v50' is possibly undefined +// 42CC61: variable 'v52' is possibly undefined +// 42CC61: variable 'v54' is possibly undefined +// 42CC61: variable 'v56' is possibly undefined +// 42CC61: variable 'v58' is possibly undefined +// 42CC61: variable 'v61' is possibly undefined +// 42CC61: variable 'v64' is possibly undefined +// 42CC61: variable 'v66' is possibly undefined +// 42CC61: variable 'v68' is possibly undefined + +//----- (0042CF30) -------------------------------------------------------- +unsigned int *__usercall d_expr_primary@(_DWORD *a1@) +{ + _BYTE *v1; // edx + char *v3; // eax + char v4; // cl + int *v5; // eax + int v6; // ebp + char *v7; // edx + char v8; // cl + int v9; // esi + char *v10; // eax + char *v11; // edi + char v13; // al + _DWORD *comp; // ebp + char v15; // dl + int v16; // eax + int v17; // ecx + _DWORD *name; // eax + int v19; // [esp+0h] [ebp-2Ch] + int v20; // [esp+4h] [ebp-28h] + int v21; // [esp+8h] [ebp-24h] + int v22; // [esp+Ch] [ebp-20h] + int v23; // [esp+10h] [ebp-1Ch] + int v24; // [esp+14h] [ebp-18h] + int v25; // [esp+18h] [ebp-14h] + int v26; // [esp+1Ch] [ebp-10h] + int v27; // [esp+20h] [ebp-Ch] + int v28; // [esp+24h] [ebp-8h] + int v29; // [esp+28h] [ebp-4h] + + v1 = (_BYTE *)a1[3]; + if ( *v1 != 76 ) + return 0; + v3 = v1 + 1; + a1[3] = v1 + 1; + v4 = v1[1]; + if ( v4 == 95 ) + { + v3 = v1 + 2; + a1[3] = v1 + 2; + v15 = v1[2]; + if ( v15 != 90 ) + { + comp = 0; + goto LABEL_17; + } + goto LABEL_14; + } + if ( v4 == 90 ) + { +LABEL_14: + a1[3] = v3 + 1; + v13 = v3[1]; + if ( v13 == 71 || v13 == 84 ) + { + comp = d_special_name(a1); + v3 = (char *)a1[3]; + v15 = *v3; + } + else + { + comp = d_encoding_part_0((int)a1, 0); + v3 = (char *)a1[3]; + v15 = *v3; + } + goto LABEL_17; + } + v5 = d_type(a1, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29); + v6 = (int)v5; + if ( !v5 ) + return 0; + v7 = (char *)a1[3]; + if ( *v5 == 39 ) + { + v16 = v5[3]; + if ( *(_DWORD *)(v16 + 16) ) + a1[11] -= *(_DWORD *)(v16 + 4); + v8 = *v7; + if ( !strcmp(*(const char **)v16, "decltype(nullptr)") ) + { + if ( v8 == 69 ) + { + a1[3] = v7 + 1; + return (unsigned int *)v6; + } + v9 = 61; + if ( v8 != 110 ) + goto LABEL_9; + goto LABEL_24; + } + } + else + { + v8 = *v7; + } + v9 = 61; + if ( v8 == 110 ) + { +LABEL_24: + v9 = 62; + a1[3] = v7 + 1; + v8 = *++v7; + } + if ( v8 != 69 ) + { +LABEL_9: + v10 = v7 + 1; + while ( v8 ) + { + a1[3] = v10; + v11 = v10; + v8 = *v10++; + if ( v8 == 69 ) + { + v17 = v11 - v7; + goto LABEL_28; + } + } + return 0; + } + v17 = 0; +LABEL_28: + name = d_make_name(a1, (int)v7, v17); + comp = d_make_comp(a1, v9, v6, (int)name); + v3 = (char *)a1[3]; + v15 = *v3; +LABEL_17: + if ( v15 != 69 ) + return 0; + a1[3] = v3 + 1; + return comp; +} +// 42CF5B: variable 'v19' is possibly undefined +// 42CF5B: variable 'v20' is possibly undefined +// 42CF5B: variable 'v21' is possibly undefined +// 42CF5B: variable 'v22' is possibly undefined +// 42CF5B: variable 'v23' is possibly undefined +// 42CF5B: variable 'v24' is possibly undefined +// 42CF5B: variable 'v25' is possibly undefined +// 42CF5B: variable 'v26' is possibly undefined +// 42CF5B: variable 'v27' is possibly undefined +// 42CF5B: variable 'v28' is possibly undefined +// 42CF5B: variable 'v29' is possibly undefined + +//----- (0042D0F0) -------------------------------------------------------- +unsigned int *__usercall d_expression_1@(_DWORD *a1@) +{ + char *v2; // edx + char v3; // al + _DWORD *v4; // esi + _BYTE *v5; // eax + int *v7; // eax + int v8; // esi + int v9; // eax + int v10; // eax + char v11; // al + unsigned int *v12; // eax + char v13; // al + int v14; // eax + _BYTE *v15; // edx + int v16; // edx + int v17; // eax + _BYTE *v18; // edx + int v19; // esi + char **v20; // edx + char *v21; // edi + int v22; // eax + int v23; // ebp + unsigned int *v24; // eax + _DWORD *v25; // edi + void *v26; // ebp + _DWORD *v27; // eax + _DWORD *v28; // eax + _DWORD *v29; // eax + _DWORD *v30; // eax + int *v31; // esi + _DWORD *v32; // edi + _BYTE *v33; // eax + _DWORD *v35; // eax + _DWORD *v36; // eax + _DWORD *v37; // eax + int *v38; // eax + char v39; // dl + _BYTE *v40; // edx + char *v41; // eax + void *v42; // ebp + int v43; // eax + _DWORD *v44; // edi + _DWORD *v45; // eax + unsigned __int8 v46; // al + char *v47; // eax + char v48; // dl + _BYTE *v49; // eax + _DWORD *v50; // eax + _BYTE *v51; // eax + char v52; // al + int v53; // [esp+0h] [ebp-2Ch] + _DWORD *comp; // [esp+0h] [ebp-2Ch] + int v55; // [esp+4h] [ebp-28h] + int v56; // [esp+8h] [ebp-24h] + int v57; // [esp+Ch] [ebp-20h] + int v58; // [esp+10h] [ebp-1Ch] + int v59; // [esp+14h] [ebp-18h] + int v60; // [esp+18h] [ebp-14h] + int v61; // [esp+1Ch] [ebp-10h] + int v62; // [esp+20h] [ebp-Ch] + int v63; // [esp+24h] [ebp-8h] + int v64; // [esp+28h] [ebp-4h] + + v2 = (char *)a1[3]; + v3 = *v2; + if ( *v2 == 76 ) + return d_expr_primary(a1); + if ( v3 != 84 ) + { + if ( v3 == 115 ) + { + v11 = v2[1]; + if ( v11 == 114 ) + { + a1[3] = v2 + 2; + v31 = d_type(a1, v53, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64); + v32 = d_unqualified_name(a1); + v33 = (_BYTE *)a1[3]; + if ( *v33 != 73 ) + return d_make_comp(a1, 1, (int)v31, (int)v32); + a1[3] = v33 + 1; + v37 = d_template_args_1(a1); + comp = d_make_comp(a1, 4, (int)v32, (int)v37); + return d_make_comp(a1, 1, (int)v31, (int)comp); + } + if ( v11 == 112 ) + { + a1[3] = v2 + 2; + v12 = d_expression_1(a1); + return d_make_comp(a1, 75, (int)v12, 0); + } + } + else if ( v3 == 102 ) + { + if ( v2[1] == 112 ) + { + a1[3] = v2 + 2; + v13 = v2[2]; + switch ( v13 ) + { + case 'T': + a1[3] = v2 + 3; + v16 = 0; + break; + case '_': + a1[3] = v2 + 3; + v16 = 1; + break; + case 'n': + return 0; + default: + v14 = d_number((int)a1); + if ( v14 + 1 < 0 ) + return 0; + v15 = (_BYTE *)a1[3]; + if ( *v15 != 95 ) + return 0; + a1[3] = v15 + 1; + if ( v14 == 2147483646 ) + return 0; + v16 = v14 + 2; + break; + } + v17 = a1[5]; + if ( v17 < a1[6] ) + { + v4 = (_DWORD *)(a1[4] + 20 * v17); + v4[1] = 0; + v4[2] = 0; + a1[5] = v17 + 1; + *v4 = 6; + v4[3] = v16; + return v4; + } + return 0; + } + } + else + { + if ( (unsigned __int8)(v3 - 48) <= 9u ) + goto LABEL_6; + if ( v3 == 111 ) + { + if ( v2[1] == 110 ) + { + a1[3] = v2 + 2; +LABEL_6: + v4 = d_unqualified_name(a1); + if ( v4 ) + { + v5 = (_BYTE *)a1[3]; + if ( *v5 == 73 ) + { + a1[3] = v5 + 1; + v30 = d_template_args_1(a1); + return d_make_comp(a1, 4, (int)v4, (int)v30); + } + return v4; + } + return 0; + } + } + else if ( (v3 == 105 || v3 == 116) && v2[1] == 108 ) + { + v18 = v2 + 2; + v19 = 0; + a1[3] = v18; + if ( v3 == 116 ) + { + v38 = d_type(a1, v53, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64); + v18 = (_BYTE *)a1[3]; + v19 = (int)v38; + } + if ( *v18 && v18[1] ) + { + v36 = d_exprlist(a1, 69); + return d_make_comp(a1, 49, v19, (int)v36); + } + return 0; + } + } + v7 = d_operator_name(a1); + v8 = (int)v7; + if ( !v7 ) + return 0; + v9 = *v7; + if ( v9 != 50 ) + { + if ( v9 == 52 ) + { + v51 = (_BYTE *)a1[3]; + if ( *v51 == 95 ) + { + a1[3] = v51 + 1; + v35 = d_exprlist(a1, 69); + return d_make_comp(a1, 55, v8, (int)v35); + } + goto LABEL_65; + } + if ( v9 == 51 ) + { + v10 = *(_DWORD *)(v8 + 12); + if ( v10 <= 1 ) + { + if ( !v10 ) + return d_make_comp(a1, 54, v8, 0); + if ( v10 == 1 ) + { +LABEL_65: + v35 = d_expression_1(a1); + return d_make_comp(a1, 55, v8, (int)v35); + } + } + } + return 0; + } + v20 = *(char ***)(v8 + 12); + v21 = *v20; + a1[11] += v20[2] - 2; + v22 = (unsigned __int8)*v21; + if ( v22 == 115 && v21[1] == 116 && !v21[2] ) + { + v35 = d_type(a1, v53, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64); + return d_make_comp(a1, 55, v8, (int)v35); + } + v23 = (int)v20[3]; + if ( v23 == 1 ) + { + v39 = *v21; + if ( (*v21 == 112 || v39 == 109) && v39 == v21[1] ) + { + v40 = (_BYTE *)a1[3]; + if ( *v40 == 95 ) + { + v23 = 0; + a1[3] = v40 + 1; + v22 = (unsigned __int8)*v21; + } + } + else + { + v23 = 0; + } + if ( v22 == 115 && v21[1] == 80 && !v21[2] ) + v35 = d_template_args_1(a1); + else + v35 = d_expression_1(a1); + if ( v23 ) + v35 = d_make_comp(a1, 57, (int)v35, (int)v35); + return d_make_comp(a1, 55, v8, (int)v35); + } + if ( v23 <= 1 ) + { + if ( !v23 ) + return d_make_comp(a1, 54, v8, 0); + return 0; + } + if ( v23 == 2 ) + { + v41 = **(char ***)(v8 + 12); + if ( v41[1] == 99 && ((v52 = *v41, (unsigned __int8)(v52 - 99) <= 1u) || (unsigned __int8)(v52 - 114) <= 1u) ) + { + v42 = d_type(a1, v53, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64); + } + else if ( *v21 == 102 ) + { + v42 = d_operator_name(a1); + } + else + { + v42 = d_expression_1(a1); + } + v43 = (unsigned __int8)*v21; + if ( v43 == 99 && v21[1] == 108 && !v21[2] ) + { + v44 = d_exprlist(a1, 69); + } + else if ( v43 == 100 && v21[1] == 116 && !v21[2] || v43 == 112 && v21[1] == 116 && !v21[2] ) + { + v44 = d_unqualified_name(a1); + v49 = (_BYTE *)a1[3]; + if ( *v49 == 73 ) + { + a1[3] = v49 + 1; + v50 = d_template_args_1(a1); + v44 = d_make_comp(a1, 4, (int)v44, (int)v50); + } + } + else + { + v44 = d_expression_1(a1); + } + v45 = d_make_comp(a1, 57, (int)v42, (int)v44); + return d_make_comp(a1, 56, v8, (int)v45); + } + if ( v23 != 3 ) + return 0; + if ( v22 == 113 && v21[1] == 117 && !v21[2] ) + { + v24 = d_expression_1(a1); + } + else + { + if ( *v21 != 102 ) + { + if ( *v21 != 110 ) + return 0; + v46 = v21[1]; + if ( v46 != 119 && v46 != 97 ) + return 0; + v25 = d_exprlist(a1, 95); + v26 = d_type(a1, v53, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64); + v47 = (char *)a1[3]; + v48 = *v47; + if ( *v47 == 69 ) + { + a1[3] = v47 + 1; + v27 = 0; + } + else if ( v48 == 112 ) + { + if ( v47[1] != 105 ) + return 0; + a1[3] = v47 + 2; + v27 = d_exprlist(a1, 69); + } + else + { + if ( v48 != 105 || v47[1] != 108 ) + return 0; + v27 = d_expression_1(a1); + } + goto LABEL_53; + } + v24 = d_operator_name(a1); + } + v25 = v24; + v26 = d_expression_1(a1); + v27 = d_expression_1(a1); + if ( !v27 ) + return 0; +LABEL_53: + v28 = d_make_comp(a1, 60, (int)v26, (int)v27); + v29 = d_make_comp(a1, 59, (int)v25, (int)v28); + return d_make_comp(a1, 58, v8, (int)v29); + } + return d_template_param(a1); +} +// 42D4D2: variable 'v53' is possibly undefined +// 42D4D2: variable 'v55' is possibly undefined +// 42D4D2: variable 'v56' is possibly undefined +// 42D4D2: variable 'v57' is possibly undefined +// 42D4D2: variable 'v58' is possibly undefined +// 42D4D2: variable 'v59' is possibly undefined +// 42D4D2: variable 'v60' is possibly undefined +// 42D4D2: variable 'v61' is possibly undefined +// 42D4D2: variable 'v62' is possibly undefined +// 42D4D2: variable 'v63' is possibly undefined +// 42D4D2: variable 'v64' is possibly undefined + +//----- (0042D7A0) -------------------------------------------------------- +_DWORD *__usercall d_exprlist@(_DWORD *a1@, char a2@
) +{ + _BYTE *v4; // eax + int *v5; // esi + _DWORD *comp; // eax + _BYTE *v7; // eax + int v8; // ebp + unsigned int *v9; // eax + int v11; // [esp+1Ch] [ebp-20h] BYREF + + v4 = (_BYTE *)a1[3]; + v11 = 0; + v5 = &v11; + if ( *v4 == a2 ) + { + a1[3] = v4 + 1; + return d_make_comp(a1, 46, 0, 0); + } + else + { + do + { + v8 = a1[12]; + a1[12] = 1; + v9 = d_expression_1(a1); + a1[12] = v8; + if ( !v9 ) + return 0; + comp = d_make_comp(a1, 46, (int)v9, 0); + *v5 = (int)comp; + if ( !comp ) + return 0; + v5 = comp + 4; + v7 = (_BYTE *)a1[3]; + } + while ( *v7 != a2 ); + a1[3] = v7 + 1; + return (_DWORD *)v11; + } +} + +//----- (0042D850) -------------------------------------------------------- +int **__usercall d_cv_qualifiers@(_DWORD *a1@, int **a2@, int a3@) +{ + int **v3; // esi + char *v5; // ebp + char i; // di + char v7; // al + int v8; // edi + unsigned int *v9; // eax + _BYTE *v10; // edx + int v11; // edx + _DWORD *comp; // eax + int *v14; // eax + int v15; // edx + _BYTE *v16; // edx + int **v17; // eax + int v18; // [esp+1Ch] [ebp-30h] + int v19; // [esp+20h] [ebp-2Ch] + int v20; // [esp+24h] [ebp-28h] + char v21; // [esp+28h] [ebp-24h] + + v3 = a2; + v21 = a3; + v20 = a3 == 0 ? 27 : 30; + v19 = a3 == 0 ? 26 : 29; + v18 = a3 == 0 ? 25 : 28; + v5 = (char *)a1[3]; + for ( i = *v5; next_is_type_qual_isra_0(v5); i = *v5 ) + { + a1[3] = v5 + 1; + switch ( i ) + { + case 'r': + a1[11] += 9; + v11 = v18; + v9 = 0; + break; + case 'V': + a1[11] += 9; + v11 = v19; + v9 = 0; + break; + case 'K': + a1[11] += 6; + v11 = v20; + v9 = 0; + break; + default: + if ( !v5[1] ) + return 0; + a1[3] = v5 + 2; + v7 = v5[1]; + if ( v7 == 120 ) + { + a1[11] += 17; + v9 = 0; + v11 = 77; + } + else if ( (v7 & 0xDF) == 79 ) + { + a1[11] += 9; + if ( v7 == 79 ) + { + v8 = a1[12]; + a1[12] = 1; + v9 = d_expression_1(a1); + a1[12] = v8; + if ( !v9 ) + return 0; + v10 = (_BYTE *)a1[3]; + if ( *v10 != 69 ) + return 0; + a1[3] = v10 + 1; + v11 = 79; + } + else + { + v9 = 0; + v11 = 79; + } + } + else + { + if ( v7 != 119 ) + return 0; + a1[11] += 6; + v9 = (unsigned int *)d_parmlist(a1); + if ( !v9 ) + return 0; + v16 = (_BYTE *)a1[3]; + if ( *v16 != 69 ) + return 0; + a1[3] = v16 + 1; + v11 = 80; + } + break; + } + comp = d_make_comp(a1, v11, 0, (int)v9); + *v3 = comp; + if ( !comp ) + return 0; + v5 = (char *)a1[3]; + v3 = (int **)(comp + 3); + } + if ( (v21 & 1) == 0 && i == 70 && v3 != a2 ) + { + v14 = *a2; + v15 = **a2; + if ( v15 != 26 ) + goto LABEL_34; +LABEL_21: + *v14 = 29; + while ( 1 ) + { + v17 = (int **)(v14 + 3); + if ( v3 == v17 ) + break; + v14 = *v17; + v15 = *v14; + if ( *v14 == 26 ) + goto LABEL_21; +LABEL_34: + if ( v15 == 27 ) + { + *v14 = 30; + } + else if ( v15 == 25 ) + { + *v14 = 28; + } + } + } + return v3; +} + +//----- (0042DA70) -------------------------------------------------------- +unsigned int *__usercall d_template_arg@( + _DWORD *a1@, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8, + int a9, + int a10, + int a11, + int a12) +{ + char *v13; // edx + char v14; // al + unsigned int *result; // eax + int v16; // esi + _BYTE *v17; // edx + + v13 = (char *)a1[3]; + v14 = *v13; + if ( *v13 == 76 ) + return d_expr_primary(a1); + if ( v14 <= 76 ) + { + if ( (unsigned __int8)(v14 - 73) <= 1u ) + { + a1[3] = v13 + 1; + return d_template_args_1(a1); + } + return (unsigned int *)d_type(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); + } + if ( v14 != 88 ) + return (unsigned int *)d_type(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); + v16 = a1[12]; + a1[12] = 1; + a1[3] = v13 + 1; + result = d_expression_1(a1); + v17 = (_BYTE *)a1[3]; + a1[12] = v16; + if ( *v17 != 69 ) + return 0; + a1[3] = v17 + 1; + return result; +} + +//----- (0042DB00) -------------------------------------------------------- +_DWORD *__usercall d_template_args_1@(_DWORD *a1@) +{ + int v2; // edi + _BYTE *v3; // eax + int *v4; // esi + _DWORD *comp; // eax + _BYTE *v6; // eax + unsigned int *v7; // ecx + int v9; // [esp+1Ch] [ebp-10h] BYREF + + v2 = a1[10]; + v3 = (_BYTE *)a1[3]; + if ( *v3 == 69 ) + { + a1[3] = v3 + 1; + return d_make_comp(a1, 47, 0, 0); + } + else + { + v9 = 0; + v4 = &v9; + do + { + v7 = d_template_arg(a1); + if ( !v7 ) + return 0; + comp = d_make_comp(a1, 47, (int)v7, 0); + *v4 = (int)comp; + if ( !comp ) + return 0; + v4 = comp + 4; + v6 = (_BYTE *)a1[3]; + } + while ( *v6 != 69 ); + a1[10] = v2; + a1[3] = v6 + 1; + return (_DWORD *)v9; + } +} + +//----- (0042DBB0) -------------------------------------------------------- +unsigned int __usercall d_print_comp_inner@(unsigned int result@, int a2@) +{ + unsigned int v2; // ebx + int v3; // edi + unsigned int v4; // ebp + _DWORD *v5; // esi + unsigned int *v6; // edi + FILE *v7; // edx + int v8; // ecx + int v9; // eax + int v10; // edx + char *v11; // eax + int v12; // eax + int v13; // ecx + char *v14; // eax + int v15; // edx + char *v16; // eax + int v17; // ecx + int v18; // edx + _DWORD *v19; // ecx + unsigned int v20; // edi + int v21; // eax + int v22; // edx + int v23; // eax + int v24; // edx + char v25; // dl + int v26; // ecx + unsigned int v27; // edi + const char *v28; // ebp + char i14; // al + unsigned int v30; // edx + const char *v31; // edi + int v32; // eax + char i; // dl + int v34; // ecx + int v35; // eax + int v36; // eax + const char *v37; // edi + char i15; // dl + int v39; // ecx + int v40; // eax + int v41; // ebp + char **v42; // edx + FILE *v43; // ebp + int v44; // eax + const char *v45; // edi + char jj; // dl + int v47; // ecx + int v48; // eax + int v49; // eax + const char *v50; // edi + char ii; // dl + int v52; // ecx + int v53; // eax + int v54; // eax + const char *v55; // edi + char i6; // dl + int v57; // ecx + int v58; // eax + int v59; // eax + const char *v60; // edi + char i5; // dl + int v62; // ecx + int v63; // eax + int v64; // eax + const char *v65; // edi + char i4; // dl + int v67; // ecx + int v68; // eax + const char *v69; // edi + int v70; // eax + char i29; // dl + int v72; // ecx + int v73; // eax + _DWORD *v74; // eax + int v75; // ecx + const char *v76; // esi + char i28; // dl + unsigned int v78; // ecx + int v79; // eax + int v80; // eax + const char *v81; // edi + char i27; // dl + int v83; // ecx + int v84; // eax + int v85; // eax + const char *v86; // edi + char i26; // dl + int v88; // ecx + int v89; // eax + int v90; // eax + const char *v91; // edi + char i25; // dl + int v93; // ecx + int v94; // eax + int v95; // eax + const char *v96; // edi + char i2; // dl + int v98; // ecx + int v99; // eax + int v100; // eax + const char *v101; // edi + char i1; // dl + int v103; // ecx + int v104; // eax + int v105; // eax + const char *v106; // edi + char nn; // dl + int v108; // ecx + int v109; // eax + int v110; // eax + const char *v111; // edi + char mm; // dl + int v113; // ecx + int v114; // eax + int v115; // eax + const char *v116; // edi + char i3; // dl + int v118; // ecx + int v119; // eax + int v120; // edx + int v121; // ecx + const char *v122; // edi + int v123; // eax + char i30; // dl + int v125; // ecx + int v126; // eax + char *v127; // ebp + unsigned int v128; // edi + unsigned int v129; // ecx + char *v130; // ebp + int v131; // eax + unsigned int v132; // edx + _DWORD *v133; // ecx + int v134; // edi + char *v135; // esi + char *v136; // edi + unsigned int v137; // ecx + char v138; // dl + int v139; // eax + int v140; // ecx + char *v141; // eax + _DWORD *v142; // eax + unsigned __int8 *v143; // edx + int v144; // eax + int v145; // ecx + int v146; // ecx + unsigned __int8 *v147; // eax + int v148; // edx + int v149; // ebp + const char *v150; // esi + char k; // dl + unsigned int v152; // ecx + int v153; // eax + int v154; // eax + const char *v155; // edi + char i11; // dl + int v157; // ecx + int v158; // eax + int v159; // eax + const char *v160; // edi + char i9; // dl + int v162; // ecx + int v163; // eax + int v164; // eax + const char *v165; // edi + char i8; // dl + int v167; // ecx + int v168; // eax + int v169; // eax + const char *v170; // edi + char i7; // dl + int v172; // ecx + int v173; // eax + int v174; // ecx + int **v175; // eax + int v176; // eax + char *base; // ecx + int v178; // eax + const char *v179; // edi + char j; // dl + int v181; // ecx + int v182; // eax + int v183; // edi + int v184; // ebp + int v185; // eax + int v186; // edx + int v187; // edx + int v188; // ecx + int v189; // edx + const char *v190; // esi + char i13; // dl + unsigned int v192; // ecx + int v193; // eax + int v194; // eax + const char *v195; // edi + char n; // dl + int v197; // ecx + int v198; // eax + int v199; // eax + const char *v200; // edi + char i20; // dl + int v202; // ecx + int v203; // eax + int v204; // eax + const char *v205; // edi + char i24; // dl + int v207; // ecx + int v208; // eax + int v209; // eax + int v210; // edi + _DWORD *v211; // ecx + int v212; // eax + _DWORD *v213; // ebp + int v214; // esi + int v215; // eax + const char *v216; // edi + char i21; // dl + int v218; // ecx + int v219; // eax + FILE *v220; // esi + unsigned int v221; // edi + FILE *v222; // edi + unsigned int v223; // ecx + char v224; // dl + int v225; // eax + int v226; // eax + const char *v227; // edi + char i22; // dl + int v229; // ecx + int v230; // eax + int v231; // eax + const char *v232; // edi + char i17; // dl + int v234; // ecx + int v235; // eax + int v236; // eax + const char *v237; // edi + char i16; // dl + int v239; // ecx + int v240; // eax + int v241; // edi + const char *v242; // esi + char v243; // dl + int v244; // ebp + unsigned int v245; // ecx + int v246; // eax + int v247; // ecx + int v248; // esi + int v249; // eax + int v250; // edx + int v251; // edx + _DWORD *v252; // edi + int v253; // eax + int v254; // eax + _DWORD *v255; // ecx + int v256; // eax + const char *v257; // edi + char i23; // dl + int v259; // ecx + int v260; // eax + int v261; // edi + char *v262; // esi + char *v263; // edi + unsigned int v264; // ecx + char v265; // dl + int v266; // eax + int v267; // edi + char *v268; // esi + char *v269; // edi + unsigned int v270; // ecx + char v271; // dl + int v272; // eax + int v273; // edx + bool v274; // cf + const char *v275; // edi + int v276; // eax + char kk; // dl + int v278; // ecx + int v279; // eax + _DWORD *v280; // edi + FILE *v281; // esi + size_t v282; // ebp + int v283; // eax + FILE *v284; // ebp + int v285; // ecx + char ptr; // dl + int v287; // eax + char *v288; // esi + int v289; // edi + char *v290; // edi + unsigned int v291; // ecx + char v292; // dl + int v293; // eax + int v294; // ecx + const char *v295; // edi + int v296; // eax + char v297; // dl + int v298; // ecx + int v299; // eax + int v300; // eax + FILE *v301; // esi + size_t v302; // edi + FILE *v303; // edi + unsigned int v304; // ecx + char v305; // dl + int v306; // eax + int v307; // eax + int v308; // edx + const char *v309; // edi + int v310; // eax + char i10; // dl + int v312; // ecx + int v313; // eax + int v314; // eax + FILE *v315; // esi + size_t v316; // edi + FILE *v317; // edi + unsigned int v318; // ecx + char v319; // dl + int v320; // eax + int v321; // ebp + int v322; // eax + int v323; // edx + _DWORD *charbuf; // ecx + int v325; // eax + char v326; // al + const char *v327; // esi + char i12; // dl + unsigned int v329; // ecx + int v330; // eax + int v331; // ecx + _DWORD *v332; // esi + int v333; // eax + FILE *v334; // esi + unsigned int v335; // edi + FILE *v336; // edi + unsigned int v337; // ecx + char v338; // dl + int v339; // eax + FILE *v340; // esi + size_t v341; // edi + FILE *v342; // edi + unsigned int v343; // ecx + char v344; // dl + int v345; // eax + const char *v346; // esi + char m; // dl + unsigned int v348; // ecx + int v349; // eax + int v350; // eax + char *v351; // eax + char *v352; // eax + char *v353; // eax + unsigned __int8 *v354; // ebp + int v355; // edx + int v356; // ecx + _DWORD *i18; // eax + int v358; // ecx + int v359; // eax + int v360; // ecx + int v361; // eax + _DWORD *pack; // eax + int v363; // ecx + int i19; // edx + int v365; // eax + int v366; // eax + int v367; // eax + int v368; // eax + int v369; // eax + int v370; // eax + int v371; // eax + int v372; // eax + _DWORD *v373; // eax + int v374; // edi + _DWORD *v375; // ecx + int v376; // edx + _DWORD *v377; // ebp + _DWORD *v378; // edx + int v379; // edx + char v380; // al + int v381; // eax + int v382; // edx + FILE *v383; // esi + unsigned int v384; // edi + FILE *v385; // edi + unsigned int v386; // ecx + char v387; // dl + int v388; // eax + int v389; // eax + int v390; // eax + const char *v391; // edx + int v392; // edx + int v393; // eax + unsigned int v394; // edi + int v395; // eax + int v396; // eax + bool v397; // zf + _DWORD *v398; // ecx + int v399; // ebp + int *v400; // ebp + int v401; // edx + int v402; // edi + char *Str2; // [esp+4h] [ebp-88h] + int v404; // [esp+8h] [ebp-84h] + char *v405; // [esp+10h] [ebp-7Ch] + char v406; // [esp+10h] [ebp-7Ch] + char v407; // [esp+10h] [ebp-7Ch] + char v408; // [esp+10h] [ebp-7Ch] + char v409; // [esp+10h] [ebp-7Ch] + char v410; // [esp+10h] [ebp-7Ch] + char v411; // [esp+10h] [ebp-7Ch] + char v412; // [esp+10h] [ebp-7Ch] + char v413; // [esp+10h] [ebp-7Ch] + char v414; // [esp+10h] [ebp-7Ch] + char v415; // [esp+10h] [ebp-7Ch] + char v416; // [esp+10h] [ebp-7Ch] + char v417; // [esp+10h] [ebp-7Ch] + char v418; // [esp+10h] [ebp-7Ch] + char v419; // [esp+10h] [ebp-7Ch] + char v420; // [esp+10h] [ebp-7Ch] + char v421; // [esp+10h] [ebp-7Ch] + char v422; // [esp+10h] [ebp-7Ch] + char v423; // [esp+10h] [ebp-7Ch] + char v424; // [esp+10h] [ebp-7Ch] + char v425; // [esp+10h] [ebp-7Ch] + char v426; // [esp+10h] [ebp-7Ch] + char v427; // [esp+10h] [ebp-7Ch] + char v428; // [esp+10h] [ebp-7Ch] + char v429; // [esp+10h] [ebp-7Ch] + char v430; // [esp+10h] [ebp-7Ch] + char v431; // [esp+10h] [ebp-7Ch] + char v432; // [esp+10h] [ebp-7Ch] + char v433; // [esp+10h] [ebp-7Ch] + char v434; // [esp+10h] [ebp-7Ch] + char v435; // [esp+10h] [ebp-7Ch] + _DWORD *v436; // [esp+10h] [ebp-7Ch] + char v437; // [esp+10h] [ebp-7Ch] + char v438; // [esp+10h] [ebp-7Ch] + char v439; // [esp+10h] [ebp-7Ch] + char v440; // [esp+10h] [ebp-7Ch] + char v441; // [esp+10h] [ebp-7Ch] + char v442; // [esp+10h] [ebp-7Ch] + char v443; // [esp+10h] [ebp-7Ch] + char v444; // [esp+10h] [ebp-7Ch] + char v445; // [esp+10h] [ebp-7Ch] + char v446; // [esp+10h] [ebp-7Ch] + char v447; // [esp+10h] [ebp-7Ch] + char v448; // [esp+10h] [ebp-7Ch] + char v449; // [esp+10h] [ebp-7Ch] + char v450; // [esp+10h] [ebp-7Ch] + char v451; // [esp+10h] [ebp-7Ch] + char v452; // [esp+10h] [ebp-7Ch] + char v453; // [esp+10h] [ebp-7Ch] + char v454; // [esp+10h] [ebp-7Ch] + char v455; // [esp+10h] [ebp-7Ch] + char v456; // [esp+10h] [ebp-7Ch] + int v457; // [esp+10h] [ebp-7Ch] + char v458; // [esp+10h] [ebp-7Ch] + int v459; // [esp+10h] [ebp-7Ch] + unsigned int v460; // [esp+14h] [ebp-78h] + int v461; // [esp+14h] [ebp-78h] + int v462; // [esp+14h] [ebp-78h] + char *v463; // [esp+14h] [ebp-78h] + FILE *v464; // [esp+18h] [ebp-74h] + int v465; // [esp+1Ch] [ebp-70h] + int v466[2]; // [esp+28h] [ebp-64h] BYREF + FILE Str[2]; // [esp+30h] [ebp-5Ch] BYREF + + v2 = result; + if ( !a2 ) + goto LABEL_7; + v3 = *(_DWORD *)(result + 280); + if ( v3 ) + return result; + v4 = *(_DWORD *)a2; + v5 = (_DWORD *)a2; + switch ( *(_DWORD *)a2 ) + { + case 0: + v261 = *(_DWORD *)(a2 + 16); + v262 = *(char **)(a2 + 12); + if ( v261 ) + { + result = *(_DWORD *)(result + 256); + v263 = &v262[v261]; + do + { + v265 = *v262; + if ( result == 255 ) + { + v266 = *(_DWORD *)(v2 + 268); + v444 = *v262; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v266); + ++*(_DWORD *)(v2 + 296); + v265 = v444; + v264 = v4; + result = 1; + } + else + { + v264 = result++; + } + ++v262; + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v264) = v265; + *(_BYTE *)(v2 + 260) = v265; + } + while ( v263 != v262 ); + } + return result; + case 1: + case 2: + v31 = "::"; + d_print_comp(result, *(_DWORD *)(a2 + 12)); + v32 = *(_DWORD *)(v2 + 256); + for ( i = 58; ; i = *v31 ) + { + if ( v32 == 255 ) + { + v35 = *(_DWORD *)(v2 + 268); + v407 = i; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v35); + ++*(_DWORD *)(v2 + 296); + i = v407; + v34 = 0; + v32 = 1; + } + else + { + v34 = v32++; + } + ++v31; + *(_DWORD *)(v2 + 256) = v32; + *(_BYTE *)(v2 + v34) = i; + *(_BYTE *)(v2 + 260) = i; + if ( "" == v31 ) + break; + } + v280 = (_DWORD *)v5[4]; + if ( *v280 == 71 ) + { + v281 = Str; + d_append_string(v2, "{default arg#"); + sprintf_constprop_0(Str, (int)"%d", v280[4] + 1); + v282 = strlen((const char *)Str); + if ( v282 ) + { + v283 = *(_DWORD *)(v2 + 256); + v284 = (FILE *)((char *)Str + v282); + do + { + ptr = (char)v281->_ptr; + if ( v283 == 255 ) + { + v287 = *(_DWORD *)(v2 + 268); + v447 = (char)v281->_ptr; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v287); + ++*(_DWORD *)(v2 + 296); + ptr = v447; + v285 = 0; + v283 = 1; + } + else + { + v285 = v283++; + } + v281 = (FILE *)((char *)v281 + 1); + *(_DWORD *)(v2 + 256) = v283; + *(_BYTE *)(v2 + v285) = ptr; + *(_BYTE *)(v2 + 260) = ptr; + } + while ( v284 != v281 ); + } + d_append_string(v2, "}::"); + v8 = v280[3]; + } + else + { + v8 = v5[4]; + } + return d_print_comp(v2, v8); + case 3: + result = *(_DWORD *)(result + 276); + v6 = *(unsigned int **)(a2 + 12); + *(_DWORD *)(v2 + 276) = 0; + v465 = result; + if ( !v6 ) + goto LABEL_7; + v41 = 0; + v461 = *(_DWORD *)(v2 + 272); + v7 = Str; + result = 0; + while ( 2 ) + { + v7->_ptr = (char *)result; + ++v41; + v7->_base = 0; + v7->_flag = v461; + result = *v6; + v464 = v7; + v7->_cnt = (int)v6; + if ( result == 77 ) + goto LABEL_4; + if ( result > 0x4D ) + { + v274 = result == 79; + result -= 79; + if ( !v274 && result != 1 ) + { + *(_DWORD *)(v2 + 276) = v7; + goto LABEL_85; + } + } + else if ( result - 28 > 4 ) + { + *(_DWORD *)(v2 + 276) = v7; + if ( result == 2 ) + { + v6 = (unsigned int *)v6[4]; + result = *v6; + if ( *v6 == 71 ) + { + v6 = (unsigned int *)v6[3]; + if ( !v6 ) + goto LABEL_7; + result = *v6; + } + v42 = &Str[0]._ptr + 4 * v41; + while ( 1 ) + { + if ( result != 77 ) + { + if ( result > 0x4D ) + { + v274 = result == 79; + result -= 79; + if ( !v274 && result != 1 ) + goto LABEL_85; + } + else if ( result - 28 > 4 ) + { + break; + } + } + if ( v41 == 4 ) + goto LABEL_7; + v351 = *(v42 - 3); + *(v42 - 3) = (char *)v6; + ++v41; + *(_DWORD *)(v2 + 276) = v42; + v42[1] = v351; + v352 = *(v42 - 2); + *(v42 - 2) = 0; + v6 = (unsigned int *)v6[3]; + v42[2] = v352; + v42[3] = *(v42 - 1); + v353 = (char *)(v42 - 4); + v42 += 4; + *(v42 - 4) = v353; + result = v461; + *(v42 - 5) = (char *)v461; + if ( !v6 ) + goto LABEL_7; + result = *v6; + } + } + if ( result == 4 ) + { + v466[1] = (int)v6; + v466[0] = v461; + *(_DWORD *)(v2 + 272) = v466; + } +LABEL_85: + d_print_comp(v2, *(_DWORD *)(a2 + 16)); + if ( *v6 == 4 ) + *(_DWORD *)(v2 + 272) = v466[0]; + v43 = (FILE *)((char *)Str + 16 * v41); + do + { + if ( !v43[-1]._bufsiz ) + { + v322 = *(_DWORD *)(v2 + 256); + if ( v322 == 255 ) + { + v381 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v381); + ++*(_DWORD *)(v2 + 296); + v323 = 1; + v322 = 0; + } + else + { + v323 = v322 + 1; + } + *(_DWORD *)(v2 + 256) = v323; + charbuf = (_DWORD *)v43[-1]._charbuf; + *(_BYTE *)(v2 + v322) = 32; + *(_BYTE *)(v2 + 260) = 32; + d_print_mod(v2, charbuf); + } + v43 = (FILE *)((char *)v43 - 16); + } + while ( Str != v43 ); + result = v465; + *(_DWORD *)(v2 + 276) = v465; + return result; + } +LABEL_4: + v6 = (unsigned int *)v6[3]; + if ( v6 ) + { + result = (unsigned int)v7; + v7 = (FILE *)((char *)v7 + 16); + if ( v41 == 4 ) + { + *(_DWORD *)(v2 + 276) = v464; + goto LABEL_7; + } + continue; + } + break; + } + *(_DWORD *)(v2 + 276) = v7; + goto LABEL_7; + case 4: + v183 = *(_DWORD *)(result + 328); + v184 = *(_DWORD *)(result + 276); + *(_DWORD *)(result + 328) = a2; + *(_DWORD *)(result + 276) = 0; + d_print_comp(result, *(_DWORD *)(a2 + 12)); + if ( *(_BYTE *)(v2 + 260) == 60 ) + d_append_char(v2, 32); + v185 = *(_DWORD *)(v2 + 256); + if ( v185 == 255 ) + { + v371 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v371); + ++*(_DWORD *)(v2 + 296); + v186 = 1; + v185 = 0; + } + else + { + v186 = v185 + 1; + } + *(_DWORD *)(v2 + 256) = v186; + *(_BYTE *)(v2 + v185) = 60; + *(_BYTE *)(v2 + 260) = 60; + d_print_comp(v2, v5[4]); + if ( *(_BYTE *)(v2 + 260) == 62 ) + d_append_char(v2, 32); + result = *(_DWORD *)(v2 + 256); + if ( result == 255 ) + { + v370 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v370); + ++*(_DWORD *)(v2 + 296); + v187 = 1; + result = 0; + } + else + { + v187 = result + 1; + } + *(_DWORD *)(v2 + 256) = v187; + *(_BYTE *)(v2 + result) = 62; + *(_BYTE *)(v2 + 260) = 62; + *(_DWORD *)(v2 + 276) = v184; + *(_DWORD *)(v2 + 328) = v183; + return result; + case 5: + if ( *(_DWORD *)(result + 288) ) + { + v178 = *(_DWORD *)(result + 256); + v179 = "auto:"; + for ( j = 97; ; j = *v179 ) + { + if ( v178 == 255 ) + { + v182 = *(_DWORD *)(v2 + 268); + v431 = j; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v182); + ++*(_DWORD *)(v2 + 296); + j = v431; + v181 = 0; + v178 = 1; + } + else + { + v181 = v178++; + } + ++v179; + *(_DWORD *)(v2 + 256) = v178; + *(_BYTE *)(v2 + v181) = j; + *(_BYTE *)(v2 + 260) = j; + if ( v179 == "" ) + break; + } + v333 = v5[3]; + v334 = Str; + sprintf_constprop_0(Str, (int)"%d", v333 + 1); + result = strlen((const char *)Str); + v335 = result; + if ( result ) + { + result = *(_DWORD *)(v2 + 256); + v336 = (FILE *)((char *)Str + v335); + do + { + v338 = (char)v334->_ptr; + if ( result == 255 ) + { + v339 = *(_DWORD *)(v2 + 268); + v454 = (char)v334->_ptr; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v339); + ++*(_DWORD *)(v2 + 296); + v338 = v454; + v337 = 0; + result = 1; + } + else + { + v337 = result++; + } + v334 = (FILE *)((char *)v334 + 1); + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v337) = v338; + *(_BYTE *)(v2 + 260) = v338; + } + while ( v334 != v336 ); + } + return result; + } + result = (unsigned int)d_lookup_template_argument(result, a2); + v331 = result; + if ( result ) + { + if ( *(_DWORD *)result != 47 + || (v382 = *(_DWORD *)(v2 + 292), v382 < 0) + || (result = (unsigned int)d_index_template_argument_part_0((_DWORD *)result, v382), (v331 = result) != 0) ) + { + v332 = *(_DWORD **)(v2 + 272); + *(_DWORD *)(v2 + 272) = *v332; + result = d_print_comp(v2, v331); + *(_DWORD *)(v2 + 272) = v332; + return result; + } + } + goto LABEL_7; + case 6: + v149 = *(_DWORD *)(a2 + 12); + result = *(_DWORD *)(result + 256); + if ( v149 ) + { + v150 = "parm#"; + for ( k = 123; ; k = *v150++ ) + { + if ( result == 255 ) + { + v153 = *(_DWORD *)(v2 + 268); + v426 = k; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v153); + ++*(_DWORD *)(v2 + 296); + k = v426; + v152 = 0; + result = 1; + } + else + { + v152 = result++; + } + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v152) = k; + *(_BYTE *)(v2 + 260) = k; + if ( v150 == "" ) + break; + } + v340 = Str; + sprintf_constprop_0(Str, (int)"%d", v149); + v341 = strlen((const char *)Str); + result = *(_DWORD *)(v2 + 256); + if ( v341 ) + { + v342 = (FILE *)((char *)Str + v341); + do + { + v344 = (char)v340->_ptr; + if ( result == 255 ) + { + v345 = *(_DWORD *)(v2 + 268); + v455 = (char)v340->_ptr; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v345); + ++*(_DWORD *)(v2 + 296); + v344 = v455; + v343 = 0; + result = 1; + } + else + { + v343 = result++; + } + v340 = (FILE *)((char *)v340 + 1); + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v343) = v344; + *(_BYTE *)(v2 + 260) = v344; + } + while ( v342 != v340 ); + } + if ( result == 255 ) + { + v390 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v390); + ++*(_DWORD *)(v2 + 296); + result = 0; + } + *(_DWORD *)(v2 + 256) = result + 1; + *(_BYTE *)(v2 + result) = 125; + *(_BYTE *)(v2 + 260) = 125; + } + else + { + v346 = "this"; + for ( m = 116; ; m = *v346 ) + { + if ( result == 255 ) + { + v349 = *(_DWORD *)(v2 + 268); + v456 = m; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v349); + ++*(_DWORD *)(v2 + 296); + m = v456; + v348 = 0; + result = 1; + } + else + { + v348 = result++; + } + ++v346; + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v348) = m; + *(_BYTE *)(v2 + 260) = m; + if ( v346 == "" ) + break; + } + } + return result; + case 7: + goto LABEL_14; + case 8: + v9 = *(_DWORD *)(result + 256); + if ( v9 == 255 ) + { + v367 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v367); + ++*(_DWORD *)(v2 + 296); + v10 = 1; + v9 = 0; + } + else + { + v10 = v9 + 1; + } + *(_DWORD *)(v2 + 256) = v10; + *(_BYTE *)(v2 + v9) = 126; + *(_BYTE *)(v2 + 260) = 126; + goto LABEL_14; + case 9: + v194 = *(_DWORD *)(result + 256); + v195 = "table for "; + for ( n = 118; ; n = *v195++ ) + { + if ( v194 == 255 ) + { + v198 = *(_DWORD *)(v2 + 268); + v433 = n; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v198); + ++*(_DWORD *)(v2 + 296); + n = v433; + v197 = 0; + v194 = 1; + } + else + { + v197 = v194++; + } + *(_DWORD *)(v2 + 256) = v194; + *(_BYTE *)(v2 + v197) = n; + *(_BYTE *)(v2 + 260) = n; + if ( v195 == "" ) + break; + } + goto LABEL_9; + case 0xA: + v49 = *(_DWORD *)(result + 256); + v50 = "TT for "; + for ( ii = 86; ; ii = *v50++ ) + { + if ( v49 == 255 ) + { + v53 = *(_DWORD *)(v2 + 268); + v410 = ii; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v53); + ++*(_DWORD *)(v2 + 296); + ii = v410; + v52 = 0; + v49 = 1; + } + else + { + v52 = v49++; + } + *(_DWORD *)(v2 + 256) = v49; + *(_BYTE *)(v2 + v52) = ii; + *(_BYTE *)(v2 + 260) = ii; + if ( v50 == "" ) + break; + } + goto LABEL_9; + case 0xB: + v44 = *(_DWORD *)(result + 256); + v45 = "onstruction vtable for "; + for ( jj = 99; ; jj = *v45++ ) + { + if ( v44 == 255 ) + { + v48 = *(_DWORD *)(v2 + 268); + v409 = jj; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v48); + ++*(_DWORD *)(v2 + 296); + jj = v409; + v47 = 0; + v44 = 1; + } + else + { + v47 = v44++; + } + *(_DWORD *)(v2 + 256) = v44; + *(_BYTE *)(v2 + v47) = jj; + *(_BYTE *)(v2 + 260) = jj; + if ( v45 == "" ) + break; + } + v275 = "-in-"; + d_print_comp(v2, v5[3]); + v276 = *(_DWORD *)(v2 + 256); + for ( kk = 45; ; kk = *v275 ) + { + if ( v276 == 255 ) + { + v279 = *(_DWORD *)(v2 + 268); + v446 = kk; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v279); + ++*(_DWORD *)(v2 + 296); + kk = v446; + v278 = 0; + v276 = 1; + } + else + { + v278 = v276++; + } + ++v275; + *(_DWORD *)(v2 + 256) = v276; + *(_BYTE *)(v2 + v278) = kk; + *(_BYTE *)(v2 + 260) = kk; + if ( v275 == "" ) + break; + } + goto LABEL_14; + case 0xC: + v110 = *(_DWORD *)(result + 256); + v111 = "ypeinfo for "; + for ( mm = 116; ; mm = *v111++ ) + { + if ( v110 == 255 ) + { + v114 = *(_DWORD *)(v2 + 268); + v422 = mm; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v114); + ++*(_DWORD *)(v2 + 296); + mm = v422; + v113 = 0; + v110 = 1; + } + else + { + v113 = v110++; + } + *(_DWORD *)(v2 + 256) = v110; + *(_BYTE *)(v2 + v113) = mm; + *(_BYTE *)(v2 + 260) = mm; + if ( v111 == "" ) + break; + } + goto LABEL_9; + case 0xD: + v105 = *(_DWORD *)(result + 256); + v106 = "ypeinfo name for "; + for ( nn = 116; ; nn = *v106++ ) + { + if ( v105 == 255 ) + { + v109 = *(_DWORD *)(v2 + 268); + v421 = nn; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v109); + ++*(_DWORD *)(v2 + 296); + nn = v421; + v108 = 0; + v105 = 1; + } + else + { + v108 = v105++; + } + *(_DWORD *)(v2 + 256) = v105; + *(_BYTE *)(v2 + v108) = nn; + *(_BYTE *)(v2 + 260) = nn; + if ( v106 == "" ) + break; + } + goto LABEL_9; + case 0xE: + v100 = *(_DWORD *)(result + 256); + v101 = "ypeinfo fn for "; + for ( i1 = 116; ; i1 = *v101++ ) + { + if ( v100 == 255 ) + { + v104 = *(_DWORD *)(v2 + 268); + v420 = i1; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v104); + ++*(_DWORD *)(v2 + 296); + i1 = v420; + v103 = 0; + v100 = 1; + } + else + { + v103 = v100++; + } + *(_DWORD *)(v2 + 256) = v100; + *(_BYTE *)(v2 + v103) = i1; + *(_BYTE *)(v2 + 260) = i1; + if ( v101 == "" ) + break; + } + goto LABEL_9; + case 0xF: + v95 = *(_DWORD *)(result + 256); + v96 = "on-virtual thunk to "; + for ( i2 = 110; ; i2 = *v96++ ) + { + if ( v95 == 255 ) + { + v99 = *(_DWORD *)(v2 + 268); + v419 = i2; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v99); + ++*(_DWORD *)(v2 + 296); + i2 = v419; + v98 = 0; + v95 = 1; + } + else + { + v98 = v95++; + } + *(_DWORD *)(v2 + 256) = v95; + *(_BYTE *)(v2 + v98) = i2; + *(_BYTE *)(v2 + 260) = i2; + if ( v96 == "" ) + break; + } + goto LABEL_9; + case 0x10: + v115 = *(_DWORD *)(result + 256); + v116 = "irtual thunk to "; + for ( i3 = 118; ; i3 = *v116++ ) + { + if ( v115 == 255 ) + { + v119 = *(_DWORD *)(v2 + 268); + v423 = i3; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v119); + ++*(_DWORD *)(v2 + 296); + i3 = v423; + v118 = 0; + v115 = 1; + } + else + { + v118 = v115++; + } + *(_DWORD *)(v2 + 256) = v115; + *(_BYTE *)(v2 + v118) = i3; + *(_BYTE *)(v2 + 260) = i3; + if ( v116 == "" ) + break; + } + goto LABEL_9; + case 0x11: + v64 = *(_DWORD *)(result + 256); + v65 = "ovariant return thunk to "; + for ( i4 = 99; ; i4 = *v65++ ) + { + if ( v64 == 255 ) + { + v68 = *(_DWORD *)(v2 + 268); + v413 = i4; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v68); + ++*(_DWORD *)(v2 + 296); + i4 = v413; + v67 = 0; + v64 = 1; + } + else + { + v67 = v64++; + } + *(_DWORD *)(v2 + 256) = v64; + *(_BYTE *)(v2 + v67) = i4; + *(_BYTE *)(v2 + 260) = i4; + if ( v65 == "" ) + break; + } + goto LABEL_9; + case 0x12: + v59 = *(_DWORD *)(result + 256); + v60 = "ava Class for "; + for ( i5 = 106; ; i5 = *v60++ ) + { + if ( v59 == 255 ) + { + v63 = *(_DWORD *)(v2 + 268); + v412 = i5; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v63); + ++*(_DWORD *)(v2 + 296); + i5 = v412; + v62 = 0; + v59 = 1; + } + else + { + v62 = v59++; + } + *(_DWORD *)(v2 + 256) = v59; + *(_BYTE *)(v2 + v62) = i5; + *(_BYTE *)(v2 + 260) = i5; + if ( v60 == "" ) + break; + } + goto LABEL_9; + case 0x13: + v54 = *(_DWORD *)(result + 256); + v55 = "uard variable for "; + for ( i6 = 103; ; i6 = *v55++ ) + { + if ( v54 == 255 ) + { + v58 = *(_DWORD *)(v2 + 268); + v411 = i6; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v58); + ++*(_DWORD *)(v2 + 296); + i6 = v411; + v57 = 0; + v54 = 1; + } + else + { + v57 = v54++; + } + *(_DWORD *)(v2 + 256) = v54; + *(_BYTE *)(v2 + v57) = i6; + *(_BYTE *)(v2 + 260) = i6; + if ( v55 == "" ) + break; + } + goto LABEL_9; + case 0x14: + v169 = *(_DWORD *)(result + 256); + v170 = "LS init function for "; + for ( i7 = 84; ; i7 = *v170++ ) + { + if ( v169 == 255 ) + { + v173 = *(_DWORD *)(v2 + 268); + v430 = i7; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v173); + ++*(_DWORD *)(v2 + 296); + i7 = v430; + v172 = 0; + v169 = 1; + } + else + { + v172 = v169++; + } + *(_DWORD *)(v2 + 256) = v169; + *(_BYTE *)(v2 + v172) = i7; + *(_BYTE *)(v2 + 260) = i7; + if ( v170 == "" ) + break; + } + goto LABEL_9; + case 0x15: + v164 = *(_DWORD *)(result + 256); + v165 = "LS wrapper function for "; + for ( i8 = 84; ; i8 = *v165++ ) + { + if ( v164 == 255 ) + { + v168 = *(_DWORD *)(v2 + 268); + v429 = i8; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v168); + ++*(_DWORD *)(v2 + 296); + i8 = v429; + v167 = 0; + v164 = 1; + } + else + { + v167 = v164++; + } + *(_DWORD *)(v2 + 256) = v164; + *(_BYTE *)(v2 + v167) = i8; + *(_BYTE *)(v2 + 260) = i8; + if ( v165 == "" ) + break; + } + goto LABEL_9; + case 0x16: + v159 = *(_DWORD *)(result + 256); + v160 = "eference temporary #"; + for ( i9 = 114; ; i9 = *v160++ ) + { + if ( v159 == 255 ) + { + v163 = *(_DWORD *)(v2 + 268); + v428 = i9; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v163); + ++*(_DWORD *)(v2 + 296); + i9 = v428; + v162 = 0; + v159 = 1; + } + else + { + v162 = v159++; + } + *(_DWORD *)(v2 + 256) = v159; + *(_BYTE *)(v2 + v162) = i9; + *(_BYTE *)(v2 + 260) = i9; + if ( v160 == "" ) + break; + } + v309 = " for "; + d_print_comp(v2, v5[4]); + v310 = *(_DWORD *)(v2 + 256); + for ( i10 = 32; ; i10 = *v309 ) + { + if ( v310 == 255 ) + { + v313 = *(_DWORD *)(v2 + 268); + v451 = i10; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v313); + ++*(_DWORD *)(v2 + 296); + i10 = v451; + v312 = 0; + v310 = 1; + } + else + { + v312 = v310++; + } + ++v309; + *(_DWORD *)(v2 + 256) = v310; + *(_BYTE *)(v2 + v312) = i10; + *(_BYTE *)(v2 + 260) = i10; + if ( v309 == "" ) + break; + } + goto LABEL_9; + case 0x17: + v154 = *(_DWORD *)(result + 256); + v155 = "idden alias for "; + for ( i11 = 104; ; i11 = *v155++ ) + { + if ( v154 == 255 ) + { + v158 = *(_DWORD *)(v2 + 268); + v427 = i11; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v158); + ++*(_DWORD *)(v2 + 296); + i11 = v427; + v157 = 0; + v154 = 1; + } + else + { + v157 = v154++; + } + *(_DWORD *)(v2 + 256) = v154; + *(_BYTE *)(v2 + v157) = i11; + *(_BYTE *)(v2 + 260) = i11; + if ( v155 == "" ) + break; + } + goto LABEL_9; + case 0x18: + v134 = *(_DWORD *)(a2 + 16); + v135 = *(char **)(a2 + 12); + if ( v134 ) + { + result = *(_DWORD *)(result + 256); + v136 = &v135[v134]; + do + { + v138 = *v135; + if ( result == 255 ) + { + v139 = *(_DWORD *)(v2 + 268); + v425 = *v135; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v139); + ++*(_DWORD *)(v2 + 296); + v138 = v425; + v137 = 0; + result = 1; + } + else + { + v137 = result++; + } + ++v135; + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v137) = v138; + *(_BYTE *)(v2 + 260) = v138; + } + while ( v136 != v135 ); + } + return result; + case 0x19: + case 0x1A: + case 0x1B: + v14 = *(char **)(result + 276); + v405 = v14; + if ( !v14 ) + goto LABEL_36; + while ( 2 ) + { + if ( *((_DWORD *)v14 + 2) ) + goto LABEL_26; + v15 = **((_DWORD **)v14 + 1); + if ( (unsigned int)(v15 - 25) > 2 ) + { + v3 = 0; + goto LABEL_36; + } + if ( v4 != v15 ) + { +LABEL_26: + v14 = *(char **)v14; + if ( !v14 ) + goto LABEL_36; + continue; + } + break; + } +LABEL_9: + v8 = v5[3]; + return d_print_comp(v2, v8); + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x20: + case 0x21: + case 0x22: + case 0x25: + case 0x26: + case 0x4D: + case 0x4F: + case 0x50: + v11 = *(char **)(result + 276); + goto LABEL_16; + case 0x23: + case 0x24: + result = *(_DWORD *)(a2 + 12); + v18 = *(_DWORD *)result; + if ( *(_DWORD *)(v2 + 288) ) + goto LABEL_33; + v3 = 0; + if ( v18 != 5 ) + goto LABEL_33; + v374 = *(_DWORD *)(v2 + 308); + if ( v374 <= 0 ) + goto LABEL_621; + v375 = *(_DWORD **)(v2 + 304); + v376 = 0; + break; + case 0x27: + result = *(_DWORD *)(a2 + 12); + v267 = *(_DWORD *)(result + 4); + v268 = *(char **)result; + if ( v267 ) + { + result = *(_DWORD *)(v2 + 256); + v269 = &v268[v267]; + do + { + v271 = *v268; + if ( result == 255 ) + { + v272 = *(_DWORD *)(v2 + 268); + v445 = *v268; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v272); + ++*(_DWORD *)(v2 + 296); + v271 = v445; + v270 = 0; + result = 1; + } + else + { + v270 = result++; + } + ++v268; + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v270) = v271; + *(_BYTE *)(v2 + 260) = v271; + } + while ( v268 != v269 ); + } + return result; + case 0x28: + goto LABEL_9; + case 0x29: + v174 = *(_DWORD *)(a2 + 12); + v175 = *(int ***)(result + 276); + if ( !v174 ) + return d_print_function_type(v2, (int)v5, v175); + Str[0]._ptr = (char *)v175; + *(_DWORD *)(v2 + 276) = Str; + v176 = *(_DWORD *)(v2 + 272); + Str[0]._cnt = (int)v5; + Str[0]._flag = v176; + Str[0]._base = 0; + d_print_comp(v2, v174); + result = (unsigned int)Str[0]._ptr; + base = Str[0]._base; + *(_DWORD *)(v2 + 276) = Str[0]._ptr; + if ( !base ) + { + d_append_char(v2, 32); + v175 = *(int ***)(v2 + 276); + return d_print_function_type(v2, (int)v5, v175); + } + return result; + case 0x2A: + v127 = *(char **)(result + 276); + Str[0]._cnt = a2; + v128 = 1; + v129 = (unsigned int)v127; + v463 = v127; + Str[0]._ptr = v127; + v130 = (char *)Str; + *(_DWORD *)(result + 276) = Str; + v131 = *(_DWORD *)(result + 272); + Str[0]._base = 0; + Str[0]._flag = v131; + result = v129; + if ( v129 ) + { + do + { + if ( (unsigned int)(**(_DWORD **)(result + 4) - 25) > 2 ) + break; + if ( !*(_DWORD *)(result + 8) ) + { + if ( v128 > 3 ) + goto LABEL_7; + v132 = v128++; + v132 *= 16; + *(char **)((char *)&Str[0]._ptr + v132) = *(char **)result; + v133 = (char **)((char *)&Str[0]._ptr + v132); + v133[1] = *(_DWORD *)(result + 4); + v133[2] = *(_DWORD *)(result + 8); + v133[3] = *(_DWORD *)(result + 12); + *(char **)((char *)&Str[0]._ptr + v132) = v130; + v130 = (char *)Str + v132; + *(_DWORD *)(v2 + 276) = (char *)Str + v132; + *(_DWORD *)(result + 8) = 1; + } + result = *(_DWORD *)result; + } + while ( result ); + d_print_comp(v2, v5[4]); + *(_DWORD *)(v2 + 276) = v463; + result = (unsigned int)Str[0]._base; + if ( Str[0]._base ) + return result; + while ( v128 != 1 ) + { + --v128; + d_print_mod(v2, *((_DWORD **)&Str[0]._cnt + 4 * v128)); + } + } + else + { + result = d_print_comp(v2, v5[4]); + v397 = Str[0]._base == 0; + *(_DWORD *)(v2 + 276) = 0; + if ( !v397 ) + return result; + } + return d_print_array_type(v2, (int)v5, *(int ***)(v2 + 276)); + case 0x2B: + case 0x2D: + v16 = *(char **)(result + 276); + Str[0]._cnt = a2; + v17 = *(_DWORD *)(a2 + 16); + Str[0]._base = 0; + Str[0]._ptr = v16; + *(_DWORD *)(v2 + 276) = Str; + Str[0]._flag = *(_DWORD *)(v2 + 272); + d_print_comp(v2, v17); + if ( !Str[0]._base ) + d_print_mod(v2, v5); + result = (unsigned int)Str[0]._ptr; + *(_DWORD *)(v2 + 276) = Str[0]._ptr; + return result; + case 0x2C: + if ( *(_WORD *)(a2 + 18) ) + d_append_string(result, "_Sat "); + v188 = v5[3]; + if ( *(void ****)(v188 + 12) == &off_513FC0 ) + { + result = *(_DWORD *)(v2 + 256); + } + else + { + d_print_comp(v2, v188); + v189 = *(_DWORD *)(v2 + 256); + if ( v189 == 255 ) + { + v389 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v389); + ++*(_DWORD *)(v2 + 296); + v189 = 0; + } + result = v189 + 1; + *(_DWORD *)(v2 + 256) = v189 + 1; + *(_BYTE *)(v2 + v189) = 32; + *(_BYTE *)(v2 + 260) = 32; + } + if ( *((_WORD *)v5 + 8) ) + { + v327 = "Accum"; + for ( i12 = 95; ; i12 = *v327++ ) + { + if ( result == 255 ) + { + v330 = *(_DWORD *)(v2 + 268); + v453 = i12; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v330); + ++*(_DWORD *)(v2 + 296); + i12 = v453; + v329 = 0; + result = 1; + } + else + { + v329 = result++; + } + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v329) = i12; + *(_BYTE *)(v2 + 260) = i12; + if ( v327 == "" ) + break; + } + } + else + { + v190 = "Fract"; + for ( i13 = 95; ; i13 = *v190++ ) + { + if ( result == 255 ) + { + v193 = *(_DWORD *)(v2 + 268); + v432 = i13; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v193); + ++*(_DWORD *)(v2 + 296); + i13 = v432; + v192 = 0; + result = 1; + } + else + { + v192 = result++; + } + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v192) = i13; + *(_BYTE *)(v2 + 260) = i13; + if ( v190 == "" ) + break; + } + } + return result; + case 0x2E: + case 0x2F: + v26 = *(_DWORD *)(a2 + 12); + if ( v26 ) + d_print_comp(result, v26); + result = v5[4]; + if ( result ) + { + v27 = *(_DWORD *)(v2 + 256); + if ( v27 > 0xFD ) + { + *(_BYTE *)(v2 + v27) = 0; + Str2 = (char *)v27; + v27 = 0; + (*(void (__cdecl **)(unsigned int, char *, _DWORD))(v2 + 264))(v2, Str2, *(_DWORD *)(v2 + 268)); + ++*(_DWORD *)(v2 + 296); + *(_DWORD *)(v2 + 256) = 0; + } + v28 = ", "; + for ( i14 = 44; ; i14 = *v28 ) + { + if ( v27 == 255 ) + { + v27 = 1; + v406 = i14; + v404 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v404); + ++*(_DWORD *)(v2 + 296); + i14 = v406; + v30 = 0; + } + else + { + v30 = v27++; + } + ++v28; + *(_DWORD *)(v2 + 256) = v27; + *(_BYTE *)(v2 + v30) = i14; + *(_BYTE *)(v2 + 260) = i14; + if ( v28 == "" ) + break; + } + v321 = *(_DWORD *)(v2 + 296); + result = d_print_comp(v2, v5[4]); + if ( *(_DWORD *)(v2 + 296) == v321 && *(_DWORD *)(v2 + 256) == v27 ) + *(_DWORD *)(v2 + 256) = v27 - 2; + } + return result; + case 0x30: + v36 = *(_DWORD *)(result + 256); + v37 = "emplate parameter object for "; + for ( i15 = 116; ; i15 = *v37++ ) + { + if ( v36 == 255 ) + { + v40 = *(_DWORD *)(v2 + 268); + v408 = i15; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v40); + ++*(_DWORD *)(v2 + 296); + i15 = v408; + v39 = 0; + v36 = 1; + } + else + { + v39 = v36++; + } + *(_DWORD *)(v2 + 256) = v36; + *(_BYTE *)(v2 + v39) = i15; + *(_BYTE *)(v2 + 260) = i15; + if ( v37 == "" ) + break; + } + goto LABEL_9; + case 0x31: + v247 = *(_DWORD *)(a2 + 12); + v248 = v5[4]; + if ( v247 ) + d_print_comp(result, v247); + v249 = *(_DWORD *)(v2 + 256); + if ( v249 == 255 ) + { + v365 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v365); + ++*(_DWORD *)(v2 + 296); + v250 = 1; + v249 = 0; + } + else + { + v250 = v249 + 1; + } + *(_DWORD *)(v2 + 256) = v250; + *(_BYTE *)(v2 + v249) = 123; + *(_BYTE *)(v2 + 260) = 123; + d_print_comp(v2, v248); + result = *(_DWORD *)(v2 + 256); + if ( result != 255 ) + goto LABEL_365; + goto LABEL_437; + case 0x32: + v241 = *(_DWORD *)(a2 + 12); + result = *(_DWORD *)(result + 256); + v242 = "perator"; + v243 = 111; + v244 = *(_DWORD *)(v241 + 8); + while ( 1 ) + { + if ( result == 255 ) + { + v246 = *(_DWORD *)(v2 + 268); + v442 = v243; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v246); + ++*(_DWORD *)(v2 + 296); + v243 = v442; + v245 = 0; + result = 1; + } + else + { + v245 = result++; + } + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v245) = v243; + *(_BYTE *)(v2 + 260) = v243; + if ( v242 == "" ) + break; + v243 = *v242++; + } + v288 = *(char **)(v241 + 4); + if ( (unsigned __int8)(*v288 - 97) <= 0x19u ) + { + if ( result == 255 ) + { + v393 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v393); + ++*(_DWORD *)(v2 + 296); + v288 = *(char **)(v241 + 4); + result = 0; + } + *(_DWORD *)(v2 + 256) = result + 1; + *(_BYTE *)(v2 + result) = 32; + *(_BYTE *)(v2 + 260) = 32; + } + v289 = v244 - 1; + if ( v288[v244 - 1] != 32 ) + v289 = v244; + if ( v289 ) + { + result = *(_DWORD *)(v2 + 256); + v290 = &v288[v289]; + do + { + v292 = *v288; + if ( result == 255 ) + { + v293 = *(_DWORD *)(v2 + 268); + v448 = *v288; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v293); + ++*(_DWORD *)(v2 + 296); + v292 = v448; + v291 = 0; + result = 1; + } + else + { + v291 = result++; + } + ++v288; + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v291) = v292; + *(_BYTE *)(v2 + 260) = v292; + } + while ( v290 != v288 ); + } + return result; + case 0x33: + v236 = *(_DWORD *)(result + 256); + v237 = "perator "; + for ( i16 = 111; ; i16 = *v237++ ) + { + if ( v236 == 255 ) + { + v240 = *(_DWORD *)(v2 + 268); + v441 = i16; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v240); + ++*(_DWORD *)(v2 + 296); + i16 = v441; + v239 = 0; + v236 = 1; + } + else + { + v239 = v236++; + } + *(_DWORD *)(v2 + 256) = v236; + *(_BYTE *)(v2 + v239) = i16; + *(_BYTE *)(v2 + 260) = i16; + if ( v237 == "" ) + break; + } + goto LABEL_14; + case 0x35: + v231 = *(_DWORD *)(result + 256); + v232 = "perator "; + for ( i17 = 111; ; i17 = *v232++ ) + { + if ( v231 == 255 ) + { + v235 = *(_DWORD *)(v2 + 268); + v440 = i17; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v235); + ++*(_DWORD *)(v2 + 296); + i17 = v440; + v234 = 0; + v231 = 1; + } + else + { + v234 = v231++; + } + *(_DWORD *)(v2 + 256) = v231; + *(_BYTE *)(v2 + v234) = i17; + *(_BYTE *)(v2 + 260) = i17; + if ( v232 == "" ) + break; + } + return d_print_conversion(v2, (int)v5); + case 0x36: + v255 = *(_DWORD **)(a2 + 12); + return d_print_expr_op(v2, v255); + case 0x37: + v252 = *(_DWORD **)(a2 + 12); + v214 = *(_DWORD *)(a2 + 16); + if ( *v252 != 50 ) + { + if ( *v252 == 52 ) + { + v253 = *(_DWORD *)(result + 256); + if ( v253 == 255 ) + { + v396 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v396); + ++*(_DWORD *)(v2 + 296); + v253 = 0; + } + *(_DWORD *)(v2 + 256) = v253 + 1; + *(_BYTE *)(v2 + v253) = 40; + *(_BYTE *)(v2 + 260) = 40; + d_print_comp(v2, v252[3]); + v254 = *(_DWORD *)(v2 + 256); + if ( v254 == 255 ) + { + v395 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v395); + ++*(_DWORD *)(v2 + 296); + v254 = 0; + } + *(_DWORD *)(v2 + 256) = v254 + 1; + *(_BYTE *)(v2 + v254) = 41; + *(_BYTE *)(v2 + 260) = 41; + } + else + { + d_print_expr_op(result, v252); + } + return d_print_subexpr(v2, (_DWORD *)v214); + } + v354 = *(unsigned __int8 **)v252[3]; + v355 = *v354 - 97; + if ( *v354 == 97 ) + { + v355 = v354[1] - 100; + if ( v354[1] == 100 ) + v355 = v354[2]; + } + v356 = *(_DWORD *)v214; + if ( !v355 && v356 == 3 ) + { + if ( **(_DWORD **)(v214 + 12) == 1 && **(_DWORD **)(v214 + 16) == 41 ) + v214 = *(_DWORD *)(v214 + 12); + } + else if ( v356 == 57 ) + { + d_print_subexpr(result, *(_DWORD **)(v214 + 12)); + v255 = v252; + return d_print_expr_op(v2, v255); + } + if ( *v354 == 115 ) + { + if ( v354[1] == 90 && !v354[2] ) + { + for ( i18 = d_find_pack(result, (_DWORD *)v214, v354[2]); i18; ++v358 ) + { + if ( *i18 != 47 ) + break; + if ( !i18[3] ) + break; + i18 = (_DWORD *)i18[4]; + } + return d_append_num(v2, v358); + } + if ( v354[1] == 80 ) + { + v360 = 0; + if ( !v354[2] ) + { + do + { + if ( *(_DWORD *)v214 != 47 ) + break; + v361 = *(_DWORD *)(v214 + 12); + if ( !v361 ) + break; + if ( *(_DWORD *)v361 == 75 ) + { + pack = d_find_pack(v2, *(_DWORD **)(v361 + 12), v360); + for ( i19 = 0; pack; ++i19 ) + { + if ( *pack != 47 ) + break; + if ( !pack[3] ) + break; + pack = (_DWORD *)pack[4]; + } + v360 = i19 + v363; + } + else + { + ++v360; + } + v214 = *(_DWORD *)(v214 + 16); + } + while ( v214 ); + v383 = Str; + sprintf_constprop_0(Str, (int)"%d", v360); + result = strlen((const char *)Str); + v384 = result; + if ( result ) + { + result = *(_DWORD *)(v2 + 256); + v385 = (FILE *)((char *)Str + v384); + do + { + v387 = (char)v383->_ptr; + if ( result == 255 ) + { + v388 = *(_DWORD *)(v2 + 268); + v458 = (char)v383->_ptr; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v388); + ++*(_DWORD *)(v2 + 296); + v387 = v458; + v386 = 0; + result = 1; + } + else + { + v386 = result++; + } + v383 = (FILE *)((char *)v383 + 1); + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v386) = v387; + *(_BYTE *)(v2 + 260) = v387; + } + while ( v383 != v385 ); + } + return result; + } + } + } + d_print_expr_op(result, v252); + v359 = *v354; + if ( v359 == 103 && v354[1] == 115 ) + { + v8 = v214; + if ( !v354[2] ) + return d_print_comp(v2, v8); + } + if ( v359 == 115 && v354[1] == 116 && !v354[2] ) + { + d_append_char(v2, 40); + d_print_comp(v2, v214); + v25 = 41; + return d_append_char(v2, v25); + } + return d_print_subexpr(v2, (_DWORD *)v214); + case 0x38: + result = *(_DWORD *)(a2 + 16); + if ( *(_DWORD *)result != 57 ) + goto LABEL_7; + v140 = *(_DWORD *)(a2 + 12); + v141 = **(char ***)(v140 + 12); + if ( v141[1] == 99 ) + { + v380 = *v141; + if ( (unsigned __int8)(v380 - 99) <= 1u || (unsigned __int8)(v380 - 114) <= 1u ) + { + d_print_expr_op(v2, (_DWORD *)v140); + d_append_char(v2, 60); + d_print_comp(v2, *(_DWORD *)(v5[4] + 12)); + d_append_string(v2, ">("); + d_print_comp(v2, *(_DWORD *)(v5[4] + 16)); + v25 = 41; + return d_append_char(v2, v25); + } + } + result = d_maybe_print_fold_expression(v2, (int)v5); + if ( !result ) + { + v142 = (_DWORD *)v5[3]; + if ( *v142 == 50 ) + { + v392 = v142[3]; + if ( *(_DWORD *)(v392 + 8) == 1 && **(_BYTE **)(v392 + 4) == 62 ) + { + d_append_char(v2, 40); + v142 = (_DWORD *)v5[3]; + } + } + v143 = *(unsigned __int8 **)v142[3]; + v144 = *v143 - 99; + if ( *v143 == 99 ) + { + v144 = v143[1] - 108; + if ( v143[1] == 108 ) + v144 = v143[2]; + } + v145 = *(_DWORD *)(v5[4] + 12); + if ( !v144 && *(_DWORD *)v145 == 3 ) + { + if ( **(_DWORD **)(v145 + 16) != 41 ) + *(_DWORD *)(v2 + 280) = 1; + d_print_subexpr(v2, *(_DWORD **)(v145 + 12)); + } + else + { + d_print_subexpr(v2, (_DWORD *)v145); + } + v146 = v5[3]; + v147 = **(unsigned __int8 ***)(v146 + 12); + v148 = *v147; + if ( v148 == 105 && v147[1] == 120 && !v147[2] ) + { + d_append_char(v2, 91); + d_print_comp(v2, *(_DWORD *)(v5[4] + 16)); + d_append_char(v2, 93); + } + else + { + if ( v148 != 99 || v147[1] != 108 || v147[2] ) + d_print_expr_op(v2, (_DWORD *)v146); + d_print_subexpr(v2, *(_DWORD **)(v5[4] + 16)); + } + result = v5[3]; + if ( *(_DWORD *)result == 50 ) + { + result = *(_DWORD *)(result + 12); + if ( *(_DWORD *)(result + 8) == 1 ) + { + result = *(_DWORD *)(result + 4); + v25 = 41; + if ( *(_BYTE *)result == 62 ) + return d_append_char(v2, v25); + } + } + } + return result; + case 0x3A: + result = *(_DWORD *)(a2 + 16); + if ( *(_DWORD *)result != 59 ) + goto LABEL_7; + result = *(_DWORD *)(result + 16); + if ( *(_DWORD *)result != 60 ) + goto LABEL_7; + result = d_maybe_print_fold_expression(v2, a2); + if ( result ) + return result; + v209 = v5[4]; + v210 = v5[3]; + v211 = *(_DWORD **)(v209 + 12); + v212 = *(_DWORD *)(v209 + 16); + v213 = *(_DWORD **)(v212 + 12); + v214 = *(_DWORD *)(v212 + 16); + v436 = v211; + if ( !strcmp(**(const char ***)(v210 + 12), "qu") ) + { + d_print_subexpr(v2, v436); + d_print_expr_op(v2, (_DWORD *)v210); + d_print_subexpr(v2, v213); + d_append_string(v2, " : "); + } + else + { + d_append_string(v2, "new "); + if ( v436[3] ) + { + d_print_subexpr(v2, v436); + d_append_char(v2, 32); + } + result = d_print_comp(v2, (int)v213); + if ( !v214 ) + return result; + } + return d_print_subexpr(v2, (_DWORD *)v214); + case 0x3D: + case 0x3E: + v19 = *(_DWORD **)(a2 + 12); + if ( *v19 == 39 ) + { + v20 = *(_DWORD *)(v19[3] + 16); + if ( v20 > 6 ) + { + if ( v20 == 7 ) + { + v325 = v5[4]; + if ( !*(_DWORD *)v325 && *(_DWORD *)(v325 + 16) == 1 && v4 == 61 ) + { + v326 = **(_BYTE **)(v325 + 12); + if ( v326 == 48 ) + { + v391 = "false"; + return d_append_string(v2, v391); + } + if ( v326 == 49 ) + { + v391 = "true"; + return d_append_string(v2, v391); + } + } + } + } + else if ( v20 ) + { + v373 = (_DWORD *)v5[4]; + if ( !*v373 ) + { + if ( v4 == 62 ) + { + d_append_char(v2, 45); + v373 = (_DWORD *)v5[4]; + } + result = d_print_comp(v2, (int)v373); + switch ( v20 ) + { + case 2u: + v25 = 117; + return d_append_char(v2, v25); + case 3u: + v25 = 108; + return d_append_char(v2, v25); + case 4u: + v391 = "ul"; + return d_append_string(v2, v391); + case 5u: + v391 = "ll"; + return d_append_string(v2, v391); + case 6u: + v391 = (const char *)&off_513197; + return d_append_string(v2, v391); + default: + return result; + } + return result; + } + } + } + else + { + v20 = 0; + } + v21 = *(_DWORD *)(v2 + 256); + if ( v21 == 255 ) + { + v372 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v372); + v19 = (_DWORD *)v5[3]; + v22 = 1; + v21 = 0; + ++*(_DWORD *)(v2 + 296); + } + else + { + v22 = v21 + 1; + } + *(_DWORD *)(v2 + 256) = v22; + *(_BYTE *)(v2 + v21) = 40; + *(_BYTE *)(v2 + 260) = 40; + d_print_comp(v2, (int)v19); + v23 = *(_DWORD *)(v2 + 256); + if ( v23 == 255 ) + { + v369 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v369); + ++*(_DWORD *)(v2 + 296); + v24 = 1; + v23 = 0; + } + else + { + v24 = v23 + 1; + } + *(_DWORD *)(v2 + 256) = v24; + *(_BYTE *)(v2 + v23) = 41; + *(_BYTE *)(v2 + 260) = 41; + if ( *v5 == 62 ) + d_append_char(v2, 45); + if ( v20 != 8 ) + { +LABEL_14: + v8 = v5[4]; + return d_print_comp(v2, v8); + } + d_append_char(v2, 91); + d_print_comp(v2, v5[4]); + v25 = 93; + return d_append_char(v2, v25); + case 0x3F: + v199 = *(_DWORD *)(result + 256); + v200 = "ava resource "; + for ( i20 = 106; ; i20 = *v200++ ) + { + if ( v199 == 255 ) + { + v203 = *(_DWORD *)(v2 + 268); + v434 = i20; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v203); + ++*(_DWORD *)(v2 + 296); + i20 = v434; + v202 = 0; + v199 = 1; + } + else + { + v202 = v199++; + } + *(_DWORD *)(v2 + 256) = v199; + *(_BYTE *)(v2 + v202) = i20; + *(_BYTE *)(v2 + 260) = i20; + if ( v200 == "" ) + break; + } + goto LABEL_9; + case 0x40: + d_print_comp(result, *(_DWORD *)(a2 + 12)); + goto LABEL_14; + case 0x41: + result = *(_DWORD *)(result + 256); + v120 = *(_DWORD *)(a2 + 12); + if ( result == 255 ) + { + v366 = *(_DWORD *)(v2 + 268); + v457 = *(_DWORD *)(a2 + 12); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v366); + ++*(_DWORD *)(v2 + 296); + LOBYTE(v120) = v457; + result = 0; + v121 = 1; + } + else + { + v121 = result + 1; + } + *(_DWORD *)(v2 + 256) = v121; + *(_BYTE *)(v2 + result) = v120; + *(_BYTE *)(v2 + 260) = v120; + return result; + case 0x42: + v220 = Str; + sprintf_constprop_0(Str, (int)"%d", *(_DWORD *)(a2 + 12)); + result = strlen((const char *)Str); + v221 = result; + if ( result ) + { + result = *(_DWORD *)(v2 + 256); + v222 = (FILE *)((char *)Str + v221); + do + { + v224 = (char)v220->_ptr; + if ( result == 255 ) + { + v225 = *(_DWORD *)(v2 + 268); + v438 = (char)v220->_ptr; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v225); + ++*(_DWORD *)(v2 + 296); + v224 = v438; + v223 = 0; + result = 1; + } + else + { + v223 = result++; + } + v220 = (FILE *)((char *)v220 + 1); + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v223) = v224; + *(_BYTE *)(v2 + 260) = v224; + } + while ( v222 != v220 ); + } + return result; + case 0x43: + v215 = *(_DWORD *)(result + 256); + v216 = "ecltype ("; + for ( i21 = 100; ; i21 = *v216++ ) + { + if ( v215 == 255 ) + { + v219 = *(_DWORD *)(v2 + 268); + v437 = i21; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v219); + ++*(_DWORD *)(v2 + 296); + i21 = v437; + v218 = 0; + v215 = 1; + } + else + { + v218 = v215++; + } + *(_DWORD *)(v2 + 256) = v215; + *(_BYTE *)(v2 + v218) = i21; + *(_BYTE *)(v2 + 260) = i21; + if ( v216 == "" ) + break; + } + d_print_comp(v2, v5[3]); + result = *(_DWORD *)(v2 + 256); + if ( result == 255 ) + { + v368 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v368); + ++*(_DWORD *)(v2 + 296); + v308 = 1; + result = 0; + } + else + { + v308 = result + 1; + } + *(_DWORD *)(v2 + 256) = v308; + *(_BYTE *)(v2 + result) = 41; + *(_BYTE *)(v2 + 260) = 41; + return result; + case 0x44: + v226 = *(_DWORD *)(result + 256); + v227 = "lobal constructors keyed to "; + for ( i22 = 103; ; i22 = *v227++ ) + { + if ( v226 == 255 ) + { + v230 = *(_DWORD *)(v2 + 268); + v439 = i22; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v230); + ++*(_DWORD *)(v2 + 296); + i22 = v439; + v229 = 0; + v226 = 1; + } + else + { + v229 = v226++; + } + *(_DWORD *)(v2 + 256) = v226; + *(_BYTE *)(v2 + v229) = i22; + *(_BYTE *)(v2 + 260) = i22; + if ( v227 == "" ) + break; + } + goto LABEL_9; + case 0x45: + v256 = *(_DWORD *)(result + 256); + v257 = "lobal destructors keyed to "; + for ( i23 = 103; ; i23 = *v257++ ) + { + if ( v256 == 255 ) + { + v260 = *(_DWORD *)(v2 + 268); + v443 = i23; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v260); + ++*(_DWORD *)(v2 + 296); + i23 = v443; + v259 = 0; + v256 = 1; + } + else + { + v259 = v256++; + } + *(_DWORD *)(v2 + 256) = v256; + *(_BYTE *)(v2 + v259) = i23; + *(_BYTE *)(v2 + 260) = i23; + if ( v257 == "" ) + break; + } + goto LABEL_9; + case 0x46: + v204 = *(_DWORD *)(result + 256); + v205 = "lambda("; + for ( i24 = 123; ; i24 = *v205++ ) + { + if ( v204 == 255 ) + { + v208 = *(_DWORD *)(v2 + 268); + v435 = i24; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v208); + ++*(_DWORD *)(v2 + 296); + i24 = v435; + v207 = 0; + v204 = 1; + } + else + { + v207 = v204++; + } + *(_DWORD *)(v2 + 256) = v204; + *(_BYTE *)(v2 + v207) = i24; + *(_BYTE *)(v2 + 260) = i24; + if ( v205 == "" ) + break; + } + v294 = v5[3]; + v295 = ")#"; + ++*(_DWORD *)(v2 + 288); + d_print_comp(v2, v294); + v296 = *(_DWORD *)(v2 + 256); + v297 = 41; + --*(_DWORD *)(v2 + 288); + while ( 1 ) + { + if ( v296 == 255 ) + { + v299 = *(_DWORD *)(v2 + 268); + v449 = v297; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v299); + ++*(_DWORD *)(v2 + 296); + v297 = v449; + v298 = 0; + v296 = 1; + } + else + { + v298 = v296++; + } + ++v295; + *(_DWORD *)(v2 + 256) = v296; + *(_BYTE *)(v2 + v298) = v297; + *(_BYTE *)(v2 + 260) = v297; + if ( v295 == "" ) + break; + v297 = *v295; + } + v300 = v5[4]; + v301 = Str; + sprintf_constprop_0(Str, (int)"%d", v300 + 1); + v302 = strlen((const char *)Str); + result = *(_DWORD *)(v2 + 256); + if ( v302 ) + { + v303 = (FILE *)((char *)Str + v302); + do + { + v305 = (char)v301->_ptr; + if ( result == 255 ) + { + v306 = *(_DWORD *)(v2 + 268); + v450 = (char)v301->_ptr; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v306); + ++*(_DWORD *)(v2 + 296); + v305 = v450; + v304 = 0; + result = 1; + } + else + { + v304 = result++; + } + v301 = (FILE *)((char *)v301 + 1); + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v304) = v305; + *(_BYTE *)(v2 + 260) = v305; + } + while ( v303 != v301 ); + } + goto LABEL_436; + case 0x48: + v90 = *(_DWORD *)(result + 256); + v91 = "unnamed type#"; + for ( i25 = 123; ; i25 = *v91++ ) + { + if ( v90 == 255 ) + { + v94 = *(_DWORD *)(v2 + 268); + v418 = i25; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v94); + ++*(_DWORD *)(v2 + 296); + i25 = v418; + v93 = 0; + v90 = 1; + } + else + { + v93 = v90++; + } + *(_DWORD *)(v2 + 256) = v90; + *(_BYTE *)(v2 + v93) = i25; + *(_BYTE *)(v2 + 260) = i25; + if ( v91 == "" ) + break; + } + v314 = v5[3]; + v315 = Str; + sprintf_constprop_0(Str, (int)"%d", v314 + 1); + v316 = strlen((const char *)Str); + result = *(_DWORD *)(v2 + 256); + if ( v316 ) + { + v317 = (FILE *)((char *)Str + v316); + do + { + v319 = (char)v315->_ptr; + if ( result == 255 ) + { + v320 = *(_DWORD *)(v2 + 268); + v452 = (char)v315->_ptr; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v320); + ++*(_DWORD *)(v2 + 296); + v319 = v452; + v318 = 0; + result = 1; + } + else + { + v318 = result++; + } + v315 = (FILE *)((char *)v315 + 1); + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v318) = v319; + *(_BYTE *)(v2 + 260) = v319; + } + while ( v317 != v315 ); + } +LABEL_436: + if ( result == 255 ) + { +LABEL_437: + v307 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v307); + ++*(_DWORD *)(v2 + 296); + v251 = 1; + result = 0; + } + else + { +LABEL_365: + v251 = result + 1; + } + *(_DWORD *)(v2 + 256) = v251; + *(_BYTE *)(v2 + result) = 125; + *(_BYTE *)(v2 + 260) = 125; + return result; + case 0x49: + v85 = *(_DWORD *)(result + 256); + v86 = "ransaction clone for "; + for ( i26 = 116; ; i26 = *v86++ ) + { + if ( v85 == 255 ) + { + v89 = *(_DWORD *)(v2 + 268); + v417 = i26; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v89); + ++*(_DWORD *)(v2 + 296); + i26 = v417; + v88 = 0; + v85 = 1; + } + else + { + v88 = v85++; + } + *(_DWORD *)(v2 + 256) = v85; + *(_BYTE *)(v2 + v88) = i26; + *(_BYTE *)(v2 + 260) = i26; + if ( v86 == "" ) + break; + } + goto LABEL_9; + case 0x4A: + v80 = *(_DWORD *)(result + 256); + v81 = "on-transaction clone for "; + for ( i27 = 110; ; i27 = *v81++ ) + { + if ( v80 == 255 ) + { + v84 = *(_DWORD *)(v2 + 268); + v416 = i27; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v84); + ++*(_DWORD *)(v2 + 296); + i27 = v416; + v83 = 0; + v80 = 1; + } + else + { + v83 = v80++; + } + *(_DWORD *)(v2 + 256) = v80; + *(_BYTE *)(v2 + v83) = i27; + *(_BYTE *)(v2 + 260) = i27; + if ( v81 == "" ) + break; + } + goto LABEL_9; + case 0x4B: + v74 = d_find_pack(result, *(_DWORD **)(a2 + 12), 0); + if ( !v74 ) + { + d_print_subexpr(v2, (_DWORD *)v5[3]); + v391 = "..."; + return d_append_string(v2, v391); + } + while ( *v74 == 47 && v74[3] ) + { + v74 = (_DWORD *)v74[4]; + if ( !v74 ) + { + v465 = v75; + v462 = v75 + 1; + v464 = (FILE *)v5[3]; + do + { +LABEL_135: + *(_DWORD *)(v2 + 292) = v3; + result = d_print_comp(v2, (int)v464); + if ( v465 > v3 ) + { + result = *(_DWORD *)(v2 + 256); + v76 = ", "; + for ( i28 = 44; ; i28 = *v76 ) + { + if ( result == 255 ) + { + v79 = *(_DWORD *)(v2 + 268); + v415 = i28; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v79); + ++*(_DWORD *)(v2 + 296); + i28 = v415; + v78 = 0; + result = 1; + } + else + { + v78 = result++; + } + ++v76; + *(_DWORD *)(v2 + 256) = result; + *(_BYTE *)(v2 + v78) = i28; + *(_BYTE *)(v2 + 260) = i28; + if ( "" == v76 ) + break; + } + } + ++v3; + } + while ( v3 < v462 ); + return result; + } + ++v75; + } + result = v5[3]; + v462 = v75; + v464 = (FILE *)result; + if ( !v75 ) + return result; + v465 = v75 - 1; + goto LABEL_135; + case 0x4C: + v69 = "[abi:"; + d_print_comp(result, *(_DWORD *)(a2 + 12)); + v70 = *(_DWORD *)(v2 + 256); + for ( i29 = 91; ; i29 = *v69 ) + { + if ( v70 == 255 ) + { + v73 = *(_DWORD *)(v2 + 268); + v414 = i29; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v73); + ++*(_DWORD *)(v2 + 296); + i29 = v414; + v72 = 0; + v70 = 1; + } + else + { + v72 = v70++; + } + ++v69; + *(_DWORD *)(v2 + 256) = v70; + *(_BYTE *)(v2 + v72) = i29; + *(_BYTE *)(v2 + 260) = i29; + if ( v69 == "" ) + break; + } + goto LABEL_394; + case 0x4E: + v122 = "[clone "; + d_print_comp(result, *(_DWORD *)(a2 + 12)); + v123 = *(_DWORD *)(v2 + 256); + for ( i30 = 32; ; i30 = *v122++ ) + { + if ( v123 == 255 ) + { + v126 = *(_DWORD *)(v2 + 268); + v424 = i30; + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v126); + ++*(_DWORD *)(v2 + 296); + i30 = v424; + v125 = 0; + v123 = 1; + } + else + { + v125 = v123++; + } + *(_DWORD *)(v2 + 256) = v123; + *(_BYTE *)(v2 + v125) = i30; + *(_BYTE *)(v2 + 260) = i30; + if ( v122 == "" ) + break; + } +LABEL_394: + d_print_comp(v2, v5[4]); + result = *(_DWORD *)(v2 + 256); + if ( result == 255 ) + { + v350 = *(_DWORD *)(v2 + 268); + *(_BYTE *)(v2 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(v2 + 264))(v2, 255, v350); + ++*(_DWORD *)(v2 + 296); + v273 = 1; + result = 0; + } + else + { + v273 = result + 1; + } + *(_DWORD *)(v2 + 256) = v273; + *(_BYTE *)(v2 + result) = 93; + *(_BYTE *)(v2 + 260) = 93; + return result; + default: + goto LABEL_7; + } + do + { + if ( result == *v375 ) + { + v377 = *(_DWORD **)(v2 + 300); + v378 = v377; + if ( !v377 ) + { +LABEL_606: + v394 = *(_DWORD *)(v2 + 272); + *(_DWORD *)(v2 + 272) = v375[1]; + v460 = v394; + v3 = 1; + result = (unsigned int)d_lookup_template_argument(v2, result); + if ( !result ) + goto LABEL_607; +LABEL_578: + v18 = *(_DWORD *)result; + if ( *(_DWORD *)result == 47 ) + { + v379 = *(_DWORD *)(v2 + 292); + if ( v379 < 0 ) + { + v405 = *(char **)(v2 + 276); + if ( *v5 != 47 ) + goto LABEL_36; + goto LABEL_463; + } + result = (unsigned int)d_index_template_argument_part_0((_DWORD *)result, v379); + if ( !result ) + { + if ( !v3 ) + goto LABEL_7; +LABEL_607: + result = v460; + *(_DWORD *)(v2 + 272) = v460; + goto LABEL_7; + } + v18 = *(_DWORD *)result; + } +LABEL_33: + v405 = *(char **)(v2 + 276); + if ( v18 != 35 && *v5 != v18 ) + { + if ( v18 == 36 ) + { + v13 = *(_DWORD *)(result + 12); + Str[0]._cnt = (int)v5; + Str[0]._base = 0; + Str[0]._ptr = v405; + *(_DWORD *)(v2 + 276) = Str; + Str[0]._flag = *(_DWORD *)(v2 + 272); + if ( v13 ) + goto LABEL_18; + goto LABEL_17; + } +LABEL_36: + v11 = v405; +LABEL_16: + Str[0]._ptr = v11; + *(_DWORD *)(v2 + 276) = Str; + v12 = *(_DWORD *)(v2 + 272); + Str[0]._cnt = (int)v5; + Str[0]._base = 0; + Str[0]._flag = v12; +LABEL_17: + v13 = v5[3]; +LABEL_18: + d_print_comp(v2, v13); + if ( !Str[0]._base ) + d_print_mod(v2, v5); + result = (unsigned int)Str[0]._ptr; + *(_DWORD *)(v2 + 276) = Str[0]._ptr; + if ( v3 ) + { + result = v460; + *(_DWORD *)(v2 + 272) = v460; + } + return result; + } +LABEL_463: + v5 = (_DWORD *)result; + goto LABEL_36; + } + while ( *v378 != result && (v377 == v378 || (_DWORD *)*v378 != v5) ) + { + v378 = (_DWORD *)v378[1]; + if ( !v378 ) + goto LABEL_606; + } +LABEL_577: + v3 = 0; + result = (unsigned int)d_lookup_template_argument(v2, result); + if ( !result ) + goto LABEL_7; + goto LABEL_578; + } + ++v376; + v375 += 2; + } + while ( v376 != v374 ); +LABEL_621: + if ( *(_DWORD *)(v2 + 312) <= v374 ) + goto LABEL_7; + v398 = *(_DWORD **)(v2 + 272); + v399 = *(_DWORD *)(v2 + 304) + 8 * v374; + *(_DWORD *)(v2 + 308) = v374 + 1; + v400 = (int *)(v399 + 4); + *(v400 - 1) = result; + if ( !v398 ) + { +LABEL_630: + *v400 = 0; + goto LABEL_577; + } + v401 = *(_DWORD *)(v2 + 320); + v464 = (FILE *)result; + v459 = *(_DWORD *)(v2 + 324); + while ( v459 > v401 ) + { + result = v398[1]; + v402 = *(_DWORD *)(v2 + 316) + 8 * v401++; + *(_DWORD *)(v2 + 320) = v401; + *(_DWORD *)(v402 + 4) = result; + *v400 = v402; + v398 = (_DWORD *)*v398; + v400 = (int *)v402; + if ( !v398 ) + { + result = (unsigned int)v464; + goto LABEL_630; + } + } +LABEL_7: + *(_DWORD *)(v2 + 280) = 1; + return result; +} +// 430443: conditional instruction was optimized away because eax.4==73 +// 42DCBF: variable 'v460' is possibly undefined +// 42E470: variable 'v75' is possibly undefined +// 4303BA: variable 'v358' is possibly undefined +// 4304AE: variable 'v363' is possibly undefined +// 513197: using guessed type void *off_513197; +// 513FC0: using guessed type void **off_513FC0; + +//----- (00430D00) -------------------------------------------------------- +int __usercall d_print_comp@(int result@, int a2@) +{ + _DWORD *v2; // esi + int v4; // edx + int v5; // eax + int v6; // [esp+8h] [ebp-14h] BYREF + int v7; // [esp+Ch] [ebp-10h] + + v2 = (_DWORD *)result; + if ( a2 && (result = *(_DWORD *)(a2 + 4), result <= 1) && (v4 = v2[71], v4 <= 1024) ) + { + v6 = a2; + *(_DWORD *)(a2 + 4) = result + 1; + v5 = v2[75]; + v2[71] = v4 + 1; + v7 = v5; + v2[75] = &v6; + d_print_comp_inner((unsigned int)v2, a2); + result = v7; + v2[75] = v7; + --*(_DWORD *)(a2 + 4); + --v2[71]; + } + else + { + v2[70] = 1; + } + return result; +} + +//----- (00430D90) -------------------------------------------------------- +int __usercall d_print_mod@(int a1@, _DWORD *a2@) +{ + _DWORD *v2; // esi + int result; // eax + const char *v5; // esi + char i; // dl + int v7; // ecx + int v8; // eax + const char *v9; // esi + char j; // dl + int v11; // ecx + int v12; // eax + const char *v13; // esi + char k; // dl + int v15; // ecx + int v16; // eax + const char *v17; // edi + char i1; // dl + int v19; // ecx + int v20; // eax + int v21; // edx + int v22; // edx + int v23; // eax + int v24; // edx + int v25; // edx + const char *v26; // esi + char m; // dl + int v28; // ecx + int v29; // eax + const char *v30; // esi + char n; // dl + int v32; // ecx + int v33; // eax + const char *v34; // esi + char ii; // dl + int v36; // ecx + int v37; // eax + int v38; // ecx + const char *v39; // esi + char jj; // dl + int v41; // ecx + int v42; // eax + int v43; // eax + const char *v44; // edi + char kk; // dl + int v46; // ecx + int v47; // eax + const char *v48; // esi + char mm; // dl + int v50; // ecx + int v51; // eax + const char *v52; // edi + char nn; // dl + int v54; // ecx + int v55; // eax + int v56; // ecx + int v57; // edx + int v58; // edx + int v59; // eax + int v60; // edx + int v61; // edx + int v62; // eax + int v63; // eax + int v64; // eax + int v65; // eax + int v66; // eax + int v67; // eax + int v68; // eax + int v69; // eax + char v70; // [esp+1Fh] [ebp-1Dh] + char v71; // [esp+1Fh] [ebp-1Dh] + char v72; // [esp+1Fh] [ebp-1Dh] + char v73; // [esp+1Fh] [ebp-1Dh] + char v74; // [esp+1Fh] [ebp-1Dh] + char v75; // [esp+1Fh] [ebp-1Dh] + char v76; // [esp+1Fh] [ebp-1Dh] + char v77; // [esp+1Fh] [ebp-1Dh] + char v78; // [esp+1Fh] [ebp-1Dh] + char v79; // [esp+1Fh] [ebp-1Dh] + char v80; // [esp+1Fh] [ebp-1Dh] + + v2 = a2; + switch ( *a2 ) + { + case 3: + a2 = (_DWORD *)a2[3]; + return d_print_comp(a1, (int)a2); + case 0x19: + case 0x1C: + result = *(_DWORD *)(a1 + 256); + v5 = "restrict"; + for ( i = 32; ; i = *v5++ ) + { + if ( result == 255 ) + { + v8 = *(_DWORD *)(a1 + 268); + v70 = i; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v8); + ++*(_DWORD *)(a1 + 296); + i = v70; + v7 = 0; + result = 1; + } + else + { + v7 = result++; + } + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v7) = i; + *(_BYTE *)(a1 + 260) = i; + if ( v5 == "" ) + break; + } + return result; + case 0x1A: + case 0x1D: + result = *(_DWORD *)(a1 + 256); + v9 = "volatile"; + for ( j = 32; ; j = *v9++ ) + { + if ( result == 255 ) + { + v12 = *(_DWORD *)(a1 + 268); + v71 = j; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v12); + ++*(_DWORD *)(a1 + 296); + j = v71; + v11 = 0; + result = 1; + } + else + { + v11 = result++; + } + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v11) = j; + *(_BYTE *)(a1 + 260) = j; + if ( v9 == "" ) + break; + } + return result; + case 0x1B: + case 0x1E: + result = *(_DWORD *)(a1 + 256); + v13 = "const"; + for ( k = 32; ; k = *v13++ ) + { + if ( result == 255 ) + { + v16 = *(_DWORD *)(a1 + 268); + v72 = k; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v16); + ++*(_DWORD *)(a1 + 296); + k = v72; + v15 = 0; + result = 1; + } + else + { + v15 = result++; + } + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v15) = k; + *(_BYTE *)(a1 + 260) = k; + if ( v13 == "" ) + break; + } + return result; + case 0x1F: + v21 = *(_DWORD *)(a1 + 256); + if ( v21 == 255 ) + { + v65 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v65); + *(_BYTE *)a1 = 32; + result = 1; + ++*(_DWORD *)(a1 + 296); +LABEL_38: + v25 = result + 1; + goto LABEL_39; + } + result = v21 + 1; + *(_DWORD *)(a1 + 256) = v21 + 1; + *(_BYTE *)(a1 + v21) = 32; + *(_BYTE *)(a1 + 260) = 32; +LABEL_37: + if ( result != 255 ) + goto LABEL_38; + v67 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v67); + ++*(_DWORD *)(a1 + 296); + v25 = 1; + result = 0; +LABEL_39: + *(_DWORD *)(a1 + 256) = v25; + *(_BYTE *)(a1 + result) = 38; + *(_BYTE *)(a1 + 260) = 38; + return result; + case 0x20: + v22 = *(_DWORD *)(a1 + 256); + if ( v22 == 255 ) + { + v64 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v64); + ++*(_DWORD *)(a1 + 296); + result = 1; + v22 = 0; + } + else + { + result = v22 + 1; + } + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v22) = 32; + *(_BYTE *)(a1 + 260) = 32; + goto LABEL_42; + case 0x21: + v23 = *(_DWORD *)(a1 + 256); + if ( v23 == 255 ) + { + v63 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v63); + ++*(_DWORD *)(a1 + 296); + v24 = 1; + v23 = 0; + } + else + { + v24 = v23 + 1; + } + *(_DWORD *)(a1 + 256) = v24; + *(_BYTE *)(a1 + v23) = 32; + *(_BYTE *)(a1 + 260) = 32; + a2 = (_DWORD *)v2[4]; + return d_print_comp(a1, (int)a2); + case 0x22: + result = *(_DWORD *)(a1 + 256); + if ( result == 255 ) + { + v69 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v69); + ++*(_DWORD *)(a1 + 296); + v61 = 1; + result = 0; + } + else + { + v61 = result + 1; + } + *(_DWORD *)(a1 + 256) = v61; + *(_BYTE *)(a1 + result) = 42; + *(_BYTE *)(a1 + 260) = 42; + return result; + case 0x23: + result = *(_DWORD *)(a1 + 256); + goto LABEL_37; + case 0x24: + result = *(_DWORD *)(a1 + 256); +LABEL_42: + v26 = "&&"; + for ( m = 38; ; m = *v26 ) + { + if ( result == 255 ) + { + v29 = *(_DWORD *)(a1 + 268); + v74 = m; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v29); + ++*(_DWORD *)(a1 + 296); + m = v74; + v28 = 0; + result = 1; + } + else + { + v28 = result++; + } + ++v26; + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v28) = m; + *(_BYTE *)(a1 + 260) = m; + if ( v26 == "" ) + break; + } + return result; + case 0x25: + result = *(_DWORD *)(a1 + 256); + v30 = "_Complex"; + for ( n = 32; ; n = *v30++ ) + { + if ( result == 255 ) + { + v33 = *(_DWORD *)(a1 + 268); + v75 = n; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v33); + ++*(_DWORD *)(a1 + 296); + n = v75; + v32 = 0; + result = 1; + } + else + { + v32 = result++; + } + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v32) = n; + *(_BYTE *)(a1 + 260) = n; + if ( v30 == "" ) + break; + } + return result; + case 0x26: + result = *(_DWORD *)(a1 + 256); + v34 = "_Imaginary"; + for ( ii = 32; ; ii = *v34++ ) + { + if ( result == 255 ) + { + v37 = *(_DWORD *)(a1 + 268); + v76 = ii; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v37); + ++*(_DWORD *)(a1 + 296); + ii = v76; + v36 = 0; + result = 1; + } + else + { + v36 = result++; + } + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v36) = ii; + *(_BYTE *)(a1 + 260) = ii; + if ( v34 == "" ) + break; + } + return result; + case 0x2B: + if ( *(_BYTE *)(a1 + 260) != 40 ) + { + v59 = *(_DWORD *)(a1 + 256); + if ( v59 == 255 ) + { + v68 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v68); + ++*(_DWORD *)(a1 + 296); + v60 = 1; + v59 = 0; + } + else + { + v60 = v59 + 1; + } + *(_DWORD *)(a1 + 256) = v60; + *(_BYTE *)(a1 + v59) = 32; + *(_BYTE *)(a1 + 260) = 32; + } + v38 = v2[3]; + v39 = "::*"; + d_print_comp(a1, v38); + result = *(_DWORD *)(a1 + 256); + for ( jj = 58; ; jj = *v39 ) + { + if ( result == 255 ) + { + v42 = *(_DWORD *)(a1 + 268); + v77 = jj; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v42); + ++*(_DWORD *)(a1 + 296); + jj = v77; + v41 = 0; + result = 1; + } + else + { + v41 = result++; + } + ++v39; + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v41) = jj; + *(_BYTE *)(a1 + 260) = jj; + if ( v39 == "" ) + break; + } + return result; + case 0x2D: + v43 = *(_DWORD *)(a1 + 256); + v44 = "__vector("; + for ( kk = 32; ; kk = *v44++ ) + { + if ( v43 == 255 ) + { + v47 = *(_DWORD *)(a1 + 268); + v78 = kk; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v47); + ++*(_DWORD *)(a1 + 296); + kk = v78; + v46 = 0; + v43 = 1; + } + else + { + v46 = v43++; + } + *(_DWORD *)(a1 + 256) = v43; + *(_BYTE *)(a1 + v46) = kk; + *(_BYTE *)(a1 + 260) = kk; + if ( v44 == "" ) + break; + } + v56 = v2[3]; + goto LABEL_90; + case 0x4D: + result = *(_DWORD *)(a1 + 256); + v48 = "transaction_safe"; + for ( mm = 32; ; mm = *v48++ ) + { + if ( result == 255 ) + { + v51 = *(_DWORD *)(a1 + 268); + v79 = mm; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v51); + ++*(_DWORD *)(a1 + 296); + mm = v79; + v50 = 0; + result = 1; + } + else + { + v50 = result++; + } + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v50) = mm; + *(_BYTE *)(a1 + 260) = mm; + if ( v48 == "" ) + break; + } + return result; + case 0x4F: + result = *(_DWORD *)(a1 + 256); + v52 = "noexcept"; + for ( nn = 32; ; nn = *v52++ ) + { + if ( result == 255 ) + { + v55 = *(_DWORD *)(a1 + 268); + v80 = nn; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v55); + ++*(_DWORD *)(a1 + 296); + nn = v80; + v54 = 0; + result = 1; + } + else + { + v54 = result++; + } + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v54) = nn; + *(_BYTE *)(a1 + 260) = nn; + if ( v52 == "" ) + break; + } + goto LABEL_85; + case 0x50: + result = *(_DWORD *)(a1 + 256); + v17 = "throw"; + for ( i1 = 32; ; i1 = *v17++ ) + { + if ( result == 255 ) + { + v20 = *(_DWORD *)(a1 + 268); + v73 = i1; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v20); + ++*(_DWORD *)(a1 + 296); + i1 = v73; + v19 = 0; + result = 1; + } + else + { + v19 = result++; + } + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v19) = i1; + *(_BYTE *)(a1 + 260) = i1; + if ( v17 == "" ) + break; + } +LABEL_85: + v56 = v2[4]; + if ( v56 ) + { + if ( result == 255 ) + { + v62 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v62); + v56 = v2[4]; + v57 = 1; + result = 0; + ++*(_DWORD *)(a1 + 296); + } + else + { + v57 = result + 1; + } + *(_DWORD *)(a1 + 256) = v57; + *(_BYTE *)(a1 + result) = 40; + *(_BYTE *)(a1 + 260) = 40; +LABEL_90: + d_print_comp(a1, v56); + result = *(_DWORD *)(a1 + 256); + if ( result == 255 ) + { + v66 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v66); + ++*(_DWORD *)(a1 + 296); + v58 = 1; + result = 0; + } + else + { + v58 = result + 1; + } + *(_DWORD *)(a1 + 256) = v58; + *(_BYTE *)(a1 + result) = 41; + *(_BYTE *)(a1 + 260) = 41; + } + return result; + default: + return d_print_comp(a1, (int)a2); + } +} + +//----- (004316F0) -------------------------------------------------------- +unsigned int __usercall d_print_function_type@(unsigned int a1@, int a2@, int **a3) +{ + int **v5; // edx + char v6; // dl + int v7; // eax + int v8; // edx + int v9; // ebp + int v10; // eax + int v11; // edx + int v12; // eax + int v13; // ecx + int v14; // edx + unsigned int result; // eax + int v16; // eax + int v17; // eax + int v18; // eax + int v19; // eax + int v20; // eax + + if ( !a3 ) + goto LABEL_17; + v5 = a3; + while ( 2 ) + { + if ( v5[2] ) + { +LABEL_17: + v9 = *(_DWORD *)(a1 + 276); + *(_DWORD *)(a1 + 276) = 0; + d_print_mod_list(a1, a3, 0); + v11 = *(_DWORD *)(a1 + 256); + if ( v11 != 255 ) + { +LABEL_11: + v12 = v11 + 1; + *(_DWORD *)(a1 + 256) = v11 + 1; + *(_BYTE *)(a1 + v11) = 40; + *(_BYTE *)(a1 + 260) = 40; + v13 = *(_DWORD *)(a2 + 16); + if ( !v13 ) + goto LABEL_13; + goto LABEL_12; + } + goto LABEL_18; + } + switch ( *v5[1] ) + { + case 25: + case 26: + case 27: + case 33: + case 37: + case 38: + case 43: + v6 = *(_BYTE *)(a1 + 260); + v7 = *(_DWORD *)(a1 + 256); + goto LABEL_6; + case 34: + case 35: + case 36: + v6 = *(_BYTE *)(a1 + 260); + v7 = *(_DWORD *)(a1 + 256); + if ( (*(_BYTE *)(a1 + 260) & 0xFD) == 40 ) + { + if ( v7 == 255 ) + goto LABEL_22; + goto LABEL_8; + } +LABEL_6: + if ( v6 != 32 ) + { + if ( v7 == 255 ) + { + v20 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v20); + *(_BYTE *)a1 = 32; + v7 = 1; + ++*(_DWORD *)(a1 + 296); + goto LABEL_8; + } + *(_DWORD *)(a1 + 256) = v7 + 1; + *(_BYTE *)(a1 + v7++) = 32; + *(_BYTE *)(a1 + 260) = 32; + } + if ( v7 != 255 ) + { +LABEL_8: + v8 = v7 + 1; + goto LABEL_9; + } +LABEL_22: + v17 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v17); + ++*(_DWORD *)(a1 + 296); + v8 = 1; + v7 = 0; +LABEL_9: + *(_DWORD *)(a1 + 256) = v8; + *(_BYTE *)(a1 + v7) = 40; + v9 = *(_DWORD *)(a1 + 276); + *(_BYTE *)(a1 + 260) = 40; + *(_DWORD *)(a1 + 276) = 0; + d_print_mod_list(a1, a3, 0); + v10 = *(_DWORD *)(a1 + 256); + if ( v10 != 255 ) + { + v11 = v10 + 1; + *(_DWORD *)(a1 + 256) = v10 + 1; + *(_BYTE *)(a1 + v10) = 41; + *(_BYTE *)(a1 + 260) = 41; + if ( v10 != 254 ) + goto LABEL_11; +LABEL_18: + v16 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v16); + *(_BYTE *)a1 = 40; + *(_BYTE *)(a1 + 260) = 40; + v13 = *(_DWORD *)(a2 + 16); + ++*(_DWORD *)(a1 + 296); + *(_DWORD *)(a1 + 256) = 1; + if ( !v13 ) + { + v12 = 1; + goto LABEL_14; + } + goto LABEL_12; + } + v19 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v19); + *(_BYTE *)(a1 + 260) = 40; + *(_WORD *)a1 = 10281; + v13 = *(_DWORD *)(a2 + 16); + v12 = 2; + ++*(_DWORD *)(a1 + 296); + *(_DWORD *)(a1 + 256) = 2; + if ( !v13 ) + goto LABEL_14; +LABEL_12: + d_print_comp(a1, v13); + v12 = *(_DWORD *)(a1 + 256); +LABEL_13: + if ( v12 == 255 ) + { + v18 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v18); + ++*(_DWORD *)(a1 + 296); + v14 = 1; + v12 = 0; + goto LABEL_15; + } +LABEL_14: + v14 = v12 + 1; +LABEL_15: + *(_DWORD *)(a1 + 256) = v14; + *(_BYTE *)(a1 + v12) = 41; + *(_BYTE *)(a1 + 260) = 41; + result = d_print_mod_list(a1, a3, 1); + *(_DWORD *)(a1 + 276) = v9; + return result; + default: + v5 = (int **)*v5; + if ( !v5 ) + goto LABEL_17; + continue; + } + } +} + +//----- (00431A30) -------------------------------------------------------- +unsigned int __usercall d_print_mod_list@(unsigned int result@, int **a2@, int a3) +{ + int **v3; // edi + unsigned int v4; // ebx + int *v5; // edx + int v6; // esi + unsigned int *v7; // ecx + bool v8; // cf + int *v9; // eax + int v10; // ebp + int v11; // ecx + int v12; // eax + const char *v13; // ebp + char i; // dl + int v15; // ecx + int v16; // eax + unsigned int *v17; // ebp + unsigned int v18; // edx + char *v19; // edi + char j; // dl + int v21; // ecx + int v22; // eax + FILE *p_Str; // edi + size_t v24; // edx + int v25; // eax + FILE *v26; // esi + int v27; // ecx + char ptr; // dl + int v29; // eax + const char *v30; // edi + char k; // dl + int v32; // ecx + int v33; // eax + char v34; // [esp+1Bh] [ebp-41h] + char v35; // [esp+1Bh] [ebp-41h] + char v36; // [esp+1Bh] [ebp-41h] + char v37; // [esp+1Bh] [ebp-41h] + int v38; // [esp+1Ch] [ebp-40h] + FILE Str; // [esp+27h] [ebp-35h] BYREF + + v3 = a2; + v4 = result; + if ( a2 ) + { + while ( 1 ) + { + if ( *(_DWORD *)(v4 + 280) ) + return result; + result = (unsigned int)v3[2]; + if ( !result ) + break; +LABEL_7: + v3 = (int **)*v3; + if ( !v3 ) + return result; + } + v7 = (unsigned int *)v3[1]; + result = *v7; + if ( !a3 ) + { + if ( result == 77 ) + goto LABEL_7; + if ( result > 0x4D ) + { + v8 = result == 79; + result -= 79; + if ( v8 || result == 1 ) + goto LABEL_7; + v9 = v3[3]; + v6 = *(_DWORD *)(v4 + 272); + v3[2] = (int *)1; + *(_DWORD *)(v4 + 272) = v9; + goto LABEL_6; + } + if ( result - 28 <= 4 ) + goto LABEL_7; + } + v5 = v3[3]; + v6 = *(_DWORD *)(v4 + 272); + v3[2] = (int *)1; + *(_DWORD *)(v4 + 272) = v5; + switch ( result ) + { + case 0x29u: + result = d_print_function_type(v4, (int)v7, *v3); + *(_DWORD *)(v4 + 272) = v6; + return result; + case 0x2Au: + result = d_print_array_type(v4, (int)v7, (int **)*v3); + *(_DWORD *)(v4 + 272) = v6; + return result; + case 2u: + v10 = *(_DWORD *)(v4 + 276); + v11 = v7[3]; + *(_DWORD *)(v4 + 276) = 0; + d_print_comp(v4, v11); + *(_DWORD *)(v4 + 276) = v10; + v12 = *(_DWORD *)(v4 + 256); + v13 = "::"; + for ( i = 58; ; i = *v13 ) + { + if ( v12 == 255 ) + { + v16 = *(_DWORD *)(v4 + 268); + *(_BYTE *)(v4 + 255) = 0; + v34 = i; + (*(void (__cdecl **)(unsigned int, int, int))(v4 + 264))(v4, 255, v16); + ++*(_DWORD *)(v4 + 296); + i = v34; + v15 = 0; + v12 = 1; + } + else + { + v15 = v12++; + } + ++v13; + *(_DWORD *)(v4 + 256) = v12; + *(_BYTE *)(v4 + v15) = i; + *(_BYTE *)(v4 + 260) = i; + if ( v13 == "" ) + break; + } + v17 = (unsigned int *)v3[1][4]; + v18 = *v17; + if ( *v17 == 71 ) + { + v19 = "{default arg#" + 1; + for ( j = 123; ; j = *v19++ ) + { + if ( v12 == 255 ) + { + v22 = *(_DWORD *)(v4 + 268); + *(_BYTE *)(v4 + 255) = 0; + v35 = j; + (*(void (__cdecl **)(unsigned int, int, int))(v4 + 264))(v4, 255, v22); + ++*(_DWORD *)(v4 + 296); + j = v35; + v21 = 0; + v12 = 1; + } + else + { + v21 = v12++; + } + *(_DWORD *)(v4 + 256) = v12; + *(_BYTE *)(v4 + v21) = j; + *(_BYTE *)(v4 + 260) = j; + if ( v19 == "" ) + break; + } + p_Str = &Str; + sprintf_constprop_0(&Str, (int)"%d", v17[4] + 1); + v24 = strlen((const char *)&Str); + v25 = *(_DWORD *)(v4 + 256); + if ( v24 ) + { + v38 = v6; + v26 = (FILE *)((char *)&Str + v24); + do + { + ptr = (char)p_Str->_ptr; + if ( v25 == 255 ) + { + v29 = *(_DWORD *)(v4 + 268); + *(_BYTE *)(v4 + 255) = 0; + v36 = ptr; + (*(void (__cdecl **)(unsigned int, int, int))(v4 + 264))(v4, 255, v29); + ++*(_DWORD *)(v4 + 296); + ptr = v36; + v27 = 0; + v25 = 1; + } + else + { + v27 = v25++; + } + p_Str = (FILE *)((char *)p_Str + 1); + *(_DWORD *)(v4 + 256) = v25; + *(_BYTE *)(v4 + v27) = ptr; + *(_BYTE *)(v4 + 260) = ptr; + } + while ( p_Str != v26 ); + v6 = v38; + } + v30 = "}::"; + for ( k = 125; ; k = *v30 ) + { + if ( v25 == 255 ) + { + v33 = *(_DWORD *)(v4 + 268); + *(_BYTE *)(v4 + 255) = 0; + v37 = k; + (*(void (__cdecl **)(unsigned int, int, int))(v4 + 264))(v4, 255, v33); + ++*(_DWORD *)(v4 + 296); + k = v37; + v32 = 0; + v25 = 1; + } + else + { + v32 = v25++; + } + *(_DWORD *)(v4 + 256) = v25; + ++v30; + *(_BYTE *)(v4 + v32) = k; + *(_BYTE *)(v4 + 260) = k; + if ( v30 == "" ) + break; + } + goto LABEL_32; + } + while ( 1 ) + { + if ( v18 != 77 ) + { + if ( v18 > 0x4D ) + { + if ( v18 - 79 > 1 ) + { +LABEL_30: + result = d_print_comp(v4, (int)v17); + *(_DWORD *)(v4 + 272) = v6; + return result; + } + } + else if ( v18 - 28 > 4 ) + { + goto LABEL_30; + } + } +LABEL_32: + v17 = (unsigned int *)v17[3]; + v18 = *v17; + } + } +LABEL_6: + result = d_print_mod(v4, v7); + *(_DWORD *)(v4 + 272) = v6; + goto LABEL_7; + } + return result; +} +// 431A30: using guessed type FILE var_35; + +//----- (00431D90) -------------------------------------------------------- +int __usercall d_print_array_type@(unsigned int a1@, int a2@, int **a3) +{ + int **v5; // eax + int v6; // eax + int v7; // edx + int result; // eax + int v9; // ecx + int v10; // edx + int v11; // eax + int v12; // eax + int v13; // eax + char *v14; // esi + char i; // dl + int v16; // ecx + int v17; // eax + int v18; // edx + int v19; // eax + int v20; // eax + char v21; // [esp+1Fh] [ebp-1Dh] + + v5 = a3; + if ( !a3 ) + { +LABEL_5: + v6 = *(_DWORD *)(a1 + 256); + if ( v6 == 255 ) + goto LABEL_25; +LABEL_6: + v7 = v6 + 1; + *(_DWORD *)(a1 + 256) = v6 + 1; + *(_BYTE *)(a1 + v6) = 32; + *(_BYTE *)(a1 + 260) = 32; + if ( v6 == 254 ) + goto LABEL_14; + goto LABEL_7; + } + while ( v5[2] ) + { + v5 = (int **)*v5; + if ( !v5 ) + { + d_print_mod_list(a1, a3, 0); + goto LABEL_5; + } + } + if ( *v5[1] == 42 ) + { + d_print_mod_list(a1, a3, 0); + v7 = *(_DWORD *)(a1 + 256); + if ( v7 == 255 ) + { +LABEL_14: + v11 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v11); + *(_BYTE *)a1 = 91; + *(_BYTE *)(a1 + 260) = 91; + v9 = *(_DWORD *)(a2 + 12); + ++*(_DWORD *)(a1 + 296); + *(_DWORD *)(a1 + 256) = 1; + if ( !v9 ) + { + result = 1; + goto LABEL_10; + } + goto LABEL_8; + } +LABEL_7: + result = v7 + 1; + *(_DWORD *)(a1 + 256) = v7 + 1; + *(_BYTE *)(a1 + v7) = 91; + *(_BYTE *)(a1 + 260) = 91; + v9 = *(_DWORD *)(a2 + 12); + if ( !v9 ) + goto LABEL_9; + goto LABEL_8; + } + v13 = *(_DWORD *)(a1 + 256); + v14 = (char *)&unk_513574; + for ( i = 32; ; i = *v14 ) + { + if ( v13 == 255 ) + { + v17 = *(_DWORD *)(a1 + 268); + v21 = i; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v17); + ++*(_DWORD *)(a1 + 296); + i = v21; + v16 = 0; + v13 = 1; + } + else + { + v16 = v13++; + } + *(_DWORD *)(a1 + 256) = v13; + ++v14; + *(_BYTE *)(a1 + v16) = i; + *(_BYTE *)(a1 + 260) = i; + if ( &unk_513576 == (_UNKNOWN *)v14 ) + break; + } + d_print_mod_list(a1, a3, 0); + v18 = *(_DWORD *)(a1 + 256); + if ( v18 == 255 ) + { + v20 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v20); + *(_BYTE *)a1 = 41; + v6 = 1; + ++*(_DWORD *)(a1 + 296); + goto LABEL_6; + } + v6 = v18 + 1; + *(_DWORD *)(a1 + 256) = v18 + 1; + *(_BYTE *)(a1 + v18) = 41; + *(_BYTE *)(a1 + 260) = 41; + if ( v18 != 254 ) + goto LABEL_6; +LABEL_25: + v19 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v19); + *(_BYTE *)(a1 + 260) = 91; + *(_WORD *)a1 = 23328; + v9 = *(_DWORD *)(a2 + 12); + result = 2; + ++*(_DWORD *)(a1 + 296); + *(_DWORD *)(a1 + 256) = 2; + if ( !v9 ) + goto LABEL_10; +LABEL_8: + d_print_comp(a1, v9); + result = *(_DWORD *)(a1 + 256); +LABEL_9: + if ( result == 255 ) + { + v12 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v12); + ++*(_DWORD *)(a1 + 296); + v10 = 1; + result = 0; + goto LABEL_11; + } +LABEL_10: + v10 = result + 1; +LABEL_11: + *(_DWORD *)(a1 + 256) = v10; + *(_BYTE *)(a1 + result) = 93; + *(_BYTE *)(a1 + 260) = 93; + return result; +} + +//----- (00432070) -------------------------------------------------------- +int __usercall d_print_conversion@(int a1@, int a2@) +{ + int v4; // eax + int v5; // edx + _DWORD *v6; // ecx + int result; // eax + int v8; // eax + int v9; // edx + int v10; // edx + int v11; // eax + int v12; // edx + int v13; // eax + int v14; // eax + int v15; // eax + int v16[5]; // [esp+18h] [ebp-14h] BYREF + + v4 = *(_DWORD *)(a1 + 328); + if ( v4 ) + { + v5 = *(_DWORD *)(a1 + 272); + v16[1] = v4; + v16[0] = v5; + *(_DWORD *)(a1 + 272) = v16; + } + v6 = *(_DWORD **)(a2 + 12); + if ( *v6 == 4 ) + { + d_print_comp(a1, v6[3]); + if ( *(_DWORD *)(a1 + 328) ) + *(_DWORD *)(a1 + 272) = v16[0]; + v8 = *(_DWORD *)(a1 + 256); + if ( *(_BYTE *)(a1 + 260) == 60 ) + { + if ( v8 == 255 ) + { + v14 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v14); + *(_BYTE *)a1 = 32; + v8 = 1; + ++*(_DWORD *)(a1 + 296); + goto LABEL_11; + } + *(_DWORD *)(a1 + 256) = v8 + 1; + *(_BYTE *)(a1 + v8++) = 32; + *(_BYTE *)(a1 + 260) = 32; + } + if ( v8 == 255 ) + { + v13 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v13); + ++*(_DWORD *)(a1 + 296); + v9 = 1; + v8 = 0; +LABEL_12: + *(_DWORD *)(a1 + 256) = v9; + *(_BYTE *)(a1 + v8) = 60; + *(_BYTE *)(a1 + 260) = 60; + d_print_comp(a1, *(_DWORD *)(*(_DWORD *)(a2 + 12) + 16)); + if ( *(_BYTE *)(a1 + 260) == 62 ) + { + v12 = *(_DWORD *)(a1 + 256); + if ( v12 == 255 ) + { + v15 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v15); + *(_BYTE *)a1 = 32; + result = 1; + ++*(_DWORD *)(a1 + 296); + goto LABEL_15; + } + result = v12 + 1; + *(_DWORD *)(a1 + 256) = v12 + 1; + *(_BYTE *)(a1 + v12) = 32; + *(_BYTE *)(a1 + 260) = 32; + } + else + { + result = *(_DWORD *)(a1 + 256); + } + if ( result == 255 ) + { + v11 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v11); + ++*(_DWORD *)(a1 + 296); + v10 = 1; + result = 0; + goto LABEL_16; + } +LABEL_15: + v10 = result + 1; +LABEL_16: + *(_DWORD *)(a1 + 256) = v10; + *(_BYTE *)(a1 + result) = 62; + *(_BYTE *)(a1 + 260) = 62; + return result; + } +LABEL_11: + v9 = v8 + 1; + goto LABEL_12; + } + result = d_print_comp(a1, (int)v6); + if ( *(_DWORD *)(a1 + 328) ) + { + result = v16[0]; + *(_DWORD *)(a1 + 272) = v16[0]; + } + return result; +} + +//----- (004322C0) -------------------------------------------------------- +int __usercall d_print_expr_op@(int a1@, _DWORD *a2@) +{ + int result; // eax + int v4; // edi + char *v5; // esi + char *v6; // edi + int v7; // ecx + char v8; // dl + int v9; // eax + char v10; // [esp+1Fh] [ebp-Dh] + + if ( *a2 != 50 ) + return d_print_comp(a1, (int)a2); + result = a2[3]; + v4 = *(_DWORD *)(result + 8); + v5 = *(char **)(result + 4); + if ( v4 ) + { + result = *(_DWORD *)(a1 + 256); + v6 = &v5[v4]; + do + { + v8 = *v5; + if ( result == 255 ) + { + v9 = *(_DWORD *)(a1 + 268); + v10 = *v5; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(int, int, int))(a1 + 264))(a1, 255, v9); + ++*(_DWORD *)(a1 + 296); + v8 = v10; + v7 = 0; + result = 1; + } + else + { + v7 = result++; + } + ++v5; + *(_DWORD *)(a1 + 256) = result; + *(_BYTE *)(a1 + v7) = v8; + *(_BYTE *)(a1 + 260) = v8; + } + while ( v5 != v6 ); + } + return result; +} + +//----- (00432370) -------------------------------------------------------- +BOOL __usercall d_demangle_callback_constprop_0@( + char *a1@, + void (__cdecl *a2)(char *, int, int)@, + int a3@) +{ + char v4; // al + bool v5; // zf + int v6; // esi + char v7; // al + char v8; // al + size_t v9; // eax + int v10; // edx + int v11; // ecx + int v12; // ecx + int v13; // eax + void *v14; // esp + void *v15; // esp + int *v16; // edi + int v17; // eax + void *v18; // esp + void *v19; // esp + size_t v20; // eax + int v21; // edx + int *comp; // edi + int v23; // ecx + char v24; // al + int v25; // eax + int v26; // edx + int v27; // eax + void *v28; // esp + void *v29; // esp + int v30; // eax + void *v31; // esp + void *v32; // esp + int v33; // eax + int v34; // edx + char v36; // al + char *v37; // edx + int v38; // eax + char v39; // al + char *v40; // ecx + int *v41; // esi + _DWORD *name; // eax + int *v43; // eax + char v44; // al + int v45[3]; // [esp+0h] [ebp-1D8h] BYREF + int v46[3]; // [esp+Ch] [ebp-1CCh] BYREF + int v47; // [esp+18h] [ebp-1C0h] + int v48; // [esp+1Ch] [ebp-1BCh] + int *v49; // [esp+20h] [ebp-1B8h] + int *v50; // [esp+24h] [ebp-1B4h] + int v51; // [esp+28h] [ebp-1B0h] + void (__cdecl *v52)(char *, int, int); // [esp+2Ch] [ebp-1ACh] + int v53[2]; // [esp+38h] [ebp-1A0h] BYREF + int v54; // [esp+40h] [ebp-198h] + char *Str; // [esp+44h] [ebp-194h] + int *v56; // [esp+48h] [ebp-190h] + int v57; // [esp+4Ch] [ebp-18Ch] + size_t v58; // [esp+50h] [ebp-188h] + int *v59; // [esp+54h] [ebp-184h] + int v60; // [esp+58h] [ebp-180h] + size_t v61; // [esp+5Ch] [ebp-17Ch] + int v62; // [esp+60h] [ebp-178h] + int v63; // [esp+64h] [ebp-174h] + int v64; // [esp+68h] [ebp-170h] + int v65; // [esp+6Ch] [ebp-16Ch] + int v66; // [esp+70h] [ebp-168h] + char v67[256]; // [esp+74h] [ebp-164h] BYREF + int v68; // [esp+174h] [ebp-64h] + char v69; // [esp+178h] [ebp-60h] + void (__cdecl *v70)(char *, int, int); // [esp+17Ch] [ebp-5Ch] + int v71; // [esp+180h] [ebp-58h] + int v72; // [esp+184h] [ebp-54h] + int v73; // [esp+188h] [ebp-50h] + int v74; // [esp+18Ch] [ebp-4Ch] + int v75; // [esp+190h] [ebp-48h] + int v76; // [esp+194h] [ebp-44h] + int v77; // [esp+198h] [ebp-40h] + int v78; // [esp+19Ch] [ebp-3Ch] + int v79; // [esp+1A0h] [ebp-38h] + int *v80; // [esp+1A4h] [ebp-34h] + int v81; // [esp+1A8h] [ebp-30h] + int v82; // [esp+1ACh] [ebp-2Ch] + int *v83; // [esp+1B0h] [ebp-28h] + int v84; // [esp+1B4h] [ebp-24h] + int v85; // [esp+1B8h] [ebp-20h] + int v86; // [esp+1BCh] [ebp-1Ch] + + v4 = *a1; + v52 = a2; + v51 = a3; + LOBYTE(v50) = v4; + if ( v4 != 95 || (v6 = 1, a1[1] != 90) ) + { + v5 = memcmp(a1, "_GLOBAL_", 8u) == 0; + v6 = 0; + if ( v5 ) + { + v7 = a1[8]; + if ( v7 == 95 || v7 == 46 || v7 == 36 ) + { + v8 = a1[9]; + if ( v8 == 68 || (v6 = 0, v8 == 73) ) + { + v6 = 0; + if ( a1[10] == 95 ) + v6 = (v8 != 73) + 2; + } + } + } + } + v9 = strlen(a1); + v53[0] = (int)a1; + v10 = 2 * v9; + v54 = 17; + v53[1] = (int)&a1[v9]; + v11 = 0; + Str = a1; + v58 = 2 * v9; + v57 = 0; + v61 = v9; + v60 = 0; + v62 = 0; + v63 = 0; + v64 = 0; + v65 = 0; + v66 = 0; + if ( 2 * v9 <= 0x800 ) + { + v12 = 4 * v9; + v49 = v45; + v13 = 16 * ((40 * v9 + 15) >> 4); + v14 = alloca(v13); + v15 = alloca(v13); + v16 = v46; + v48 = ((unsigned int)v46 + 3) >> 2; + v17 = 16 * ((unsigned int)(v12 + 15) >> 4); + v18 = alloca(v17); + v19 = alloca(v17); + v56 = v46; + v59 = v46; + if ( v6 != 1 ) + { + if ( (unsigned int)(v6 - 2) > 1 ) + { + comp = d_type(v53, v45[0], v45[1], v45[2], v46[0], v46[1], v46[2], v47, v48, (int)v49, (int)v50, v51); + v24 = *Str; + } + else + { + v5 = a1[11] == 95; + Str = a1 + 11; + if ( v5 && a1[12] == 90 ) + { + Str = a1 + 13; + v44 = a1[13]; + if ( v44 == 71 || v44 == 84 ) + v16 = d_special_name(v53); + else + v16 = (int *)d_encoding_part_0((int)v53, 0); + } + else + { + v47 = v10; + v50 = (int *)(a1 + 11); + v20 = strlen(a1 + 11); + if ( v47 > 0 && (v57 = 1, v21 = v48, *(_DWORD *)(4 * v48 + 4) = 0, *(_DWORD *)(4 * v21 + 8) = 0, v20) ) + { + *(_DWORD *)(4 * v21 + 0xC) = a1 + 11; + *(_DWORD *)(4 * v21) = 0; + *(_DWORD *)(4 * v21 + 0x10) = v20; + } + else + { + v16 = 0; + } + } + comp = d_make_comp(v53, (v6 != 2) + 68, (int)v16, 0); + Str += strlen(Str); + v24 = *Str; + } + goto LABEL_16; + } + if ( (_BYTE)v50 != 95 || a1[1] != 90 ) + return 0; + Str = a1 + 2; + v36 = a1[2]; + if ( v36 == 71 || v36 == 84 ) + comp = d_special_name(v53); + else + comp = (int *)d_encoding_part_0((int)v53, 1); + v24 = *Str; + if ( (v54 & 1) == 0 || v24 != 46 ) + { +LABEL_16: + if ( !v24 && comp ) + { + v68 = 0; + v69 = 0; + v70 = v52; + v72 = 0; + v71 = v51; + v73 = 0; + v77 = 0; + v78 = 0; + v74 = 0; + v75 = 0; + v76 = 0; + v79 = 0; + v80 = 0; + v81 = 0; + v82 = 0; + v83 = 0; + v84 = 0; + v85 = 0; + d_count_templates_scopes((int)v67, comp, v23); + if ( v75 <= 2047 ) + v75 = 0; + v25 = v82; + v86 = 0; + v26 = v82 * v85; + if ( v82 <= 0 ) + v25 = 1; + v85 *= v82; + v27 = 16 * ((unsigned int)(8 * v25 + 15) >> 4); + v28 = alloca(v27); + v29 = alloca(v27); + v80 = v46; + if ( v26 <= 0 ) + v26 = 1; + v30 = 16 * ((unsigned int)(8 * v26 + 15) >> 4); + v31 = alloca(v30); + v32 = alloca(v30); + v83 = v46; + d_print_comp((int)v67, (int)comp); + v33 = v68; + v34 = v71; + v67[v68] = 0; + v70(v67, v33, v34); + return v74 == 0; + } + return 0; + } + v50 = v53; + v37 = Str; + while ( 1 ) + { + v38 = (unsigned __int8)v37[1]; + v23 = v38 - 97; + if ( (unsigned __int8)(v38 - 97) <= 0x19u || (_BYTE)v38 == 95 ) + break; + if ( (unsigned __int8)(v38 - 48) > 9u ) + { + v24 = *v37; + goto LABEL_16; + } + v39 = *v37; + v40 = v37; +LABEL_44: + while ( v39 == 46 && (unsigned __int8)(v40[1] - 48) <= 9u ) + { + v39 = v40[2]; + for ( v40 += 2; (unsigned __int8)(v39 - 48) <= 9u; ++v40 ) + v39 = v40[1]; + } + v41 = v50; + Str = v40; + name = d_make_name(v50, (int)v37, v40 - v37); + v43 = d_make_comp(v41, 78, (int)comp, (int)name); + v37 = Str; + comp = v43; + v24 = *Str; + if ( *Str != 46 ) + goto LABEL_16; + } + v39 = v37[2]; + v40 = v37 + 2; + if ( (unsigned __int8)(v39 - 97) > 0x19u ) + goto LABEL_57; + while ( 1 ) + { + do + v39 = *++v40; + while ( (unsigned __int8)(v39 - 97) <= 0x19u ); +LABEL_57: + if ( v39 != 95 ) + goto LABEL_44; + } + } + return v11; +} +// 432631: variable 'v23' is possibly undefined +// 432370: using guessed type char var_164[256]; + +//----- (004328E0) -------------------------------------------------------- +int __usercall d_print_subexpr@(unsigned int a1@, _DWORD *a2@) +{ + int v4; // edi + int result; // eax + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // edx + int v11; // eax + int v12; // eax + _DWORD *v13; // [esp+18h] [ebp-14h] BYREF + int v14; // [esp+1Ch] [ebp-10h] + + if ( *a2 == 49 || *a2 <= 1u || *a2 == 6 ) + { + v4 = 1; + } + else + { + v9 = *(_DWORD *)(a1 + 256); + if ( v9 == 255 ) + { + v12 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v12); + ++*(_DWORD *)(a1 + 296); + v10 = 1; + v9 = 0; + } + else + { + v10 = v9 + 1; + } + *(_DWORD *)(a1 + 256) = v10; + v4 = 0; + *(_BYTE *)(a1 + v9) = 40; + *(_BYTE *)(a1 + 260) = 40; + } + result = a2[1]; + if ( result > 1 || (v6 = *(_DWORD *)(a1 + 284), v6 > 1024) ) + { + *(_DWORD *)(a1 + 280) = 1; + if ( v4 ) + return result; + } + else + { + v13 = a2; + a2[1] = result + 1; + v7 = *(_DWORD *)(a1 + 300); + *(_DWORD *)(a1 + 284) = v6 + 1; + v14 = v7; + *(_DWORD *)(a1 + 300) = &v13; + d_print_comp_inner(a1, (int)a2); + result = v14; + *(_DWORD *)(a1 + 300) = v14; + --a2[1]; + --*(_DWORD *)(a1 + 284); + if ( v4 ) + return result; + } + result = *(_DWORD *)(a1 + 256); + if ( result == 255 ) + { + v11 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v11); + ++*(_DWORD *)(a1 + 296); + v8 = 1; + result = 0; + } + else + { + v8 = result + 1; + } + *(_DWORD *)(a1 + 256) = v8; + *(_BYTE *)(a1 + result) = 41; + *(_BYTE *)(a1 + 260) = 41; + return result; +} + +//----- (00432A50) -------------------------------------------------------- +int __usercall d_maybe_print_fold_expression@(unsigned int a1@, int a2@) +{ + _BYTE *v3; // eax + int v4; // edx + _DWORD *v5; // esi + _DWORD *v6; // edi + _DWORD *v7; // ebp + int v8; // edx + char v9; // al + int v10; // eax + int v11; // edx + _DWORD *v12; // ecx + const char *v13; // edi + int v14; // eax + char k; // dl + int v16; // ecx + int v17; // eax + _DWORD *v19; // ecx + int v20; // eax + int v21; // edx + int v22; // eax + int v23; // edx + const char *v24; // esi + int v25; // eax + char j; // dl + int v27; // ecx + int v28; // eax + int v29; // eax + const char *v30; // esi + char i; // dl + int v32; // ecx + int v33; // eax + int v34; // eax + int v35; // eax + int v36; // eax + int v37; // [esp+18h] [ebp-24h] + char v38; // [esp+1Fh] [ebp-1Dh] + char v39; // [esp+1Fh] [ebp-1Dh] + char v40; // [esp+1Fh] [ebp-1Dh] + + v3 = **(_BYTE ***)(*(_DWORD *)(a2 + 12) + 12); + if ( *v3 != 102 ) + return 0; + v4 = *(_DWORD *)(a2 + 16); + v5 = 0; + v6 = *(_DWORD **)(v4 + 16); + v7 = *(_DWORD **)(v4 + 12); + if ( *v6 == 60 ) + { + v5 = (_DWORD *)v6[4]; + v6 = (_DWORD *)v6[3]; + } + v8 = *(_DWORD *)(a1 + 292); + *(_DWORD *)(a1 + 292) = -1; + v9 = v3[1]; + v37 = v8; + if ( v9 == 108 ) + { + v29 = *(_DWORD *)(a1 + 256); + v30 = "(..."; + for ( i = 40; ; i = *v30 ) + { + if ( v29 == 255 ) + { + v33 = *(_DWORD *)(a1 + 268); + v40 = i; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v33); + ++*(_DWORD *)(a1 + 296); + i = v40; + v32 = 0; + v29 = 1; + } + else + { + v32 = v29++; + } + *(_DWORD *)(a1 + 256) = v29; + ++v30; + *(_BYTE *)(a1 + v32) = i; + *(_BYTE *)(a1 + 260) = i; + if ( v30 == "" ) + break; + } + d_print_expr_op(a1, v7); + v19 = v6; + goto LABEL_18; + } + if ( v9 > 108 ) + { + if ( v9 == 114 ) + { + v22 = *(_DWORD *)(a1 + 256); + if ( v22 == 255 ) + { + v35 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v35); + ++*(_DWORD *)(a1 + 296); + v23 = 1; + v22 = 0; + } + else + { + v23 = v22 + 1; + } + *(_DWORD *)(a1 + 256) = v23; + v24 = "...)"; + *(_BYTE *)(a1 + v22) = 40; + *(_BYTE *)(a1 + 260) = 40; + d_print_subexpr(a1, v6); + d_print_expr_op(a1, v7); + v25 = *(_DWORD *)(a1 + 256); + for ( j = 46; ; j = *v24 ) + { + if ( v25 == 255 ) + { + v28 = *(_DWORD *)(a1 + 268); + v39 = j; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v28); + ++*(_DWORD *)(a1 + 296); + j = v39; + v27 = 0; + v25 = 1; + } + else + { + v27 = v25++; + } + ++v24; + *(_DWORD *)(a1 + 256) = v25; + *(_BYTE *)(a1 + v27) = j; + *(_BYTE *)(a1 + 260) = j; + if ( v24 == "" ) + break; + } + } + goto LABEL_21; + } + if ( v9 == 76 || v9 == 82 ) + { + v10 = *(_DWORD *)(a1 + 256); + if ( v10 == 255 ) + { + v36 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v36); + ++*(_DWORD *)(a1 + 296); + v11 = 1; + v10 = 0; + } + else + { + v11 = v10 + 1; + } + *(_DWORD *)(a1 + 256) = v11; + v12 = v6; + v13 = "..."; + *(_BYTE *)(a1 + v10) = 40; + *(_BYTE *)(a1 + 260) = 40; + d_print_subexpr(a1, v12); + d_print_expr_op(a1, v7); + v14 = *(_DWORD *)(a1 + 256); + for ( k = 46; ; k = *v13 ) + { + if ( v14 == 255 ) + { + v17 = *(_DWORD *)(a1 + 268); + v38 = k; + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v17); + ++*(_DWORD *)(a1 + 296); + k = v38; + v16 = 0; + v14 = 1; + } + else + { + v16 = v14++; + } + ++v13; + *(_DWORD *)(a1 + 256) = v14; + *(_BYTE *)(a1 + v16) = k; + *(_BYTE *)(a1 + 260) = k; + if ( v13 == "" ) + break; + } + d_print_expr_op(a1, v7); + v19 = v5; +LABEL_18: + d_print_subexpr(a1, v19); + v20 = *(_DWORD *)(a1 + 256); + if ( v20 == 255 ) + { + v34 = *(_DWORD *)(a1 + 268); + *(_BYTE *)(a1 + 255) = 0; + (*(void (__cdecl **)(unsigned int, int, int))(a1 + 264))(a1, 255, v34); + ++*(_DWORD *)(a1 + 296); + v21 = 1; + v20 = 0; + } + else + { + v21 = v20 + 1; + } + *(_DWORD *)(a1 + 256) = v21; + *(_BYTE *)(a1 + v20) = 41; + *(_BYTE *)(a1 + 260) = 41; + } +LABEL_21: + *(_DWORD *)(a1 + 292) = v37; + return 1; +} + +//----- (00432E00) -------------------------------------------------------- +char *__cdecl __cxa_demangle(const char *lpmangled, char *lpout, size_t *lpoutlen, int *lpstatus) +{ + char *v4; // edi + size_t v5; // ebp + size_t v6; // eax + char *Str; // [esp+0h] [ebp-3Ch] + char *Src[2]; // [esp+10h] [ebp-2Ch] BYREF + size_t v10; // [esp+18h] [ebp-24h] + int v11; // [esp+1Ch] [ebp-20h] + + if ( !lpmangled || lpout && !lpoutlen ) + { + if ( lpstatus ) + *lpstatus = -3; + return 0; + } + Src[0] = 0; + Src[1] = 0; + v10 = 0; + v11 = 0; + if ( !d_demangle_callback_constprop_0( + (char *)lpmangled, + (void (__cdecl *)(char *, int, int))d_growable_string_callback_adapter, + (int)Src) ) + { + free(Src[0]); + if ( !lpstatus ) + return 0; + goto LABEL_25; + } + v4 = Src[0]; + if ( v11 ) + { + v5 = 1; + if ( Src[0] ) + goto LABEL_7; + if ( !lpstatus ) + return 0; + goto LABEL_16; + } + v5 = v10; + if ( Src[0] ) + { +LABEL_7: + if ( lpout ) + { + v6 = strlen(Src[0]); + if ( v6 < *lpoutlen ) + { + memcpy(lpout, Src[0], v6 + 1); + Str = v4; + v4 = lpout; + free(Str); + goto LABEL_10; + } + free(lpout); + } + else if ( !lpoutlen ) + { +LABEL_10: + if ( lpstatus ) + *lpstatus = 0; + return v4; + } + *lpoutlen = v5; + goto LABEL_10; + } + if ( lpstatus ) + { + if ( v10 == 1 ) + { +LABEL_16: + *lpstatus = -1; + return 0; + } +LABEL_25: + *lpstatus = -2; + return 0; + } + return 0; +} + +//----- (00432F50) -------------------------------------------------------- +unsigned int __cdecl __gcclibcxx_demangle_callback(char *a1, void (__cdecl *a2)(char *, int, int), int a3) +{ + if ( a1 && a2 ) + return !d_demangle_callback_constprop_0(a1, a2, a3) ? 0xFFFFFFFE : 0; + else + return -3; +} + +//----- (00432F90) -------------------------------------------------------- +void __do_global_dtors(void) +{ + void (*v0)(void); // eax + + v0 = (void (*)(void))*data_1; + if ( *data_1 ) + { + do + { + v0(); + v0 = (void (*)(void))data_1[1]; + ++data_1; + } + while ( v0 ); + } +} +// 50B0E0: using guessed type int *data_1; + +//----- (00432FD0) -------------------------------------------------------- +int __do_global_ctors() +{ + int v0; // ebx + int v2; // eax + + v0 = __CTOR_LIST__[0]; + if ( __CTOR_LIST__[0] == -1 ) + { + v2 = 0; + do + v0 = v2++; + while ( __CTOR_LIST__[v2] ); + } + for ( ; v0; --v0 ) + ((void (*)(void))__CTOR_LIST__[v0])(); + return atexit(__do_global_dtors); +} +// 505A90: using guessed type int __CTOR_LIST__[]; + +//----- (00433030) -------------------------------------------------------- +int __main() +{ + int result; // eax + + result = bss_0; + if ( !bss_0 ) + { + bss_0 = 1; + return __do_global_ctors(); + } + return result; +} +// 15222C4: using guessed type int bss_0; + +//----- (00433060) -------------------------------------------------------- +int _setargv() +{ + return 0; +} + +//----- (00433070) -------------------------------------------------------- +int __stdcall __dyn_tls_dtor(int a1, unsigned int a2, int a3) +{ + if ( a2 != 3 && a2 ) + return 1; + __mingw_TLScallback(a1, a2); + return 1; +} + +//----- (004330C0) -------------------------------------------------------- +int __stdcall __dyn_tls_init(int a1, int a2, int a3) +{ + if ( _CRT_MT != 2 ) + _CRT_MT = 2; + if ( a2 == 2 || a2 != 1 ) + return 1; + __mingw_TLScallback(a1, 1u); + return 1; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00433160) -------------------------------------------------------- +int __tlregdtor() +{ + return 0; +} + +//----- (00433170) -------------------------------------------------------- +int __cdecl _matherr(struct _exception *Except) +{ + const char *v1; // ebx + unsigned int v2; // edx + char *name; // esi + FILE *v4; // eax + double arg1; // [esp+38h] [ebp-24h] + double arg2; // [esp+40h] [ebp-1Ch] + double retval; // [esp+48h] [ebp-14h] + + v1 = "Unknown error"; + v2 = Except->type - 1; + if ( v2 <= 5 ) + v1 = CSWTCH_1[v2]; + name = Except->name; + retval = Except->retval; + arg2 = Except->arg2; + arg1 = Except->arg1; + v4 = __acrt_iob_func(2u); + fprintf(v4, "_matherr(): %s in %s(%g, %g) (retval=%g)\n", v1, name, arg1, arg2, retval); + return 0; +} +// 514AB8: using guessed type char *CSWTCH_1[6]; + +//----- (004331F0) -------------------------------------------------------- +void __cdecl fpreset() +{ + __asm { fninit } +} + +//----- (00433200) -------------------------------------------------------- +void __noreturn __report_error(char *Format, ...) +{ + FILE *Stream; // eax + FILE *v2; // eax + va_list ArgList; // [esp+24h] [ebp+8h] BYREF + + va_start(ArgList, Format); + Stream = __acrt_iob_func(2u); + fwrite("Mingw-w64 runtime failure:\n", 1u, 0x1Bu, Stream); + v2 = __acrt_iob_func(2u); + vfprintf(v2, Format, ArgList); + abort(); +} + +//----- (00433260) -------------------------------------------------------- +_DWORD *__usercall mark_section_writable@(const void *a1@) +{ + int v2; // esi + int v3; // ecx + _DWORD *result; // eax + int SectionForAddress; // edi + int v6; // ebx + _DWORD *v7; // eax + const void *lpAddress; // eax + DWORD v9; // eax + SIZE_T RegionSize; // ecx + PVOID BaseAddress; // edx + DWORD *lpflOldProtect; // ebx + DWORD LastError; // eax + struct _MEMORY_BASIC_INFORMATION Buffer; // [esp+14h] [ebp-28h] BYREF + + v2 = maxSections; + if ( maxSections <= 0 ) + { + v2 = 0; +LABEL_6: + SectionForAddress = __mingw_GetSectionForAddress((int)a1); + if ( !SectionForAddress ) + __report_error("Address %p has no image-section", a1); + v6 = 20 * v2; + v7 = (_DWORD *)(20 * v2 + the_secs); + v7[4] = SectionForAddress; + *v7 = 0; + lpAddress = (const void *)(*(_DWORD *)(SectionForAddress + 12) + _GetPEImageBase()); + *(_DWORD *)(the_secs + 20 * v2 + 12) = lpAddress; + if ( !VirtualQuery(lpAddress, &Buffer, 0x1Cu) ) + __report_error( + " VirtualQuery failed for %d bytes at address %p", + *(_DWORD *)(SectionForAddress + 8), + *(const void **)(the_secs + v6 + 12)); + result = (_DWORD *)Buffer.Protect; + if ( ((Buffer.Protect - 64) & 0xFFFFFFBF) != 0 && ((Buffer.Protect - 4) & 0xFFFFFFFB) != 0 ) + { + v9 = 4; + RegionSize = Buffer.RegionSize; + if ( Buffer.Protect != 2 ) + v9 = 64; + BaseAddress = Buffer.BaseAddress; + lpflOldProtect = (DWORD *)(the_secs + v6); + lpflOldProtect[2] = Buffer.RegionSize; + lpflOldProtect[1] = (DWORD)BaseAddress; + result = (_DWORD *)VirtualProtect(BaseAddress, RegionSize, v9, lpflOldProtect); + if ( !result ) + { + LastError = GetLastError(); + __report_error(" VirtualProtect failed with code 0x%x", LastError); + } + } + ++maxSections; + } + else + { + v3 = 0; + result = (_DWORD *)(the_secs + 12); + while ( *result > (unsigned int)a1 || (unsigned int)a1 >= *(_DWORD *)(result[1] + 8) + *result ) + { + ++v3; + result += 5; + if ( v3 == maxSections ) + goto LABEL_6; + } + } + return result; +} +// 15222F8: using guessed type int maxSections; +// 15222FC: using guessed type int the_secs; + +//----- (004333C0) -------------------------------------------------------- +void _pei386_runtime_relocator() +{ + int v0; // eax + void *v1; // esp + void *v2; // esp + int v3; // [esp+10h] [ebp-38h] BYREF + + if ( !was_init_0 ) + { + was_init_0 = 1; + v0 = 16 * ((unsigned int)(20 * __mingw_GetSectionCount() + 27) >> 4); + v1 = alloca(v0); + maxSections = 0; + v2 = alloca(v0); + the_secs = (int)&v3; + } +} +// 15222F4: using guessed type int was_init_0; +// 15222F8: using guessed type int maxSections; +// 15222FC: using guessed type int the_secs; + +//----- (00433640) -------------------------------------------------------- +int (__cdecl *__cdecl __mingw_raise_matherr(int a1, int a2, double a3, double a4, double a5))(_DWORD) +{ + int (__cdecl *result)(_DWORD); // eax + int v6[2]; // [esp+10h] [ebp-2Ch] BYREF + double v7; // [esp+18h] [ebp-24h] + double v8; // [esp+20h] [ebp-1Ch] + double v9; // [esp+28h] [ebp-14h] + + result = stUserMathErr; + if ( stUserMathErr ) + { + v7 = a3; + v8 = a4; + v6[0] = a1; + v9 = a5; + v6[1] = a2; + return (int (__cdecl *)(_DWORD))stUserMathErr(v6); + } + return result; +} +// 1522300: using guessed type int (__cdecl *stUserMathErr)(_DWORD); + +//----- (004336A0) -------------------------------------------------------- +void __cdecl __mingw_setusermatherr(_UserMathErrorFunctionPointer UserMathErrorFunction) +{ + stUserMathErr = (int (__cdecl *)(_DWORD))UserMathErrorFunction; + __setusermatherr(UserMathErrorFunction); +} +// 1522300: using guessed type int (__cdecl *stUserMathErr)(_DWORD); + +//----- (004336B0) -------------------------------------------------------- +LONG __stdcall _gnu_exception_handler(_EXCEPTION_POINTERS *a1) +{ + DWORD ExceptionCode; // eax + _crt_signal_t v2; // eax + _crt_signal_t v4; // eax + _crt_signal_t v5; // eax + + ExceptionCode = a1->ExceptionRecord->ExceptionCode; + if ( ExceptionCode == -1073741677 ) + { +LABEL_6: + v2 = signal(8, 0); + if ( v2 == (_crt_signal_t)1 ) + { + signal(8, (_crt_signal_t)1); + fpreset(); + return -1; + } +LABEL_7: + if ( v2 ) + { + v2(8); + return -1; + } + goto LABEL_8; + } + if ( ExceptionCode > 0xC0000093 ) + { + if ( ExceptionCode == -1073741676 ) + { + v2 = signal(8, 0); + if ( v2 == (_crt_signal_t)1 ) + { + signal(8, (_crt_signal_t)1); + return -1; + } + goto LABEL_7; + } + if ( ExceptionCode != -1073741674 ) + goto LABEL_8; +LABEL_18: + v5 = signal(4, 0); + if ( v5 == (_crt_signal_t)1 ) + { + signal(4, (_crt_signal_t)1); + return -1; + } + if ( v5 ) + { + v5(4); + return -1; + } + goto LABEL_8; + } + if ( ExceptionCode == -1073741795 ) + goto LABEL_18; + if ( ExceptionCode <= 0xC000001D ) + { + if ( ExceptionCode == -1073741819 ) + { + v4 = signal(11, 0); + if ( v4 == (_crt_signal_t)1 ) + { + signal(11, (_crt_signal_t)1); + return -1; + } + if ( v4 ) + { + v4(11); + return -1; + } + } + goto LABEL_8; + } + if ( ExceptionCode + 1073741683 <= 4 ) + goto LABEL_6; +LABEL_8: + if ( __mingw_oldexcpt_handler ) + return __mingw_oldexcpt_handler(a1); + else + return 0; +} +// 1522308: using guessed type int (__stdcall *__mingw_oldexcpt_handler)(_DWORD); + +//----- (00433860) -------------------------------------------------------- +void __mingwthr_run_key_dtors_part_0() +{ + DWORD *v0; // ebx + LPVOID Value; // esi + + EnterCriticalSection(&__mingwthr_cs); + v0 = (DWORD *)key_dtor_list; + if ( key_dtor_list ) + { + do + { + Value = TlsGetValue(*v0); + if ( !GetLastError() && Value ) + ((void (__cdecl *)(LPVOID))v0[1])(Value); + v0 = (DWORD *)v0[2]; + } + while ( v0 ); + } + LeaveCriticalSection(&__mingwthr_cs); +} + +//----- (004338D0) -------------------------------------------------------- +int __cdecl ___w64_mingwthr_add_key_dtor(int a1, int a2) +{ + int result; // eax + _DWORD *v3; // eax + _DWORD *v4; // ebx + void *v5; // eax + + result = __mingwthr_cs_init; + if ( __mingwthr_cs_init ) + { + v3 = calloc(1u, 0xCu); + v4 = v3; + if ( v3 ) + { + *v3 = a1; + v3[1] = a2; + EnterCriticalSection(&__mingwthr_cs); + v5 = key_dtor_list; + key_dtor_list = v4; + v4[2] = v5; + LeaveCriticalSection(&__mingwthr_cs); + return 0; + } + else + { + return -1; + } + } + return result; +} +// 1522310: using guessed type int __mingwthr_cs_init; + +//----- (00433950) -------------------------------------------------------- +int __cdecl ___w64_mingwthr_remove_key_dtor(int a1) +{ + _DWORD *v2; // eax + _DWORD *v3; // ecx + int v4; // edx + + if ( !__mingwthr_cs_init ) + return 0; + EnterCriticalSection(&__mingwthr_cs); + v2 = key_dtor_list; + if ( key_dtor_list ) + { + v3 = 0; + while ( 1 ) + { + v4 = v2[2]; + if ( *v2 == a1 ) + break; + v3 = v2; + if ( !v4 ) + goto LABEL_11; + v2 = (_DWORD *)v2[2]; + } + if ( v3 ) + v3[2] = v4; + else + key_dtor_list = (void *)v2[2]; + free(v2); + } +LABEL_11: + LeaveCriticalSection(&__mingwthr_cs); + return 0; +} +// 1522310: using guessed type int __mingwthr_cs_init; + +//----- (004339E0) -------------------------------------------------------- +int __cdecl __mingw_TLScallback(int a1, unsigned int a2) +{ + void *v3; // ebx + void *Block; // eax + + if ( a2 == 2 ) + { + fpreset(); + return 1; + } + else + { + if ( a2 > 2 ) + { + if ( a2 == 3 && __mingwthr_cs_init ) + __mingwthr_run_key_dtors_part_0(); + } + else if ( a2 ) + { + if ( !__mingwthr_cs_init ) + InitializeCriticalSection(&__mingwthr_cs); + __mingwthr_cs_init = 1; + } + else + { + if ( __mingwthr_cs_init ) + __mingwthr_run_key_dtors_part_0(); + if ( __mingwthr_cs_init == 1 ) + { + v3 = key_dtor_list; + while ( v3 ) + { + Block = v3; + v3 = (void *)*((_DWORD *)v3 + 2); + free(Block); + } + key_dtor_list = 0; + __mingwthr_cs_init = 0; + DeleteCriticalSection(&__mingwthr_cs); + } + } + return 1; + } +} +// 1522310: using guessed type int __mingwthr_cs_init; + +//----- (00433AD0) -------------------------------------------------------- +BOOL __cdecl _ValidateImageBase(int a1) +{ + int v1; // eax + + if ( *(_WORD *)a1 == 23117 && (v1 = *(_DWORD *)(a1 + 60) + a1, *(_DWORD *)v1 == 17744) ) + return *(_WORD *)(v1 + 24) == 267; + else + return 0; +} + +//----- (00433B00) -------------------------------------------------------- +int __cdecl _FindPESection(int a1, unsigned int a2) +{ + int v2; // edx + int v3; // esi + int result; // eax + int v5; // ecx + unsigned int v6; // edx + + v2 = *(_DWORD *)(a1 + 60) + a1; + v3 = *(unsigned __int16 *)(v2 + 6); + result = v2 + *(unsigned __int16 *)(v2 + 20) + 24; + if ( !*(_WORD *)(v2 + 6) ) + return 0; + v5 = 0; + while ( 1 ) + { + v6 = *(_DWORD *)(result + 12); + if ( v6 <= a2 && *(_DWORD *)(result + 8) + v6 > a2 ) + break; + ++v5; + result += 40; + if ( v5 == v3 ) + return 0; + } + return result; +} + +//----- (00433B40) -------------------------------------------------------- +const char *__cdecl _FindPESectionByName(char *Str) +{ + const char *v1; // ebx + int v2; // ebp + int v3; // esi + + v1 = 0; + if ( strlen(Str) > 8 + || MEMORY[0x400000] != 23117 + || *(_DWORD *)(MEMORY[0x40003C] + 0x400000) != 17744 + || *(_WORD *)(MEMORY[0x40003C] + 4194328) != 267 ) + { + return v1; + } + v2 = *(unsigned __int16 *)(MEMORY[0x40003C] + 4194310); + v1 = (const char *)(MEMORY[0x40003C] + 0x400000 + *(unsigned __int16 *)(MEMORY[0x40003C] + 4194324) + 24); + if ( *(_WORD *)(MEMORY[0x40003C] + 4194310) ) + { + v3 = 0; + while ( strncmp(v1, Str, 8u) ) + { + ++v3; + v1 += 40; + if ( v2 == v3 ) + return 0; + } + return v1; + } + return 0; +} + +//----- (00433BE0) -------------------------------------------------------- +int __cdecl __mingw_GetSectionForAddress(int a1) +{ + int result; // eax + unsigned int v2; // ebx + int v3; // ecx + unsigned int v4; // edx + + result = 0; + if ( MEMORY[0x400000] == 23117 + && *(_DWORD *)(MEMORY[0x40003C] + 0x400000) == 17744 + && *(_WORD *)(MEMORY[0x40003C] + 4194328) == 267 ) + { + result = MEMORY[0x40003C] + 0x400000 + *(unsigned __int16 *)(MEMORY[0x40003C] + 4194324) + 24; + v2 = a1 - 0x400000; + if ( *(_WORD *)(MEMORY[0x40003C] + 4194310) ) + { + v3 = 0; + while ( 1 ) + { + v4 = *(_DWORD *)(result + 12); + if ( v2 >= v4 && v2 < *(_DWORD *)(result + 8) + v4 ) + break; + ++v3; + result += 40; + if ( v3 == *(unsigned __int16 *)(MEMORY[0x40003C] + 4194310) ) + return 0; + } + } + else + { + return 0; + } + } + return result; +} + +//----- (00433C60) -------------------------------------------------------- +int __mingw_GetSectionCount() +{ + int result; // eax + + result = 0; + if ( MEMORY[0x400000] == 23117 + && *(_DWORD *)(MEMORY[0x40003C] + 0x400000) == 17744 + && *(_WORD *)(MEMORY[0x40003C] + 4194328) == 267 ) + { + return *(unsigned __int16 *)(MEMORY[0x40003C] + 4194310); + } + return result; +} + +//----- (00433CA0) -------------------------------------------------------- +int __cdecl _FindPESectionExec(int a1) +{ + int result; // eax + int v3; // edx + + result = 0; + if ( MEMORY[0x400000] == 23117 + && *(_DWORD *)(MEMORY[0x40003C] + 0x400000) == 17744 + && *(_WORD *)(MEMORY[0x40003C] + 4194328) == 267 ) + { + result = MEMORY[0x40003C] + 0x400000 + *(unsigned __int16 *)(MEMORY[0x40003C] + 4194324) + 24; + if ( *(_WORD *)(MEMORY[0x40003C] + 4194310) ) + { + v3 = 0; + do + { + if ( (*(_BYTE *)(result + 39) & 0x20) != 0 ) + { + if ( !a1 ) + return result; + --a1; + } + ++v3; + result += 40; + } + while ( *(unsigned __int16 *)(MEMORY[0x40003C] + 4194310) != v3 ); + } + return 0; + } + return result; +} + +//----- (00433D20) -------------------------------------------------------- +int _GetPEImageBase() +{ + int result; // eax + + result = 0; + if ( MEMORY[0x400000] == 23117 + && *(_DWORD *)(MEMORY[0x40003C] + 0x400000) == 17744 + && *(_WORD *)(MEMORY[0x40003C] + 4194328) == 267 ) + { + return 0x400000; + } + return result; +} + +//----- (00433D60) -------------------------------------------------------- +BOOL __cdecl _IsNonwritableInCurrentImage(int a1) +{ + _DWORD *v2; // eax + unsigned int v3; // ebx + int v4; // ecx + unsigned int v5; // edx + + if ( MEMORY[0x400000] != 23117 + || *(_DWORD *)(MEMORY[0x40003C] + 0x400000) != 17744 + || *(_WORD *)(MEMORY[0x40003C] + 4194328) != 267 ) + { + return 0; + } + v2 = (_DWORD *)(MEMORY[0x40003C] + 0x400000 + *(unsigned __int16 *)(MEMORY[0x40003C] + 4194324) + 24); + v3 = a1 - 0x400000; + if ( !*(_WORD *)(MEMORY[0x40003C] + 4194310) ) + return 0; + v4 = 0; + while ( 1 ) + { + v5 = v2[3]; + if ( v3 >= v5 && v3 < v2[2] + v5 ) + break; + ++v4; + v2 += 10; + if ( *(unsigned __int16 *)(MEMORY[0x40003C] + 4194310) == v4 ) + return 0; + } + return v2[9] >= 0; +} + +//----- (00433DF0) -------------------------------------------------------- +int __cdecl __mingw_enum_import_library_names(int a1) +{ + unsigned int v3; // eax + int v4; // edx + int v5; // esi + unsigned int v6; // ecx + unsigned int i; // eax + + if ( MEMORY[0x400000] != 23117 ) + return 0; + if ( *(_DWORD *)(MEMORY[0x40003C] + 0x400000) != 17744 ) + return 0; + if ( *(_WORD *)(MEMORY[0x40003C] + 4194328) != 267 ) + return 0; + v3 = *(_DWORD *)(MEMORY[0x40003C] + 4194432); + if ( !v3 ) + return 0; + v4 = MEMORY[0x40003C] + 0x400000 + *(unsigned __int16 *)(MEMORY[0x40003C] + 4194324) + 24; + if ( !*(_WORD *)(MEMORY[0x40003C] + 4194310) ) + return 0; + v5 = 0; + while ( 1 ) + { + v6 = *(_DWORD *)(v4 + 12); + if ( v3 >= v6 && v3 < *(_DWORD *)(v4 + 8) + v6 ) + break; + ++v5; + v4 += 40; + if ( v5 == *(unsigned __int16 *)(MEMORY[0x40003C] + 4194310) ) + return 0; + } + for ( i = v3 + 0x400000; *(_DWORD *)(i + 4) || *(_DWORD *)(i + 12); i += 20 ) + { + if ( a1 <= 0 ) + return *(_DWORD *)(i + 12) + 0x400000; + --a1; + } + return 0; +} + +//----- (00434140) -------------------------------------------------------- +int __cdecl __gthr_win32_once(int a1, void (*a2)(void)) +{ + if ( !a1 || !a2 ) + return 22; + if ( *(_DWORD *)a1 ) + return 0; + if ( _InterlockedAdd((volatile signed __int32 *)(a1 + 4), 1u) ) + { + while ( !*(_DWORD *)a1 ) + Sleep(0); + return 0; + } + a2(); + *(_DWORD *)a1 = 1; + return 0; +} + +//----- (004341C0) -------------------------------------------------------- +int __cdecl __gthr_win32_key_create(int *a1, int a2) +{ + int v2; // eax + + v2 = TlsAlloc(); + if ( v2 == -1 ) + return GetLastError(); + *a1 = v2; + return __mingwthr_key_dtor(v2, a2); +} + +//----- (00434200) -------------------------------------------------------- +DWORD __cdecl __gthr_win32_key_delete(DWORD dwTlsIndex) +{ + if ( TlsFree(dwTlsIndex) ) + return 0; + else + return GetLastError(); +} + +//----- (00434230) -------------------------------------------------------- +LPVOID __cdecl __gthr_win32_getspecific(DWORD dwTlsIndex) +{ + DWORD LastError; // esi + LPVOID Value; // ebx + + LastError = GetLastError(); + Value = TlsGetValue(dwTlsIndex); + SetLastError(LastError); + return Value; +} + +//----- (00434270) -------------------------------------------------------- +DWORD __cdecl __gthr_win32_setspecific(DWORD dwTlsIndex, LPVOID lpTlsValue) +{ + if ( TlsSetValue(dwTlsIndex, lpTlsValue) ) + return 0; + else + return GetLastError(); +} + +//----- (004342B0) -------------------------------------------------------- +HANDLE __cdecl __gthr_win32_mutex_init_function(_DWORD *a1) +{ + HANDLE result; // eax + + *a1 = -1; + result = CreateSemaphoreW(0, 0, 0xFFFF, 0); + a1[1] = result; + return result; +} + +//----- (004342F0) -------------------------------------------------------- +int __cdecl __gthr_win32_mutex_destroy(int a1) +{ + return _IAT_start__(*(_DWORD *)(a1 + 4)); +} +// 15231F8: using guessed type int __stdcall _IAT_start__(_DWORD); + +//----- (00434310) -------------------------------------------------------- +int __cdecl __gthr_win32_mutex_lock(int a1) +{ + if ( !_InterlockedAdd((volatile signed __int32 *)a1, 1u) || !WaitForSingleObject(*(HANDLE *)(a1 + 4), 0xFFFFFFFF) ) + return 0; + _InterlockedSub((volatile signed __int32 *)a1, 1u); + return 1; +} + +//----- (00434360) -------------------------------------------------------- +BOOL __cdecl __gthr_win32_mutex_trylock(volatile signed __int32 *a1) +{ + return _InterlockedCompareExchange(a1, 0, -1) >= 0; +} + +//----- (00434380) -------------------------------------------------------- +BOOL __cdecl __gthr_win32_mutex_unlock(int a1) +{ + return _InterlockedDecrement((volatile signed __int32 *)a1) >= 0 && !ReleaseSemaphore(*(HANDLE *)(a1 + 4), 1, 0); +} + +//----- (004343D0) -------------------------------------------------------- +HANDLE __cdecl __gthr_win32_recursive_mutex_init_function(_DWORD *a1) +{ + HANDLE result; // eax + + *a1 = -1; + a1[1] = 0; + a1[2] = 0; + result = CreateSemaphoreW(0, 0, 0xFFFF, 0); + a1[3] = result; + return result; +} + +//----- (00434420) -------------------------------------------------------- +DWORD __cdecl __gthr_win32_recursive_mutex_lock(int a1) +{ + DWORD CurrentThreadId; // eax + DWORD v2; // esi + DWORD result; // eax + + CurrentThreadId = GetCurrentThreadId(); + v2 = CurrentThreadId; + if ( _InterlockedAdd((volatile signed __int32 *)a1, 1u) ) + { + if ( *(_DWORD *)(a1 + 8) == CurrentThreadId ) + { + _InterlockedSub((volatile signed __int32 *)a1, 1u); + result = 0; + ++*(_DWORD *)(a1 + 4); + } + else + { + result = WaitForSingleObject(*(HANDLE *)(a1 + 12), 0xFFFFFFFF); + if ( result ) + { + _InterlockedSub((volatile signed __int32 *)a1, 1u); + return 1; + } + else + { + *(_DWORD *)(a1 + 4) = 1; + *(_DWORD *)(a1 + 8) = v2; + } + } + } + else + { + *(_DWORD *)(a1 + 4) = 1; + *(_DWORD *)(a1 + 8) = CurrentThreadId; + return 0; + } + return result; +} + +//----- (004344A0) -------------------------------------------------------- +int __cdecl __gthr_win32_recursive_mutex_trylock(int a1) +{ + DWORD CurrentThreadId; // edx + int result; // eax + + CurrentThreadId = GetCurrentThreadId(); + if ( _InterlockedCompareExchange((volatile signed __int32 *)a1, 0, -1) < 0 ) + { + *(_DWORD *)(a1 + 4) = 1; + result = 0; + *(_DWORD *)(a1 + 8) = CurrentThreadId; + } + else + { + result = 1; + if ( *(_DWORD *)(a1 + 8) == CurrentThreadId ) + { + ++*(_DWORD *)(a1 + 4); + return 0; + } + } + return result; +} + +//----- (004344F0) -------------------------------------------------------- +BOOL __cdecl __gthr_win32_recursive_mutex_unlock(int a1) +{ + bool v1; // zf + + v1 = (*(_DWORD *)(a1 + 4))-- == 1; + if ( v1 && (*(_DWORD *)(a1 + 8) = 0, _InterlockedDecrement((volatile signed __int32 *)a1) >= 0) ) + return !ReleaseSemaphore(*(HANDLE *)(a1 + 12), 1, 0); + else + return 0; +} + +//----- (00434550) -------------------------------------------------------- +int __cdecl __gthr_win32_recursive_mutex_destroy(int a1) +{ + _IAT_start__(*(_DWORD *)(a1 + 12)); + return 0; +} +// 15231F8: using guessed type int __stdcall _IAT_start__(_DWORD); + +//----- (00434570) -------------------------------------------------------- +int __usercall _Unwind_RaiseException_Phase2@(_DWORD *a1@, _DWORD *a2@, int *a3@) +{ + int v3; // edi + _DWORD *v6; // eax + int v7; // ecx + int v8; // ebp + int result; // eax + int (__cdecl *v10)(int, int, _DWORD, _DWORD, _DWORD *, _DWORD *); // [esp+28h] [ebp-24h] + + v3 = 1; + v6 = (_DWORD *)*a2; + if ( !*a2 ) + return 2; + while ( 1 ) + { + v10 = (int (__cdecl *)(int, int, _DWORD, _DWORD, _DWORD *, _DWORD *))v6[6]; + if ( v6 == (_DWORD *)a1[4] ) + { + if ( !v10 ) + goto LABEL_14; + v7 = 6; + v8 = 4; + } + else + { + v7 = 2; + v8 = 0; + if ( !v10 ) + goto LABEL_8; + } + result = v10(1, v7, *a1, a1[1], a1, a2); + if ( result == 7 ) + break; + if ( result != 8 ) + return 2; + if ( v8 ) +LABEL_14: + abort(); + v6 = (_DWORD *)*a2; +LABEL_8: + v6 = (_DWORD *)*v6; + ++v3; + *a2 = v6; + if ( !v6 ) + return 2; + } + *a3 = v3; + return result; +} + +//----- (00434630) -------------------------------------------------------- +BOOL fc_key_init() +{ + int v0; // eax + DWORD LastError; // eax + BOOL result; // eax + + v0 = TlsAlloc(); + if ( v0 == -1 ) + { + LastError = GetLastError(); + } + else + { + fc_key = v0; + LastError = __mingwthr_key_dtor(v0, 0); + } + result = LastError == 0; + use_fc_key = result; + return result; +} +// 50B0FC: using guessed type int use_fc_key; + +//----- (00434670) -------------------------------------------------------- +void fc_key_init_once() +{ + int v0; // eax + DWORD LastError; // eax + + if ( !_CRT_MT ) + goto LABEL_4; + if ( once_0 ) + { + if ( use_fc_key < 0 ) +LABEL_4: + use_fc_key = 0; + } + else if ( _InterlockedAdd(&dword_50B0F8, 1u) ) + { + while ( !once_0 ) + Sleep(0); + if ( use_fc_key < 0 ) + use_fc_key = 0; + } + else + { + v0 = TlsAlloc(); + if ( v0 == -1 ) + { + LastError = GetLastError(); + } + else + { + fc_key = v0; + LastError = __mingwthr_key_dtor(v0, 0); + } + once_0 = 1; + use_fc_key = LastError == 0; + } +} +// 50B0F0: using guessed type int _CRT_MT; +// 50B0F4: using guessed type int once_0; +// 50B0F8: using guessed type int dword_50B0F8; +// 50B0FC: using guessed type int use_fc_key; + +//----- (00434750) -------------------------------------------------------- +LPVOID _Unwind_SjLj_GetContext() +{ + int v0; // ebx + DWORD dwTlsIndex; // ebx + DWORD LastError; // esi + LPVOID Value; // ebx + + if ( use_fc_key < 0 ) + { + fc_key_init_once(); + v0 = fc_static; + if ( !use_fc_key ) + return (LPVOID)v0; + } + else + { + v0 = fc_static; + if ( !use_fc_key ) + return (LPVOID)v0; + } + dwTlsIndex = fc_key; + LastError = GetLastError(); + Value = TlsGetValue(dwTlsIndex); + SetLastError(LastError); + return Value; +} +// 50B0FC: using guessed type int use_fc_key; +// 1522344: using guessed type int fc_static; + +//----- (004347C0) -------------------------------------------------------- +int __usercall uw_install_context_constprop_0@(int a1@) +{ + void *v2; // esi + int v3; // eax + + v2 = *(void **)a1; + v3 = use_fc_key; + if ( use_fc_key < 0 ) + { + fc_key_init_once(); + v3 = use_fc_key; + } + if ( v3 ) + { + if ( !TlsSetValue(fc_key, v2) ) + GetLastError(); + } + else + { + fc_static = (int)v2; + } + return (*(int (**)(void))(*(_DWORD *)a1 + 36))(); +} +// 50B0FC: using guessed type int use_fc_key; +// 1522344: using guessed type int fc_static; + +//----- (00434820) -------------------------------------------------------- +int __usercall _Unwind_ForcedUnwind_Phase2@(_DWORD *a1@, void ***a2@, int *a3@) +{ + int v4; // esi + void **i; // eax + int (__cdecl *v7)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); // ebp + int result; // eax + void *lpTlsValue; // ecx + int v10; // eax + int (__cdecl *v11)(int, int, _DWORD, _DWORD, _DWORD *, void ***, int); // [esp+20h] [ebp-2Ch] + int v12; // [esp+24h] [ebp-28h] + void *v13; // [esp+28h] [ebp-24h] + + v4 = 1; + v11 = (int (__cdecl *)(int, int, _DWORD, _DWORD, _DWORD *, void ***, int))a1[3]; + v12 = a1[4]; + for ( i = *a2; i; *a2 = i ) + { + while ( 1 ) + { + v7 = (int (__cdecl *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))i[6]; + if ( v11(1, 10, *a1, a1[1], a1, a2, v12) ) + return 2; + if ( v7 ) + { + result = v7(1, 10, *a1, a1[1], a1, a2); + if ( result == 7 ) + goto LABEL_17; + if ( result != 8 ) + return 2; + } + lpTlsValue = **a2; + v10 = use_fc_key; + if ( use_fc_key < 0 ) + { + v13 = **a2; + fc_key_init_once(); + v10 = use_fc_key; + lpTlsValue = v13; + } + if ( v10 ) + break; + fc_static = (int)lpTlsValue; +LABEL_4: + ++v4; + i = (void **)**a2; + *a2 = i; + if ( !i ) + goto LABEL_14; + } + if ( TlsSetValue(fc_key, lpTlsValue) ) + goto LABEL_4; + GetLastError(); + ++v4; + i = (void **)**a2; + } +LABEL_14: + if ( v11(1, 26, *a1, a1[1], a1, a2, v12) ) + return 2; + result = 5; +LABEL_17: + *a3 = v4; + return result; +} +// 50B0FC: using guessed type int use_fc_key; +// 1522344: using guessed type int fc_static; + +//----- (004349B0) -------------------------------------------------------- +void __cdecl _Unwind_SjLj_Register(struct SjLj_Function_Context *lpfctx) +{ + int v1; // eax + struct SjLj_Function_Context *v2; // eax + DWORD dwTlsIndex; // esi + DWORD LastError; // edi + struct SjLj_Function_Context *Value; // esi + DWORD v6; // eax + + v1 = use_fc_key; + if ( use_fc_key < 0 ) + { + fc_key_init_once(); + v1 = use_fc_key; + } + if ( v1 ) + { + dwTlsIndex = fc_key; + LastError = GetLastError(); + Value = (struct SjLj_Function_Context *)TlsGetValue(dwTlsIndex); + SetLastError(LastError); + v6 = fc_key; + lpfctx->prev = Value; + if ( !TlsSetValue(v6, lpfctx) ) + GetLastError(); + } + else + { + v2 = (struct SjLj_Function_Context *)fc_static; + fc_static = (int)lpfctx; + lpfctx->prev = v2; + } +} +// 50B0FC: using guessed type int use_fc_key; +// 1522344: using guessed type int fc_static; + +//----- (00434A40) -------------------------------------------------------- +void __cdecl _Unwind_SjLj_Unregister(struct SjLj_Function_Context *lpfctx) +{ + struct SjLj_Function_Context *lpTlsValue; // ebx + int v2; // eax + + lpTlsValue = lpfctx->prev; + v2 = use_fc_key; + if ( use_fc_key < 0 ) + { + fc_key_init_once(); + v2 = use_fc_key; + } + if ( v2 ) + { + if ( !TlsSetValue(fc_key, lpTlsValue) ) + GetLastError(); + } + else + { + fc_static = (int)lpTlsValue; + } +} +// 50B0FC: using guessed type int use_fc_key; +// 1522344: using guessed type int fc_static; + +//----- (00434AA0) -------------------------------------------------------- +_Unwind_Word __cdecl _Unwind_GetGR(struct _Unwind_Context *lpuctx, int r) +{ + return *(_DWORD *)(*(_DWORD *)lpuctx + 4 * r + 8); +} + +//----- (00434AB0) -------------------------------------------------------- +int __cdecl _Unwind_GetCFA(int a1) +{ + int result; // eax + + result = 0; + if ( *(_DWORD *)a1 ) + return *(_DWORD *)(*(_DWORD *)a1 + 40); + return result; +} + +//----- (00434AC0) -------------------------------------------------------- +void __cdecl _Unwind_SetGR(struct _Unwind_Context *lpuctx, int r, _Unwind_Word v) +{ + *(_DWORD *)(*(_DWORD *)lpuctx + 4 * r + 8) = v; +} + +//----- (00434AE0) -------------------------------------------------------- +int __cdecl _Unwind_GetIP(int a1) +{ + return *(_DWORD *)(*(_DWORD *)a1 + 4) + 1; +} + +//----- (00434AF0) -------------------------------------------------------- +int __cdecl _Unwind_GetIPInfo(int a1, _DWORD *a2) +{ + int result; // eax + + *a2 = 0; + result = 0; + if ( *(_DWORD *)a1 ) + return *(_DWORD *)(*(_DWORD *)a1 + 4) + 1; + return result; +} + +//----- (00434B10) -------------------------------------------------------- +int __cdecl _Unwind_SetIP(int a1, int a2) +{ + int result; // eax + + result = a2 - 1; + *(_DWORD *)(*(_DWORD *)a1 + 4) = a2 - 1; + return result; +} + +//----- (00434B30) -------------------------------------------------------- +int __cdecl _Unwind_GetLanguageSpecificData(int a1) +{ + return *(_DWORD *)(*(_DWORD *)a1 + 28); +} + +//----- (00434B40) -------------------------------------------------------- +int _Unwind_GetRegionStart() +{ + return 0; +} + +//----- (00434B50) -------------------------------------------------------- +int _Unwind_FindEnclosingFunction() +{ + return 0; +} + +//----- (00434B60) -------------------------------------------------------- +int _Unwind_GetDataRelBase() +{ + return 0; +} + +//----- (00434B70) -------------------------------------------------------- +int _Unwind_GetTextRelBase() +{ + return 0; +} + +//----- (00434B80) -------------------------------------------------------- +_Unwind_Reason_Code __cdecl _Unwind_SjLj_RaiseException(struct _Unwind_Exception *lpuexcpt) +{ + _DWORD *Value; // esi + _DWORD *v2; // eax + int (__cdecl *v3)(int, int, _DWORD, _DWORD, struct _Unwind_Exception *, _DWORD **); // ecx + int v4; // eax + _Unwind_Reason_Code result; // eax + DWORD dwTlsIndex; // esi + DWORD LastError; // edi + _DWORD *v8; // eax + _DWORD *v9; // [esp+28h] [ebp-14h] BYREF + int v10[4]; // [esp+2Ch] [ebp-10h] BYREF + + if ( use_fc_key < 0 ) + { + fc_key_init_once(); + Value = (_DWORD *)fc_static; + if ( !use_fc_key ) + goto LABEL_3; +LABEL_12: + dwTlsIndex = fc_key; + LastError = GetLastError(); + Value = TlsGetValue(dwTlsIndex); + SetLastError(LastError); + goto LABEL_3; + } + Value = (_DWORD *)fc_static; + if ( use_fc_key ) + goto LABEL_12; +LABEL_3: + v9 = Value; + if ( !Value ) + return 5; + v2 = Value; + while ( 1 ) + { + v3 = (int (__cdecl *)(int, int, _DWORD, _DWORD, struct _Unwind_Exception *, _DWORD **))v2[6]; + if ( !v3 ) + goto LABEL_8; + v4 = v3(1, 1, *(_DWORD *)lpuexcpt, *((_DWORD *)lpuexcpt + 1), lpuexcpt, &v9); + if ( v4 == 6 ) + break; + if ( v4 != 8 ) + return 3; +LABEL_8: + v2 = (_DWORD *)*v9; + v9 = v2; + if ( !v2 ) + return 5; + } + v8 = v9; + *((_DWORD *)lpuexcpt + 3) = 0; + v9 = Value; + *((_DWORD *)lpuexcpt + 4) = v8; + result = _Unwind_RaiseException_Phase2(lpuexcpt, &v9, v10); + if ( result != _URC_INSTALL_CONTEXT ) + return result; + uw_install_context_constprop_0((int)&v9); + return 3; +} +// 50B0FC: using guessed type int use_fc_key; +// 1522344: using guessed type int fc_static; +// 434B80: using guessed type int var_10[4]; + +//----- (00434C90) -------------------------------------------------------- +_Unwind_Reason_Code __cdecl _Unwind_SjLj_ForcedUnwind( + struct _Unwind_Exception *lpuexcpt, + _Unwind_Stop_Fn pfnstop, + void *pdata) +{ + void **Value; // esi + _Unwind_Reason_Code result; // eax + DWORD dwTlsIndex; // esi + DWORD LastError; // edi + void **v7; // [esp+18h] [ebp-14h] BYREF + int v8[4]; // [esp+1Ch] [ebp-10h] BYREF + + if ( use_fc_key < 0 ) + { + fc_key_init_once(); + Value = (void **)fc_static; + if ( !use_fc_key ) + goto LABEL_3; + } + else + { + Value = (void **)fc_static; + if ( !use_fc_key ) + goto LABEL_3; + } + dwTlsIndex = fc_key; + LastError = GetLastError(); + Value = (void **)TlsGetValue(dwTlsIndex); + SetLastError(LastError); +LABEL_3: + v7 = Value; + *((_DWORD *)lpuexcpt + 3) = pfnstop; + *((_DWORD *)lpuexcpt + 4) = pdata; + result = _Unwind_ForcedUnwind_Phase2(lpuexcpt, &v7, v8); + if ( result == _URC_INSTALL_CONTEXT ) + { + uw_install_context_constprop_0((int)&v7); + _Unwind_SjLj_Resume(lpuexcpt); + } + return result; +} +// 50B0FC: using guessed type int use_fc_key; +// 1522344: using guessed type int fc_static; +// 434C90: using guessed type int var_10[4]; + +//----- (00434D30) -------------------------------------------------------- +void __cdecl __noreturn _Unwind_SjLj_Resume(struct _Unwind_Exception *lpuexcpt) +{ + LPVOID Context; // eax + int *v2; // ecx + void ***v3; // edx + struct _Unwind_Exception *v4; // eax + int i; // eax + LPVOID v6; // [esp+8h] [ebp-14h] BYREF + int v7[4]; // [esp+Ch] [ebp-10h] BYREF + + Context = _Unwind_SjLj_GetContext(); + v2 = v7; + v3 = (void ***)&v6; + v6 = Context; + v4 = lpuexcpt; + if ( *((_DWORD *)lpuexcpt + 3) ) + goto LABEL_5; + for ( i = _Unwind_RaiseException_Phase2(lpuexcpt, &v6, v7); ; i = _Unwind_ForcedUnwind_Phase2(v4, v3, v2) ) + { + if ( i != 7 ) + abort(); + v4 = (struct _Unwind_Exception *)uw_install_context_constprop_0((int)&v6); +LABEL_5: + ; + } +} +// 434D66: variable 'v3' is possibly undefined +// 434D66: variable 'v2' is possibly undefined +// 434D30: using guessed type int var_10[4]; + +//----- (00434D80) -------------------------------------------------------- +_Unwind_Reason_Code __cdecl __noreturn _Unwind_SjLj_Resume_or_Rethrow(struct _Unwind_Exception *lpuexcpt) +{ + void **Context; // [esp+8h] [ebp-14h] BYREF + int v3[4]; // [esp+Ch] [ebp-10h] BYREF + + if ( *((_DWORD *)lpuexcpt + 3) ) + { + Context = (void **)_Unwind_SjLj_GetContext(); + if ( _Unwind_ForcedUnwind_Phase2(lpuexcpt, &Context, v3) == 7 ) + uw_install_context_constprop_0((int)&Context); + abort(); + } + return _Unwind_SjLj_RaiseException(lpuexcpt); +} +// 434D80: using guessed type int var_10[4]; + +//----- (00434DD0) -------------------------------------------------------- +void __cdecl _Unwind_DeleteException(struct _Unwind_Exception *lpuexcpt) +{ + void (__cdecl *v1)(int, struct _Unwind_Exception *); // eax + + v1 = (void (__cdecl *)(int, struct _Unwind_Exception *))*((_DWORD *)lpuexcpt + 2); + if ( v1 ) + v1(1, lpuexcpt); +} + +//----- (00434DF0) -------------------------------------------------------- +_Unwind_Reason_Code __cdecl _Unwind_Backtrace(_Unwind_Trace_Fn pfntrace, void *lpdata) +{ + LPVOID Value; // ebx + DWORD dwTlsIndex; // ebx + DWORD LastError; // ebp + int v6[8]; // [esp+1Ch] [ebp-20h] BYREF + + if ( use_fc_key < 0 ) + { + fc_key_init_once(); + Value = (LPVOID)fc_static; + if ( !use_fc_key ) + goto LABEL_3; +LABEL_11: + dwTlsIndex = fc_key; + LastError = GetLastError(); + Value = TlsGetValue(dwTlsIndex); + SetLastError(LastError); + goto LABEL_3; + } + Value = (LPVOID)fc_static; + if ( use_fc_key ) + goto LABEL_11; +LABEL_3: + v6[0] = (int)Value; + while ( Value ) + { + if ( pfntrace((struct _Unwind_Context *)v6, lpdata) ) + return 3; + Value = *(LPVOID *)v6[0]; + v6[0] = *(_DWORD *)v6[0]; + } + if ( pfntrace((struct _Unwind_Context *)v6, lpdata) == _URC_NO_REASON ) + return 5; + return 3; +} +// 50B0FC: using guessed type int use_fc_key; +// 1522344: using guessed type int fc_static; + +//----- (00434EB0) -------------------------------------------------------- +void __cdecl emutls_destroy(int *a1) +{ + int v1; // edi + int v2; // ebx + int v3; // eax + + v1 = *a1; + if ( *a1 ) + { + v2 = 0; + do + { + v3 = a1[v2 + 1]; + if ( v3 ) + free(*(void **)(v3 - 4)); + ++v2; + } + while ( v1 != v2 ); + } + free(a1); +} + +//----- (00434F00) -------------------------------------------------------- +_DWORD *__usercall emutls_alloc@(size_t *a1@) +{ + size_t v2; // ebp + int v3; // edi + _DWORD *v4; // eax + _DWORD *v5; // ebx + const void *Src; // eax + void *v8; // eax + size_t v9; // [esp+8h] [ebp-24h] + + v2 = a1[1]; + v3 = *a1; + if ( v2 > 4 ) + { + v8 = malloc(v2 + v3 + 3); + if ( v8 ) + { + v5 = (_DWORD *)(-v2 & ((unsigned int)v8 + v2 + 3)); + *(v5 - 1) = v8; + Src = (const void *)a1[3]; + v9 = v3; + if ( Src ) + goto LABEL_4; + goto LABEL_7; + } +LABEL_8: + abort(); + } + v4 = malloc(v3 + 4); + if ( !v4 ) + goto LABEL_8; + *v4 = v4; + v5 = v4 + 1; + Src = (const void *)a1[3]; + v9 = v3; + if ( Src ) + { +LABEL_4: + memcpy(v5, Src, v9); + return v5; + } +LABEL_7: + memset(v5, 0, v9); + return v5; +} + +//----- (00434FA0) -------------------------------------------------------- +DWORD emutls_init() +{ + int v0; // eax + DWORD result; // eax + + emutls_mutex = -1; + hHandle = CreateSemaphoreW(0, 0, 0xFFFF, 0); + v0 = TlsAlloc(); + if ( v0 == -1 ) + { + result = GetLastError(); + } + else + { + emutls_key = v0; + result = __mingwthr_key_dtor(v0, (int)emutls_destroy); + } + if ( result ) + abort(); + return result; +} +// 1522350: using guessed type int emutls_mutex; + +//----- (00435020) -------------------------------------------------------- +_DWORD *__cdecl __emutls_get_address(size_t *a1) +{ + _DWORD *result; // eax + unsigned int v2; // edi + DWORD dwTlsIndex; // ebx + DWORD LastError; // esi + unsigned int *Value; // ebx + unsigned int v6; // edx + unsigned int v7; // edi + unsigned int *v8; // eax + int v9; // ecx + unsigned int *v10; // eax + int v11; // [esp+18h] [ebp-24h] + unsigned int v12; // [esp+1Ch] [ebp-20h] + + if ( !_CRT_MT ) + { + result = (_DWORD *)a1[2]; + if ( !result ) + { + result = emutls_alloc(a1); + a1[2] = (size_t)result; + } + return result; + } + v2 = a1[2]; + if ( !v2 ) + { + if ( !_CRT_MT ) + goto LABEL_27; + if ( once_0_0 ) + goto LABEL_38; + if ( _InterlockedAdd(&dword_50B104, 1u) ) + { + while ( !once_0_0 ) + Sleep(0); + } + else + { + emutls_init(); + once_0_0 = 1; + } + if ( _CRT_MT ) + { +LABEL_38: + if ( _InterlockedAdd(&emutls_mutex, 1u) && WaitForSingleObject(hHandle, 0xFFFFFFFF) ) + _InterlockedSub(&emutls_mutex, 1u); + v2 = a1[2]; + if ( v2 ) + goto LABEL_14; + } + else + { +LABEL_27: + v2 = a1[2]; + if ( v2 ) + goto LABEL_5; + } + v2 = emutls_size + 1; + emutls_size = v2; + a1[2] = v2; +LABEL_14: + if ( _CRT_MT && _InterlockedDecrement(&emutls_mutex) >= 0 ) + ReleaseSemaphore(hHandle, 1, 0); + } +LABEL_5: + dwTlsIndex = emutls_key; + LastError = GetLastError(); + Value = (unsigned int *)TlsGetValue(dwTlsIndex); + SetLastError(LastError); + if ( !Value ) + { + v8 = (unsigned int *)calloc(v2 + 33, 4u); + Value = v8; + if ( v8 ) + { + *v8 = v2 + 32; + goto LABEL_19; + } +LABEL_35: + abort(); + } + v6 = *Value; + if ( *Value < v2 ) + { + v9 = 2 * v6; + v12 = *Value; + if ( v2 > 2 * v6 ) + v9 = v2 + 32; + v11 = v9; + v10 = (unsigned int *)realloc(Value, 4 * v9 + 4); + Value = v10; + if ( v10 ) + { + *v10 = v11; + memset(&v10[v12 + 1], 0, 4 * (v11 - v12)); +LABEL_19: + if ( !TlsSetValue(emutls_key, Value) ) + GetLastError(); + goto LABEL_7; + } + goto LABEL_35; + } +LABEL_7: + v7 = v2 - 1; + result = (_DWORD *)Value[v7 + 1]; + if ( !result ) + { + result = emutls_alloc(a1); + Value[v7 + 1] = (unsigned int)result; + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50B100: using guessed type int once_0_0; +// 50B104: using guessed type int dword_50B104; +// 1522348: using guessed type int emutls_size; +// 1522350: using guessed type int emutls_mutex; + +//----- (004352C0) -------------------------------------------------------- +unsigned int *__cdecl __emutls_register_common(unsigned int *a1, unsigned int a2, unsigned int a3, unsigned int a4) +{ + unsigned int *result; // eax + + result = a1; + if ( *a1 < a2 ) + { + *a1 = a2; + a1[3] = 0; + } + if ( a1[1] < a3 ) + a1[1] = a3; + if ( a4 ) + { + if ( *a1 == a2 ) + a1[3] = a4; + } + return result; +} + +//----- (00435300) -------------------------------------------------------- +long double __cdecl __mingw_strtod(unsigned __int8 *a1, unsigned __int8 **a2) +{ + char v2; // al + double v4; // [esp+28h] [ebp-24h] + int v5; // [esp+34h] [ebp-18h] BYREF + double v6; // [esp+38h] [ebp-14h] BYREF + + v2 = __strtodg(a1, a2, fpi_0, &v5, &v6); + switch ( v2 & 7 ) + { + case 0: + case 6: + v4 = 0.0; + if ( (v2 & 8) != 0 ) + goto LABEL_4; + break; + case 1: + LODWORD(v4) = LODWORD(v6); + HIDWORD(v4) = HIDWORD(v6) & 0xFFEFFFFF | ((v5 + 1075) << 20); + if ( (v2 & 8) != 0 ) + goto LABEL_4; + break; + case 2: + v4 = v6; + if ( (v2 & 8) != 0 ) + goto LABEL_4; + break; + case 3: + v4 = INFINITY; + if ( (v2 & 8) != 0 ) + goto LABEL_4; + break; + case 4: + v4 = NAN; + if ( (v2 & 8) != 0 ) + goto LABEL_4; + break; + case 5: + *(_QWORD *)&v4 = *(_QWORD *)&v6 | 0x7FF0000000000000LL; + goto LABEL_3; + default: +LABEL_3: + if ( (v2 & 8) != 0 ) +LABEL_4: + HIDWORD(v4) |= 0x80000000; + break; + } + return v4; +} +// 43535A: variable 'v4' is possibly undefined +// 50B108: using guessed type int fpi_0[6]; + +//----- (00435420) -------------------------------------------------------- +long double __cdecl __mingw_strtof(unsigned __int8 *a1, unsigned __int8 **a2) +{ + char v2; // al + float v3; // edx + float v5; // [esp+38h] [ebp-14h] BYREF + int v6[4]; // [esp+3Ch] [ebp-10h] BYREF + + v2 = __strtodg(a1, a2, fpi0_0, v6, &v5); + switch ( v2 & 7 ) + { + case 1: + case 5: + LODWORD(v3) = (unsigned int)&unk_7FFFFF & LODWORD(v5) | ((v6[0] + 150) << 23); + break; + case 2: + v3 = v5; + break; + case 3: + v3 = INFINITY; + break; + case 4: + v3 = NAN; + break; + default: + v3 = 0.0; + break; + } + if ( (v2 & 8) != 0 ) + LODWORD(v3) |= 0x80000000; + return v3; +} +// 50B120: using guessed type int fpi0_0[6]; +// 435420: using guessed type int var_10[4]; + +//----- (004354C0) -------------------------------------------------------- +wint_t __cdecl btowc(int Ch) +{ + wint_t result; // ax + unsigned int CodePage; // eax + CHAR MultiByteStr; // [esp+2Dh] [ebp-Fh] BYREF + __int16 WideCharStr[7]; // [esp+2Eh] [ebp-Eh] BYREF + + result = -1; + if ( Ch != -1 ) + { + MultiByteStr = Ch; + WideCharStr[0] = -1; + CodePage = ___lc_codepage_func(); + MultiByteToWideChar(CodePage, 8u, &MultiByteStr, 1, (LPWSTR)WideCharStr, 1); + return WideCharStr[0]; + } + return result; +} +// 4354C0: using guessed type WCHAR WideCharStr[7]; + +//----- (00435530) -------------------------------------------------------- +int __cdecl __asctoe64(char *Str, long double *a2) +{ + char *v2; // edi + size_t v3; // eax + char *v4; // esi + int v5; // eax + void *v6; // esp + void *v7; // esp + int i; // esi + int v9; // ebx + int v10; // eax + int *v11; // edx + char *v12; // esi + char *v13; // eax + char v14; // al + char *v15; // esi + char *v16; // ebx + char *v18; // edx + char v19; // al + int v20; // edx + __int16 *v21; // ebx + int v22; // ecx + __int16 v23; // ax + int v24; // ecx + __int16 *v25; // ebx + __int16 j; // ax + __int16 v27; // ax + __int16 *v28; // ecx + __int16 v29; // ax + int v30; // esi + char *v31; // esi + int v32; // eax + char v33; // al + int v34; // ecx + int v35; // edx + int v36; // ebx + int v37; // edx + __int16 *v38; // ecx + __int16 k; // ax + __int16 v40; // ax + int v41; // edx + __int16 *v42; // ecx + __int16 v43; // ax + __int16 *v44; // edx + __int16 v45; // ax + bool v46; // zf + int v47; // eax + long double v48; // fst6 + __int16 v49; // fps + int v54; // eax + char *v55; // ebx + int v56; // esi + __int64 *v57; // eax + int v58; // edi + int v59; // ebx + int v60; // ebx + int v61; // eax + int v62; // ebx + int v63; // [esp+0h] [ebp-B8h] + int v64; // [esp+20h] [ebp-98h] BYREF + int v65; // [esp+28h] [ebp-90h] + int v66; // [esp+2Ch] [ebp-8Ch] + int v67; // [esp+30h] [ebp-88h] + int v68; // [esp+34h] [ebp-84h] + __int64 *v69; // [esp+38h] [ebp-80h] + int v70; // [esp+3Ch] [ebp-7Ch] + char *v71; // [esp+40h] [ebp-78h] + unsigned __int16 v72; // [esp+46h] [ebp-72h] + int v73; // [esp+48h] [ebp-70h] + int v74; // [esp+4Ch] [ebp-6Ch] + int *v75; // [esp+50h] [ebp-68h] + int v76; // [esp+54h] [ebp-64h] + int v77; // [esp+58h] [ebp-60h] + char *String2; // [esp+5Ch] [ebp-5Ch] + __int64 v79; // [esp+6Ah] [ebp-4Eh] BYREF + int v80; // [esp+72h] [ebp-46h] + int v81; // [esp+76h] [ebp-42h] + __int16 v82; // [esp+7Ah] [ebp-3Eh] BYREF + __int64 v83; // [esp+7Ch] [ebp-3Ch] BYREF + int v84; // [esp+84h] [ebp-34h] + int v85; // [esp+88h] [ebp-30h] + __int16 v86; // [esp+8Ch] [ebp-2Ch] BYREF + char v87[2]; // [esp+8Eh] [ebp-2Ah] BYREF + unsigned __int16 v88; // [esp+90h] [ebp-28h] + + v2 = Str; + LOBYTE(v74) = *localeconv()->decimal_point; + v3 = strlen(Str); + v4 = (char *)(v3 + 2); + v5 = 16 * ((v3 + 29) >> 4); + v6 = alloca(v5); + v7 = alloca(v5); + String2 = v4; + v75 = &v64; + for ( i = 0; ; ++i ) + { + v9 = (unsigned __int8)*v2; + v10 = isspace(v9); + if ( !v10 ) + break; + ++v2; + } + v67 = i; + v11 = v75; + v68 = 0; + v12 = String2; + while ( 1 ) + { + v11 = (int *)((char *)v11 + 1); + *((_BYTE *)v11 - 1) = v9; + if ( !(_BYTE)v9 ) + break; + if ( (int)v12 <= ++v10 ) + break; + LOBYTE(v9) = v2[v10]; + } + v13 = (char *)v75; + *(_BYTE *)v11 = 0; + v14 = *v13; + if ( v14 == 45 ) + { + String2 = (char *)v75 + 1; + v72 = -1; + } + else + { + v72 = 0; + String2 = (char *)v75 + (v14 == 43); + } + if ( !_strnicmp(String1, String2, 3u) ) + { + v31 = String2; + v16 = String2 + 3; + v32 = _strnicmp("INITY", String2 + 3, 5u); + HIDWORD(v79) = 0; + v80 = 0; + if ( !v32 ) + v16 = v31 + 8; + v81 = 0; + v82 = 0; + WORD1(v79) = 0x7FFF; + goto LABEL_13; + } + v15 = String2; + if ( !_strnicmp(off_514C0A, String2, 3u) ) + { + *(_DWORD *)((char *)&v79 + 2) = 0x7FFF; + v80 = 0; + v16 = v15 + 3; + HIWORD(v79) = -16384; + v81 = 0; + v82 = 0; +LABEL_13: + LOWORD(v79) = v72; + __toe64(&v79, (int)a2); + return v67 + v16 - (char *)v75; + } + v18 = String2; + v79 = 0LL; + v19 = *String2; + v80 = 0; + v81 = 0; + v82 = 0; + if ( v19 == 48 ) + { + do + v19 = *++v18; + while ( v19 == 48 ); + String2 = v18; + v65 = 1; + } + else + { + v65 = 0; + } + v70 = 0; + v73 = 0; + v66 = 0; + v71 = 0; + v76 = 0; + while ( 1 ) + { + v77 = v19 - 48; + if ( (unsigned int)v77 <= 9 ) + { + v20 = WORD2(v79); + if ( WORD2(v79) ) + { + v66 |= v77; + v71 = (char *)((__PAIR64__((unsigned int)v71, v76) - 1) >> 32); + } + else + { + v21 = &v82; + v71 += -(v76 == 0) + 1; + v22 = 0; + do + { + if ( *v21 < 0 ) + v22 |= 1u; + v23 = 2 * *v21; + if ( (v22 & 2) != 0 ) + v23 |= 1u; + --v21; + v22 *= 2; + v21[1] = v23; + } + while ( v21 != (__int16 *)((char *)&v79 + 2) ); + v24 = 0; + v69 = &v83; + v86 = 0; + v25 = &v86; + v83 = v79; + v84 = v80; + v85 = v81; + for ( j = 0; ; j = *v25 ) + { + if ( j < 0 ) + v24 |= 1u; + v27 = 2 * j; + if ( (v24 & 2) != 0 ) + v27 |= 1u; + --v25; + v24 *= 2; + v25[1] = v27; + if ( v25 == (__int16 *)((char *)&v83 + 2) ) + break; + } + v28 = &v86; + do + { + if ( *v28 < 0 ) + v20 |= 1u; + v29 = 2 * *v28; + if ( (v20 & 2) != 0 ) + v29 |= 1u; + --v28; + v20 *= 2; + v28[1] = v29; + } + while ( v28 != (__int16 *)((char *)&v83 + 2) ); + v30 = (int)v69; + __eaddm((int)v69, (int)&v79); + *(_DWORD *)v30 = 0; + *(_DWORD *)(v30 + 4) = 0; + *(_DWORD *)(v30 + 8) = 0; + *(_DWORD *)(v30 + 12) = 0; + *(_WORD *)(v30 + 16) = 0; + HIWORD(v85) = v77; + __eaddm(v30, (int)&v79); + } + ++v70; + v73 |= v77; + goto LABEL_23; + } + if ( (_BYTE)v74 != v19 ) + break; + if ( v76 ) + { + v76 = v65 | v70; + goto LABEL_66; + } + v76 = 1; +LABEL_23: + v19 = *++String2; + } + v76 = v65 | v70; + if ( (v19 & 0xDF) == 69 ) + { + if ( v65 | v70 ) + { + v33 = String2[1]; + if ( v33 == 45 ) + { + v34 = -1; + v16 = String2 + 2; + v33 = String2[2]; + } + else + { + v16 = String2 + 1; + v34 = 1; + } + if ( v33 == 43 ) + v33 = *++v16; + if ( (unsigned __int8)(v33 - 48) <= 9u ) + { + v35 = v68; + do + { + if ( v35 <= 4977 ) + v35 = (char)(v33 - 48) + 10 * v35; + v33 = *++v16; + } + while ( (unsigned __int8)(v33 - 48) <= 9u ); + v68 = v35; + if ( v34 == -1 ) + { + if ( v35 > 4977 ) + { + v82 = 0; + v79 = v72; + v80 = 0; + v81 = 0; + __toe64(&v79, (int)a2); + if ( !v73 ) + return v67 + v16 - (char *)v75; + String2 = v16; + goto LABEL_93; + } + String2 = v16; + v68 = -v35; + } + else + { + if ( v68 > 4977 ) + { + v79 = 0LL; + v82 = 0; + v80 = 0; + v81 = 0; + if ( !v73 ) + goto LABEL_13; + WORD1(v79) = 0x7FFF; + LOWORD(v79) = v72; + __toe64(&v79, (int)a2); + String2 = v16; + goto LABEL_93; + } + String2 = v16; + } + } + } + else + { + v68 = 0; + } + } +LABEL_66: + v77 = v68 - (_DWORD)v71; + if ( v68 - (int)v71 > 0 ) + { + while ( 1 ) + { + v36 = WORD2(v79); + if ( WORD2(v79) ) + break; + v37 = 0; + v38 = &v86; + v86 = 0; + v83 = v79; + v84 = v80; + v85 = v81; + for ( k = 0; ; k = *v38 ) + { + if ( k < 0 ) + v37 |= 1u; + v40 = 2 * k; + if ( (v37 & 2) != 0 ) + v40 |= 1u; + --v38; + v37 *= 2; + v38[1] = v40; + if ( v38 == (__int16 *)((char *)&v83 + 2) ) + break; + } + v41 = 0; + v42 = &v86; + do + { + if ( *v42 < 0 ) + v41 |= 1u; + v43 = 2 * *v42; + if ( (v41 & 2) != 0 ) + v43 |= 1u; + --v42; + v41 *= 2; + v42[1] = v43; + } + while ( v42 != (__int16 *)((char *)&v83 + 2) ); + __eaddm((int)&v79, (int)&v83); + v44 = &v86; + do + { + if ( *v44 < 0 ) + v36 |= 1u; + v45 = 2 * *v44; + if ( (v36 & 2) != 0 ) + v45 |= 1u; + --v44; + v36 *= 2; + v44[1] = v45; + } + while ( v44 != (__int16 *)((char *)&v83 + 2) ); + if ( WORD2(v83) ) + break; + v46 = v77-- == 1; + v82 = 0; + v79 = v83; + v80 = v84; + v81 = v85; + if ( v46 ) + { + v47 = __enormlz(&v79); + if ( v47 > 80 ) + goto LABEL_108; + __emdnorm((int)&v79, v66, 0, 16462 - v47, 64, 80); + v74 = WORD1(v79); + goto LABEL_91; + } + } + v54 = __enormlz(&v79); + if ( v54 > 80 ) + goto LABEL_108; + __emdnorm((int)&v79, v66, 0, 16462 - v54, 64, 80); + v70 = 1; + v74 = WORD1(v79); + v71 = v87; +LABEL_101: + v55 = (char *)&unk_514CB0; + v56 = 1; + v83 = (unsigned int)__eone; + v84 = 1073709056; + v57 = &v83; + v58 = v77; + do + { + while ( (v56 & v58) == 0 ) + { + v55 -= 12; + v56 *= 2; + if ( v55 == (char *)&unk_514C14 ) + goto LABEL_105; + } + v56 *= 2; + v63 = (int)v55; + v55 -= 12; + v77 = (int)v57; + __emul(v63, (int)v57, (int)v57); + v57 = (__int64 *)v77; + } + while ( v55 != (char *)&unk_514C14 ); +LABEL_105: + __emovi((int)v57, (int)v71); + if ( v70 == -1 ) + { + v60 = v74 - v88; + v77 = __edivm((int)v71, (int *)&v79); + v74 = v60 + 0x3FFF; + } + else + { + v59 = v74 + v88; + v77 = __emulm((int)v71, (int)&v79); + v74 = v59 - 16382; + } + goto LABEL_91; + } + v61 = __enormlz(&v79); + if ( v61 > 80 ) + { +LABEL_108: + v79 = 0LL; + v80 = 0; + v81 = 0; + v82 = 0; + } + else + { + __emdnorm((int)&v79, v66, 0, 16462 - v61, 64, 80); + v74 = WORD1(v79); + if ( v77 ) + { + if ( v77 < -4096 ) + { + v71 = v87; + __emovi((int)&__etens, (int)v87); + v62 = v74 - v88; + __edivm((int)v87, (int *)&v79); + v70 = -1; + v74 = v62 + 0x3FFF; + v77 = -4096 - v77; + } + else + { + v70 = -1; + v77 = (int)&v71[-v68]; + v71 = v87; + } + goto LABEL_101; + } +LABEL_91: + __emdnorm((int)&v79, v77, 0, v74, 64, 64); + } + LOWORD(v79) = v72; + __toe64(&v79, (int)a2); + if ( !v73 ) + goto LABEL_95; +LABEL_93: + v48 = *a2; + _FST7 = v48; + if ( v48 == 0.0 ) + goto LABEL_98; + __asm { fxam } + if ( (v49 & 0x4500) == 1280 ) +LABEL_98: + *_errno() = 34; +LABEL_95: + if ( !v76 ) + return v76; + v16 = String2; + return v67 + v16 - (char *)v75; +} +// 514CBC: using guessed type int __eone; + +//----- (00435F00) -------------------------------------------------------- +long double __cdecl strtold(const char *String, char **EndPtr) +{ + int v2; // eax + LONG_DOUBLE_12 v4[2]; // [esp+14h] [ebp-18h] BYREF + + memset(v4, 0, 12); + v2 = __asctoe64((char *)String, (long double *)&v4[0].value); + if ( EndPtr ) + *EndPtr = (char *)&String[v2]; + return *(long double *)v4; +} +// 435F00: using guessed type long double var_18[2]; + +//----- (00435F50) -------------------------------------------------------- +int __cdecl wctob(wint_t WCh) +{ + unsigned int CodePage; // eax + CHAR MultiByteStr; // [esp+29h] [ebp-13h] BYREF + WCHAR WideCharStr; // [esp+2Ah] [ebp-12h] BYREF + BOOL UsedDefaultChar; // [esp+2Ch] [ebp-10h] BYREF + + UsedDefaultChar = 0; + WideCharStr = WCh; + CodePage = ___lc_codepage_func(); + if ( !WideCharToMultiByte(CodePage, 0, &WideCharStr, 1, &MultiByteStr, 1, 0, &UsedDefaultChar) || UsedDefaultChar ) + return -1; + else + return MultiByteStr; +} + +//----- (00435FD0) -------------------------------------------------------- +wctype_t __cdecl wctype(const char *name) +{ + const char *Str2; // eax + int v2; // ebx + + Str2 = "alnum"; + v2 = 0; + while ( strcmp(name, Str2) ) + { + if ( ++v2 == 11 ) + return 0; + Str2 = (&cmap)[2 * v2]; + } + return word_514D44[4 * v2]; +} +// 514D40: using guessed type char *cmap; +// 514D44: using guessed type __int16 word_514D44[]; + +//----- (00436030) -------------------------------------------------------- +int __cdecl fseeko64(FILE *Stream, fpos_t a2, int a3) +{ + int v4; // eax + fpos_t Position[4]; // [esp+18h] [ebp-24h] BYREF + + switch ( a3 ) + { + case 1: + if ( !fgetpos(Stream, Position) ) + { + Position[0] += a2; + return fsetpos(Stream, Position); + } + return -1; + case 2: + fflush(Stream); + v4 = _fileno(Stream); + Position[0] = _filelengthi64(v4) + a2; + return fsetpos(Stream, Position); + case 0: + Position[0] = a2; + return fsetpos(Stream, Position); + default: + *_errno() = 22; + return -1; + } +} + +//----- (004360F0) -------------------------------------------------------- +fpos_t __cdecl ftello64(FILE *Stream) +{ + __int64 Position[2]; // [esp+18h] [ebp-14h] BYREF + + if ( fgetpos(Stream, Position) ) + return -1LL; + else + return Position[0]; +} +// 4360F0: using guessed type fpos_t var_14[2]; + +//----- (00436140) -------------------------------------------------------- +int __cdecl __mingw_vfprintf(FILE *Stream, char *a2, int *a3) +{ + int v3; // ebx + + _lock_file(Stream); + v3 = __mingw_pformat(24576, Stream, 0, a2, a3); + _unlock_file(Stream); + return v3; +} + +//----- (00436190) -------------------------------------------------------- +int __cdecl __mingw_vsnprintf(FILE *a1, int a2, char *a3, int *a4) +{ + int v4; // eax + bool v5; // cc + int v6; // edx + int v7; // eax + + if ( !a2 ) + return __mingw_pformat(0, a1, 0, a3, a4); + v4 = __mingw_pformat(0, a1, a2 - 1, a3, a4); + v5 = a2 - 1 <= v4; + v6 = v4; + v7 = a2 - 1; + if ( !v5 ) + v7 = v6; + *((_BYTE *)&a1->_ptr + v7) = 0; + return v6; +} + +//----- (00436210) -------------------------------------------------------- +int __cdecl __mingw_vsprintf(FILE *a1, char *a2, int *a3) +{ + int result; // eax + + result = __mingw_pformat(0x4000, a1, 0, a2, a3); + *((_BYTE *)&a1->_ptr + result) = 0; + return result; +} + +//----- (00436250) -------------------------------------------------------- +int *__cdecl __increment_D2A(int *a1) +{ + int *v1; // ebx + int v2; // esi + int *v3; // eax + int *result; // eax + int *v5; // edi + + v1 = a1; + v2 = a1[4]; + v3 = a1 + 5; + do + { + if ( *v3 != -1 ) + { + ++*v3; + return a1; + } + *v3++ = 0; + } + while ( &a1[v2 + 5] > v3 ); + if ( v2 >= a1[2] ) + { + v5 = __Balloc_D2A(a1[1] + 1); + memcpy(v5 + 3, a1 + 3, 4 * a1[4] + 8); + v1 = v5; + __Bfree_D2A(a1); + v2 = v5[4]; + } + v1[4] = v2 + 1; + result = v1; + v1[v2 + 5] = 1; + return result; +} + +//----- (004362F0) -------------------------------------------------------- +int __usercall rvOK_constprop_0_isra_0@( + int *a1@, + int *a2@, + char *a3@, + double a4, + int a5, + int a6, + _DWORD *a7) +{ + int *v8; // eax + int v9; // ecx + int v10; // edi + int *Size; // ebx + int v12; // eax + int v13; // edx + int v14; // eax + unsigned int v15; // edx + int v16; // ebp + int v18; // eax + int v19; // esi + int v20; // eax + int v21; // eax + int v22; // edx + int *v23; // eax + int v26; // [esp+24h] [ebp-38h] + int v27; // [esp+28h] [ebp-34h] + int v28; // [esp+2Ch] [ebp-30h] + int v29; // [esp+2Ch] [ebp-30h] + int v30; // [esp+38h] [ebp-24h] BYREF + int v31[8]; // [esp+3Ch] [ebp-20h] BYREF + + v8 = __d2b_D2A(a4, v31, &v30); + v9 = v30; + v10 = *a1; + Size = v8; + v12 = v30 - *a1; + v13 = v12 + v31[0]; + v30 = v12; + v31[0] += v12; + if ( v12 <= 0 ) + { + if ( !a5 ) + { + v16 = 0; + goto LABEL_14; + } + v27 = 0; + v26 = 0; + if ( !v12 ) + goto LABEL_18; + Size = __lshift_D2A(Size, v10 - v9); + goto LABEL_37; + } + if ( v10 == 53 ) + { + v16 = 0; + if ( !a5 || a1[3] != 1 ) + goto LABEL_14; + v27 = __any_on_D2A((int)Size, v12); + if ( !v27 ) + { + __rshift_D2A((int)Size, v30); + v26 = 0; + v13 = v31[0]; + goto LABEL_18; + } + } + else + { + if ( a6 != 1 ) + { + if ( a6 == 2 ) + { + v27 = __any_on_D2A((int)Size, v12); + __rshift_D2A((int)Size, v30); +LABEL_6: + Size = __increment_D2A(Size); + v14 = v10 & 0x1F; + if ( (v10 & 0x1F) != 0 ) + v14 = 32 - v14; + _BitScanReverse(&v15, Size[Size[4] + 4]); + if ( (v15 ^ 0x1F) == v14 ) + { + v26 = 32; + v13 = v31[0]; + } + else + { + if ( !v27 ) + v27 = Size[5] & 1; + __rshift_D2A((int)Size, 1); + v26 = 32; + v13 = ++v31[0]; + } + goto LABEL_18; + } + if ( v12 == 1 ) + { + v16 = 0; + if ( !a5 ) + goto LABEL_14; + v22 = ((unsigned int)Size[5] >> 1) & 1; + } + else + { + v22 = ((unsigned int)Size[((v12 - 1) >> 5) + 5] >> (v12 - 1)) & 1; + } + v29 = v22; + v27 = __any_on_D2A((int)Size, v12); + v26 = v27 != 0 ? 0x10 : 0; + __rshift_D2A((int)Size, v30); + if ( v29 ) + goto LABEL_6; + goto LABEL_37; + } + v27 = __any_on_D2A((int)Size, v12); + if ( !v27 ) + { + __rshift_D2A((int)Size, v30); + v26 = 0; + goto LABEL_37; + } + } + __rshift_D2A((int)Size, v30); + v26 = 16; +LABEL_37: + v13 = v31[0]; +LABEL_18: + v18 = a1[1]; + if ( v18 <= v13 ) + { + v21 = a1[2]; + if ( v21 < v13 ) + { + v31[0] = v21 + 1; + *a7 = 163; + v26 = 0; + *_errno() = 34; + v13 = v31[0]; + Size[4] = 0; + } + goto LABEL_30; + } + v31[0] = a1[1]; + v28 = v18 - v13; + if ( v10 < v18 - v13 || (v16 = a1[4]) != 0 ) + { + Size[4] = 0; + v13 = v18; + v26 = 0; + *a7 = 80; +LABEL_30: + v16 = 1; + *a2 = v13; + __copybits_D2A(a3, v10, (size_t)Size); + *a7 |= v26; + goto LABEL_14; + } + if ( v28 - 1 > 0 && !v27 ) + v27 = __any_on_D2A((int)Size, v28 - 1); + if ( a5 | v27 ) + { + v19 = Size[((v28 - 1) >> 5) + 5] & (1 << (v28 - 1)); + __rshift_D2A((int)Size, v28); + *a7 = 2; + if ( v19 ) + { + v23 = __increment_D2A(Size); + v26 = 96; + v13 = v31[0]; + Size = v23; + } + else + { + v13 = v31[0]; + v20 = 80; + if ( !v27 ) + v20 = v26; + v26 = v20; + } + goto LABEL_30; + } +LABEL_14: + __Bfree_D2A(Size); + return v16; +} +// 4362F0: using guessed type int var_20[8]; + +//----- (004366D0) -------------------------------------------------------- +_DWORD *__cdecl __decrement_D2A(int a1) +{ + _DWORD *result; // eax + unsigned int v2; // ecx + + result = (_DWORD *)(a1 + 20); + v2 = a1 + 20 + 4 * *(_DWORD *)(a1 + 16); + while ( !*result ) + { + *result++ = -1; + if ( v2 <= (unsigned int)result ) + return result; + } + --*result; + return result; +} + +//----- (00436710) -------------------------------------------------------- +int *__cdecl __set_ones_D2A(int *a1, int a2) +{ + int *v2; // ebx + int v3; // edi + int *v4; // edi + int v5; // eax + int v6; // eax + unsigned int v7; // eax + size_t Size; // ebp + unsigned int v10; // eax + size_t v11; // edx + + v2 = a1; + v3 = (a2 + 31) >> 5; + if ( a1[1] < v3 ) + { + __Bfree_D2A(a1); + v2 = __Balloc_D2A(v3); + } + v4 = v2 + 5; + v5 = a2 >> 5; + if ( (a2 & 0x1F) != 0 ) + { + v6 = v5 + 1; + v2[4] = v6; + v7 = (unsigned int)&v4[v6]; + if ( v7 > (unsigned int)v4 ) + { + Size = 4 * ((v7 - (unsigned int)v2 - 21) >> 2) + 4; + if ( (unsigned int)v2 + 21 > v7 ) + Size = 4; + v4 = (int *)((char *)v4 + Size); + memset(v2 + 5, 255, Size); + } + *(v4 - 1) = (unsigned int)*(v4 - 1) >> (32 - (a2 & 0x1F)); + return v2; + } + v2[4] = v5; + v10 = (unsigned int)&v4[v5]; + if ( (unsigned int)v4 >= v10 ) + return v2; + v11 = 4 * ((v10 - (unsigned int)v2 - 21) >> 2) + 4; + if ( v10 < (unsigned int)v2 + 21 ) + v11 = 4; + memset(v2 + 5, 255, v11); + return v2; +} + +//----- (00436800) -------------------------------------------------------- +int __cdecl __strtodg(unsigned __int8 *a1, unsigned __int8 **a2, int *a3, int *a4, void *a5) +{ + char *decimal_point; // edi + unsigned __int8 *v6; // ebp + signed __int8 v7; // cl + int v8; // eax + int v9; // ebx + int v10; // edi + unsigned __int8 *v11; // edx + int result; // eax + unsigned __int8 *v13; // edi + size_t v14; // eax + unsigned __int8 *v15; // edx + unsigned __int8 *v16; // esi + int v17; // ecx + unsigned __int8 *v18; // edx + unsigned __int8 *v19; // esi + int v20; // esi + int v21; // edx + unsigned __int8 *v22; // eax + int v23; // eax + int v24; // eax + int v25; // esi + char *v26; // ebx + int v27; // esi + int v28; // edx + int v29; // ecx + int v30; // eax + int v31; // edi + long double v32; // fst7 + int v36; // eax + int v37; // eax + int v38; // ecx + char v39; // al + signed int v40; // esi + long double v41; // fst7 + int *v42; // eax + int v43; // esi + int v44; // edx + int v45; // eax + int v46; // edi + int v47; // edi + int v48; // edx + int v49; // edi + int v50; // edi + int v51; // eax + int *v52; // eax + int v53; // edx + int *v54; // ebx + int v55; // eax + int *v56; // edi + int v57; // esi + int v58; // ebp + int v59; // ebx + int v60; // eax + int v61; // ebx + int v62; // esi + int v63; // edx + int v64; // esi + int v65; // ebp + bool v66; // cc + int v67; // eax + int *v68; // eax + int *v69; // ebp + int v70; // ebx + int v71; // eax + int v72; // eax + int v73; // eax + int *v74; // edx + int *v75; // ebx + _DWORD *v76; // esi + int *v77; // eax + int v78; // edx + unsigned int v79; // ecx + long double v80; // fst7 + long double v81; // fst5 + int v82; // eax + unsigned __int8 *v83; // edx + int v84; // esi + int v85; // esi + int v86; // edi + int v87; // edx + int v88; // esi + int v89; // ecx + int v90; // ecx + int v91; // edx + char v92; // dl + int v93; // eax + long double v94; // fst6 + int v95; // edx + int v96; // ecx + int v97; // edi + int v98; // esi + int v99; // esi + int v100; // ecx + long double v101; // fst6 + char v102; // cl + int v103; // eax + int v104; // ecx + int *v105; // eax + long double v106; // fst7 + int *v107; // eax + int v108; // edx + unsigned int v109; // ecx + bool v110; // zf + int *v111; // eax + long double v112; // fst6 + long double v113; // fst5 + long double v114; // fst6 + int v115; // ebx + int *v116; // eax + int *v117; // esi + int v120; // eax + int v121; // edx + size_t v122; // esi + _DWORD *v123; // eax + int v124; // eax + int v125; // edi + int v126; // ebx + int v127; // esi + int v128; // ecx + int v129; // edx + unsigned int v130; // edi + size_t v131; // edx + int v133; // eax + size_t v134; // eax + int v135; // ecx + double Str; // [esp+0h] [ebp-CCh] + int Size; // [esp+8h] [ebp-C4h] + int v138; // [esp+Ch] [ebp-C0h] + int v139; // [esp+20h] [ebp-ACh] + double v140; // [esp+20h] [ebp-ACh] + int *v141; // [esp+20h] [ebp-ACh] + int v142; // [esp+2Ch] [ebp-A0h] + void *v143; // [esp+2Ch] [ebp-A0h] + int *v144; // [esp+2Ch] [ebp-A0h] + int Val; // [esp+30h] [ebp-9Ch] + char *v146; // [esp+34h] [ebp-98h] + int v147; // [esp+34h] [ebp-98h] + int v148; // [esp+34h] [ebp-98h] + int v149; // [esp+34h] [ebp-98h] + int v150; // [esp+38h] [ebp-94h] + int v151; // [esp+38h] [ebp-94h] + unsigned __int8 *v152; // [esp+38h] [ebp-94h] + int v153; // [esp+40h] [ebp-8Ch] + int v154; // [esp+40h] [ebp-8Ch] + double v155; // [esp+40h] [ebp-8Ch] + int v156; // [esp+48h] [ebp-84h] + int v157; // [esp+48h] [ebp-84h] + int v158; // [esp+4Ch] [ebp-80h] + unsigned __int8 *v159; // [esp+4Ch] [ebp-80h] + int v160; // [esp+4Ch] [ebp-80h] + int *v161; // [esp+4Ch] [ebp-80h] + BOOL v162; // [esp+4Ch] [ebp-80h] + int v163; // [esp+4Ch] [ebp-80h] + int v164; // [esp+50h] [ebp-7Ch] + double v165; // [esp+50h] [ebp-7Ch] + int v166; // [esp+50h] [ebp-7Ch] + unsigned __int8 *i; // [esp+58h] [ebp-74h] + int v168; // [esp+58h] [ebp-74h] + int v169; // [esp+5Ch] [ebp-70h] + int v170; // [esp+5Ch] [ebp-70h] + int v171; // [esp+60h] [ebp-6Ch] + int v172; // [esp+64h] [ebp-68h] + int v173; // [esp+68h] [ebp-64h] + int v174; // [esp+6Ch] [ebp-60h] + int v175; // [esp+70h] [ebp-5Ch] + int *v176; // [esp+74h] [ebp-58h] + int v177; // [esp+78h] [ebp-54h] + void *Src; // [esp+7Ch] [ebp-50h] + int v179; // [esp+80h] [ebp-4Ch] + int v180; // [esp+84h] [ebp-48h] + int v181; // [esp+88h] [ebp-44h] + int v182; // [esp+94h] [ebp-38h] BYREF + int v183; // [esp+98h] [ebp-34h] BYREF + int v184; // [esp+9Ch] [ebp-30h] BYREF + int v185; // [esp+A0h] [ebp-2Ch] BYREF + int v186; // [esp+A4h] [ebp-28h] BYREF + unsigned __int8 *v187; // [esp+A8h] [ebp-24h] BYREF + size_t v188; // [esp+ACh] [ebp-20h] BYREF + + decimal_point = localeconv()->decimal_point; + v184 = 0; + v153 = strlen(decimal_point); + v188 = 0; + Val = *a3; + v187 = a1; + v6 = a1; + while ( 2 ) + { + v7 = *v6; + switch ( *v6 ) + { + case 0u: + goto LABEL_12; + case 9u: + case 0xAu: + case 0xBu: + case 0xCu: + case 0xDu: + case 0x20u: + v187 = ++v6; + continue; + case 0x2Bu: + v173 = 0; + goto LABEL_225; + case 0x2Du: + v173 = 1; +LABEL_225: + v187 = v6 + 1; + v7 = v6[1]; + if ( v7 ) + { + ++v6; +LABEL_4: + v139 = 0; + if ( v7 == 48 ) + { + v22 = v6 + 1; + if ( (v6[1] & 0xDF) == 88 ) + { + v184 = __gethex_D2A(&v187, a3, a4, (int **)&v188, v173); + if ( v184 != 6 ) + goto LABEL_79; + v187 = a1; + v14 = v188; + if ( a2 ) + *a2 = a1; + goto LABEL_35; + } + do + { + v187 = v22; + v6 = v22; + v7 = *v22++; + } + while ( v7 == 48 ); + v14 = 0; + if ( !v7 ) + goto LABEL_31; + v139 = 1; + } + v180 = a3[4]; + v8 = v7; + if ( (unsigned int)(v7 - 48) > 9 ) + { + v142 = 0; + v11 = v6; + v9 = 0; + v156 = 0; + } + else + { + v146 = decimal_point; + v9 = 0; + v142 = 0; + v10 = 0; + do + { + if ( v9 <= 8 ) + { + v10 = v8 + 10 * v10 - 48; + } + else if ( v9 <= 15 ) + { + v142 = v8 + 10 * v142 - 48; + } + v11 = &v6[++v9]; + v187 = &v6[v9]; + v8 = (char)v6[v9]; + v7 = v6[v9]; + } + while ( (unsigned int)(v8 - 48) <= 9 ); + v156 = v10; + decimal_point = v146; + } + if ( *decimal_point == v7 ) + { + if ( !decimal_point[1] ) + { + v82 = 1; +LABEL_182: + v83 = &v11[v82]; + v187 = v83; + v8 = (char)*v83; + if ( v9 ) + { + v84 = v8 - 48; + v147 = v9; + v13 = 0; + for ( i = 0; (unsigned int)(v8 - 48) <= 9; v84 = v8 - 48 ) + { + v163 = v84; + ++v13; + v152 = v187; + if ( v84 ) + { + i = &i[(_DWORD)v13]; + v124 = v147 + 1; + if ( v13 == (unsigned __int8 *)1 ) + { + v128 = v147++; + } + else + { + v125 = (int)&v13[v147]; + v166 = v9; + v170 = v84; + v126 = v147; + v127 = v142; + v128 = v125 - 1; + v147 = v125; + v129 = v156; + while ( 1 ) + { + v130 = v126; + v126 = v124; + if ( v130 <= 8 ) + { + v129 *= 10; + } + else if ( v124 <= 16 ) + { + v127 *= 10; + } + if ( v124 == v128 ) + break; + ++v124; + } + v156 = v129; + v9 = v166; + v142 = v127; + v84 = v170; + } + if ( v128 <= 8 ) + { +LABEL_223: + v13 = 0; + v156 = v163 + 10 * v156; + } + else + { + v13 = 0; + if ( v147 <= 16 ) + v142 = v84 + 10 * v142; + } + } + v187 = v152 + 1; + v8 = (char)v152[1]; + } + } + else + { + if ( v8 == 48 ) + { + v104 = 1 - (_DWORD)v83; + do + { + v13 = &v83[v104]; + v187 = ++v83; + v8 = (char)*v83; + } + while ( v8 == 48 ); + } + else + { + v13 = 0; + } + if ( (unsigned int)(v8 - 49) <= 8 ) + { + v6 = v187; + v147 = 1; + v163 = v8 - 48; + v152 = v187; + i = v13 + 1; + goto LABEL_223; + } + i = 0; + v147 = 0; + } + v150 = 1; +LABEL_20: + if ( (v8 & 0xFFFFFFDF) != 69 ) + { + v158 = 0; + goto LABEL_22; + } + if ( !(v139 | (unsigned int)v13 | v147) ) + goto LABEL_30; + a1 = v187++; + v8 = (char)a1[1]; + if ( (_BYTE)v8 == 43 ) + { + v164 = 0; + } + else + { + if ( (_BYTE)v8 != 45 ) + { + v164 = 0; + goto LABEL_41; + } + v164 = 1; + } + v187 = a1 + 2; + v8 = (char)a1[2]; +LABEL_41: + if ( (unsigned int)(v8 - 48) > 9 ) + { + v158 = 0; + v187 = a1; + } + else + { + if ( v8 == 48 ) + { + v15 = v187 + 1; + do + { + v187 = v15; + v8 = (char)*v15++; + } + while ( v8 == 48 ); + } + v158 = 0; + if ( (unsigned int)(v8 - 49) <= 8 ) + { + v16 = v187; + v17 = v8 - 48; + v159 = v187++; + v8 = (char)v159[1]; + if ( (unsigned int)(v8 - 48) > 9 ) + goto LABEL_289; + v18 = v16 + 2; + do + { + v187 = v18; + v19 = v18++; + v17 = v8 + 10 * v17 - 48; + v8 = (char)*(v18 - 1); + } + while ( (unsigned int)(v8 - 48) <= 9 ); + v20 = v19 - v159; + v160 = 19999; + if ( v20 <= 8 ) + { +LABEL_289: + v121 = 19999; + if ( v17 <= 19999 ) + v121 = v17; + v160 = v121; + } + v21 = -v160; + if ( !v164 ) + v21 = v160; + v158 = v21; + } + } +LABEL_22: + if ( !v147 ) + { + if ( (unsigned int)v13 | v139 ) + goto LABEL_79; + if ( v150 ) + goto LABEL_30; + if ( v8 != 105 ) + { + if ( v8 > 105 ) + { + if ( v8 != 110 ) + goto LABEL_30; +LABEL_29: + if ( !__match_D2A((char **)&v187, "an") ) + goto LABEL_30; + v184 = 4; + *a4 = a3[2] + 1; + if ( *v187 != 40 ) + goto LABEL_79; + v184 = __hexnan_D2A(&v187, a3, (int *)a5); +LABEL_233: + *a4 = a3[2] + 1; + v14 = v188; + goto LABEL_31; + } + if ( v8 != 73 ) + { + if ( v8 != 78 ) + { +LABEL_30: + v184 = 6; + v187 = a1; + v14 = v188; + goto LABEL_31; + } + goto LABEL_29; + } + } + if ( !__match_D2A((char **)&v187, "nf") ) + goto LABEL_30; + --v187; + if ( !__match_D2A((char **)&v187, "inity") ) + ++v187; + v184 = 3; + goto LABEL_233; + } + v184 = 1; + v175 = v158 - (_DWORD)i; + v30 = a3[3] & 3; + v172 = v30 - v173; + if ( v30 != 2 ) + { + v172 = v173 + 1; + if ( v30 != 3 ) + v172 = v30 == 0; + } + v31 = 16; + v32 = (long double)(unsigned int)v156; + if ( !v9 ) + v9 = v147; + if ( v147 <= 16 ) + v31 = v147; + v140 = v32; + if ( v147 > 9 ) + v140 = v32 * dbl_5150F8[v31] + (long double)(unsigned int)v142; + if ( Val > 53 || v147 > 15 ) + { + v37 = v158 - (_DWORD)i; + goto LABEL_106; + } + if ( !v175 ) + { + v36 = rvOK_constprop_0_isra_0(a3, a4, (char *)a5, v140, 1, v172, &v184); + goto LABEL_98; + } + if ( v175 <= 0 ) + { + v37 = v158 - (_DWORD)i; + if ( v175 < -22 ) + goto LABEL_106; + Str = v140 / __tens_D2A[(_DWORD)&i[-v158]]; + } + else + { + if ( v175 <= 22 ) + { + _EDX = LODWORD(v140); + if ( LODWORD(v140) ) + { + __asm { tzcnt ecx, edx } + v143 = (void *)(53 - _ECX); + } + else + { + _ECX = HIDWORD(v140) | 0x100000; + __asm { tzcnt ecx, ecx } + v143 = (void *)(21 - _ECX); + } + v138 = v172; + Size = (int)v143 + fivesbits[v175] <= 53; + Str = v140 * __tens_D2A[v175]; + v140 = Str; + goto LABEL_97; + } + v40 = v175 + v147 - v31; + if ( 37 - v147 < v175 ) + goto LABEL_107; + Str = v140 * __tens_D2A[15 - v147] * __tens_D2A[v175 - (15 - v147)]; + } + Size = 0; + v140 = Str; + v138 = v172; +LABEL_97: + v36 = rvOK_constprop_0_isra_0(a3, a4, (char *)a5, Str, Size, v138, &v184); +LABEL_98: + if ( v36 ) + goto LABEL_79; + v37 = 0; +LABEL_106: + v40 = v37 + v147 - v31; + if ( v40 <= 0 ) + { + if ( v40 ) + { + v85 = -v40; + if ( (v85 & 0xF) != 0 ) + v140 = v140 / __tens_D2A[v85 & 0xF]; + v40 = v85 & 0xFFFFFFF0; + if ( v40 ) + { + v86 = v40 >> 4; + if ( v40 <= 255 ) + { + v90 = 0; + } + else + { + v87 = v40 >> 4; + v88 = 0; + do + { + v87 -= 16; + v89 = HIDWORD(v140) >> 20; + HIDWORD(v140) = HIDWORD(v140) & 0x800FFFFF | 0x3FF00000; + v90 = v88 + (v89 & 0x7FF) - 1023; + v88 = v90; + v140 = v140 * 1.0e-256; + } + while ( v87 > 15 ); + v86 &= 0xFu; + } + v91 = (HIDWORD(v140) >> 20) & 0x7FF; + HIDWORD(v140) = HIDWORD(v140) & 0x800FFFFF | 0x3FF00000; + v40 = v90 + v91 - 1023; + if ( v86 ) + { + v92 = 0; + v93 = 0; + v94 = v140; + do + { + if ( (v86 & 1) != 0 ) + { + v94 = v94 * __tinytens_D2A[v93]; + v92 = 1; + } + ++v93; + v86 >>= 1; + } + while ( v86 ); + if ( !v92 ) + v94 = v140; + v41 = v94; + goto LABEL_111; + } + } + } + goto LABEL_110; + } +LABEL_107: + if ( (v40 & 0xF) != 0 ) + v140 = v140 * __tens_D2A[v40 & 0xF]; + v40 &= 0xFFFFFFF0; + if ( v40 ) + { + v95 = v40 >> 4; + if ( v40 <= 255 ) + { + v99 = 0; + } + else + { + v96 = v40 >> 4; + v97 = 0; + do + { + v96 -= 16; + v98 = HIDWORD(v140) >> 20; + HIDWORD(v140) = HIDWORD(v140) & 0x800FFFFF | 0x3FF00000; + v99 = v97 + (v98 & 0x7FF) - 1023; + v97 = v99; + v140 = v140 * 1.0e256; + } + while ( v96 > 15 ); + v95 &= 0xFu; + } + v100 = (HIDWORD(v140) >> 20) & 0x7FF; + HIDWORD(v140) = HIDWORD(v140) & 0x800FFFFF | 0x3FF00000; + v41 = v140; + v40 = v99 + v100 - 1023; + if ( v95 ) + { + v101 = v140; + v102 = 0; + v103 = 0; + do + { + if ( (v95 & 1) != 0 ) + { + v101 = v101 * __bigtens_D2A[v103]; + v102 = 1; + } + ++v103; + v95 >>= 1; + } + while ( v95 ); + if ( !v102 ) + v101 = v140; + v41 = v101; + } + goto LABEL_111; + } +LABEL_110: + v41 = v140; +LABEL_111: + v42 = __d2b_D2A(v41, &v186, &v185); + v43 = v186 + v40; + v188 = (size_t)v42; + v44 = (int)v42; + v45 = v185; + v186 = v43; + v46 = v185 - Val; + if ( v185 - Val > 0 ) + { + __rshift_D2A(v44, v185 - Val); + v45 = Val; + v186 += v46; + v43 = v186; + v185 = Val; + } + v47 = v45 + v43 - Val; + v181 = v47; + if ( a3[2] + 1 < v47 ) + { + v151 = 0; + goto LABEL_264; + } + v48 = a3[1]; + v171 = v48; + if ( v47 >= v48 ) + { + v151 = 0; + } + else + { + v49 = v43 - v48; + if ( v43 - v48 > 0 ) + { + v105 = __lshift_D2A((int *)v188, v43 - v48); + v185 += v49; + v188 = (size_t)v105; + } + else if ( v43 != v48 ) + { + v50 = v45 + v49; + v14 = v188; + v185 = v50; + if ( v50 > 0 ) + { + __rshift_D2A(v188, v48 - v43); + } + else + { + if ( v50 < -1 ) + { + *(_DWORD *)(v188 + 16) = 0; + *(_DWORD *)(v14 + 20) = 0; + *a4 = v48; + if ( !v180 ) + { + v29 = 80; + goto LABEL_78; + } + goto LABEL_260; + } + v185 = 1; + *(_DWORD *)(v188 + 16) = 1; + *(_DWORD *)(v14 + 20) = 1; + } + } + v186 = v171; + if ( v180 ) + { + v51 = v181; + v151 = 1; + v181 = v171; + if ( v51 + 1 < v171 ) + { + v14 = v188; + *(_DWORD *)(v188 + 16) = 0; + *(_DWORD *)(v14 + 20) = 0; + *a4 = v171; + goto LABEL_260; + } + } + else + { + v151 = 1; + v181 = v171; + } + } + v52 = __s2b_D2A((int)v6, v9, v147, v156, v153); + v53 = 0; + v149 = 0; + v54 = v52; + v176 = v52; + v55 = (int)&i[-v158]; + if ( v175 >= 0 ) + v55 = 0; + if ( v175 >= 0 ) + v53 = v158 - (_DWORD)i; + v157 = v55; + Src = v54 + 3; + v174 = v53; + v177 = Val + 1; + while ( 1 ) + { + v144 = __Balloc_D2A(v176[1]); + memcpy(v144 + 3, Src, 4 * v176[4] + 8); + v56 = __Balloc_D2A(*(_DWORD *)(v188 + 4)); + memcpy(v56 + 3, (const void *)(v188 + 12), 4 * *(_DWORD *)(v188 + 16) + 8); + v57 = v185; + v58 = v186; + v59 = v186 + v149; + v154 = v185 - v149; + v141 = __i2b_D2A(1); + if ( v59 < 0 ) + { + v60 = v174 - v59; + v61 = v157; + } + else + { + v60 = v174; + v61 = v157 + v59; + } + v62 = v58 + v57 - Val; + v63 = v177 - v154; + if ( v171 > v62 ) + v63 = v177 - v154 + v62 - v171; + v64 = v61 + v63; + v65 = v60 + v63; + v66 = v61 + v63 <= v60 + v63; + v67 = v60 + v63; + if ( v66 ) + v67 = v61 + v63; + if ( v61 <= v67 ) + v67 = v61; + if ( v67 > 0 ) + { + v64 -= v67; + v65 -= v67; + v61 -= v67; + } + if ( v157 > 0 ) + { + v141 = __pow5mult_D2A(v141, v157); + v161 = __mult_D2A((int)v141, (int)v56); + __Bfree_D2A(v56); + v56 = v161; + } + if ( v64 - v149 > 0 ) + { + v56 = __lshift_D2A(v56, v64 - v149); + } + else if ( v64 != v149 ) + { + __rshift_D2A((int)v56, v149 - v64); + } + if ( v175 > 0 ) + v144 = __pow5mult_D2A(v144, v174); + if ( v65 > 0 ) + v144 = __lshift_D2A(v144, v65); + if ( v61 > 0 ) + v141 = __lshift_D2A(v141, v61); + v68 = __diff_D2A((int)v56, (int)v144); + v69 = v68; + if ( v68[4] <= 1 && !v68[5] ) + goto LABEL_62; + v70 = v68[3]; + v68[3] = 0; + v71 = __cmp_D2A((int)v68, (int)v141); + if ( v172 && v71 <= 0 ) + { + v72 = v172 & 1; + v149 = v70 ^ v72; + if ( v72 == v70 ) + { + v184 = v72 == 0 ? 33 : 17; + goto LABEL_62; + } + if ( v70 ) + { + v184 = 33; + v155 = 1.0; + v168 = 0; + v165 = 1.0; + v179 = 32; + v162 = 0; + goto LABEL_162; + } + v184 = 17; + if ( v181 != v171 ) + { + v73 = Val; + v74 = (int *)v188; + if ( Val > 31 ) + { + while ( !*(_DWORD *)(v188 + 4 * v70 + 20) ) + { + v73 -= 32; + ++v70; + if ( v73 <= 31 ) + goto LABEL_266; + } + } + else + { + v73 = Val; +LABEL_266: + if ( v73 <= 1 ) + goto LABEL_268; + v117 = (int *)(v188 + 4 * v70 + 20); + _EBX = *v117; + __asm { tzcnt ecx, ebx } + *v117 = (unsigned int)*v117 >> _ECX; + if ( v73 - 1 <= _ECX ) + { +LABEL_268: + v186 = v181 - 1; + v185 = Val; + v188 = (size_t)__set_ones_D2A(v74, Val); + goto LABEL_62; + } + } + } + } + else + { + if ( v71 < 0 ) + { + if ( v70 ) + { + v184 = 17; + goto LABEL_62; + } + v184 = 33; + if ( v154 > 1 || v181 == v171 || (v151 & 1) != 0 ) + { +LABEL_62: + if ( v151 ) + goto LABEL_63; + goto LABEL_277; + } + v69 = __lshift_D2A(v69, 1); + if ( __cmp_D2A((int)v69, (int)v141) <= 0 ) + goto LABEL_277; + v184 = 17; + v151 = 0; +LABEL_303: + v186 -= Val; + v185 = Val; + v188 = (size_t)__set_ones_D2A((int *)v188, Val); + goto LABEL_62; + } + if ( !v71 ) + { + if ( v70 ) + { + if ( !v151 ) + goto LABEL_344; + v122 = v188; + v123 = (_DWORD *)(v188 + 20); + while ( v188 + 20 + 4 * (v185 >> 5) > (unsigned int)v123 ) + { + if ( *v123++ != -1 ) + goto LABEL_344; + } + if ( (v185 & 0x1F) != 0 && (*v123 | (-1 << (v185 & 0x1F))) != -1 ) + { +LABEL_344: + v184 = 17; + goto LABEL_335; + } + *(_DWORD *)(v188 + 16) = 1; + *(_DWORD *)(v122 + 20) = 1; + v185 = 1; + v186 = Val + v171 - 1; + v120 = v151; + v184 = 33; +LABEL_278: + v151 = Val - v120; + if ( Val != v120 ) + { + if ( Val - v120 <= 0 ) + __rshift_D2A(v188, v120 - Val); + else + v188 = (size_t)__lshift_D2A((int *)v188, v151); + v23 = v186 - v151; + v151 = 0; + v186 = v23; +LABEL_64: + *a4 = v23; + __Bfree_D2A(v56); + __Bfree_D2A(v144); + __Bfree_D2A(v141); + __Bfree_D2A(v176); + __Bfree_D2A(v69); + if ( a3[2] >= v186 ) + goto LABEL_265; + v24 = a3[3] & 3; + switch ( v24 ) + { + case 2: + if ( !v173 ) + goto LABEL_264; + break; + case 3: + if ( v173 ) + goto LABEL_264; + break; + case 1: +LABEL_264: + v184 = 163; + *(_DWORD *)(v188 + 16) = 0; + *_errno() = 34; + *a4 = a3[2] + 1; +LABEL_265: + v14 = v188; +LABEL_73: + if ( !v151 ) + goto LABEL_31; + if ( !v180 ) + { + v28 = v184 & 0x30; + v29 = v184 & 0xFFFFFFF8; + if ( *(int *)(v14 + 16) > 0 ) + v29 |= 2u; + v184 = v29; + if ( v28 ) + { +LABEL_78: + v184 = v29 | 0x40; + *_errno() = 34; + } +LABEL_79: + v14 = v188; +LABEL_31: + if ( a2 ) + *a2 = v187; + if ( v173 ) + v184 |= 8u; +LABEL_35: + if ( v14 ) + { + __copybits_D2A((char *)a5, Val, v14); + __Bfree_D2A((void *)v188); + } + return v184; + } +LABEL_260: + *(_DWORD *)(v14 + 16) = 0; + v184 = 80; + *_errno() = 34; + v14 = v188; + goto LABEL_31; + default: + break; + } + __Bfree_D2A((void *)v188); + v188 = 0; + v184 = 17; + *a4 = a3[2]; + v25 = *a3; + v26 = (char *)a5 + 4 * ((*a3 + 31) >> 5); + if ( a5 < v26 ) + memset(a5, 255, 4 * ((unsigned int)&v26[~(unsigned int)a5] >> 2) + 4); + v27 = v25 & 0x1F; + if ( v27 ) + *((_DWORD *)v26 - 1) >>= 32 - v27; + v14 = 0; + goto LABEL_73; + } +LABEL_63: + v23 = v186; + goto LABEL_64; + } + if ( v154 != 1 ) + { + v184 = 33; +LABEL_335: + if ( Val <= v154 || (v151 & 1) != 0 ) + { + v131 = v188; + if ( (*(_BYTE *)(v188 + 20) & 1) != 0 ) + { + if ( v70 ) + { + v134 = (size_t)__increment_D2A((int *)v188); + v135 = *(_DWORD *)(v134 + 16); + v188 = v134; + _BitScanReverse(&v134, *(_DWORD *)(v134 + 4 * v135 + 16)); + if ( (-v185 & 0x1F) != (v134 ^ 0x1F) ) + ++v185; + v184 = 33; + } + else if ( v154 == 1 ) + { +LABEL_330: + *(_DWORD *)(v131 + 16) = 0; + v184 = 80; + v186 = v171; + } + else + { + __decrement_D2A(v188); + v184 = 17; + } + } + goto LABEL_62; + } +LABEL_277: + v120 = v185; + goto LABEL_278; + } + v184 = 1; + if ( v181 == v171 ) + { + v184 = 33; + if ( *(_DWORD *)(v188 + 16) == 1 ) + { + v133 = 1; + if ( *(_DWORD *)(v188 + 20) != 1 ) + v133 = v180; + v180 = v133; + } + goto LABEL_62; + } + goto LABEL_303; + } + v106 = __ratio_D2A((int)v69, (int)v141); + if ( v106 > 2.0 ) + { + v112 = v106 * 0.5; + v179 = v70 == 0 ? 32 : 16; + v162 = v70 == 0; + v165 = v112; + if ( v112 >= 2147483647.0 ) + { + v168 = 0; + v155 = v112; + goto LABEL_257; + } + v168 = (int)v112; + v113 = (long double)(int)v112; + v155 = v113; + v114 = v112 - v113; + v165 = v114; + if ( v172 == 1 ) + { + if ( v70 ) + goto LABEL_257; + } + else + { + if ( v172 != 2 ) + { + if ( v114 < 0.5 ) + { +LABEL_257: + v149 = 0; + goto LABEL_162; + } +LABEL_274: + ++v168; + v179 = 48 - v179; + v155 = (double)v168; + goto LABEL_257; + } + if ( !v70 ) + goto LABEL_257; + } + if ( v165 <= 0.0 ) + goto LABEL_257; + goto LABEL_274; + } + if ( v70 ) + { + v168 = 0; + v155 = 1.0; + v179 = 32; + v165 = 1.0; + v149 = 0; + v162 = 0; + goto LABEL_162; + } + v149 = 0; + } + if ( v154 <= 1 && (v151 & 1) != 0 ) + { + v151 = 1; + v131 = v188; + goto LABEL_330; + } + v168 = 0; + v155 = 1.0; + v179 = 16; + v165 = 1.0; + v162 = 1; +LABEL_162: + v169 = v185 + v186; + if ( v185 < Val && (v151 & 1) == 0 ) + { + v115 = Val - v185; + v116 = __lshift_D2A((int *)v188, Val - v185); + v186 -= v115; + v188 = (size_t)v116; + v185 = Val; + } + v75 = __d2b_D2A(v155, &v182, &v183); + if ( v182 < 0 ) + { + __rshift_D2A((int)v75, -v182); + } + else if ( v182 ) + { + v75 = __lshift_D2A(v75, v182); + } + v76 = (_DWORD *)v188; + if ( v162 ) + { + v77 = __diff_D2A(v188, (int)v75); + v188 = (size_t)v77; + if ( !v151 ) + { + v78 = v76[4]; + if ( v77[4] <= v78 - 1 + || (_BitScanReverse(&v79, v77[v78 + 4]), + _BitScanReverse((unsigned int *)&v78, v76[v78 + 4]), + (v78 ^ 0x1F) < (int)(v79 ^ 0x1F)) ) + { + if ( v181 != v171 ) + { + v111 = __lshift_D2A(v77, 1); + --v186; + --v181; + v188 = (size_t)v111; + __Bfree_D2A(v75); + __Bfree_D2A(v76); +LABEL_251: + v151 = 0; + v149 = __trailz_D2A(v188); + goto LABEL_180; + } + --v185; + v151 = v162; + } + } + } + else + { + v107 = __sum_D2A((int *)v188, v75); + v108 = v107[4]; + v188 = (size_t)v107; + if ( v76[4] <= v108 - 1 + || (_BitScanReverse(&v109, v107[v108 + 4]), + _BitScanReverse((unsigned int *)&v108, v76[v108 + 4]), + (v108 ^ 0x1F) > (int)(v109 ^ 0x1F)) ) + { + if ( v151 ) + { + v110 = ++v185 == Val; + v151 = !v110; + } + else + { + __rshift_D2A((int)v107, 1); + ++v186; + ++v181; + v168 = 0; + } + } + } + __Bfree_D2A(v75); + __Bfree_D2A(v76); + if ( v149 ) + goto LABEL_62; + if ( v186 + v185 == v169 && v168 ) + { + v80 = v155 * 5.0e-16; + v81 = v165 - 0.5; + if ( -v80 <= v81 ) + { + if ( v81 > v80 && 1.0 - v80 > v165 ) + { +LABEL_61: + v184 |= v179; + goto LABEL_62; + } + } + else if ( v165 > v80 ) + { + goto LABEL_61; + } + } + if ( !v151 ) + goto LABEL_251; +LABEL_180: + __Bfree_D2A(v56); + __Bfree_D2A(v144); + __Bfree_D2A(v141); + __Bfree_D2A(v69); + } + } + v148 = v8; + v38 = 1; + v39 = decimal_point[1]; + while ( v11[v38] == v39 ) + { + v39 = decimal_point[++v38]; + if ( !v39 ) + { + v82 = v38; + goto LABEL_182; + } + } + v8 = v148; + } + v147 = v9; + v13 = 0; + i = 0; + v150 = 0; + goto LABEL_20; + } +LABEL_12: + result = 6; + v184 = 6; + if ( !a2 ) + return result; + *a2 = a1; + return v184; + default: + v173 = 0; + goto LABEL_4; + } + } +} +// 514E80: using guessed type int fivesbits[23]; +// 5150F8: using guessed type double dbl_5150F8[4]; +// 515140: using guessed type double __tens_D2A[24]; +// 515200: using guessed type double __tinytens_D2A[4]; +// 515240: using guessed type double __bigtens_D2A[4]; + +//----- (004383D0) -------------------------------------------------------- +int *__cdecl __sum_D2A(int *a1, int *a2) +{ + int *v2; // esi + int *v3; // ebx + unsigned int *v4; // ebp + int *v5; // eax + int v6; // edi + int *v7; // ecx + unsigned int *v8; // edi + unsigned int v9; // esi + unsigned int v10; // eax + unsigned int v11; // ebx + unsigned int v12; // edx + unsigned int v13; // eax + unsigned int v14; // edx + unsigned int v15; // edi + unsigned int *v16; // ebx + char *i; // edx + unsigned int v18; // ecx + unsigned int v19; // eax + unsigned int v20; // ecx + int *v22; // ebx + unsigned int v23; // [esp+18h] [ebp-34h] + int *v24; // [esp+1Ch] [ebp-30h] + int v25; // [esp+20h] [ebp-2Ch] + int v26; // [esp+24h] [ebp-28h] + int *v27; // [esp+28h] [ebp-24h] + int *v28; // [esp+2Ch] [ebp-20h] + + v2 = a2; + v3 = a1; + if ( a1[4] < a2[4] ) + { + v3 = a2; + v2 = a1; + } + v4 = (unsigned int *)(v3 + 5); + v5 = __Balloc_D2A(v3[1]); + v6 = v3[4]; + v27 = v3 + 5; + v7 = v5 + 5; + v24 = v5; + v5[4] = v6; + v28 = v5 + 5; + v26 = v2[4]; + v23 = (unsigned int)&v5[v26 + 5]; + v25 = v6; + v8 = (unsigned int *)(v2 + 5); + v9 = 0; + do + { + v10 = *v4; + v11 = *v8; + ++v4; + ++v8; + ++v7; + v12 = v9 + (unsigned __int16)v10 + (unsigned __int16)v11; + *((_WORD *)v7 - 2) = v12; + v13 = HIWORD(v12) + HIWORD(v11) + HIWORD(v10); + *((_WORD *)v7 - 1) = v13; + v9 = HIWORD(v13); + } + while ( v23 > (unsigned int)v7 ); + v14 = 4 * ((v23 - (unsigned int)v24 - 21) >> 2) + 4; + if ( v23 < (unsigned int)v24 + 21 ) + v14 = 4; + v15 = v23 + 4 * (v25 - v26); + v16 = (unsigned int *)((char *)v27 + v14); + for ( i = (char *)v28 + v14; v15 > (unsigned int)i; v9 = HIWORD(v20) ) + { + v18 = *v16; + i += 4; + ++v16; + v19 = v9 + (unsigned __int16)v18; + *((_WORD *)i - 2) = v19; + v20 = HIWORD(v19) + HIWORD(v18); + *((_WORD *)i - 1) = v20; + } + if ( v9 ) + { + if ( v25 == v24[2] ) + { + v22 = __Balloc_D2A(v24[1] + 1); + memcpy(v22 + 3, v24 + 3, 4 * v24[4] + 8); + __Bfree_D2A(v24); + v24 = v22; + v25 = v22[4]; + } + v24[4] = v25 + 1; + v24[v25 + 5] = 1; + } + return v24; +} + +//----- (00438560) -------------------------------------------------------- +unsigned int __usercall __m16m@(unsigned __int16 a1@, int a2@, int a3@) +{ + int v3; // edi + unsigned __int16 *v4; // ecx + char *v5; // edx + unsigned int result; // eax + int v7; // eax + unsigned int v8; // eax + unsigned int v9; // ebx + int v10; // ebp + unsigned int v11; // eax + char v13[10]; // [esp+16h] [ebp-1Eh] BYREF + int v14; // [esp+20h] [ebp-14h] BYREF + + v3 = a1; + v4 = (unsigned __int16 *)(a2 + 16); + v14 = 0; + v5 = (char *)&v14 + 2; + do + { + while ( 1 ) + { + v7 = *v4; + v5 -= 2; + --v4; + if ( (_WORD)v7 ) + break; + result = 0; + *((_WORD *)v5 - 1) = 0; + if ( v5 == v13 ) + goto LABEL_5; + } + v8 = v3 * v7; + v9 = *((unsigned __int16 *)v5 + 1) + (unsigned __int16)v8; + v10 = *(unsigned __int16 *)v5; + *((_WORD *)v5 + 1) = v9; + v11 = HIWORD(v9) + v10 + HIWORD(v8); + *(_WORD *)v5 = v11; + result = HIWORD(v11); + *((_WORD *)v5 - 1) = result; + } + while ( v5 != v13 ); +LABEL_5: + *(_DWORD *)(a3 + 4) = *(_DWORD *)v5; + *(_DWORD *)(a3 + 8) = *((_DWORD *)v5 + 1); + *(_DWORD *)(a3 + 12) = *((_DWORD *)v5 + 2); + *(_WORD *)(a3 + 16) = *((_WORD *)v5 + 6); + return result; +} + +//----- (004385F0) -------------------------------------------------------- +BOOL __usercall __eshift_part_0@(__int16 *a1@, int a2@) +{ + int v2; // esi + __int16 *v4; // ebp + __int16 *v5; // eax + int v6; // esi + __int16 *Src; // edi + __int16 *v8; // edi + __int16 *i; // ecx + __int16 *v10; // ebx + int v11; // edx + __int16 v12; // ax + __int16 *v14; // edx + __int16 v15; // di + unsigned __int16 v16; // ax + __int16 v17; // bp + int v18; // ecx + __int16 *v19; // edx + unsigned __int16 v20; // bp + __int16 *v21; // edi + __int16 *v22; // eax + __int16 v23; // dx + unsigned int v24; // eax + int v25; // esi + unsigned __int16 v26; // ax + int v27; // edi + __int16 *v28; // ecx + int v29; // edx + __int16 v30; // ax + __int16 v31; // cx + __int16 *v32; // edx + unsigned __int16 v33; // ax + __int16 v34; // bp + char v35; // [esp+14h] [ebp-28h] + int v36; // [esp+14h] [ebp-28h] + __int16 *v37; // [esp+14h] [ebp-28h] + unsigned __int16 v38; // [esp+1Ah] [ebp-22h] + __int16 *v39; // [esp+1Ch] [ebp-20h] + + v2 = a2; + if ( a2 < 0 ) + { + v18 = -a2; + v36 = -a2; + if ( a2 >= -15 ) + { + if ( a2 >= -7 ) + { + v21 = a1 + 2; + v38 = 0; + goto LABEL_28; + } + v26 = 0; + v21 = a1 + 2; + } + else + { + v19 = a1 + 8; + v20 = 0; + v21 = a1 + 2; + do + { + v37 = v19; + v20 |= a1[8]; + v22 = v19; + do + { + v23 = *--v22; + v22[1] = v23; + } + while ( v22 != v21 ); + v18 -= 16; + v19 = v37; + a1[2] = 0; + } + while ( v18 > 15 ); + v38 = v20; + v24 = -((-16 - v2) & 0xFFFFFFF0); + if ( v2 >= -15 ) + v24 = 0; + v25 = -16 - v2 + v24; + v26 = v20; + v36 = v25; + if ( v25 <= 7 ) + { +LABEL_27: + if ( !v36 ) + return v38 != 0; +LABEL_28: + v39 = v21; + v27 = v38; + do + { + v28 = v39; + v29 = 0; + v38 = v27 | a1[8] & 1; + v27 |= a1[8] & 1; + do + { + if ( (*v28 & 1) != 0 ) + v29 |= 1u; + v30 = (unsigned __int16)*v28 >> 1; + if ( (v29 & 2) != 0 ) + v30 |= 0x8000u; + ++v28; + v29 *= 2; + *(v28 - 1) = v30; + } + while ( v28 != a1 + 9 ); + --v36; + } + while ( v36 ); + return v38 != 0; + } + } + v31 = 0; + v38 = v26 | *((unsigned __int8 *)a1 + 16); + v32 = v21; + do + { + v33 = *v32; + v34 = v31; + ++v32; + v31 = v33 << 8; + *(v32 - 1) = v34 | HIBYTE(v33); + } + while ( v32 != a1 + 9 ); + v36 -= 8; + goto LABEL_27; + } + v4 = a1 + 2; + v5 = a1 + 3; + if ( a2 > 15 ) + { + v35 = a2; + v6 = a2; + Src = v5; + do + { + v6 -= 16; + memmove(v4, Src, 0xCu); + a1[8] = 0; + } + while ( v6 > 15 ); + v2 = v35 & 0xF; + } + if ( v2 > 7 ) + { + v14 = a1 + 8; + v15 = 0; + do + { + v16 = *v14; + v17 = v15; + --v14; + v15 = HIBYTE(v16); + v14[1] = v17 | (v16 << 8); + } + while ( v14 != a1 + 1 ); + v2 -= 8; + } + v8 = a1 + 8; + for ( i = a1 + 1; v2; --v2 ) + { + v10 = v8; + v11 = 0; + do + { + if ( *v10 < 0 ) + v11 |= 1u; + v12 = 2 * *v10; + if ( (v11 & 2) != 0 ) + v12 |= 1u; + --v10; + v11 *= 2; + v10[1] = v12; + } + while ( v10 != i ); + } + return 0; +} + +//----- (00438830) -------------------------------------------------------- +__int16 *__cdecl __emovi(int a1, int a2) +{ + __int16 *result; // eax + __int16 v3; // dx + int v4; // edx + __int16 v5; // di + int v6; // edx + int v7; // edx + __int16 v8; // bx + + *(_WORD *)a2 = *(__int16 *)(a1 + 10) >> 15; + result = (__int16 *)(a1 + 8); + v3 = *(_WORD *)(a1 + 10) & 0x7FFF; + *(_WORD *)(a2 + 2) = v3; + if ( v3 == 0x7FFF ) + { + if ( (*(_WORD *)(a1 + 10) & 0x7FFF) == 0x7FFF ) + { + v6 = a1; + while ( 1 ) + { + v6 += 2; + if ( *(_WORD *)(v6 - 2) ) + break; + if ( a1 + 10 == v6 ) + goto LABEL_6; + } + v7 = a2 + 6; + *(_WORD *)(a2 + 4) = 0; + do + { + v8 = *result--; + v7 += 2; + *(_WORD *)(v7 - 2) = v8; + } + while ( (__int16 *)(a1 - 4) != result ); + } + else + { +LABEL_6: + *(_DWORD *)(a2 + 4) = 0; + *(_DWORD *)(a2 + 8) = 0; + *(_DWORD *)(a2 + 12) = 0; + *(_WORD *)(a2 + 16) = 0; + } + } + else + { + v4 = a2 + 6; + *(_WORD *)(a2 + 4) = 0; + do + { + v5 = *result--; + v4 += 2; + *(_WORD *)(v4 - 2) = v5; + } + while ( result != (__int16 *)(a1 - 2) ); + *(_WORD *)(a2 + 16) = 0; + } + return result; +} + +//----- (00438900) -------------------------------------------------------- +unsigned int __cdecl __eaddm(int a1, int a2) +{ + int v2; // edx + unsigned int v3; // ecx + unsigned int result; // eax + + v2 = 7; + v3 = 0; + do + { + result = v3 + *(unsigned __int16 *)(a2 + 2 * v2 + 2) + *(unsigned __int16 *)(a1 + 2 * v2 + 2); + *(_WORD *)(a2 + 2 * v2 + 2) = result; + v3 = HIWORD(result) & 1; + --v2; + } + while ( v2 ); + return result; +} + +//----- (00438940) -------------------------------------------------------- +unsigned int __cdecl __esubm(int a1, int a2) +{ + int v2; // edx + unsigned int v3; // ecx + unsigned int result; // eax + + v2 = 7; + v3 = 0; + do + { + result = *(unsigned __int16 *)(a2 + 2 * v2 + 2) - v3 - *(unsigned __int16 *)(a1 + 2 * v2 + 2); + *(_WORD *)(a2 + 2 * v2 + 2) = result; + v3 = HIWORD(result) & 1; + --v2; + } + while ( v2 ); + return result; +} + +//----- (00438980) -------------------------------------------------------- +BOOL __cdecl __edivm(int a1, int *a2) +{ + int v2; // edx + int v3; // eax + int *v4; // ecx + __int16 v5; // ax + unsigned int v6; // eax + unsigned __int16 v7; // ax + int v8; // eax + unsigned __int16 v9; // bx + int v10; // edx + int v11; // ecx + unsigned int v12; // eax + int *v13; // esi + __int16 v14; // ax + int v16; // ecx + char *v17; // edx + int v18; // esi + int v19; // ebx + int v20; // eax + unsigned int v21; // ecx + int v22; // eax + unsigned __int16 v23; // bx + int v24; // ecx + char *v25; // edx + int v26; // eax + unsigned int v27; // ecx + __int16 *v28; // [esp+14h] [ebp-68h] + __int16 v29; // [esp+24h] [ebp-58h] + unsigned int v30; // [esp+28h] [ebp-54h] + int v31; // [esp+3Ah] [ebp-42h] + int v32; // [esp+3Eh] [ebp-3Eh] BYREF + int v33; // [esp+42h] [ebp-3Ah] + int v34; // [esp+46h] [ebp-36h] + __int16 v35; // [esp+4Ah] [ebp-32h] + __int16 v36; // [esp+4Ch] [ebp-30h] BYREF + char v37[14]; // [esp+4Eh] [ebp-2Eh] BYREF + char v38[32]; // [esp+5Ch] [ebp-20h] BYREF + + v2 = 0; + v32 = 0; + v33 = 0; + v3 = *a2; + v34 = 0; + v35 = 0; + v4 = a2 + 1; + v31 = v3; + do + { + if ( (*(_WORD *)v4 & 1) != 0 ) + v2 |= 1u; + v5 = *(_WORD *)v4 >> 1; + if ( (v2 & 2) != 0 ) + v5 |= 0x8000u; + v4 = (int *)((char *)v4 + 2); + v2 *= 2; + *((_WORD *)v4 - 1) = v5; + } + while ( (int *)((char *)a2 + 18) != v4 ); + v30 = *(unsigned __int16 *)(a1 + 6); + v28 = (__int16 *)&v32; + do + { + v6 = *((unsigned __int16 *)a2 + 3) + (*((unsigned __int16 *)a2 + 2) << 16); + if ( 0xFFFF * v30 < v6 ) + { + v7 = -1; + v29 = -1; + } + else + { + v29 = v6 / v30; + v7 = v29; + } + __m16m(v7, a1, (int)&v36); + v8 = 2; + while ( 1 ) + { + v9 = *((_WORD *)a2 + v8); + if ( *(_WORD *)&v37[2 * v8 - 2] != v9 ) + break; + if ( ++v8 == 9 ) + goto LABEL_13; + } + if ( *(unsigned __int16 *)&v37[2 * v8 - 2] > v9 ) + { + v16 = 0; + v17 = v38; + v18 = a1 + 16; + v19 = a1 + 16; + do + { + v20 = *(unsigned __int16 *)v17; + v17 -= 2; + v19 -= 2; + v21 = v20 - v16 - *(unsigned __int16 *)(v19 + 2); + *((_WORD *)v17 + 1) = v21; + v16 = HIWORD(v21) & 1; + } + while ( v17 != v37 ); + v22 = 2; + while ( 1 ) + { + v23 = *((_WORD *)a2 + v22); + if ( *(_WORD *)&v37[2 * v22 - 2] != v23 ) + break; + if ( ++v22 == 9 ) + goto LABEL_26; + } + if ( *(unsigned __int16 *)&v37[2 * v22 - 2] <= v23 ) + { +LABEL_26: + --v29; + goto LABEL_13; + } + v29 -= 2; + v24 = 0; + v25 = v38; + do + { + v26 = *(unsigned __int16 *)v25; + v25 -= 2; + v18 -= 2; + v27 = v26 - v24 - *(unsigned __int16 *)(v18 + 2); + *((_WORD *)v25 + 1) = v27; + v24 = HIWORD(v27) & 1; + } + while ( v25 != v37 ); + } +LABEL_13: + v10 = 7; + v11 = 0; + do + { + v12 = *((unsigned __int16 *)a2 + v10 + 1) - v11 - *(unsigned __int16 *)&v37[2 * v10]; + *((_WORD *)a2 + v10 + 1) = v12; + v11 = HIWORD(v12) & 1; + --v10; + } + while ( v10 ); + *v28 = v29; + memmove(a2 + 1, (char *)a2 + 6, 0xCu); + ++v28; + *((_WORD *)a2 + 8) = 0; + } + while ( v28 != &v36 ); + v13 = a2 + 1; + v14 = 0; + do + { + v13 = (int *)((char *)v13 + 2); + v14 |= *((_WORD *)v13 - 1); + } + while ( (int *)((char *)a2 + 18) != v13 ); + *a2 = v31; + a2[1] = v32; + a2[2] = v33; + a2[3] = v34; + *((_WORD *)a2 + 8) = v35; + return v14 != 0; +} +// 438980: using guessed type _WORD var_30[1]; + +//----- (00438C20) -------------------------------------------------------- +int __cdecl __emulm(int a1, int a2) +{ + unsigned __int16 v2; // bp + int v3; // edx + unsigned __int16 *v4; // ebx + unsigned __int16 v5; // ax + int v6; // esi + __int16 *v7; // ecx + char *v8; // edx + int v9; // edi + int v10; // eax + unsigned int v11; // esi + char v13[2]; // [esp+2Ch] [ebp-40h] BYREF + char v14; // [esp+2Eh] [ebp-3Eh] BYREF + char v15; // [esp+3Ch] [ebp-30h] BYREF + int v16; // [esp+3Eh] [ebp-2Eh] + int Src; // [esp+42h] [ebp-2Ah] BYREF + int v18; // [esp+46h] [ebp-26h] + int v19; // [esp+4Ah] [ebp-22h] + __int16 v20; // [esp+4Eh] [ebp-1Eh] BYREF + + v2 = 0; + Src = 0; + v18 = 0; + v3 = *(_DWORD *)a2; + v4 = (unsigned __int16 *)(a1 + 16); + v19 = 0; + v16 = v3; + v20 = 0; + do + { + v5 = *v4--; + if ( v5 ) + { + v6 = 0; + __m16m(v5, a2, (int)v13); + v7 = &v20; + v8 = &v15; + do + { + v9 = (unsigned __int16)*v7; + v10 = *(unsigned __int16 *)v8; + v8 -= 2; + --v7; + v11 = v6 + v9 + v10; + v7[1] = v11; + v6 = HIWORD(v11) & 1; + } + while ( v8 != &v14 ); + } + v2 |= v20; + memmove((char *)&Src + 2, &Src, 0xCu); + LOWORD(Src) = 0; + } + while ( v4 != (unsigned __int16 *)(a1 + 4) ); + *(_DWORD *)a2 = v16; + *(_DWORD *)(a2 + 4) = Src; + *(_DWORD *)(a2 + 8) = v18; + *(_DWORD *)(a2 + 12) = v19; + *(_WORD *)(a2 + 16) = v20; + return v2; +} +// 438C20: using guessed type char var_40[2]; + +//----- (00438D30) -------------------------------------------------------- +__int16 *__cdecl __toe64(_WORD *a1, int a2) +{ + int v2; // edx + __int16 *result; // eax + int v4; // edx + __int16 v5; // bx + __int16 v6; // bx + _WORD *v7; // ebx + __int16 v8; // ax + _WORD *v9; // edx + __int16 *v10; // ebx + + v2 = (unsigned __int16)a1[1]; + result = a1 + 3; + if ( (a1[1] & 0x7FFF) == 0x7FFF ) + { + v9 = a1 + 3; + do + { + if ( *v9 ) + { + *(_DWORD *)a2 = 0; + *(_DWORD *)(a2 + 4) = -1073741824; + *(_DWORD *)(a2 + 8) = 0x7FFF; + return result; + } + ++v9; + } + while ( a1 + 9 != v9 ); + *(_WORD *)(a2 + 10) = 0; + v4 = a2 + 6; + if ( *a1 ) + goto LABEL_8; + goto LABEL_4; + } + if ( !(_WORD)v2 ) + { + v7 = a1 + 2; + do + { + if ( (*v7 & 1) != 0 ) + v2 |= 1u; + v8 = *v7 >> 1; + if ( (v2 & 2) != 0 ) + v8 |= 0x8000u; + ++v7; + v2 *= 2; + *(v7 - 1) = v8; + } + while ( a1 + 9 != v7 ); + result = a1 + 3; + *(_WORD *)(a2 + 10) = 0; + v4 = a2 + 6; + if ( !*a1 ) + goto LABEL_4; +LABEL_8: + v5 = a1[1] | 0x8000; + goto LABEL_5; + } + *(_WORD *)(a2 + 10) = 0; + v4 = a2 + 6; + if ( *a1 ) + goto LABEL_8; +LABEL_4: + v5 = a1[1]; +LABEL_5: + *(_WORD *)(a2 + 8) = v5; + if ( (a1[1] & 0x7FFF) == 0x7FFF ) + { + v10 = result; + while ( !*v10 ) + { + if ( a1 + 9 == ++v10 ) + { + *(_DWORD *)a2 = 0; + *(_DWORD *)(a2 + 4) = 0x80000000; + return result; + } + } + } + do + { + v6 = *result++; + v4 -= 2; + *(_WORD *)(v4 + 2) = v6; + } + while ( result != a1 + 7 ); + return result; +} + +//----- (00438E80) -------------------------------------------------------- +int __cdecl __ecmp(int a1, int a2) +{ + int v2; // eax + int v4; // eax + int v5; // eax + int v6; // eax + int v7; // edx + unsigned __int16 v8; // si + unsigned __int16 v9; // cx + __int16 v10[9]; // [esp+14h] [ebp-30h] BYREF + __int16 v11[15]; // [esp+26h] [ebp-1Eh] BYREF + + if ( (*(_WORD *)(a1 + 10) & 0x7FFF) == 0x7FFF ) + { + v4 = a1; + while ( 1 ) + { + v4 += 2; + if ( *(_WORD *)(v4 - 2) ) + return -2; + if ( a1 + 10 == v4 ) + { + if ( (*(_WORD *)(a2 + 10) & 0x7FFF) != 0x7FFF ) + goto LABEL_3; + goto LABEL_13; + } + } + } + if ( (*(_WORD *)(a2 + 10) & 0x7FFF) == 0x7FFF ) + { +LABEL_13: + v5 = a2; + do + { + v5 += 2; + if ( *(_WORD *)(v5 - 2) ) + return -2; + } + while ( a2 + 10 != v5 ); + } +LABEL_3: + __emovi(a1, (int)v10); + __emovi(a2, (int)v11); + if ( v10[0] == v11[0] ) + { + v6 = 1; + v7 = v10[0] == 0 ? 1 : -1; + while ( 1 ) + { + v8 = v10[v6++]; + v9 = v10[v6 + 8]; + if ( v8 != v9 ) + break; + if ( v6 == 8 ) + return 0; + } + if ( v8 <= v9 ) + return v10[0] == 0 ? 1 : -1; + return v7; + } + else + { + v2 = 1; + while ( !v10[v2] && !v11[v2] ) + { + if ( ++v2 == 8 ) + return 0; + } + return v10[0] == 0 ? 1 : -1; + } +} +// 438E80: using guessed type __int16 var_1E[15]; + +//----- (00438FC0) -------------------------------------------------------- +BOOL __cdecl __eshift(__int16 *a1, int a2) +{ + return a2 && __eshift_part_0(a1, a2); +} + +//----- (00438FE0) -------------------------------------------------------- +int __cdecl __enormlz(_WORD *a1) +{ + unsigned __int16 v1; // ax + __int16 v2; // dx + int v3; // ecx + __int16 *j; // eax + unsigned __int16 *v5; // edx + __int16 v6; // si + unsigned __int16 v7; // ax + __int16 v8; // di + __int16 *v9; // esi + int v10; // edx + __int16 v11; // ax + unsigned __int16 *v13; // esi + int v14; // edx + unsigned __int16 v15; // ax + unsigned __int16 *v16; // ecx + __int16 i; // dx + __int16 v18; // si + + v1 = a1[2]; + if ( v1 ) + { + v3 = 0; + if ( (v1 & 0xFF00) != 0 ) + { + v16 = a1 + 2; + for ( i = 0; ; i = v18 ) + { + ++v16; + v18 = v1 << 8; + *(v16 - 1) = i | HIBYTE(v1); + if ( a1 + 9 == v16 ) + break; + v1 = *v16; + } + v1 = a1[2]; + v3 = -8; + } + while ( v1 ) + { + v13 = a1 + 2; + v14 = 0; + while ( 1 ) + { + if ( (v1 & 1) != 0 ) + v14 |= 1u; + v15 = v1 >> 1; + if ( (v14 & 2) != 0 ) + v15 |= 0x8000u; + ++v13; + v14 *= 2; + *(v13 - 1) = v15; + if ( a1 + 9 == v13 ) + break; + v1 = *v13; + } + if ( --v3 == -81 ) + break; + v1 = a1[2]; + } + } + else + { + v2 = a1[3]; + v3 = 0; + if ( v2 >= 0 ) + { + if ( v2 ) + { +LABEL_9: + while ( (v2 & 0xFF00) == 0 ) + { + v5 = a1 + 8; + v6 = 0; + do + { + v7 = *v5; + v8 = v6; + --v5; + v6 = HIBYTE(v7); + v5[1] = v8 | (v7 << 8); + } + while ( v5 != a1 + 1 ); + v2 = a1[3]; + v3 += 8; + } + while ( v2 >= 0 ) + { + v9 = a1 + 8; + v10 = 0; + do + { + if ( *v9 < 0 ) + v10 |= 1u; + v11 = 2 * *v9; + if ( (v10 & 2) != 0 ) + v11 |= 1u; + --v9; + v10 *= 2; + v9[1] = v11; + } + while ( a1 + 1 != v9 ); + if ( ++v3 > 96 ) + break; + v2 = a1[3]; + } + } + else + { + while ( 1 ) + { + for ( j = a1 + 3; ; v2 = *j ) + { + *(++j - 2) = v2; + if ( a1 + 9 == j ) + break; + } + v3 += 16; + a1[8] = 0; + if ( v3 == 96 ) + break; + v2 = a1[3]; + if ( v2 ) + goto LABEL_9; + } + } + } + } + return v3; +} + +//----- (00439190) -------------------------------------------------------- +__int16 __cdecl __emdnorm(int a1, int a2, int a3, int a4, int a5, int a6) +{ + int v6; // eax + int v7; // esi + bool v8; // dl + __int16 v9; // ax + bool v10; // zf + int v11; // eax + int v12; // edx + int v13; // ecx + unsigned int v14; // eax + __int16 *v15; // ecx + int v16; // edx + __int16 v17; // ax + _WORD *v18; // ecx + int v19; // edx + _WORD *v20; // ecx + int v21; // edx + __int16 v22; // ax + bool v24; // [esp+13h] [ebp-49h] + __int16 *v25; // [esp+14h] [ebp-48h] + int v26; // [esp+18h] [ebp-44h] + int v27; // [esp+1Ch] [ebp-40h] + int v28[3]; // [esp+2Eh] [ebp-2Eh] + int v29; // [esp+3Ah] [ebp-22h] + __int16 v30; // [esp+3Eh] [ebp-1Eh] + + v30 = 0; + v29 = 0x10000; + HIWORD(v28[0]) = 0; + v28[1] = 0; + v28[2] = 0; + v6 = __enormlz((_WORD *)a1); + v7 = a4 - v6; + if ( v6 > 80 && v7 <= 32766 ) + goto LABEL_19; + if ( v7 >= 0 ) + { + if ( !a5 ) + goto LABEL_9; + v8 = v7 <= 0 && a6 != 80; + v24 = v8; + if ( a6 != 64 ) + goto LABEL_6; + v29 = 1; + v25 = (__int16 *)(a1 + 14); + if ( !v8 ) + { + v26 = 6; + v9 = *(_WORD *)(a1 + 14); + goto LABEL_46; + } + v26 = 6; + v27 = 7; +LABEL_52: + v20 = (_WORD *)(a1 + 4); + v21 = 0; + a2 |= *(_WORD *)(a1 + 16) & 1; + do + { + if ( (*v20 & 1) != 0 ) + v21 |= 1u; + v22 = *v20 >> 1; + if ( (v21 & 2) != 0 ) + v22 |= 0x8000u; + ++v20; + v21 *= 2; + *(v20 - 1) = v22; + } + while ( v20 != (_WORD *)(a1 + 18) ); + v9 = *v25; + if ( a6 > 79 || v27 != 7 ) + { +LABEL_49: + *v25 = 0; + if ( v9 >= 0 ) + goto LABEL_27; + goto LABEL_22; + } +LABEL_46: + if ( *(_WORD *)(a1 + 16) ) + v9 |= 1u; + *(_WORD *)(a1 + 16) = 0; + goto LABEL_49; + } + if ( v7 < -80 ) + { +LABEL_19: + *(_DWORD *)(a1 + 2) = 0; + *(_DWORD *)(a1 + 6) = 0; + *(_DWORD *)(a1 + 10) = 0; + *(_DWORD *)(a1 + 14) = 0; + return v6; + } + v10 = !__eshift_part_0((__int16 *)a1, a4 - v6); + v11 = 1; + if ( v10 ) + v11 = a2; + a2 = v11; + if ( !a5 ) + goto LABEL_35; + v24 = a6 != 80; + if ( a6 == 64 ) + { + v29 = 1; + v25 = (__int16 *)(a1 + 14); + v26 = 6; + v27 = 7; + goto LABEL_52; + } +LABEL_6: + v25 = (__int16 *)(a1 + 16); + if ( v24 ) + { + v26 = 7; + v27 = 8; + goto LABEL_52; + } + v9 = *(_WORD *)(a1 + 16); + *(_WORD *)(a1 + 16) = 0; + if ( v9 >= 0 ) + goto LABEL_8; + v26 = 7; +LABEL_22: + if ( v9 != (__int16)0x8000 ) + goto LABEL_25; + if ( a2 ) + { + if ( !a3 ) + { +LABEL_25: + v12 = 7; + v13 = 0; + do + { + v14 = v13 + *(unsigned __int16 *)(a1 + 2 * v12 + 2) + *((unsigned __int16 *)v28 + v12 + 1); + *(_WORD *)(a1 + 2 * v12 + 2) = v14; + v13 = HIWORD(v14) & 1; + --v12; + } + while ( v12 ); + } + } + else if ( (*(_BYTE *)(a1 + 2 * v26) & 1) != 0 ) + { + goto LABEL_25; + } +LABEL_27: + if ( !v24 ) + { +LABEL_8: + LOWORD(v6) = *(_WORD *)(a1 + 4); + if ( !(_WORD)v6 ) + goto LABEL_9; + goto LABEL_36; + } + v15 = (__int16 *)(a1 + 16); + v16 = 0; + do + { + if ( *v15 < 0 ) + v16 |= 1u; + v17 = 2 * *v15; + if ( (v16 & 2) != 0 ) + v17 |= 1u; + --v15; + v16 *= 2; + v15[1] = v17; + } + while ( v15 != (__int16 *)(a1 + 2) ); + LOWORD(v6) = *(_WORD *)(a1 + 4); + if ( (_WORD)v6 ) + { +LABEL_36: + v18 = (_WORD *)(a1 + 4); + v19 = 0; + while ( 1 ) + { + if ( (v6 & 1) != 0 ) + v19 |= 1u; + LOWORD(v6) = (unsigned __int16)v6 >> 1; + if ( (v19 & 2) != 0 ) + LOWORD(v6) = v6 | 0x8000; + ++v18; + v19 *= 2; + *(v18 - 1) = v6; + if ( (_WORD *)(a1 + 18) == v18 ) + break; + LOWORD(v6) = *v18; + } + ++v7; +LABEL_9: + *(_WORD *)(a1 + 16) = 0; + if ( v7 > 32766 ) + { + *(_DWORD *)(a1 + 4) = 0; + *(_WORD *)(a1 + 2) = 0x7FFF; + *(_DWORD *)(a1 + 8) = 0; + *(_DWORD *)(a1 + 12) = 0; + return v6; + } + goto LABEL_10; + } +LABEL_35: + *(_WORD *)(a1 + 16) = 0; +LABEL_10: + LOWORD(v6) = 0; + if ( v7 < 0 ) + LOWORD(v7) = 0; + *(_WORD *)(a1 + 2) = v7; + return v6; +} + +//----- (00439510) -------------------------------------------------------- +int __cdecl __emovo(_WORD *a1, int a2) +{ + int result; // eax + __int16 v3; // dx + __int16 *v4; // edx + __int16 v5; // bx + _WORD *v6; // ebx + + result = a2; + v3 = a1[1]; + if ( *a1 ) + v3 = a1[1] | 0x8000; + *(_WORD *)(a2 + 10) = v3; + if ( a1[1] == 0x7FFF ) + { + v6 = a1 + 3; + while ( !*v6 ) + { + if ( a1 + 9 == ++v6 ) + { + *(_DWORD *)a2 = 0; + *(_DWORD *)(a2 + 4) = 0; + *(_WORD *)(a2 + 8) = 0; + *(_WORD *)(a2 + 10) = v3 | 0x7FFF; + return result; + } + } + *(_DWORD *)a2 = 0; + *(_DWORD *)(a2 + 4) = 0; + *(_DWORD *)(a2 + 8) = 2147467264; + } + else + { + v4 = a1 + 3; + result = a2 + 8; + do + { + v5 = *v4++; + result -= 2; + *(_WORD *)(result + 2) = v5; + } + while ( v4 != a1 + 8 ); + } + return result; +} + +//----- (004395A0) -------------------------------------------------------- +__int16 __cdecl __emul(int a1, int a2, int a3) +{ + int v3; // edx + int v4; // ebx + __int16 v5; // bp + int v6; // ecx + int v7; // eax + int v8; // esi + int v9; // eax + _WORD *v10; // eax + int v11; // eax + int v12; // ecx + int v13; // eax + int v14; // eax + _WORD *v15; // eax + int v16; // ebx + int v17; // ebp + char *v18; // eax + int v19; // eax + unsigned __int16 v20; // cx + unsigned int v21; // eax + unsigned int v22; // edx + bool v23; // zf + __int16 v24; // ax + char *v25; // eax + int v26; // eax + __int16 v28; // [esp+2Ch] [ebp-50h] + __int16 v29; // [esp+2Eh] [ebp-4Eh] + __int16 v30; // [esp+3Ch] [ebp-40h] BYREF + unsigned __int16 v31; // [esp+3Eh] [ebp-3Eh] + char v32; // [esp+40h] [ebp-3Ch] BYREF + char v33; // [esp+4Ch] [ebp-30h] BYREF + __int16 v34; // [esp+4Eh] [ebp-2Eh] BYREF + unsigned __int16 v35; // [esp+50h] [ebp-2Ch] + char v36; // [esp+52h] [ebp-2Ah] BYREF + char v37; // [esp+5Eh] [ebp-1Eh] BYREF + + v3 = a1; + v4 = a2; + v5 = *(_WORD *)(a1 + 10) & 0x7FFF; + if ( v5 == 0x7FFF ) + { + v12 = a1 + 10; + v13 = a1; + do + { + v13 += 2; + if ( *(_WORD *)(v13 - 2) ) + { + *(_DWORD *)a3 = *(_DWORD *)a1; + *(_DWORD *)(a3 + 4) = *(_DWORD *)(a1 + 4); + v11 = *(_DWORD *)(a1 + 8); + *(_DWORD *)(a3 + 8) = v11; + return v11; + } + } + while ( v13 != v12 ); + v29 = *(_WORD *)(a2 + 10); + v28 = v29 & 0x7FFF; + if ( (v29 & 0x7FFF) == 0x7FFF ) + goto LABEL_3; + goto LABEL_18; + } + v29 = *(_WORD *)(a2 + 10); + if ( (v29 & 0x7FFF) == 0x7FFF ) + { +LABEL_3: + v6 = a2 + 10; + v7 = a2; + do + { + v7 += 2; + if ( *(_WORD *)(v7 - 2) ) + { + *(_DWORD *)a3 = *(_DWORD *)a2; + *(_DWORD *)(a3 + 4) = *(_DWORD *)(a2 + 4); + v11 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a3 + 8) = v11; + return v11; + } + } + while ( v7 != v6 ); + v8 = 0; + if ( v5 != 0x7FFF ) + goto LABEL_7; + v12 = a1 + 10; + v28 = 0x7FFF; +LABEL_18: + v14 = a1; + while ( 1 ) + { + v14 += 2; + if ( *(_WORD *)(v14 - 2) ) + break; + if ( v14 == v12 ) + { + v15 = (_WORD *)(a2 + 2); + while ( !*v15 ) + { + if ( ++v15 == (_WORD *)(a2 + 16) ) + { +LABEL_13: + LOWORD(v11) = a3; + *(_DWORD *)a3 = 0; + *(_DWORD *)(a3 + 4) = 0; + *(_DWORD *)(a3 + 8) = 2147467264; + return v11; + } + } + if ( v28 != 0x7FFF ) + goto LABEL_41; + v8 = 1; + v6 = a2 + 10; + goto LABEL_7; + } + } + if ( v28 != 0x7FFF ) + goto LABEL_27; + v8 = 0; + v6 = a2 + 10; +LABEL_7: + v9 = a2; + while ( 1 ) + { + v9 += 2; + if ( *(_WORD *)(v9 - 2) ) + break; + if ( v9 == v6 ) + { + v10 = (_WORD *)(a1 + 2); + while ( !*v10 ) + { + if ( (_WORD *)(a1 + 16) == ++v10 ) + goto LABEL_13; + } + goto LABEL_33; + } + } + if ( !v8 ) + goto LABEL_27; +LABEL_33: + v28 = 0x7FFF; + if ( v5 == 0x7FFF ) + { + v12 = a1 + 10; +LABEL_41: + while ( 1 ) + { + v3 += 2; + if ( *(_WORD *)(v3 - 2) ) + break; + if ( v3 == v12 ) + goto LABEL_34; + } + v21 = 0; + } + else + { +LABEL_34: + v21 = (unsigned int)*(__int16 *)(a1 + 10) >> 31; + } + if ( v28 == 0x7FFF ) + { + while ( 1 ) + { + v4 += 2; + if ( *(_WORD *)(v4 - 2) ) + break; + if ( v4 == a2 + 10 ) + goto LABEL_36; + } + v22 = 0; + } + else + { +LABEL_36: + v22 = (unsigned int)v29 >> 31; + } + v23 = v22 == v21; + v24 = 0x8000; + if ( v23 ) + v24 = 0; + *(_DWORD *)a3 = 0; + LOWORD(v11) = v24 | 0x7FFF; + *(_DWORD *)(a3 + 4) = 0; + *(_WORD *)(a3 + 8) = 0; + *(_WORD *)(a3 + 10) = v11; + return v11; + } +LABEL_27: + __emovi(a1, (int)&v30); + __emovi(a2, (int)&v34); + v16 = v31; + v17 = v35; + if ( v31 ) + { + v20 = v35; +LABEL_52: + v25 = &v36; + if ( v20 ) + { +LABEL_56: + v26 = __emulm((int)&v30, (int)&v34); + __emdnorm((int)&v34, v26, 0, v16 + v17 - 16382, 64, 80); + v34 = -(v30 != v34); + LOWORD(v11) = __emovo(&v34, a3); + return v11; + } + while ( v25 != &v37 ) + { + v25 += 2; + if ( *((_WORD *)v25 - 1) ) + { + v17 -= __enormlz(&v34); + goto LABEL_56; + } + } + } + else + { + v18 = &v32; + while ( v18 != &v33 ) + { + v18 += 2; + if ( *((_WORD *)v18 - 1) ) + { + v19 = __enormlz(&v30); + v20 = v35; + v16 = -v19; + goto LABEL_52; + } + } + } + LOWORD(v11) = a3; + *(_DWORD *)a3 = 0; + *(_DWORD *)(a3 + 4) = 0; + *(_DWORD *)(a3 + 8) = 0; + return v11; +} + +//----- (00439950) -------------------------------------------------------- +int *__usercall __pformat_cvt@(unsigned int a1@, __int64 a2, int a3, int a4, int a5, int *a6, int *a7) +{ + char v10; // c2 + char v11; // c3 + char v12; // c0 + __int16 v13; // cx + int v14; // ebx + int v15; // eax + long double v17; // [esp+20h] [ebp-2Ch] BYREF + int v18; // [esp+2Ch] [ebp-20h] + int v19; // [esp+38h] [ebp-14h] BYREF + char *v20; // [esp+3Ch] [ebp-10h] BYREF + + *(_QWORD *)&v17 = a2; + HIDWORD(v17) = a3; + _FST7 = v17; + v18 = a4; + __asm { fxam } + if ( v12 ) + { + if ( !v10 ) + { + v19 = 4; + v14 = 0; + v15 = 0; + goto LABEL_7; + } + v19 = 3; + v13 = WORD4(v17); + v14 = 0; + } + else + { + v13 = WORD4(v17); + if ( v10 ) + { + if ( v11 ) + { + v19 = 2; + v14 = -16445; + } + else + { + v19 = 1; + v14 = (__int16)((WORD4(v17) & 0x7FFF) - 16446); + } + } + else + { + v19 = 0; + v14 = 0; + } + } + v15 = v13 & 0x8000; +LABEL_7: + *a7 = v15; + return __gdtoa(fpi_0_0, v14, (int *)&v17, &v19, a1, a5, a6, &v20); +} +// 439984: variable 'v12' is possibly undefined +// 439989: variable 'v10' is possibly undefined +// 439A0B: variable 'v11' is possibly undefined +// 50B13C: using guessed type int fpi_0_0[6]; + +//----- (00439A50) -------------------------------------------------------- +int __usercall __pformat_putc@(int a1@, int a2@) +{ + int v4; // edx + int v5; // eax + int result; // eax + + v4 = *(_DWORD *)(a2 + 4); + if ( (v4 & 0x4000) == 0 ) + { + v5 = *(_DWORD *)(a2 + 32); + if ( *(_DWORD *)(a2 + 36) <= v5 ) + goto LABEL_5; + } + if ( (v4 & 0x2000) == 0 ) + { + *(_BYTE *)(*(_DWORD *)a2 + *(_DWORD *)(a2 + 32)) = a1; + v5 = *(_DWORD *)(a2 + 32); +LABEL_5: + result = v5 + 1; + *(_DWORD *)(a2 + 32) = result; + return result; + } + fputc(a1, *(FILE **)a2); + result = *(_DWORD *)(a2 + 32) + 1; + *(_DWORD *)(a2 + 32) = result; + return result; +} + +//----- (00439AB0) -------------------------------------------------------- +int __usercall __pformat_wputchars@(int a1@, int a2@, int a3@) +{ + int v5; // eax + int result; // eax + signed int v7; // eax + char *v8; // ebp + char *v9; // esi + int v10; // eax + int v11; // edx + int v12; // eax + int v13; // eax + int v15; // [esp+1Ch] [ebp-40h] + mbstate_t State; // [esp+28h] [ebp-34h] BYREF + char Dest[44]; // [esp+30h] [ebp-2Ch] BYREF + + wcrtomb(Dest, 0, &State); + v5 = *(_DWORD *)(a3 + 12); + if ( v5 >= 0 && a2 > v5 ) + a2 = *(_DWORD *)(a3 + 12); + result = *(_DWORD *)(a3 + 8); + if ( result <= a2 ) + { + *(_DWORD *)(a3 + 8) = -1; + goto LABEL_6; + } + v13 = result - a2; + *(_DWORD *)(a3 + 8) = v13; + if ( (*(_BYTE *)(a3 + 5) & 4) == 0 ) + { + *(_DWORD *)(a3 + 8) = v13 - 1; + do + { + __pformat_putc(32, a3); + result = *(_DWORD *)(a3 + 8); + *(_DWORD *)(a3 + 8) = result - 1; + } + while ( result ); +LABEL_6: + if ( a2 <= 0 ) + { + *(_DWORD *)(a3 + 8) = -2; + return result; + } + goto LABEL_7; + } + if ( a2 > 0 ) + { +LABEL_7: + v15 = a2; + while ( 1 ) + { + a1 += 2; + v7 = wcrtomb(Dest, *(_WORD *)(a1 - 2), &State); + if ( v7 <= 0 ) + goto LABEL_19; + v8 = &Dest[v7]; + v9 = Dest; + do + { + while ( 1 ) + { + v11 = *(_DWORD *)(a3 + 4); + ++v9; + if ( (v11 & 0x4000) == 0 ) + { + v10 = *(_DWORD *)(a3 + 32); + if ( *(_DWORD *)(a3 + 36) <= v10 ) + goto LABEL_11; + } + v12 = *(v9 - 1); + if ( (v11 & 0x2000) != 0 ) + break; + *(_BYTE *)(*(_DWORD *)a3 + *(_DWORD *)(a3 + 32)) = v12; + v10 = *(_DWORD *)(a3 + 32); +LABEL_11: + *(_DWORD *)(a3 + 32) = v10 + 1; + if ( v9 == v8 ) + goto LABEL_16; + } + fputc(v12, *(FILE **)a3); + ++*(_DWORD *)(a3 + 32); + } + while ( v9 != v8 ); +LABEL_16: + if ( !--v15 ) + { + result = *(_DWORD *)(a3 + 8); + *(_DWORD *)(a3 + 8) = result - 1; + if ( result > 0 ) + goto LABEL_18; + return result; + } + } + } + *(_DWORD *)(a3 + 8) = v13 - 1; + do + { +LABEL_18: + __pformat_putc(32, a3); +LABEL_19: + result = *(_DWORD *)(a3 + 8); + *(_DWORD *)(a3 + 8) = result - 1; + } + while ( result > 0 ); + return result; +} +// 439AB0: using guessed type char var_2C[44]; + +//----- (00439C10) -------------------------------------------------------- +int __usercall __pformat_putchars@(_BYTE *a1@, int a2@, int a3@) +{ + int v3; // edi + int v6; // eax + int result; // eax + int v8; // eax + _BYTE *v9; // edi + int v10; // edx + FILE *Stream; // ecx + int v12; // edx + int v13; // eax + int v14; // edx + + v3 = a2; + v6 = *(_DWORD *)(a3 + 12); + if ( v6 >= 0 && a2 > v6 ) + v3 = *(_DWORD *)(a3 + 12); + result = *(_DWORD *)(a3 + 8); + if ( result > v3 ) + { + v13 = result - v3; + *(_DWORD *)(a3 + 8) = v13; + v14 = v13; + v8 = *(_DWORD *)(a3 + 4); + if ( (v8 & 0x400) != 0 ) + { + if ( !v3 ) + { + *(_DWORD *)(a3 + 8) = v14 - 1; + goto LABEL_21; + } + goto LABEL_8; + } + *(_DWORD *)(a3 + 8) = v14 - 1; + do + { + __pformat_putc(32, a3); + result = *(_DWORD *)(a3 + 8); + *(_DWORD *)(a3 + 8) = result - 1; + } + while ( result ); + } + else + { + *(_DWORD *)(a3 + 8) = -1; + } + if ( !v3 ) + { + *(_DWORD *)(a3 + 8) = -2; + return result; + } + v8 = *(_DWORD *)(a3 + 4); +LABEL_8: + v9 = &a1[v3 - 1]; + while ( 1 ) + { + if ( (v8 & 0x4000) != 0 || (v10 = *(_DWORD *)(a3 + 32), *(_DWORD *)(a3 + 36) > v10) ) + { + Stream = *(FILE **)a3; + if ( (v8 & 0x2000) != 0 ) + fputc((char)*a1, Stream); + else + *((_BYTE *)&Stream->_ptr + *(_DWORD *)(a3 + 32)) = *a1; + v10 = *(_DWORD *)(a3 + 32); + } + *(_DWORD *)(a3 + 32) = v10 + 1; + if ( v9 == a1 ) + break; + v8 = *(_DWORD *)(a3 + 4); + ++a1; + } + while ( 1 ) + { + result = *(_DWORD *)(a3 + 8); + *(_DWORD *)(a3 + 8) = result - 1; + if ( result <= 0 ) + break; + v8 = *(_DWORD *)(a3 + 4); +LABEL_21: + if ( (v8 & 0x4000) != 0 || (v12 = *(_DWORD *)(a3 + 32), *(_DWORD *)(a3 + 36) > v12) ) + { + if ( (v8 & 0x2000) != 0 ) + fputc(32, *(FILE **)a3); + else + *(_BYTE *)(*(_DWORD *)a3 + *(_DWORD *)(a3 + 32)) = 32; + v12 = *(_DWORD *)(a3 + 32); + } + *(_DWORD *)(a3 + 32) = v12 + 1; + } + return result; +} + +//----- (00439D50) -------------------------------------------------------- +int __usercall __pformat_puts@(char *a1@, int a2@) +{ + char *String; // ebx + signed int MaxCount; // eax + int v5; // eax + + String = a1; + if ( !a1 ) + String = "(null)"; + MaxCount = *(_DWORD *)(a2 + 12); + if ( MaxCount < 0 ) + v5 = strlen(String); + else + v5 = strnlen(String, MaxCount); + return __pformat_putchars(String, v5, a2); +} + +//----- (00439DB0) -------------------------------------------------------- +int __usercall __pformat_emit_inf_or_nan@(int a1@, int a2@, int a3@) +{ + int v5; // ebx + char *v6; // ecx + char v7; // bl + int i; // edx + char v10; // [esp+Ch] [ebp-20h] BYREF + char v11[31]; // [esp+Dh] [ebp-1Fh] BYREF + + *(_DWORD *)(a3 + 12) = -1; + v5 = *(_DWORD *)(a3 + 4); + if ( a1 ) + { + v10 = 45; + v6 = v11; + } + else if ( (v5 & 0x100) != 0 ) + { + v10 = 43; + v6 = v11; + } + else if ( (v5 & 0x40) != 0 ) + { + v10 = 32; + v6 = v11; + } + else + { + v6 = &v10; + } + v7 = v5 & 0x20; + for ( i = 0; i != 3; ++i ) + v6[i] = v7 | *(_BYTE *)(a2 + i) & 0xDF; + return __pformat_putchars(&v10, v6 + 3 - &v10, a3); +} + +//----- (00439E40) -------------------------------------------------------- +int __usercall __pformat_xint@(int a1@, __int64 a2, int a3, int a4, int a5) +{ + int v5; // ebx + int v6; // ecx + int v7; // edi + int v8; // ecx + int v9; // eax + void *v10; // esp + char v11; // cl + void *v12; // esp + int v13; // ebx + unsigned __int64 v14; // rdi + char v15; // al + char v16; // cl + char *v17; // esi + int v18; // eax + int result; // eax + int v20; // edi + bool v21; // zf + unsigned int v22; // edx + int v23; // edi + int v24; // eax + int v25; // eax + int v26; // esi + int v27; // eax + int v28; // eax + int v29; // eax + void *v30; // esp + void *v31; // esp + int v32; // ecx + int v33; // eax + int v34; // edx + size_t v35; // edi + size_t v36; // eax + size_t v37; // ecx + int v38; // edi + int v39; // ecx + unsigned int v40; // eax + int v41; // eax + void *v42; // esp + void *v43; // esp + int v44; // eax + int v45; // eax + void *v46; // esp + void *v47; // esp + int v48; // eax + void *v49; // [esp+0h] [ebp-68h] + FILE *v50; // [esp+4h] [ebp-64h] + _BYTE v51[8]; // [esp+10h] [ebp-58h] BYREF + int v52; // [esp+18h] [ebp-50h] + int v53; // [esp+1Ch] [ebp-4Ch] + __int64 v54; // [esp+20h] [ebp-48h] + int v55; // [esp+28h] [ebp-40h] + int v56; // [esp+2Ch] [ebp-3Ch] + char *v57; // [esp+30h] [ebp-38h] + size_t v58; // [esp+34h] [ebp-34h] + size_t Size; // [esp+38h] [ebp-30h] + size_t v60; // [esp+3Ch] [ebp-2Ch] + __int64 v61; // [esp+40h] [ebp-28h] + int v62; // [esp+48h] [ebp-20h] + int v63; // [esp+4Ch] [ebp-1Ch] + + v56 = a1; + v5 = a5; + v61 = a2; + v54 = a2; + v62 = a3; + v63 = a4; + if ( a1 == 111 ) + { + v39 = 0; + v7 = *(_DWORD *)(a5 + 4); + v55 = *(_DWORD *)(a5 + 12); + if ( v55 >= 0 ) + v39 = v55; + v8 = v39 + 24; + if ( (v7 & 0x1000) != 0 ) + { + if ( *(_WORD *)(a5 + 28) ) + { + v60 = 3; +LABEL_46: + v53 = *(_DWORD *)(a5 + 8); + v28 = v8 / 3u + v8; + if ( v28 < v53 ) + v28 = v53; + v29 = 16 * ((unsigned int)(v28 + 27) >> 4); + v30 = alloca(v29); + v31 = alloca(v29); + v57 = v51; + if ( v56 != 111 ) + { + v11 = 15; + goto LABEL_50; + } +LABEL_75: + v11 = 7; + goto LABEL_8; + } + v48 = v8; + v53 = *(_DWORD *)(a5 + 8); + if ( v8 < v53 ) + v48 = v53; + v40 = v48 + 27; + } + else + { + v53 = *(_DWORD *)(a5 + 8); + if ( v53 >= v8 ) + v8 = v53; + v40 = v8 + 27; + } + v41 = 16 * (v40 >> 4); + v42 = alloca(v41); + v43 = alloca(v41); + v60 = 3; + v57 = v51; + goto LABEL_75; + } + v6 = 0; + v7 = *(_DWORD *)(a5 + 4); + v55 = *(_DWORD *)(a5 + 12); + if ( v55 >= 0 ) + v6 = v55; + v8 = v6 + 18; + if ( (v7 & 0x1000) != 0 ) + { + v21 = *(_WORD *)(a5 + 28) == 0; + v60 = 4; + if ( v21 ) + { + v44 = v8; + v53 = *(_DWORD *)(a5 + 8); + if ( v8 < v53 ) + v44 = v53; + v45 = 16 * ((unsigned int)(v44 + 27) >> 4); + v46 = alloca(v45); + v11 = 15; + v47 = alloca(v45); + v57 = v51; +LABEL_50: + if ( v54 ) + goto LABEL_9; +LABEL_51: + v17 = v57; + goto LABEL_52; + } + goto LABEL_46; + } + v53 = *(_DWORD *)(a5 + 8); + if ( v53 >= v8 ) + v8 = v53; + v9 = 16 * ((unsigned int)(v8 + 27) >> 4); + v10 = alloca(v9); + v11 = 15; + v12 = alloca(v9); + v60 = 4; + v57 = v51; +LABEL_8: + if ( !v54 ) + goto LABEL_51; +LABEL_9: + LOBYTE(Size) = v11; + v52 = v7; + v13 = (int)v57; + v14 = __PAIR64__(v54, HIDWORD(v54)); + LOBYTE(v58) = v56 & 0x20; + do + { + ++v13; + v15 = v58 | ((BYTE4(v14) & Size) + 55); + v16 = v60; + if ( (unsigned __int8)((BYTE4(v14) & Size) + 48) < 0x3Au ) + v15 = (BYTE4(v14) & Size) + 48; + HIDWORD(v14) = __PAIR64__(v14, HIDWORD(v14)) >> v60; + *(_BYTE *)(v13 - 1) = v15; + LODWORD(v14) = (unsigned int)v14 >> v16; + if ( (v16 & 0x20) != 0 ) + HIDWORD(v14) = v14; + if ( (v16 & 0x20) != 0 ) + LODWORD(v14) = 0; + } + while ( v14 ); + v17 = (char *)v13; + v7 = v52; + v5 = a5; + if ( v17 == v57 ) + { +LABEL_52: + v32 = v55; + v33 = v7; + v34 = v17 - v57; + BYTE1(v33) = BYTE1(v7) & 0xF7; + *(_DWORD *)(v5 + 4) = v33; + v18 = v32 - v34; + if ( v32 <= 0 ) + goto LABEL_78; + goto LABEL_53; + } + if ( v55 <= 0 || (v18 = v55 - (v17 - v57), v18 <= 0) ) + { + if ( v56 != 111 || (v52 & 0x800) == 0 ) + goto LABEL_21; + *v17++ = 48; +LABEL_78: + if ( v17 == v57 ) + { + result = 0; + if ( v55 ) + goto LABEL_56; +LABEL_22: + v20 = v53; + if ( result < v53 ) + goto LABEL_57; + goto LABEL_23; + } +LABEL_21: + result = v17 - v57; + goto LABEL_22; + } +LABEL_53: + v35 = 1; + v49 = v17; + if ( v18 > 0 ) + v35 = v18; + v17 += v35; + memset(v49, 48, v35); + if ( v17 != v57 ) + goto LABEL_21; +LABEL_56: + v20 = v53; + *v17 = 48; + result = ++v17 - v57; + if ( result < v20 ) + { +LABEL_57: + v21 = v56 == 111; + v36 = v20 - result; + Size = v36; + *(_DWORD *)(v5 + 8) = v36; + v23 = *(_DWORD *)(v5 + 4); + if ( v21 ) + { + if ( v55 >= 0 || (*(_DWORD *)(v5 + 4) & 0x600) != 512 ) + { + v37 = Size - 1; + if ( (v23 & 0x400) != 0 ) + { + if ( v17 > v57 ) + { +LABEL_88: + v58 = v37; + v22 = (unsigned int)v57; + goto LABEL_31; + } +LABEL_84: + v26 = v37; + goto LABEL_40; + } + goto LABEL_64; + } + } + else + { + if ( (v23 & 0x800) != 0 ) + { + Size = v36 - 2; + if ( (int)(v36 - 2) <= 0 || v55 >= 0 ) + goto LABEL_61; + } + else if ( v55 >= 0 ) + { + goto LABEL_86; + } + if ( (v23 & 0x600) != 512 ) + { + if ( (v23 & 0x800) == 0 ) + { +LABEL_86: + v37 = Size - 1; + if ( (v23 & 0x400) != 0 ) + goto LABEL_87; +LABEL_64: + v38 = v37; + do + { + __pformat_putc(32, v5); + result = v38--; + } + while ( result > 0 ); +LABEL_66: + if ( v17 > v57 ) + { + v23 = *(_DWORD *)(v5 + 4); + v22 = (unsigned int)v57; + Size = -1; + v58 = -2; + goto LABEL_31; + } + return result; + } +LABEL_61: + result = (unsigned __int8)v56; + v17[1] = 48; + v17 += 2; + *(v17 - 2) = result; + goto LABEL_62; + } + } + v58 = Size - 1; + v60 = Size; + result = (int)memset(v17, 48, Size); + v17 += v60; + Size = v58 - Size; + if ( v56 == 111 || (v23 & 0x800) == 0 ) + { +LABEL_62: + if ( (int)Size > 0 ) + { + v23 = *(_DWORD *)(v5 + 4); + v37 = Size - 1; + if ( (v23 & 0x400) == 0 ) + goto LABEL_64; +LABEL_87: + if ( v57 < v17 ) + goto LABEL_88; + goto LABEL_84; + } + goto LABEL_26; + } + goto LABEL_61; + } +LABEL_23: + v21 = v56 == 111; + *(_DWORD *)(v5 + 8) = -1; + if ( v21 ) + goto LABEL_66; + Size = -1; + if ( (*(_BYTE *)(v5 + 5) & 8) != 0 ) + { + result = (unsigned __int8)v56; + v17[1] = 48; + v17 += 2; + *(v17 - 2) = result; + } +LABEL_26: + v22 = (unsigned int)v57; + if ( v17 <= v57 ) + return result; + v23 = *(_DWORD *)(v5 + 4); + v58 = Size - 1; +LABEL_31: + while ( 1 ) + { + --v17; + if ( (v23 & 0x4000) != 0 ) + break; + v24 = *(_DWORD *)(v5 + 32); + if ( *(_DWORD *)(v5 + 36) > v24 ) + break; +LABEL_29: + result = v24 + 1; + *(_DWORD *)(v5 + 32) = result; + if ( (unsigned int)v17 <= v22 ) + goto LABEL_35; +LABEL_30: + v23 = *(_DWORD *)(v5 + 4); + } + v25 = *v17; + if ( (v23 & 0x2000) == 0 ) + { + *(_BYTE *)(*(_DWORD *)v5 + *(_DWORD *)(v5 + 32)) = v25; + v24 = *(_DWORD *)(v5 + 32); + goto LABEL_29; + } + v50 = *(FILE **)v5; + v60 = v22; + fputc(v25, v50); + v22 = v60; + result = *(_DWORD *)(v5 + 32) + 1; + *(_DWORD *)(v5 + 32) = result; + if ( (unsigned int)v17 > v22 ) + goto LABEL_30; +LABEL_35: + if ( (int)Size > 0 ) + { + v23 = *(_DWORD *)(v5 + 4); + v26 = v58; +LABEL_40: + while ( 2 ) + { + if ( (v23 & 0x4000) != 0 || (v27 = *(_DWORD *)(v5 + 32), *(_DWORD *)(v5 + 36) > v27) ) + { + if ( (v23 & 0x2000) != 0 ) + { + fputc(32, *(FILE **)v5); + ++*(_DWORD *)(v5 + 32); + result = v26 - 1; + if ( v26 <= 0 ) + return result; + goto LABEL_39; + } + *(_BYTE *)(*(_DWORD *)v5 + *(_DWORD *)(v5 + 32)) = 32; + v27 = *(_DWORD *)(v5 + 32); + } + *(_DWORD *)(v5 + 32) = v27 + 1; + result = v26 - 1; + if ( v26 <= 0 ) + return result; +LABEL_39: + v23 = *(_DWORD *)(v5 + 4); + v26 = result; + continue; + } + } + return result; +} + +//----- (0043A3F0) -------------------------------------------------------- +int __cdecl __pformat_int(__int64 a1, int a2, int a3, int a4) +{ + int v4; // ecx + int v5; // ebx + int v6; // esi + int v7; // ecx + int v8; // eax + void *v9; // esp + void *v10; // esp + unsigned int v11; // edi + int v12; // esi + char *v13; // ebx + char *v14; // ecx + unsigned __int64 v15; // kr08_8 + char *v16; // edi + char *v17; // esi + int v18; // eax + size_t v19; // edx + int v20; // eax + int v21; // edx + unsigned int v22; // ecx + int v23; // edi + char *v24; // esi + int v25; // eax + int v26; // eax + int result; // eax + int v28; // edx + int v29; // ecx + int v30; // edx + int v31; // eax + int v32; // eax + signed int v33; // ecx + int v34; // ecx + int v36; // [esp+10h] [ebp-48h] BYREF + int v37; // [esp+18h] [ebp-40h] + char *v38; // [esp+1Ch] [ebp-3Ch] + __int64 v39; // [esp+20h] [ebp-38h] + int v40; // [esp+28h] [ebp-30h] + char *v41; // [esp+2Ch] [ebp-2Ch] + __int64 v42; // [esp+30h] [ebp-28h] + int v43; // [esp+38h] [ebp-20h] + int v44; // [esp+3Ch] [ebp-1Ch] + + v4 = 0; + v5 = a4; + v42 = a1; + v6 = *(_DWORD *)(a4 + 4); + v43 = a2; + v44 = a3; + v39 = a1; + v37 = *(_DWORD *)(a4 + 12); + if ( v37 >= 0 ) + v4 = v37; + v7 = v4 + 23; + if ( (v6 & 0x1000) != 0 && *(_WORD *)(a4 + 28) ) + v7 += v7 / 3u; + v40 = *(_DWORD *)(a4 + 8); + if ( v40 >= v7 ) + v7 = v40; + v8 = 16 * ((unsigned int)(v7 + 27) >> 4); + v9 = alloca(v8); + v10 = alloca(v8); + v41 = (char *)&v36; + if ( (v6 & 0x80) != 0 ) + { + if ( v39 < 0 ) + { + v12 = -(int)v39; + v11 = (unsigned __int64)-v39 >> 32; +LABEL_12: + v38 = v41 + 1; + v13 = v41; + while ( 1 ) + { + if ( v41 == v13 ) + { + v14 = v41; + v13 = v38; + } + else + { + v14 = v13 + 1; + if ( (*(_BYTE *)(a4 + 5) & 0x10) != 0 && *(_WORD *)(a4 + 28) && ((v13 - v41) & 0x80000003) == 3 ) + { + *v13 = 44; + v13 += 2; + } + else + { + v14 = v13++; + } + } + LODWORD(v39) = v14; + *v14 = __PAIR64__(v11, v12) % 0xA + 48; + if ( __PAIR64__(v11, v12) <= 9 ) + break; + v15 = __PAIR64__(v11, v12) / 0xA; + v11 = (__PAIR64__(v11, v12) / 0xA) >> 32; + v12 = v15; + } + v16 = v13; + v17 = v13; + v5 = a4; + if ( v37 > 0 ) + { + v18 = v37 - (v16 - v41); + if ( v18 <= 0 ) + goto LABEL_26; + goto LABEL_23; + } + if ( v41 != v16 ) + goto LABEL_27; + goto LABEL_64; + } + *(_DWORD *)(a4 + 4) = v6 & 0xFFFFFF7F; + } + v11 = HIDWORD(v39); + v12 = v39; + if ( v39 ) + goto LABEL_12; + v17 = v41; + v18 = v37; + if ( v37 > 0 ) + { +LABEL_23: + v19 = 1; + if ( v18 > 0 ) + v19 = v18; + LODWORD(v39) = v19; + memset(v17, 48, v19); + v17 += v39; +LABEL_26: + if ( v41 != v17 ) + goto LABEL_27; + goto LABEL_68; + } +LABEL_64: + if ( !v37 ) + { + v21 = *(_DWORD *)(v5 + 4); + if ( v40 <= 0 ) + goto LABEL_33; + if ( (v21 & 0x1C0) == 0 ) + goto LABEL_32; + goto LABEL_30; + } +LABEL_68: + *v17++ = 48; +LABEL_27: + if ( v40 <= 0 ) + goto LABEL_61; + v40 -= v17 - v41; + v20 = v40; + v21 = *(_DWORD *)(v5 + 4); + *(_DWORD *)(v5 + 8) = v40; + if ( v20 <= 0 ) + goto LABEL_33; + if ( (v21 & 0x1C0) != 0 ) +LABEL_30: + *(_DWORD *)(v5 + 8) = v40 - 1; + if ( v37 >= 0 || (v21 & 0x600) != 512 ) + { +LABEL_32: + if ( (v21 & 0x400) != 0 ) + goto LABEL_33; + v31 = *(_DWORD *)(v5 + 8); + *(_DWORD *)(v5 + 8) = v31 - 1; + if ( v31 <= 0 ) + goto LABEL_33; + do + { + __pformat_putc(32, v5); + v32 = *(_DWORD *)(v5 + 8); + *(_DWORD *)(v5 + 8) = v32 - 1; + } + while ( v32 > 0 ); +LABEL_61: + v21 = *(_DWORD *)(v5 + 4); + goto LABEL_33; + } + v33 = *(_DWORD *)(v5 + 8); + *(_DWORD *)(v5 + 8) = v33 - 1; + if ( v33 > 0 ) + { + v40 = v21; + LODWORD(v39) = v33; + memset(v17, 48, v33); + v34 = v39; + LOWORD(v21) = v40; + *(_DWORD *)(v5 + 8) = -1; + v17 += v34; + } +LABEL_33: + if ( (v21 & 0x80u) == 0 ) + { + if ( (v21 & 0x100) != 0 ) + { + *v17 = 43; + v22 = (unsigned int)(v17 + 1); + } + else + { + v22 = (unsigned int)v17; + if ( (v21 & 0x40) != 0 ) + { + *v17 = 32; + v22 = (unsigned int)(v17 + 1); + } + } + } + else + { + *v17 = 45; + v22 = (unsigned int)(v17 + 1); + } + v23 = (int)v41; + if ( v22 > (unsigned int)v41 ) + { + v24 = (char *)v22; + while ( 1 ) + { + --v24; + if ( (v21 & 0x4000) == 0 ) + { + v25 = *(_DWORD *)(v5 + 32); + if ( *(_DWORD *)(v5 + 36) <= v25 ) + goto LABEL_38; + } + v26 = *v24; + if ( (v21 & 0x2000) == 0 ) + break; + fputc(v26, *(FILE **)v5); + ++*(_DWORD *)(v5 + 32); + if ( (char *)v23 == v24 ) + goto LABEL_44; +LABEL_39: + v21 = *(_DWORD *)(v5 + 4); + } + *(_BYTE *)(*(_DWORD *)v5 + *(_DWORD *)(v5 + 32)) = v26; + v25 = *(_DWORD *)(v5 + 32); +LABEL_38: + *(_DWORD *)(v5 + 32) = v25 + 1; + if ( (char *)v23 == v24 ) + goto LABEL_44; + goto LABEL_39; + } +LABEL_44: + result = *(_DWORD *)(v5 + 8); + while ( 1 ) + { + v28 = result--; + *(_DWORD *)(v5 + 8) = result; + if ( v28 <= 0 ) + break; + v29 = *(_DWORD *)(v5 + 4); + if ( (v29 & 0x4000) != 0 || (v30 = *(_DWORD *)(v5 + 32), *(_DWORD *)(v5 + 36) > v30) ) + { + if ( (v29 & 0x2000) != 0 ) + fputc(32, *(FILE **)v5); + else + *(_BYTE *)(*(_DWORD *)v5 + *(_DWORD *)(v5 + 32)) = 32; + v30 = *(_DWORD *)(v5 + 32); + result = *(_DWORD *)(v5 + 8); + } + *(_DWORD *)(v5 + 32) = v30 + 1; + } + return result; +} + +//----- (0043A810) -------------------------------------------------------- +int __usercall __pformat_emit_radix_point@(int a1@) +{ + wchar_t v2; // dx + int v3; // eax + int v4; // eax + void *v5; // esp + void *v6; // esp + char *v7; // esi + signed int v8; // eax + char *v9; // edi + int result; // eax + int v11; // edx + FILE *v12; // ecx + struct lconv *v13; // eax + signed int v14; // eax + int v15; // [esp+0h] [ebp-48h] BYREF + char Dest[12]; // [esp+10h] [ebp-38h] BYREF + int *v17; // [esp+1Ch] [ebp-2Ch] + wchar_t DstCh; // [esp+26h] [ebp-22h] BYREF + mbstate_t State; // [esp+28h] [ebp-20h] BYREF + + if ( *(_DWORD *)(a1 + 16) == -3 ) + { + State._Wchar = 0; + *(_DWORD *)&State._Byte = 0; + v13 = localeconv(); + v14 = mbrtowc(&DstCh, v13->decimal_point, 0x10u, &State); + if ( v14 <= 0 ) + { + v2 = *(_WORD *)(a1 + 20); + } + else + { + v2 = DstCh; + *(_WORD *)(a1 + 20) = DstCh; + } + *(_DWORD *)(a1 + 16) = v14; + } + else + { + v2 = *(_WORD *)(a1 + 20); + } + if ( !v2 ) + return __pformat_putc(46, a1); + v3 = *(_DWORD *)(a1 + 16); + v17 = &v15; + v4 = 16 * ((unsigned int)(v3 + 15) >> 4); + v5 = alloca(v4); + v6 = alloca(v4); + State._Wchar = 0; + v7 = Dest; + *(_DWORD *)&State._Byte = 0; + v8 = wcrtomb(Dest, v2, &State); + if ( v8 > 0 ) + { + v9 = &Dest[v8]; + while ( 1 ) + { + result = *(_DWORD *)(a1 + 4); + ++v7; + if ( (result & 0x4000) == 0 ) + { + v11 = *(_DWORD *)(a1 + 32); + if ( *(_DWORD *)(a1 + 36) <= v11 ) + goto LABEL_7; + } + v12 = *(FILE **)a1; + if ( (result & 0x2000) != 0 ) + { + result = fputc(*(v7 - 1), v12); + ++*(_DWORD *)(a1 + 32); + if ( v7 == v9 ) + return result; + } + else + { + result = *(_DWORD *)(a1 + 32); + *((_BYTE *)&v12->_ptr + result) = *(v7 - 1); + v11 = *(_DWORD *)(a1 + 32); +LABEL_7: + *(_DWORD *)(a1 + 32) = v11 + 1; + if ( v7 == v9 ) + return result; + } + } + } + return __pformat_putc(46, a1); +} +// 43A810: using guessed type char Dest[12]; + +//----- (0043A960) -------------------------------------------------------- +int __usercall __pformat_emit_float@(int a1@, char *a2@, int a3@, int a4) +{ + int v7; // ecx + int v8; // ecx + int v9; // eax + int v10; // eax + int v11; // eax + char v12; // dl + int v13; // eax + int v14; // eax + int v15; // ecx + int v16; // eax + int v17; // eax + int result; // eax + char v19; // dl + int v20; // eax + int v21; // eax + int v22; // eax + int v23; // edx + unsigned int v24; // [esp+Ch] [ebp-20h] + + v7 = *(_DWORD *)(a4 + 8); + if ( a3 <= 0 ) + { + if ( v7 <= 0 ) + { + if ( v7 ) + { + *(_DWORD *)(a4 + 8) = -1; + goto LABEL_9; + } + } + else + { + --v7; + } + v14 = *(_DWORD *)(a4 + 12); + if ( v7 <= v14 ) + { + *(_DWORD *)(a4 + 8) = -1; + goto LABEL_9; + } + } + else if ( a3 > v7 || (v14 = *(_DWORD *)(a4 + 12), v7 -= a3, v7 <= v14) ) + { + *(_DWORD *)(a4 + 8) = -1; + v8 = -1; + if ( (*(_BYTE *)(a4 + 5) & 0x10) == 0 ) + goto LABEL_9; +LABEL_4: + if ( !*(_WORD *)(a4 + 28) ) + goto LABEL_28; + goto LABEL_5; + } + v8 = v7 - v14; + *(_DWORD *)(a4 + 8) = v8; + if ( v14 > 0 || (v21 = *(_DWORD *)(a4 + 4), (v21 & 0x800) != 0) ) + { + *(_DWORD *)(a4 + 8) = --v8; + if ( a3 <= 0 || (*(_BYTE *)(a4 + 5) & 0x10) == 0 ) + goto LABEL_28; + goto LABEL_4; + } + if ( a3 > 0 && (v21 & 0x1000) != 0 && *(_WORD *)(a4 + 28) ) + { +LABEL_5: + v9 = v8; + v24 = (a3 + 2) / 3u; + if ( v24 != 1 ) + { + while ( v9 > 0 ) + { + *(_DWORD *)(a4 + 8) = --v9; + if ( !(v9 + v24 - 1 - v8) ) + { + v8 = v9; + goto LABEL_28; + } + } + goto LABEL_9; + } +LABEL_28: + if ( v8 > 0 ) + goto LABEL_29; +LABEL_9: + if ( !a1 ) + { +LABEL_10: + v10 = *(_DWORD *)(a4 + 4); + goto LABEL_11; + } + goto LABEL_52; + } +LABEL_29: + if ( a1 ) + { + v15 = v8 - 1; + *(_DWORD *)(a4 + 8) = v15; + if ( v15 && (*(_DWORD *)(a4 + 4) & 0x600) == 0 ) + goto LABEL_33; +LABEL_52: + __pformat_putc(45, a4); + goto LABEL_14; + } + v10 = *(_DWORD *)(a4 + 4); + if ( (v10 & 0x1C0) != 0 ) + { + v15 = v8 - 1; + *(_DWORD *)(a4 + 8) = v15; + if ( v15 && (v10 & 0x600) == 0 ) + { +LABEL_33: + *(_DWORD *)(a4 + 8) = v15 - 1; + do + { +LABEL_34: + __pformat_putc(32, a4); + v16 = *(_DWORD *)(a4 + 8); + *(_DWORD *)(a4 + 8) = v16 - 1; + } + while ( v16 > 0 ); + if ( a1 ) + goto LABEL_52; + goto LABEL_10; + } + } + else if ( (v10 & 0x600) == 0 ) + { + v23 = *(_DWORD *)(a4 + 8); + *(_DWORD *)(a4 + 8) = v23 - 1; + if ( v23 > 0 ) + goto LABEL_34; + } +LABEL_11: + if ( (v10 & 0x100) != 0 ) + { + __pformat_putc(43, a4); + } + else if ( (v10 & 0x40) != 0 ) + { + __pformat_putc(32, a4); + } +LABEL_14: + v11 = *(_DWORD *)(a4 + 8); + if ( v11 > 0 && (*(_DWORD *)(a4 + 4) & 0x600) == 512 ) + { + *(_DWORD *)(a4 + 8) = v11 - 1; + do + { + __pformat_putc(48, a4); + v22 = *(_DWORD *)(a4 + 8); + *(_DWORD *)(a4 + 8) = v22 - 1; + } + while ( v22 > 0 ); + } + if ( a3 <= 0 ) + { + __pformat_putc(48, a4); + v17 = *(_DWORD *)(a4 + 12); + if ( v17 > 0 || (*(_BYTE *)(a4 + 5) & 8) != 0 ) + { + __pformat_emit_radix_point(a4); + if ( !a3 ) + goto LABEL_44; + v17 = *(_DWORD *)(a4 + 12); + } + else if ( !a3 ) + { +LABEL_39: + result = v17 - 1; + *(_DWORD *)(a4 + 12) = result; + return result; + } + *(_DWORD *)(a4 + 12) = a3 + v17; + do + { + __pformat_putc(48, a4); + ++a3; + } + while ( a3 ); + } + else + { + while ( 1 ) + { + v12 = *a2; + v13 = 48; + if ( *a2 ) + { + ++a2; + v13 = v12; + } + __pformat_putc(v13, a4); + if ( !--a3 ) + break; + if ( (*(_BYTE *)(a4 + 5) & 0x10) != 0 && *(_WORD *)(a4 + 28) && (unsigned int)(-1431655765 * a3) <= 0x55555555 ) + __pformat_wputchars(a4 + 28, 1, a4); + } + v17 = *(_DWORD *)(a4 + 12); + if ( v17 <= 0 && (*(_BYTE *)(a4 + 5) & 8) == 0 ) + goto LABEL_39; + __pformat_emit_radix_point(a4); + } +LABEL_44: + while ( 1 ) + { + result = *(_DWORD *)(a4 + 12); + *(_DWORD *)(a4 + 12) = result - 1; + if ( result <= 0 ) + break; + v19 = *a2; + v20 = 48; + if ( *a2 ) + { + ++a2; + v20 = v19; + } + __pformat_putc(v20, a4); + } + return result; +} + +//----- (0043AD10) -------------------------------------------------------- +int __usercall __pformat_emit_efloat@(int a1@, char *a2@, int a3@, _DWORD *a4) +{ + int v4; // ecx + int i; // ebx + int v6; // eax + int v7; // ecx + int v8; // eax + int v9; // edx + __int64 v12; // [esp+30h] [ebp-2Ch] + int v13; // [esp+38h] [ebp-24h] + int v14; // [esp+3Ch] [ebp-20h] + + v12 = a3 - 1; + v4 = (int)v12 / 10; + for ( i = 1; v4; v4 /= 10 ) + ++i; + v6 = a4[10]; + if ( v6 == -1 ) + { + a4[10] = 2; + v6 = 2; + } + v7 = a4[2]; + if ( i < v6 ) + i = v6; + v8 = v7 - (i + 2); + if ( v7 <= i + 2 ) + v8 = -1; + a4[2] = v8; + __pformat_emit_float(a1, a2, 1, (int)a4); + a4[3] = a4[10]; + v9 = a4[1]; + a4[1] = v9 | 0x1C0; + __pformat_putc(v9 & 0x20 | 0x45, (int)a4); + a4[2] += i + 1; + return __pformat_int(v12, v13, v14, (int)a4); +} +// 43ADF2: variable 'v13' is possibly undefined +// 43ADF2: variable 'v14' is possibly undefined + +//----- (0043AE00) -------------------------------------------------------- +void __usercall __pformat_efloat(_DWORD *a1@, long double a2) +{ + int v3; // eax + int v4; // eax + int *v5; // eax + int *v6; // esi + int v7; // [esp+28h] [ebp-24h] BYREF + int v8; // [esp+2Ch] [ebp-20h] BYREF + long double v9; // [esp+30h] [ebp-1Ch] + int v10; // [esp+3Ch] [ebp-10h] + + v3 = a1[3]; + if ( v3 < 0 ) + { + a1[3] = 6; + v4 = 7; + } + else + { + v4 = v3 + 1; + } + v9 = a2; + v5 = __pformat_cvt(2u, *(__int64 *)&v9, SHIDWORD(v9), v10, v4, &v8, &v7); + v6 = v5; + if ( v8 == -32768 ) + __pformat_emit_inf_or_nan(v7, (int)v5, (int)a1); + else + __pformat_emit_efloat(v7, (char *)v5, v8, a1); + __freedtoa(v6); +} + +//----- (0043AEB0) -------------------------------------------------------- +void __usercall __pformat_float(int a1@, long double a2) +{ + int v3; // eax + int *v4; // eax + int *v5; // esi + int v6; // eax + int v7; // edx + int v8; // ecx + int v9; // edx + int v10; // [esp+28h] [ebp-24h] BYREF + int v11; // [esp+2Ch] [ebp-20h] BYREF + long double v12; // [esp+30h] [ebp-1Ch] + int v13; // [esp+3Ch] [ebp-10h] + + v3 = *(_DWORD *)(a1 + 12); + if ( v3 < 0 ) + { + *(_DWORD *)(a1 + 12) = 6; + v3 = 6; + } + v12 = a2; + v4 = __pformat_cvt(3u, *(__int64 *)&v12, SHIDWORD(v12), v13, v3, &v11, &v10); + v5 = v4; + if ( v11 == -32768 ) + { + __pformat_emit_inf_or_nan(v10, (int)v4, a1); + } + else + { + __pformat_emit_float(v10, (char *)v4, v11, a1); + v6 = *(_DWORD *)(a1 + 8); + while ( 1 ) + { + v7 = v6--; + *(_DWORD *)(a1 + 8) = v6; + if ( v7 <= 0 ) + break; + v8 = *(_DWORD *)(a1 + 4); + if ( (v8 & 0x4000) != 0 || (v9 = *(_DWORD *)(a1 + 32), *(_DWORD *)(a1 + 36) > v9) ) + { + if ( (v8 & 0x2000) != 0 ) + fputc(32, *(FILE **)a1); + else + *(_BYTE *)(*(_DWORD *)a1 + *(_DWORD *)(a1 + 32)) = 32; + v9 = *(_DWORD *)(a1 + 32); + v6 = *(_DWORD *)(a1 + 8); + } + *(_DWORD *)(a1 + 32) = v9 + 1; + } + } + __freedtoa(v5); +} + +//----- (0043AFA0) -------------------------------------------------------- +void __usercall __pformat_gfloat(_DWORD *a1@, long double a2) +{ + int v3; // eax + int *v4; // eax + int v5; // edi + int *Str; // esi + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // eax + int v11; // eax + int v12; // edx + int v13; // [esp+28h] [ebp-24h] BYREF + int v14; // [esp+2Ch] [ebp-20h] BYREF + long double v15; // [esp+30h] [ebp-1Ch] + int v16; // [esp+3Ch] [ebp-10h] + + v3 = a1[3]; + if ( v3 < 0 ) + { + a1[3] = 6; + v3 = 6; + } + else if ( !v3 ) + { + a1[3] = 1; + v3 = 1; + } + v15 = a2; + v4 = __pformat_cvt(2u, *(__int64 *)&v15, SHIDWORD(v15), v16, v3, &v14, &v13); + v5 = v14; + Str = v4; + if ( v14 == -32768 ) + { + __pformat_emit_inf_or_nan(v13, (int)v4, (int)a1); + __freedtoa(Str); + } + else + { + v7 = a1[1] & 0x800; + if ( v14 < -3 || (v8 = a1[3], v14 > v8) ) + { + if ( v7 ) + v10 = a1[3] - 1; + else + v10 = strlen((const char *)Str) - 1; + a1[3] = v10; + __pformat_emit_efloat(v13, (char *)Str, v5, a1); + __freedtoa(Str); + } + else + { + if ( v7 ) + { + a1[3] = v8 - v14; + } + else + { + v11 = strlen((const char *)Str) - v14; + a1[3] = v11; + if ( v11 < 0 ) + { + v12 = a1[2]; + if ( v12 > 0 ) + a1[2] = v12 + v11; + } + } + __pformat_emit_float(v13, (char *)Str, v5, (int)a1); + while ( 1 ) + { + v9 = a1[2]; + a1[2] = v9 - 1; + if ( v9 <= 0 ) + break; + __pformat_putc(32, (int)a1); + } + __freedtoa(Str); + } + } +} + +//----- (0043B130) -------------------------------------------------------- +int __usercall __pformat_xldouble@(int a1@, long double a2) +{ + __int16 v3; // fps + __int16 v5; // fps + int v9; // ebp + unsigned int v10; // edi + char *v11; // eax + char *v12; // esi + int v13; // edx + int v14; // eax + int v15; // edi + int v16; // ecx + int v17; // ebp + int v18; // eax + int v19; // eax + int v20; // eax + int v21; // eax + char v22; // cl + __int64 v23; // rax + unsigned int v24; // edi + unsigned int v25; // esi + unsigned __int64 v26; // kr08_8 + char v27; // cl + unsigned int v28; // esi + int v29; // edi + int v30; // ecx + __int16 v31; // dx + char v32; // cl + char v33; // al + unsigned int v34; // eax + int v35; // ecx + int v37; // eax + int v38; // eax + __int16 v39; // dx + int v40; // ecx + int v41; // esi + int v42; // eax + unsigned int v43; // [esp+24h] [ebp-88h] + int v44; // [esp+24h] [ebp-88h] + int v45; // [esp+2Ch] [ebp-80h] + __int16 v46; // [esp+30h] [ebp-7Ch] + char *v47; // [esp+30h] [ebp-7Ch] + int v48; // [esp+34h] [ebp-78h] + __int64 v51[2]; // [esp+68h] [ebp-44h] BYREF + char v52; // [esp+78h] [ebp-34h] BYREF + char v53; // [esp+79h] [ebp-33h] BYREF + + _FST7 = a2; + __asm { fxam } + if ( (v3 & 0x4500) == 256 ) + return __pformat_emit_inf_or_nan(0, (int)&off_514F07, a1); + if ( (SWORD4(a2) & 0x8000u) != 0 ) + *(_DWORD *)(a1 + 4) |= 0x80u; + __asm { fxam } + if ( (v5 & 0x4500) == 1280 ) + return __pformat_emit_inf_or_nan(WORD4(a2) & 0x8000, (int)&off_514F0B, a1); + v9 = DWORD1(a2); + v10 = LODWORD(a2); + v46 = WORD4(a2) & 0x7FFF; + if ( (WORD4(a2) & 0x7FFF) != 0 ) + { + v46 -= 0x3FFF; + v43 = *(_DWORD *)(a1 + 12); + if ( v43 <= 0xE ) + goto LABEL_40; + v45 = *(_DWORD *)(a1 + 4); + if ( !*(_QWORD *)&a2 ) + goto LABEL_9; + goto LABEL_53; + } + if ( !*(_QWORD *)&a2 ) + { + v43 = *(_DWORD *)(a1 + 12); + if ( v43 > 0xE ) + { + v45 = *(_DWORD *)(a1 + 4); +LABEL_9: + if ( *(int *)(a1 + 12) > 0 || (v11 = &v52, (v45 & 0x800) != 0) ) + { + v52 = 46; + v11 = &v53; + } + *v11 = 48; + v12 = v11 + 1; + v48 = *(_DWORD *)(a1 + 8); + if ( v48 > 0 ) + goto LABEL_12; +LABEL_87: + v17 = 2; + v44 = v46; + if ( (v45 & 0x80u) == 0 ) + goto LABEL_21; + goto LABEL_88; + } + do + { + v9 = __PAIR64__(v9, v10) >> 31; + v10 *= 2; +LABEL_40: + ; + } + while ( v9 >= 0 ); + goto LABEL_41; + } + if ( (SDWORD1(a2) & 0x80000000) != 0 ) + { + v46 = -16382; + } + else + { + v38 = -16383; + do + { + v9 = __PAIR64__(v9, v10) >> 31; + v39 = v38; + v10 *= 2; + --v38; + } + while ( v9 >= 0 ); + v46 = v39; + } + v43 = *(_DWORD *)(a1 + 12); + if ( v43 <= 0xE ) + { +LABEL_41: + v22 = 4 * (14 - v43); + v23 = 4LL << (v22 & 0x1F); + if ( (v22 & 0x20) != 0 ) + HIDWORD(v23) = 4LL << (v22 & 0x1F); + if ( (v22 & 0x20) != 0 ) + LODWORD(v23) = 0; + v26 = v23 + (__PAIR64__(v9, v10) >> 1); + v24 = HIDWORD(v26); + v25 = v26; + if ( (v26 & 0x8000000000000000LL) != 0LL ) + { + ++v46; + } + else + { + v24 = v26 >> 31; + v25 = 2 * v26; + } + v27 = 4 * (15 - v43); + v28 = __PAIR64__(v24, v25) >> v27; + v29 = v24 >> v27; + v30 = v27 & 0x20; + if ( v30 ) + v28 = v29; + if ( v30 ) + v29 = 0; + v9 = v29; + v10 = v28; + } + v45 = *(_DWORD *)(a1 + 4); +LABEL_53: + v12 = &v52; + v31 = v46; + do + { + v34 = v10 & 0xF; + if ( v10 & 0xFFFFFFF0 | v9 ) + { + v10 = __PAIR64__(v9, v10) >> 4; + v9 = (unsigned int)v9 >> 4; + v35 = *(_DWORD *)(a1 + 12); + if ( v35 > 0 ) + *(_DWORD *)(a1 + 12) = v35 - 1; + } + else + { + if ( v12 > &v52 || (v45 & 0x800) != 0 || *(int *)(a1 + 12) > 0 ) + *v12++ = 46; + if ( v9 | v10 ^ 1 ) + { + v40 = (unsigned __int16)(v31 - 1); + v47 = v12; + v41 = v10 & 0xF; + do + { + v10 = __PAIR64__(v9, v10) >> 1; + v9 = (unsigned int)v9 >> 1; + v31 = v40--; + } + while ( v10 ^ 1 | v9 ); + v34 = v41; + v10 = 0; + v12 = v47; + v9 = 0; + } + else + { + v10 = 0; + v9 = 0; + } + } + if ( v34 ) + { + v32 = v34; + if ( v34 <= 9 ) +LABEL_56: + v33 = v32 + 48; + else + v33 = v45 & 0x20 | (v34 + 55); + *v12++ = v33; + continue; + } + v32 = 0; + if ( v12 > &v52 || *(int *)(a1 + 12) >= 0 ) + goto LABEL_56; + } + while ( v10 | v9 ); + v46 = v31; + if ( v12 == &v52 ) + goto LABEL_9; + v48 = *(_DWORD *)(a1 + 8); + if ( v48 <= 0 ) + goto LABEL_87; +LABEL_12: + v13 = *(_DWORD *)(a1 + 12); + v14 = v12 - &v52; + if ( v13 > 0 ) + v14 = v12 - &v52 + v13; + v44 = v46; + v15 = v14 - (((v45 & 0x1C0) == 0) - 6); + v16 = v46 / 10; + if ( v16 ) + { + do + { + ++v15; + v16 /= 10; + } + while ( v16 ); + v17 = (__int16)(v15 + 2 - (v14 - (((v45 & 0x1C0) == 0) - 6))); + } + else + { + v17 = 2; + } + if ( v48 <= v15 ) + { + *(_DWORD *)(a1 + 8) = -1; + } + else + { + v18 = v48 - v15; + if ( (v45 & 0x600) != 0 ) + { + *(_DWORD *)(a1 + 8) = v18; + } + else + { + *(_DWORD *)(a1 + 8) = v18 - 1; + if ( v18 > 0 ) + { + do + { + __pformat_putc(32, a1); + v42 = *(_DWORD *)(a1 + 8); + *(_DWORD *)(a1 + 8) = v42 - 1; + } + while ( v42 > 0 ); + v45 = *(_DWORD *)(a1 + 4); + } + } + } + if ( (v45 & 0x80u) != 0 ) + { +LABEL_88: + __pformat_putc(45, a1); + goto LABEL_24; + } +LABEL_21: + if ( (v45 & 0x100) != 0 ) + { + __pformat_putc(43, a1); + } + else if ( (v45 & 0x40) != 0 ) + { + __pformat_putc(32, a1); + } +LABEL_24: + __pformat_putc(48, a1); + __pformat_putc(*(_DWORD *)(a1 + 4) & 0x20 | 0x58, a1); + v19 = *(_DWORD *)(a1 + 8); + if ( v19 > 0 && (*(_BYTE *)(a1 + 5) & 2) != 0 ) + { + *(_DWORD *)(a1 + 8) = v19 - 1; + do + { + __pformat_putc(48, a1); + v20 = *(_DWORD *)(a1 + 8); + *(_DWORD *)(a1 + 8) = v20 - 1; + } + while ( v20 > 0 ); + } + if ( v12 > &v52 ) + { + do + { + v21 = *--v12; + if ( v21 == 46 ) + { + __pformat_emit_radix_point(a1); + } + else if ( v21 == 44 ) + { + LOWORD(v51[0]) = *(_WORD *)(a1 + 28); + if ( LOWORD(v51[0]) ) + __pformat_wputchars((int)v51, 1, a1); + } + else + { + __pformat_putc(v21, a1); + } + } + while ( v12 != &v52 ); + } + while ( 1 ) + { + v37 = *(_DWORD *)(a1 + 12); + *(_DWORD *)(a1 + 12) = v37 - 1; + if ( v37 <= 0 ) + break; + __pformat_putc(48, a1); + } + __pformat_putc(*(_DWORD *)(a1 + 4) & 0x20 | 0x50, a1); + *(_DWORD *)(a1 + 8) += v17; + *(_DWORD *)(a1 + 4) |= 0x1C0u; + v51[0] = v44; + v51[1] = v44 >> 31; + return __pformat_int(v44, v44 >> 31, v44 >> 31, a1); +} +// 514F07: using guessed type void *off_514F07; +// 514F0B: using guessed type void *off_514F0B; + +//----- (0043B750) -------------------------------------------------------- +int __cdecl __mingw_pformat(__int16 a1, FILE *a2, int a3, char *a4, int *a5) +{ + int v6; // eax + int result; // eax + char *v8; // ebp + char v9; // cl + int v10; // edx + char v11; // al + char *v12; // esi + unsigned int v13; // ecx + char *v14; // ebx + int v15; // ebp + int *v16; // eax + unsigned int v17; // edx + int v18; // eax + __int64 v19; // rax + mbstate_t v20; // rax + char *v21; // eax + int *v22; // esi + int *v23; // esi + int v24; // eax + long double v25; // fst7 + char *v26; // eax + long double v27; // fst7 + long double v28; // fst7 + int v29; // eax + int v30; // edx + long double v31; // fst7 + int v32; // eax + unsigned int v33; // eax + int v34; // eax + long double v35; // fst7 + long double v36; // fst7 + long double v37; // fst7 + long double v38; // fst7 + int v39; // eax + const wchar_t *v40; // edi + int v41; // eax + unsigned int v42; // eax + int v43; // edx + struct lconv *v44; // eax + signed int v45; // eax + unsigned int v46; // edi + __int64 v47; // [esp+0h] [ebp-ACh] + __int64 v48; // [esp+8h] [ebp-A4h] + int v49; // [esp+28h] [ebp-84h] + int v50; // [esp+2Ch] [ebp-80h] + size_t *v51; // [esp+30h] [ebp-7Ch] + char *v52; // [esp+34h] [ebp-78h] + int ErrorMessage; // [esp+38h] [ebp-74h] + wchar_t DstCh; // [esp+4Eh] [ebp-5Eh] BYREF + mbstate_t v55; // [esp+50h] [ebp-5Ch] BYREF + __int64 v56; // [esp+58h] [ebp-54h] + FILE *Stream; // [esp+64h] [ebp-48h] BYREF + int v58; // [esp+68h] [ebp-44h] + int v59; // [esp+6Ch] [ebp-40h] BYREF + size_t MaxCount[2]; // [esp+70h] [ebp-3Ch] BYREF + __int16 v61; // [esp+78h] [ebp-34h] + int v62; // [esp+7Ch] [ebp-30h] + wchar_t v63; // [esp+80h] [ebp-2Ch] + int v64; // [esp+84h] [ebp-28h] + int v65; // [esp+88h] [ebp-24h] + int v66; // [esp+8Ch] [ebp-20h] + + v6 = *_errno(); + v59 = -1; + MaxCount[0] = -1; + ErrorMessage = v6; + MaxCount[1] = -3; + Stream = a2; + v61 = 0; + v62 = 0; + v50 = a1 & 0x6000; + v58 = v50; + v63 = 0; + v65 = a3; + result = *a4; + v64 = 0; + v66 = -1; + if ( result ) + { + v8 = a4 + 1; + v9 = result; + while ( 1 ) + { + if ( result == 37 ) + { + MaxCount[0] = -1; + v59 = -1; + v58 = a1 & 0x6000; + v11 = *v8; + if ( !*v8 ) + return v64; + v49 = 0; + v12 = v8; + v13 = 0; + v51 = (size_t *)&v59; + v52 = v8; + while ( 2 ) + { + v14 = v12 + 1; + v15 = v11; + switch ( v11 ) + { + case ' ': + if ( v13 ) + goto LABEL_104; + v11 = v12[1]; + v58 |= 0x40u; + ++v12; + goto LABEL_16; + case '#': + if ( v13 ) + goto LABEL_104; + v11 = v12[1]; + v58 |= 0x800u; + ++v12; + goto LABEL_16; + case '%': + v8 = v12 + 1; + __pformat_putc(37, (int)&Stream); + break; + case '\'': + if ( v13 ) + goto LABEL_104; + v58 |= 0x1000u; + v55._Wchar = 0; + v44 = localeconv(); + v45 = mbrtowc(&DstCh, v44->thousands_sep, 0x10u, &v55); + v13 = 0; + if ( v45 > 0 ) + v63 = DstCh; + v62 = v45; + v11 = *++v12; + goto LABEL_16; + case '*': + if ( !v51 ) + goto LABEL_92; + if ( (v13 & 0xFFFFFFFD) != 0 ) + { + v11 = v12[1]; + v51 = 0; + ++v12; + v13 = 4; + } + else + { + v39 = *a5; + *v51 = *a5; + if ( v39 >= 0 ) + goto LABEL_100; + if ( v13 ) + { + MaxCount[0] = -1; +LABEL_100: + v11 = v12[1]; + v51 = 0; + ++a5; + ++v12; + goto LABEL_16; + } + v11 = v12[1]; + v59 = -v59; + ++a5; + ++v12; + v58 |= 0x400u; + v51 = 0; + } + goto LABEL_16; + case '+': + if ( v13 ) + goto LABEL_104; + v11 = v12[1]; + v58 |= 0x100u; + ++v12; + goto LABEL_16; + case '-': + if ( v13 ) + goto LABEL_104; + v11 = v12[1]; + v58 |= 0x400u; + ++v12; + goto LABEL_16; + case '.': + if ( v13 <= 1 ) + { + v11 = v12[1]; + MaxCount[0] = 0; + ++v12; + v51 = MaxCount; + v13 = 2; + } + else + { +LABEL_92: + v11 = v12[1]; + v13 = 4; + ++v12; + } + goto LABEL_16; + case '0': + if ( v13 ) + { + if ( v13 > 3 ) + goto LABEL_116; + v15 = 48; +LABEL_113: + if ( v13 == 2 ) + v13 = 3; +LABEL_23: + if ( v51 ) + { + if ( (*v51 & 0x80000000) == 0 ) + { + *v51 = v15 + 10 * *v51 - 48; + v11 = *++v12; + goto LABEL_16; + } + *v51 = v15 - 48; + } +LABEL_104: + v11 = *++v12; + } + else + { + v11 = v12[1]; + v58 |= 0x200u; + ++v12; + } + goto LABEL_16; + case 'A': + if ( (v58 & 4) == 0 ) + goto LABEL_90; + goto LABEL_48; + case 'C': + MaxCount[0] = -1; + v23 = a5 + 1; + goto LABEL_80; + case 'E': + if ( (v58 & 4) == 0 ) + goto LABEL_82; + goto LABEL_73; + case 'F': + if ( (v58 & 4) == 0 ) + goto LABEL_84; + goto LABEL_64; + case 'G': + if ( (v58 & 4) == 0 ) + goto LABEL_86; + goto LABEL_66; + case 'I': + v11 = v12[1]; + if ( v11 == 54 ) + { + if ( v12[2] != 52 ) + { +LABEL_116: + v8 = v52; + __pformat_putc(37, (int)&Stream); + break; + } + v11 = v12[3]; + v49 = 3; + v12 += 3; + v13 = 4; + } + else if ( v11 == 51 ) + { + if ( v12[2] != 50 ) + goto LABEL_116; + v11 = v12[3]; + v49 = 2; + v12 += 3; + v13 = 4; + } + else + { + v49 = 0; + ++v12; + v13 = 4; + } +LABEL_16: + if ( !v11 ) + return v64; + continue; + case 'L': + v11 = v12[1]; + v58 |= 4u; + ++v12; + v13 = 4; + goto LABEL_16; + case 'S': + v22 = a5 + 1; + goto LABEL_106; + case 'X': + case 'o': + case 'u': + case 'x': + if ( v49 == 3 ) + { + v42 = *a5; + v43 = a5[1]; + a5 += 2; + v55._Wchar = v42; + *(_DWORD *)&v55._Byte = v43; + } + else + { + v16 = a5 + 1; + if ( v49 == 2 ) + { + v46 = *a5; + *(_DWORD *)&v55._Byte = 0; + v55._Wchar = v46; + a5 = v16; + } + else + { + v17 = *a5; + if ( v49 == 1 ) + { + *(_DWORD *)&v55._Byte = 0; + ++a5; + v55._Wchar = (unsigned __int16)v17; + } + else + { + if ( v49 == 5 ) + v17 = (unsigned __int8)v17; + v55._Wchar = v17; + ++a5; + *(_DWORD *)&v55._Byte = 0; + } + } + } + v47 = (__int64)v55; + v48 = v56; + if ( v15 == 117 ) + goto LABEL_41; + v18 = v15; + v8 = v12 + 1; + __pformat_xint(v18, *(_QWORD *)&v55, v56, SHIDWORD(v56), (int)&Stream); + goto LABEL_9; + case 'a': + v58 |= 0x20u; + if ( (v58 & 4) != 0 ) + { +LABEL_48: + v25 = *(long double *)a5; + v8 = v12 + 1; + a5 += 3; + __pformat_xldouble((int)&Stream, v25); + } + else + { +LABEL_90: + v38 = *(double *)a5; + v8 = v12 + 1; + a5 += 2; + __pformat_xldouble((int)&Stream, v38); + } + goto LABEL_9; + case 'c': + MaxCount[0] = -1; + v23 = a5 + 1; + if ( (unsigned int)(v49 - 2) <= 1 ) + { +LABEL_80: + v34 = *a5; + a5 = v23; + v8 = v14; + LOWORD(v55._Wchar) = v34; + __pformat_wputchars((int)&v55, 1, (int)&Stream); + } + else + { + v24 = *a5++; + v8 = v14; + LOBYTE(v55._Wchar) = v24; + __pformat_putchars(&v55, 1, (int)&Stream); + } + goto LABEL_9; + case 'd': + case 'i': + v58 |= 0x80u; + if ( v49 == 3 ) + { + v20 = *(mbstate_t *)a5; + a5 += 2; + v55 = v20; + } + else + { + LODWORD(v19) = *a5; + if ( v49 == 2 ) + goto LABEL_39; + if ( v49 != 1 ) + { + if ( v49 == 5 ) + LODWORD(v19) = (char)v19; +LABEL_39: + v19 = (int)v19; + v55 = (mbstate_t)(int)v19; + ++a5; + goto LABEL_40; + } + ++a5; + v19 = (__int16)v19; + v55 = (mbstate_t)(__int16)v19; + } +LABEL_40: + v56 = *(int *)&v20._Byte >> 31; + v47 = (__int64)v55; + v48 = v56; +LABEL_41: + __pformat_int(v47, v48, SHIDWORD(v48), (int)&Stream); +LABEL_42: + v8 = v12 + 1; + break; + case 'e': + v58 |= 0x20u; + if ( (v58 & 4) != 0 ) + { +LABEL_73: + v31 = *(long double *)a5; + v8 = v12 + 1; + a5 += 3; + __pformat_efloat(&Stream, v31); + } + else + { +LABEL_82: + v35 = *(double *)a5; + v8 = v12 + 1; + a5 += 2; + __pformat_efloat(&Stream, v35); + } + goto LABEL_9; + case 'f': + v58 |= 0x20u; + if ( (v58 & 4) != 0 ) + { +LABEL_64: + v27 = *(long double *)a5; + v8 = v12 + 1; + a5 += 3; + __pformat_float((int)&Stream, v27); + } + else + { +LABEL_84: + v36 = *(double *)a5; + v8 = v12 + 1; + a5 += 2; + __pformat_float((int)&Stream, v36); + } + goto LABEL_9; + case 'g': + v58 |= 0x20u; + if ( (v58 & 4) != 0 ) + { +LABEL_66: + v28 = *(long double *)a5; + v8 = v12 + 1; + a5 += 3; + __pformat_gfloat(&Stream, v28); + } + else + { +LABEL_86: + v37 = *(double *)a5; + v8 = v12 + 1; + a5 += 2; + __pformat_gfloat(&Stream, v37); + } + goto LABEL_9; + case 'h': + v11 = v12[1]; + if ( v11 == 104 ) + { + v11 = v12[2]; + v49 = 5; + v12 += 2; + } + else + { + v49 = 1; + ++v12; + } + v13 = 4; + goto LABEL_16; + case 'j': + v11 = v12[1]; + v49 = 3; + ++v12; + v13 = 4; + goto LABEL_16; + case 'l': + v11 = v12[1]; + if ( v11 == 108 ) + { + v11 = v12[2]; + v49 = 3; + v12 += 2; + } + else + { + v49 = 2; + ++v12; + } + v13 = 4; + goto LABEL_16; + case 'm': + v8 = v12 + 1; + v26 = strerror(ErrorMessage); + __pformat_puts(v26, (int)&Stream); + goto LABEL_9; + case 'n': + v29 = *a5++; + v30 = v64; + switch ( v49 ) + { + case 5: + *(_BYTE *)v29 = v64; + v8 = v12 + 1; + break; + case 1: + *(_WORD *)v29 = v64; + v8 = v12 + 1; + break; + case 2: + *(_DWORD *)v29 = v64; + v8 = v12 + 1; + break; + default: + *(_DWORD *)v29 = v64; + if ( v49 != 3 ) + goto LABEL_42; + v8 = v12 + 1; + *(_DWORD *)(v29 + 4) = v30 >> 31; + break; + } + goto LABEL_9; + case 'p': + if ( !v13 ) + { + v32 = a1 & 0x6000; + if ( v58 == v50 ) + { + BYTE1(v32) = BYTE1(v50) | 2; + MaxCount[0] = 8; + v58 = v32; + } + } + v33 = *a5; + *(_DWORD *)&v55._Byte = 0; + v8 = v12 + 1; + ++a5; + v55._Wchar = v33; + v56 = 0LL; + __pformat_xint(120, v33, 0, 0, (int)&Stream); + goto LABEL_9; + case 's': + v21 = (char *)*a5; + v22 = a5 + 1; + if ( (unsigned int)(v49 - 2) <= 1 ) + { +LABEL_106: + v40 = (const wchar_t *)*a5; + if ( !v40 ) + v40 = &String; + if ( (MaxCount[0] & 0x80000000) != 0 ) + v41 = wcslen(v40); + else + v41 = wcsnlen(v40, MaxCount[0]); + v8 = v14; + __pformat_wputchars((int)v40, v41, (int)&Stream); + a5 = v22; + } + else + { + ++a5; + v8 = v14; + __pformat_puts(v21, (int)&Stream); + } + goto LABEL_9; + case 't': + case 'z': + v49 = 0; + v11 = v12[1]; + v13 = 4; + ++v12; + goto LABEL_16; + default: + if ( (unsigned __int8)(v11 - 48) > 9u || v13 > 3 ) + goto LABEL_116; + if ( v13 ) + goto LABEL_113; + v13 = 1; + goto LABEL_23; + } + break; + } + } + else + { + if ( (v58 & 0x4000) != 0 || (v10 = v64, v65 > v64) ) + { + if ( (v58 & 0x2000) != 0 ) + fputc(result, Stream); + else + *((_BYTE *)&Stream->_ptr + v64) = v9; + v10 = v64; + } + v64 = v10 + 1; + } +LABEL_9: + v9 = *v8++; + result = v9; + if ( !v9 ) + return v64; + } + } + return result; +} + +//----- (0043C0F0) -------------------------------------------------------- +int *__cdecl __rv_alloc_D2A(int a1) +{ + int v1; // ebx + int v2; // eax + int *v3; // eax + + v1 = 0; + if ( a1 > 19 ) + { + v2 = 4; + do + { + v2 *= 2; + ++v1; + } + while ( v2 + 15 < a1 ); + } + v3 = __Balloc_D2A(v1); + *v3 = v1; + return v3 + 1; +} + +//----- (0043C130) -------------------------------------------------------- +int *__cdecl __nrv_alloc_D2A(char *a1, char **a2, int a3) +{ + int v3; // eax + int v4; // edi + int *v5; // eax + char *v6; // edx + char v7; // cl + int *v8; // edi + char *v9; // eax + char v10; // cl + + if ( a3 <= 19 ) + { + v4 = 0; + } + else + { + v3 = 4; + v4 = 0; + do + { + v3 *= 2; + ++v4; + } + while ( a3 > v3 + 15 ); + } + v5 = __Balloc_D2A(v4); + v6 = a1 + 1; + *v5 = v4; + v7 = *a1; + v8 = v5 + 1; + *((_BYTE *)v5 + 4) = *a1; + v9 = (char *)(v5 + 1); + if ( v7 ) + { + do + { + v10 = *v6; + ++v9; + ++v6; + *v9 = v10; + } + while ( v10 ); + } + if ( a2 ) + *a2 = v9; + return v8; +} + +//----- (0043C1B0) -------------------------------------------------------- +void __cdecl __freedtoa(_DWORD *a1) +{ + int v1; // ecx + + v1 = *(a1 - 1); + *a1 = v1; + a1[1] = 1 << v1; + __Bfree_D2A(a1 - 1); +} + +//----- (0043C1D0) -------------------------------------------------------- +unsigned int __cdecl __quorem_D2A(int a1, int a2) +{ + int v2; // ebx + unsigned int result; // eax + int v4; // eax + unsigned int v5; // ebx + _DWORD *v6; // ecx + unsigned int v7; // esi + __int64 v8; // kr00_8 + bool v9; // cf + int v10; // eax + int v11; // ecx + _DWORD *v12; // esi + unsigned int v13; // ebp + __int64 v14; // rcx + int v15; // eax + _DWORD *v16; // edx + unsigned int v17; // eax + int v18; // edx + __int64 v19; // [esp+18h] [ebp-54h] + __int64 v20; // [esp+18h] [ebp-54h] + _DWORD *v21; // [esp+2Ch] [ebp-40h] + unsigned __int64 v22; // [esp+30h] [ebp-3Ch] + int v23; // [esp+38h] [ebp-34h] + unsigned int v24; // [esp+3Ch] [ebp-30h] + unsigned int v25; // [esp+40h] [ebp-2Ch] + int v26; // [esp+44h] [ebp-28h] + _DWORD *v27; // [esp+4Ch] [ebp-20h] + + v2 = *(_DWORD *)(a2 + 16); + result = 0; + v26 = v2; + if ( *(_DWORD *)(a1 + 16) >= v2 ) + { + v23 = v2 - 1; + v4 = 4 * (v2 - 1); + v21 = (_DWORD *)(a2 + 20 + v4); + v27 = (_DWORD *)(a1 + 20 + v4); + v25 = a1 + 20; + v24 = *v27 / (unsigned int)(*v21 + 1); + if ( *v27 >= (unsigned int)(*v21 + 1) ) + { + v22 = 0LL; + v5 = a2 + 20; + v6 = (_DWORD *)(a1 + 20); + v19 = 0LL; + do + { + v5 += 4; + v7 = *(_DWORD *)(v5 - 4) * v24 + v22; + v22 = (*(unsigned int *)(v5 - 4) * (unsigned __int64)v24 + v22) >> 32; + v8 = v19 + v7; + v9 = *v6 < (unsigned int)v8; + v10 = *v6++ - v8; + *(v6 - 1) = v10; + v19 = -(char)(v9 + BYTE4(v8)) & 1; + } + while ( (unsigned int)v21 >= v5 ); + if ( !*v27 ) + { + if ( v25 < (unsigned int)(v27 - 1) ) + { + v11 = v23; + do + { + if ( v27[v11 - v26] ) + break; + --v11; + } + while ( v26 - 2 - (((unsigned int)v27 - a1 - 25) >> 2) != v11 ); + v23 = v11; + } + *(_DWORD *)(a1 + 16) = v23; + } + } + if ( __cmp_D2A(a1, a2) >= 0 ) + { + v12 = (_DWORD *)(a1 + 20); + ++v24; + v20 = 0LL; + v13 = a2 + 20; + do + { + v13 += 4; + v14 = v20 + *(unsigned int *)(v13 - 4); + v9 = *v12 < (unsigned int)v14; + v15 = *v12++ - v14; + *(v12 - 1) = v15; + v20 = -(char)(v9 + BYTE4(v14)) & 1; + } + while ( (unsigned int)v21 >= v13 ); + v16 = (_DWORD *)(v25 + 4 * v23); + if ( !*v16 ) + { + if ( v25 < (unsigned int)(v16 - 1) ) + { + v17 = v23 - 1 - (((unsigned int)v16 - a1 - 25) >> 2); + v18 = v23; + do + { + if ( *(_DWORD *)(v25 + 4 * v18 - 4) ) + break; + --v18; + } + while ( v18 != v17 ); + v23 = v18; + } + *(_DWORD *)(a1 + 16) = v23; + } + } + return v24; + } + return result; +} + +//----- (0043C3F0) -------------------------------------------------------- +int *__cdecl __gdtoa(int *a1, int a2, int *a3, int *a4, unsigned int a5, int a6, int *a7, char **a8) +{ + int v8; // esi + int v9; // eax + int v11; // edi + int v12; // edx + int i; // eax + int *v14; // ebp + int *v15; // eax + int *v16; // edx + int *v17; // ecx + int v18; // ebx + int v19; // ebx + int v20; // ebx + int v21; // eax + unsigned int v22; // edx + int v23; // eax + double v24; // rax + int v25; // ecx + int v26; // eax + signed int v27; // edx + long double v28; // fst7 + int v29; // eax + int v30; // eax + int v31; // eax + long double v32; // fst7 + double v33; // rax + int v34; // esi + long double v35; // fst6 + long double v36; // fst5 + int *v37; // eax + long double v38; // fst6 + long double v39; // fst7 + long double v40; // fst6 + char v41; // dl + long double v42; // rt0 + long double v43; // fst5 + char v44; // dl + int *v45; // ebx + int *n; // ecx + int v47; // edi + int v48; // ecx + int v49; // eax + int v50; // edi + int *v51; // esi + int v52; // eax + int v53; // eax + bool v54; // bl + int v55; // edi + char v56; // bl + int v57; // ebx + int v58; // eax + int v59; // eax + bool v60; // dl + double v61; // rax + long double v62; // fst6 + long double v63; // fst7 + unsigned int v64; // ebx + int v65; // ebx + int *v66; // ebx + int v67; // eax + int *v68; // edi + unsigned int v69; // eax + int v70; // edi + int *v71; // edx + int v72; // ecx + int *v73; // ecx + int v74; // eax + int v75; // eax + int *v76; // eax + unsigned int v77; // eax + int v78; // edx + char v79; // al + int *v80; // ebx + int *v81; // edx + int v82; // ecx + long double v83; // fst5 + bool v84; // zf + long double m; // fst6 + long double v86; // fst6 + long double v87; // fst5 + int v88; // edx + int v89; // eax + bool v90; // zf + bool v91; // cc + long double v92; // fst6 + bool v93; // di + long double v94; // fst5 + int v95; // edx + bool v96; // cl + int *v97; // edx + int *v98; // edi + int *k; // esi + int *v100; // eax + int v101; // eax + int *v102; // ecx + double v103; // rax + int *v104; // ebx + char v105; // dl + int v106; // edi + int v107; // eax + long double v108; // fst6 + int v109; // edx + int v110; // [esp+18h] [ebp-A4h] + int *v111; // [esp+18h] [ebp-A4h] + int v112; // [esp+18h] [ebp-A4h] + int *v113; // [esp+18h] [ebp-A4h] + int *v114; // [esp+18h] [ebp-A4h] + unsigned int v115; // [esp+28h] [ebp-94h] + bool v116; // [esp+28h] [ebp-94h] + int v117; // [esp+2Ch] [ebp-90h] + int *j; // [esp+30h] [ebp-8Ch] + int v119; // [esp+34h] [ebp-88h] + int v120; // [esp+34h] [ebp-88h] + int v121; // [esp+34h] [ebp-88h] + int v122; // [esp+38h] [ebp-84h] + double v123; // [esp+38h] [ebp-84h] + int *v124; // [esp+38h] [ebp-84h] + int *v125; // [esp+38h] [ebp-84h] + int v126; // [esp+40h] [ebp-7Ch] + int v127; // [esp+4Ch] [ebp-70h] + char v128; // [esp+4Ch] [ebp-70h] + int v129; // [esp+50h] [ebp-6Ch] + int v130; // [esp+50h] [ebp-6Ch] + double v131; // [esp+50h] [ebp-6Ch] + int v132; // [esp+58h] [ebp-64h] + int v133; // [esp+58h] [ebp-64h] + int *v134; // [esp+5Ch] [ebp-60h] + int v135; // [esp+60h] [ebp-5Ch] + int v136; // [esp+60h] [ebp-5Ch] + int *v137; // [esp+60h] [ebp-5Ch] + int v138; // [esp+64h] [ebp-58h] + int v139; // [esp+68h] [ebp-54h] + int v140; // [esp+6Ch] [ebp-50h] + int v141; // [esp+70h] [ebp-4Ch] + int v142; // [esp+74h] [ebp-48h] + bool v143; // [esp+78h] [ebp-44h] + bool v144; // [esp+78h] [ebp-44h] + int v145; // [esp+7Ch] [ebp-40h] + int v146; // [esp+80h] [ebp-3Ch] + int v147; // [esp+88h] [ebp-34h] + int v148[8]; // [esp+9Ch] [ebp-20h] BYREF + + v110 = a5; + v119 = a6; + v8 = *a4; + *a4 &= 0xFFFFFFCF; + v9 = v8 & 7; + if ( v9 == 3 ) + { + *a7 = -32768; + return __nrv_alloc_D2A("Infinity", a8, 8); + } + v117 = v8 & 4; + if ( (v8 & 4) == 0 ) + { + if ( (v8 & 7) != 0 ) + { + if ( (unsigned int)(v9 - 1) > 1 ) + return 0; + v11 = *a1; + v12 = 0; + for ( i = 32; v11 > i; ++v12 ) + i *= 2; + v122 = (v11 - 1) >> 5; + v14 = __Balloc_D2A(v12); + v15 = a3; + v16 = v14 + 5; + v17 = &a3[v122]; + do + { + v18 = *v15++; + *v16++ = v18; + } + while ( v17 >= v15 ); + v19 = v122 * 4 + 4; + if ( (char *)v17 + 1 < (char *)a3 + 1 ) + v19 = 4; + v20 = v19 >> 2; + do + { + v21 = v20--; + if ( v14[v20 + 5] ) + { + _BitScanReverse(&v22, v14[v20 + 5]); + v14[4] = v21; + v20 = 32 * v21 - (v22 ^ 0x1F); + goto LABEL_18; + } + } + while ( v20 ); + v14[4] = 0; +LABEL_18: + v23 = __trailz_D2A((int)v14); + v148[0] = v23; + v135 = a2; + if ( v23 ) + { + __rshift_D2A((int)v14, v23); + v135 = v148[0] + a2; + v20 -= v148[0]; + } + if ( v14[4] ) + { + v24 = __b2d_D2A((int)v14, v148); + LODWORD(v123) = LODWORD(v24); + v25 = v20 + v135 - 1; + v26 = HIDWORD(v24) & 0xFFFFF | 0x3FF00000; + HIDWORD(v123) = v26; + v27 = abs32(v25) - 1077; + v28 = (v123 - 1.5) * 0.289529654602168 + 0.1760912590558 + (long double)v25 * 0.301029995663981; + if ( v27 > 0 ) + v28 = v28 + (long double)v27 * 7.0e-17; + v127 = (int)v28; + if ( v28 < 0.0 && (long double)v127 != v28 ) + --v127; + HIDWORD(v123) = (v25 << 20) + v26; + v132 = -v135; + if ( (unsigned int)v127 > 0x16 ) + { + v142 = 1; + } + else + { + if ( __tens_D2A[v127] <= (long double)v123 ) + { + v142 = 0; + v138 = 0; + if ( v135 <= 0 ) + goto LABEL_69; +LABEL_110: + v132 = 0; + v138 = v135; +LABEL_33: + if ( v127 < 0 ) + { + v29 = v127; + v138 -= v127; + v127 = 0; + v140 = v29; + v141 = -v29; + goto LABEL_35; + } +LABEL_69: + v141 = 0; + v132 += v127; + v140 = v127; +LABEL_35: + if ( a5 > 9 ) + { + v110 = 0; + } + else + { + if ( (int)a5 > 5 ) + { + v143 = 0; + v110 = a5 - 4; + } + else + { + v143 = (unsigned int)(v20 + v135 + 1021) <= 0x7F7; + } + switch ( v110 ) + { + case 4: + v139 = 1; + goto LABEL_42; + case 5: + v139 = 1; +LABEL_128: + v145 = v140 + a6; + v30 = v140 + a6 + 1; + v126 = v30; + if ( v30 <= 0 ) + { + v148[0] = 1; + v30 = 1; + } + else + { + v148[0] = v140 + a6 + 1; + } + goto LABEL_45; + case 2: + v139 = 0; +LABEL_42: + v30 = 1; + if ( a6 > 0 ) + v30 = a6; + v148[0] = v30; + v145 = v30; + v126 = v30; + v119 = v30; +LABEL_45: + v134 = __rv_alloc_D2A(v30); + v129 = a1[3]; + v84 = v129 == 1; + v130 = v129 - 1; + v144 = v143 && (unsigned int)v126 <= 0xE; + if ( v84 ) + goto LABEL_50; + goto LABEL_46; + case 3: + v139 = 0; + goto LABEL_128; + } + } + v148[0] = (int)((long double)v11 * 0.30103) + 3; + v134 = __rv_alloc_D2A(v148[0]); + v121 = a1[3]; + v130 = v121 - 1; + if ( v121 == 1 ) + { + if ( v135 < 0 ) + { + v106 = v11 - v20; + v119 = 0; + v48 = v106 + 1; + v126 = -1; + v49 = a1[1]; + v148[0] = v106 + 1; + v145 = -1; + if ( v49 <= v135 - v106 ) + goto LABEL_79; + goto LABEL_76; + } + if ( a1[5] >= v140 ) + { + v126 = -1; + v63 = __tens_D2A[v140]; + goto LABEL_198; + } + v119 = 0; + v145 = -1; + v126 = -1; +LABEL_75: + v47 = v11 - v20; + v48 = v47 + 1; + v49 = a1[1]; + v148[0] = v47 + 1; + if ( v135 - v47 >= v49 ) + { +LABEL_168: + if ( v110 > 1 ) + goto LABEL_169; +LABEL_79: + v132 += v48; + v50 = v141; + v136 = v138; + v138 += v48; +LABEL_80: + v139 = 1; + v51 = __i2b_D2A(1); +LABEL_81: + if ( v136 > 0 && v132 > 0 ) + { + v52 = v132; + if ( v136 <= v132 ) + v52 = v136; + v138 -= v52; + v148[0] = v52; + v136 -= v52; + v132 -= v52; + } + if ( v141 ) + { + if ( v139 ) + { + if ( v50 > 0 ) + { + v51 = __pow5mult_D2A(v51, v50); + v124 = __mult_D2A((int)v51, (int)v14); + __Bfree_D2A(v14); + v14 = v124; + } + v53 = v141 - v50; + if ( v141 == v50 ) + goto LABEL_91; + } + else + { + v53 = v141; + } + v14 = __pow5mult_D2A(v14, v53); + } +LABEL_91: + v125 = __i2b_D2A(1); + v54 = v110 <= 1 && v20 == 1; + if ( v127 > 0 ) + { + v125 = __pow5mult_D2A(v125, v127); + if ( !v54 || a2 <= a1[1] + 1 ) + { + v55 = 0; +LABEL_136: + _BitScanReverse(&v64, v125[v125[4] + 4]); + v56 = v64 ^ 0x1F; +LABEL_94: + v57 = (v56 - (_BYTE)v132 - 4) & 0x1F; + v148[0] = v57; + v58 = v57; + if ( v57 + v138 > 0 ) + { + v14 = __lshift_D2A(v14, v57 + v138); + v58 = v148[0]; + } + v59 = v132 + v58; + if ( v59 > 0 ) + v125 = __lshift_D2A(v125, v59); + v60 = v110 > 2; + if ( v142 && (v116 = v110 > 2, v75 = __cmp_D2A((int)v14, (int)v125), v60 = v110 > 2, v75 < 0) ) + { + v14 = __multadd_D2A(v14, 10, 0); + if ( !v139 ) + { + if ( v145 > 0 || !v116 ) + { + v120 = v140; + v126 = v145; +LABEL_177: + v68 = v134; + v148[0] = 1; + while ( 1 ) + { + v68 = (int *)((char *)v68 + 1); + v77 = __quorem_D2A((int)v14, (int)v125) + 48; + *((_BYTE *)v68 - 1) = v77; + if ( v148[0] >= v126 ) + break; + v76 = __multadd_D2A(v14, 10, 0); + ++v148[0]; + v14 = v76; + } + LOBYTE(v115) = v77; + v73 = 0; +LABEL_181: + if ( v130 ) + { + v78 = v14[4]; + v79 = *((_BYTE *)v68 - 1); + if ( v130 != 2 ) + { + if ( v78 > 1 || v14[5] ) + { +LABEL_185: + v80 = v134; + goto LABEL_188; + } +LABEL_191: + while ( v79 == 48 ) + { + v79 = *((_BYTE *)v68 - 2); + v68 = (int *)((char *)v68 - 1); + } + goto LABEL_160; + } + } + else + { + v113 = v73; + v14 = __lshift_D2A(v14, 1); + v89 = __cmp_D2A((int)v14, (int)v125); + v73 = v113; + v90 = v89 == 0; + v91 = v89 <= 0; + v79 = *((_BYTE *)v68 - 1); + if ( !v91 || v90 && (v115 & 1) != 0 ) + goto LABEL_185; + v78 = v14[4]; + } + if ( v78 <= 1 ) + { + v109 = 16; + if ( !v14[5] ) + v109 = v117; + v117 = v109; + } + else + { + v117 = 16; + } + goto LABEL_191; + } + goto LABEL_263; + } + v51 = __multadd_D2A(v51, 10, 0); + if ( v145 <= 0 && v116 ) + { +LABEL_263: + --v140; + v126 = v145; + goto LABEL_101; + } + v120 = v140; + v126 = v145; + } + else + { + if ( v126 <= 0 && v60 ) + { +LABEL_101: + if ( !v126 ) + { + v125 = __multadd_D2A(v125, 5, 0); + if ( __cmp_D2A((int)v14, (int)v125) > 0 ) + { + v45 = v134; + v120 = v140 + 2; +LABEL_104: + v134 = (int *)((char *)v134 + 1); + *(_BYTE *)v45 = 49; + v117 = 32; + goto LABEL_105; + } + } +LABEL_133: + v45 = v134; + v117 = 16; + v120 = -v119; +LABEL_105: + __Bfree_D2A(v125); + if ( !v51 ) + { +LABEL_107: + __Bfree_D2A(v14); + *(_BYTE *)v134 = 0; + *a7 = v120; + if ( a8 ) + *a8 = (char *)v134; + *a4 |= v117; + return v45; + } +LABEL_106: + __Bfree_D2A(v51); + goto LABEL_107; + } + v120 = v140 + 1; + if ( !v139 ) + goto LABEL_177; + } + v65 = v136 + v57; + if ( v65 > 0 ) + v51 = __lshift_D2A(v51, v65); + v66 = v51; + if ( v55 ) + { + v104 = __Balloc_D2A(v51[1]); + memcpy(v104 + 3, v51 + 3, 4 * v51[4] + 8); + v66 = __lshift_D2A(v104, 1); + } + v148[0] = 1; + for ( j = v134; ; j = (int *)((char *)j + 1) ) + { + v69 = __quorem_D2A((int)v14, (int)v125); + v115 = v69 + 48; + v128 = v69; + v70 = __cmp_D2A((int)v14, (int)v51); + v71 = __diff_D2A((int)v125, (int)v66); + if ( v71[3] ) + { + __Bfree_D2A(v71); + v67 = 1; + } + else + { + v137 = v71; + v133 = __cmp_D2A((int)v14, (int)v71); + __Bfree_D2A(v137); + v67 = v133 | v110; + if ( v133 | v110 ) + { + v67 = v133; + } + else if ( !(v130 | *a3 & 1) ) + { + v72 = v70; + v68 = (int *)((char *)j + 1); + if ( v115 == 57 ) + goto LABEL_262; + if ( v72 <= 0 ) + { + if ( v14[4] <= 1 ) + { + if ( v14[5] ) + v67 = 16; + } + else + { + v67 = 16; + } + } + else + { + LOBYTE(v115) = v128 + 49; + v67 = 32; + } + v117 = v67; + *(_BYTE *)j = v115; + v73 = v51; + v51 = v66; + goto LABEL_160; + } + } + if ( v70 < 0 || !(v110 | v70) && (*(_BYTE *)a3 & 1) == 0 ) + break; + v68 = (int *)((char *)j + 1); + if ( v67 > 0 && v130 != 2 ) + { + if ( v115 == 57 ) + goto LABEL_262; + v73 = v51; + v117 = 32; + v51 = v66; + *(_BYTE *)j = v115 + 1; + goto LABEL_160; + } + *(_BYTE *)j = v115; + if ( v148[0] == v126 ) + { + v73 = v51; + v51 = v66; + goto LABEL_181; + } + v14 = __multadd_D2A(v14, 10, 0); + if ( v51 == v66 ) + { + v51 = __multadd_D2A(v51, 10, 0); + v66 = v51; + } + else + { + v51 = __multadd_D2A(v51, 10, 0); + v66 = __multadd_D2A(v66, 10, 0); + } + ++v148[0]; + } + v68 = (int *)((char *)j + 1); + if ( v130 ) + { + if ( v14[4] <= 1 && !v14[5] ) + { + if ( v67 <= 0 ) + { + v73 = v51; + v51 = v66; + goto LABEL_240; + } +LABEL_257: + v14 = __lshift_D2A(v14, 1); + v107 = __cmp_D2A((int)v14, (int)v125); + if ( v107 <= 0 && (v107 || (v115 & 1) == 0) ) + { + v130 = 32; + goto LABEL_260; + } + if ( v115 != 57 ) + { + v130 = 32; + LOBYTE(v115) = v128 + 49; + goto LABEL_260; + } +LABEL_262: + v73 = v51; + v51 = v66; + v80 = v134; + *(_BYTE *)j = 57; + v79 = 57; + while ( 1 ) + { +LABEL_188: + v81 = (int *)((char *)v68 - 1); + if ( v79 != 57 ) + { + v117 = 32; + *(_BYTE *)v81 = v79 + 1; + goto LABEL_160; + } + if ( v81 == v80 ) + break; + v79 = *((_BYTE *)v68 - 2); + v68 = (int *)((char *)v68 - 1); + } + ++v120; + v117 = 32; + *(_BYTE *)v134 = 49; +LABEL_160: + v111 = v73; + __Bfree_D2A(v125); + if ( !v51 ) + { + v45 = v134; + v134 = v68; + goto LABEL_107; + } + if ( !v111 || v111 == v51 ) + { + v45 = v134; + v134 = v68; + } + else + { + __Bfree_D2A(v111); + v45 = v134; + v134 = v68; + } + goto LABEL_106; + } + if ( v130 != 2 ) + { + v98 = v51; + for ( k = (int *)((char *)j + 1); ; k = (int *)((char *)k + 1) ) + { + v101 = __cmp_D2A((int)v125, (int)v66); + v102 = k; + if ( v101 <= 0 ) + break; + *((_BYTE *)k - 1) = v115; + v100 = __multadd_D2A(v66, 10, 0); + if ( v98 == v66 ) + v98 = v100; + v114 = v100; + v14 = __multadd_D2A(v14, 10, 0); + j = k; + v115 = __quorem_D2A((int)v14, (int)v125) + 48; + v66 = v114; + } + v51 = v98; + v68 = v102; + if ( v115 != 57 ) + { + v117 = 32; + v73 = v51; + v51 = v66; + LOBYTE(v115) = v115 + 1; + goto LABEL_240; + } + goto LABEL_262; + } + } + else + { + if ( v67 > 0 ) + goto LABEL_257; +LABEL_260: + if ( v14[4] <= 1 ) + { + v73 = v51; + v51 = v66; + if ( v14[5] ) + v117 = 16; + else + v117 = v130; +LABEL_240: + *(_BYTE *)j = v115; + goto LABEL_160; + } + } + v73 = v51; + v117 = 16; + v51 = v66; + goto LABEL_240; + } + } + else + { + v55 = 0; + if ( !v54 || a1[1] + 1 >= a2 ) + { +LABEL_93: + v56 = 31; + if ( !v127 ) + goto LABEL_94; + goto LABEL_136; + } + } + ++v138; + v55 = 1; + ++v132; + goto LABEL_93; + } +LABEL_76: + if ( ((v110 - 3) & 0xFFFFFFFD) != 0 ) + { + v48 = v135 - v49 + 1; + v148[0] = v48; + if ( v126 <= 0 || v110 <= 1 || v48 <= v126 ) + goto LABEL_79; +LABEL_169: + v74 = v126 - 1; + if ( v141 < v126 - 1 ) + { + v50 = 0; + v88 = v74 - v141; + v141 = v126 - 1; + v127 += v88; + } + else + { + v50 = v141 - v74; + } + if ( v126 < 0 ) + { + v148[0] = 0; + v136 = v138 - v126; + } + else + { + v132 += v126; + v148[0] = v126; + v136 = v138; + v138 += v126; + } + goto LABEL_80; + } + goto LABEL_168; + } + v119 = 0; + v144 = 0; + v139 = 1; + v145 = -1; + v126 = -1; +LABEL_46: + v31 = 2; + if ( v130 >= 0 ) + v31 = v130; + v130 = v31; + if ( (v8 & 8) == 0 ) + goto LABEL_119; + v130 = 3 - v31; +LABEL_50: + if ( v144 && !(v140 | v130) ) + { + v32 = v123; + v148[0] = 0; + if ( v142 && v32 < 1.0 ) + { + if ( v126 ) + { + v34 = v145; + if ( v145 <= 0 ) + { +LABEL_118: + v130 = 0; + goto LABEL_119; + } + v32 = v32 * 10.0; + v146 = -1; + v103 = v32 * 3.0 + 7.0; + LODWORD(v131) = LODWORD(v103); + HIDWORD(v131) = HIDWORD(v103) - 54525952; +LABEL_56: + v35 = v131; + v36 = dbl_515138[v34]; + if ( v139 ) + { + v37 = (int *)((char *)v134 + 1); + *(_BYTE *)v134 = (int)v32 + 48; + v38 = 0.5 / v36 - v35; + v39 = v32 - (long double)(int)v32; + if ( v38 > v39 ) + { +LABEL_265: + v45 = v134; + v134 = v37; + v120 = v146 + 1; + if ( 0.0 == v39 ) + { + v117 = 0; + goto LABEL_107; + } + goto LABEL_215; + } + while ( 1 ) + { + v43 = v38; + if ( v38 > 1.0 - v39 ) + break; + if ( ++v148[0] >= v34 ) + goto LABEL_118; + v37 = (int *)((char *)v37 + 1); + v40 = v39 * 10.0; + v41 = (int)v40; + v42 = v40 - (long double)(int)v40; + v38 = v43 * 10.0; + v39 = v42; + *((_BYTE *)v37 - 1) = v41 + 48; + if ( v38 > v42 ) + goto LABEL_265; + } + v44 = *((_BYTE *)v37 - 1); +LABEL_63: + v45 = v134; + n = v37; + v120 = v146 + 1; + goto LABEL_64; + } + v92 = v35 * v36; + v37 = v134; + v147 = v11; + v93 = 0; + v148[0] = 1; + v94 = v32; + while ( 1 ) + { + v95 = (int)v94; + if ( (int)v94 ) + { + v93 = v144; + v94 = v94 - (long double)(int)v94; + } + v37 = (int *)((char *)v37 + 1); + v44 = v95 + 48; + *((_BYTE *)v37 - 1) = v44; + if ( v148[0] == v34 ) + break; + v94 = v94 * 10.0; + v93 = v144; + ++v148[0]; + } + v96 = v93; + v11 = v147; + if ( !v96 ) + v94 = v32; + if ( v94 > v92 + 0.5 ) + goto LABEL_63; + if ( 0.5 - v92 > v94 ) + { + v45 = v134; + if ( 0.0 == v94 ) + v117 = 0; + else + v117 = 16; + v82 = v146 + 1; + goto LABEL_228; + } + goto LABEL_118; + } + v61 = v32 + v32 + 7.0; + LODWORD(v131) = LODWORD(v61); + HIDWORD(v131) = HIDWORD(v61) - 54525952; + } + else + { + v33 = v32 + v32 + 7.0; + LODWORD(v131) = LODWORD(v33); + HIDWORD(v131) = HIDWORD(v33) - 54525952; + if ( v126 ) + { + v146 = 0; + v34 = v126; + goto LABEL_56; + } + } + v62 = v32 - 5.0; + if ( v62 > v131 ) + { + v120 = 2; + v45 = v134; + v51 = 0; + v125 = 0; + goto LABEL_104; + } + if ( -v131 > v62 ) + { +LABEL_132: + v125 = 0; + v51 = 0; + goto LABEL_133; + } + goto LABEL_118; + } +LABEL_119: + if ( v135 >= 0 && a1[5] >= v140 ) + { + v63 = __tens_D2A[v140]; + if ( v119 < 0 ) + { + v51 = (int *)v126; + if ( v126 <= 0 ) + { + if ( !v126 && v63 * 5.0 < v123 ) + { + v125 = 0; + v45 = v134; + v120 = v140 + 2; + goto LABEL_104; + } + goto LABEL_132; + } + } +LABEL_198: + v148[0] = 1; + v82 = v140 + 1; + v120 = v140 + 1; + v37 = (int *)((char *)v134 + 1); + v112 = (int)(v123 / v63); + *(_BYTE *)v134 = v112 + 48; + v83 = v123 - (long double)v112 * v63; + v84 = v83 == 0.0; + for ( m = v83; ; m = v87 ) + { + if ( v84 ) + { + v45 = v134; + v134 = v37; + goto LABEL_107; + } + if ( v148[0] == v126 ) + break; + v86 = m * 10.0; + v37 = (int *)((char *)v37 + 1); + ++v148[0]; + v112 = (int)(v86 / v63); + *((_BYTE *)v37 - 1) = v112 + 48; + v87 = v86 - (long double)v112 * v63; + v84 = v87 == 0.0; + } + if ( v130 ) + { + if ( v130 == 1 ) + { + v44 = *((_BYTE *)v37 - 1); + v45 = v134; + n = v37; + goto LABEL_64; + } + v45 = v134; + v134 = v37; +LABEL_215: + v117 = 16; + goto LABEL_107; + } + v108 = m + m; + v44 = *((_BYTE *)v37 - 1); + if ( v108 > v63 ) + { + v45 = v134; + for ( n = v37; ; n = v37 ) + { +LABEL_64: + v37 = (int *)((char *)n - 1); + if ( v44 != 57 ) + { + v134 = n; + v105 = v44 + 1; + goto LABEL_252; + } + if ( v37 == v45 ) + break; + v44 = *((_BYTE *)n - 2); +LABEL_67: + ; + } + ++v120; + v105 = 49; + v134 = n; + *(_BYTE *)v45 = 48; +LABEL_252: + *(_BYTE *)v37 = v105; + v117 = 32; + goto LABEL_107; + } + v45 = v134; + if ( v108 == v63 && (v112 & 1) != 0 ) + goto LABEL_67; + v117 = 16; + do + { +LABEL_228: + v97 = v37; + v37 = (int *)((char *)v37 - 1); + } + while ( *((_BYTE *)v97 - 1) == 48 ); + v134 = v97; + v120 = v82; + goto LABEL_107; + } + if ( !v139 ) + { + v50 = v141; + v51 = 0; + v136 = v138; + goto LABEL_81; + } + goto LABEL_75; + } + v142 = 0; + --v127; + } + v138 = 0; + if ( v135 <= 0 ) + goto LABEL_33; + goto LABEL_110; + } + __Bfree_D2A(v14); + } + *a7 = 1; + return __nrv_alloc_D2A("0", a8, 1); + } + if ( v9 != 4 ) + return 0; + *a7 = -32768; + return __nrv_alloc_D2A((char *)&off_515099, a8, 3); +} +// 515099: using guessed type void *off_515099; +// 515138: using guessed type double dbl_515138[]; +// 515140: using guessed type double __tens_D2A[24]; +// 43C3F0: using guessed type int var_20[8]; + +//----- (0043DB40) -------------------------------------------------------- +int __cdecl __gethex_D2A(unsigned __int8 **a1, int *a2, int *a3, int **a4, int a5) +{ + char *decimal_point; // edi + int v6; // ebx + unsigned __int8 v7; // cl + unsigned __int8 *v8; // eax + int v9; // edx + int v10; // ebp + unsigned __int8 *v11; // ebx + char v12; // al + int v13; // edx + unsigned __int8 v14; // bp + unsigned __int8 *v15; // esi + unsigned __int8 *v16; // eax + int v17; // esi + int v18; // eax + int v19; // ebx + int v20; // ebp + int v21; // esi + int v22; // edx + int j; // eax + int *v24; // edi + int v25; // ebx + int v26; // ecx + unsigned __int8 v27; // dl + unsigned __int8 v28; // dl + int v29; // ecx + bool v30; // zf + int v31; // eax + int v32; // edx + int i; // eax + int v34; // eax + int v35; // edx + unsigned __int8 *v36; // ecx + unsigned int *v37; // edi + char v38; // cl + int v39; // eax + int v40; // eax + unsigned int v41; // ebp + int *v42; // ebx + unsigned int v43; // eax + int *v44; // edx + int v45; // eax + int v46; // edx + int v47; // edx + int v48; // edi + int v49; // edx + int v50; // edx + int v51; // ecx + int v52; // ecx + unsigned int v53; // esi + unsigned int v54; // eax + unsigned int v55; // eax + int v56; // ebx + int v57; // ebx + int v58; // edi + int v59; // esi + int v60; // eax + int v61; // ebx + int v62; // eax + int v64; // ebx + int v65; // edx + char v66; // dl + int v67; // eax + int v68; // ecx + int v69; // ebx + int v70; // ecx + int v71; // esi + unsigned int v72; // eax + int v73; // edi + unsigned __int8 *v74; // ecx + int v75; // eax + int v76; // eax + int Val; // [esp+4h] [ebp-48h] + int v78; // [esp+14h] [ebp-38h] + unsigned int v79; // [esp+14h] [ebp-38h] + int v80; // [esp+18h] [ebp-34h] + BOOL v81; // [esp+18h] [ebp-34h] + unsigned int v82; // [esp+18h] [ebp-34h] + unsigned __int8 *v83; // [esp+1Ch] [ebp-30h] + char *v84; // [esp+1Ch] [ebp-30h] + int v85; // [esp+20h] [ebp-2Ch] + int *v86; // [esp+24h] [ebp-28h] + unsigned __int8 *v87; // [esp+24h] [ebp-28h] + char *v88; // [esp+24h] [ebp-28h] + _DWORD *v89; // [esp+28h] [ebp-24h] + int v90; // [esp+28h] [ebp-24h] + int v91; // [esp+2Ch] [ebp-20h] + + decimal_point = localeconv()->decimal_point; + if ( !byte_1522390 ) + __mingw_hexdig_init_D2A(); + *a4 = 0; + v6 = (int)*a1; + v7 = (*a1)[2]; + if ( v7 == 48 ) + { + v8 = (unsigned __int8 *)(v6 + 3); + v9 = -2 - v6; + do + { + v10 = (int)&v8[v9]; + v11 = v8; + v7 = *v8++; + } + while ( v7 == 48 ); + } + else + { + v11 = (unsigned __int8 *)(v6 + 2); + v10 = 0; + } + if ( __hexdig_D2A[v7] ) + { + v79 = (unsigned int)v11; + ++v10; + v16 = 0; + v81 = 0; + goto LABEL_31; + } + v12 = *decimal_point; + v13 = 0; + if ( *decimal_point ) + { + v80 = v10; + v14 = v7; + do + { + if ( v12 != v7 ) + { + v7 = v14; + v10 = v80; + goto LABEL_12; + } + v12 = decimal_point[++v13]; + v7 = v11[v13]; + v15 = &v11[v13]; + } + while ( v12 ); + v10 = v80; + v16 = &v11[v13]; + if ( __hexdig_D2A[v7] ) + { + if ( v7 == 48 ) + { + v11 += v13; + do + v27 = *++v11; + while ( v27 == 48 ); + v79 = (unsigned int)v11; + v10 = 1; + v81 = __hexdig_D2A[v27] == 0; + if ( !__hexdig_D2A[v27] ) + { +LABEL_32: + if ( v27 != *decimal_point ) + { + v28 = *v11; + v29 = 4 * (v16 - v11); + v30 = v16 == 0; + v31 = 0; + if ( !v30 ) + v31 = v29; + v85 = v31; +LABEL_36: + if ( (v28 & 0xDF) != 80 ) + goto LABEL_37; +LABEL_53: + v83 = v11; + v11 = (unsigned __int8 *)v79; + goto LABEL_54; + } + if ( v16 ) + { + v85 = 4 * (v16 - v11); + if ( (*v11 & 0xDF) != 80 ) + { +LABEL_37: + *a1 = v11; + if ( !v81 ) + { +LABEL_38: + v32 = 0; + for ( i = (int)&v11[-v79 - 1]; i > 7; ++v32 ) + i >>= 1; + v86 = __Balloc_D2A(v32); + v89 = v86 + 5; + if ( decimal_point[1] ) + { + v34 = 0; + do + ++v34; + while ( decimal_point[v34 + 1] ); + v91 = v34; + } + else + { + v91 = 0; + } + if ( (unsigned int)v11 <= v79 ) + { + v37 = (unsigned int *)(v86 + 5); + v53 = 0; + v42 = v86 + 6; + v55 = 32; + } + else + { + v35 = 0; + v36 = v11; + v84 = &decimal_point[v91]; + v37 = (unsigned int *)(v86 + 5); + v82 = 0; + do + { + while ( 1 ) + { + v40 = *(v36 - 1); + v41 = (unsigned int)(v36 - 1); + v42 = (int *)(v37 + 1); + if ( (_BYTE)v40 != *v84 ) + break; + v36 = (unsigned __int8 *)(v41 - v91); + if ( v41 - v91 <= v79 ) + goto LABEL_68; + } + if ( v35 == 32 ) + { + v43 = v82; + v44 = (int *)(v37 + 2); + v82 = 0; + *v37++ = v43; + v40 = *(v36 - 1); + v42 = v44; + v38 = 0; + v35 = 4; + } + else + { + v38 = v35; + v35 += 4; + } + v39 = (__hexdig_D2A[v40] & 0xF) << v38; + v36 = (unsigned __int8 *)v41; + v82 |= v39; + } + while ( v41 > v79 ); +LABEL_68: + v53 = v82; + _BitScanReverse(&v54, v82); + v55 = v54 ^ 0x1F; + } + *v37 = v53; + v56 = v42 - v89; + v86[4] = v56; + v57 = 32 * v56 - v55; + v58 = *a2; + if ( v57 > *a2 ) + { + v69 = v57 - v58; + v59 = __any_on_D2A((int)v86, v69); + if ( v59 ) + { + v59 = 1; + if ( (v89[(v69 - 1) >> 5] & (1 << (v69 - 1))) != 0 ) + { + if ( v69 == 1 || (v59 = 3, !__any_on_D2A((int)v86, v69 - 1)) ) + v59 = 2; + } + } + __rshift_D2A((int)v86, v69); + v85 += v69; + } + else + { + v59 = 0; + if ( v57 < *a2 ) + { + v85 -= v58 - v57; + v86 = __lshift_D2A(v86, v58 - v57); + v89 = v86 + 5; + } + } + if ( a2[2] < v85 ) + { +LABEL_110: + __Bfree_D2A(v86); + goto LABEL_111; + } + v60 = a2[1]; + if ( v60 <= v85 ) + { + v61 = 1; + goto LABEL_75; + } + v64 = v60 - v85; + if ( v58 > v60 - v85 ) + { + v70 = v64 - 1; + if ( v59 ) + { + v59 = 1; + } + else if ( v64 != 1 ) + { + v76 = __any_on_D2A((int)v86, v64 - 1); + v70 = v64 - 1; + v59 = v76; + } + Val = v64; + if ( (v89[v70 >> 5] & (1 << v70)) != 0 ) + v59 |= 2u; + v58 -= v64; + v61 = 2; + __rshift_D2A((int)v86, Val); + v85 = a2[1]; +LABEL_75: + if ( !v59 ) + { +LABEL_80: + *a4 = v86; + *a3 = v85; + return v61; + } + v62 = a2[3]; + if ( v62 == 2 ) + { + a5 = 1 - a5; + } + else if ( v62 != 3 ) + { + if ( v62 != 1 || (v59 & 2) == 0 || ((*v89 | v59) & 1) == 0 ) + goto LABEL_79; +LABEL_128: + v71 = v86[4]; + v86 = __increment_D2A(v86); + v72 = (unsigned int)(v86 + 5); + if ( v61 == 2 ) + { + v61 = 34; + if ( *a2 - 1 == v58 ) + v61 = ((*(_DWORD *)(v72 + 4 * (v58 >> 5)) & (1 << v58)) == 0) + 33; + goto LABEL_80; + } + if ( v86[4] <= v71 + && ((v73 = v58 & 0x1F) == 0 + || (_BitScanReverse(&v72, *(_DWORD *)(v72 + 4 * v71 - 4)), 32 - v73 <= (int)(v72 ^ 0x1F))) + || (__rshift_D2A((int)v86, 1), ++v85, a2[2] >= v85) ) + { + v61 = 33; + goto LABEL_80; + } + goto LABEL_110; + } + if ( !a5 ) + { +LABEL_79: + v61 |= 0x10u; + goto LABEL_80; + } + goto LABEL_128; + } + v65 = a2[3]; + if ( v65 == 2 ) + { + if ( !a5 ) + goto LABEL_141; + } + else if ( v65 == 3 ) + { + if ( a5 ) + goto LABEL_141; + } + else if ( v65 == 1 && v58 == v64 ) + { + if ( v58 == 1 ) + { +LABEL_141: + v86[4] = 1; + *v89 = 1; + goto LABEL_93; + } + if ( __any_on_D2A((int)v86, v58 - 1) ) + { + v60 = a2[1]; + goto LABEL_141; + } + } + __Bfree_D2A(v86); +LABEL_99: + *_errno() = 34; + return 80; + } + return 0; + } + goto LABEL_53; + } + v66 = decimal_point[1]; + if ( v66 ) + { + v67 = 1; + while ( v11[v67] == v66 ) + { + v66 = decimal_point[++v67]; + v68 = v67; + if ( !v66 ) + goto LABEL_151; + } + v28 = *v11; + } + else + { + v68 = 1; +LABEL_151: + v74 = &v11[v68]; + v11 = v74; + v28 = *v74; + if ( __hexdig_D2A[*v74] ) + { + do + { + v75 = *++v11; + v28 = v75; + } + while ( __hexdig_D2A[v75] ); + v85 = 4 * (v74 - v11); + goto LABEL_36; + } + } + v85 = 0; + goto LABEL_36; + } + } + else + { + v81 = 0; + v11 += v13; + v10 = 1; + v79 = (unsigned int)v15; + } + do + { +LABEL_31: + v26 = *++v11; + v27 = v26; + } + while ( __hexdig_D2A[v26] ); + goto LABEL_32; + } + } + else + { +LABEL_12: + v16 = v11; + } + v83 = v16; + if ( (v7 & 0xDF) != 80 ) + { + v81 = 1; + v17 = 0; + v85 = 0; + v78 = 0; + goto LABEL_15; + } + v85 = 0; + v81 = 1; +LABEL_54: + v45 = v83[1]; + if ( (_BYTE)v45 == 43 ) + { + v78 = 0; + } + else + { + if ( (_BYTE)v45 != 45 ) + { + v78 = 0; + v87 = v83 + 1; + goto LABEL_57; + } + v78 = 1; + } + v45 = v83[2]; + v87 = v83 + 2; +LABEL_57: + v46 = (unsigned __int8)__hexdig_D2A[v45]; + v17 = 0; + v16 = v83; + if ( (unsigned __int8)(v46 - 1) <= 0x18u ) + { + v90 = v46 - 16; + v16 = v87 + 1; + v47 = (unsigned __int8)__hexdig_D2A[v87[1]]; + if ( (unsigned __int8)(__hexdig_D2A[v87[1]] - 1) <= 0x18u ) + { + v88 = decimal_point; + v48 = v47; + v49 = v90; + do + { + v30 = (v49 & 0xF8000000) == 0; + v50 = 5 * v49; + if ( !v30 ) + v17 = 1; + v51 = v16[1]; + v49 = v48 + 2 * v50 - 16; + ++v16; + v48 = (unsigned __int8)__hexdig_D2A[v51]; + } + while ( (unsigned __int8)(__hexdig_D2A[v51] - 1) <= 0x18u ); + v90 = v49; + decimal_point = v88; + } + v52 = -v90; + if ( !v78 ) + v52 = v90; + v85 += v52; + } +LABEL_15: + if ( !v10 ) + v16 = v11 - 1; + *a1 = v16; + if ( v81 ) + return 0; + if ( !v17 ) + { + v79 = (unsigned int)v11; + v11 = v83; + goto LABEL_38; + } + v18 = a2[3]; + if ( v78 ) + { + if ( v18 == 2 ) + { + if ( a5 ) + goto LABEL_99; + } + else if ( v18 != 3 || !a5 ) + { + goto LABEL_99; + } + v86 = __Balloc_D2A(0); + v86[4] = 1; + v86[5] = 1; + v60 = a2[1]; +LABEL_93: + v25 = 98; + *a4 = v86; + *a3 = v60; + *_errno() = 34; + return v25; + } + if ( v18 == 2 ) + { + if ( !a5 ) + goto LABEL_111; + goto LABEL_23; + } + if ( v18 == 3 ) + { + if ( a5 ) + goto LABEL_111; + goto LABEL_23; + } + if ( v18 != 1 ) + { +LABEL_23: + v19 = *a2 & 0x1F; + v20 = *a2 >> 5; + v21 = v20 - ((v19 == 0) - 1); + v22 = 0; + for ( j = v21 >> 1; j; j >>= 1 ) + ++v22; + v24 = __Balloc_D2A(v22); + *a4 = v24; + v24[4] = v21; + if ( v20 > 0 ) + { + memset(v24 + 5, 255, 4 * v20); + v78 = v20; + } + if ( v21 > v20 ) + v24[v78 + 5] = 32 >> (32 - v19); + v25 = 17; + *a3 = a2[1]; + return v25; + } +LABEL_111: + *_errno() = 34; + return 163; +} +// 1522390: using guessed type char byte_1522390; + +//----- (0043E520) -------------------------------------------------------- +int __cdecl __rshift_D2A(int a1, int a2) +{ + int v2; // ebx + _DWORD *v3; // ebp + unsigned int v4; // ebx + _DWORD *v5; // esi + char v6; // di + int *v7; // edx + int v8; // eax + int v9; // esi + int v10; // ebx + _DWORD *v11; // edx + int result; // eax + _DWORD *v13; // edi + unsigned int v14; // [esp+0h] [ebp-24h] + int v15; // [esp+4h] [ebp-20h] + int v16; // [esp+8h] [ebp-1Ch] + + v2 = *(_DWORD *)(a1 + 16); + v16 = a2 >> 5; + v15 = v2; + if ( v2 <= a2 >> 5 ) + goto LABEL_8; + v3 = (_DWORD *)(a1 + 20); + v4 = a1 + 20 + 4 * v2; + v5 = (_DWORD *)(a1 + 20 + 4 * (a2 >> 5)); + v6 = a2 & 0x1F; + if ( (a2 & 0x1F) == 0 ) + { + v13 = (_DWORD *)(a1 + 20); + if ( v4 > (unsigned int)v5 ) + { + do + *v13++ = *v5++; + while ( v4 > (unsigned int)v5 ); + v11 = &v3[v15 - v16]; + goto LABEL_13; + } +LABEL_8: + *(_DWORD *)(a1 + 16) = 0; +LABEL_9: + result = a1; + *(_DWORD *)(a1 + 20) = 0; + return result; + } + v7 = v5 + 1; + v8 = *v5 >> v6; + if ( v4 <= (unsigned int)(v5 + 1) ) + { + *(_DWORD *)(a1 + 20) = v8; + if ( v8 ) + { + v11 = (_DWORD *)(a1 + 20); +LABEL_7: + ++v11; + goto LABEL_13; + } + goto LABEL_8; + } + v14 = v4; + v9 = a1 + 20; + do + { + v10 = *v7; + v9 += 4; + ++v7; + *(_DWORD *)(v9 - 4) = (v10 << (32 - v6)) | v8; + v8 = (unsigned int)*(v7 - 1) >> v6; + } + while ( v14 > (unsigned int)v7 ); + v3 = (_DWORD *)(a1 + 20); + v11 = (_DWORD *)(a1 + 20 + 4 * (v15 - v16) - 4); + *v11 = v8; + if ( v8 ) + goto LABEL_7; +LABEL_13: + result = v11 - v3; + *(_DWORD *)(a1 + 16) = result; + if ( v11 == v3 ) + goto LABEL_9; + return result; +} + +//----- (0043E630) -------------------------------------------------------- +int __cdecl __trailz_D2A(int a1) +{ + int *v1; // eax + unsigned int v2; // ebx + int v3; // edx + + v1 = (int *)(a1 + 20); + v2 = a1 + 20 + 4 * *(_DWORD *)(a1 + 16); + v3 = 0; + if ( a1 + 20 < v2 ) + { + while ( 1 ) + { + _ECX = *v1; + if ( *v1 ) + break; + ++v1; + v3 += 32; + if ( v2 <= (unsigned int)v1 ) + return v3; + } + if ( v2 > (unsigned int)v1 ) + { + __asm { tzcnt ecx, ecx } + v3 += _ECX; + } + } + return v3; +} + +//----- (0043E670) -------------------------------------------------------- +int __mingw_hexdig_init_D2A() +{ + const char *v0; // edx + int v1; // eax + int v2; // ecx + char *v3; // edx + int v4; // eax + int v5; // ecx + int v6; // edx + int result; // eax + char v8; // cl + + v0 = "123456789"; + v1 = 48; + do + { + v2 = (int)&(v0++)[16 - (_DWORD)"123456789"]; + __hexdig_D2A[v1] = v2; + v1 = *((unsigned __int8 *)v0 - 1); + } + while ( (_BYTE)v1 ); + v3 = (char *)&unk_5150F4; + v4 = 97; + do + { + v5 = (int)&(v3++)[26 - (_DWORD)&unk_5150F4]; + __hexdig_D2A[v4] = v5; + v4 = (unsigned __int8)*(v3 - 1); + } + while ( (_BYTE)v4 ); + v6 = 5329147; + result = 65; + do + { + v8 = v6++ + 31; + __hexdig_D2A[result] = v8; + result = *(unsigned __int8 *)(v6 - 1); + } + while ( (_BYTE)result ); + return result; +} + +//----- (0043E6F0) -------------------------------------------------------- +int __cdecl __hexnan_D2A(unsigned __int8 **a1, int *a2, int *a3) +{ + int *v3; // edx + unsigned __int8 *v4; // ebx + unsigned int v5; // eax + unsigned __int8 v6; // dl + unsigned int v7; // edx + unsigned __int8 *v8; // eax + int *v9; // ebp + int v10; // esi + int *v11; // edi + char v12; // cl + int *v13; // ebx + int v14; // edx + unsigned int v15; // eax + int v16; // edx + int v17; // eax + int *v18; // eax + unsigned int v19; // edi + int *v20; // ebp + int *v21; // edi + int *v22; // esi + unsigned int v23; // eax + size_t Size; // edx + int v25; // eax + int *v26; // eax + int v29; // edx + unsigned __int8 i; // dl + int *v31; // ecx + int *v32; // edx + int v33; // eax + unsigned int v34; // ebx + char v35; // [esp+10h] [ebp-3Ch] + char v36; // [esp+10h] [ebp-3Ch] + int v37; // [esp+14h] [ebp-38h] + int v38; // [esp+18h] [ebp-34h] + int *v39; // [esp+1Ch] [ebp-30h] + unsigned __int8 *v40; // [esp+20h] [ebp-2Ch] + int *v41; // [esp+28h] [ebp-24h] + int v42; // [esp+2Ch] [ebp-20h] + + if ( !byte_1522390 ) + __mingw_hexdig_init_D2A(); + v42 = *a2 & 0x1F; + v3 = &a3[*a2 >> 5]; + if ( v42 ) + { + v39 = &a3[*a2 >> 5]; + v41 = v3 + 1; + } + else + { + v41 = &a3[*a2 >> 5]; + v39 = v3 - 1; + } + *(v41 - 1) = 0; + v4 = *a1; + v5 = (*a1)[1]; + v6 = (*a1)[1]; + if ( !v6 ) + return 4; + while ( v5 <= 0x20 ) + { + v5 = v4[2]; + ++v4; + v6 = v5; + if ( !v5 ) + return 4; + } + if ( v6 == 48 && (v4[2] & 0xDF) == 88 && (v7 = v4[3], (unsigned __int8)v7 > 0x20u) ) + { + v8 = v4 + 3; + v4 += 2; + } + else + { + v7 = v4[1]; + v8 = v4 + 1; + if ( !v4[1] ) + return 4; + } + v9 = v39; + v38 = 0; + v10 = 0; + v37 = 0; + v11 = v39; + do + { + while ( 1 ) + { + v12 = __hexdig_D2A[v7]; + if ( v12 ) + break; + if ( v7 > 0x20 ) + { + v31 = v11; + v19 = (unsigned int)v9; + v20 = v31; + if ( v7 == 41 && v37 ) + { + *a1 = v4 + 2; + goto LABEL_25; + } + while ( 1 ) + { + ++v8; + if ( v7 == 41 ) + break; + v7 = (char)*v8; + if ( !*v8 ) + return 4; + } + *a1 = v8; + return 4; + } + if ( v37 > v38 ) + { + if ( v11 < v9 && v10 <= 7 ) + { + v40 = v8; + v13 = v11; + v35 = 4 * (8 - v10); + v14 = *v11; + do + { + v15 = v13[1]; + ++v13; + v16 = (v15 << (32 - v35)) | v14; + v17 = v15 >> v35; + *(v13 - 1) = v16; + *v13 = v17; + v14 = v17; + } + while ( v13 < v9 ); + v8 = v40; + } + if ( v11 <= a3 ) + { + v7 = v8[1]; + v4 = v8; + v10 = 8; + goto LABEL_23; + } + v9 = v11 - 1; + *(v11 - 1) = 0; + v10 = 0; + v38 = v37; + --v11; + } + for ( i = v8[1]; i <= 0x20u; ++v8 ) + i = v8[2]; + if ( i != 48 ) + goto LABEL_49; + if ( (v8[2] & 0xDF) != 88 ) + goto LABEL_49; + v7 = v8[3]; + if ( (unsigned __int8)v7 <= 0x20u ) + goto LABEL_49; + v4 = v8 + 2; + v8 += 3; + } + ++v10; + ++v37; + if ( v10 > 8 ) + { + if ( v11 <= a3 ) + goto LABEL_49; + *(v11 - 1) = 0; + v29 = 0; + --v11; + v10 = 1; + } + else + { + v29 = 16 * *v11; + } + *v11 = v29 | v12 & 0xF; +LABEL_49: + v7 = v8[1]; + v4 = v8; +LABEL_23: + ++v8; + } + while ( v7 ); + v18 = v11; + v19 = (unsigned int)v9; + v20 = v18; + if ( !v37 ) + return 4; +LABEL_25: + if ( v19 > (unsigned int)v20 && v10 <= 7 ) + { + v32 = v20; + v36 = 4 * (8 - v10); + v33 = *v20; + do + { + v34 = v32[1]; + *v32++ = (v34 << (32 - v36)) | v33; + v33 = v34 >> v36; + *v32 = v34 >> v36; + } + while ( (unsigned int)v32 < v19 ); + } + if ( a3 >= v20 ) + { + v25 = *(v41 - 1); + if ( v42 ) + { + v25 &= 0xFFFFFFFF >> (32 - v42); + *(v41 - 1) = v25; + } + } + else + { + v21 = a3; + v22 = v20; + do + *v21++ = *v22++; + while ( v39 >= v22 ); + v23 = 4 * ((unsigned int)((char *)v39 - (char *)v20) >> 2) + 4; + if ( (char *)v39 + 1 < (char *)v20 + 1 ) + v23 = 4; + Size = 4 * ((unsigned int)((char *)v39 - ((char *)a3 + v23)) >> 2) + 4; + if ( (char *)a3 + v23 + 1 > (char *)v39 + 1 ) + Size = 4; + memset((char *)a3 + v23, 0, Size); + v25 = *(v41 - 1); + } + if ( v25 ) + return 5; + if ( v39 != a3 ) + { + v26 = v39; + while ( 1 ) + { + if ( *--v26 ) + return 5; + if ( a3 == v26 ) + { + v39 = v26; + break; + } + } + } + *v39 = 1; + return 5; +} +// 1522390: using guessed type char byte_1522390; + +//----- (0043EB10) -------------------------------------------------------- +void __usercall dtoa_lock(int a1@) +{ + int v2; // eax + __int32 v3; // eax + + if ( dtoa_CS_init == 2 ) + goto LABEL_9; + if ( dtoa_CS_init ) + { + if ( dtoa_CS_init != 1 ) + return; + do + { +LABEL_4: + Sleep(1u); + v2 = dtoa_CS_init; + } + while ( dtoa_CS_init == 1 ); + goto LABEL_5; + } + v3 = _InterlockedExchange(&dtoa_CS_init, 1); + if ( !v3 ) + { + InitializeCriticalSection(&dtoa_CritSec); + InitializeCriticalSection(&CriticalSection); + atexit(dtoa_lock_cleanup); + dtoa_CS_init = 2; + goto LABEL_9; + } + if ( v3 == 2 ) + { + dtoa_CS_init = 2; + goto LABEL_9; + } + v2 = dtoa_CS_init; + if ( dtoa_CS_init == 1 ) + goto LABEL_4; +LABEL_5: + if ( v2 == 2 ) +LABEL_9: + EnterCriticalSection((LPCRITICAL_SECTION)(24 * a1 + 22162880)); +} +// 1522DA8: using guessed type int dtoa_CS_init; + +//----- (0043EBF0) -------------------------------------------------------- +void dtoa_lock_cleanup(void) +{ + if ( _InterlockedExchange(&dtoa_CS_init, 3) == 2 ) + { + DeleteCriticalSection(&dtoa_CritSec); + DeleteCriticalSection(&CriticalSection); + } +} +// 1522DA8: using guessed type int dtoa_CS_init; + +//----- (0043EC30) -------------------------------------------------------- +int *__cdecl __Balloc_D2A(int a1) +{ + int v1; // esi + int *result; // eax + bool v3; // zf + int *v4; // [esp+1Ch] [ebp-10h] + + dtoa_lock(0); + if ( a1 > 9 ) + goto LABEL_2; + result = (int *)freelist[a1]; + if ( result ) + { + v3 = dtoa_CS_init == 2; + freelist[a1] = *result; + if ( !v3 ) + goto LABEL_4; +LABEL_8: + v4 = result; + LeaveCriticalSection(&dtoa_CritSec); + result = v4; + goto LABEL_4; + } + result = (int *)pmem_next; + v1 = 1 << a1; + if ( ((unsigned int)(4 * (1 << a1) + 27) >> 3) + (((_BYTE *)pmem_next - (_BYTE *)&private_mem) >> 3) > 0x120 ) + { +LABEL_2: + v1 = 1 << a1; + result = (int *)malloc((4 * (1 << a1) + 27) & 0xFFFFFFF8); + if ( !result ) + return result; + } + else + { + pmem_next = (char *)pmem_next + ((4 * (1 << a1) + 27) & 0xFFFFFFF8); + } + v3 = dtoa_CS_init == 2; + result[1] = a1; + result[2] = v1; + if ( v3 ) + goto LABEL_8; +LABEL_4: + result[4] = 0; + result[3] = 0; + return result; +} +// 50B154: using guessed type void *pmem_next; +// 1522D80: using guessed type int freelist[]; +// 1522DA8: using guessed type int dtoa_CS_init; + +//----- (0043ED20) -------------------------------------------------------- +void __cdecl __Bfree_D2A(void *Block) +{ + int v1; // eax + bool v2; // zf + int v3; // edx + + if ( Block ) + { + if ( *((int *)Block + 1) <= 9 ) + { + dtoa_lock(0); + v1 = *((_DWORD *)Block + 1); + v2 = dtoa_CS_init == 2; + v3 = freelist[v1]; + freelist[v1] = (int)Block; + *(_DWORD *)Block = v3; + if ( v2 ) + LeaveCriticalSection(&dtoa_CritSec); + } + else + { + free(Block); + } + } +} +// 1522D80: using guessed type int freelist[]; +// 1522DA8: using guessed type int dtoa_CS_init; + +//----- (0043ED90) -------------------------------------------------------- +int *__cdecl __multadd_D2A(int *a1, int a2, int a3) +{ + int v3; // ecx + __int64 v4; // rdi + unsigned __int64 v5; // rax + int *v6; // ebp + int *v8; // eax + int v9; // [esp+1Ch] [ebp-20h] + + v3 = 0; + HIDWORD(v4) = a3; + LODWORD(v4) = a3 >> 31; + v9 = a1[4]; + do + { + v5 = __PAIR64__(v4, HIDWORD(v4)) + a2 * (unsigned __int64)(unsigned int)a1[v3 + 5]; + a1[v3 + 5] = v5; + LODWORD(v4) = 0; + ++v3; + HIDWORD(v4) = HIDWORD(v5); + } + while ( v9 > v3 ); + v6 = a1; + if ( v4 ) + { + if ( a1[2] <= v9 ) + { + v8 = __Balloc_D2A(a1[1] + 1); + v6 = v8; + if ( v8 ) + { + memcpy(v8 + 3, a1 + 3, 4 * a1[4] + 8); + __Bfree_D2A(a1); + v6[v9 + 5] = HIDWORD(v4); + v6[4] = v9 + 1; + } + } + else + { + v6 = a1; + a1[v9 + 5] = HIDWORD(v5); + a1[4] = v9 + 1; + } + } + return v6; +} + +//----- (0043EE70) -------------------------------------------------------- +_DWORD *__cdecl __i2b_D2A(int a1) +{ + _DWORD *result; // eax + bool v2; // zf + _DWORD *v3; // [esp+1Ch] [ebp-10h] + + dtoa_lock(0); + result = (_DWORD *)dword_1522D84; + if ( dword_1522D84 ) + { + dword_1522D84 = *(_DWORD *)dword_1522D84; + if ( dtoa_CS_init != 2 ) + { +LABEL_3: + result[3] = 0; + result[4] = 1; + result[5] = a1; + return result; + } +LABEL_8: + v3 = result; + LeaveCriticalSection(&dtoa_CritSec); + result = v3; + goto LABEL_3; + } + result = pmem_next; + if ( (unsigned int)((((_BYTE *)pmem_next - (_BYTE *)&private_mem) >> 3) + 4) <= 0x120 ) + { + pmem_next = (char *)pmem_next + 32; +LABEL_7: + v2 = dtoa_CS_init == 2; + result[1] = 1; + result[2] = 2; + if ( !v2 ) + goto LABEL_3; + goto LABEL_8; + } + result = malloc(0x20u); + if ( result ) + goto LABEL_7; + return result; +} +// 50B154: using guessed type void *pmem_next; +// 1522D84: using guessed type int dword_1522D84; +// 1522DA8: using guessed type int dtoa_CS_init; + +//----- (0043EF20) -------------------------------------------------------- +int *__cdecl __mult_D2A(int a1, int a2) +{ + int v2; // edi + int v3; // ebx + int v4; // esi + int v5; // ebp + int *v6; // eax + unsigned int v7; // eax + unsigned int v8; // edx + unsigned int v9; // esi + unsigned int *v10; // ebp + unsigned __int64 v11; // rax + int v12; // eax + unsigned int v14; // [esp+14h] [ebp-48h] + unsigned int v15; // [esp+18h] [ebp-44h] + unsigned int v16; // [esp+1Ch] [ebp-40h] + unsigned int v17; // [esp+20h] [ebp-3Ch] + unsigned int *v18; // [esp+24h] [ebp-38h] + unsigned int v19; // [esp+28h] [ebp-34h] + int v20; // [esp+2Ch] [ebp-30h] + int *v21; // [esp+30h] [ebp-2Ch] + unsigned int *v22; // [esp+34h] [ebp-28h] + unsigned int v23; // [esp+3Ch] [ebp-20h] + + v2 = a1; + v3 = a2; + v4 = *(_DWORD *)(a1 + 16); + v5 = *(_DWORD *)(a2 + 16); + if ( v4 >= v5 ) + { + v5 = *(_DWORD *)(a1 + 16); + v4 = *(_DWORD *)(a2 + 16); + v3 = a1; + v2 = a2; + } + v20 = v5 + v4; + v6 = __Balloc_D2A(*(_DWORD *)(v3 + 4) + (*(_DWORD *)(v3 + 8) < v5 + v4)); + v21 = v6; + if ( v6 ) + { + v22 = (unsigned int *)(v6 + 5); + v7 = (unsigned int)&v6[v20 + 5]; + if ( (unsigned int)v22 < v7 ) + memset(v22, 0, 4 * ((v7 - (unsigned int)v21 - 21) >> 2) + 4); + v17 = v3 + 20 + 4 * v5; + v15 = v2 + 20; + v19 = v2 + 20 + 4 * v4; + if ( v2 + 20 < v19 ) + { + v8 = 4; + if ( v17 >= v3 + 21 ) + v8 = 4 * ((unsigned int)(4 * v5 - 1) >> 2) + 4; + v23 = v8; + v18 = v22; + do + { + while ( 1 ) + { + v15 += 4; + if ( *(_DWORD *)(v15 - 4) ) + break; + ++v18; + if ( v19 <= v15 ) + goto LABEL_15; + } + v16 = *(_DWORD *)(v15 - 4); + v9 = 0; + v14 = v3 + 20; + v10 = v18; + do + { + v14 += 4; + v11 = v9 + *v10++ + *(unsigned int *)(v14 - 4) * (unsigned __int64)v16; + v9 = HIDWORD(v11); + *(v10 - 1) = v11; + } + while ( v17 > v14 ); + LODWORD(v11) = v18++; + *(_DWORD *)(v11 + v23) = HIDWORD(v11); + } + while ( v19 > v15 ); + } +LABEL_15: + if ( v20 > 0 ) + { + v12 = v20; + do + { + if ( v22[v12 - 1] ) + break; + --v12; + } + while ( v12 ); + v20 = v12; + } + v21[4] = v20; + } + return v21; +} + +//----- (0043F0D0) -------------------------------------------------------- +int *__cdecl __pow5mult_D2A(int *a1, int a2) +{ + int *v2; // edi + int v3; // ebx + int *v4; // ebp + int **v5; // esi + int *v6; // edi + int *v7; // eax + int *v8; // edi + int v10; // eax + bool v11; // zf + int v12; // edx + int *v13; // eax + int *v14; // eax + int *Block; // [esp+0h] [ebp-3Ch] + + v2 = a1; + if ( (a2 & 3) == 0 || (v2 = __multadd_D2A(a1, dword_51511C[a2 & 3], 0)) != 0 ) + { + v3 = a2 >> 2; + v4 = v2; + if ( a2 >> 2 ) + { + v5 = (int **)p5s; + if ( !p5s ) + { + dtoa_lock(1); + v5 = (int **)p5s; + if ( !p5s ) + { + v14 = __Balloc_D2A(1); + v5 = (int **)v14; + if ( !v14 ) + { + p5s = 0; + return 0; + } + v14[5] = 625; + v14[4] = 1; + p5s = (int)v14; + *v14 = 0; + } + if ( dtoa_CS_init == 2 ) + LeaveCriticalSection(&CriticalSection); + } + v4 = v2; + if ( (v3 & 1) != 0 ) + goto LABEL_9; +LABEL_5: + v3 >>= 1; + if ( v3 ) + { + while ( 1 ) + { + v6 = *v5; + if ( *v5 ) + goto LABEL_7; + dtoa_lock(1); + v6 = *v5; + if ( !*v5 ) + { + v13 = __mult_D2A((int)v5, (int)v5); + *v5 = v13; + v6 = v13; + if ( !v13 ) + return 0; + *v13 = 0; + } + if ( dtoa_CS_init != 2 ) + { +LABEL_7: + v5 = (int **)v6; + } + else + { + v5 = (int **)v6; + LeaveCriticalSection(&CriticalSection); + } + if ( (v3 & 1) == 0 ) + goto LABEL_5; +LABEL_9: + v7 = __mult_D2A((int)v4, (int)v5); + v8 = v7; + if ( !v7 ) + return 0; + if ( !v4 ) + { + v4 = v7; + goto LABEL_5; + } + if ( v4[1] <= 9 ) + { + dtoa_lock(0); + v10 = v4[1]; + v11 = dtoa_CS_init == 2; + v12 = freelist[v10]; + freelist[v10] = (int)v4; + *v4 = v12; + v4 = v8; + if ( v11 ) + LeaveCriticalSection(&dtoa_CritSec); + goto LABEL_5; + } + Block = v4; + v4 = v7; + free(Block); + v3 >>= 1; + if ( !v3 ) + return v4; + } + } + } + return v4; + } + return 0; +} +// 51511C: using guessed type int dword_51511C[]; +// 1522460: using guessed type int p5s; +// 1522D80: using guessed type int freelist[]; +// 1522DA8: using guessed type int dtoa_CS_init; + +//----- (0043F2B0) -------------------------------------------------------- +int *__cdecl __lshift_D2A(int *a1, int a2) +{ + int v2; // edx + int v3; // esi + int i; // eax + int *v5; // eax + int *v6; // edi + int *v7; // esi + int *v8; // edx + char v9; // cl + int *v10; // ebp + unsigned int v11; // eax + int v12; // ebx + int v13; // ebx + unsigned int v14; // ecx + int *v16; // edi + int *v17; // esi + int *v18; // [esp+1Ch] [ebp-30h] + int v19; // [esp+20h] [ebp-2Ch] + + v2 = a1[1]; + v3 = a2 >> 5; + v19 = (a2 >> 5) + a1[4]; + for ( i = a1[2]; v19 + 1 > i; ++v2 ) + i *= 2; + v5 = __Balloc_D2A(v2); + v18 = v5; + if ( v5 ) + { + v6 = v5 + 5; + if ( v3 > 0 ) + { + v6 += v3; + memset(v5 + 5, 0, 4 * v3); + } + v7 = a1 + 5; + v8 = &a1[a1[4] + 5]; + v9 = a2 & 0x1F; + if ( (a2 & 0x1F) != 0 ) + { + v10 = v6; + v11 = 0; + do + { + v12 = *v7; + ++v10; + ++v7; + *(v10 - 1) = (v12 << v9) | v11; + v11 = (unsigned int)*(v7 - 1) >> (32 - v9); + } + while ( v8 > v7 ); + v13 = v19 + 1; + v14 = 4 * ((unsigned int)((char *)v8 - (char *)a1 - 21) >> 2) + 4; + if ( v8 < (int *)((char *)a1 + 21) ) + v14 = 4; + if ( !v11 ) + v13 = v19; + *(int *)((char *)v6 + v14) = v11; + v19 = v13; + } + else + { + do + { + *v6 = *v7; + v17 = v7 + 1; + v16 = v6 + 1; + if ( v8 <= v17 ) + break; + *v16 = *v17; + v7 = v17 + 1; + v6 = v16 + 1; + } + while ( v8 > v7 ); + } + v18[4] = v19; + __Bfree_D2A(a1); + } + return v18; +} + +//----- (0043F3F0) -------------------------------------------------------- +int __cdecl __cmp_D2A(int a1, int a2) +{ + int v2; // eax + int v3; // ebx + int v4; // edx + _DWORD *v5; // eax + _DWORD *v6; // edx + + v2 = *(_DWORD *)(a2 + 16); + v3 = *(_DWORD *)(a1 + 16) - v2; + if ( !v3 ) + { + v4 = 4 * v2; + v5 = (_DWORD *)(a1 + 20 + 4 * v2); + v6 = (_DWORD *)(a2 + v4 + 20); + while ( *--v5 == *--v6 ) + { + if ( a1 + 20 >= (unsigned int)v5 ) + return v3; + } + return *v5 < *v6 ? -1 : 1; + } + return v3; +} + +//----- (0043F440) -------------------------------------------------------- +int *__cdecl __diff_D2A(int a1, int a2) +{ + int v2; // esi + int v3; // eax + int v4; // ebx + int v5; // edx + _DWORD *v6; // eax + _DWORD *v7; // edx + int *v8; // eax + int *v9; // edi + int v10; // eax + int v11; // ebx + int v12; // esi + unsigned int v13; // ebp + __int64 v14; // rcx + __int64 v15; // rax + unsigned __int64 v16; // rax + int v17; // edx + unsigned int v18; // ebx + unsigned int v19; // eax + unsigned int v20; // ebx + int v21; // ebx + int v22; // eax + unsigned int *v23; // ecx + int v24; // ebp + int v25; // ebx + unsigned int v26; // eax + unsigned __int64 v27; // rax + int v28; // eax + int v29; // edx + int v31; // [esp+18h] [ebp-44h] + int *v32; // [esp+24h] [ebp-38h] + int v33; // [esp+24h] [ebp-38h] + unsigned int v34; // [esp+28h] [ebp-34h] + int *v35; // [esp+2Ch] [ebp-30h] + unsigned int v36; // [esp+30h] [ebp-2Ch] + int v37; // [esp+34h] [ebp-28h] + int v38; // [esp+38h] [ebp-24h] + int *v39; // [esp+3Ch] [ebp-20h] + + v2 = a1; + v3 = *(_DWORD *)(a2 + 16); + v4 = *(_DWORD *)(a1 + 16) - v3; + if ( v4 ) + { + v4 = 0; + if ( *(_DWORD *)(a1 + 16) - v3 < 0 ) + { +LABEL_24: + v4 = 1; + v2 = a2; + a2 = a1; + } +LABEL_6: + v8 = __Balloc_D2A(*(_DWORD *)(v2 + 4)); + v35 = v8; + v9 = v8; + if ( v8 ) + { + v8[3] = v4; + v10 = *(_DWORD *)(v2 + 16); + v11 = v2 + 20; + v12 = 0; + v38 = v11; + v37 = v10; + v36 = v11 + 4 * v10; + v31 = v11; + v13 = a2 + 20; + v34 = a2 + 20 + 4 * *(_DWORD *)(a2 + 16); + v39 = v9 + 5; + v32 = v9 + 5; + do + { + v31 += 4; + v13 += 4; + v14 = *(unsigned int *)(v13 - 4); + v15 = *(unsigned int *)(v31 - 4) - (unsigned __int64)(unsigned int)v12 - v14; + LODWORD(v14) = *(_DWORD *)(v31 - 4) - v12 - v14; + v16 = __PAIR64__(HIDWORD(v15), (unsigned int)++v32) & 0x1FFFFFFFFLL; + v12 = HIDWORD(v16); + *(_DWORD *)(v16 - 4) = v14; + v17 = v14; + } + while ( v34 > v13 ); + v18 = v34 - a2 - 21; + v19 = v18 & 0xFFFFFFFC; + v20 = v18 >> 2; + if ( v34 < a2 + 21 ) + v19 = 0; + v21 = 4 * v20 + 4; + v22 = (int)v39 + v19; + if ( v34 < a2 + 21 ) + v21 = 4; + v23 = (unsigned int *)(v21 + v38); + v33 = v21 + v38; + if ( v36 > v21 + v38 ) + { + v24 = (int)v39 + v21; + v25 = (int)v39 + v21; + do + { + v26 = *v23++; + v27 = v26 - (unsigned __int64)(unsigned int)v12; + v25 += 4; + v12 = BYTE4(v27) & 1; + v17 = v27; + *(_DWORD *)(v25 - 4) = v27; + } + while ( v36 > (unsigned int)v23 ); + v22 = v24 + ((v36 - 1 - v33) & 0xFFFFFFFC); + } + if ( !v17 ) + { + v28 = v22 - 4 * v37; + v29 = v37; + do + --v29; + while ( !*(_DWORD *)(v28 + 4 * v29) ); + v37 = v29; + } + v35[4] = v37; + } + return v35; + } + else + { + v5 = 4 * v3; + v6 = (_DWORD *)(a1 + 20 + 4 * v3); + v7 = (_DWORD *)(a2 + v5 + 20); + do + { + if ( *--v6 != *--v7 ) + { + if ( *v6 < *v7 ) + goto LABEL_24; + goto LABEL_6; + } + } + while ( a1 + 20 < (unsigned int)v6 ); + v35 = __Balloc_D2A(0); + if ( !v35 ) + return v35; + v35[4] = 1; + v35[5] = 0; + return v35; + } +} + +//----- (0043F670) -------------------------------------------------------- +long double __cdecl __b2d_D2A(int a1, _DWORD *a2) +{ + unsigned int v2; // esi + int v3; // ebx + unsigned int v4; // edx + unsigned int v5; // ebp + unsigned int v6; // eax + signed int v7; // eax + int v8; // eax + unsigned int v9; // edi + int v11; // edi + int v12; // edx + double v13; // [esp+0h] [ebp-1Ch] + double v14; // [esp+0h] [ebp-1Ch] + + v2 = a1 + 20; + v3 = a1 + 20 + 4 * *(_DWORD *)(a1 + 16); + v4 = *(_DWORD *)(v3 - 4); + v5 = v3 - 4; + _BitScanReverse(&v6, v4); + v7 = v6 ^ 0x1F; + *a2 = 32 - v7; + if ( v7 > 10 ) + { + v8 = v7 - 11; + if ( v2 >= v5 ) + { + v9 = 0; + if ( v8 ) + { + v9 = 0; + HIDWORD(v13) = (v4 << v8) | 0x3FF00000; + goto LABEL_5; + } + } + else + { + v9 = *(_DWORD *)(v3 - 8); + if ( v8 ) + { + v12 = (v9 >> (32 - v8)) | (v4 << v8); + v9 <<= v8; + HIDWORD(v13) = v12 | 0x3FF00000; + if ( v2 < v3 - 8 ) + v9 |= *(_DWORD *)(v3 - 12) >> (32 - v8); + goto LABEL_5; + } + } + HIDWORD(v13) = v4 | 0x3FF00000; +LABEL_5: + LODWORD(v13) = v9; + return v13; + } + v11 = 0; + if ( v2 < v5 ) + v11 = *(_DWORD *)(v3 - 8) >> (11 - v7); + LODWORD(v14) = v11 | (v4 << (v7 + 21)); + HIDWORD(v14) = (v4 >> (11 - v7)) | 0x3FF00000; + return v14; +} + +//----- (0043F780) -------------------------------------------------------- +int *__cdecl __d2b_D2A(double a1, _DWORD *a2, _DWORD *a3) +{ + int *v3; // edx + int v6; // eax + int v8; // esi + int v9; // ebx + unsigned int v10; // eax + + v3 = __Balloc_D2A(1); + if ( !v3 ) + return v3; + _ESI = LODWORD(a1); + _EBX = HIDWORD(a1) & 0xFFFFF; + v6 = (HIDWORD(a1) >> 20) & 0x7FF; + if ( v6 ) + _EBX = HIDWORD(a1) & 0xFFFFF | 0x100000; + if ( LODWORD(a1) ) + { + __asm { tzcnt edi, esi } + v8 = LODWORD(a1) >> _EDI; + if ( _EDI ) + { + v8 |= _EBX << (32 - _EDI); + _EBX >>= _EDI; + } + v3[6] = _EBX; + v9 = 1 - ((_EBX == 0) - 1); + v3[5] = v8; + v3[4] = v9; + if ( !v6 ) + goto LABEL_8; + } + else + { + v3[4] = 1; + __asm { tzcnt ecx, ebx } + _EDI = _ECX + 32; + v3[5] = _EBX >> _ECX; + v9 = 1; + if ( !v6 ) + { +LABEL_8: + *a2 = _EDI - 1074; + _BitScanReverse(&v10, v3[v9 + 4]); + *a3 = 32 * v9 - (v10 ^ 0x1F); + return v3; + } + } + *a2 = v6 + _EDI - 1075; + *a3 = 53 - _EDI; + return v3; +} + +//----- (0043F880) -------------------------------------------------------- +int __cdecl __strcp_D2A(__int64 a1) +{ + __int64 v1; // rax + char v2; // cl + char v3; // cl + + v1 = a1 + 0x100000000LL; + v2 = *(_BYTE *)HIDWORD(a1); + *(_BYTE *)a1 = *(_BYTE *)HIDWORD(a1); + if ( v2 ) + { + do + { + v3 = *(_BYTE *)HIDWORD(v1); + LODWORD(v1) = v1 + 1; + ++HIDWORD(v1); + *(_BYTE *)v1 = v3; + } + while ( v3 ); + } + return v1; +} + +//----- (0043F8B0) -------------------------------------------------------- +int *__cdecl __s2b_D2A(int a1, int a2, int a3, int a4, int a5) +{ + int v5; // edi + int v6; // eax + int v7; // edx + int *result; // eax + char *v9; // ebx + int v10; // edx + char *v11; // ebx + char *v12; // esi + int v13; // edx + + v5 = a2; + if ( a3 <= 9 ) + { + v7 = 0; + } + else + { + v6 = 1; + v7 = 0; + do + { + v6 *= 2; + ++v7; + } + while ( (a3 + 8) / 9 > v6 ); + } + result = __Balloc_D2A(v7); + result[4] = 1; + result[5] = a4; + if ( a2 <= 9 ) + { + v11 = (char *)(a1 + a5 + 9); + v5 = 9; + } + else + { + v9 = (char *)(a1 + 9); + do + { + v10 = *v9++; + result = __multadd_D2A(result, 10, v10 - 48); + } + while ( v9 != (char *)(a2 + a1) ); + v11 = &v9[a5]; + } + if ( a3 > v5 ) + { + v12 = &v11[a3 - v5]; + do + { + v13 = *v11++; + result = __multadd_D2A(result, 10, v13 - 48); + } + while ( v12 != v11 ); + } + return result; +} + +//----- (0043F9A0) -------------------------------------------------------- +long double __cdecl __ratio_D2A(int a1, int a2) +{ + int v2; // eax + double v4; // [esp+10h] [ebp-3Ch] + double v5; // [esp+18h] [ebp-34h] + double v6; // [esp+20h] [ebp-2Ch] + double v7; // [esp+28h] [ebp-24h] + int v8; // [esp+38h] [ebp-14h] BYREF + int v9[4]; // [esp+3Ch] [ebp-10h] BYREF + + v4 = __b2d_D2A(a1, &v8); + v6 = v4; + v5 = __b2d_D2A(a2, v9); + v7 = v5; + v2 = v8 + 32 * (*(_DWORD *)(a1 + 16) - *(_DWORD *)(a2 + 16)) - v9[0]; + if ( v2 <= 0 ) + { + HIDWORD(v7) = HIDWORD(v5) - (v2 << 20); + return v4 / v7; + } + else + { + HIDWORD(v6) = HIDWORD(v4) + (v2 << 20); + return v6 / v5; + } +} +// 43F9A0: using guessed type int var_10[4]; + +//----- (0043FA60) -------------------------------------------------------- +int __cdecl __match_D2A(char **a1, char *a2) +{ + char *v3; // edx + int v4; // eax + int v5; // ebx + + v3 = *a1; + do + { + v5 = *a2++; + ++v3; + if ( !v5 ) + { + *a1 = v3; + return 1; + } + v4 = *v3; + if ( (unsigned int)(v4 - 65) < 0x1A ) + v4 += 32; + } + while ( v4 == v5 ); + return 0; +} + +//----- (0043FAB0) -------------------------------------------------------- +size_t __cdecl __copybits_D2A(char *a1, int Val, size_t Size) +{ + char *v3; // ecx + _DWORD *v4; // esi + size_t result; // eax + char *v6; // edi + + v3 = a1; + v4 = (_DWORD *)(Size + 20); + result = Size + 20 + 4 * *(_DWORD *)(Size + 16); + if ( Size + 20 < result ) + { + v6 = a1; + do + { + *(_DWORD *)v6 = *v4++; + v6 += 4; + } + while ( result > (unsigned int)v4 ); + result = (result - Size - 21) >> 2; + v3 = &a1[4 * result + 4]; + } + if ( &a1[4 * ((Val - 1) >> 5) + 4] > v3 ) + return (size_t)memset(v3, 0, 4 * ((unsigned int)(&a1[4 * ((Val - 1) >> 5) + 3] - v3) >> 2) + 4); + return result; +} + +//----- (0043FB30) -------------------------------------------------------- +int __cdecl __any_on_D2A(int a1, int a2) +{ + int v2; // esi + unsigned int v3; // edx + _DWORD *v4; // eax + int v6; // ecx + + v2 = *(_DWORD *)(a1 + 16); + v3 = a1 + 20; + if ( v2 < a2 >> 5 ) + { + v4 = (_DWORD *)(v3 + 4 * v2); + goto LABEL_4; + } + v4 = (_DWORD *)(v3 + 4 * (a2 >> 5)); + if ( v2 > a2 >> 5 && (a2 & 0x1F) != 0 ) + { + v6 = 1; + if ( *v4 != *v4 >> (a2 & 0x1F) << (a2 & 0x1F) ) + return v6; + } + do + { +LABEL_4: + if ( (unsigned int)v4 <= v3 ) + return 0; + } + while ( !*--v4 ); + return 1; +} + +//----- (0043FBA0) -------------------------------------------------------- +size_t __cdecl strnlen(const char *String, size_t MaxCount) +{ + size_t v2; // edx + const char *v3; // eax + + v2 = 0; + v3 = String; + if ( MaxCount ) + { + do + { + if ( !*v3 ) + break; + v2 = ++v3 - String; + } + while ( v3 - String < MaxCount ); + } + return v2; +} + +//----- (0043FBD0) -------------------------------------------------------- +size_t __cdecl wcsnlen(const wchar_t *Source, size_t MaxCount) +{ + size_t v2; // edx + size_t v3; // eax + + v2 = MaxCount; + v3 = 0; + if ( MaxCount ) + { + while ( Source[v3] ) + { + if ( MaxCount == ++v3 ) + return v2; + } + return v3; + } + return v2; +} + +//----- (0043FE40) -------------------------------------------------------- +int __cdecl __mbrtowc_cp(LPWSTR lpWideCharStr, BYTE *lpMultiByteStr, int a3, int *a4, UINT CodePage, unsigned int a6) +{ + int v6; // edx + BYTE TestChar; // al + int v8; // eax + int v10; // [esp+2Ch] [ebp-10h] BYREF + + if ( !lpMultiByteStr ) + return 0; + if ( !a3 ) + return -2; + v6 = *a4; + TestChar = *lpMultiByteStr; + *a4 = 0; + v10 = v6; + if ( !TestChar ) + { + *lpWideCharStr = 0; + return 0; + } + if ( a6 <= 1 ) + goto LABEL_11; + if ( (_BYTE)v6 ) + { + BYTE1(v10) = TestChar; + v8 = MultiByteToWideChar(CodePage, 8u, (LPCCH)&v10, 2, lpWideCharStr, 1); +LABEL_9: + if ( v8 ) + return 2; +LABEL_19: + *_errno() = 42; + return -1; + } + if ( !IsDBCSLeadByteEx(CodePage, TestChar) ) + { +LABEL_11: + if ( !CodePage ) + { + *lpWideCharStr = *lpMultiByteStr; + return 1; + } + if ( MultiByteToWideChar(CodePage, 8u, (LPCCH)lpMultiByteStr, 1, lpWideCharStr, 1) ) + return 1; + goto LABEL_19; + } + if ( a3 != 1 ) + { + v8 = MultiByteToWideChar(CodePage, 8u, (LPCCH)lpMultiByteStr, 2, lpWideCharStr, 1); + goto LABEL_9; + } + *(_BYTE *)a4 = *lpMultiByteStr; + return -2; +} + +//----- (0043FFE0) -------------------------------------------------------- +size_t __cdecl mbrtowc(wchar_t *DstCh, const char *SrcCh, size_t SizeInBytes, mbstate_t *State) +{ + wchar_t *v4; // ebx + mbstate_t *v5; // esi + unsigned int v7; // [esp+10h] [ebp-2Ch] + unsigned int v8; // [esp+14h] [ebp-28h] + WCHAR v9; // [esp+2Eh] [ebp-Eh] BYREF + + v4 = DstCh; + v5 = State; + v9 = 0; + if ( !DstCh ) + v4 = &v9; + v8 = ___mb_cur_max_func(); + v7 = ___lc_codepage_func(); + if ( !State ) + v5 = (mbstate_t *)&internal_mbstate_2; + return __mbrtowc_cp(v4, (BYTE *)SrcCh, SizeInBytes, (int *)v5, v7, v8); +} + +//----- (00440040) -------------------------------------------------------- +size_t __cdecl mbsrtowcs(wchar_t *Dest, const char **PSrc, size_t Count, mbstate_t *State) +{ + mbstate_t *v4; // eax + int v5; // eax + unsigned int v6; // esi + BYTE *v7; // eax + unsigned int v8; // edi + wchar_t *v9; // ebx + int i; // eax + BYTE *v11; // ecx + unsigned int v13; // ebx + size_t v14; // esi + int v15; // eax + unsigned int v16; // [esp+28h] [ebp-34h] + __int16 v17[15]; // [esp+3Eh] [ebp-1Eh] BYREF + mbstate_t *Statea; // [esp+6Ch] [ebp+10h] + + v4 = (mbstate_t *)&internal_mbstate_1; + if ( State ) + v4 = State; + Statea = v4; + v16 = ___lc_codepage_func(); + v5 = ___mb_cur_max_func(); + if ( !PSrc ) + return 0; + v6 = v5; + v7 = (BYTE *)*PSrc; + if ( !*PSrc ) + return 0; + if ( Dest ) + { + v8 = 0; + if ( Count ) + { + v9 = Dest; + for ( i = __mbrtowc_cp(Dest, v7, Count, (int *)Statea, v16, v6); + i > 0; + i = __mbrtowc_cp(v9, v11, Count - v8, (int *)Statea, v16, v6) ) + { + v8 += i; + ++v9; + v11 = (BYTE *)&(*PSrc)[i]; + *PSrc = (const char *)v11; + if ( Count <= v8 ) + return v8; + } + if ( Count > v8 && !i ) + *PSrc = 0; + } + return v8; + } + else + { + v13 = v6; + v17[0] = 0; + v14 = 0; + while ( 1 ) + { + v15 = __mbrtowc_cp((LPWSTR)v17, &v7[v14], v13, (int *)Statea, v16, v13); + if ( v15 <= 0 ) + break; + v14 += v15; + v7 = (BYTE *)*PSrc; + } + return v14; + } +} +// 440040: using guessed type WCHAR var_1E[15]; + +//----- (00440180) -------------------------------------------------------- +size_t __cdecl mbrlen(const char *Ch, size_t SizeInBytes, mbstate_t *State) +{ + mbstate_t *v3; // ebx + unsigned int v5; // [esp+10h] [ebp-2Ch] + unsigned int v6; // [esp+14h] [ebp-28h] + __int16 v7[7]; // [esp+2Eh] [ebp-Eh] BYREF + + v3 = State; + v7[0] = 0; + v6 = ___mb_cur_max_func(); + v5 = ___lc_codepage_func(); + if ( !State ) + v3 = (mbstate_t *)&bss_1; + return __mbrtowc_cp((LPWSTR)v7, (BYTE *)Ch, SizeInBytes, (int *)v3, v5, v6); +} +// 440180: using guessed type WCHAR var_E[7]; + +//----- (004401E0) -------------------------------------------------------- +int __cdecl __wcrtomb_cp(LPSTR lpMultiByteStr, __int16 a2, UINT CodePage, int cbMultiByte) +{ + int result; // eax + __int16 WideCharStr[8]; // [esp+2Ch] [ebp-20h] BYREF + BOOL UsedDefaultChar; // [esp+3Ch] [ebp-10h] BYREF + + WideCharStr[0] = a2; + if ( !CodePage ) + { + if ( (unsigned __int16)a2 <= 0xFFu ) + { + *lpMultiByteStr = a2; + return 1; + } +LABEL_7: + *_errno() = 42; + return -1; + } + UsedDefaultChar = 0; + result = WideCharToMultiByte(CodePage, 0, (LPCWCH)WideCharStr, 1, lpMultiByteStr, cbMultiByte, 0, &UsedDefaultChar); + if ( !result || UsedDefaultChar ) + goto LABEL_7; + return result; +} +// 4401E0: using guessed type WCHAR WideCharStr[8]; + +//----- (00440280) -------------------------------------------------------- +size_t __cdecl wcrtomb(char *Dest, wchar_t Source, mbstate_t *State) +{ + char *v3; // ebx + int v4; // edi + unsigned int v5; // eax + CHAR v7; // [esp+1Bh] [ebp-11h] BYREF + + v3 = Dest; + if ( !Dest ) + v3 = &v7; + v4 = ___mb_cur_max_func(); + v5 = ___lc_codepage_func(); + return __wcrtomb_cp(v3, Source, v5, v4); +} + +//----- (004402D0) -------------------------------------------------------- +size_t __cdecl wcsrtombs(char *Dest, const wchar_t **PSource, size_t Count, mbstate_t *State) +{ + size_t v4; // ebx + char *v5; // esi + int v6; // edi + const wchar_t *v7; // ebp + __int16 *v8; // ebx + int v9; // ebp + size_t v10; // edi + int v11; // eax + int v13; // ebp + __int16 *i; // edi + int v15; // eax + unsigned int v16; // [esp+1Ch] [ebp-30h] + char v18[33]; // [esp+2Bh] [ebp-21h] BYREF + + v4 = 0; + v5 = Dest; + v16 = ___lc_codepage_func(); + v6 = ___mb_cur_max_func(); + v7 = *PSource; + if ( !*PSource ) + return v4; + if ( !Dest ) + { + v13 = v6; + for ( i = (__int16 *)*PSource; ; ++i ) + { + v15 = __wcrtomb_cp(v18, *i, v16, v13); + if ( v15 <= 0 ) + break; + v4 += v15; + if ( !v18[v15 - 1] ) + return v4 - 1; + } + return -1; + } + if ( Count ) + { + v8 = (__int16 *)*PSource; + v9 = v6; + v10 = 0; + while ( 1 ) + { + v11 = __wcrtomb_cp(v5, *v8, v16, v9); + if ( v11 <= 0 ) + return -1; + v5 += v11; + v10 += v11; + if ( !*(v5 - 1) ) + { + *PSource = 0; + return v10 - 1; + } + ++v8; + if ( Count <= v10 ) + { + v7 = (const wchar_t *)v8; + v4 = v10; + break; + } + } + } + *PSource = v7; + return v4; +} +// 4402D0: using guessed type CHAR var_21[33]; + +//----- (004403F0) -------------------------------------------------------- +FILE *__cdecl __acrt_iob_func(unsigned int Ix) +{ + return &__iob[Ix]; +} + +//----- (00440400) -------------------------------------------------------- +_invalid_parameter_handler __cdecl _get_invalid_parameter_handler() +{ + return (_invalid_parameter_handler)handler; +} +// 1522E0C: using guessed type int handler; + +//----- (00440410) -------------------------------------------------------- +_invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler Handler) +{ + return (_invalid_parameter_handler)_InterlockedExchange(&handler, (__int32)Handler); +} +// 1522E0C: using guessed type int handler; + +//----- (00440420) -------------------------------------------------------- +int __cdecl mingw_rand_s(int a1) +{ + char v1; // dl + int result; // eax + + if ( !a1 ) + return 22; + if ( !pRtlGenRandom ) + return 22; + v1 = pRtlGenRandom(a1, 4); + result = 0; + if ( !v1 ) + return 22; + return result; +} +// 1522E10: using guessed type int (__stdcall *pRtlGenRandom)(_DWORD, _DWORD); + +//----- (00440470) -------------------------------------------------------- +int __cdecl init_rand_s(int a1) +{ + HMODULE ModuleHandleW; // eax + int (__cdecl *rand_s)(int); // eax + HMODULE LibraryW; // eax + + ModuleHandleW = GetModuleHandleW(&ModuleName); + rand_s = (int (__cdecl *)(int))GetProcAddress(ModuleHandleW, "rand_s"); + if ( !rand_s ) + { + LibraryW = LoadLibraryW(&LibFileName); + pRtlGenRandom = (int (__stdcall *)(_DWORD, _DWORD))GetProcAddress(LibraryW, "SystemFunction036"); + rand_s = mingw_rand_s; + } + _rand_s = rand_s; + return rand_s(a1); +} +// 50B164: using guessed type int (__cdecl *_rand_s)(int); +// 1522E10: using guessed type int (__stdcall *pRtlGenRandom)(_DWORD, _DWORD); + +//----- (004404F0) -------------------------------------------------------- +void __cdecl _lock_file(FILE *Stream) +{ + FILE *v1; // eax + + if ( Stream >= __acrt_iob_func(0) && Stream <= __acrt_iob_func(0x13u) ) + { + v1 = __acrt_iob_func(0); + _lock(Stream - v1 + 16); + Stream->_flag |= 0x8000u; + } + else + { + EnterCriticalSection((LPCRITICAL_SECTION)&Stream[1]); + } +} +// 4406D0: using guessed type int __cdecl _lock(_DWORD); + +//----- (00440560) -------------------------------------------------------- +void __cdecl _unlock_file(FILE *Stream) +{ + FILE *v1; // eax + + if ( Stream >= __acrt_iob_func(0) && Stream <= __acrt_iob_func(0x13u) ) + { + Stream->_flag &= ~0x8000u; + v1 = __acrt_iob_func(0); + _unlock((FILE *)(Stream - v1 + 16)); + } + else + { + LeaveCriticalSection((LPCRITICAL_SECTION)&Stream[1]); + } +} +// 4406C8: using guessed type void __cdecl _unlock(FILE *Stream); + +//----- (004405D0) -------------------------------------------------------- +int __cdecl ___mb_cur_max_func() +{ + return ___mb_cur_max; +} + +//----- (004405E0) -------------------------------------------------------- +int msvcrt___lc_codepage_func() +{ + return *(_DWORD *)msvcrt__lc_codepage; +} +// 1522E14: using guessed type int msvcrt__lc_codepage; + +//----- (004405F0) -------------------------------------------------------- +int setlocale_codepage_hack() +{ + char *v0; // eax + char *v1; // eax + int v2; // edx + + v0 = setlocale(2, 0); + v1 = strchr(v0, 46); + v2 = 0; + if ( v1 ) + return atoi(v1 + 1); + return v2; +} + +//----- (00440630) -------------------------------------------------------- +int init_codepage_func() +{ + HMODULE ModuleHandleW; // eax + HMODULE v1; // ebx + unsigned int (__cdecl *___lc_codepage_func)(); // eax + + ModuleHandleW = GetModuleHandleW(&off_5152CC); + if ( ModuleHandleW ) + { + v1 = ModuleHandleW; + ___lc_codepage_func = (unsigned int (__cdecl *)())GetProcAddress(ModuleHandleW, "___lc_codepage_func"); + if ( ___lc_codepage_func ) + { +LABEL_3: + *(_DWORD *)____lc_codepage_func = ___lc_codepage_func; + return ___lc_codepage_func(); + } + msvcrt__lc_codepage = (int)GetProcAddress(v1, "__lc_codepage"); + if ( msvcrt__lc_codepage ) + { + ___lc_codepage_func = (unsigned int (__cdecl *)())msvcrt___lc_codepage_func; + goto LABEL_3; + } + } + *(_DWORD *)____lc_codepage_func = setlocale_codepage_hack; + return setlocale_codepage_hack(); +} +// 1522E14: using guessed type int msvcrt__lc_codepage; + +//----- (004406F0) -------------------------------------------------------- +int __cdecl __mingwthr_key_dtor(int a1, int a2) +{ + if ( a2 ) + return ___w64_mingwthr_add_key_dtor(a1, a2); + else + return 0; +} + +//----- (00440710) -------------------------------------------------------- +int __cdecl _txnal_cow_string_D1() +{ + int v0; // eax + + v0 = MEMORY[0](); + return MEMORY[0](1, 0, v0 - 12); +} + +//----- (00440740) -------------------------------------------------------- +void __cdecl __noreturn _txnal_cow_string_c_str() +{ + JUMPOUT(0); +} +// 440744: control flows out of bounds to 0 + +//----- (00440750) -------------------------------------------------------- +void __cdecl __noreturn _txnal_sso_string_c_str() +{ + JUMPOUT(0); +} +// 440754: control flows out of bounds to 0 + +//----- (00440760) -------------------------------------------------------- +char *__cdecl _txnal_logic_error_get_msg(char *a1) +{ + return a1 + 4; +} + +//----- (00440770) -------------------------------------------------------- +void __cdecl _txnal_cow_string_D1_commit(volatile signed __int32 *Block) +{ + int v1; // eax + int v2[3]; // [esp+1Fh] [ebp-Dh] BYREF + + if ( !_CRT_MT ) + { + v1 = *((_DWORD *)Block + 2); + *((_DWORD *)Block + 2) = v1 - 1; + if ( v1 > 0 ) + return; +LABEL_5: + std::string::_Rep::_M_destroy((void *)Block, (int)v2); + return; + } + if ( _InterlockedExchangeAdd(Block + 2, 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; +// 440770: using guessed type int var_D[3]; + +//----- (004407C0) -------------------------------------------------------- +char *__cdecl _txnal_runtime_error_get_msg(char *a1) +{ + return a1 + 4; +} + +//----- (004407D0) -------------------------------------------------------- +void __cdecl _txnal_cow_string_C1_for_exceptions(struct _Unwind_Exception **a1) +{ + int v1; // eax + int v2; // ecx + int lpuexcpt; // [esp+14h] [ebp-48h] + struct _Unwind_Exception *lpuexcpta; // [esp+14h] [ebp-48h] + + lpuexcpt = 1; + while ( (unsigned __int8)MEMORY[0]() ) + ++lpuexcpt; + v1 = MEMORY[0](lpuexcpt + 12); + v2 = lpuexcpt; + *(_DWORD *)(v1 + 8) = 0; + v1 += 12; + *(_DWORD *)(v1 - 8) = lpuexcpt - 1; + *(_DWORD *)(v1 - 12) = lpuexcpt - 1; + lpuexcpta = (struct _Unwind_Exception *)v1; + MEMORY[0](v2); + *a1 = lpuexcpta; +} + +//----- (004408F0) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNKSt11logic_error4whatEv(int a1) +{ + JUMPOUT(0); +} +// 4408F7: control flows out of bounds to 0 + +//----- (00440910) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNKSt13runtime_error4whatEv(int a1) +{ + JUMPOUT(0); +} +// 440917: control flows out of bounds to 0 + +//----- (00440930) -------------------------------------------------------- +void __cdecl _ZGTtNSt11logic_errorC2EPKc(struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + _BYTE v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51A940; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + MEMORY[0](8); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::logic_error::~logic_error(v1); +} +// 4409C2: variable 'v1' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 440930: using guessed type int var_C[3]; + +//----- (00440A20) -------------------------------------------------------- +void __cdecl _ZGTtNSt11logic_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( + struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + _BYTE v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51A940; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + MEMORY[0](8); + MEMORY[0](); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::logic_error::~logic_error(v1); +} +// 440AB6: variable 'v1' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 440A20: using guessed type int var_C[3]; + +//----- (00440B10) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNSt11logic_errorD0Ev(int a1) +{ + int v1; // eax + + v1 = MEMORY[0](); + MEMORY[0](1, 0, v1 - 12); + JUMPOUT(0); +} +// 440B48: control flows out of bounds to 0 + +//----- (00440B50) -------------------------------------------------------- +int _ZGTtNSt11logic_errorD2Ev() +{ + int v0; // eax + + v0 = MEMORY[0](); + return MEMORY[0](1, 0, v0 - 12); +} + +//----- (00440B90) -------------------------------------------------------- +void __cdecl _ZGTtNSt11range_errorC2EPKc(struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51AB98; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51A954; + MEMORY[0](8); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::range_error::~range_error(v1); +} +// 440C29: variable 'v1' is possibly undefined +// 51A954: using guessed type void (__cdecl *off_51A954)(std::range_error *__hidden this); +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 440B90: using guessed type int var_C[3]; + +//----- (00440C90) -------------------------------------------------------- +void __cdecl _ZGTtNSt11range_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( + struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51AB98; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51A954; + MEMORY[0](8); + MEMORY[0](); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::range_error::~range_error(v1); +} +// 440D2D: variable 'v1' is possibly undefined +// 51A954: using guessed type void (__cdecl *off_51A954)(std::range_error *__hidden this); +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 440C90: using guessed type int var_C[3]; + +//----- (00440D90) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNSt11range_errorD0Ev(int a1) +{ + int v1; // eax + + v1 = MEMORY[0](); + MEMORY[0](1, 0, v1 - 12); + JUMPOUT(0); +} +// 440DC8: control flows out of bounds to 0 + +//----- (00440DD0) -------------------------------------------------------- +int _ZGTtNSt11range_errorD2Ev() +{ + int v0; // eax + + v0 = MEMORY[0](); + return MEMORY[0](1, 0, v0 - 12); +} + +//----- (00440E10) -------------------------------------------------------- +void __cdecl _ZGTtNSt12domain_errorC2EPKc(struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51A940; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51A9D8; + MEMORY[0](8); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::domain_error::~domain_error(v1); +} +// 440EA9: variable 'v1' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51A9D8: using guessed type void (__cdecl *off_51A9D8)(std::domain_error *__hidden this); +// 440E10: using guessed type int var_C[3]; + +//----- (00440F10) -------------------------------------------------------- +void __cdecl _ZGTtNSt12domain_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( + struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51A940; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51A9D8; + MEMORY[0](8); + MEMORY[0](); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::domain_error::~domain_error(v1); +} +// 440FAD: variable 'v1' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51A9D8: using guessed type void (__cdecl *off_51A9D8)(std::domain_error *__hidden this); +// 440F10: using guessed type int var_C[3]; + +//----- (00441010) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNSt12domain_errorD0Ev(int a1) +{ + int v1; // eax + + v1 = MEMORY[0](); + MEMORY[0](1, 0, v1 - 12); + JUMPOUT(0); +} +// 441048: control flows out of bounds to 0 + +//----- (00441050) -------------------------------------------------------- +int _ZGTtNSt12domain_errorD2Ev() +{ + int v0; // eax + + v0 = MEMORY[0](); + return MEMORY[0](1, 0, v0 - 12); +} + +//----- (00441090) -------------------------------------------------------- +void __cdecl _ZGTtNSt12length_errorC2EPKc(struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51A940; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51A9EC; + MEMORY[0](8); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::length_error::~length_error(v1); +} +// 441129: variable 'v1' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51A9EC: using guessed type void (__cdecl *off_51A9EC)(std::length_error *__hidden this); +// 441090: using guessed type int var_C[3]; + +//----- (00441190) -------------------------------------------------------- +void __cdecl _ZGTtNSt12length_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( + struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51A940; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51A9EC; + MEMORY[0](8); + MEMORY[0](); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::length_error::~length_error(v1); +} +// 44122D: variable 'v1' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51A9EC: using guessed type void (__cdecl *off_51A9EC)(std::length_error *__hidden this); +// 441190: using guessed type int var_C[3]; + +//----- (00441290) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNSt12length_errorD0Ev(int a1) +{ + int v1; // eax + + v1 = MEMORY[0](); + MEMORY[0](1, 0, v1 - 12); + JUMPOUT(0); +} +// 4412C8: control flows out of bounds to 0 + +//----- (004412D0) -------------------------------------------------------- +int _ZGTtNSt12length_errorD2Ev() +{ + int v0; // eax + + v0 = MEMORY[0](); + return MEMORY[0](1, 0, v0 - 12); +} + +//----- (00441310) -------------------------------------------------------- +void __cdecl _ZGTtNSt12out_of_rangeC2EPKc(struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51A940; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51AA00; + MEMORY[0](8); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::out_of_range::~out_of_range(v1); +} +// 4413A9: variable 'v1' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51AA00: using guessed type void (__cdecl *off_51AA00)(std::out_of_range *__hidden this); +// 441310: using guessed type int var_C[3]; + +//----- (00441410) -------------------------------------------------------- +void __cdecl _ZGTtNSt12out_of_rangeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( + struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51A940; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51AA00; + MEMORY[0](8); + MEMORY[0](); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::out_of_range::~out_of_range(v1); +} +// 4414AD: variable 'v1' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51AA00: using guessed type void (__cdecl *off_51AA00)(std::out_of_range *__hidden this); +// 441410: using guessed type int var_C[3]; + +//----- (00441510) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNSt12out_of_rangeD0Ev(int a1) +{ + int v1; // eax + + v1 = MEMORY[0](); + MEMORY[0](1, 0, v1 - 12); + JUMPOUT(0); +} +// 441548: control flows out of bounds to 0 + +//----- (00441550) -------------------------------------------------------- +int _ZGTtNSt12out_of_rangeD2Ev() +{ + int v0; // eax + + v0 = MEMORY[0](); + return MEMORY[0](1, 0, v0 - 12); +} + +//----- (00441590) -------------------------------------------------------- +void __cdecl _ZGTtNSt13runtime_errorC2EPKc(struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + _BYTE v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51AB98; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + MEMORY[0](8); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::runtime_error::~runtime_error(v1); +} +// 441622: variable 'v1' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 441590: using guessed type int var_C[3]; + +//----- (00441680) -------------------------------------------------------- +void __cdecl _ZGTtNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( + struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + _BYTE v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51AB98; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + MEMORY[0](8); + MEMORY[0](); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::runtime_error::~runtime_error(v1); +} +// 441716: variable 'v1' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 441680: using guessed type int var_C[3]; + +//----- (00441770) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNSt13runtime_errorD0Ev(int a1) +{ + int v1; // eax + + v1 = MEMORY[0](); + MEMORY[0](1, 0, v1 - 12); + JUMPOUT(0); +} +// 4417A8: control flows out of bounds to 0 + +//----- (004417B0) -------------------------------------------------------- +int _ZGTtNSt13runtime_errorD2Ev() +{ + int v0; // eax + + v0 = MEMORY[0](); + return MEMORY[0](1, 0, v0 - 12); +} + +//----- (004417F0) -------------------------------------------------------- +void __cdecl _ZGTtNSt14overflow_errorC2EPKc(struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51AB98; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51AD18; + MEMORY[0](8); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::overflow_error::~overflow_error(v1); +} +// 441889: variable 'v1' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 51AD18: using guessed type void (__cdecl *off_51AD18)(std::overflow_error *__hidden this); +// 4417F0: using guessed type int var_C[3]; + +//----- (004418F0) -------------------------------------------------------- +void __cdecl _ZGTtNSt14overflow_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( + struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51AB98; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51AD18; + MEMORY[0](8); + MEMORY[0](); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::overflow_error::~overflow_error(v1); +} +// 44198D: variable 'v1' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 51AD18: using guessed type void (__cdecl *off_51AD18)(std::overflow_error *__hidden this); +// 4418F0: using guessed type int var_C[3]; + +//----- (004419F0) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNSt14overflow_errorD0Ev(int a1) +{ + int v1; // eax + + v1 = MEMORY[0](); + MEMORY[0](1, 0, v1 - 12); + JUMPOUT(0); +} +// 441A28: control flows out of bounds to 0 + +//----- (00441A30) -------------------------------------------------------- +int _ZGTtNSt14overflow_errorD2Ev() +{ + int v0; // eax + + v0 = MEMORY[0](); + return MEMORY[0](1, 0, v0 - 12); +} + +//----- (00441A70) -------------------------------------------------------- +void __cdecl _ZGTtNSt15underflow_errorC2EPKc(struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51AB98; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51AF4C; + MEMORY[0](8); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::underflow_error::~underflow_error(v1); +} +// 441B09: variable 'v1' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 51AF4C: using guessed type void (__cdecl *off_51AF4C)(std::underflow_error *__hidden this); +// 441A70: using guessed type int var_C[3]; + +//----- (00441B70) -------------------------------------------------------- +void __cdecl _ZGTtNSt15underflow_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( + struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51AB98; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51AF4C; + MEMORY[0](8); + MEMORY[0](); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::underflow_error::~underflow_error(v1); +} +// 441C0D: variable 'v1' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 51AF4C: using guessed type void (__cdecl *off_51AF4C)(std::underflow_error *__hidden this); +// 441B70: using guessed type int var_C[3]; + +//----- (00441C70) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNSt15underflow_errorD0Ev(int a1) +{ + int v1; // eax + + v1 = MEMORY[0](); + MEMORY[0](1, 0, v1 - 12); + JUMPOUT(0); +} +// 441CA8: control flows out of bounds to 0 + +//----- (00441CB0) -------------------------------------------------------- +int _ZGTtNSt15underflow_errorD2Ev() +{ + int v0; // eax + + v0 = MEMORY[0](); + return MEMORY[0](1, 0, v0 - 12); +} + +//----- (00441CF0) -------------------------------------------------------- +void __cdecl _ZGTtNSt16invalid_argumentC2EPKc(struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51A940; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51AF80; + MEMORY[0](8); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::invalid_argument::~invalid_argument(v1); +} +// 441D89: variable 'v1' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51AF80: using guessed type void (__cdecl *off_51AF80)(std::invalid_argument *__hidden this); +// 441CF0: using guessed type int var_C[3]; + +//----- (00441DF0) -------------------------------------------------------- +void __cdecl _ZGTtNSt16invalid_argumentC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( + struct _Unwind_Exception **a1) +{ + std::exception *v1; // [esp+0h] [ebp-68h] + char v2[5]; // [esp+57h] [ebp-11h] BYREF + int v3[3]; // [esp+5Ch] [ebp-Ch] BYREF + + *(_DWORD *)&v2[1] = &off_51A940; + std::string::string(v3, (char *)byte_5147E0, (int)v2); + *(_DWORD *)&v2[1] = &off_51AF80; + MEMORY[0](8); + MEMORY[0](); + _txnal_cow_string_C1_for_exceptions(a1 + 1); + std::invalid_argument::~invalid_argument(v1); +} +// 441E8D: variable 'v1' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51AF80: using guessed type void (__cdecl *off_51AF80)(std::invalid_argument *__hidden this); +// 441DF0: using guessed type int var_C[3]; + +//----- (00441EF0) -------------------------------------------------------- +void __cdecl __noreturn _ZGTtNSt16invalid_argumentD0Ev(int a1) +{ + int v1; // eax + + v1 = MEMORY[0](); + MEMORY[0](1, 0, v1 - 12); + JUMPOUT(0); +} +// 441F28: control flows out of bounds to 0 + +//----- (00441F30) -------------------------------------------------------- +int _ZGTtNSt16invalid_argumentD2Ev() +{ + int v0; // eax + + v0 = MEMORY[0](); + return MEMORY[0](1, 0, v0 - 12); +} + +//----- (00441F70) -------------------------------------------------------- +int __usercall get_adjusted_ptr@(int a1@, int a2@, int **a3@) +{ + int result; // eax + int *v7; // [esp+1Ch] [ebp-10h] BYREF + + v7 = *a3; + if ( (*(unsigned __int8 (__fastcall **)(int))(*(_DWORD *)a2 + 8))(a2) ) + v7 = (int *)*v7; + result = (*(int (__thiscall **)(int, int, int **, int))(*(_DWORD *)a1 + 16))(a1, a2, &v7, 1); + if ( (_BYTE)result ) + *a3 = v7; + return result; +} + +//----- (00441FD0) -------------------------------------------------------- +char *__usercall parse_lsda_header@(int a1@, char *a2@, int a3@) +{ + int RegionStart; // eax + char v7; // dl + char *v8; // ebp + char v9; // al + char *v10; // esi + int v11; // edi + int v12; // ecx + char v13; // dl + int v14; // eax + char *v15; // edx + int v16; // edi + int v17; // ecx + char v18; // si + int v19; // eax + char *result; // eax + char v21; // di + char *v22; // eax + char *encoded_value_with_base; // ebp + char v24; // al + + RegionStart = 0; + if ( a1 ) + RegionStart = _Unwind_GetRegionStart(); + *(_DWORD *)a3 = RegionStart; + v7 = *a2; + v8 = a2 + 1; + if ( *a2 == -1 ) + { + *(_DWORD *)(a3 + 4) = RegionStart; + v9 = *v8; + v10 = a2 + 2; + *(_BYTE *)(a3 + 20) = *v8; + if ( v9 != -1 ) + goto LABEL_5; +LABEL_12: + *(_DWORD *)(a3 + 12) = 0; + goto LABEL_8; + } + v21 = *a2; + v22 = (char *)base_of_encoded_value(v7); + encoded_value_with_base = read_encoded_value_with_base(v21, v22, v8, (int *)(a3 + 4)); + v24 = *encoded_value_with_base; + v10 = encoded_value_with_base + 1; + *(_BYTE *)(a3 + 20) = *encoded_value_with_base; + if ( v24 == -1 ) + goto LABEL_12; +LABEL_5: + v11 = 0; + v12 = 0; + do + { + v13 = *v10++; + v14 = (v13 & 0x7F) << v12; + v12 += 7; + v11 |= v14; + } + while ( v13 < 0 ); + *(_DWORD *)(a3 + 12) = &v10[v11]; +LABEL_8: + v15 = v10 + 1; + v16 = 0; + v17 = 0; + *(_BYTE *)(a3 + 21) = *v10; + do + { + v18 = *v15++; + v19 = (v18 & 0x7F) << v17; + v17 += 7; + v16 |= v19; + } + while ( v18 < 0 ); + result = v15; + *(_DWORD *)(a3 + 16) = &v15[v16]; + return result; +} + +//----- (004420B0) -------------------------------------------------------- +int __usercall check_exception_spec@(int a1@, int a2@, int *a3@, int a4) +{ + char *v6; // ebx + int v7; // ebp + int v8; // ecx + char v9; // dl + int v10; // eax + char v11; // al + unsigned __int8 v12; // dl + int v13; // ecx + int result; // eax + int *v15; // [esp+1Ch] [ebp-30h] BYREF + int v16[8]; // [esp+2Ch] [ebp-20h] BYREF + + v15 = a3; + v6 = (char *)(*(_DWORD *)(a1 + 12) + ~a4); + while ( 1 ) + { + v7 = 0; + v8 = 0; + do + { + v9 = *v6++; + v10 = (v9 & 0x7F) << v8; + v8 += 7; + v7 |= v10; + } + while ( v9 < 0 ); + if ( !v7 ) + return 0; + v11 = *(_BYTE *)(a1 + 20); + if ( v11 == -1 ) + { + v13 = 0; + } + else + { + v12 = v11 & 7; + if ( (v11 & 7) == 2 ) + { + v13 = -2 * v7; + } + else + { + if ( v12 <= 2u ) + { + if ( v12 ) +LABEL_18: + abort(); + } + else if ( v12 != 3 ) + { + if ( v12 != 4 ) + goto LABEL_18; + v13 = -8 * v7; + goto LABEL_11; + } + v13 = -4 * v7; + } + } +LABEL_11: + read_encoded_value_with_base(v11, *(char **)(a1 + 8), (char *)(*(_DWORD *)(a1 + 12) + v13), v16); + result = get_adjusted_ptr(v16[0], a2, &v15); + if ( (_BYTE)result ) + return result; + } +} +// 4420B0: using guessed type int var_20[8]; + +//----- (00442190) -------------------------------------------------------- +int __usercall base_of_encoded_value@(char a1@) +{ + unsigned __int8 v1; // dl + + if ( a1 == -1 ) + return 0; + v1 = a1 & 0x70; + if ( (a1 & 0x70) == 48 ) + return _Unwind_GetDataRelBase(); + if ( v1 <= 0x30u ) + { + if ( v1 == 32 ) + return _Unwind_GetTextRelBase(); + if ( v1 > 0x20u || (a1 & 0x60) != 0 ) +LABEL_11: + abort(); + return 0; + } + if ( v1 != 64 ) + { + if ( v1 != 80 ) + goto LABEL_11; + return 0; + } + return _Unwind_GetRegionStart(); +} + +//----- (00442210) -------------------------------------------------------- +void __cdecl __gxx_exception_cleanup(_Unwind_Reason_Code a1, void (**a2)(void)) +{ + void (*v2)(void); // edx + + if ( (unsigned int)a1 > _URC_FOREIGN_EXCEPTION_CAUGHT ) + __cxxabiv1::__terminate(*(a2 - 9)); + if ( !_InterlockedSub((volatile signed __int32 *)a2 - 16, 1u) ) + { + v2 = *(a2 - 11); + if ( v2 ) + v2(); + __cxa_free_exception(a2 + 8); + } +} + +//----- (00442260) -------------------------------------------------------- +char *__usercall read_encoded_value_with_base@(char a1@, char *a2@, char *a3@, int *a4) +{ + char *v4; // esi + int v6; // edx + char *result; // eax + unsigned int v8; // eax + int v9; // edx + int v10; // ecx + int v11; // ebp + char v12; // dl + int v13; // edi + unsigned int v14; // ecx + int v15; // ebp + char v16; // dl + int v17; // edi + char v18; // di + + v4 = a3; + if ( a1 == 80 ) + { + v8 = (unsigned int)(a3 + 3) & 0xFFFFFFFC; + v9 = *(_DWORD *)v8; + result = (char *)(v8 + 4); + *a4 = v9; + } + else + { + switch ( a1 & 0xF ) + { + case 0: + case 3: + case 0xB: + v6 = *(_DWORD *)a3; + result = a3 + 4; + goto LABEL_4; + case 1: + result = a3; + v10 = 0; + v11 = 0; + do + { + v12 = *result++; + v13 = (v12 & 0x7F) << v10; + v10 += 7; + v11 |= v13; + } + while ( v12 < 0 ); + v6 = v11; + goto LABEL_4; + case 2: + v6 = *(unsigned __int16 *)a3; + result = a3 + 2; + goto LABEL_4; + case 4: + case 0xC: + v6 = *(_DWORD *)a3; + result = a3 + 8; + goto LABEL_4; + case 9: + result = a3; + v14 = 0; + v15 = 0; + do + { + v16 = *result++; + v17 = (v16 & 0x7F) << v14; + v14 += 7; + v15 |= v17; + } + while ( v16 < 0 ); + v18 = v16; + v6 = v15; + if ( v14 > 0x1F || (v18 & 0x40) == 0 ) + goto LABEL_4; + v6 = (-1 << v14) | v15; + goto LABEL_5; + case 0xA: + v6 = *(__int16 *)a3; + result = a3 + 2; +LABEL_4: + if ( !v6 ) + goto LABEL_8; +LABEL_5: + if ( (a1 & 0x70) != 16 ) + v4 = a2; + v6 += (int)v4; + if ( a1 < 0 ) + *a4 = *(_DWORD *)v6; + else +LABEL_8: + *a4 = v6; + break; + default: + abort(); + } + } + return result; +} + +//----- (004423B0) -------------------------------------------------------- +void __cdecl __noreturn __cxxabiv1::__terminate(void (*a1)(void)) +{ + a1(); + abort(); +} + +//----- (00442460) -------------------------------------------------------- +void __cdecl __noreturn __cxxabiv1::__unexpected(void (*a1)(void)) +{ + a1(); + std::terminate(); +} + +//----- (00442470) -------------------------------------------------------- +void __fastcall __cxxabiv1::__forced_unwind::~__forced_unwind(void *Block) +{ + operator delete(Block); +} + +//----- (004424A0) -------------------------------------------------------- +void __fastcall __cxxabiv1::__class_type_info::~__class_type_info(_DWORD *a1) +{ + std::type_info *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_519934; + std::type_info::~type_info(Block); + operator delete(a1); +} +// 4424AC: variable 'Block' is possibly undefined +// 519934: using guessed type void (__cdecl *off_519934)(__cxxabiv1::__class_type_info *__hidden this); + +//----- (004424D0) -------------------------------------------------------- +void __cdecl __cxxabiv1::__class_type_info::~__class_type_info(__cxxabiv1::__class_type_info *this) +{ + _DWORD *v1; // ecx + + *v1 = &off_519934; + std::type_info::~type_info(this); +} +// 4424D0: variable 'v1' is possibly undefined +// 519934: using guessed type void (__cdecl *off_519934)(__cxxabiv1::__class_type_info *__hidden this); + +//----- (004424E0) -------------------------------------------------------- +void __fastcall __cxxabiv1::__foreign_exception::~__foreign_exception(void *Block) +{ + operator delete(Block); +} + +//----- (00442510) -------------------------------------------------------- +void __fastcall __cxxabiv1::__si_class_type_info::~__si_class_type_info(_DWORD *a1) +{ + __cxxabiv1::__class_type_info *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_519974; + __cxxabiv1::__class_type_info::~__class_type_info(Block); + operator delete(a1); +} +// 44251C: variable 'Block' is possibly undefined +// 519974: using guessed type void (__cdecl *off_519974)(__cxxabiv1::__si_class_type_info *__hidden this); + +//----- (00442540) -------------------------------------------------------- +void __cdecl __cxxabiv1::__si_class_type_info::~__si_class_type_info(__cxxabiv1::__si_class_type_info *this) +{ + _DWORD *v1; // ecx + + *v1 = &off_519974; + __cxxabiv1::__class_type_info::~__class_type_info(this); +} +// 442540: variable 'v1' is possibly undefined +// 519974: using guessed type void (__cdecl *off_519974)(__cxxabiv1::__si_class_type_info *__hidden this); + +//----- (00442550) -------------------------------------------------------- +void __fastcall __cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info(_DWORD *a1) +{ + __cxxabiv1::__class_type_info *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_5199A0; + __cxxabiv1::__class_type_info::~__class_type_info(Block); + operator delete(a1); +} +// 44255C: variable 'Block' is possibly undefined +// 5199A0: using guessed type void (__cdecl *off_5199A0)(__cxxabiv1::__vmi_class_type_info *__hidden this); + +//----- (00442580) -------------------------------------------------------- +void __cdecl __cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info(__cxxabiv1::__vmi_class_type_info *this) +{ + _DWORD *v1; // ecx + + *v1 = &off_5199A0; + __cxxabiv1::__class_type_info::~__class_type_info(this); +} +// 442580: variable 'v1' is possibly undefined +// 5199A0: using guessed type void (__cdecl *off_5199A0)(__cxxabiv1::__vmi_class_type_info *__hidden this); + +//----- (00442590) -------------------------------------------------------- +_DWORD *__cdecl `anonymous namespace'::get_locale_mutex() +{ + if ( !(_BYTE)`guard variable for'`anonymous namespace'::get_locale_mutex(void)::locale_mutex + && __cxa_guard_acquire(&`guard variable for'`anonymous namespace'::get_locale_mutex(void)::locale_mutex) ) + { + if ( _CRT_MT ) + __gthr_win32_mutex_init_function(`anonymous namespace'::get_locale_mutex(void)::locale_mutex); + __cxa_guard_release(&`guard variable for'`anonymous namespace'::get_locale_mutex(void)::locale_mutex); + atexit(__tcf_0_2); + } + return `anonymous namespace'::get_locale_mutex(void)::locale_mutex; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50CBC0: using guessed type _DWORD `anonymous namespace'::get_locale_mutex(void)::locale_mutex[2]; + +//----- (00442660) -------------------------------------------------------- +void __fastcall `anonymous namespace'::io_error_category::~io_error_category(_DWORD *a1) +{ + std::_V2::error_category *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_5199CC; + std::_V2::error_category::~error_category(Block); + operator delete(a1); +} +// 44266C: variable 'Block' is possibly undefined +// 5199CC: using guessed type void (__cdecl *off_5199CC)(_anonymous_namespace_::io_error_category *__hidden this); + +//----- (00442680) -------------------------------------------------------- +void __cdecl `anonymous namespace'::io_error_category::~io_error_category( + _anonymous_namespace_::io_error_category *this) +{ + _DWORD *v1; // ecx + + *v1 = &off_5199CC; + std::_V2::error_category::~error_category(this); +} +// 442680: variable 'v1' is possibly undefined +// 5199CC: using guessed type void (__cdecl *off_5199CC)(_anonymous_namespace_::io_error_category *__hidden this); + +//----- (00442690) -------------------------------------------------------- +void __fastcall `anonymous namespace'::system_error_category::~system_error_category(void *Block) +{ + operator delete(Block); +} + +//----- (004426B0) -------------------------------------------------------- +void __fastcall `anonymous namespace'::generic_error_category::~generic_error_category(void *Block) +{ + operator delete(Block); +} + +//----- (004426D0) -------------------------------------------------------- +void __usercall `anonymous namespace'::pool::free(int a1@) +{ + int v1; // esi + int *v2; // eax + _DWORD *v3; // edi + int v4; // ecx + int *v5; // ebx + int *v6; // edx + int *v7; // ebp + int v8; // edx + int v9; // eax + _DWORD *exception; // eax + int v12; // [esp+18h] [ebp-54h] + + v1 = _CRT_MT; + if ( _CRT_MT ) + { + if ( __gthr_win32_mutex_lock((int)`anonymous namespace'::emergency_pool) ) + __gnu_cxx::__throw_concurrence_lock_error(); + v1 = _CRT_MT; + } + v2 = (int *)dword_50B410; + v3 = (_DWORD *)(a1 - 16); + if ( !dword_50B410 + || (v4 = *(_DWORD *)(a1 - 16), v5 = (_DWORD *)((char *)v3 + v4), v12 = v4, dword_50B410 > (unsigned int)v3 + v4) ) + { + *(_DWORD *)(a1 - 12) = dword_50B410; + dword_50B410 = a1 - 16; + goto LABEL_18; + } + v6 = *(int **)(dword_50B410 + 4); + if ( (_DWORD *)dword_50B410 == (_DWORD *)((char *)v3 + v4) ) + { + *(_DWORD *)(a1 - 16) = *(_DWORD *)dword_50B410 + v4; + *(_DWORD *)(a1 - 12) = v6; + dword_50B410 = a1 - 16; +LABEL_18: + if ( !v1 ) + return; + goto LABEL_15; + } + v7 = &dword_50B410; + if ( v6 ) + { + while ( 1 ) + { + if ( v5 >= v6 ) + { + if ( v5 == v6 ) + { + v12 = *v5 + v4; + v2[1] = v5[1]; + } + v2 = (int *)*v7; + goto LABEL_13; + } + v7 = v2 + 1; + if ( !v6[1] ) + break; + v2 = v6; + v6 = (int *)v6[1]; + } + v2 = (int *)v2[1]; + v8 = *v2; + if ( v3 != (int *)((char *)v2 + *v2) ) + goto LABEL_14; + goto LABEL_22; + } +LABEL_13: + v8 = *v2; + if ( v3 == (int *)((char *)v2 + *v2) ) + { +LABEL_22: + *v2 = v12 + v8; + goto LABEL_18; + } +LABEL_14: + *(_DWORD *)(a1 - 12) = v2[1]; + v9 = *v7; + *(_DWORD *)(a1 - 16) = v12; + *(_DWORD *)(v9 + 4) = v3; + if ( !v1 ) + return; +LABEL_15: + if ( __gthr_win32_mutex_unlock((int)`anonymous namespace'::emergency_pool) ) + { + exception = __cxa_allocate_exception(4u); + *exception = &off_519D0C; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'__gnu_cxx::__concurrence_unlock_error, + (void (__cdecl *)(void *))__gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error); + } +} +// 50B0F0: using guessed type int _CRT_MT; +// 50B408: using guessed type _DWORD `anonymous namespace'::emergency_pool[2]; +// 50B410: using guessed type int dword_50B410; +// 515CD4: using guessed type int *`typeinfo for'__gnu_cxx::__concurrence_unlock_error; +// 519D0C: using guessed type void (__cdecl *off_519D0C)(__gnu_cxx::__concurrence_unlock_error *__hidden this); + +//----- (004428A0) -------------------------------------------------------- +void __usercall `anonymous namespace'::pool::allocate(int a1@) +{ + unsigned int v1; // eax + unsigned int v2; // eax + int *v3; // ebx + unsigned int v4; // ecx + unsigned int *v5; // edx + unsigned int *v6; // esi + unsigned int v7; // esi + unsigned int *v8; // ecx + unsigned int v9; // eax + _DWORD *exception; // eax + unsigned int *v12; // [esp+18h] [ebp-44h] + + if ( _CRT_MT ) + { + if ( __gthr_win32_mutex_lock((int)`anonymous namespace'::emergency_pool) ) + __gnu_cxx::__throw_concurrence_lock_error(); + v9 = a1 + 16; + v12 = (unsigned int *)dword_50B410; + if ( v9 < 8 ) + v9 = 8; + v2 = (v9 + 15) & 0xFFFFFFF0; + if ( !dword_50B410 ) + { +LABEL_10: + if ( _CRT_MT ) + { + if ( __gthr_win32_mutex_unlock((int)`anonymous namespace'::emergency_pool) ) + { + exception = __cxa_allocate_exception(4u); + *exception = &off_519D0C; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'__gnu_cxx::__concurrence_unlock_error, + (void (__cdecl *)(void *))__gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error); + } + } + return; + } +LABEL_5: + v3 = &dword_50B410; + while ( 1 ) + { + v4 = *v12; + v5 = v12; + v6 = (unsigned int *)v12[1]; + v12 = v6; + if ( v4 >= v2 ) + break; + v3 = (int *)(v5 + 1); + if ( !v6 ) + goto LABEL_10; + } + v7 = v4 - v2; + if ( v4 - v2 > 7 ) + { + v8 = (unsigned int *)((char *)v5 + v2); + *v8 = v7; + v8[1] = (unsigned int)v12; + *(_DWORD *)*v3 = v2; + *v3 = (int)v5 + v2; + } + else + { + *v5 = v4; + *v3 = (int)v12; + } + goto LABEL_10; + } + v1 = a1 + 16; + v12 = (unsigned int *)dword_50B410; + if ( v1 < 8 ) + v1 = 8; + v2 = (v1 + 15) & 0xFFFFFFF0; + if ( dword_50B410 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50B408: using guessed type _DWORD `anonymous namespace'::emergency_pool[2]; +// 50B410: using guessed type int dword_50B410; +// 515CD4: using guessed type int *`typeinfo for'__gnu_cxx::__concurrence_unlock_error; +// 519D0C: using guessed type void (__cdecl *off_519D0C)(__gnu_cxx::__concurrence_unlock_error *__hidden this); + +//----- (00442A50) -------------------------------------------------------- +HANDLE `anonymous namespace'::init() +{ + HANDLE result; // eax + + result = (HANDLE)_CRT_MT; + if ( _CRT_MT ) + result = __gthr_win32_recursive_mutex_init_function(`anonymous namespace'::fake_mutex); + `anonymous namespace'::static_mutex = (int)`anonymous namespace'::fake_mutex; + return result; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50B2F0: using guessed type _DWORD `anonymous namespace'::fake_mutex[4]; +// 50BFC0: using guessed type int `anonymous namespace'::static_mutex; + +//----- (00442A90) -------------------------------------------------------- +#error "442B92: call analysis failed (funcsize=68)" + +//----- (00442B98) -------------------------------------------------------- +#error "442C9A: call analysis failed (funcsize=68)" + +//----- (00442CA0) -------------------------------------------------------- +void __thiscall zcc::shared_ptr::shared_ptr(_DWORD *this, int a2) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // edx + volatile signed __int32 *v5; // [esp+5Ch] [ebp-Ch] BYREF + + v5 = 0; + *this = 0; + this[1] = 0; + v2 = operator new(0x10u); + v2[1] = 1; + v2[2] = 1; + v2[3] = a2; + *v2 = &off_51AD64; + *this = a2; + v3 = (volatile signed __int32 *)this[1]; + this[1] = v2; + v5 = v3; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v5); +} +// 51AD64: using guessed type int (*off_51AD64)(); + +//----- (00442DA0) -------------------------------------------------------- +void __thiscall zcc::shared_ptr::shared_ptr(_DWORD *this, int a2) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // edx + volatile signed __int32 *v5; // [esp+5Ch] [ebp-Ch] BYREF + + v5 = 0; + *this = 0; + this[1] = 0; + v2 = operator new(0x10u); + v2[1] = 1; + v2[2] = 1; + v2[3] = a2; + *v2 = &off_51AD64; + *this = a2; + v3 = (volatile signed __int32 *)this[1]; + this[1] = v2; + v5 = v3; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v5); +} +// 51AD64: using guessed type int (*off_51AD64)(); + +//----- (00442EA0) -------------------------------------------------------- +void __thiscall zcc::shared_ptr::shared_ptr(_DWORD *this, int a2) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // edx + volatile signed __int32 *v5; // [esp+5Ch] [ebp-Ch] BYREF + + v5 = 0; + *this = 0; + this[1] = 0; + v2 = operator new(0x10u); + v2[1] = 1; + v2[2] = 1; + v2[3] = a2; + *v2 = &off_51AD80; + *this = a2; + v3 = (volatile signed __int32 *)this[1]; + this[1] = v2; + v5 = v3; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v5); +} +// 51AD80: using guessed type int (*off_51AD80)(); + +//----- (00442FA0) -------------------------------------------------------- +#error "4430A2: call analysis failed (funcsize=68)" + +//----- (004430A8) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::NonTerminal::~NonTerminal(void *a1) +{ + operator delete(a1); +} + +//----- (004430BC) -------------------------------------------------------- +char __stdcall WXSS::CSSTreeLib::MarkHostRule::MarkGood( + WXSS::CSSTreeLib::MarkHostRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a2) +{ + int **v2; // edx + int v3; // eax + struct _Unwind_Exception *v4; // edx + const char *Literal; // eax + _DWORD *v6; // eax + char *v7; // eax + unsigned int **v8; // eax + unsigned int v10; // [esp+10h] [ebp-A8h] + int **v11; // [esp+14h] [ebp-A4h] + int v12; // [esp+14h] [ebp-A4h] + struct _Unwind_Exception **v13; // [esp+14h] [ebp-A4h] + int *lpuexcpt; // [esp+18h] [ebp-A0h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-A0h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-A0h] + struct _Unwind_Exception *lpuexcptc; // [esp+18h] [ebp-A0h] + char v18[5]; // [esp+57h] [ebp-61h] BYREF + volatile signed __int32 *v19; // [esp+5Ch] [ebp-5Ch] BYREF + int v20; // [esp+60h] [ebp-58h] BYREF + volatile signed __int32 *v21; // [esp+64h] [ebp-54h] BYREF + void *v22[6]; // [esp+68h] [ebp-50h] BYREF + void *v23[6]; // [esp+80h] [ebp-38h] BYREF + void *v24; // [esp+98h] [ebp-20h] BYREF + volatile signed __int32 *v25; // [esp+9Ch] [ebp-1Ch] BYREF + + for ( lpuexcpt = (int *)*((_DWORD *)this + 30); *((int **)this + 31) != lpuexcpt; lpuexcpt += 2 ) + { + if ( std::operator==(*lpuexcpt, "SELECTORS") ) + { + v2 = *(int ***)(*lpuexcpt + 120); + v11 = v2; + if ( *(_DWORD *)(*lpuexcpt + 124) - (_DWORD)v2 == 8 ) + { + v3 = **v2; + if ( *(_BYTE *)v3 == 70 && !strcmp((const char *)(v3 + 1), "_SELECTOR") ) + { + std::__shared_ptr::__shared_ptr(&v18[1], v11); + v4 = *(struct _Unwind_Exception **)(*(_DWORD *)&v18[1] + 120); + lpuexcpta = v4; + v10 = *(_DWORD *)(*(_DWORD *)&v18[1] + 124) - (_DWORD)v4; + if ( v10 > 8 ) + { + v12 = *((_DWORD *)v4 + 2); + if ( !strcmp(*(const char **)v12, "$NAME") ) + { + Literal = WXSS::Token::GetLiteral((_DWORD *)(v12 + 24)); + if ( !strncmp(Literal, "host", 4u) ) + { + *((_DWORD *)this + 43) = 1; + if ( v10 == 40 ) + { + lpuexcptb = (struct _Unwind_Exception *)*((_DWORD *)lpuexcpta + 6); + if ( !strcmp(*(const char **)lpuexcptb, "SELECTOR") ) + { + v13 = (struct _Unwind_Exception **)*((_DWORD *)lpuexcptb + 30); + if ( *((struct _Unwind_Exception ***)lpuexcptb + 31) != v13 ) + { + lpuexcptc = *v13; + if ( !strcmp(*(const char **)*v13, "$NAME") + && *WXSS::Token::GetLiteral((_DWORD *)lpuexcptc + 6) == 46 ) + { + *((_DWORD *)this + 43) = 2; + std::__shared_ptr::__shared_ptr( + &v20, + v13); + if ( !*(_DWORD *)(v20 + 132) ) + { + v6 = operator new(0x18u); + v6[1] = 0; + *v6 = v6 + 2; + *((_BYTE *)v6 + 8) = 0; + zcc::shared_ptr::shared_ptr(v6); + std::__shared_ptr::operator=( + (volatile signed __int32 **)(v20 + 132), + (volatile signed __int32 **)&v24); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v25); + } + v7 = (char *)WXSS::Token::GetLiteral((_DWORD *)(v20 + 24)); + std::string::basic_string(v22, v7, (int)v18); + std::string::substr(v23, v22, 1u, 0xFFFFFFFF); + v8 = std::string::insert((unsigned int **)v23, 0, ".%%HERESUFFIX%%"); + std::string::basic_string(&v24, v8); + std::string::operator=(*(_DWORD **)(v20 + 132), &v24); + std::string::_M_dispose(&v24); + std::string::_M_dispose(v23); + std::string::_M_dispose(v22); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v21); + } + } + } + } + } + } + } + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v19); + return 1; + } + } + } + } + return 1; +} + +//----- (00443448) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::MarkHostRule::~MarkHostRule(void *a1) +{ + operator delete(a1); +} + +//----- (0044345C) -------------------------------------------------------- +bool __stdcall WXSS::CSSTreeLib::AttrDebugRule::MarkGood( + WXSS::CSSTreeLib::AttrDebugRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a2) +{ + int v2; // edx + char *Literal; // eax + std::ostream::sentry *v4; // eax + char *v5; // eax + std::ostream::sentry *v6; // eax + unsigned int **v7; // edx + int v9; // [esp+1Ch] [ebp-13Ch] + void *Block; // [esp+20h] [ebp-138h] + bool v11; // [esp+26h] [ebp-132h] + bool v12; // [esp+27h] [ebp-131h] + bool v13; // [esp+27h] [ebp-131h] + struct _Unwind_Exception *lpuexcpta; // [esp+28h] [ebp-130h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-130h] + struct _Unwind_Exception *lpuexcptb; // [esp+28h] [ebp-130h] + struct _Unwind_Exception *lpuexcptc; // [esp+28h] [ebp-130h] + unsigned int **v18; // [esp+60h] [ebp-F8h] BYREF + volatile signed __int32 *v19; // [esp+64h] [ebp-F4h] BYREF + volatile signed __int32 *v20; // [esp+68h] [ebp-F0h] BYREF + volatile signed __int32 *v21; // [esp+6Ch] [ebp-ECh] BYREF + volatile signed __int32 *v22; // [esp+70h] [ebp-E8h] BYREF + volatile signed __int32 *v23; // [esp+74h] [ebp-E4h] BYREF + volatile signed __int32 *v24; // [esp+78h] [ebp-E0h] BYREF + volatile signed __int32 *v25; // [esp+7Ch] [ebp-DCh] BYREF + char v26[8]; // [esp+80h] [ebp-D8h] BYREF + char v27[4]; // [esp+88h] [ebp-D0h] BYREF + char v28[204]; // [esp+8Ch] [ebp-CCh] BYREF + + v9 = *((_DWORD *)this + 42); + lpuexcpta = (struct _Unwind_Exception *)operator new(0xB0u); + WXSS::CSSTreeLib::CSSSyntaxTree::CSSSyntaxTree((int)lpuexcpta); + zcc::shared_ptr::shared_ptr(lpuexcpta); + std::basic_stringstream,std::allocator>::basic_stringstream((int)v26); + v20 = 0; + v21 = 0; + v22 = 0; + v23 = 0; + lpuexcpt = 0; + v11 = 0; + v12 = 0; + while ( 1 ) + { + v2 = *((_DWORD *)this + 30); + if ( (*((_DWORD *)this + 31) - v2) >> 3 <= (unsigned int)lpuexcpt ) + break; + if ( !v12 ) + { + v12 = std::operator==(*(_DWORD *)(v2 + 8 * (_DWORD)lpuexcpt), "$NAME"); + if ( v12 ) + std::__shared_ptr::operator=( + &v20, + (volatile signed __int32 **)(*((_DWORD *)this + 30) + 8 * (_DWORD)lpuexcpt)); + } + if ( !v11 ) + { + v11 = std::operator==(*(_DWORD *)(*((_DWORD *)this + 30) + 8 * (_DWORD)lpuexcpt), "$ESV"); + if ( v11 ) + std::__shared_ptr::operator=( + &v22, + (volatile signed __int32 **)(*((_DWORD *)this + 30) + 8 * (_DWORD)lpuexcpt)); + } + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + } + v13 = v11 && v12; + if ( v13 ) + { + lpuexcptb = std::operator<<>((std::ostream::sentry *)v27, ";wxcs_style_"); + Literal = (char *)WXSS::Token::GetLiteral((_DWORD *)v20 + 6); + v4 = std::operator<<>(lpuexcptb, Literal); + lpuexcptc = std::operator<<>(v4, " : "); + v5 = (char *)WXSS::Token::GetLiteral((_DWORD *)v22 + 6); + v6 = std::operator<<>(lpuexcptc, v5); + std::operator<<>(v6, ";"); + std::string::operator=(v18, "FAKE_ATTR"); + Block = operator new(0x18u); + std::stringbuf::str((int)Block, (int)v28); + zcc::shared_ptr::shared_ptr(Block); + std::__shared_ptr::operator=((volatile signed __int32 **)v18 + 7, &v24); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v25); + v7 = v18; + v18[6] = (unsigned int *)3; + v7[41] = (unsigned int *)(v9 + 1); + v7[42] = (unsigned int *)(v9 + 2); + std::vector>::push_back((void **)this + 30, &v18); + *((_BYTE *)this + 116) = 1; + } + else + { + *((_BYTE *)this + 116) = 0; + } + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v23); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v21); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v26); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v19); + return v13; +} +// 44345C: using guessed type char var_D0[4]; +// 44345C: using guessed type char var_CC[204]; + +//----- (00443848) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::AttrDebugRule::~AttrDebugRule(void *a1) +{ + operator delete(a1); +} + +//----- (0044385C) -------------------------------------------------------- +char __userpurge WXSS::CSSTreeLib::BlackListRule::MarkGood@( + int a1@, + WXSS::CSSTreeLib::BlackListRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a3) +{ + unsigned int v4; // ebx + const char *Literal; // edx + int v6; // ecx + int v7; // eax + const char *v9; // [esp+1Ch] [ebp-1Ch] + + v4 = 0; + Literal = WXSS::Token::GetLiteral((_DWORD *)this + 6); + while ( 1 ) + { + v6 = *(_DWORD *)(a1 + 4); + if ( -1431655765 * ((*(_DWORD *)(a1 + 8) - v6) >> 3) <= v4 ) + break; + v9 = Literal; + v7 = __stricmp(*(const char **)(v6 + 24 * v4), Literal); + Literal = v9; + if ( !v7 ) + { + *((_BYTE *)this + 116) = 0; + return v7; + } + ++v4; + } + LOBYTE(v7) = *((_BYTE *)this + 116); + return v7; +} + +//----- (004438C0) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::BlackListRule::~BlackListRule(void *a1) +{ + WXSS::CSSTreeLib::BlackListRule::~BlackListRule((int)a1); + operator delete(a1); +} + +//----- (004438DC) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::BlackListRule::~BlackListRule(int a1) +{ + *(_DWORD *)a1 = &off_519A88; + std::vector::~vector((void ***)(a1 + 4)); +} +// 519A88: using guessed type void (__cdecl *off_519A88)(WXSS::CSSTreeLib::BlackListRule *__hidden this); + +//----- (004438EC) -------------------------------------------------------- +void __thiscall WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode(int this, WXSS::Token *a2, unsigned __int8 a3) +{ + unsigned int v4; // esi + char *Literal; // eax + int v6; // edx + int v7; // ecx + + if ( *(_BYTE *)(this + 116) ) + { + v4 = *(_DWORD *)(this + 172); + if ( !v4 ) + { + if ( *(_DWORD *)(this + 132) && a3 ) + { + std::string::operator+=(a2, *(_DWORD *)(this + 132)); + } + else + { + Literal = (char *)WXSS::Token::GetLiteral((_DWORD *)(this + 24)); + std::string::operator+=(a2, Literal); + } + while ( 1 ) + { + v7 = *(_DWORD *)(this + 120); + if ( (*(_DWORD *)(this + 124) - v7) >> 3 <= v4 ) + break; + v6 = 8 * v4; + if ( v4 + && *(_DWORD *)(*(_DWORD *)(v7 + 8 * v4) + 164) > *(_DWORD *)(*(_DWORD *)(v7 + 8 * v4 - 8) + 168) + && *(_BYTE *)(*(_DWORD *)a2 + *((_DWORD *)a2 + 1) - 1) != 10 ) + { + std::string::operator+=(a2, " "); + v6 = 8 * v4; + } + ++v4; + WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode(*(_DWORD *)(*(_DWORD *)(this + 120) + v6), a2, a3); + } + if ( std::operator==(this, "MEDIA_RULE") + || std::operator==(this, "RULE") + || std::operator==(this, "DIRECTIVE") ) + { + std::string::operator+=(a2, "\n"); + } + } + } +} + +//----- (00443A14) -------------------------------------------------------- +void __thiscall WXSS::CSSTreeLib::CSSSyntaxTree::GetHostRule(int this, WXSS::Token *a2) +{ + int v2; // eax + int v3; // edx + unsigned int **v4; // eax + _DWORD *v5; // eax + int v6; // edx + bool v7; // zf + int v8; // eax + unsigned int **v9; // eax + _DWORD *v10; // eax + int v11; // edx + unsigned int v12; // [esp+14h] [ebp-A4h] + void *v14[6]; // [esp+50h] [ebp-68h] BYREF + void *v15[6]; // [esp+68h] [ebp-50h] BYREF + void *v16[6]; // [esp+80h] [ebp-38h] BYREF + void *v17[8]; // [esp+98h] [ebp-20h] BYREF + + v12 = 0; + v2 = *(_DWORD *)(this + 172); + if ( v2 == 1 ) + { + while ( 1 ) + { + v3 = *(_DWORD *)(this + 120); + if ( (*(_DWORD *)(this + 124) - v3) >> 3 <= v12 ) + break; + if ( std::operator==(*(_DWORD *)(v3 + 8 * v12), "SELECTORS") ) + { + std::string::substr(v14, *(_DWORD **)(this + 148), 2u, *(_DWORD *)(*(_DWORD *)(this + 148) + 4) - 7); + WXML::Rewrite::ToStringCode2((int)v15, (int *)v14); + v4 = std::string::insert((unsigned int **)v15, 0, "[is=\""); + std::string::basic_string(v16, v4); + v5 = std::string::append(v16, "\"]"); + std::string::basic_string(v17, v5); + std::string::operator+=(a2, (int)v17); + std::string::_M_dispose(v17); + std::string::_M_dispose(v16); + std::string::_M_dispose(v15); + std::string::_M_dispose(v14); + } + else + { + WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode(*(_DWORD *)(*(_DWORD *)(this + 120) + 8 * v12), a2, 1u); + } + ++v12; + } +LABEL_9: + std::string::operator+=(a2, "\n"); + return; + } + if ( v2 == 2 ) + { + while ( 1 ) + { + v6 = *(_DWORD *)(this + 120); + if ( (*(_DWORD *)(this + 124) - v6) >> 3 <= v12 ) + break; + v7 = !std::operator==(*(_DWORD *)(v6 + 8 * v12), "SELECTORS"); + v8 = *(_DWORD *)(this + 120); + if ( v7 ) + { + WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode(*(_DWORD *)(v8 + 8 * v12), a2, 1u); + } + else + { + WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode( + *(_DWORD *)(*(_DWORD *)(**(_DWORD **)(*(_DWORD *)(v8 + 8 * v12) + 120) + 120) + 24), + a2, + 1u); + std::string::substr(v14, *(_DWORD **)(this + 148), 2u, *(_DWORD *)(*(_DWORD *)(this + 148) + 4) - 7); + WXML::Rewrite::ToStringCode2((int)v15, (int *)v14); + v9 = std::string::insert((unsigned int **)v15, 0, "[is=\""); + std::string::basic_string(v16, v9); + v10 = std::string::append(v16, "\"]"); + std::string::basic_string(v17, v10); + std::string::operator+=(a2, (int)v17); + std::string::_M_dispose(v17); + std::string::_M_dispose(v16); + std::string::_M_dispose(v15); + std::string::_M_dispose(v14); + } + ++v12; + } + goto LABEL_9; + } + while ( 1 ) + { + v11 = *(_DWORD *)(this + 120); + if ( (*(_DWORD *)(this + 124) - v11) >> 3 <= v12 ) + break; + WXSS::CSSTreeLib::CSSSyntaxTree::GetHostRule(*(_DWORD *)(v11 + 8 * v12++), a2); + } +} + +//----- (00443E2C) -------------------------------------------------------- +unsigned int __thiscall WXSS::CSSTreeLib::CSSSyntaxTree::Print2Stream(int this, int a2, int a3) +{ + int i; // esi + std::ostream::sentry *v5; // eax + std::ostream::sentry *v6; // eax + std::ostream::sentry *v7; // esi + unsigned int v8; // esi + int v9; // edx + unsigned int result; // eax + int v11; // ecx + std::ostream::sentry *v12; // [esp+0h] [ebp-28h] + std::ostream::sentry *v13; // [esp+0h] [ebp-28h] + char *v14; // [esp+4h] [ebp-24h] + char *Literal; // [esp+4h] [ebp-24h] + + for ( i = 0; i < a2; ++i ) + { + if ( *(_BYTE *)(this + 116) ) + v14 = " "; + else + v14 = "- "; + std::operator<<>((std::ostream::sentry *)(a3 + 8), v14); + } + v12 = (std::ostream::sentry *)(a3 + 8); + if ( *(_DWORD *)(this + 132) ) + { + v5 = std::operator<<(v12, (int *)this); + v13 = std::operator<<>(v5, ": "); + std::operator<<>(v13, **(char ***)(this + 132)); + } + else + { + v6 = std::operator<<(v12, (int *)this); + v7 = std::operator<<>(v6, ": "); + Literal = (char *)WXSS::Token::GetLiteral((_DWORD *)(this + 24)); + std::operator<<>(v7, Literal); + } + v8 = 0; + std::endl>((std::ostream::sentry *)(a3 + 8)); + while ( 1 ) + { + v9 = *(_DWORD *)(this + 120); + result = (*(_DWORD *)(this + 124) - v9) >> 3; + if ( result <= v8 ) + break; + v11 = *(_DWORD *)(v9 + 8 * v8++); + WXSS::CSSTreeLib::CSSSyntaxTree::Print2Stream(v11, a2 + 1, a3); + } + return result; +} + +//----- (00443F08) -------------------------------------------------------- +int __fastcall WXSS::CSSTreeLib::CSSSyntaxTree::CSSSyntaxTree(int a1) +{ + int result; // eax + + result = a1 + 8; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + *(_BYTE *)(a1 + 8) = 0; + *(_DWORD *)(a1 + 28) = 0; + *(_DWORD *)(a1 + 32) = 0; + *(_BYTE *)(a1 + 52) = 0; + *(_DWORD *)(a1 + 24) = 1; + *(_DWORD *)(a1 + 36) = 0; + *(_DWORD *)(a1 + 40) = 0; + *(_DWORD *)(a1 + 44) = 0; + *(_DWORD *)(a1 + 48) = 0; + *(_DWORD *)(a1 + 120) = 0; + *(_DWORD *)(a1 + 124) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + *(_DWORD *)(a1 + 136) = 0; + *(_DWORD *)(a1 + 140) = 0; + *(_DWORD *)(a1 + 144) = 0; + *(_DWORD *)(a1 + 148) = 0; + *(_DWORD *)(a1 + 152) = 0; + *(_DWORD *)(a1 + 156) = 0; + *(_DWORD *)(a1 + 160) = 0; + *(_BYTE *)(a1 + 116) = 1; + *(_DWORD *)(a1 + 172) = 0; + *(_DWORD *)(a1 + 168) = 0; + *(_DWORD *)(a1 + 164) = 0; + return result; +} + +//----- (00443FD8) -------------------------------------------------------- +int __fastcall WXSS::CSSTreeLib::CSSSyntaxTree::CSSSyntaxTree(int a1) +{ + int result; // eax + + result = a1 + 8; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + *(_BYTE *)(a1 + 8) = 0; + *(_DWORD *)(a1 + 28) = 0; + *(_DWORD *)(a1 + 32) = 0; + *(_BYTE *)(a1 + 52) = 0; + *(_DWORD *)(a1 + 24) = 1; + *(_DWORD *)(a1 + 36) = 0; + *(_DWORD *)(a1 + 40) = 0; + *(_DWORD *)(a1 + 44) = 0; + *(_DWORD *)(a1 + 48) = 0; + *(_DWORD *)(a1 + 120) = 0; + *(_DWORD *)(a1 + 124) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + *(_DWORD *)(a1 + 136) = 0; + *(_DWORD *)(a1 + 140) = 0; + *(_DWORD *)(a1 + 144) = 0; + *(_DWORD *)(a1 + 148) = 0; + *(_DWORD *)(a1 + 152) = 0; + *(_DWORD *)(a1 + 156) = 0; + *(_DWORD *)(a1 + 160) = 0; + *(_BYTE *)(a1 + 116) = 1; + *(_DWORD *)(a1 + 172) = 0; + *(_DWORD *)(a1 + 168) = 0; + *(_DWORD *)(a1 + 164) = 0; + return result; +} + +//----- (004440A8) -------------------------------------------------------- +void __stdcall WXSS::CSSTreeLib::RuleDebugRule::InsertOriginSelectorInfo(int *a1, unsigned int *a2, int a3) +{ + int v3; // ecx + std::ostream::sentry *v4; // eax + std::ostream::sentry *v5; // eax + unsigned int **v6; // edx + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-154h] + void *Block; // [esp+18h] [ebp-150h] + unsigned int **v9; // [esp+50h] [ebp-118h] BYREF + volatile signed __int32 *v10; // [esp+54h] [ebp-114h] BYREF + volatile signed __int32 *v11; // [esp+58h] [ebp-110h] BYREF + volatile signed __int32 *v12; // [esp+5Ch] [ebp-10Ch] BYREF + int v13[2]; // [esp+60h] [ebp-108h] BYREF + char v14; // [esp+68h] [ebp-100h] BYREF + void *v15[2]; // [esp+78h] [ebp-F0h] BYREF + char v16; // [esp+80h] [ebp-E8h] BYREF + char v17[8]; // [esp+90h] [ebp-D8h] BYREF + char v18[4]; // [esp+98h] [ebp-D0h] BYREF + char v19[204]; // [esp+9Ch] [ebp-CCh] BYREF + + v13[0] = (int)&v14; + v15[0] = &v16; + v3 = *a1; + v13[1] = 0; + v14 = 0; + v15[1] = 0; + v16 = 0; + WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode(v3, (WXSS::Token *)v13, 0); + WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode(*a1, (WXSS::Token *)v15, 1u); + if ( !std::operator==((int)v13, (int)v15) ) + { + std::basic_stringstream,std::allocator>::basic_stringstream((int)v17); + v4 = std::operator<<>((std::ostream::sentry *)v18, ";wxcs_originclass: "); + v5 = std::operator<<(v4, v13); + std::operator<<>(v5, ";"); + lpuexcpt = (struct _Unwind_Exception *)operator new(0xB0u); + WXSS::CSSTreeLib::CSSSyntaxTree::CSSSyntaxTree((int)lpuexcpt); + zcc::shared_ptr::shared_ptr(lpuexcpt); + std::string::operator=(v9, "FAKE_ATTR"); + Block = operator new(0x18u); + std::stringbuf::str((int)Block, (int)v19); + zcc::shared_ptr::shared_ptr(Block); + std::__shared_ptr::operator=((volatile signed __int32 **)v9 + 7, &v11); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12); + v6 = v9; + v9[41] = a2; + v6[42] = (unsigned int *)((char *)a2 + 1); + v6[6] = (unsigned int *)3; + std::vector>::push_back((void **)(*(_DWORD *)a3 + 120), &v9); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v17); + } + std::string::_M_dispose(v15); + std::string::_M_dispose((void **)v13); +} +// 4440A8: using guessed type char var_D0[4]; +// 4440A8: using guessed type char var_CC[204]; + +//----- (00444380) -------------------------------------------------------- +bool __stdcall WXSS::CSSTreeLib::RuleDebugRule::MarkGood( + WXSS::CSSTreeLib::RuleDebugRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a2) +{ + int v2; // edx + int v3; // eax + std::ostream::sentry *v4; // eax + std::ostream::sentry *v5; // eax + std::ostream::sentry *v6; // eax + std::ostream::sentry *v7; // eax + unsigned int **v8; // edx + void *Block; // [esp+14h] [ebp-154h] + int v11; // [esp+18h] [ebp-150h] + int v12; // [esp+1Ch] [ebp-14Ch] + bool v13; // [esp+1Ch] [ebp-14Ch] + bool v14; // [esp+20h] [ebp-148h] + int *v15; // [esp+20h] [ebp-148h] + bool v16; // [esp+24h] [ebp-144h] + int *v17; // [esp+24h] [ebp-144h] + void *v18; // [esp+24h] [ebp-144h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-140h] + bool lpuexcpta; // [esp+28h] [ebp-140h] + volatile signed __int32 *v21; // [esp+68h] [ebp-100h] BYREF + volatile signed __int32 *v22; // [esp+6Ch] [ebp-FCh] BYREF + volatile signed __int32 *v23; // [esp+70h] [ebp-F8h] BYREF + volatile signed __int32 *v24; // [esp+74h] [ebp-F4h] BYREF + volatile signed __int32 *v25; // [esp+78h] [ebp-F0h] BYREF + volatile signed __int32 *v26; // [esp+7Ch] [ebp-ECh] BYREF + unsigned int **v27; // [esp+80h] [ebp-E8h] BYREF + volatile signed __int32 *v28; // [esp+84h] [ebp-E4h] BYREF + volatile signed __int32 *v29; // [esp+88h] [ebp-E0h] BYREF + volatile signed __int32 *v30; // [esp+8Ch] [ebp-DCh] BYREF + int v31; // [esp+90h] [ebp-D8h] BYREF + volatile signed __int32 *v32; // [esp+94h] [ebp-D4h] BYREF + char v33[4]; // [esp+98h] [ebp-D0h] BYREF + char v34[204]; // [esp+9Ch] [ebp-CCh] BYREF + + v16 = 0; + v21 = 0; + v22 = 0; + v23 = 0; + v24 = 0; + for ( lpuexcpt = 0; ; lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1) ) + { + v2 = *((_DWORD *)this + 30); + if ( (*((_DWORD *)this + 31) - v2) >> 3 <= (unsigned int)lpuexcpt ) + break; + v12 = 8 * (_DWORD)lpuexcpt; + v14 = std::operator==(*(_DWORD *)(v2 + 8 * (_DWORD)lpuexcpt), "ATTRS"); + v3 = *((_DWORD *)this + 30); + if ( v14 ) + { + std::__shared_ptr::operator=( + &v21, + (volatile signed __int32 **)(v12 + v3)); + v16 = v14; + } + else if ( std::operator==(*(_DWORD *)(v3 + 8 * (_DWORD)lpuexcpt), "{") ) + { + std::__shared_ptr::operator=( + &v23, + (volatile signed __int32 **)(*((_DWORD *)this + 30) + v12)); + } + } + if ( !v16 ) + std::__shared_ptr::operator=(&v21, &v23); + lpuexcpta = 0; + v25 = 0; + v26 = 0; + v11 = *((_DWORD *)v21 + 42); + v17 = (int *)*((_DWORD *)this + 30); + do + { + if ( *((int **)this + 31) == v17 ) + break; + v13 = std::operator==(*v17, "SELECTORS"); + if ( v13 ) + { + std::__shared_ptr::__shared_ptr(&v31, &v21); + std::__shared_ptr::__shared_ptr(&v29, v17); + WXSS::CSSTreeLib::RuleDebugRule::InsertOriginSelectorInfo((int *)&v29, (unsigned int *)(v11 + 1), (int)&v31); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v30); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v32); + v15 = *(int **)(*v17 + 120); + while ( !lpuexcpta ) + { + if ( *(int **)(*v17 + 124) == v15 ) + goto LABEL_16; + if ( std::operator==(*v15, "SELECTOR") + || std::operator==(*v15, "U_SELECTOR") + || (lpuexcpta = std::operator==(*v15, "F_SELECTOR")) ) + { + std::__shared_ptr::operator=( + &v25, + *(volatile signed __int32 ***)(*v15 + 120)); + lpuexcpta = v13; + } + v15 += 2; + } + v13 = lpuexcpta; + } +LABEL_16: + v17 += 2; + } + while ( !v13 ); + if ( lpuexcpta ) + { + std::basic_stringstream,std::allocator>::basic_stringstream((int)&v31); + v4 = std::operator<<>((std::ostream::sentry *)v33, ";wxcs_fileinfo: "); + v5 = std::operator<<(v4, *((int **)this + 37)); + std::operator<<>(v5, " "); + v6 = (std::ostream::sentry *)std::ostream::operator<<(*((_DWORD *)v25 + 11)); + std::operator<<>(v6, " "); + v7 = (std::ostream::sentry *)std::ostream::operator<<(*((_DWORD *)v25 + 12)); + std::operator<<>(v7, ";"); + v18 = operator new(0xB0u); + WXSS::CSSTreeLib::CSSSyntaxTree::CSSSyntaxTree((int)v18); + zcc::shared_ptr::shared_ptr(v18); + std::string::operator=(v27, "FAKE_ATTR"); + Block = operator new(0x18u); + std::stringbuf::str((int)Block, (int)v34); + zcc::shared_ptr::shared_ptr(Block); + std::__shared_ptr::operator=((volatile signed __int32 **)v27 + 7, &v29); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v30); + v8 = v27; + v27[6] = (unsigned int *)3; + v8[41] = (unsigned int *)(v11 + 2); + v8[42] = (unsigned int *)(v11 + 3); + std::vector>::push_back((void **)v21 + 30, &v27); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v28); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)&v31); + *((_BYTE *)this + 116) = 1; + } + else + { + *((_BYTE *)this + 116) = 0; + } + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v26); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v24); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v22); + return lpuexcpta; +} +// 4A2900: using guessed type _DWORD __stdcall std::ostream::operator<<(_DWORD); +// 444380: using guessed type char var_D0[4]; +// 444380: using guessed type char var_CC[204]; + +//----- (0044494C) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::RuleDebugRule::~RuleDebugRule(void *a1) +{ + operator delete(a1); +} + +//----- (00444960) -------------------------------------------------------- +int *WXSS::CSSTreeLib::LexicalChecker::GetInstance() +{ + bool v1; // [esp+4h] [ebp-14h] + + if ( !(_BYTE)`guard variable for WXSS::CSSTreeLib::LexicalChecker* WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc + && __cxa_guard_acquire(&`guard variable for WXSS::CSSTreeLib::LexicalChecker* WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc) ) + { + WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc = 0; + dword_50CBFC = 0; + dword_50CC00 = 0; + __cxa_guard_release(&`guard variable for WXSS::CSSTreeLib::LexicalChecker* WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc); + atexit(__tcf_2); + } + WXSS::CSSTreeLib::LexicalChecker::Init((int)&WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc, 0, v1); + return &WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc; +} +// 4449C1: variable 'v1' is possibly undefined +// 50CBF8: using guessed type int WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc; +// 50CBFC: using guessed type int dword_50CBFC; +// 50CC00: using guessed type int dword_50CC00; + +//----- (004449D0) -------------------------------------------------------- +int *WXSS::CSSTreeLib::LexicalChecker::GetInstance() +{ + bool v1; // [esp+4h] [ebp-14h] + + if ( !(_BYTE)`guard variable for WXSS::CSSTreeLib::LexicalChecker* WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc + && __cxa_guard_acquire(&`guard variable for WXSS::CSSTreeLib::LexicalChecker* WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc) ) + { + WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc = 0; + dword_50CC08 = 0; + dword_50CC0C = 0; + __cxa_guard_release(&`guard variable for WXSS::CSSTreeLib::LexicalChecker* WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc); + atexit(__tcf_1_0); + } + WXSS::CSSTreeLib::LexicalChecker::Init( + (int)&WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc, + (WXSS::CSSTreeLib::LexicalChecker *)1, + v1); + return &WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc; +} +// 444A31: variable 'v1' is possibly undefined +// 50CC04: using guessed type int WXSS::CSSTreeLib::LexicalChecker::GetInstance(void)::lc; +// 50CC08: using guessed type int dword_50CC08; +// 50CC0C: using guessed type int dword_50CC0C; + +//----- (00444A40) -------------------------------------------------------- +void __userpurge WXSS::CSSTreeLib::LexicalChecker::Init(int a1@, WXSS::CSSTreeLib::LexicalChecker *this, bool a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // eax + _DWORD *v5; // eax + _DWORD *v6; // eax + _DWORD *v7; // eax + _DWORD *v8; // eax + _DWORD *v9; // eax + _DWORD *v10; // eax + _DWORD *v11; // eax + _DWORD *v12; // eax + _DWORD *v13; // eax + _DWORD *v14; // eax + _DWORD *v15; // eax + _DWORD *v16; // eax + _DWORD *v17; // eax + _DWORD *v18; // eax + _DWORD *v19; // eax + volatile signed __int32 **v20; // ecx + _DWORD *v21; // eax + _DWORD *v22; // eax + _DWORD *v23; // eax + _DWORD *v24; // eax + _DWORD *v25; // eax + _DWORD *v26; // eax + _DWORD *v27; // eax + _DWORD *v28; // eax + _DWORD *v29; // eax + _DWORD *v30; // eax + int v31; // [esp+10h] [ebp-118h] + int v32; // [esp+14h] [ebp-114h] + int v33; // [esp+14h] [ebp-114h] + int v34; // [esp+14h] [ebp-114h] + int v35; // [esp+1Ch] [ebp-10Ch] + char **v36; // [esp+1Ch] [ebp-10Ch] + int v37; // [esp+1Ch] [ebp-10Ch] + int v38; // [esp+20h] [ebp-108h] + int v39; // [esp+20h] [ebp-108h] + char **v40; // [esp+20h] [ebp-108h] + int v41; // [esp+20h] [ebp-108h] + int v42; // [esp+20h] [ebp-108h] + int v43; // [esp+20h] [ebp-108h] + void **v44; // [esp+24h] [ebp-104h] + void **v45; // [esp+24h] [ebp-104h] + char **v46; // [esp+24h] [ebp-104h] + void **v47; // [esp+24h] [ebp-104h] + char **v48; // [esp+24h] [ebp-104h] + int v49; // [esp+24h] [ebp-104h] + void **v50; // [esp+24h] [ebp-104h] + int v51; // [esp+24h] [ebp-104h] + int v53; // [esp+64h] [ebp-C4h] BYREF + volatile signed __int32 *v54; // [esp+68h] [ebp-C0h] BYREF + int v55; // [esp+6Ch] [ebp-BCh] BYREF + volatile signed __int32 *v56; // [esp+70h] [ebp-B8h] BYREF + int v57; // [esp+74h] [ebp-B4h] BYREF + volatile signed __int32 *v58; // [esp+78h] [ebp-B0h] BYREF + int v59; // [esp+7Ch] [ebp-ACh] BYREF + volatile signed __int32 *v60; // [esp+80h] [ebp-A8h] BYREF + int v61; // [esp+84h] [ebp-A4h] BYREF + volatile signed __int32 *v62; // [esp+88h] [ebp-A0h] BYREF + int v63; // [esp+8Ch] [ebp-9Ch] BYREF + volatile signed __int32 *v64; // [esp+90h] [ebp-98h] BYREF + int v65; // [esp+94h] [ebp-94h] BYREF + volatile signed __int32 *v66; // [esp+98h] [ebp-90h] BYREF + void **v67; // [esp+9Ch] [ebp-8Ch] BYREF + volatile signed __int32 *v68; // [esp+A0h] [ebp-88h] BYREF + int v69; // [esp+A4h] [ebp-84h] BYREF + volatile signed __int32 *v70; // [esp+A8h] [ebp-80h] BYREF + int v71; // [esp+ACh] [ebp-7Ch] BYREF + volatile signed __int32 *v72; // [esp+B0h] [ebp-78h] BYREF + void **v73; // [esp+B4h] [ebp-74h] BYREF + volatile signed __int32 *v74; // [esp+B8h] [ebp-70h] BYREF + int v75; // [esp+BCh] [ebp-6Ch] BYREF + volatile signed __int32 *v76; // [esp+C0h] [ebp-68h] BYREF + int v77; // [esp+C4h] [ebp-64h] BYREF + volatile signed __int32 *v78; // [esp+C8h] [ebp-60h] BYREF + int v79; // [esp+CCh] [ebp-5Ch] BYREF + volatile signed __int32 *v80; // [esp+D0h] [ebp-58h] BYREF + int v81; // [esp+D4h] [ebp-54h] BYREF + volatile signed __int32 *v82; // [esp+D8h] [ebp-50h] BYREF + int v83; // [esp+DCh] [ebp-4Ch] BYREF + volatile signed __int32 *v84; // [esp+E0h] [ebp-48h] BYREF + int v85; // [esp+E4h] [ebp-44h] BYREF + volatile signed __int32 *v86; // [esp+E8h] [ebp-40h] BYREF + int v87; // [esp+ECh] [ebp-3Ch] BYREF + volatile signed __int32 *v88; // [esp+F0h] [ebp-38h] BYREF + int v89; // [esp+F4h] [ebp-34h] BYREF + int v90; // [esp+F8h] [ebp-30h] BYREF + volatile signed __int32 *v91; // [esp+FCh] [ebp-2Ch] BYREF + void *v92; // [esp+100h] [ebp-28h] BYREF + volatile signed __int32 *v93[9]; // [esp+104h] [ebp-24h] BYREF + + if ( !*(_BYTE *)a1 ) + { + v3 = operator new(4u); + *v3 = &off_519B6C; + zcc::shared_ptr::shared_ptr(&v53, (int)v3); + v4 = operator new(4u); + *v4 = &off_519B9C; + zcc::shared_ptr::shared_ptr(&v55, (int)v4); + v5 = operator new(0x10u); + *v5 = &off_519BB4; + v5[1] = 0; + v5[2] = 0; + v5[3] = 0; + zcc::shared_ptr::shared_ptr(&v92, (int)v5); + *(_DWORD *)(a1 + 4) = v92; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=((volatile signed __int32 **)(a1 + 8), v93[0]); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v93); + v44 = *(void ***)(a1 + 4); + v6 = operator new(0x10u); + *v6 = &off_519B84; + v6[1] = 0; + v6[2] = 0; + v6[3] = 0; + zcc::shared_ptr::shared_ptr(&v57, (int)v6); + v38 = v57; + std::vector>::push_back(++v44, &v57); + std::vector>::push_back(v44, &v53); + v7 = operator new(0x10u); + *v7 = &off_519B84; + v7[1] = 0; + v7[2] = 0; + v7[3] = 0; + zcc::shared_ptr::shared_ptr(&v59, (int)v7); + v32 = v59; + v8 = operator new(0x10u); + *v8 = &off_519B40; + v8[1] = 0; + v8[2] = 0; + v8[3] = 0; + zcc::shared_ptr::shared_ptr(&v61, (int)v8); + v45 = (void **)(v61 + 4); + std::vector>::push_back((void **)(v61 + 4), &v59); + if ( (_BYTE)this ) + { + v9 = operator new(4u); + *v9 = &off_519AA0; + zcc::shared_ptr::shared_ptr(&v92, (int)v9); + std::vector>::push_back(v45, &v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v93); + } + v10 = operator new(4u); + *v10 = &off_519A58; + zcc::shared_ptr::shared_ptr(&v63, (int)v10); + std::vector>::push_back(v45, &v63); + v89 = (int)"RULE"; + v46 = (char **)(v38 + 4); + std::__shared_ptr::__shared_ptr(&v90, &v61); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + (char **)(v38 + 4), + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + v11 = operator new(0x10u); + *v11 = &off_519B84; + v11[1] = 0; + v11[2] = 0; + v11[3] = 0; + zcc::shared_ptr::shared_ptr(&v65, (int)v11); + v89 = (int)"MULTIRULE"; + v39 = v65; + std::__shared_ptr::__shared_ptr(&v90, &v65); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + v46, + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + v89 = (int)"RULES"; + std::__shared_ptr::__shared_ptr(&v90, (_DWORD *)(a1 + 4)); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + (char **)(v39 + 4), + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + v12 = operator new(0x10u); + *v12 = &off_519BB4; + v12[1] = 0; + v12[2] = 0; + v12[3] = 0; + zcc::shared_ptr::shared_ptr(&v67, (int)v12); + v47 = v67; + v13 = operator new(0x10u); + *v13 = &off_519B84; + v13[1] = 0; + v13[2] = 0; + v13[3] = 0; + zcc::shared_ptr::shared_ptr(&v69, (int)v13); + v35 = v69; + v14 = operator new(4u); + *v14 = &off_519AD0; + zcc::shared_ptr::shared_ptr(&v71, (int)v14); + std::vector>::push_back(++v47, &v69); + std::vector>::push_back(v47, &v71); + v89 = (int)"SELECTORS"; + v40 = (char **)(v32 + 4); + std::__shared_ptr::__shared_ptr(&v90, &v67); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + (char **)(v32 + 4), + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + v15 = operator new(0x10u); + *v15 = &off_519B84; + v15[1] = 0; + v15[2] = 0; + v15[3] = 0; + zcc::shared_ptr::shared_ptr(&v77, (int)v15); + v89 = (int)"SELECTOR"; + v33 = v77; + v48 = (char **)(v35 + 4); + std::__shared_ptr::__shared_ptr(&v90, &v77); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + (char **)(v35 + 4), + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + v16 = operator new(4u); + *v16 = &off_519B00; + zcc::shared_ptr::shared_ptr(&v79, (int)v16); + v89 = (int)"$NAME"; + v36 = (char **)(v33 + 4); + std::__shared_ptr::__shared_ptr(&v90, &v79); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + (char **)(v33 + 4), + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + v17 = operator new(0x10u); + *v17 = &off_519B40; + v17[1] = 0; + v17[2] = 0; + v17[3] = 0; + zcc::shared_ptr::shared_ptr(&v81, (int)v17); + v89 = (int)"F_SELECTOR"; + v34 = v81; + std::__shared_ptr::__shared_ptr(&v90, &v81); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + v48, + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + v18 = operator new(0x10u); + *v18 = &off_519B84; + v18[1] = 0; + v18[2] = 0; + v18[3] = 0; + zcc::shared_ptr::shared_ptr(&v83, (int)v18); + v31 = v83; + v19 = operator new(0xCu); + *v19 = &off_519BCC; + v19[1] = 0; + v19[2] = 0; + zcc::shared_ptr::shared_ptr(&v85, (int)v19); + v20 = (volatile signed __int32 **)(v85 + 8); + *(_DWORD *)(v85 + 4) = v77; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(v20, v78); + std::vector>::push_back((void **)(v34 + 4), &v83); + std::vector>::push_back((void **)(v34 + 4), &v85); + v21 = operator new(0x10u); + *v21 = &off_519A88; + v21[1] = 0; + v21[2] = 0; + v21[3] = 0; + zcc::shared_ptr::shared_ptr(&v87, (int)v21); + v49 = v87; + std::string::basic_string(&v92, "root", (int)&v89); + if ( *(_DWORD *)(v49 + 8) == *(_DWORD *)(v49 + 12) ) + { + std::vector::_M_realloc_insert((char **)(v49 + 4), *(char **)(v49 + 8), &v92); + } + else + { + std::string::basic_string(*(_DWORD **)(v49 + 8), &v92); + *(_DWORD *)(v49 + 8) += 24; + } + std::string::_M_dispose(&v92); + v89 = (int)"$NAME"; + std::__shared_ptr::__shared_ptr(&v90, &v87); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + (char **)(v31 + 4), + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + v89 = (int)"SELECTOR"; + std::__shared_ptr::__shared_ptr(&v90, &v77); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + v36, + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v88); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v86); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v84); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v82); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v80); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v78); + v22 = operator new(0x10u); + *v22 = &off_519BB4; + v22[1] = 0; + v22[2] = 0; + v22[3] = 0; + zcc::shared_ptr::shared_ptr(&v73, (int)v22); + v89 = (int)"ATTRS"; + v50 = v73; + std::__shared_ptr::__shared_ptr(&v90, &v73); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + v40, + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + v23 = operator new(0x10u); + *v23 = &off_519B84; + v23[1] = 0; + v23[2] = 0; + v23[3] = 0; + zcc::shared_ptr::shared_ptr(&v75, (int)v23); + v41 = v75; + std::vector>::push_back(++v50, &v75); + std::vector>::push_back(v50, &v53); + v24 = operator new(0x10u); + *v24 = &off_519BB4; + v24[1] = 0; + v24[2] = 0; + v24[3] = 0; + zcc::shared_ptr::shared_ptr(&v77, (int)v24); + v89 = (int)"ATTR"; + v37 = v77; + std::__shared_ptr::__shared_ptr(&v90, &v77); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + (char **)(v41 + 4), + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + v25 = operator new(0x10u); + *v25 = &off_519B40; + v25[1] = 0; + v25[2] = 0; + v25[3] = 0; + zcc::shared_ptr::shared_ptr(&v79, (int)v25); + v42 = v79; + v26 = operator new(0x10u); + *v26 = &off_519B84; + v26[1] = 0; + v26[2] = 0; + v26[3] = 0; + zcc::shared_ptr::shared_ptr(&v81, (int)v26); + v51 = v81; + v27 = operator new(4u); + *v27 = &off_519AB8; + zcc::shared_ptr::shared_ptr(&v83, (int)v27); + v89 = (int)"$ESV"; + std::__shared_ptr::__shared_ptr(&v90, &v83); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + (char **)(v51 + 4), + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + std::vector>::push_back((void **)(v42 + 4), &v81); + if ( (_BYTE)this ) + { + v28 = operator new(4u); + *v28 = &off_519A70; + zcc::shared_ptr::shared_ptr(&v92, (int)v28); + std::vector>::push_back((void **)(v42 + 4), &v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v93); + } + std::vector>::push_back((void **)(v37 + 4), &v79); + v29 = operator new(0x10u); + *v29 = &off_519B84; + v29[1] = 0; + v29[2] = 0; + v29[3] = 0; + zcc::shared_ptr::shared_ptr(&v85, (int)v29); + v43 = v85; + v30 = operator new(4u); + *v30 = &off_519AE8; + zcc::shared_ptr::shared_ptr(&v87, (int)v30); + v89 = (int)"$ESV"; + std::__shared_ptr::__shared_ptr(&v90, &v87); + std::pair>::pair,true>( + &v92, + (int)&v89); + std::vector>>::emplace_back>>( + (char **)(v43 + 4), + &v92); + std::pair>::~pair((int)&v92); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v91); + std::vector>::push_back((void **)(v37 + 4), &v85); + std::vector>::push_back((void **)(v37 + 4), &v53); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v88); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v86); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v84); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v82); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v80); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v78); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v76); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v74); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v72); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v70); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v68); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v66); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v64); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v62); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v60); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v58); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v56); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v54); + *(_BYTE *)a1 = 1; + } +} +// 519A58: using guessed type void (__cdecl *off_519A58)(WXSS::CSSTreeLib::MarkHostRule *__hidden this); +// 519A70: using guessed type void (__cdecl *off_519A70)(WXSS::CSSTreeLib::AttrDebugRule *__hidden this); +// 519A88: using guessed type void (__cdecl *off_519A88)(WXSS::CSSTreeLib::BlackListRule *__hidden this); +// 519AA0: using guessed type void (__cdecl *off_519AA0)(WXSS::CSSTreeLib::RuleDebugRule *__hidden this); +// 519AB8: using guessed type void (__cdecl *off_519AB8)(WXSS::CSSTreeLib::ReWriteRpxRule *__hidden this); +// 519AD0: using guessed type void (__cdecl *off_519AD0)(WXSS::CSSTreeLib::MarkSelectorRule *__hidden this); +// 519AE8: using guessed type void (__cdecl *off_519AE8)(WXSS::CSSTreeLib::RewriteImgUrlRule *__hidden this); +// 519B00: using guessed type void (__cdecl *off_519B00)(WXSS::CSSTreeLib::RewriteSelectorRule *__hidden this); +// 519B40: using guessed type void (__cdecl *off_519B40)(WXSS::CSSTreeLib::AndRules *__hidden this); +// 519B6C: using guessed type void (__cdecl *off_519B6C)(WXSS::CSSTreeLib::TrueRule *__hidden this); +// 519B84: using guessed type void (__cdecl *off_519B84)(WXSS::CSSTreeLib::ChildRule *__hidden this); +// 519B9C: using guessed type void (__cdecl *off_519B9C)(WXSS::CSSTreeLib::FalseRule *__hidden this); +// 519BB4: using guessed type void (__cdecl *off_519BB4)(WXSS::CSSTreeLib::RuleChain *__hidden this); +// 519BCC: using guessed type void (__cdecl *off_519BCC)(WXSS::CSSTreeLib::SPNotRule *__hidden this); + +//----- (00445B90) -------------------------------------------------------- +char __stdcall WXSS::CSSTreeLib::ReWriteRpxRule::MarkGood( + WXSS::CSSTreeLib::ReWriteRpxRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a2) +{ + char *Literal; // eax + char lpuexcpt; // [esp+14h] [ebp-84h] + char *Block; // [esp+18h] [ebp-80h] + volatile signed __int32 *v6; // [esp+58h] [ebp-40h] BYREF + volatile signed __int32 *v7; // [esp+5Ch] [ebp-3Ch] BYREF + int v8[6]; // [esp+60h] [ebp-38h] BYREF + int v9[2]; // [esp+78h] [ebp-20h] BYREF + char v10; // [esp+80h] [ebp-18h] BYREF + + Literal = (char *)WXSS::Token::GetLiteral((_DWORD *)this + 6); + std::string::basic_string(v8, Literal, (int)v9); + v9[1] = 0; + v9[0] = (int)&v10; + v10 = 0; + lpuexcpt = 0; + if ( WXML::Rewrite::RewriteRPX((int)v8, (unsigned int **)v9, "%%?", "?%%") ) + { + Block = (char *)operator new(0x18u); + std::string::basic_string(Block, (int)v9); + zcc::shared_ptr::shared_ptr(Block); + std::__shared_ptr::operator=((volatile signed __int32 **)this + 33, &v6); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7); + lpuexcpt = 1; + } + std::string::_M_dispose((void **)v9); + std::string::_M_dispose((void **)v8); + return lpuexcpt; +} + +//----- (00445CFC) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::ReWriteRpxRule::~ReWriteRpxRule(void *a1) +{ + operator delete(a1); +} + +//----- (00445D10) -------------------------------------------------------- +char __stdcall WXSS::CSSTreeLib::MarkSelectorRule::MarkGood( + WXSS::CSSTreeLib::MarkSelectorRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a2) +{ + int v2; // edx + int v3; // eax + const char *Literal; // eax + _DWORD *v5; // ecx + char *v6; // eax + _BYTE *v7; // eax + char v8; // al + int v9; // eax + _DWORD *v10; // eax + _DWORD **v12; // [esp+18h] [ebp-60h] + _DWORD **v13; // [esp+1Ch] [ebp-5Ch] + int v14; // [esp+20h] [ebp-58h] + _DWORD *v15; // [esp+20h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-54h] + struct _Unwind_Exception *lpuexcpta; // [esp+24h] [ebp-54h] + char *Str; // [esp+28h] [ebp-50h] + char *Stra; // [esp+28h] [ebp-50h] + char *Strb; // [esp+28h] [ebp-50h] + char *Strc; // [esp+28h] [ebp-50h] + char *Strd; // [esp+28h] [ebp-50h] + char *v23; // [esp+68h] [ebp-10h] BYREF + volatile signed __int32 *v24[3]; // [esp+6Ch] [ebp-Ch] BYREF + + for ( lpuexcpt = 0; ; lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1) ) + { + v2 = *((_DWORD *)this + 30); + if ( (unsigned int)lpuexcpt >= (*((_DWORD *)this + 31) - v2) >> 3 ) + goto LABEL_39; + Str = *(char **)(v2 + 8 * (_DWORD)lpuexcpt); + v14 = *(_DWORD *)Str; + if ( lpuexcpt ) + { + if ( *((_DWORD *)Str + 41) <= *(_DWORD *)(*(_DWORD *)(v2 + 8 * (_DWORD)lpuexcpt - 8) + 168) ) + break; + } + if ( *(_BYTE *)v14 != 70 || strcmp((const char *)(v14 + 1), "_SELECTOR") ) + break; + v3 = *((_DWORD *)Str + 30); + if ( (unsigned int)(*((_DWORD *)Str + 31) - v3) <= 8 ) + goto LABEL_14; + std::__shared_ptr::__shared_ptr( + &v23, + (_DWORD *)(v3 + 8)); + Stra = v23; + if ( **(_BYTE **)v23 != 36 + || strcmp((const char *)(*(_DWORD *)v23 + 1), "NAME") + || (Literal = WXSS::Token::GetLiteral((_DWORD *)Stra + 6), *Literal != 104) + || strcmp(Literal + 1, "ost") ) + { + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v24); +LABEL_14: + v5 = (_DWORD *)*((_DWORD *)this + 39); + v6 = *(char **)(*((_DWORD *)this + 30) + 8 * (_DWORD)lpuexcpt); + goto LABEL_36; + } + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v24); +LABEL_38: + ; + } + if ( *(_BYTE *)v14 == 70 ) + { + if ( strcmp((const char *)(v14 + 1), "_SELECTOR") ) + goto LABEL_35; + goto LABEL_38; + } + v13 = (_DWORD **)*((_DWORD *)Str + 30); + if ( *(_BYTE *)v14 == 83 && !strcmp((const char *)(v14 + 1), "ELECTOR") ) + { + v12 = (_DWORD **)*((_DWORD *)Str + 31); + while ( 1 ) + { + if ( v12 == v13 ) + goto LABEL_38; + v15 = *v13; + v7 = (_BYTE *)**v13; + if ( *v7 == 36 ) + { + Strb = v7 + 1; + if ( !strcmp(v7 + 1, "NAME") ) + { + Strc = (char *)WXSS::Token::GetLiteral(v15 + 6); + v8 = *Strc; + if ( *Strc == 46 || v8 == 64 ) + goto LABEL_34; + if ( v8 == 102 ) + { + v9 = strcmp(Strc + 1, (const char *)&off_50E044); +LABEL_30: + if ( !v9 ) + goto LABEL_34; + } + else if ( v8 == 116 ) + { + v9 = strcmp(Strc + 1, "o"); + goto LABEL_30; + } + if ( Strc[strlen(Strc) - 1] != 37 ) + goto LABEL_32; + goto LABEL_34; + } + if ( !strcmp(Strb, "ID") ) + { +LABEL_32: + v5 = (_DWORD *)*((_DWORD *)this + 39); + v10 = v15; + goto LABEL_37; + } + } +LABEL_34: + v13 += 2; + } + } +LABEL_35: + v5 = (_DWORD *)*((_DWORD *)this + 39); + v6 = Str; +LABEL_36: + v10 = (_DWORD *)**((_DWORD **)v6 + 30); +LABEL_37: + WXSS::Token::operator=(v5, (int)(v10 + 6)); +LABEL_39: + lpuexcpta = (struct _Unwind_Exception *)*((_DWORD *)this + 37); + Strd = (char *)operator new(0x18u); + std::string::basic_string(Strd, (int)lpuexcpta); + zcc::shared_ptr::shared_ptr(Strd); + std::__shared_ptr::operator=( + (volatile signed __int32 **)(*((_DWORD *)this + 39) + 4), + (volatile signed __int32 **)&v23); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v24); + return 1; +} +// 50E044: using guessed type void *off_50E044; + +//----- (00446034) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::MarkSelectorRule::~MarkSelectorRule(void *a1) +{ + operator delete(a1); +} + +//----- (00446048) -------------------------------------------------------- +char __stdcall WXSS::CSSTreeLib::RewriteImgUrlRule::MarkGood( + WXSS::CSSTreeLib::RewriteImgUrlRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a2) +{ + char *Literal; // eax + int v4; // [esp+20h] [ebp-98h] + int v5; // [esp+20h] [ebp-98h] + struct _Unwind_Exception *lpuexcpta; // [esp+24h] [ebp-94h] + char lpuexcpt; // [esp+24h] [ebp-94h] + char *Block; // [esp+28h] [ebp-90h] + void *v9[6]; // [esp+68h] [ebp-50h] BYREF + void *v10[2]; // [esp+80h] [ebp-38h] BYREF + char v11; // [esp+88h] [ebp-30h] BYREF + int v12; // [esp+98h] [ebp-20h] BYREF + volatile signed __int32 *v13; // [esp+9Ch] [ebp-1Ch] BYREF + + Literal = (char *)WXSS::Token::GetLiteral((_DWORD *)this + 6); + std::string::basic_string(v9, Literal, (int)&v12); + v10[1] = 0; + v10[0] = &v11; + v11 = 0; + lpuexcpta = (struct _Unwind_Exception *)*((_DWORD *)this + 12); + v4 = *((_DWORD *)this + 11); + std::string::basic_string((char *)&v12, *((_DWORD *)this + 37)); + v5 = WXML::Rewrite::RewriteImg((int)v9, (unsigned int **)v10, &v12, v4, (int)lpuexcpta); + std::string::_M_dispose((void **)&v12); + if ( !v5 ) + goto LABEL_4; + lpuexcpt = 0; + if ( v5 == 1 ) + { + Block = (char *)operator new(0x18u); + std::string::basic_string(Block, (int)v10); + zcc::shared_ptr::shared_ptr(Block); + std::__shared_ptr::operator=( + (volatile signed __int32 **)this + 33, + (volatile signed __int32 **)&v12); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13); +LABEL_4: + lpuexcpt = 1; + } + std::string::_M_dispose(v10); + std::string::_M_dispose(v9); + return lpuexcpt; +} + +//----- (00446254) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::RewriteImgUrlRule::~RewriteImgUrlRule(void *a1) +{ + operator delete(a1); +} + +//----- (00446268) -------------------------------------------------------- +char __stdcall WXSS::CSSTreeLib::RewriteSelectorRule::MarkGood( + WXSS::CSSTreeLib::RewriteSelectorRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a2) +{ + char *Literal; // eax + _DWORD *v4; // [esp+1Ch] [ebp-BCh] + char *v5; // [esp+20h] [ebp-B8h] + char *Block; // [esp+24h] [ebp-B4h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-B0h] + bool lpuexcptb; // [esp+28h] [ebp-B0h] + char lpuexcpta; // [esp+28h] [ebp-B0h] + volatile signed __int32 *v10; // [esp+60h] [ebp-78h] BYREF + volatile signed __int32 *v11; // [esp+64h] [ebp-74h] BYREF + int v12; // [esp+68h] [ebp-70h] BYREF + volatile signed __int32 *v13; // [esp+6Ch] [ebp-6Ch] BYREF + char *v14; // [esp+70h] [ebp-68h] BYREF + int v15; // [esp+74h] [ebp-64h] + char v16; // [esp+78h] [ebp-60h] BYREF + _BYTE *v17; // [esp+88h] [ebp-50h] BYREF + unsigned int v18; // [esp+8Ch] [ebp-4Ch] + char *String1[6]; // [esp+A0h] [ebp-38h] BYREF + int v20; // [esp+B8h] [ebp-20h] BYREF + volatile signed __int32 *v21; // [esp+BCh] [ebp-1Ch] BYREF + + v15 = 0; + v14 = &v16; + v16 = 0; + Literal = (char *)WXSS::Token::GetLiteral((_DWORD *)this + 6); + if ( Literal ) + { + lpuexcpt = 0; + std::string::basic_string(&v17, Literal, (int)&v20); + while ( (unsigned int)lpuexcpt < v18 ) + { + if ( *((_BYTE *)lpuexcpt + (_DWORD)v17) == 46 + && (unsigned int)lpuexcpt + 1 < v18 + && (unsigned int)(*((char *)lpuexcpt + (_DWORD)v17 + 1) - 48) > 9 ) + { + std::string::operator+=(&v14, ".%%HERESUFFIX%%"); + } + else + { + std::string::push_back(&v14, *((_BYTE *)lpuexcpt + (_DWORD)v17)); + } + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + } + if ( *((_DWORD *)this + 10) != v15 ) + { + Block = (char *)operator new(0x18u); + std::string::basic_string(Block, (int)&v14); + zcc::shared_ptr::shared_ptr(Block); + std::__shared_ptr::operator=((volatile signed __int32 **)this + 33, &v10); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v11); + } + std::string::basic_string(String1, v14, (int)&v20); + if ( !__stricmp(String1[0], "page") ) + { + v4 = operator new(0x18u); + std::string::basic_string(v4, "body", (int)&v12); + zcc::shared_ptr::shared_ptr(v4); + std::__shared_ptr::operator=( + (volatile signed __int32 **)this + 33, + (volatile signed __int32 **)&v20); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v21); + } + else if ( __stricmp(String1[0], asc_50E043) ) + { + if ( __stricmp(String1[0], "to") ) + { + if ( __stricmp(String1[0], off_50DF84) ) + { + if ( String1[1] ) + { + if ( _isalpha(*String1[0]) ) + { + std::string::substr(&v20, String1, 0, 3u); + lpuexcptb = std::operator==((int)&v20, "wx-"); + std::string::_M_dispose((void **)&v20); + if ( !lpuexcptb ) + { + std::string::basic_string(&v20, "wx-", (int)&v12); + std::string::operator+=(&v20, (int)String1); + v5 = (char *)operator new(0x18u); + std::string::basic_string(v5, (int)&v20); + zcc::shared_ptr::shared_ptr(v5); + std::__shared_ptr::operator=( + (volatile signed __int32 **)this + 33, + (volatile signed __int32 **)&v12); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13); + std::string::_M_dispose((void **)&v20); + } + } + } + } + } + } + *((_BYTE *)this + 116) = 1; + std::string::_M_dispose((void **)String1); + std::string::_M_dispose((void **)&v17); + lpuexcpta = 1; + } + else + { + lpuexcpta = 0; + } + std::string::_M_dispose((void **)&v14); + return lpuexcpta; +} + +//----- (00446700) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::RewriteSelectorRule::~RewriteSelectorRule(void *a1) +{ + operator delete(a1); +} + +//----- (00446714) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::EPS::~EPS(void *a1) +{ + operator delete(a1); +} + +//----- (00446728) -------------------------------------------------------- +int __fastcall WXSS::CSSTreeLib::Action::Action(int a1) +{ + int result; // eax + + *(_DWORD *)a1 = &off_519B2C; + *(_DWORD *)(a1 + 4) = a1 + 12; + result = a1 + 44; + *(_DWORD *)(a1 + 8) = 0; + *(_BYTE *)(a1 + 12) = 0; + *(_DWORD *)(a1 + 36) = a1 + 44; + *(_DWORD *)(a1 + 40) = 0; + *(_BYTE *)(a1 + 44) = 0; + *(_DWORD *)(a1 + 28) = 0; + return result; +} +// 519B2C: using guessed type void (__cdecl *off_519B2C)(WXSS::CSSTreeLib::Action *__hidden this); + +//----- (00446758) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::Action::~Action(void **a1) +{ + WXSS::CSSTreeLib::Action::~Action(a1); + operator delete(a1); +} + +//----- (00446774) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::Action::~Action(void **a1) +{ + WXSS::CSSTreeLib::Action::~Action(a1, (WXSS::CSSTreeLib::Action *)2); +} + +//----- (0044678C) -------------------------------------------------------- +void __thiscall WXSS::CSSTreeLib::Action::~Action(void **ecx0, WXSS::CSSTreeLib::Action *this) +{ + void **v3; // ecx + + v3 = ecx0 + 9; + *(v3 - 9) = &off_519B2C; + std::string::_M_dispose(v3); + std::string::_M_dispose(ecx0 + 1); +} +// 519B2C: using guessed type void (__cdecl *off_519B2C)(WXSS::CSSTreeLib::Action *__hidden this); + +//----- (004467B0) -------------------------------------------------------- +#error "446A05: call analysis failed (funcsize=158)" + +//----- (00446A70) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::Parser::~Parser(int a1) +{ + int v2; // edi + int *v3; // esi + int v4; // eax + int v5; // edx + int v6; // edx + void **v7; // esi + unsigned int v8; // edi + void *v9; // eax + int v10; // [esp+1Ch] [ebp-2Ch] + int v11; // [esp+20h] [ebp-28h] + int v12; // [esp+24h] [ebp-24h] + unsigned int v13; // [esp+28h] [ebp-20h] + int v14; // [esp+2Ch] [ebp-1Ch] + + v2 = *(_DWORD *)(a1 + 72); + v12 = *(_DWORD *)(a1 + 64); + v11 = *(_DWORD *)(a1 + 76); + v14 = *(_DWORD *)(a1 + 68); + v3 = (int *)(v14 + 4); + v13 = *(_DWORD *)(a1 + 84); + v4 = *(_DWORD *)(a1 + 56); + while ( v13 > (unsigned int)v3 ) + { + v5 = *v3; + v10 = v4; + ++v3; + std::_Destroy_aux::__destroy *>(v5, v5, v5 + 512); + v4 = v10; + } + if ( v14 == v13 ) + { + std::_Destroy_aux::__destroy *>(v13, v4, v2); + } + else + { + std::_Destroy_aux::__destroy *>(v13, v4, v12); + std::_Destroy_aux::__destroy *>(v6, v11, v2); + } + if ( *(_DWORD *)(a1 + 48) ) + { + v7 = *(void ***)(a1 + 68); + v8 = *(_DWORD *)(a1 + 84) + 4; + while ( v8 > (unsigned int)v7 ) + { + v9 = *v7++; + operator delete(v9); + } + operator delete(*(void **)(a1 + 48)); + } + std::deque>::~deque(a1 + 8); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 4)); +} +// 446ADE: variable 'v6' is possibly undefined + +//----- (00446B30) -------------------------------------------------------- +char __userpurge WXSS::CSSTreeLib::AndRules::MarkGood@( + int a1@, + WXSS::CSSTreeLib::AndRules *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a3) +{ + unsigned int v4; // ebx + int v5; // edx + int v6; // ecx + char result; // al + + v4 = 0; + while ( 1 ) + { + v5 = *(_DWORD *)(a1 + 4); + if ( (*(_DWORD *)(a1 + 8) - v5) >> 3 <= v4 ) + break; + v6 = *(_DWORD *)(v5 + 8 * v4++); + result = (*(int (__thiscall **)(int, WXSS::CSSTreeLib::AndRules *))(*(_DWORD *)v6 + 8))(v6, this); + if ( !result ) + goto LABEL_6; + } + result = 1; +LABEL_6: + *((_BYTE *)this + 116) = result; + return result; +} + +//----- (00446B74) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::AndRules::~AndRules(void *a1) +{ + WXSS::CSSTreeLib::AndRules::~AndRules((int)a1); + operator delete(a1); +} + +//----- (00446B90) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::AndRules::~AndRules(int a1) +{ + *(_DWORD *)a1 = &off_519B40; + std::vector>::~vector((void **)(a1 + 4)); +} +// 519B40: using guessed type void (__cdecl *off_519B40)(WXSS::CSSTreeLib::AndRules *__hidden this); + +//----- (00446BA0) -------------------------------------------------------- +int __fastcall WXSS::CSSTreeLib::Terminal::Terminal(int a1) +{ + int result; // eax + + result = a1 + 12; + *(_DWORD *)a1 = &off_519B58; + *(_DWORD *)(a1 + 4) = a1 + 12; + *(_DWORD *)(a1 + 8) = 0; + *(_BYTE *)(a1 + 12) = 0; + *(_DWORD *)(a1 + 32) = 0; + *(_DWORD *)(a1 + 36) = 0; + *(_BYTE *)(a1 + 56) = 0; + *(_DWORD *)(a1 + 28) = 1; + *(_DWORD *)(a1 + 40) = 0; + *(_DWORD *)(a1 + 44) = 0; + *(_DWORD *)(a1 + 48) = 0; + *(_DWORD *)(a1 + 52) = 0; + return result; +} +// 519B58: using guessed type void (__cdecl *off_519B58)(WXSS::CSSTreeLib::Terminal *__hidden this); + +//----- (00446BF0) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::Terminal::~Terminal(void **a1) +{ + WXSS::CSSTreeLib::Terminal::~Terminal(a1); + operator delete(a1); +} + +//----- (00446C0C) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::Terminal::~Terminal(void **a1) +{ + WXSS::CSSTreeLib::Terminal::~Terminal(a1, (WXSS::CSSTreeLib::Terminal *)2); +} + +//----- (00446C24) -------------------------------------------------------- +void __thiscall WXSS::CSSTreeLib::Terminal::~Terminal(void **ecx0, WXSS::CSSTreeLib::Terminal *this) +{ + volatile signed __int32 **v3; // ecx + + v3 = (volatile signed __int32 **)(ecx0 + 9); + *(v3 - 9) = (volatile signed __int32 *)&off_519B58; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v3); + std::string::_M_dispose(ecx0 + 1); +} +// 519B58: using guessed type void (__cdecl *off_519B58)(WXSS::CSSTreeLib::Terminal *__hidden this); + +//----- (00446C48) -------------------------------------------------------- +void __thiscall WXSS::CSSTreeLib::Terminal::~Terminal(void **ecx0, WXSS::CSSTreeLib::Terminal *this) +{ + volatile signed __int32 **v3; // ecx + + v3 = (volatile signed __int32 **)(ecx0 + 9); + *(v3 - 9) = (volatile signed __int32 *)&off_519B58; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v3); + std::string::_M_dispose(ecx0 + 1); +} +// 519B58: using guessed type void (__cdecl *off_519B58)(WXSS::CSSTreeLib::Terminal *__hidden this); + +//----- (00446C6C) -------------------------------------------------------- +char __stdcall WXSS::CSSTreeLib::TrueRule::MarkGood( + WXSS::CSSTreeLib::TrueRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a2) +{ + *((_BYTE *)this + 116) = 1; + return 1; +} + +//----- (00446C7C) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::TrueRule::~TrueRule(void *a1) +{ + operator delete(a1); +} + +//----- (00446C90) -------------------------------------------------------- +char __userpurge WXSS::CSSTreeLib::ChildRule::MarkGood@( + int a1@, + WXSS::CSSTreeLib::ChildRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a3) +{ + unsigned int v3; // edi + int i; // ebx + char result; // al + int v6; // [esp+10h] [ebp-28h] + char v8; // [esp+1Fh] [ebp-19h] + + v3 = 0; + v8 = 1; + while ( (*((_DWORD *)this + 31) - *((_DWORD *)this + 30)) >> 3 > v3 ) + { + for ( i = *(_DWORD *)(a1 + 4); *(_DWORD *)(a1 + 8) != i; i += 32 ) + { + v6 = *(_DWORD *)(*((_DWORD *)this + 30) + 8 * v3); + if ( std::operator==(i, v6) ) + v8 &= (*(int (__thiscall **)(_DWORD, int))(**(_DWORD **)(i + 24) + 8))(*(_DWORD *)(i + 24), v6); + } + ++v3; + } + result = v8; + *((_BYTE *)this + 116) = v8; + return result; +} + +//----- (00446D10) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::ChildRule::~ChildRule(_DWORD *a1) +{ + WXSS::CSSTreeLib::ChildRule::~ChildRule(a1); + operator delete(a1); +} + +//----- (00446D2C) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::ChildRule::~ChildRule(_DWORD *a1) +{ + int v2; // edi + int v3; // esi + int v4; // ecx + + v2 = a1[2]; + v3 = a1[1]; + *a1 = &off_519B84; + while ( v2 != v3 ) + { + v4 = v3; + v3 += 32; + std::pair>::~pair(v4); + } + if ( a1[1] ) + operator delete((void *)a1[1]); +} +// 519B84: using guessed type void (__cdecl *off_519B84)(WXSS::CSSTreeLib::ChildRule *__hidden this); + +//----- (00446D6C) -------------------------------------------------------- +int __stdcall WXSS::CSSTreeLib::FalseRule::MarkGood( + WXSS::CSSTreeLib::FalseRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a2) +{ + *((_BYTE *)this + 116) = 0; + return 0; +} + +//----- (00446D7C) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::FalseRule::~FalseRule(void *a1) +{ + operator delete(a1); +} + +//----- (00446D90) -------------------------------------------------------- +int __userpurge WXSS::CSSTreeLib::RuleChain::MarkGood@( + int a1@, + WXSS::CSSTreeLib::RuleChain *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a3) +{ + int result; // eax + unsigned int i; // ebx + int v6; // ecx + int v7; // ecx + + result = 0; + for ( i = 0; ; ++i ) + { + v6 = *(_DWORD *)(a1 + 4); + if ( (*(_DWORD *)(a1 + 8) - v6) >> 3 <= i ) + break; + v7 = *(_DWORD *)(v6 + 8 * i); + result = (*(int (__thiscall **)(int, WXSS::CSSTreeLib::RuleChain *))(*(_DWORD *)v7 + 8))(v7, this); + } + *((_BYTE *)this + 116) = result; + return result; +} + +//----- (00446DD0) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::RuleChain::~RuleChain(void *a1) +{ + WXSS::CSSTreeLib::RuleChain::~RuleChain((int)a1); + operator delete(a1); +} + +//----- (00446DEC) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::RuleChain::~RuleChain(int a1) +{ + *(_DWORD *)a1 = &off_519BB4; + std::vector>::~vector((void **)(a1 + 4)); +} +// 519BB4: using guessed type void (__cdecl *off_519BB4)(WXSS::CSSTreeLib::RuleChain *__hidden this); + +//----- (00446DFC) -------------------------------------------------------- +char __userpurge WXSS::CSSTreeLib::SPNotRule::MarkGood@( + int a1@, + WXSS::CSSTreeLib::SPNotRule *this, + WXSS::CSSTreeLib::CSSSyntaxTree *a3) +{ + int v3; // edx + const char *Literal; // eax + + v3 = *((_DWORD *)this + 30); + if ( *((_DWORD *)this + 31) - v3 == 40 ) + { + Literal = WXSS::Token::GetLiteral((_DWORD *)(*(_DWORD *)(v3 + 8) + 24)); + if ( !__stricmp(Literal, off_50DF84) && !__stricmp(**(const char ***)(*((_DWORD *)this + 30) + 24), "SELECTOR") ) + (*(void (__thiscall **)(_DWORD, _DWORD))(**(_DWORD **)(a1 + 4) + 8))( + *(_DWORD *)(a1 + 4), + *(_DWORD *)(*((_DWORD *)this + 30) + 24)); + } + return 1; +} + +//----- (00446E70) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::SPNotRule::~SPNotRule(void *a1) +{ + WXSS::CSSTreeLib::SPNotRule::~SPNotRule((int)a1); + operator delete(a1); +} + +//----- (00446E8C) -------------------------------------------------------- +void __fastcall WXSS::CSSTreeLib::SPNotRule::~SPNotRule(int a1) +{ + *(_DWORD *)a1 = &off_519BCC; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 8)); +} +// 519BCC: using guessed type void (__cdecl *off_519BCC)(WXSS::CSSTreeLib::SPNotRule *__hidden this); + +//----- (00446E9C) -------------------------------------------------------- +_DWORD *__thiscall WXSS::Token::operator=(_DWORD *this, int a2) +{ + volatile signed __int32 **v3; // ecx + int i; // eax + + v3 = (volatile signed __int32 **)(this + 1); + *(v3 - 1) = *(volatile signed __int32 **)a2; + std::__shared_ptr::operator=(v3, (volatile signed __int32 **)(a2 + 4)); + this[3] = *(_DWORD *)(a2 + 12); + this[4] = *(_DWORD *)(a2 + 16); + this[5] = *(_DWORD *)(a2 + 20); + this[6] = *(_DWORD *)(a2 + 24); + for ( i = 28; i != 92; ++i ) + *((_BYTE *)this + i) = *(_BYTE *)(a2 + i); + return this; +} + +//----- (00446EF4) -------------------------------------------------------- +int __thiscall WXSS::Tokenizer::SubStrCheckingClause::SubStrCheckingClause(char *this, int a2, char *Source, int a4) +{ + int result; // eax + + *(_DWORD *)this = a2; + strcpy(this + 8, Source); + *((_DWORD *)this + 1) = strlen(Source); + result = a4; + *((_DWORD *)this + 6) = a4; + return result; +} + +//----- (00446F30) -------------------------------------------------------- +void __fastcall WXSS::XCompiler::~XCompiler(int a1) +{ + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree(a1 + 152); + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree(a1 + 128); + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree(a1 + 104); + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree(a1 + 80); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(*(_DWORD *)(a1 + 64)); + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(*(_DWORD *)(a1 + 40)); + std::string::_M_dispose((void **)(a1 + 8)); +} + +//----- (00446F80) -------------------------------------------------------- +void __fastcall __gnu_cxx::__scoped_lock::~__scoped_lock(int *a1) +{ + _DWORD *exception; // eax + + if ( _CRT_MT ) + { + if ( __gthr_win32_mutex_unlock(*a1) ) + { + exception = __cxa_allocate_exception(4u); + *exception = &off_519D0C; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'__gnu_cxx::__concurrence_unlock_error, + (void (__cdecl *)(void *))__gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error); + } + } +} +// 50B0F0: using guessed type int _CRT_MT; +// 515CD4: using guessed type int *`typeinfo for'__gnu_cxx::__concurrence_unlock_error; +// 519D0C: using guessed type void (__cdecl *off_519D0C)(__gnu_cxx::__concurrence_unlock_error *__hidden this); + +//----- (00447040) -------------------------------------------------------- +int __fastcall __gnu_cxx::stdio_filebuf::fd(int a1) +{ + return std::__basic_file::fd((FILE **)(a1 + 40)); +} + +//----- (00447050) -------------------------------------------------------- +int __fastcall __gnu_cxx::stdio_filebuf::file(int a1) +{ + return std::__basic_file::file(a1 + 40); +} + +//----- (00447070) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, FILE *a2, int a3, int a4) +{ + int v4; // eax + + std::filebuf::basic_filebuf((int)this); + *(_DWORD *)this = off_519BE4; + std::__basic_file::sys_open(this + 40, a2, a3); + if ( std::__basic_file::is_open((_DWORD *)this + 10) ) + { + *((_DWORD *)this + 12) = a3; + *((_DWORD *)this + 17) = a4; + std::filebuf::_M_allocate_internal_buffer((int)this); + *(_WORD *)(this + 73) = 0; + v4 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 1) = v4; + *((_DWORD *)this + 2) = v4; + *((_DWORD *)this + 3) = v4; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 6) = 0; + } +} +// 519BE4: using guessed type int (*off_519BE4[2])(); + +//----- (00447170) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, int FileHandle, int a3, int a4) +{ + int v4; // eax + + std::filebuf::basic_filebuf((int)this); + *(_DWORD *)this = off_519BE4; + std::__basic_file::sys_open((FILE **)this + 10, FileHandle, a3); + if ( std::__basic_file::is_open((_DWORD *)this + 10) ) + { + *((_DWORD *)this + 12) = a3; + *((_DWORD *)this + 17) = a4; + std::filebuf::_M_allocate_internal_buffer((int)this); + *(_WORD *)(this + 73) = 0; + v4 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 1) = v4; + *((_DWORD *)this + 2) = v4; + *((_DWORD *)this + 3) = v4; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 6) = 0; + } +} +// 519BE4: using guessed type int (*off_519BE4[2])(); + +//----- (00447280) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_filebuf::stdio_filebuf(_DWORD *a1) +{ + std::filebuf::basic_filebuf((int)a1); + *a1 = off_519BE4; +} +// 519BE4: using guessed type int (*off_519BE4[2])(); + +//----- (004472A0) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, FILE *a2, int a3, int a4) +{ + int v4; // eax + + std::filebuf::basic_filebuf((int)this); + *(_DWORD *)this = off_519BE4; + std::__basic_file::sys_open(this + 40, a2, a3); + if ( std::__basic_file::is_open((_DWORD *)this + 10) ) + { + *((_DWORD *)this + 12) = a3; + *((_DWORD *)this + 17) = a4; + std::filebuf::_M_allocate_internal_buffer((int)this); + *(_WORD *)(this + 73) = 0; + v4 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 1) = v4; + *((_DWORD *)this + 2) = v4; + *((_DWORD *)this + 3) = v4; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 6) = 0; + } +} +// 519BE4: using guessed type int (*off_519BE4[2])(); + +//----- (004473A0) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, int FileHandle, int a3, int a4) +{ + int v4; // eax + + std::filebuf::basic_filebuf((int)this); + *(_DWORD *)this = off_519BE4; + std::__basic_file::sys_open((FILE **)this + 10, FileHandle, a3); + if ( std::__basic_file::is_open((_DWORD *)this + 10) ) + { + *((_DWORD *)this + 12) = a3; + *((_DWORD *)this + 17) = a4; + std::filebuf::_M_allocate_internal_buffer((int)this); + *(_WORD *)(this + 73) = 0; + v4 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 1) = v4; + *((_DWORD *)this + 2) = v4; + *((_DWORD *)this + 3) = v4; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 6) = 0; + } +} +// 519BE4: using guessed type int (*off_519BE4[2])(); + +//----- (004474B0) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_filebuf::stdio_filebuf(_DWORD *a1) +{ + std::filebuf::basic_filebuf((int)a1); + *a1 = off_519BE4; +} +// 519BE4: using guessed type int (*off_519BE4[2])(); + +//----- (004474D0) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA50; + std::filebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51ADD4; + std::locale::~locale((_DWORD **)a1 + 7); + operator delete(a1); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (00447580) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA50; + std::filebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51ADD4; + std::locale::~locale((_DWORD **)a1 + 7); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (00447620) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA50; + std::filebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51ADD4; + std::locale::~locale((_DWORD **)a1 + 7); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004476C0) -------------------------------------------------------- +int __fastcall __gnu_cxx::stdio_filebuf::fd(int a1) +{ + return std::__basic_file::fd((FILE **)(a1 + 40)); +} + +//----- (004476D0) -------------------------------------------------------- +int __fastcall __gnu_cxx::stdio_filebuf::file(int a1) +{ + return std::__basic_file::file(a1 + 40); +} + +//----- (004476F0) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, FILE *a2, int a3, int a4) +{ + int v4; // eax + + std::wfilebuf::basic_filebuf((int)this); + *(_DWORD *)this = off_519C24; + std::__basic_file::sys_open(this + 40, a2, a3); + if ( std::__basic_file::is_open((_DWORD *)this + 10) ) + { + *((_DWORD *)this + 12) = a3; + *((_DWORD *)this + 17) = a4; + std::wfilebuf::_M_allocate_internal_buffer((int)this); + *(_WORD *)(this + 73) = 0; + v4 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 1) = v4; + *((_DWORD *)this + 2) = v4; + *((_DWORD *)this + 3) = v4; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 6) = 0; + } +} +// 519C24: using guessed type int (*off_519C24[2])(); + +//----- (004477F0) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, int FileHandle, int a3, int a4) +{ + int v4; // eax + + std::wfilebuf::basic_filebuf((int)this); + *(_DWORD *)this = off_519C24; + std::__basic_file::sys_open((FILE **)this + 10, FileHandle, a3); + if ( std::__basic_file::is_open((_DWORD *)this + 10) ) + { + *((_DWORD *)this + 12) = a3; + *((_DWORD *)this + 17) = a4; + std::wfilebuf::_M_allocate_internal_buffer((int)this); + *(_WORD *)(this + 73) = 0; + v4 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 1) = v4; + *((_DWORD *)this + 2) = v4; + *((_DWORD *)this + 3) = v4; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 6) = 0; + } +} +// 519C24: using guessed type int (*off_519C24[2])(); + +//----- (00447900) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_filebuf::stdio_filebuf(_DWORD *a1) +{ + std::wfilebuf::basic_filebuf((int)a1); + *a1 = off_519C24; +} +// 519C24: using guessed type int (*off_519C24[2])(); + +//----- (00447920) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, FILE *a2, int a3, int a4) +{ + int v4; // eax + + std::wfilebuf::basic_filebuf((int)this); + *(_DWORD *)this = off_519C24; + std::__basic_file::sys_open(this + 40, a2, a3); + if ( std::__basic_file::is_open((_DWORD *)this + 10) ) + { + *((_DWORD *)this + 12) = a3; + *((_DWORD *)this + 17) = a4; + std::wfilebuf::_M_allocate_internal_buffer((int)this); + *(_WORD *)(this + 73) = 0; + v4 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 1) = v4; + *((_DWORD *)this + 2) = v4; + *((_DWORD *)this + 3) = v4; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 6) = 0; + } +} +// 519C24: using guessed type int (*off_519C24[2])(); + +//----- (00447A20) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_filebuf::stdio_filebuf(char *this, int FileHandle, int a3, int a4) +{ + int v4; // eax + + std::wfilebuf::basic_filebuf((int)this); + *(_DWORD *)this = off_519C24; + std::__basic_file::sys_open((FILE **)this + 10, FileHandle, a3); + if ( std::__basic_file::is_open((_DWORD *)this + 10) ) + { + *((_DWORD *)this + 12) = a3; + *((_DWORD *)this + 17) = a4; + std::wfilebuf::_M_allocate_internal_buffer((int)this); + *(_WORD *)(this + 73) = 0; + v4 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 1) = v4; + *((_DWORD *)this + 2) = v4; + *((_DWORD *)this + 3) = v4; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 6) = 0; + } +} +// 519C24: using guessed type int (*off_519C24[2])(); + +//----- (00447B30) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_filebuf::stdio_filebuf(_DWORD *a1) +{ + std::wfilebuf::basic_filebuf((int)a1); + *a1 = off_519C24; +} +// 519C24: using guessed type int (*off_519C24[2])(); + +//----- (00447B50) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA90; + std::wfilebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51AE14; + std::locale::~locale((_DWORD **)a1 + 7); + operator delete(a1); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (00447C00) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA90; + std::wfilebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51AE14; + std::locale::~locale((_DWORD **)a1 + 7); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (00447CA0) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_filebuf::~stdio_filebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA90; + std::wfilebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51AE14; + std::locale::~locale((_DWORD **)a1 + 7); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (00447D40) -------------------------------------------------------- +int __cdecl __gnu_cxx::__concat_size_t(char *a1, unsigned int a2, unsigned int a3) +{ + void *v4; // esp + void *v5; // esp + _BYTE *v6; // ebx + unsigned int v7; // eax + int v8; // esi + int v10; // [esp-10h] [ebp-48h] BYREF + _BYTE v11[28]; // [esp-4h] [ebp-3Ch] BYREF + int *v12; // [esp+18h] [ebp-20h] + _BYTE *v13; // [esp+1Ch] [ebp-1Ch] + + v4 = alloca(32); + v5 = alloca(32); + v12 = &v10; + v13 = v11; + v6 = v11; + do + { + *--v6 = byte_512239[a3 % 0xA]; + v7 = a3; + a3 /= 0xAu; + } + while ( v7 > 9 ); + v8 = v13 - v6; + if ( v13 - v6 > a2 ) + return -1; + memcpy(a1, (char *)v12 - v8 + 12, v13 - v6); + return v8; +} + +//----- (00447DD0) -------------------------------------------------------- +int __cdecl __gnu_cxx::__snprintf_lite(char *a1, unsigned int a2, const char *a3, char *a4) +{ + const char *Src; // edx + const char *v5; // esi + const char *v7; // edi + char *v8; // ebx + char v9; // al + char v10; // al + char *v11; // ebp + int v12; // eax + int result; // eax + char *v14; // ebp + char *v15; // ecx + char v16; // al + char *v17; // [esp+30h] [ebp+4h] + + Src = a1; + v5 = a3; + v7 = &a1[a2 - 1]; + v8 = a1; + v9 = *a3; + if ( !*a3 ) + { + result = 0; + goto LABEL_17; + } + if ( a1 >= v7 ) +LABEL_26: + __gnu_cxx::__throw_insufficient_space(Src, v8); + while ( 1 ) + { + if ( v9 != 37 ) + goto LABEL_4; + v10 = v5[1]; + if ( v10 == 115 ) + { + v14 = a4 + 4; + v15 = *(char **)a4; + v16 = *v15; + if ( *v15 ) + { + if ( v7 <= v8 ) + { + v7 = v8; +LABEL_24: + __gnu_cxx::__throw_insufficient_space(Src, v7); + } + while ( 1 ) + { + ++v15; + *v8++ = v16; + v16 = *v15; + if ( !*v15 ) + break; + if ( v7 == v8 ) + goto LABEL_24; + } + } + v5 += 2; + a4 = v14; + goto LABEL_6; + } + if ( v10 != 122 ) + { + if ( v10 == 37 ) + ++v5; + else +LABEL_4: + v10 = *v5; + *v8 = v10; + ++v5; + ++v8; +LABEL_6: + v9 = *v5; + if ( !*v5 ) + break; + goto LABEL_7; + } + if ( v5[2] != 117 ) + goto LABEL_4; + v11 = a4 + 4; + v17 = (char *)Src; + v12 = __gnu_cxx::__concat_size_t(v8, v7 - v8, *(_DWORD *)a4); + Src = v17; + if ( v12 <= 0 ) + goto LABEL_26; + v5 += 3; + v8 += v12; + a4 = v11; + v9 = *v5; + if ( !*v5 ) + break; +LABEL_7: + if ( v8 >= v7 ) + goto LABEL_26; + } + result = v8 - Src; +LABEL_17: + *v8 = 0; + return result; +} + +//----- (00447EF0) -------------------------------------------------------- +int __fastcall __gnu_cxx::stdio_sync_filebuf::file(int a1) +{ + return *(_DWORD *)(a1 + 32); +} + +//----- (00447F00) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::swap(int this, int a2) +{ + int v3; // eax + int v4; // edx + int v5; // eax + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // edx + int v11; // eax + int v12; // edx + int v13; // eax + int v14; // eax + int v15; // edx + int result; // eax + const std::locale *v17; // [esp+4h] [ebp-48h] + volatile signed __int32 **v18; // [esp+1Ch] [ebp-30h] + _DWORD *v19[8]; // [esp+2Ch] [ebp-20h] BYREF + + v3 = *(_DWORD *)(this + 4); + *(_DWORD *)(this + 4) = *(_DWORD *)(a2 + 4); + v4 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a2 + 4) = v3; + v5 = *(_DWORD *)(this + 8); + *(_DWORD *)(this + 8) = v4; + v6 = *(_DWORD *)(a2 + 12); + *(_DWORD *)(a2 + 8) = v5; + v7 = *(_DWORD *)(this + 12); + *(_DWORD *)(this + 12) = v6; + v8 = *(_DWORD *)(a2 + 16); + *(_DWORD *)(a2 + 12) = v7; + v9 = *(_DWORD *)(this + 16); + *(_DWORD *)(this + 16) = v8; + v10 = *(_DWORD *)(a2 + 20); + *(_DWORD *)(a2 + 16) = v9; + v11 = *(_DWORD *)(this + 20); + *(_DWORD *)(this + 20) = v10; + v12 = *(_DWORD *)(a2 + 24); + *(_DWORD *)(a2 + 20) = v11; + v13 = *(_DWORD *)(this + 24); + *(_DWORD *)(this + 24) = v12; + *(_DWORD *)(a2 + 24) = v13; + v18 = (volatile signed __int32 **)(this + 28); + std::locale::locale((volatile signed __int32 **)v19, (volatile signed __int32 **)(this + 28), v17); + std::locale::operator=(v18, (volatile signed __int32 **)(a2 + 28)); + std::locale::operator=((volatile signed __int32 **)(a2 + 28), (volatile signed __int32 **)v19); + std::locale::~locale(v19); + v14 = *(_DWORD *)(this + 32); + *(_DWORD *)(this + 32) = *(_DWORD *)(a2 + 32); + v15 = *(_DWORD *)(a2 + 36); + *(_DWORD *)(a2 + 32) = v14; + result = *(_DWORD *)(this + 36); + *(_DWORD *)(this + 36) = v15; + *(_DWORD *)(a2 + 36) = result; + return result; +} +// 447F68: variable 'v17' is possibly undefined + +//----- (00447FC0) -------------------------------------------------------- +int __fastcall __gnu_cxx::stdio_sync_filebuf::sync(int a1) +{ + return fflush(*(FILE **)(a1 + 32)); +} + +//----- (00447FE0) -------------------------------------------------------- +int __fastcall __gnu_cxx::stdio_sync_filebuf::uflow(int a1) +{ + int result; // eax + + result = getc(*(FILE **)(a1 + 32)); + *(_DWORD *)(a1 + 36) = result; + return result; +} + +//----- (00448000) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::xsgetn(int this, char *Buffer, size_t ElementCount) +{ + int result; // eax + int v5; // edx + + result = fread(Buffer, 1u, ElementCount, *(FILE **)(this + 32)); + v5 = -1; + if ( result > 0 ) + v5 = (unsigned __int8)Buffer[result - 1]; + *(_DWORD *)(this + 36) = v5; + return result; +} + +//----- (00448050) -------------------------------------------------------- +size_t __thiscall __gnu_cxx::stdio_sync_filebuf::xsputn(FILE **this, void *Buffer, size_t ElementCount) +{ + return fwrite(Buffer, 1u, ElementCount, this[8]); +} + +//----- (00448080) -------------------------------------------------------- +_DWORD *__thiscall __gnu_cxx::stdio_sync_filebuf::seekoff(_DWORD *this, int a2, fpos_t a3, int a4, int a5) +{ + int v6; // ecx + fpos_t v8; // rax + + *this = -1; + this[1] = -1; + this[2] = 0; + v6 = 0; + if ( a4 ) + v6 = (a4 != 1) + 1; + if ( !fseeko64(*(FILE **)(a2 + 32), a3, v6) ) + { + v8 = ftello64((FILE *)*(_DWORD *)(a2 + 32)); + this[2] = 0; + *(_QWORD *)this = v8; + } + return this; +} + +//----- (00448110) -------------------------------------------------------- +_DWORD *__thiscall __gnu_cxx::stdio_sync_filebuf::seekpos( + _DWORD *this, + FILE **a2, + fpos_t a3, + int a4, + int a5, + int a6) +{ + _DWORD *(__thiscall *file)(_DWORD *, int, fpos_t, int, int); // edi + fpos_t v9; // rax + + file = (_DWORD *(__thiscall *)(_DWORD *, int, fpos_t, int, int))(*a2)->_file; + if ( file == __gnu_cxx::stdio_sync_filebuf::seekoff ) + { + *this = -1; + this[1] = -1; + this[2] = 0; + if ( !fseeko64(a2[8], a3, 0) ) + { + v9 = ftello64(a2[8]); + this[2] = 0; + *(_QWORD *)this = v9; + } + return this; + } + else + { + ((void (__thiscall *)(_DWORD *, FILE **, _DWORD, _DWORD, _DWORD, int))file)(this, a2, a3, HIDWORD(a3), 0, a6); + return this; + } +} + +//----- (004481F0) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::overflow(FILE **this, int Character) +{ + if ( Character == -1 ) + return -(fflush(this[8]) != 0); + else + return putc(Character, this[8]); +} + +//----- (00448230) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::pbackfail(int this, int a2) +{ + int result; // eax + + result = a2; + if ( a2 != -1 || (result = *(_DWORD *)(this + 36), result != -1) ) + result = ungetc(result, *(FILE **)(this + 32)); + *(_DWORD *)(this + 36) = -1; + return result; +} + +//----- (00448270) -------------------------------------------------------- +int __fastcall __gnu_cxx::stdio_sync_filebuf::underflow(int a1) +{ + int v2; // eax + + v2 = getc(*(FILE **)(a1 + 32)); + return ungetc(v2, *(FILE **)(a1 + 32)); +} + +//----- (004482A0) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, std::locale *a2) +{ + int v3; // eax + int v4; // eax + const std::locale *v5; // [esp+8h] [ebp-58h] + + std::streambuf::basic_streambuf(this, a2, v5); + v3 = *((_DWORD *)a2 + 8); + *this = &off_519C64; + *((_DWORD *)a2 + 8) = 0; + this[8] = v3; + v4 = *((_DWORD *)a2 + 9); + *((_DWORD *)a2 + 9) = -1; + this[9] = v4; +} +// 4482D5: variable 'v5' is possibly undefined +// 519C64: using guessed type int (*off_519C64)(); + +//----- (00448310) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, int a2) +{ + _DWORD *v3; // ecx + int result; // eax + + v3 = this + 7; + *(v3 - 7) = &off_51ADD4; + *(v3 - 6) = 0; + *(v3 - 5) = 0; + *(v3 - 4) = 0; + *(v3 - 3) = 0; + *(v3 - 2) = 0; + *(v3 - 1) = 0; + std::locale::locale(v3); + result = a2; + *this = &off_519C64; + this[9] = -1; + this[8] = a2; + return result; +} +// 519C64: using guessed type int (*off_519C64)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (00448370) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, std::locale *a2) +{ + int v3; // eax + int v4; // eax + const std::locale *v5; // [esp+8h] [ebp-58h] + + std::streambuf::basic_streambuf(this, a2, v5); + v3 = *((_DWORD *)a2 + 8); + *this = &off_519C64; + *((_DWORD *)a2 + 8) = 0; + this[8] = v3; + v4 = *((_DWORD *)a2 + 9); + *((_DWORD *)a2 + 9) = -1; + this[9] = v4; +} +// 4483A5: variable 'v5' is possibly undefined +// 519C64: using guessed type int (*off_519C64)(); + +//----- (004483E0) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, int a2) +{ + _DWORD *v3; // ecx + int result; // eax + + v3 = this + 7; + *(v3 - 7) = &off_51ADD4; + *(v3 - 6) = 0; + *(v3 - 5) = 0; + *(v3 - 4) = 0; + *(v3 - 3) = 0; + *(v3 - 2) = 0; + *(v3 - 1) = 0; + std::locale::locale(v3); + result = a2; + *this = &off_519C64; + this[9] = -1; + this[8] = a2; + return result; +} +// 519C64: using guessed type int (*off_519C64)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (00448440) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_sync_filebuf::~stdio_sync_filebuf(char *Block) +{ + char *v2; // ecx + + v2 = Block + 28; + *((_DWORD *)v2 - 7) = &off_51ADD4; + std::locale::~locale((_DWORD **)v2); + operator delete(Block); +} +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (00448470) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_sync_filebuf::~stdio_sync_filebuf(int a1) +{ + *(_DWORD *)a1 = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 28)); +} +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (00448480) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::operator=(int this, int a2) +{ + int v3; // eax + int v4; // eax + + std::streambuf::operator=((volatile signed __int32 **)this, a2); + v3 = *(_DWORD *)(a2 + 32); + *(_DWORD *)(a2 + 32) = 0; + *(_DWORD *)(this + 32) = v3; + v4 = *(_DWORD *)(a2 + 36); + *(_DWORD *)(a2 + 36) = -1; + *(_DWORD *)(this + 36) = v4; + return this; +} + +//----- (004484F0) -------------------------------------------------------- +int __fastcall __gnu_cxx::stdio_sync_filebuf::file(int a1) +{ + return *(_DWORD *)(a1 + 32); +} + +//----- (00448500) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::swap(int this, int a2) +{ + int v3; // eax + int v4; // edx + int v5; // eax + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // edx + int v11; // eax + int v12; // edx + int v13; // eax + int v14; // eax + __int16 v15; // dx + int result; // eax + const std::locale *v17; // [esp+4h] [ebp-48h] + volatile signed __int32 **v18; // [esp+1Ch] [ebp-30h] + _DWORD *v19[8]; // [esp+2Ch] [ebp-20h] BYREF + + v3 = *(_DWORD *)(this + 4); + *(_DWORD *)(this + 4) = *(_DWORD *)(a2 + 4); + v4 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a2 + 4) = v3; + v5 = *(_DWORD *)(this + 8); + *(_DWORD *)(this + 8) = v4; + v6 = *(_DWORD *)(a2 + 12); + *(_DWORD *)(a2 + 8) = v5; + v7 = *(_DWORD *)(this + 12); + *(_DWORD *)(this + 12) = v6; + v8 = *(_DWORD *)(a2 + 16); + *(_DWORD *)(a2 + 12) = v7; + v9 = *(_DWORD *)(this + 16); + *(_DWORD *)(this + 16) = v8; + v10 = *(_DWORD *)(a2 + 20); + *(_DWORD *)(a2 + 16) = v9; + v11 = *(_DWORD *)(this + 20); + *(_DWORD *)(this + 20) = v10; + v12 = *(_DWORD *)(a2 + 24); + *(_DWORD *)(a2 + 20) = v11; + v13 = *(_DWORD *)(this + 24); + *(_DWORD *)(this + 24) = v12; + *(_DWORD *)(a2 + 24) = v13; + v18 = (volatile signed __int32 **)(this + 28); + std::locale::locale((volatile signed __int32 **)v19, (volatile signed __int32 **)(this + 28), v17); + std::locale::operator=(v18, (volatile signed __int32 **)(a2 + 28)); + std::locale::operator=((volatile signed __int32 **)(a2 + 28), (volatile signed __int32 **)v19); + std::locale::~locale(v19); + v14 = *(_DWORD *)(this + 32); + *(_DWORD *)(this + 32) = *(_DWORD *)(a2 + 32); + v15 = *(_WORD *)(a2 + 36); + *(_DWORD *)(a2 + 32) = v14; + result = *(unsigned __int16 *)(this + 36); + *(_WORD *)(this + 36) = v15; + *(_WORD *)(a2 + 36) = result; + return result; +} +// 448568: variable 'v17' is possibly undefined + +//----- (004485C0) -------------------------------------------------------- +int __fastcall __gnu_cxx::stdio_sync_filebuf::sync(int a1) +{ + return fflush(*(FILE **)(a1 + 32)); +} + +//----- (004485E0) -------------------------------------------------------- +wint_t __fastcall __gnu_cxx::stdio_sync_filebuf::uflow(int a1) +{ + wint_t result; // ax + + result = getwc(*(FILE **)(a1 + 32)); + *(_WORD *)(a1 + 36) = result; + return result; +} + +//----- (00448600) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::xsgetn(int this, int a2, int a3) +{ + int v4; // edi + wint_t v5; // ax + + v4 = 0; + if ( a3 ) + { + while ( 1 ) + { + v5 = getwc(*(FILE **)(this + 32)); + if ( v5 == 0xFFFF ) + break; + *(_WORD *)(a2 + 2 * v4++) = v5; + if ( a3 == v4 ) + goto LABEL_7; + } + if ( !v4 ) + goto LABEL_6; +LABEL_7: + *(_WORD *)(this + 36) = *(_WORD *)(a2 + 2 * v4 - 2); + return v4; + } + else + { +LABEL_6: + *(_WORD *)(this + 36) = -1; + return 0; + } +} + +//----- (00448680) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::xsputn(FILE **this, int a2, int a3) +{ + int i; // ebx + + if ( !a3 ) + return 0; + for ( i = 0; i != a3; ++i ) + { + if ( putwc(*(_WORD *)(a2 + 2 * i), this[8]) == 0xFFFF ) + break; + } + return i; +} + +//----- (004486D0) -------------------------------------------------------- +_DWORD *__thiscall __gnu_cxx::stdio_sync_filebuf::seekoff(_DWORD *this, int a2, fpos_t a3, int a4, int a5) +{ + int v6; // ecx + fpos_t v8; // rax + + *this = -1; + this[1] = -1; + this[2] = 0; + v6 = 0; + if ( a4 ) + v6 = (a4 != 1) + 1; + if ( !fseeko64(*(FILE **)(a2 + 32), a3, v6) ) + { + v8 = ftello64((FILE *)*(_DWORD *)(a2 + 32)); + this[2] = 0; + *(_QWORD *)this = v8; + } + return this; +} + +//----- (00448760) -------------------------------------------------------- +_DWORD *__thiscall __gnu_cxx::stdio_sync_filebuf::seekpos( + _DWORD *this, + FILE **a2, + fpos_t a3, + int a4, + int a5, + int a6) +{ + _DWORD *(__thiscall *file)(_DWORD *, int, fpos_t, int, int); // edi + fpos_t v9; // rax + + file = (_DWORD *(__thiscall *)(_DWORD *, int, fpos_t, int, int))(*a2)->_file; + if ( file == __gnu_cxx::stdio_sync_filebuf::seekoff ) + { + *this = -1; + this[1] = -1; + this[2] = 0; + if ( !fseeko64(a2[8], a3, 0) ) + { + v9 = ftello64(a2[8]); + this[2] = 0; + *(_QWORD *)this = v9; + } + return this; + } + else + { + ((void (__thiscall *)(_DWORD *, FILE **, _DWORD, _DWORD, _DWORD, int))file)(this, a2, a3, HIDWORD(a3), 0, a6); + return this; + } +} + +//----- (00448840) -------------------------------------------------------- +__int16 __thiscall __gnu_cxx::stdio_sync_filebuf::overflow(FILE **this, wchar_t Character) +{ + int v2; // eax + + if ( Character == 0xFFFF ) + return -(fflush(this[8]) != 0); + else + LOWORD(v2) = putwc(Character, this[8]); + return v2; +} + +//----- (00448880) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::pbackfail(int this, wint_t Character) +{ + int result; // eax + + if ( Character == 0xFFFF ) + { + result = *(unsigned __int16 *)(this + 36); + if ( (_WORD)result != 0xFFFF ) + LOWORD(result) = ungetwc(*(_WORD *)(this + 36), *(FILE **)(this + 32)); + *(_WORD *)(this + 36) = -1; + } + else + { + LOWORD(result) = ungetwc(Character, *(FILE **)(this + 32)); + *(_WORD *)(this + 36) = -1; + } + return result; +} + +//----- (004488F0) -------------------------------------------------------- +wint_t __fastcall __gnu_cxx::stdio_sync_filebuf::underflow(int a1) +{ + wint_t v2; // ax + + v2 = getwc(*(FILE **)(a1 + 32)); + return ungetwc(v2, *(FILE **)(a1 + 32)); +} + +//----- (00448920) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(int this, std::locale *a2) +{ + int v3; // eax + const std::locale *v4; // [esp+8h] [ebp-58h] + + std::wstreambuf::basic_streambuf((_DWORD *)this, a2, v4); + v3 = *((_DWORD *)a2 + 8); + *(_DWORD *)this = &off_519CA4; + *((_DWORD *)a2 + 8) = 0; + *(_DWORD *)(this + 32) = v3; + *(_WORD *)(this + 36) = *((_WORD *)a2 + 18); + *((_WORD *)a2 + 18) = -1; +} +// 448955: variable 'v4' is possibly undefined +// 519CA4: using guessed type int (*off_519CA4)(); + +//----- (004489A0) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, int a2) +{ + _DWORD *v3; // ecx + int result; // eax + + v3 = this + 7; + *(v3 - 7) = &off_51AE14; + *(v3 - 6) = 0; + *(v3 - 5) = 0; + *(v3 - 4) = 0; + *(v3 - 3) = 0; + *(v3 - 2) = 0; + *(v3 - 1) = 0; + std::locale::locale(v3); + *this = &off_519CA4; + this[8] = a2; + result = -1; + *((_WORD *)this + 18) = -1; + return result; +} +// 519CA4: using guessed type int (*off_519CA4)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (00448A00) -------------------------------------------------------- +void __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(int this, std::locale *a2) +{ + int v3; // eax + const std::locale *v4; // [esp+8h] [ebp-58h] + + std::wstreambuf::basic_streambuf((_DWORD *)this, a2, v4); + v3 = *((_DWORD *)a2 + 8); + *(_DWORD *)this = &off_519CA4; + *((_DWORD *)a2 + 8) = 0; + *(_DWORD *)(this + 32) = v3; + *(_WORD *)(this + 36) = *((_WORD *)a2 + 18); + *((_WORD *)a2 + 18) = -1; +} +// 448A35: variable 'v4' is possibly undefined +// 519CA4: using guessed type int (*off_519CA4)(); + +//----- (00448A80) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::stdio_sync_filebuf(_DWORD *this, int a2) +{ + _DWORD *v3; // ecx + int result; // eax + + v3 = this + 7; + *(v3 - 7) = &off_51AE14; + *(v3 - 6) = 0; + *(v3 - 5) = 0; + *(v3 - 4) = 0; + *(v3 - 3) = 0; + *(v3 - 2) = 0; + *(v3 - 1) = 0; + std::locale::locale(v3); + *this = &off_519CA4; + this[8] = a2; + result = -1; + *((_WORD *)this + 18) = -1; + return result; +} +// 519CA4: using guessed type int (*off_519CA4)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (00448AE0) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_sync_filebuf::~stdio_sync_filebuf(char *Block) +{ + char *v2; // ecx + + v2 = Block + 28; + *((_DWORD *)v2 - 7) = &off_51AE14; + std::locale::~locale((_DWORD **)v2); + operator delete(Block); +} +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (00448B10) -------------------------------------------------------- +void __fastcall __gnu_cxx::stdio_sync_filebuf::~stdio_sync_filebuf(int a1) +{ + *(_DWORD *)a1 = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 28)); +} +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (00448B20) -------------------------------------------------------- +int __thiscall __gnu_cxx::stdio_sync_filebuf::operator=(int this, int a2) +{ + int v3; // eax + + std::wstreambuf::operator=((volatile signed __int32 **)this, a2); + v3 = *(_DWORD *)(a2 + 32); + *(_DWORD *)(a2 + 32) = 0; + *(_DWORD *)(this + 32) = v3; + LOWORD(v3) = *(_WORD *)(a2 + 36); + *(_WORD *)(a2 + 36) = -1; + *(_WORD *)(this + 36) = v3; + return this; +} + +//----- (00448B90) -------------------------------------------------------- +void __fastcall __gnu_cxx::recursive_init_error::recursive_init_error(_DWORD *a1) +{ + *a1 = &off_519CE4; +} +// 519CE4: using guessed type void (__cdecl *off_519CE4)(__gnu_cxx::recursive_init_error *__hidden this); + +//----- (00448BA0) -------------------------------------------------------- +void __fastcall __gnu_cxx::recursive_init_error::~recursive_init_error(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_519CE4; + std::exception::~exception(Block); + operator delete(a1); +} +// 448BAC: variable 'Block' is possibly undefined +// 519CE4: using guessed type void (__cdecl *off_519CE4)(__gnu_cxx::recursive_init_error *__hidden this); + +//----- (00448BD0) -------------------------------------------------------- +void __cdecl __gnu_cxx::recursive_init_error::~recursive_init_error(std::exception *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_519CE4; + std::exception::~exception(a1); +} +// 448BD0: variable 'v1' is possibly undefined +// 519CE4: using guessed type void (__cdecl *off_519CE4)(__gnu_cxx::recursive_init_error *__hidden this); + +//----- (00448BE0) -------------------------------------------------------- +void __fastcall __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_519CF8; + std::exception::~exception(Block); + operator delete(a1); +} +// 448BEC: variable 'Block' is possibly undefined +// 519CF8: using guessed type void (__cdecl *off_519CF8)(__gnu_cxx::__concurrence_lock_error *__hidden this); + +//----- (00448C10) -------------------------------------------------------- +void __cdecl __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error(std::exception *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_519CF8; + std::exception::~exception(a1); +} +// 448C10: variable 'v1' is possibly undefined +// 519CF8: using guessed type void (__cdecl *off_519CF8)(__gnu_cxx::__concurrence_lock_error *__hidden this); + +//----- (00448C20) -------------------------------------------------------- +void __fastcall __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_519D0C; + std::exception::~exception(Block); + operator delete(a1); +} +// 448C2C: variable 'Block' is possibly undefined +// 519D0C: using guessed type void (__cdecl *off_519D0C)(__gnu_cxx::__concurrence_unlock_error *__hidden this); + +//----- (00448C50) -------------------------------------------------------- +void __cdecl __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error(std::exception *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_519D0C; + std::exception::~exception(a1); +} +// 448C50: variable 'v1' is possibly undefined +// 519D0C: using guessed type void (__cdecl *off_519D0C)(__gnu_cxx::__concurrence_unlock_error *__hidden this); + +//----- (00448C60) -------------------------------------------------------- +void __cdecl __noreturn __gnu_cxx::__throw_insufficient_space(const char *Src, const char *a2) +{ + void *v2; // esp + void *v3; // esp + int v4[38]; // [esp+10h] [ebp-98h] BYREF + + HIBYTE(v4[5]) = unk_5121D0; + strcpy((char *)&v4[31], " "); + strcpy( + (char *)&v4[6], + "ot enough space for format expansion (Please submit full bug report at https://gcc.gnu.org/bugs/):\n "); + v2 = alloca(a2 - Src + 117); + v3 = alloca(a2 - Src + 117); + qmemcpy(v4, (char *)&v4[5] + 3, 0x68u); + memcpy(&v4[26], Src, a2 - Src); + *((_BYTE *)&v4[26] + v4[3]) = 0; + std::__throw_logic_error((std::logic_error *)v4); +} + +//----- (00448CF0) -------------------------------------------------------- +void __noreturn __gnu_cxx::__verbose_terminate_handler(void) +{ + struct type_info *v0; // eax + _BYTE *v1; // edx + bool v2; // zf + FILE *v3; // eax + FILE *v4; // eax + FILE *v5; // eax + FILE *v6; // eax + FILE *v7; // eax + FILE *v8; // eax + FILE *(__cdecl *v9)(unsigned int); // [esp+10h] [ebp-5Ch] + char *Block; // [esp+14h] [ebp-58h] + char *Buffer; // [esp+18h] [ebp-54h] + int status[4]; // [esp+5Ch] [ebp-10h] BYREF + + if ( !__gnu_cxx::__verbose_terminate_handler(void)::terminating ) + { + __gnu_cxx::__verbose_terminate_handler(void)::terminating = 1; + v0 = __cxa_current_exception_type(); + if ( v0 ) + { + v1 = (_BYTE *)*((_DWORD *)v0 + 1); + v2 = *v1 == 42; + status[0] = -1; + Buffer = &v1[v2]; + Block = __cxa_demangle(Buffer, 0, 0, status); + v9 = ___acrt_iob_func; + v3 = ___acrt_iob_func(2u); + fwrite("terminate called after throwing an instance of '", 1u, 0x30u, v3); + if ( status[0] ) + { + v4 = v9(2u); + fputs(Buffer, v4); + } + else + { + v6 = v9(2u); + fputs(Block, v6); + } + v5 = v9(2u); + fwrite("'\n", 1u, 2u, v5); + if ( !status[0] ) + free(Block); + __cxa_rethrow(); + } + v7 = ___acrt_iob_func(2u); + fwrite("terminate called without an active exception\n", 1u, 0x2Du, v7); + abort(); + } + v8 = ___acrt_iob_func(2u); + fwrite("terminate called recursively\n", 1u, 0x1Du, v8); + abort(); +} +// 50CC10: using guessed type char __gnu_cxx::__verbose_terminate_handler(void)::terminating; +// 448CF0: using guessed type int status[4]; + +//----- (00448FC0) -------------------------------------------------------- +void __noreturn __gnu_cxx::__throw_concurrence_lock_error(void) +{ + _DWORD *exception; // eax + + exception = __cxa_allocate_exception(4u); + *exception = &off_519CF8; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'__gnu_cxx::__concurrence_lock_error, + (void (__cdecl *)(void *))__gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error); +} +// 515CC8: using guessed type int *`typeinfo for'__gnu_cxx::__concurrence_lock_error; +// 519CF8: using guessed type void (__cdecl *off_519CF8)(__gnu_cxx::__concurrence_lock_error *__hidden this); + +//----- (00448FF0) -------------------------------------------------------- +void __noreturn __gnu_cxx::__throw_concurrence_unlock_error(void) +{ + _DWORD *exception; // eax + + exception = __cxa_allocate_exception(4u); + *exception = &off_519D0C; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'__gnu_cxx::__concurrence_unlock_error, + (void (__cdecl *)(void *))__gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error); +} +// 515CD4: using guessed type int *`typeinfo for'__gnu_cxx::__concurrence_unlock_error; +// 519D0C: using guessed type void (__cdecl *off_519D0C)(__gnu_cxx::__concurrence_unlock_error *__hidden this); + +//----- (00449020) -------------------------------------------------------- +void __gnu_cxx::__freeres(void) +{ + if ( Block ) + { + free(Block); + Block = 0; + } +} + +//----- (00449050) -------------------------------------------------------- +bool __cdecl __gnu_cxx::operator==(_DWORD *a1, _DWORD *a2) +{ + return *a1 == *a2; +} + +//----- (00449060) -------------------------------------------------------- +bool __cdecl __gnu_cxx::operator==(_DWORD *a1, _DWORD *a2) +{ + return *a1 == *a2; +} + +//----- (00449070) -------------------------------------------------------- +bool __cdecl __gnu_cxx::operator==(_DWORD *a1, _DWORD *a2) +{ + return *a1 == *a2; +} + +//----- (00449080) -------------------------------------------------------- +bool __cdecl __gnu_cxx::operator==(_DWORD *a1, _DWORD *a2) +{ + return *a1 == *a2; +} + +//----- (00449090) -------------------------------------------------------- +bool __cdecl __gnu_cxx::operator==(_DWORD *a1, _DWORD *a2) +{ + return *a1 == *a2; +} + +//----- (004490A0) -------------------------------------------------------- +bool __cdecl __gnu_cxx::operator==(_DWORD *a1, _DWORD *a2) +{ + return *a1 == *a2; +} + +//----- (004490B0) -------------------------------------------------------- +bool __cdecl __gnu_cxx::operator==(_DWORD *a1, _DWORD *a2) +{ + return *a1 == *a2; +} + +//----- (004490C0) -------------------------------------------------------- +bool __cdecl __gnu_cxx::operator==(_DWORD *a1, _DWORD *a2) +{ + return *a1 == *a2; +} + +//----- (004490D0) -------------------------------------------------------- +char __userpurge __cxxabiv1::__class_type_info::__do_catch@( + _DWORD *a1@, + __cxxabiv1::__class_type_info *this, + const std::type_info *a3, + void **a4, + unsigned int a5) +{ + char result; // al + + result = std::type_info::operator==(a1, (int)this); + if ( !result && (unsigned int)a4 <= 3 ) + return (*(int (__thiscall **)(__cxxabiv1::__class_type_info *, _DWORD *, const std::type_info *))(*(_DWORD *)this + 20))( + this, + a1, + a3); + return result; +} + +//----- (00449110) -------------------------------------------------------- +bool __thiscall __cxxabiv1::__class_type_info::__do_upcast(_DWORD *this, int a2, int a3, _DWORD *a4) +{ + bool result; // al + + result = std::type_info::operator==(this, a2); + if ( result ) + { + a4[3] = 8; + a4[1] = 6; + *a4 = a3; + } + return result; +} + +//----- (00449150) -------------------------------------------------------- +int __userpurge __cxxabiv1::__class_type_info::__do_upcast@( + int *a1@, + __cxxabiv1::__class_type_info *this, + const __class_type_info *a3, + void **a4) +{ + int v4; // eax + int v5; // edx + int v6; // edx + int v8; // [esp+10h] [ebp-1Ch] BYREF + int v9; // [esp+14h] [ebp-18h] + int v10; // [esp+18h] [ebp-14h] + int v11; // [esp+1Ch] [ebp-10h] + + v4 = *a1; + v8 = 0; + v5 = *(_DWORD *)a3; + v9 = 0; + v10 = 16; + v11 = 0; + (*(void (__thiscall **)(int *, __cxxabiv1::__class_type_info *, int, int *))(v4 + 24))(a1, this, v5, &v8); + v6 = 0; + if ( (v9 & 6) == 6 ) + { + v6 = 1; + *(_DWORD *)a3 = v8; + } + return v6; +} + +//----- (004491C0) -------------------------------------------------------- +int __thiscall __cxxabiv1::__class_type_info::__do_dyncast( + _DWORD *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + _DWORD *a8) +{ + bool v9; // al + _DWORD *v10; // [esp+1Ch] [ebp-10h] + + if ( a5 == a7 && (v10 = this, v9 = std::type_info::operator==(this, a6), this = v10, v9) ) + { + a8[2] = a3; + return 0; + } + else + { + if ( std::type_info::operator==(this, a4) ) + { + *a8 = a5; + a8[3] = 1; + a8[1] = a3; + } + return 0; + } +} + +//----- (00449230) -------------------------------------------------------- +int __stdcall __cxxabiv1::__class_type_info::__do_find_public_src( + __cxxabiv1::__class_type_info *this, + const __cxxabiv1::__class_type_info *a2, + const void *a3, + const __cxxabiv1::__class_type_info *a4, + const void *a5) +{ + return 5 * (a4 == a2) + 1; +} + +//----- (00449250) -------------------------------------------------------- +char __thiscall __cxxabiv1::__si_class_type_info::__do_upcast(int this, int a2, int a3, _DWORD *a4) +{ + char result; // al + + result = __cxxabiv1::__class_type_info::__do_upcast((_DWORD *)this, a2, a3, a4); + if ( !result ) + return (*(int (__thiscall **)(_DWORD, int, int, _DWORD *))(**(_DWORD **)(this + 8) + 24))( + *(_DWORD *)(this + 8), + a2, + a3, + a4); + return result; +} + +//----- (004492B0) -------------------------------------------------------- +int __thiscall __cxxabiv1::__si_class_type_info::__do_dyncast( + _DWORD *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + _DWORD *a8) +{ + bool v8; // al + _DWORD *v9; // ecx + int v10; // edx + bool v12; // al + + v8 = std::type_info::operator==(this, a4); + v9 = this; + v10 = a7; + if ( v8 ) + { + *a8 = a5; + a8[1] = a3; + if ( a2 < 0 ) + { + if ( a2 == -2 ) + a8[3] = 1; + } + else + { + a8[3] = 5 * (a7 == a2 + a5) + 1; + } + } + else + { + if ( a5 != a7 ) + return (*(int (__thiscall **)(_DWORD, int, int, int, int, int, int, _DWORD *))(*(_DWORD *)v9[2] + 28))( + v9[2], + a2, + a3, + a4, + a5, + a6, + v10, + a8); + v12 = std::type_info::operator==(this, a6); + v9 = this; + v10 = a7; + if ( !v12 ) + return (*(int (__thiscall **)(_DWORD, int, int, int, int, int, int, _DWORD *))(*(_DWORD *)v9[2] + 28))( + v9[2], + a2, + a3, + a4, + a5, + a6, + v10, + a8); + a8[2] = a3; + } + return 0; +} + +//----- (004493B0) -------------------------------------------------------- +int __userpurge __cxxabiv1::__si_class_type_info::__do_find_public_src@( + int a1@, + __cxxabiv1::__si_class_type_info *this, + const __cxxabiv1::__class_type_info *a3, + const void *a4, + const __cxxabiv1::__class_type_info *a5, + const void *a6) +{ + __cxxabiv1::__si_class_type_info *v7; // edx + bool v9; // al + + v7 = this; + if ( a5 == a3 && (v9 = std::type_info::operator==((_DWORD *)a1, (int)a4), v7 = this, v9) ) + return 6; + else + return (*(int (__thiscall **)(_DWORD, __cxxabiv1::__si_class_type_info *, const __cxxabiv1::__class_type_info *, const void *, const __cxxabiv1::__class_type_info *))(**(_DWORD **)(a1 + 8) + 32))( + *(_DWORD *)(a1 + 8), + v7, + a3, + a4, + a5); +} + +//----- (00449420) -------------------------------------------------------- +int __thiscall __cxxabiv1::__vmi_class_type_info::__do_upcast(_DWORD *this, int a2, _DWORD *a3, _DWORD *a4) +{ + int v5; // eax + int v6; // edx + int v7; // eax + int v8; // ebx + bool v9; // cf + int v10; // eax + int v11; // esi + char *v12; // edx + int v13; // eax + int v14; // eax + int v15; // ecx + int v16; // eax + _DWORD *v17; // ecx + int result; // eax + bool v19; // al + char v20; // [esp+13h] [ebp-39h] + unsigned __int8 v21; // [esp+13h] [ebp-39h] + int v22; // [esp+18h] [ebp-34h] + int v23; // [esp+20h] [ebp-2Ch] BYREF + int v24; // [esp+24h] [ebp-28h] + int v25; // [esp+28h] [ebp-24h] + _DWORD *v26; // [esp+2Ch] [ebp-20h] + + LOBYTE(v5) = __cxxabiv1::__class_type_info::__do_upcast(this, a2, (int)a3, a4); + v6 = v5; + if ( (_BYTE)v5 ) + return v6; + v22 = a4[2]; + if ( (v22 & 0x10) != 0 ) + v22 = this[2]; + v7 = this[3]; + v8 = v7 - 1; + if ( !v7 ) + { +LABEL_34: + LOBYTE(v6) = a4[1] != 0; + return v6; + } + while ( 1 ) + { + while ( 1 ) + { + v23 = 0; + v24 = 0; + v25 = v22; + v10 = this[2 * v8 + 5]; + v26 = 0; + v11 = v10 & 2; + v6 = v10 & 1; + v20 = v10 & 1; + if ( !(v11 | v22 & 1) ) + goto LABEL_9; + v12 = 0; + if ( a3 ) + { + v13 = v10 >> 8; + if ( v20 ) + v13 = *(_DWORD *)(*a3 + v13); + v12 = (char *)a3 + v13; + } + v6 = (*(int (__thiscall **)(_DWORD, int, char *, int *))(*(_DWORD *)this[2 * v8 + 4] + 24))( + this[2 * v8 + 4], + a2, + v12, + &v23); + if ( !(_BYTE)v6 ) + goto LABEL_9; + if ( v26 == (_DWORD *)8 && v20 ) + v26 = (_DWORD *)this[2 * v8 + 4]; + if ( !v11 && v24 > 3 ) + v24 &= ~2u; + v14 = a4[3]; + if ( v14 ) + break; + v15 = v25; + *a4 = v23; + v16 = v24; + a4[2] = v15; + v17 = v26; + a4[1] = v16; + a4[3] = v17; + if ( v16 <= 3 ) + return v6; + if ( (v16 & 2) != 0 ) + { + if ( (this[2] & 1) == 0 ) + return v6; + goto LABEL_9; + } + if ( (v16 & 1) == 0 || (this[2] & 2) == 0 ) + return v6; + v9 = v8-- == 0; + if ( v9 ) + goto LABEL_34; + } + if ( *a4 != v23 ) + break; + if ( !*a4 ) + { + if ( v26 == (_DWORD *)8 || v14 == 8 || (v21 = v6, v19 = std::type_info::operator==(v26, a4[3]), v6 = v21, !v19) ) + { + a4[1] = 2; + return v6; + } + } + a4[1] |= v24; +LABEL_9: + v9 = v8-- == 0; + if ( v9 ) + goto LABEL_34; + } + *a4 = 0; + result = v6; + a4[1] = 2; + return result; +} +// 449448: variable 'v5' is possibly undefined + +//----- (00449650) -------------------------------------------------------- +int __thiscall __cxxabiv1::__vmi_class_type_info::__do_dyncast( + _DWORD *this, + int a2, + int a3, + int a4, + char *a5, + int a6, + char *a7, + int *a8) +{ + char *v8; // eax + int v9; // eax + int v10; // edi + int v11; // esi + int v12; // ebx + int v13; // edx + int v14; // eax + bool v15; // cf + int v16; // eax + int v17; // ecx + int v18; // eax + int v19; // edx + unsigned __int8 v20; // si + int v21; // eax + int v22; // edx + int v24; // eax + int v25; // eax + int v27; // [esp+40h] [ebp-58h] + int v28; // [esp+44h] [ebp-54h] + char v29; // [esp+44h] [ebp-54h] + char *v30; // [esp+48h] [ebp-50h] + int v31; // [esp+4Ch] [ebp-4Ch] + int v32; // [esp+54h] [ebp-44h] + unsigned __int8 v33; // [esp+59h] [ebp-3Fh] + char v34; // [esp+5Ah] [ebp-3Eh] + char v35; // [esp+5Bh] [ebp-3Dh] + int v36; // [esp+68h] [ebp-30h] BYREF + int v37; // [esp+6Ch] [ebp-2Ch] + int v38; // [esp+70h] [ebp-28h] + int v39; // [esp+74h] [ebp-24h] + int v40; // [esp+78h] [ebp-20h] + + if ( (a8[4] & 0x10) != 0 ) + a8[4] = this[2]; + if ( a5 == a7 && std::type_info::operator==(this, a6) ) + { + a8[2] = a3; + return 0; + } + if ( std::type_info::operator==(this, a4) ) + { + *a8 = (int)a5; + a8[1] = a3; + if ( a2 >= 0 ) + { + a8[3] = 5 * (a7 == &a5[a2]) + 1; + return 0; + } + v33 = 0; + if ( a2 == -2 ) + a8[3] = 1; + return v33; + } + v8 = 0; + v33 = 0; + v35 = 0; + v34 = 1; + if ( a2 >= 0 ) + v8 = &a7[-a2]; + v30 = v8; + while ( 1 ) + { + v9 = this[3]; + v10 = v9 - 1; + if ( v9 ) + break; +LABEL_59: + v35 &= v34; + if ( !v35 ) + return v33; + v34 = 0; + } + while ( 1 ) + { + while ( 1 ) + { + v16 = a8[4]; + v36 = 0; + v37 = 0; + v17 = a3; + v29 = v16; + v40 = v16; + v38 = 0; + v18 = this[2 * v10 + 5]; + v39 = 0; + v19 = v18 >> 8; + if ( (v18 & 1) != 0 ) + { + v17 = a3 | 1; + v19 = *(_DWORD *)(*(_DWORD *)a5 + v19); + } + if ( !v30 || v34 != v30 < &a5[v19] ) + break; + v35 = 1; +LABEL_30: + v15 = v10-- == 0; + if ( v15 ) + goto LABEL_59; + } + if ( (v18 & 2) != 0 ) + break; + if ( a2 != -2 || (v29 & 3) != 0 ) + { + v17 &= ~2u; + break; + } + v15 = v10-- == 0; + if ( v15 ) + goto LABEL_59; + } + v20 = (*(int (__thiscall **)(_DWORD, int, int, int, char *, int, char *, int *))(*(_DWORD *)this[2 * v10 + 4] + 28))( + this[2 * v10 + 4], + a2, + v17, + a4, + &a5[v19], + a6, + a7, + &v36); + v12 = v39; + v21 = v38 | a8[2]; + v28 = v21; + v22 = v39; + a8[2] = v21; + if ( (v22 & 0xFFFFFFFB) == 2 ) + { + v25 = v36; + a8[3] = v12; + *a8 = v25; + a8[1] = v37; + return v20; + } + v13 = v36; + v27 = *a8; + if ( v33 ) + { + if ( !v27 ) + { + if ( !v36 ) + goto LABEL_29; + v11 = a8[3]; + if ( v21 <= 3 ) + goto LABEL_43; + goto LABEL_15; + } + } + else if ( !*a8 ) + { + v24 = v37; + *a8 = v36; + a8[1] = v24; + if ( v13 && v28 ) + { + v33 = v20; + if ( (this[2] & 1) == 0 ) + return v33; + } + else + { + v33 = v20; + } + goto LABEL_29; + } + if ( v36 == v27 ) + { + a8[1] |= v37; + goto LABEL_29; + } + if ( !v36 && !v20 ) + { +LABEL_29: + if ( v28 == 4 ) + return v33; + goto LABEL_30; + } + v11 = a8[3]; + if ( v21 <= 3 ) + goto LABEL_43; +LABEL_15: + if ( (v21 & 1) == 0 || (a8[4] & 2) == 0 ) + { + if ( !v11 ) + v11 = 1; + if ( !v12 ) + v12 = 1; + v31 = v11; + v32 = v12; + goto LABEL_22; + } +LABEL_43: + v31 = v11; + v32 = v12; + if ( v11 > 0 ) + goto LABEL_44; + if ( v12 <= 3 || (v12 & 1) != 0 && (this[2] & 2) != 0 ) + { + if ( a2 < 0 ) + { + if ( a2 != -2 ) + { + v11 = (*(int (__fastcall **)(int, int, int, int, int, char *))(*(_DWORD *)a4 + 32))(a4, v36, a2, v27, a6, a7); + v31 = v11; +LABEL_44: + if ( v12 <= 0 ) + { + if ( v11 > 3 && ((v11 & 1) == 0 || (this[2] & 2) == 0) ) + { + if ( (v11 ^ 1) > 3 ) + { +LABEL_80: + v12 = v11; + v14 = v31 & 2; + goto LABEL_26; + } +LABEL_55: + v28 = a8[2]; +LABEL_56: + *a8 = 0; + a8[3] = 1; + v33 = 1; + goto LABEL_29; + } + v13 = v36; + if ( a2 < 0 ) + { + if ( a2 != -2 ) + { + v12 = (*(int (__thiscall **)(int, int, int, int, char *))(*(_DWORD *)a4 + 32))(a4, a2, v36, a6, a7); + v32 = v12; + if ( (v12 ^ v31) <= 3 ) + goto LABEL_51; +LABEL_23: + v13 = v36; + if ( v12 <= 3 ) + { + v12 = v11; + v14 = v11 & 2; + goto LABEL_26; + } + goto LABEL_24; + } +LABEL_79: + if ( (v31 ^ 1) > 3 ) + goto LABEL_80; + goto LABEL_55; + } + if ( a7 != (char *)(v36 + a2) ) + goto LABEL_79; + if ( (v11 ^ 6) <= 3 ) + { + v32 = 6; +LABEL_51: + if ( (v31 & v32) > 3 ) + { + *a8 = 0; + a8[3] = 2; + return 1; + } + goto LABEL_55; + } +LABEL_99: + v14 = 2; + v12 = 6; + goto LABEL_25; + } +LABEL_22: + if ( (v12 ^ v31) <= 3 ) + goto LABEL_51; + goto LABEL_23; + } + if ( v12 <= 0 ) + { +LABEL_78: + v31 = 1; + v11 = 1; + goto LABEL_79; + } + } + else + { + if ( a7 == (char *)(a2 + v27) ) + { + v31 = 6; + v11 = 6; + if ( v12 <= 0 ) + goto LABEL_80; + goto LABEL_22; + } + if ( v12 <= 0 ) + { + if ( a7 == (char *)(v36 + a2) ) + goto LABEL_99; + goto LABEL_78; + } + } + v11 = 1; + if ( (v12 ^ 1) <= 3 ) + goto LABEL_56; + goto LABEL_23; + } + if ( (v12 ^ 1) <= 3 ) + goto LABEL_56; +LABEL_24: + v14 = v12 & 2; +LABEL_25: + *a8 = v13; + v33 = 0; + a8[1] = v37; +LABEL_26: + a8[3] = v12; + if ( !v14 && (v12 & 1) != 0 ) + { + v28 = a8[2]; + goto LABEL_29; + } + return 0; +} + +//----- (00449D00) -------------------------------------------------------- +int __userpurge __cxxabiv1::__vmi_class_type_info::__do_find_public_src@( + _DWORD *a1@, + __cxxabiv1::__vmi_class_type_info *this, + const __cxxabiv1::__class_type_info *a3, + const void *a4, + const __cxxabiv1::__class_type_info *a5, + const void *a6) +{ + int v7; // eax + int v8; // ebx + int v9; // edx + int v10; // eax + int result; // eax + bool v13; // dl + char v14; // [esp+1Fh] [ebp-1Dh] + + if ( a3 != a5 || (v13 = std::type_info::operator==(a1, (int)a4), result = 6, !v13) ) + { + v7 = a1[3]; + v8 = v7 - 1; + if ( !v7 ) + return 1; + while ( 1 ) + { + v9 = a1[2 * v8 + 5]; + if ( (v9 & 2) != 0 ) + { + v10 = v9 >> 8; + v14 = v9 & 1; + if ( (v9 & 1) != 0 ) + { + if ( this == (__cxxabiv1::__vmi_class_type_info *)-3 ) + goto LABEL_8; + v10 = *(_DWORD *)(*(_DWORD *)a3 + v10); + } + result = (*(int (__thiscall **)(_DWORD, __cxxabiv1::__vmi_class_type_info *, char *, const void *, const __cxxabiv1::__class_type_info *))(*(_DWORD *)a1[2 * v8 + 4] + 32))( + a1[2 * v8 + 4], + this, + (char *)a3 + v10, + a4, + a5); + if ( result > 3 ) + { + if ( v14 ) + return result | 1; + return result; + } + } +LABEL_8: + if ( v8-- == 0 ) + return 1; + } + } + return result; +} + +//----- (00449DE0) -------------------------------------------------------- +const char *`anonymous namespace'::io_error_category::name() +{ + return "iostream"; +} + +//----- (00449DF0) -------------------------------------------------------- +int __thiscall `anonymous namespace'::io_error_category::message[abi:cxx11](int this, int a2, int a3) +{ + *(_DWORD *)(this + 4) = 0; + *(_DWORD *)this = this + 8; + *(_BYTE *)(this + 8) = 0; + if ( a3 == 1 ) + std::string::_M_replace((unsigned int **)this, 0, 0, "iostream error", 0xEu); + else + std::string::_M_replace((unsigned int **)this, 0, 0, "Unknown error", 0xDu); + return this; +} + +//----- (00449EE0) -------------------------------------------------------- +_anonymous_namespace_::system_error_category *__stdcall `anonymous namespace'::system_error_category::default_error_condition( + _anonymous_namespace_::system_error_category *this, + int a2) +{ + return this; +} + +//----- (00449F40) -------------------------------------------------------- +const char *`anonymous namespace'::system_error_category::name() +{ + return "system"; +} + +//----- (00449F50) -------------------------------------------------------- +const char *`anonymous namespace'::generic_error_category::name() +{ + return "generic"; +} + +//----- (00449F60) -------------------------------------------------------- +_DWORD *__thiscall `anonymous namespace'::system_error_category::message[abi:cxx11]( + _DWORD *this, + int a2, + int ErrorMessage) +{ + _DWORD *v4; // edi + char *v5; // eax + char *Src; // esi + size_t v7; // eax + size_t Size; // ebp + _DWORD *v10; // eax + int v11[8]; // [esp+1Ch] [ebp-20h] BYREF + + v4 = this + 2; + v5 = strerror(ErrorMessage); + *this = v4; + if ( !v5 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + Src = v5; + v7 = strlen(v5); + v11[0] = v7; + Size = v7; + if ( v7 > 0xF ) + { + v10 = std::string::_M_create((unsigned int *)v11, 0); + *this = v10; + v4 = v10; + this[2] = v11[0]; + goto LABEL_9; + } + if ( v7 != 1 ) + { + if ( !v7 ) + goto LABEL_5; +LABEL_9: + memcpy(v4, Src, Size); + v7 = v11[0]; + v4 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Src; +LABEL_5: + this[1] = v7; + *((_BYTE *)v4 + v7) = 0; + return this; +} +// 449F60: using guessed type size_t var_20[8]; + +//----- (0044A010) -------------------------------------------------------- +int WXSS::CSSTreeLib::NonTerminal::GetClass() +{ + return 2; +} + +//----- (0044A018) -------------------------------------------------------- +int WXSS::CSSTreeLib::EPS::GetClass() +{ + return 4; +} + +//----- (0044A020) -------------------------------------------------------- +int WXSS::CSSTreeLib::Rule::GetClass() +{ + return 0; +} + +//----- (0044A024) -------------------------------------------------------- +int WXSS::CSSTreeLib::Action::GetClass() +{ + return 3; +} + +//----- (0044A02C) -------------------------------------------------------- +int WXSS::CSSTreeLib::Terminal::GetClass() +{ + return 1; +} + +//----- (0044A034) -------------------------------------------------------- +const char *__fastcall WXSS::Token::GetLiteral(_DWORD *a1) +{ + const char *result; // eax + int v2; // edx + + if ( *a1 == 1 ) + return (const char *)(a1 + 7); + result = "$"; + if ( *a1 != 8 ) + { + v2 = a1[1]; + result = "UNKNOWN"; + if ( v2 ) + return *(const char **)v2; + } + return result; +} + +//----- (0044A060) -------------------------------------------------------- +const char *__gnu_cxx::__concurrence_lock_error::what() +{ + return "__gnu_cxx::__concurrence_lock_error"; +} + +//----- (0044A070) -------------------------------------------------------- +const char *__gnu_cxx::__concurrence_unlock_error::what() +{ + return "__gnu_cxx::__concurrence_unlock_error"; +} + +//----- (0044A080) -------------------------------------------------------- +int __thiscall std::wstring::_M_disjunct(unsigned int *this, unsigned int a2) +{ + int v2; // eax + int v3; // edx + + v2 = *this; + v3 = 1; + if ( *this <= a2 ) + { + v3 = *(_DWORD *)(v2 - 12); + LOBYTE(v3) = v2 + 2 * v3 < a2; + } + return v3; +} + +//----- (0044A0B0) -------------------------------------------------------- +int __thiscall std::wstring::find_last_of(_DWORD *this, wchar_t *String, int a3) +{ + int v4; // eax + + v4 = wcslen(String); + return std::wstring::find_last_of(this, String, a3, v4); +} + +//----- (0044A0F0) -------------------------------------------------------- +int __thiscall std::wstring::find_last_of(_DWORD *this, _WORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // ebx + int v5; // eax + unsigned int v6; // eax + _WORD *v7; // eax + int v8; // edx + + v4 = a3; + v5 = *(_DWORD *)(*this - 12); + if ( !v5 || !a4 ) + return -1; + v6 = v5 - 1; + if ( v6 <= a3 ) + v4 = v6; + while ( !a2 ) + { +LABEL_9: + if ( v4-- == 0 ) + return v4; + } + v7 = a2; + v8 = a4; + while ( *(_WORD *)(*this + 2 * v4) != *v7 ) + { + ++v7; + if ( !--v8 ) + goto LABEL_9; + } + return v4; +} + +//----- (0044A160) -------------------------------------------------------- +int __thiscall std::wstring::find_last_of(_DWORD *this, _WORD **a2, unsigned int a3) +{ + return std::wstring::find_last_of(this, *a2, a3, *((_DWORD *)*a2 - 3)); +} + +//----- (0044A190) -------------------------------------------------------- +int __thiscall std::wstring::find_last_of(_DWORD *this, __int16 a2, unsigned int a3) +{ + int result; // eax + int v4; // ebx + + result = -1; + v4 = *(_DWORD *)(*this - 12); + if ( v4 ) + { + result = v4 - 1; + if ( a3 <= v4 - 1 ) + result = a3; + do + { + if ( a2 == *(_WORD *)(*this + 2 * result) ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (0044A1D0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, wchar_t *String, int a3) +{ + int v4; // eax + + v4 = wcslen(String); + return std::wstring::find_first_of(this, String, a3, v4); +} + +//----- (0044A210) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, _WORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // ebx + unsigned int v5; // ebp + int v6; // edx + _WORD *v7; // eax + + if ( !a4 ) + return -1; + v4 = a3; + v5 = *(_DWORD *)(*this - 12); + if ( v5 <= a3 ) + return -1; + while ( !a2 ) + { +LABEL_7: + if ( v5 <= ++v4 ) + return -1; + } + v6 = a4; + v7 = a2; + while ( *(_WORD *)(*this + 2 * v4) != *v7 ) + { + ++v7; + if ( !--v6 ) + goto LABEL_7; + } + return v4; +} + +//----- (0044A270) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, _WORD **a2, unsigned int a3) +{ + return std::wstring::find_first_of(this, *a2, a3, *((_DWORD *)*a2 - 3)); +} + +//----- (0044A2A0) -------------------------------------------------------- +int __thiscall std::wstring::find_first_of(int *this, __int16 a2, unsigned int a3) +{ + return std::wstring::find(this, a2, a3); +} + +//----- (0044A2B0) -------------------------------------------------------- +void *__thiscall std::wstring::get_allocator(void *this, int a2) +{ + return this; +} + +//----- (0044A2C0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::_M_check_length(_DWORD *this, int a2, unsigned int a3, std::length_error *a4) +{ + unsigned int result; // eax + + result = a2 + 536870910 - *(_DWORD *)(*this - 12); + if ( result < a3 ) + std::__throw_length_error(a4); + return result; +} + +//----- (0044A2F0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, wchar_t *String, int a3) +{ + int v4; // eax + + v4 = wcslen(String); + return std::wstring::find_last_not_of(this, String, a3, v4); +} + +//----- (0044A330) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, _WORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // ebx + int v5; // eax + unsigned int v6; // eax + _WORD *v7; // eax + int v8; // edx + + v4 = -1; + v5 = *(_DWORD *)(*this - 12); + if ( v5 ) + { + v6 = v5 - 1; + v4 = a3; + if ( v6 <= a3 ) + v4 = v6; + while ( a4 && a2 ) + { + v7 = a2; + v8 = a4; + while ( *(_WORD *)(*this + 2 * v4) != *v7 ) + { + ++v7; + if ( !--v8 ) + return v4; + } + if ( v4-- == 0 ) + return v4; + } + } + return v4; +} + +//----- (0044A3A0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, _WORD **a2, unsigned int a3) +{ + return std::wstring::find_last_not_of(this, *a2, a3, *((_DWORD *)*a2 - 3)); +} + +//----- (0044A3D0) -------------------------------------------------------- +int __thiscall std::wstring::find_last_not_of(_DWORD *this, __int16 a2, unsigned int a3) +{ + int result; // eax + int v4; // ebx + + result = -1; + v4 = *(_DWORD *)(*this - 12); + if ( v4 ) + { + result = v4 - 1; + if ( v4 - 1 > a3 ) + result = a3; + do + { + if ( *(_WORD *)(*this + 2 * result) != a2 ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (0044A410) -------------------------------------------------------- +int __thiscall std::wstring::find_first_not_of(int *this, wchar_t *String, unsigned int a3) +{ + unsigned int v4; // ebx + size_t v5; // eax + int v6; // esi + unsigned int v7; // edi + size_t v8; // ebp + __int16 v9; // cx + wchar_t *v10; // eax + size_t v11; // edx + + v4 = a3; + v5 = wcslen(String); + v6 = *this; + v7 = *(_DWORD *)(v6 - 12); + if ( a3 < v7 ) + { + v8 = v5; + if ( !v5 ) + return v4; + v9 = *(_WORD *)(v6 + 2 * a3); + if ( !String ) + return v4; + while ( 1 ) + { + v10 = String; + v11 = v8; + while ( v9 != *v10 ) + { + ++v10; + if ( !--v11 ) + return v4; + } + if ( ++v4 == v7 ) + break; + v9 = *(_WORD *)(v6 + 2 * v4); + } + } + return -1; +} + +//----- (0044A4A0) -------------------------------------------------------- +int __thiscall std::wstring::find_first_not_of(int *this, _WORD *a2, unsigned int a3, int a4) +{ + int v4; // esi + unsigned int v5; // ebx + unsigned int v6; // edi + __int16 v7; // cx + _WORD *v8; // eax + int v9; // edx + + v4 = *this; + v5 = a3; + v6 = *(_DWORD *)(*this - 12); + if ( a3 < v6 ) + { + if ( !a4 ) + return v5; + v7 = *(_WORD *)(v4 + 2 * a3); + if ( !a2 ) + return v5; + while ( 1 ) + { + v8 = a2; + v9 = a4; + while ( v7 != *v8 ) + { + ++v8; + if ( !--v9 ) + return v5; + } + if ( v6 == ++v5 ) + break; + v7 = *(_WORD *)(v4 + 2 * v5); + } + } + return -1; +} + +//----- (0044A520) -------------------------------------------------------- +int __thiscall std::wstring::find_first_not_of(_DWORD *this, _DWORD *a2, unsigned int a3) +{ + unsigned int v3; // ebx + unsigned int v4; // esi + int v5; // edx + _WORD *i; // eax + + v3 = a3; + v4 = *(_DWORD *)(*this - 12); + if ( a3 < v4 ) + { + if ( !*(_DWORD *)(*a2 - 12) ) + return v3; + do + { + v5 = *(_DWORD *)(*a2 - 12); + for ( i = (_WORD *)*a2; *(_WORD *)(*this + 2 * v3) != *i; ++i ) + { + if ( !--v5 ) + return v3; + } + ++v3; + } + while ( v3 != v4 ); + } + return -1; +} + +//----- (0044A590) -------------------------------------------------------- +int __thiscall std::wstring::find_first_not_of(int *this, __int16 a2, unsigned int a3) +{ + int v3; // edx + int result; // eax + unsigned int v5; // ecx + + v3 = *this; + result = a3; + v5 = *(_DWORD *)(*this - 12); + if ( a3 >= v5 ) + return -1; + while ( *(_WORD *)(v3 + 2 * result) == a2 ) + { + if ( ++result == v5 ) + return -1; + } + return result; +} + +//----- (0044A5D0) -------------------------------------------------------- +int __thiscall std::wstring::at(int *this, unsigned int a2) +{ + int v2; // edx + unsigned int v3; // ecx + + v2 = *this; + v3 = *(_DWORD *)(*this - 12); + if ( a2 >= v3 ) + std::__throw_out_of_range_fmt("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", a2, v3); + return v2 + 2 * a2; +} + +//----- (0044A600) -------------------------------------------------------- +int __fastcall std::wstring::end(_DWORD *a1) +{ + return *a1 + 2 * *(_DWORD *)(*a1 - 12); +} + +//----- (0044A610) -------------------------------------------------------- +int __fastcall std::wstring::_Rep::_M_is_leaked(int a1) +{ + return *(_DWORD *)(a1 + 8) >> 31; +} + +//----- (0044A620) -------------------------------------------------------- +bool __fastcall std::wstring::_Rep::_M_is_shared(int a1) +{ + return *(_DWORD *)(a1 + 8) > 0; +} + +//----- (0044A630) -------------------------------------------------------- +int __fastcall std::wstring::back(_DWORD *a1) +{ + return *a1 + 2 * *(_DWORD *)(*a1 - 12) - 2; +} + +//----- (0044A640) -------------------------------------------------------- +int __fastcall std::wstring::cend(_DWORD *a1) +{ + return *a1 + 2 * *(_DWORD *)(*a1 - 12); +} + +//----- (0044A650) -------------------------------------------------------- +int __thiscall std::wstring::copy(int *this, _WORD *a2, unsigned int a3, unsigned int a4) +{ + int v4; // ecx + unsigned int v5; // ebx + unsigned int v6; // ebx + _WORD *Src; // eax + + v4 = *this; + v5 = *(_DWORD *)(v4 - 12); + if ( a4 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::copy", + a4, + *(_DWORD *)(v4 - 12)); + v6 = v5 - a4; + if ( v6 > a3 ) + v6 = a3; + if ( !v6 ) + return v6; + Src = (_WORD *)(v4 + 2 * a4); + if ( v6 != 1 ) + { + memcpy(a2, Src, 2 * v6); + return v6; + } + *a2 = *Src; + return 1; +} + +//----- (0044A6D0) -------------------------------------------------------- +int __fastcall std::wstring::data(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044A6E0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find(int *this, wchar_t *String, int a3) +{ + unsigned int v4; // eax + + v4 = wcslen(String); + return std::wstring::find(this, String, a3, v4); +} + +//----- (0044A720) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find(int *this, _WORD *a2, unsigned int a3, unsigned int a4) +{ + unsigned int v4; // edx + _WORD *v5; // eax + int v6; // edi + unsigned int v7; // edx + unsigned int v8; // edx + int v10; // edx + __int16 v11; // bx + unsigned int v12; // edx + int v13; // ecx + int v14; // [esp+4h] [ebp-14h] + + v14 = *this; + v4 = *(_DWORD *)(*this - 12); + if ( a4 ) + { + if ( v4 > a3 && (v5 = (_WORD *)(v14 + 2 * a3), v6 = v14 + 2 * v4, v7 = v4 - a3, a4 <= v7) && (v8 = 1 - a4 + v7) != 0 ) + { +LABEL_5: + while ( *a2 != *v5 ) + { + ++v5; + if ( !--v8 ) + return -1; + } + if ( a2 != v5 ) + { + v10 = 0; + while ( v10 != a4 - 1 ) + { + v11 = v5[++v10]; + if ( v11 != a2[v10] ) + { + v12 = (v6 - (int)++v5) >> 1; + if ( a4 <= v12 ) + { + v8 = 1 - a4 + v12; + if ( v8 ) + goto LABEL_5; + } + return -1; + } + } + } + return ((int)v5 - v14) >> 1; + } + else + { + return -1; + } + } + else + { + v13 = -1; + if ( v4 >= a3 ) + return a3; + return v13; + } +} + +//----- (0044A810) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find(int *this, _WORD **a2, unsigned int a3) +{ + return std::wstring::find(this, *a2, a3, *((_DWORD *)*a2 - 3)); +} + +//----- (0044A840) -------------------------------------------------------- +int __thiscall std::wstring::find(int *this, __int16 a2, unsigned int a3) +{ + int v3; // ebx + int result; // eax + unsigned int v5; // edx + int v6; // edx + _WORD *i; // eax + + v3 = *this; + result = -1; + v5 = *(_DWORD *)(*this - 12); + if ( a3 < v5 ) + { + v6 = v5 - a3; + for ( i = (_WORD *)(v3 + 2 * a3); *i != a2; ++i ) + { + if ( !--v6 ) + return -1; + } + return ((int)i - v3) >> 1; + } + return result; +} + +//----- (0044A890) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::rend(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2; + return result; +} + +//----- (0044A8A0) -------------------------------------------------------- +int __fastcall std::wstring::size(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 12); +} + +//----- (0044A8B0) -------------------------------------------------------- +int __fastcall std::wstring::begin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044A8C0) -------------------------------------------------------- +int __fastcall std::wstring::c_str(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044A8D0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::crend(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2; + return result; +} + +//----- (0044A8E0) -------------------------------------------------------- +bool __fastcall std::wstring::empty(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 12) == 0; +} + +//----- (0044A8F0) -------------------------------------------------------- +int __fastcall std::wstring::front(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044A900) -------------------------------------------------------- +int __thiscall std::wstring::rfind(_DWORD *this, wchar_t *String, int a3) +{ + unsigned int v4; // eax + + v4 = wcslen(String); + return std::wstring::rfind(this, String, a3, v4); +} + +//----- (0044A940) -------------------------------------------------------- +int __thiscall std::wstring::rfind(_DWORD *this, _WORD *a2, unsigned int a3, unsigned int a4) +{ + int v4; // ebx + unsigned int v5; // esi + unsigned int v6; // eax + unsigned int v7; // eax + _WORD *v8; // esi + _WORD *v9; // eax + _WORD *v10; // edx + unsigned int v11; // ecx + + v4 = -1; + v5 = a3; + v6 = *(_DWORD *)(*this - 12); + if ( a4 <= v6 ) + { + v7 = v6 - a4; + if ( v7 <= a3 ) + v5 = v7; + v4 = v5; + v8 = (_WORD *)(*this + 2 * v5); + if ( a4 ) + { + while ( 1 ) + { + v9 = v8; + if ( v8 == a2 ) + break; + if ( a2 ) + { + v10 = a2; + v11 = a4; + while ( *v9 == *v10 ) + { + ++v9; + ++v10; + if ( !--v11 ) + return v4; + } + } + --v8; + if ( !v4 ) + return -1; + --v4; + } + } + } + return v4; +} +// 44A9A9: conditional instruction was optimized away because %arg_8.4!=0 + +//----- (0044A9C0) -------------------------------------------------------- +int __thiscall std::wstring::rfind(_DWORD *this, _WORD **a2, unsigned int a3) +{ + return std::wstring::rfind(this, *a2, a3, *((_DWORD *)*a2 - 3)); +} + +//----- (0044A9F0) -------------------------------------------------------- +int __thiscall std::wstring::rfind(_DWORD *this, __int16 a2, unsigned int a3) +{ + int result; // eax + int v4; // ebx + + result = -1; + v4 = *(_DWORD *)(*this - 12); + if ( v4 ) + { + result = v4 - 1; + if ( v4 - 1 > a3 ) + result = a3; + do + { + if ( *(_WORD *)(*this + 2 * result) == a2 ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (0044AA30) -------------------------------------------------------- +int __fastcall std::wstring::_M_rep(_DWORD *a1) +{ + return *a1 - 12; +} + +//----- (0044AA40) -------------------------------------------------------- +int __fastcall std::wstring::cbegin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044AA50) -------------------------------------------------------- +int __fastcall std::wstring::length(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 12); +} + +//----- (0044AA60) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::rbegin(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2 + 2 * *(_DWORD *)(*a2 - 12); + return result; +} + +//----- (0044AA80) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::substr(_DWORD *this, _DWORD *a2, unsigned int a3, unsigned int a4) +{ + unsigned int v5; // eax + unsigned int v6; // eax + + v5 = *(_DWORD *)(*a2 - 12); + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::substr", + a3, + *(_DWORD *)(*a2 - 12)); + v6 = v5 - a3; + if ( v6 > a4 ) + v6 = a4; + *this = std::wstring::_S_construct((_WORD *)(*a2 + 2 * a3), *a2 + 2 * (a3 + v6)); + return this; +} + +//----- (0044AAF0) -------------------------------------------------------- +int __fastcall std::wstring::_M_data(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044AB00) -------------------------------------------------------- +int __fastcall std::wstring::_M_iend(_DWORD *a1) +{ + return *a1 + 2 * *(_DWORD *)(*a1 - 12); +} + +//----- (0044AB10) -------------------------------------------------------- +int __thiscall std::wstring::compare(wchar_t **this, wchar_t *String) +{ + wchar_t *v3; // ebx + size_t v4; // esi + size_t v5; // edx + size_t v6; // eax + _DWORD *v7; // edx + size_t v9; // [esp+18h] [ebp-24h] + size_t v10; // [esp+1Ch] [ebp-20h] + + v3 = String; + v4 = *((_DWORD *)*this - 3); + v5 = wcslen(String); + v10 = v5; + v6 = v4; + if ( v5 <= v4 ) + v6 = v5; + v9 = v6; + if ( !v6 ) + return v4 - v10; + v7 = *this; + if ( String == *this ) + return v4 - v10; + if ( (v7 != 0) != (String != 0) ) + return String == 0 ? 1 : -1; + while ( *(_WORD *)v7 == *v3 ) + { + v7 = (_DWORD *)((char *)v7 + 2); + ++v3; + if ( !--v9 ) + return v4 - v10; + } + return *(_WORD *)v7 < *v3 ? -1 : 1; +} + +//----- (0044ABB0) -------------------------------------------------------- +int __thiscall std::wstring::compare(_DWORD *this, _WORD **a2) +{ + _WORD *v2; // eax + _DWORD *v3; // edx + unsigned int v4; // ebx + unsigned int v5; // esi + unsigned int v6; // ecx + + v2 = (_WORD *)*this; + v3 = *a2; + v4 = *(_DWORD *)(*this - 12); + v5 = *((_DWORD *)*a2 - 3); + v6 = v4; + if ( v5 <= v4 ) + v6 = *((_DWORD *)*a2 - 3); + if ( !v6 || v3 == (_DWORD *)v2 ) + return v4 - v5; + while ( *v2 == *(_WORD *)v3 ) + { + ++v2; + v3 = (_DWORD *)((char *)v3 + 2); + if ( !--v6 ) + return v4 - v5; + } + return *v2 < *(_WORD *)v3 ? -1 : 1; +} + +//----- (0044AC00) -------------------------------------------------------- +int __thiscall std::wstring::compare(_DWORD *this, unsigned int a2, unsigned int a3, wchar_t *String) +{ + unsigned int v4; // eax + unsigned int v5; // ebx + wchar_t *v6; // esi + unsigned int v7; // ebx + unsigned int v9; // ebx + size_t v10; // ecx + size_t v11; // eax + wchar_t *v12; // edx + unsigned int v14; // [esp+1Ch] [ebp-20h] + + v4 = a3; + v5 = *(_DWORD *)(*this - 12); + v6 = String; + if ( a2 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + *(_DWORD *)(*this - 12)); + v7 = v5 - a2; + if ( v7 <= a3 ) + v4 = v7; + v9 = v4; + v14 = v4; + v10 = wcslen(String); + v11 = v9; + if ( v10 <= v9 ) + v11 = v10; + if ( !v11 ) + return v14 - v10; + v12 = (wchar_t *)(*this + 2 * a2); + if ( v12 == String ) + return v14 - v10; + if ( (v12 != 0) != (String != 0) ) + return String == 0 ? 1 : -1; + while ( *v12 == *v6 ) + { + ++v12; + ++v6; + if ( !--v11 ) + return v14 - v10; + } + return *v12 < *v6 ? -1 : 1; +} + +//----- (0044ACE0) -------------------------------------------------------- +int __thiscall std::wstring::compare(int *this, unsigned int a2, unsigned int a3, _WORD *a4, unsigned int a5) +{ + int v5; // esi + unsigned int v6; // eax + _WORD *v7; // ecx + unsigned int v8; // eax + unsigned int v9; // edi + _WORD *v10; // edx + int v11; // esi + + v5 = *this; + v6 = *(_DWORD *)(*this - 12); + v7 = a4; + if ( a2 > v6 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + v6); + v8 = v6 - a2; + if ( v8 > a3 ) + v8 = a3; + v9 = a5; + if ( v8 <= a5 ) + v9 = v8; + if ( !v9 ) + return v8 - a5; + v10 = (_WORD *)(v5 + 2 * a2); + if ( v10 == a4 ) + return v8 - a5; + v11 = 1; + if ( !a4 ) + return v11; + while ( *v10 == *v7 ) + { + ++v10; + ++v7; + if ( !--v9 ) + return v8 - a5; + } + return *v10 < *v7 ? -1 : 1; +} + +//----- (0044AD80) -------------------------------------------------------- +int __thiscall std::wstring::compare(int *this, unsigned int a2, unsigned int a3, _WORD **a4) +{ + int v4; // esi + unsigned int v5; // eax + unsigned int v6; // eax + _DWORD *v7; // edx + unsigned int v8; // ecx + unsigned int v9; // edi + _WORD *v10; // ebx + + v4 = *this; + v5 = *(_DWORD *)(*this - 12); + if ( a2 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + *(_DWORD *)(*this - 12)); + v6 = v5 - a2; + if ( v6 > a3 ) + v6 = a3; + v7 = *a4; + v8 = v6; + v9 = *((_DWORD *)*a4 - 3); + if ( v9 <= v6 ) + v8 = *((_DWORD *)*a4 - 3); + if ( !v8 ) + return v6 - v9; + v10 = (_WORD *)(v4 + 2 * a2); + if ( v10 == (_WORD *)v7 ) + return v6 - v9; + while ( *v10 == *(_WORD *)v7 ) + { + ++v10; + v7 = (_DWORD *)((char *)v7 + 2); + if ( !--v8 ) + return v6 - v9; + } + return *v10 < *(_WORD *)v7 ? -1 : 1; +} + +//----- (0044AE10) -------------------------------------------------------- +int __thiscall std::wstring::compare( + int *this, + unsigned int a2, + unsigned int a3, + _DWORD *a4, + unsigned int a5, + unsigned int a6) +{ + int v6; // edi + unsigned int v7; // eax + unsigned int v8; // edx + unsigned int v9; // eax + unsigned int v10; // edx + unsigned int v11; // esi + _WORD *v12; // ebx + _WORD *v13; // ecx + + v6 = *this; + v7 = *(_DWORD *)(*this - 12); + if ( a2 > v7 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + *(_DWORD *)(v6 - 12)); + v8 = *(_DWORD *)(*a4 - 12); + if ( a5 > v8 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a5, + *(_DWORD *)(*a4 - 12)); + v9 = v7 - a2; + if ( v9 > a3 ) + v9 = a3; + v10 = v8 - a5; + if ( v10 > a6 ) + v10 = a6; + v11 = v9; + if ( v10 <= v9 ) + v11 = v10; + if ( !v11 ) + return v9 - v10; + v12 = (_WORD *)(*a4 + 2 * a5); + v13 = (_WORD *)(v6 + 2 * a2); + if ( v12 == v13 ) + return v9 - v10; + while ( *v13 == *v12 ) + { + ++v13; + ++v12; + if ( !--v11 ) + return v9 - v10; + } + return *v13 < *v12 ? -1 : 1; +} + +//----- (0044AED0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::crbegin(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2 + 2 * *(_DWORD *)(*a2 - 12); + return result; +} + +//----- (0044AEF0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::_M_check(_DWORD *this, unsigned int a2, const char *a3) +{ + unsigned int result; // eax + unsigned int v4; // edx + + result = a2; + v4 = *(_DWORD *)(*this - 12); + if ( v4 < a2 ) + std::__throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)", a3, a2, v4); + return result; +} + +//----- (0044AF30) -------------------------------------------------------- +unsigned int __thiscall std::wstring::_M_limit(_DWORD *this, int a2, unsigned int a3) +{ + unsigned int result; // eax + + result = *(_DWORD *)(*this - 12) - a2; + if ( result > a3 ) + return a3; + return result; +} + +//----- (0044AF50) -------------------------------------------------------- +int __fastcall std::wstring::capacity(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 8); +} + +//----- (0044AF60) -------------------------------------------------------- +int std::wstring::max_size() +{ + return 536870910; +} + +//----- (0044AF70) -------------------------------------------------------- +int __fastcall std::wstring::_M_ibegin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044AF80) -------------------------------------------------------- +int __thiscall std::wstring::operator[](_DWORD *this, int a2) +{ + return *this + 2 * a2; +} + +//----- (0044AF90) -------------------------------------------------------- +int __fastcall std::istream::gcount(int a1) +{ + return *(_DWORD *)(a1 + 4); +} + +//----- (0044AFA0) -------------------------------------------------------- +int __fastcall std::istream::sentry::operator bool(unsigned __int8 *a1) +{ + return *a1; +} + +//----- (0044AFB0) -------------------------------------------------------- +int __fastcall std::ostream::sentry::operator bool(unsigned __int8 *a1) +{ + return *a1; +} + +//----- (0044AFC0) -------------------------------------------------------- +int __userpurge std::string::_M_disjunct@(_DWORD *a1@, std::string *this, const char *a3) +{ + int v3; // edx + + v3 = 1; + if ( *a1 <= (unsigned int)this ) + LOBYTE(v3) = *(_DWORD *)(*a1 - 12) + *a1 < (unsigned int)this; + return v3; +} + +//----- (0044AFE0) -------------------------------------------------------- +const char *__userpurge std::string::find_last_of@(int *a1@, std::string *this, char *a3, unsigned int a4) +{ + size_t v5; // eax + unsigned int v7; // [esp+Ch] [ebp-10h] + + v5 = strlen((const char *)this); + return std::string::find_last_of(a1, this, a3, v5, v7); +} +// 44B004: variable 'v7' is possibly undefined + +//----- (0044B020) -------------------------------------------------------- +const char *__userpurge std::string::find_last_of@( + int *a1@, + std::string *this, + const char *a3, + size_t MaxCount, + unsigned int a5) +{ + int v5; // esi + const char *v6; // ebx + int v7; // eax + unsigned int v8; // eax + + v5 = *a1; + v6 = a3; + v7 = *(_DWORD *)(*a1 - 12); + if ( !v7 || !MaxCount ) + return (const char *)-1; + v8 = v7 - 1; + if ( v8 <= (unsigned int)a3 ) + v6 = (const char *)v8; + do + { + if ( memchr(this, v6[v5], MaxCount) ) + break; + } + while ( v6-- != 0 ); + return v6; +} + +//----- (0044B0A0) -------------------------------------------------------- +const char *__userpurge std::string::find_last_of@( + int *a1@, + std::string **this, + const std::string *a3, + unsigned int a4) +{ + unsigned int v5; // [esp+Ch] [ebp-10h] + + return std::string::find_last_of(a1, *this, (const char *)a3, *((_DWORD *)*this - 3), v5); +} +// 44B0BB: variable 'v5' is possibly undefined + +//----- (0044B0D0) -------------------------------------------------------- +int __userpurge std::string::find_last_of@(_DWORD *a1@, std::string *this, unsigned int a3, unsigned int a4) +{ + int result; // eax + int v5; // ebx + + result = -1; + v5 = *(_DWORD *)(*a1 - 12); + if ( v5 ) + { + result = v5 - 1; + if ( a3 <= v5 - 1 ) + result = a3; + do + { + if ( (_BYTE)this == *(_BYTE *)(*a1 + result) ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (0044B110) -------------------------------------------------------- +int __userpurge std::string::find_first_of@(int *a1@, std::string *this, const char *a3, unsigned int a4) +{ + size_t v6; // eax + int v7; // edi + size_t MaxCount; // ebx + unsigned int v10; // [esp+1Ch] [ebp-20h] + + v6 = strlen((const char *)this); + if ( v6 ) + { + v7 = *a1; + MaxCount = v6; + v10 = *(_DWORD *)(v7 - 12); + while ( v10 > (unsigned int)a3 ) + { + if ( memchr(this, a3[v7], MaxCount) ) + return (int)a3; + ++a3; + } + } + return -1; +} + +//----- (0044B180) -------------------------------------------------------- +int __userpurge std::string::find_first_of@( + int *a1@, + std::string *this, + const char *a3, + size_t MaxCount, + unsigned int a5) +{ + int v6; // esi + unsigned int v7; // edi + + if ( MaxCount ) + { + v6 = *a1; + v7 = *(_DWORD *)(*a1 - 12); + while ( v7 > (unsigned int)a3 ) + { + if ( memchr(this, a3[v6], MaxCount) ) + return (int)a3; + ++a3; + } + } + return -1; +} + +//----- (0044B1F0) -------------------------------------------------------- +int __userpurge std::string::find_first_of@( + int *a1@, + std::string *this, + const std::string *a3, + unsigned int a4) +{ + const void *Buf; // esi + size_t MaxCount; // ebx + int v7; // edi + unsigned int v9; // [esp+1Ch] [ebp-20h] + + Buf = *(const void **)this; + MaxCount = *(_DWORD *)(*(_DWORD *)this - 12); + if ( MaxCount ) + { + v7 = *a1; + v9 = *(_DWORD *)(*a1 - 12); + while ( v9 > (unsigned int)a3 ) + { + if ( memchr(Buf, *((char *)a3 + v7), MaxCount) ) + return (int)a3; + a3 = (const std::string *)((char *)a3 + 1); + } + } + return -1; +} + +//----- (0044B260) -------------------------------------------------------- +char *__userpurge std::string::find_first_of@(int *a1@, std::string *this, unsigned int a3, unsigned int a4) +{ + int v4; // ebx + int v5; // esi + unsigned int v6; // edx + char *v7; // eax + + v4 = -1; + v5 = *a1; + v6 = *(_DWORD *)(*a1 - 12); + if ( a3 < v6 ) + { + v7 = (char *)memchr((const void *)(v5 + a3), (char)this, v6 - a3); + if ( v7 ) + return &v7[-v5]; + } + return (char *)v4; +} + +//----- (0044B2B0) -------------------------------------------------------- +void *__thiscall std::string::get_allocator(void *ecx0, std::string *this) +{ + return ecx0; +} + +//----- (0044B2C0) -------------------------------------------------------- +char *__userpurge std::string::_M_check_length@( + _DWORD *a1@, + std::string *this, + unsigned int a3, + std::length_error *a4, + const char *a5) +{ + char *result; // eax + + result = (char *)this - *(_DWORD *)(*a1 - 12) + 1073741820; + if ( (unsigned int)result < a3 ) + std::__throw_length_error(a4); + return result; +} + +//----- (0044B2F0) -------------------------------------------------------- +int __userpurge std::string::find_last_not_of@(int *a1@, std::string *this, const char *a3, unsigned int a4) +{ + int v4; // ebx + int v5; // esi + int v6; // ebp + size_t v7; // eax + const char *v8; // ecx + size_t MaxCount; // edi + + v4 = -1; + v5 = *a1; + v6 = *(_DWORD *)(*a1 - 12); + if ( v6 ) + { + v7 = strlen((const char *)this); + v8 = (const char *)(v6 - 1); + if ( (unsigned int)a3 <= v6 - 1 ) + v8 = a3; + MaxCount = v7; + v4 = (int)v8; + do + { + if ( !MaxCount ) + break; + if ( !memchr(this, *(char *)(v5 + v4), MaxCount) ) + break; + } + while ( v4-- != 0 ); + } + return v4; +} + +//----- (0044B360) -------------------------------------------------------- +int __userpurge std::string::find_last_not_of@( + int *a1@, + std::string *this, + const char *a3, + size_t MaxCount, + unsigned int a5) +{ + int v5; // ebx + int v6; // edi + const char *v7; // edx + int v8; // eax + unsigned int v9; // eax + + v5 = -1; + v6 = *a1; + v7 = a3; + v8 = *(_DWORD *)(*a1 - 12); + if ( v8 ) + { + v9 = v8 - 1; + if ( v9 <= (unsigned int)a3 ) + v7 = (const char *)v9; + v5 = (int)v7; + do + { + if ( !MaxCount ) + break; + if ( !memchr(this, *(char *)(v6 + v5), MaxCount) ) + break; + } + while ( v5-- != 0 ); + } + return v5; +} + +//----- (0044B3C0) -------------------------------------------------------- +int __userpurge std::string::find_last_not_of@( + int *a1@, + std::string *this, + const std::string *a3, + unsigned int a4) +{ + int v4; // ebx + int v5; // edi + int v6; // eax + const std::string *v7; // eax + _DWORD *Buf; // ebp + size_t MaxCount; // esi + + v4 = -1; + v5 = *a1; + v6 = *(_DWORD *)(*a1 - 12); + if ( v6 ) + { + v7 = (const std::string *)(v6 - 1); + Buf = *(_DWORD **)this; + if ( a3 <= v7 ) + v7 = a3; + MaxCount = *(Buf - 3); + v4 = (int)v7; + do + { + if ( !MaxCount ) + break; + if ( !memchr(Buf, *(char *)(v5 + v4), MaxCount) ) + break; + } + while ( v4-- != 0 ); + } + return v4; +} + +//----- (0044B420) -------------------------------------------------------- +int __userpurge std::string::find_last_not_of@( + _DWORD *a1@, + std::string *this, + unsigned int a3, + unsigned int a4) +{ + int result; // eax + int v5; // ebx + + result = -1; + v5 = *(_DWORD *)(*a1 - 12); + if ( v5 ) + { + result = v5 - 1; + if ( v5 - 1 > a3 ) + result = a3; + do + { + if ( *(_BYTE *)(*a1 + result) != (_BYTE)this ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (0044B460) -------------------------------------------------------- +int __userpurge std::string::find_first_not_of@(int *a1@, std::string *this, const char *a3, unsigned int a4) +{ + const char *v5; // edi + size_t v6; // eax + int v7; // esi + unsigned int v8; // ebp + size_t MaxCount; // ebx + + v5 = a3; + v6 = strlen((const char *)this); + v7 = *a1; + v8 = *(_DWORD *)(v7 - 12); + if ( (unsigned int)a3 >= v8 ) + return -1; + MaxCount = v6; + if ( v6 ) + { + while ( memchr(this, v5[v7], MaxCount) ) + { + if ( ++v5 == (const char *)v8 ) + return -1; + } + } + return (int)v5; +} + +//----- (0044B4D0) -------------------------------------------------------- +int __userpurge std::string::find_first_not_of@( + int *a1@, + std::string *this, + const char *a3, + size_t MaxCount, + unsigned int a5) +{ + int v5; // ebx + const char *v6; // ebp + unsigned int v7; // edi + + v5 = *a1; + v6 = a3; + v7 = *(_DWORD *)(*a1 - 12); + if ( (unsigned int)a3 >= v7 ) + return -1; + if ( MaxCount ) + { + while ( memchr(this, v6[v5], MaxCount) ) + { + if ( ++v6 == (const char *)v7 ) + return -1; + } + } + return (int)v6; +} + +//----- (0044B530) -------------------------------------------------------- +int __userpurge std::string::find_first_not_of@( + int *a1@, + std::string *this, + const std::string *a3, + unsigned int a4) +{ + int v4; // esi + const std::string *v5; // ebp + const void *Buf; // ebx + size_t MaxCount; // edi + unsigned int v9; // [esp+1Ch] [ebp-20h] + + v4 = *a1; + v5 = a3; + Buf = *(const void **)this; + MaxCount = *(_DWORD *)(*(_DWORD *)this - 12); + v9 = *(_DWORD *)(*a1 - 12); + if ( (unsigned int)a3 >= v9 ) + return -1; + if ( MaxCount ) + { + while ( memchr(Buf, *((char *)v5 + v4), MaxCount) ) + { + v5 = (const std::string *)((char *)v5 + 1); + if ( v5 == (const std::string *)v9 ) + return -1; + } + } + return (int)v5; +} + +//----- (0044B5A0) -------------------------------------------------------- +int __userpurge std::string::find_first_not_of@( + int *a1@, + std::string *this, + unsigned int a3, + unsigned int a4) +{ + int v4; // edx + int result; // eax + unsigned int v6; // ecx + + v4 = *a1; + result = a3; + v6 = *(_DWORD *)(*a1 - 12); + if ( a3 >= v6 ) + return -1; + while ( *(_BYTE *)(v4 + result) == (_BYTE)this ) + { + if ( ++result == v6 ) + return -1; + } + return result; +} + +//----- (0044B5E0) -------------------------------------------------------- +char *__userpurge std::string::at@(int *a1@, std::string *this, unsigned int a3) +{ + int v3; // eax + unsigned int v4; // ecx + + v3 = *a1; + v4 = *(_DWORD *)(*a1 - 12); + if ( (unsigned int)this >= v4 ) + std::__throw_out_of_range_fmt( + "basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", + (size_t)this, + v4); + return (char *)this + v3; +} + +//----- (0044B610) -------------------------------------------------------- +int __fastcall std::string::end(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 12) + *a1; +} + +//----- (0044B620) -------------------------------------------------------- +int __fastcall std::string::_Rep::_M_is_leaked(int a1) +{ + return *(_DWORD *)(a1 + 8) >> 31; +} + +//----- (0044B630) -------------------------------------------------------- +bool __fastcall std::string::_Rep::_M_is_shared(int a1) +{ + return *(_DWORD *)(a1 + 8) > 0; +} + +//----- (0044B640) -------------------------------------------------------- +int __fastcall std::string::back(_DWORD *a1) +{ + return *a1 + *(_DWORD *)(*a1 - 12) - 1; +} + +//----- (0044B650) -------------------------------------------------------- +int __fastcall std::string::cend(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 12) + *a1; +} + +//----- (0044B660) -------------------------------------------------------- +size_t __userpurge std::string::copy@( + _DWORD *a1@, + std::string *this, + size_t a3, + unsigned int a4, + unsigned int a5) +{ + unsigned int v5; // ebx + size_t Size; // ebx + _BYTE *Src; // eax + + v5 = *(_DWORD *)(*a1 - 12); + if ( a4 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::copy", + a4, + *(_DWORD *)(*a1 - 12)); + Size = v5 - a4; + if ( Size > a3 ) + Size = a3; + if ( !Size ) + return Size; + Src = (_BYTE *)(*a1 + a4); + if ( Size != 1 ) + { + memcpy(this, Src, Size); + return Size; + } + *(_BYTE *)this = *Src; + return 1; +} + +//----- (0044B6E0) -------------------------------------------------------- +int __fastcall std::string::data(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044B6F0) -------------------------------------------------------- +int __userpurge std::string::find@(int *a1@, std::string *this, char *a3, unsigned int a4) +{ + size_t Size; // eax + unsigned int v7; // [esp+Ch] [ebp-10h] + + Size = strlen((const char *)this); + return std::string::find(a1, this, a3, Size, v7); +} +// 44B714: variable 'v7' is possibly undefined + +//----- (0044B730) -------------------------------------------------------- +int __userpurge std::string::find@(int *a1@, std::string *this, const char *a3, size_t Size, unsigned int a5) +{ + int v5; // edi + unsigned int v6; // edx + int v7; // ecx + int v8; // ebp + size_t v9; // edx + const char *Buf; // eax + size_t MaxCount; // edx + int Val; // ebp + const char *v13; // edi + int v15; // ecx + int v16; // [esp+18h] [ebp-24h] + int v17; // [esp+1Ch] [ebp-20h] + + v5 = *a1; + v6 = *(_DWORD *)(*a1 - 12); + if ( Size ) + { + v7 = -1; + if ( v6 > (unsigned int)a3 ) + { + v8 = v5 + v6; + v9 = v6 - (_DWORD)a3; + Buf = &a3[v5]; + v16 = v8; + if ( Size <= v9 ) + { + MaxCount = 1 - Size + v9; + if ( MaxCount ) + { + v17 = v5; + Val = *(char *)this; + while ( 1 ) + { + v13 = (const char *)memchr(Buf, Val, MaxCount); + if ( !v13 ) + return -1; + if ( !memcmp(v13, this, Size) ) + break; + Buf = v13 + 1; + if ( Size <= v16 - (int)(v13 + 1) ) + { + MaxCount = v16 - (_DWORD)v13 - Size; + if ( MaxCount ) + continue; + } + return -1; + } + return (int)&v13[-v17]; + } + } + } + return v7; + } + else + { + v15 = -1; + if ( v6 >= (unsigned int)a3 ) + return (int)a3; + return v15; + } +} + +//----- (0044B800) -------------------------------------------------------- +int __userpurge std::string::find@(int *a1@, std::string **this, const std::string *a3, unsigned int a4) +{ + unsigned int v5; // [esp+Ch] [ebp-10h] + + return std::string::find(a1, *this, (const char *)a3, *((_DWORD *)*this - 3), v5); +} +// 44B81B: variable 'v5' is possibly undefined + +//----- (0044B830) -------------------------------------------------------- +char *__userpurge std::string::find@(int *a1@, std::string *this, unsigned int a3, unsigned int a4) +{ + int v4; // ebx + int v5; // esi + unsigned int v6; // edx + char *v7; // eax + + v4 = -1; + v5 = *a1; + v6 = *(_DWORD *)(*a1 - 12); + if ( a3 < v6 ) + { + v7 = (char *)memchr((const void *)(v5 + a3), (char)this, v6 - a3); + if ( v7 ) + return &v7[-v5]; + } + return (char *)v4; +} + +//----- (0044B880) -------------------------------------------------------- +_DWORD *__thiscall std::string::rend(_DWORD *ecx0, std::string *this) +{ + _DWORD *result; // eax + + result = ecx0; + *ecx0 = *(_DWORD *)this; + return result; +} + +//----- (0044B890) -------------------------------------------------------- +int __fastcall std::string::size(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 12); +} + +//----- (0044B8A0) -------------------------------------------------------- +int __fastcall std::string::begin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044B8B0) -------------------------------------------------------- +int __fastcall std::string::c_str(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044B8C0) -------------------------------------------------------- +_DWORD *__thiscall std::string::crend(_DWORD *ecx0, std::string *this) +{ + _DWORD *result; // eax + + result = ecx0; + *ecx0 = *(_DWORD *)this; + return result; +} + +//----- (0044B8D0) -------------------------------------------------------- +bool __fastcall std::string::empty(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 12) == 0; +} + +//----- (0044B8E0) -------------------------------------------------------- +int __fastcall std::string::front(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044B8F0) -------------------------------------------------------- +int __userpurge std::string::rfind@(int *a1@, std::string *this, char *a3, unsigned int a4) +{ + size_t v5; // eax + unsigned int v7; // [esp+Ch] [ebp-10h] + + v5 = strlen((const char *)this); + return std::string::rfind(a1, this, a3, v5, v7); +} +// 44B914: variable 'v7' is possibly undefined + +//----- (0044B930) -------------------------------------------------------- +int __userpurge std::string::rfind@( + int *a1@, + std::string *this, + const char *a3, + size_t Size, + unsigned int a5) +{ + int v5; // ebx + int v6; // ebp + size_t v7; // eax + const char *v8; // edx + unsigned int v9; // eax + + v5 = -1; + v6 = *a1; + v7 = *(_DWORD *)(*a1 - 12); + v8 = a3; + if ( Size <= v7 ) + { + v9 = v7 - Size; + if ( v9 <= (unsigned int)a3 ) + v8 = (const char *)v9; + v5 = (int)v8; + if ( Size ) + { + while ( memcmp((const void *)(v6 + v5), this, Size) ) + { + if ( !v5 ) + return -1; + --v5; + } + } + } + return v5; +} +// 44B981: conditional instruction was optimized away because %arg_8.4!=0 + +//----- (0044B9A0) -------------------------------------------------------- +int __userpurge std::string::rfind@(int *a1@, std::string *this, const std::string *a3, unsigned int a4) +{ + int v4; // ebx + int v5; // ebp + const std::string *v6; // edx + const void *Buf2; // edi + size_t v8; // eax + size_t Size; // esi + unsigned int v10; // eax + + v4 = -1; + v5 = *a1; + v6 = a3; + Buf2 = *(const void **)this; + v8 = *(_DWORD *)(*a1 - 12); + Size = *(_DWORD *)(*(_DWORD *)this - 12); + if ( Size <= v8 ) + { + v10 = v8 - Size; + if ( v10 <= (unsigned int)a3 ) + v6 = (const std::string *)v10; + v4 = (int)v6; + if ( Size ) + { + while ( memcmp((const void *)(v5 + v4), Buf2, Size) ) + { + if ( !v4 ) + return -1; + --v4; + } + } + } + return v4; +} +// 44B9F2: conditional instruction was optimized away because esi.4!=0 + +//----- (0044BA10) -------------------------------------------------------- +int __userpurge std::string::rfind@(_DWORD *a1@, std::string *this, unsigned int a3, unsigned int a4) +{ + int result; // eax + int v5; // ebx + + result = -1; + v5 = *(_DWORD *)(*a1 - 12); + if ( v5 ) + { + result = v5 - 1; + if ( v5 - 1 > a3 ) + result = a3; + do + { + if ( *(_BYTE *)(*a1 + result) == (_BYTE)this ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (0044BA50) -------------------------------------------------------- +int __fastcall std::string::_M_rep(_DWORD *a1) +{ + return *a1 - 12; +} + +//----- (0044BA60) -------------------------------------------------------- +int __fastcall std::string::cbegin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044BA70) -------------------------------------------------------- +int __fastcall std::string::length(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 12); +} + +//----- (0044BA80) -------------------------------------------------------- +_DWORD *__thiscall std::string::rbegin(_DWORD *ecx0, std::string *this) +{ + _DWORD *result; // eax + + result = ecx0; + *ecx0 = *(_DWORD *)(*(_DWORD *)this - 12) + *(_DWORD *)this; + return result; +} + +//----- (0044BA90) -------------------------------------------------------- +int *__thiscall std::string::substr(int *ecx0, std::string *this, unsigned int a3, unsigned int a4) +{ + unsigned int v5; // eax + unsigned int v6; // eax + + v5 = *(_DWORD *)(*(_DWORD *)this - 12); + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::substr", + a3, + *(_DWORD *)(*(_DWORD *)this - 12)); + v6 = v5 - a3; + if ( v6 > a4 ) + v6 = a4; + *ecx0 = std::string::_S_construct((_BYTE *)(a3 + *(_DWORD *)this), *(_DWORD *)this + a3 + v6); + return ecx0; +} + +//----- (0044BB00) -------------------------------------------------------- +int __fastcall std::string::_M_data(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044BB10) -------------------------------------------------------- +int __fastcall std::string::_M_iend(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 12) + *a1; +} + +//----- (0044BB20) -------------------------------------------------------- +int __userpurge std::string::compare@(const void **a1@, std::string *this, const char *a3) +{ + _DWORD *v3; // edi + size_t v4; // esi + size_t v5; // ebx + size_t Size; // eax + int result; // eax + + v3 = *a1; + v4 = *((_DWORD *)*a1 - 3); + v5 = strlen((const char *)this); + Size = v4; + if ( v5 <= v4 ) + Size = v5; + if ( !Size ) + return v4 - v5; + result = memcmp(v3, this, Size); + if ( !result ) + return v4 - v5; + return result; +} + +//----- (0044BB70) -------------------------------------------------------- +int __userpurge std::string::compare@(const void **a1@, const void **this, const std::string *a3) +{ + _DWORD *Buf1; // eax + size_t v4; // esi + size_t Size; // ecx + size_t v6; // ebx + int result; // eax + + Buf1 = *a1; + v4 = *((_DWORD *)*a1 - 3); + Size = v4; + v6 = *((_DWORD *)*this - 3); + if ( v6 <= v4 ) + Size = *((_DWORD *)*this - 3); + if ( !Size ) + return v4 - v6; + result = memcmp(Buf1, *this, Size); + if ( !result ) + return v4 - v6; + return result; +} + +//----- (0044BBB0) -------------------------------------------------------- +int __userpurge std::string::compare@( + int *a1@, + std::string *this, + unsigned int a3, + char *Str, + const char *a5) +{ + int v5; // ebp + unsigned int v6; // ebx + unsigned int v7; // ebx + size_t v8; // edi + size_t Size; // eax + int result; // eax + + v5 = *a1; + v6 = *(_DWORD *)(*a1 - 12); + if ( (unsigned int)this > v6 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + (size_t)this, + *(_DWORD *)(*a1 - 12)); + v7 = v6 - (_DWORD)this; + if ( v7 > a3 ) + v7 = a3; + v8 = strlen(Str); + Size = v7; + if ( v8 <= v7 ) + Size = v8; + if ( !Size ) + return v7 - v8; + result = memcmp((char *)this + v5, Str, Size); + if ( !result ) + return v7 - v8; + return result; +} + +//----- (0044BC30) -------------------------------------------------------- +int __userpurge std::string::compare@( + int *a1@, + std::string *this, + size_t a3, + void *Buf2, + const char *a5, + unsigned int a6) +{ + int v6; // eax + unsigned int v7; // ebx + unsigned int v8; // ebx + const char *Size; // ecx + int result; // eax + + v6 = *a1; + v7 = *(_DWORD *)(*a1 - 12); + if ( (unsigned int)this > v7 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + (size_t)this, + *(_DWORD *)(*a1 - 12)); + v8 = v7 - (_DWORD)this; + Size = a5; + if ( v8 > a3 ) + v8 = a3; + if ( v8 <= (unsigned int)a5 ) + Size = (const char *)v8; + if ( !Size ) + return v8 - (_DWORD)a5; + result = memcmp((char *)this + v6, Buf2, (size_t)Size); + if ( !result ) + return v8 - (_DWORD)a5; + return result; +} + +//----- (0044BCA0) -------------------------------------------------------- +int __userpurge std::string::compare@( + int *a1@, + std::string *this, + unsigned int a3, + const void **a4, + const std::string *a5) +{ + int v5; // eax + unsigned int v6; // ebx + unsigned int v7; // ebx + _DWORD *Buf2; // ecx + unsigned int v9; // esi + size_t Size; // edi + int result; // eax + + v5 = *a1; + v6 = *(_DWORD *)(*a1 - 12); + if ( (unsigned int)this > v6 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + (size_t)this, + *(_DWORD *)(*a1 - 12)); + v7 = v6 - (_DWORD)this; + Buf2 = *a4; + if ( v7 > a3 ) + v7 = a3; + v9 = *(Buf2 - 3); + Size = v7; + if ( v9 <= v7 ) + Size = *(Buf2 - 3); + if ( !Size ) + return v7 - v9; + result = memcmp((char *)this + v5, Buf2, Size); + if ( !result ) + return v7 - v9; + return result; +} + +//----- (0044BD20) -------------------------------------------------------- +int __userpurge std::string::compare@( + _DWORD *a1@, + std::string *this, + unsigned int a3, + _DWORD *a4, + const std::string *a5, + unsigned int a6, + unsigned int a7) +{ + unsigned int v7; // ebx + unsigned int v8; // ebp + unsigned int v9; // eax + unsigned int v10; // ebx + unsigned int v11; // eax + size_t Size; // eax + int result; // eax + + v7 = *(_DWORD *)(*a1 - 12); + v8 = a6; + if ( (unsigned int)this > v7 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + (size_t)this, + *(_DWORD *)(*a1 - 12)); + v9 = *(_DWORD *)(*a4 - 12); + if ( (unsigned int)a5 > v9 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + (size_t)a5, + *(_DWORD *)(*a4 - 12)); + v10 = v7 - (_DWORD)this; + if ( v10 > a3 ) + v10 = a3; + v11 = v9 - (_DWORD)a5; + if ( v11 <= a6 ) + v8 = v11; + Size = v10; + if ( v8 <= v10 ) + Size = v8; + if ( !Size ) + return v10 - v8; + result = memcmp((char *)this + *a1, (char *)a5 + *a4, Size); + if ( !result ) + return v10 - v8; + return result; +} + +//----- (0044BDD0) -------------------------------------------------------- +_DWORD *__thiscall std::string::crbegin(_DWORD *ecx0, std::string *this) +{ + _DWORD *result; // eax + + result = ecx0; + *ecx0 = *(_DWORD *)(*(_DWORD *)this - 12) + *(_DWORD *)this; + return result; +} + +//----- (0044BDE0) -------------------------------------------------------- +std::string *__userpurge std::string::_M_check@( + _DWORD *a1@, + std::string *this, + const char *a3, + const char *a4) +{ + std::string *result; // eax + unsigned int v5; // edx + + result = this; + v5 = *(_DWORD *)(*a1 - 12); + if ( v5 < (unsigned int)this ) + std::__throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)", a3, (size_t)this, v5); + return result; +} + +//----- (0044BE20) -------------------------------------------------------- +unsigned int __userpurge std::string::_M_limit@( + _DWORD *a1@, + std::string *this, + unsigned int a3, + unsigned int a4) +{ + unsigned int result; // eax + + result = *(_DWORD *)(*a1 - 12) - (_DWORD)this; + if ( result > a3 ) + return a3; + return result; +} + +//----- (0044BE40) -------------------------------------------------------- +int __fastcall std::string::capacity(_DWORD *a1) +{ + return *(_DWORD *)(*a1 - 8); +} + +//----- (0044BE50) -------------------------------------------------------- +int std::string::max_size() +{ + return 1073741820; +} + +//----- (0044BE60) -------------------------------------------------------- +int __fastcall std::string::_M_ibegin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (0044BE70) -------------------------------------------------------- +int __thiscall std::string::operator[](_DWORD *this, int a2) +{ + return a2 + *this; +} + +//----- (0044BE80) -------------------------------------------------------- +const char *std::bad_typeid::what() +{ + return "std::bad_typeid"; +} + +//----- (0044BE90) -------------------------------------------------------- +int __fastcall std::error_code::default_error_condition(int a1) +{ + return (*(int (__thiscall **)(_DWORD, _DWORD))(**(_DWORD **)(a1 + 4) + 20))(*(_DWORD *)(a1 + 4), *(_DWORD *)a1); +} + +//----- (0044BEB0) -------------------------------------------------------- +int __fastcall std::moneypunct::neg_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 40); + if ( (char *)v1 == (char *)std::moneypunct::do_neg_format ) + return *(_DWORD *)(a1[2] + 52); + else + return v1(); +} + +//----- (0044BED0) -------------------------------------------------------- +int __fastcall std::moneypunct::pos_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 36); + if ( (char *)v1 == (char *)std::moneypunct::do_pos_format ) + return *(_DWORD *)(a1[2] + 48); + else + return v1(); +} + +//----- (0044BEF0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::moneypunct::do_curr_symbol ) + std::string::string(this, *(char **)(a2[2] + 20), (int)v5); + else + v3(a2); + return this; +} +// 44BEF0: using guessed type int var_D[3]; + +//----- (0044BF50) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 8), (int)v4); + return this; +} +// 44BF50: using guessed type int var_D[3]; + +//----- (0044BF80) -------------------------------------------------------- +int __fastcall std::moneypunct::frac_digits(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 32); + if ( (char *)v1 == (char *)std::moneypunct::do_frac_digits ) + return *(_DWORD *)(a1[2] + 44); + else + return v1(); +} + +//----- (0044BFA0) -------------------------------------------------------- +int __fastcall std::moneypunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::moneypunct::do_decimal_point ) + return *(unsigned __int8 *)(a1[2] + 17); + else + return v1(); +} + +//----- (0044BFC0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_neg_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 52); +} + +//----- (0044BFD0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_pos_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 48); +} + +//----- (0044BFE0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 28); + if ( (char *)v3 == (char *)std::moneypunct::do_negative_sign ) + std::string::string(this, *(char **)(a2[2] + 36), (int)v5); + else + v3(a2); + return this; +} +// 44BFE0: using guessed type int var_D[3]; + +//----- (0044C040) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::moneypunct::do_positive_sign ) + std::string::string(this, *(char **)(a2[2] + 28), (int)v5); + else + v3(a2); + return this; +} +// 44C040: using guessed type int var_D[3]; + +//----- (0044C0A0) -------------------------------------------------------- +int __fastcall std::moneypunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::moneypunct::do_thousands_sep ) + return *(unsigned __int8 *)(a1[2] + 18); + else + return v1(); +} + +//----- (0044C0C0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 20), (int)v4); + return this; +} +// 44C0C0: using guessed type int var_D[3]; + +//----- (0044C0F0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_frac_digits(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 44); +} + +//----- (0044C100) -------------------------------------------------------- +int __fastcall std::moneypunct::do_decimal_point(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 17); +} + +//----- (0044C110) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 36), (int)v4); + return this; +} +// 44C110: using guessed type int var_D[3]; + +//----- (0044C140) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 28), (int)v4); + return this; +} +// 44C140: using guessed type int var_D[3]; + +//----- (0044C170) -------------------------------------------------------- +int __fastcall std::moneypunct::do_thousands_sep(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 18); +} + +//----- (0044C180) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::moneypunct::do_grouping ) + std::string::string(this, *(char **)(a2[2] + 8), (int)v5); + else + v3(a2); + return this; +} +// 44C180: using guessed type int var_D[3]; + +//----- (0044C1E0) -------------------------------------------------------- +int __fastcall std::moneypunct::neg_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 40); + if ( (char *)v1 == (char *)std::moneypunct::do_neg_format ) + return *(_DWORD *)(a1[2] + 52); + else + return v1(); +} + +//----- (0044C200) -------------------------------------------------------- +int __fastcall std::moneypunct::pos_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 36); + if ( (char *)v1 == (char *)std::moneypunct::do_pos_format ) + return *(_DWORD *)(a1[2] + 48); + else + return v1(); +} + +//----- (0044C220) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::moneypunct::do_curr_symbol ) + std::string::string(this, *(char **)(a2[2] + 20), (int)v5); + else + v3(a2); + return this; +} +// 44C220: using guessed type int var_D[3]; + +//----- (0044C280) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 8), (int)v4); + return this; +} +// 44C280: using guessed type int var_D[3]; + +//----- (0044C2B0) -------------------------------------------------------- +int __fastcall std::moneypunct::frac_digits(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 32); + if ( (char *)v1 == (char *)std::moneypunct::do_frac_digits ) + return *(_DWORD *)(a1[2] + 44); + else + return v1(); +} + +//----- (0044C2D0) -------------------------------------------------------- +int __fastcall std::moneypunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::moneypunct::do_decimal_point ) + return *(unsigned __int8 *)(a1[2] + 17); + else + return v1(); +} + +//----- (0044C2F0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_neg_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 52); +} + +//----- (0044C300) -------------------------------------------------------- +int __fastcall std::moneypunct::do_pos_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 48); +} + +//----- (0044C310) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 28); + if ( (char *)v3 == (char *)std::moneypunct::do_negative_sign ) + std::string::string(this, *(char **)(a2[2] + 36), (int)v5); + else + v3(a2); + return this; +} +// 44C310: using guessed type int var_D[3]; + +//----- (0044C370) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::moneypunct::do_positive_sign ) + std::string::string(this, *(char **)(a2[2] + 28), (int)v5); + else + v3(a2); + return this; +} +// 44C370: using guessed type int var_D[3]; + +//----- (0044C3D0) -------------------------------------------------------- +int __fastcall std::moneypunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::moneypunct::do_thousands_sep ) + return *(unsigned __int8 *)(a1[2] + 18); + else + return v1(); +} + +//----- (0044C3F0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 20), (int)v4); + return this; +} +// 44C3F0: using guessed type int var_D[3]; + +//----- (0044C420) -------------------------------------------------------- +int __fastcall std::moneypunct::do_frac_digits(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 44); +} + +//----- (0044C430) -------------------------------------------------------- +int __fastcall std::moneypunct::do_decimal_point(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 17); +} + +//----- (0044C440) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 36), (int)v4); + return this; +} +// 44C440: using guessed type int var_D[3]; + +//----- (0044C470) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 28), (int)v4); + return this; +} +// 44C470: using guessed type int var_D[3]; + +//----- (0044C4A0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_thousands_sep(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 18); +} + +//----- (0044C4B0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::moneypunct::do_grouping ) + std::string::string(this, *(char **)(a2[2] + 8), (int)v5); + else + v3(a2); + return this; +} +// 44C4B0: using guessed type int var_D[3]; + +//----- (0044C510) -------------------------------------------------------- +int __fastcall std::moneypunct::neg_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 40); + if ( (char *)v1 == (char *)std::moneypunct::do_neg_format ) + return *(_DWORD *)(a1[2] + 56); + else + return v1(); +} + +//----- (0044C530) -------------------------------------------------------- +int __fastcall std::moneypunct::pos_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 36); + if ( (char *)v1 == (char *)std::moneypunct::do_pos_format ) + return *(_DWORD *)(a1[2] + 52); + else + return v1(); +} + +//----- (0044C550) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::moneypunct::do_curr_symbol ) + std::wstring::basic_string(this, *(wchar_t **)(a2[2] + 24), (int)v5); + else + v3(a2); + return this; +} +// 44C550: using guessed type int var_D[3]; + +//----- (0044C5B0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 8), (int)v4); + return this; +} +// 44C5B0: using guessed type int var_D[3]; + +//----- (0044C5E0) -------------------------------------------------------- +int __fastcall std::moneypunct::frac_digits(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 32); + if ( (char *)v1 == (char *)std::moneypunct::do_frac_digits ) + return *(_DWORD *)(a1[2] + 48); + else + return v1(); +} + +//----- (0044C600) -------------------------------------------------------- +int __fastcall std::moneypunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::moneypunct::do_decimal_point ) + return *(unsigned __int16 *)(a1[2] + 18); + else + return v1(); +} + +//----- (0044C620) -------------------------------------------------------- +int __fastcall std::moneypunct::do_neg_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 56); +} + +//----- (0044C630) -------------------------------------------------------- +int __fastcall std::moneypunct::do_pos_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 52); +} + +//----- (0044C640) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 28); + if ( (char *)v3 == (char *)std::moneypunct::do_negative_sign ) + std::wstring::basic_string(this, *(wchar_t **)(a2[2] + 40), (int)v5); + else + v3(a2); + return this; +} +// 44C640: using guessed type int var_D[3]; + +//----- (0044C6A0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::moneypunct::do_positive_sign ) + std::wstring::basic_string(this, *(wchar_t **)(a2[2] + 32), (int)v5); + else + v3(a2); + return this; +} +// 44C6A0: using guessed type int var_D[3]; + +//----- (0044C700) -------------------------------------------------------- +int __fastcall std::moneypunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::moneypunct::do_thousands_sep ) + return *(unsigned __int16 *)(a1[2] + 20); + else + return v1(); +} + +//----- (0044C720) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::wstring::basic_string(this, *(wchar_t **)(*(_DWORD *)(a2 + 8) + 24), (int)v4); + return this; +} +// 44C720: using guessed type int var_D[3]; + +//----- (0044C750) -------------------------------------------------------- +int __fastcall std::moneypunct::do_frac_digits(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 48); +} + +//----- (0044C760) -------------------------------------------------------- +int __fastcall std::moneypunct::do_decimal_point(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 18); +} + +//----- (0044C770) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::wstring::basic_string(this, *(wchar_t **)(*(_DWORD *)(a2 + 8) + 40), (int)v4); + return this; +} +// 44C770: using guessed type int var_D[3]; + +//----- (0044C7A0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::wstring::basic_string(this, *(wchar_t **)(*(_DWORD *)(a2 + 8) + 32), (int)v4); + return this; +} +// 44C7A0: using guessed type int var_D[3]; + +//----- (0044C7D0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_thousands_sep(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 20); +} + +//----- (0044C7E0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::moneypunct::do_grouping ) + std::string::string(this, *(char **)(a2[2] + 8), (int)v5); + else + v3(a2); + return this; +} +// 44C7E0: using guessed type int var_D[3]; + +//----- (0044C840) -------------------------------------------------------- +int __fastcall std::moneypunct::neg_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 40); + if ( (char *)v1 == (char *)std::moneypunct::do_neg_format ) + return *(_DWORD *)(a1[2] + 56); + else + return v1(); +} + +//----- (0044C860) -------------------------------------------------------- +int __fastcall std::moneypunct::pos_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 36); + if ( (char *)v1 == (char *)std::moneypunct::do_pos_format ) + return *(_DWORD *)(a1[2] + 52); + else + return v1(); +} + +//----- (0044C880) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::moneypunct::do_curr_symbol ) + std::wstring::basic_string(this, *(wchar_t **)(a2[2] + 24), (int)v5); + else + v3(a2); + return this; +} +// 44C880: using guessed type int var_D[3]; + +//----- (0044C8E0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 8), (int)v4); + return this; +} +// 44C8E0: using guessed type int var_D[3]; + +//----- (0044C910) -------------------------------------------------------- +int __fastcall std::moneypunct::frac_digits(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 32); + if ( (char *)v1 == (char *)std::moneypunct::do_frac_digits ) + return *(_DWORD *)(a1[2] + 48); + else + return v1(); +} + +//----- (0044C930) -------------------------------------------------------- +int __fastcall std::moneypunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::moneypunct::do_decimal_point ) + return *(unsigned __int16 *)(a1[2] + 18); + else + return v1(); +} + +//----- (0044C950) -------------------------------------------------------- +int __fastcall std::moneypunct::do_neg_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 56); +} + +//----- (0044C960) -------------------------------------------------------- +int __fastcall std::moneypunct::do_pos_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 52); +} + +//----- (0044C970) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 28); + if ( (char *)v3 == (char *)std::moneypunct::do_negative_sign ) + std::wstring::basic_string(this, *(wchar_t **)(a2[2] + 40), (int)v5); + else + v3(a2); + return this; +} +// 44C970: using guessed type int var_D[3]; + +//----- (0044C9D0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::moneypunct::do_positive_sign ) + std::wstring::basic_string(this, *(wchar_t **)(a2[2] + 32), (int)v5); + else + v3(a2); + return this; +} +// 44C9D0: using guessed type int var_D[3]; + +//----- (0044CA30) -------------------------------------------------------- +int __fastcall std::moneypunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::moneypunct::do_thousands_sep ) + return *(unsigned __int16 *)(a1[2] + 20); + else + return v1(); +} + +//----- (0044CA50) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::wstring::basic_string(this, *(wchar_t **)(*(_DWORD *)(a2 + 8) + 24), (int)v4); + return this; +} +// 44CA50: using guessed type int var_D[3]; + +//----- (0044CA80) -------------------------------------------------------- +int __fastcall std::moneypunct::do_frac_digits(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 48); +} + +//----- (0044CA90) -------------------------------------------------------- +int __fastcall std::moneypunct::do_decimal_point(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 18); +} + +//----- (0044CAA0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::wstring::basic_string(this, *(wchar_t **)(*(_DWORD *)(a2 + 8) + 40), (int)v4); + return this; +} +// 44CAA0: using guessed type int var_D[3]; + +//----- (0044CAD0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::wstring::basic_string(this, *(wchar_t **)(*(_DWORD *)(a2 + 8) + 32), (int)v4); + return this; +} +// 44CAD0: using guessed type int var_D[3]; + +//----- (0044CB00) -------------------------------------------------------- +int __fastcall std::moneypunct::do_thousands_sep(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 20); +} + +//----- (0044CB10) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::moneypunct::do_grouping ) + std::string::string(this, *(char **)(a2[2] + 8), (int)v5); + else + v3(a2); + return this; +} +// 44CB10: using guessed type int var_D[3]; + +//----- (0044CB80) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_date_formats(_DWORD *this, _DWORD *a2) +{ + int v2; // edx + _DWORD *result; // eax + + v2 = this[2]; + result = a2; + *a2 = *(_DWORD *)(v2 + 8); + a2[1] = *(_DWORD *)(v2 + 12); + return result; +} + +//----- (0044CBA0) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_time_formats(_DWORD *this, _DWORD *a2) +{ + int v2; // edx + _DWORD *result; // eax + + v2 = this[2]; + result = a2; + *a2 = *(_DWORD *)(v2 + 16); + a2[1] = *(_DWORD *)(v2 + 20); + return result; +} + +//----- (0044CBC0) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_days_abbreviated(_DWORD *this, _DWORD *a2) +{ + _DWORD *v2; // edx + _DWORD *result; // eax + + v2 = (_DWORD *)this[2]; + result = a2; + *a2 = v2[18]; + a2[1] = v2[19]; + a2[2] = v2[20]; + a2[3] = v2[21]; + a2[4] = v2[22]; + a2[5] = v2[23]; + a2[6] = v2[24]; + return result; +} + +//----- (0044CC00) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_date_time_formats(_DWORD *this, _DWORD *a2) +{ + int v2; // edx + _DWORD *result; // eax + + v2 = this[2]; + result = a2; + *a2 = *(_DWORD *)(v2 + 24); + a2[1] = *(_DWORD *)(v2 + 28); + return result; +} + +//----- (0044CC20) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_months_abbreviated(_DWORD *this, _DWORD *a2) +{ + _DWORD *v2; // edx + _DWORD *result; // eax + + v2 = (_DWORD *)this[2]; + result = a2; + *a2 = v2[37]; + a2[1] = v2[38]; + a2[2] = v2[39]; + a2[3] = v2[40]; + a2[4] = v2[41]; + a2[5] = v2[42]; + a2[6] = v2[43]; + a2[7] = v2[44]; + a2[8] = v2[45]; + a2[9] = v2[46]; + a2[10] = v2[47]; + a2[11] = v2[48]; + return result; +} + +//----- (0044CCA0) -------------------------------------------------------- +void __thiscall std::__timepunct::_M_put( + const char **this, + char *Buffer, + size_t SizeInBytes, + char *Format, + struct tm *Tm) +{ + char *v5; // eax + char *v6; // edx + char *Src; // [esp+10h] [ebp-4Ch] + char *Srca; // [esp+10h] [ebp-4Ch] + unsigned int Size; // [esp+14h] [ebp-48h] + size_t v10; // [esp+14h] [ebp-48h] + + Src = setlocale(0, 0); + Size = strlen(Src) + 1; + v5 = (char *)operator new[](Size); + v6 = Src; + Srca = v5; + memcpy(v5, v6, Size); + setlocale(0, this[4]); + v10 = strftime(Buffer, SizeInBytes, Format, Tm); + setlocale(0, Srca); + operator delete[](Srca); + if ( !v10 ) + *Buffer = 0; +} + +//----- (0044CDD0) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_days(_DWORD *this, _DWORD *a2) +{ + _DWORD *v2; // edx + _DWORD *result; // eax + + v2 = (_DWORD *)this[2]; + result = a2; + *a2 = v2[11]; + a2[1] = v2[12]; + a2[2] = v2[13]; + a2[3] = v2[14]; + a2[4] = v2[15]; + a2[5] = v2[16]; + a2[6] = v2[17]; + return result; +} + +//----- (0044CE10) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_am_pm(_DWORD *this, _DWORD *a2) +{ + int v2; // edx + _DWORD *result; // eax + + v2 = this[2]; + result = a2; + *a2 = *(_DWORD *)(v2 + 32); + a2[1] = *(_DWORD *)(v2 + 36); + return result; +} + +//----- (0044CE30) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_months(_DWORD *this, _DWORD *a2) +{ + _DWORD *v2; // edx + _DWORD *result; // eax + + v2 = (_DWORD *)this[2]; + result = a2; + *a2 = v2[25]; + a2[1] = v2[26]; + a2[2] = v2[27]; + a2[3] = v2[28]; + a2[4] = v2[29]; + a2[5] = v2[30]; + a2[6] = v2[31]; + a2[7] = v2[32]; + a2[8] = v2[33]; + a2[9] = v2[34]; + a2[10] = v2[35]; + a2[11] = v2[36]; + return result; +} + +//----- (0044CEA0) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_date_formats(_DWORD *this, _DWORD *a2) +{ + int v2; // edx + _DWORD *result; // eax + + v2 = this[2]; + result = a2; + *a2 = *(_DWORD *)(v2 + 8); + a2[1] = *(_DWORD *)(v2 + 12); + return result; +} + +//----- (0044CEC0) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_time_formats(_DWORD *this, _DWORD *a2) +{ + int v2; // edx + _DWORD *result; // eax + + v2 = this[2]; + result = a2; + *a2 = *(_DWORD *)(v2 + 16); + a2[1] = *(_DWORD *)(v2 + 20); + return result; +} + +//----- (0044CEE0) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_days_abbreviated(_DWORD *this, _DWORD *a2) +{ + _DWORD *v2; // edx + _DWORD *result; // eax + + v2 = (_DWORD *)this[2]; + result = a2; + *a2 = v2[18]; + a2[1] = v2[19]; + a2[2] = v2[20]; + a2[3] = v2[21]; + a2[4] = v2[22]; + a2[5] = v2[23]; + a2[6] = v2[24]; + return result; +} + +//----- (0044CF20) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_date_time_formats(_DWORD *this, _DWORD *a2) +{ + int v2; // edx + _DWORD *result; // eax + + v2 = this[2]; + result = a2; + *a2 = *(_DWORD *)(v2 + 24); + a2[1] = *(_DWORD *)(v2 + 28); + return result; +} + +//----- (0044CF40) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_months_abbreviated(_DWORD *this, _DWORD *a2) +{ + _DWORD *v2; // edx + _DWORD *result; // eax + + v2 = (_DWORD *)this[2]; + result = a2; + *a2 = v2[37]; + a2[1] = v2[38]; + a2[2] = v2[39]; + a2[3] = v2[40]; + a2[4] = v2[41]; + a2[5] = v2[42]; + a2[6] = v2[43]; + a2[7] = v2[44]; + a2[8] = v2[45]; + a2[9] = v2[46]; + a2[10] = v2[47]; + a2[11] = v2[48]; + return result; +} + +//----- (0044CFC0) -------------------------------------------------------- +void __thiscall std::__timepunct::_M_put( + const char **this, + wchar_t *Buffer, + size_t SizeInWords, + wchar_t *Format, + struct tm *Tm) +{ + char *v5; // eax + char *v6; // edx + char *Src; // [esp+10h] [ebp-4Ch] + char *Srca; // [esp+10h] [ebp-4Ch] + unsigned int Size; // [esp+14h] [ebp-48h] + size_t v10; // [esp+14h] [ebp-48h] + + Src = setlocale(0, 0); + Size = strlen(Src) + 1; + v5 = (char *)operator new[](Size); + v6 = Src; + Srca = v5; + memcpy(v5, v6, Size); + setlocale(0, this[4]); + v10 = wcsftime(Buffer, SizeInWords, Format, Tm); + setlocale(0, Srca); + operator delete[](Srca); + if ( !v10 ) + *Buffer = 0; +} + +//----- (0044D0F0) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_days(_DWORD *this, _DWORD *a2) +{ + _DWORD *v2; // edx + _DWORD *result; // eax + + v2 = (_DWORD *)this[2]; + result = a2; + *a2 = v2[11]; + a2[1] = v2[12]; + a2[2] = v2[13]; + a2[3] = v2[14]; + a2[4] = v2[15]; + a2[5] = v2[16]; + a2[6] = v2[17]; + return result; +} + +//----- (0044D130) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_am_pm(_DWORD *this, _DWORD *a2) +{ + int v2; // edx + _DWORD *result; // eax + + v2 = this[2]; + result = a2; + *a2 = *(_DWORD *)(v2 + 32); + a2[1] = *(_DWORD *)(v2 + 36); + return result; +} + +//----- (0044D150) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_months(_DWORD *this, _DWORD *a2) +{ + _DWORD *v2; // edx + _DWORD *result; // eax + + v2 = (_DWORD *)this[2]; + result = a2; + *a2 = v2[25]; + a2[1] = v2[26]; + a2[2] = v2[27]; + a2[3] = v2[28]; + a2[4] = v2[29]; + a2[5] = v2[30]; + a2[6] = v2[31]; + a2[7] = v2[32]; + a2[8] = v2[33]; + a2[9] = v2[34]; + a2[10] = v2[35]; + a2[11] = v2[36]; + return result; +} + +//----- (0044D1B0) -------------------------------------------------------- +struct _Unwind_Exception *__stdcall std::__use_cache>::operator()(int *a1) +{ + unsigned int v2; // [esp+8h] [ebp-60h] + std::locale::_Impl *v3; // [esp+1Ch] [ebp-4Ch] + std::locale::facet *v4; // [esp+20h] [ebp-48h] + int v5; // [esp+24h] [ebp-44h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-40h] + + v4 = (std::locale::facet *)std::locale::id::_M_id(&std::numpunct::id); + v5 = *(_DWORD *)(*a1 + 12) + 4 * (_DWORD)v4; + lpuexcpt = *(struct _Unwind_Exception **)v5; + if ( !*(_DWORD *)v5 ) + { + v3 = (std::locale::_Impl *)operator new(0x68u); + *((_DWORD *)v3 + 1) = 0; + *(_DWORD *)v3 = &off_51AF60; + *((_DWORD *)v3 + 2) = 0; + *((_DWORD *)v3 + 3) = 0; + *((_BYTE *)v3 + 16) = 0; + *((_DWORD *)v3 + 5) = 0; + *((_DWORD *)v3 + 6) = 0; + *((_DWORD *)v3 + 7) = 0; + *((_DWORD *)v3 + 8) = 0; + *((_WORD *)v3 + 18) = 0; + *((_BYTE *)v3 + 100) = 0; + std::__numpunct_cache::_M_cache((int)v3, (int)a1); + std::locale::_Impl::_M_install_cache(*a1, v3, v4, v2); + return *(struct _Unwind_Exception **)v5; + } + return lpuexcpt; +} +// 44D2A3: variable 'v2' is possibly undefined +// 50C688: using guessed type signed __int32 std::numpunct::id; +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (0044D320) -------------------------------------------------------- +struct _Unwind_Exception *__stdcall std::__use_cache>::operator()(int *a1) +{ + _DWORD *v2; // eax + unsigned int v3; // [esp+8h] [ebp-60h] + std::locale::_Impl *v4; // [esp+1Ch] [ebp-4Ch] + std::locale::facet *v5; // [esp+20h] [ebp-48h] + int v6; // [esp+24h] [ebp-44h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-40h] + + v5 = (std::locale::facet *)std::locale::id::_M_id(&std::numpunct::id); + v6 = *(_DWORD *)(*a1 + 12) + 4 * (_DWORD)v5; + lpuexcpt = *(struct _Unwind_Exception **)v6; + if ( !*(_DWORD *)v6 ) + { + v2 = operator new(0xA8u); + v2[1] = 0; + *v2 = &off_51AF70; + v2[2] = 0; + v2[3] = 0; + *((_BYTE *)v2 + 16) = 0; + v2[5] = 0; + v2[6] = 0; + v2[7] = 0; + v2[8] = 0; + v2[9] = 0; + *((_BYTE *)v2 + 164) = 0; + v4 = (std::locale::_Impl *)v2; + std::__numpunct_cache::_M_cache((int)v2, (int)a1); + std::locale::_Impl::_M_install_cache(*a1, v4, v5, v3); + return *(struct _Unwind_Exception **)v6; + } + return lpuexcpt; +} +// 44D417: variable 'v3' is possibly undefined +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (0044D490) -------------------------------------------------------- +int __fastcall std::runtime_error::what(int a1) +{ + return *(_DWORD *)(a1 + 4); +} + +//----- (0044D4A0) -------------------------------------------------------- +bool __fastcall std::__basic_file::is_open(_DWORD *a1) +{ + return *a1 != 0; +} + +//----- (0044D4B0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_compare( + int *this, + int a2, + int a3, + int a4, + int a5) +{ + int v6; // [esp+0h] [ebp-2Ch] + + LOBYTE(v6) = 0; + return std::__facet_shims::__collate_compare(v6, this[3], a2, a3, a4, a5); +} +// 44D4DE: variable 'v6' is possibly undefined + +//----- (0044D4F0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_compare( + int *this, + int a2, + int a3, + int a4, + int a5) +{ + int v6; // [esp+0h] [ebp-2Ch] + + LOBYTE(v6) = 0; + return std::__facet_shims::__collate_compare(v6, this[3], a2, a3, a4, a5); +} +// 44D51E: variable 'v6' is possibly undefined + +//----- (0044D530) -------------------------------------------------------- +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_transform( + _DWORD *this, + int a2, + int a3, + int a4) +{ + int v5; // [esp+0h] [ebp-88h] + void *v7; // [esp+63h] [ebp-25h] BYREF + unsigned __int8 *v8[6]; // [esp+64h] [ebp-24h] BYREF + void (__cdecl *v9)(unsigned __int8 **); // [esp+7Ch] [ebp-Ch] + + v9 = 0; + LOBYTE(v5) = 0; + std::__facet_shims::__collate_transform(v5, *(_DWORD *)(a2 + 12), v8, a3, a4); + if ( !v9 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + std::string::string(this, v8[0], (size_t)v8[1], (int)&v7); + if ( v9 ) + v9(v8); + return this; +} +// 44D593: variable 'v5' is possibly undefined + +//----- (0044D630) -------------------------------------------------------- +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_transform( + _DWORD *this, + int a2, + std::string *a3, + int a4) +{ + _BYTE *v4; // eax + int v6; // [esp+0h] [ebp-88h] + void *v8[6]; // [esp+64h] [ebp-24h] BYREF + void (__cdecl *v9)(void **); // [esp+7Ch] [ebp-Ch] + + v9 = 0; + LOBYTE(v6) = 0; + std::__facet_shims::__collate_transform(v6, *(_DWORD *)(a2 + 12), v8, a3, a4); + if ( !v9 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + v4 = v8[0]; + *this = this + 2; + std::string::_M_construct(this, v4, (int)&v4[(unsigned int)v8[1]]); + if ( v9 ) + v9(v8); + return this; +} +// 44D693: variable 'v6' is possibly undefined + +//----- (0044D730) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_compare( + int *this, + int a2, + int a3, + int a4, + int a5) +{ + int v6; // [esp+0h] [ebp-2Ch] + + LOBYTE(v6) = 0; + return std::__facet_shims::__collate_compare(v6, this[3], a2, a3, a4, a5); +} +// 44D75E: variable 'v6' is possibly undefined + +//----- (0044D770) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_compare( + int *this, + int a2, + int a3, + int a4, + int a5) +{ + int v6; // [esp+0h] [ebp-2Ch] + + LOBYTE(v6) = 0; + return std::__facet_shims::__collate_compare(v6, this[3], a2, a3, a4, a5); +} +// 44D79E: variable 'v6' is possibly undefined + +//----- (0044D7B0) -------------------------------------------------------- +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_transform( + _DWORD *this, + int a2, + int a3, + int a4) +{ + int v5; // [esp+0h] [ebp-88h] + void *v7; // [esp+63h] [ebp-25h] BYREF + _WORD *v8[6]; // [esp+64h] [ebp-24h] BYREF + void (__cdecl *v9)(_WORD **); // [esp+7Ch] [ebp-Ch] + + v9 = 0; + LOBYTE(v5) = 0; + std::__facet_shims::__collate_transform(v5, *(_DWORD *)(a2 + 12), v8, a3, a4); + if ( !v9 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + std::wstring::basic_string(this, v8[0], (int)v8[1], (int)&v7); + if ( v9 ) + v9(v8); + return this; +} +// 44D813: variable 'v5' is possibly undefined + +//----- (0044D8B0) -------------------------------------------------------- +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::collate_shim::do_transform( + _DWORD *this, + int a2, + int a3, + int a4) +{ + _WORD *v4; // eax + int v6; // [esp+0h] [ebp-88h] + void *v8[6]; // [esp+64h] [ebp-24h] BYREF + void (__cdecl *v9)(void **); // [esp+7Ch] [ebp-Ch] + + v9 = 0; + LOBYTE(v6) = 0; + std::__facet_shims::__collate_transform(v6, *(_DWORD *)(a2 + 12), v8, a3, a4); + if ( !v9 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + v4 = v8[0]; + *this = this + 2; + std::wstring::_M_construct(this, v4, (int)&v4[(int)v8[1]]); + if ( v9 ) + v9(v8); + return this; +} +// 44D913: variable 'v6' is possibly undefined + +//----- (0044D9B0) -------------------------------------------------------- +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_get( + _DWORD *this, + int a2, + std::string *a3, + int a4, + int a5, + int a6) +{ + _BYTE *v6; // eax + int v8; // [esp+0h] [ebp-88h] + void *v10[6]; // [esp+64h] [ebp-24h] BYREF + void (__cdecl *v11)(void **); // [esp+7Ch] [ebp-Ch] + + v11 = 0; + LOBYTE(v8) = 0; + std::__facet_shims::__messages_get( + v8, + *(_DWORD *)(a2 + 16), + v10, + a3, + a4, + a5, + *(unsigned __int8 **)a6, + *(_DWORD *)(a6 + 4)); + if ( !v11 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + v6 = v10[0]; + *this = this + 2; + std::string::_M_construct(this, v6, (int)&v6[(unsigned int)v10[1]]); + if ( v11 ) + v11(v10); + return this; +} +// 44DA2D: variable 'v8' is possibly undefined + +//----- (0044DAD0) -------------------------------------------------------- +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_get( + _DWORD *this, + int a2, + int a3, + int a4, + int a5, + _BYTE **a6) +{ + int v7; // [esp+0h] [ebp-88h] + void *v9; // [esp+63h] [ebp-25h] BYREF + unsigned __int8 *v10[6]; // [esp+64h] [ebp-24h] BYREF + void (__cdecl *v11)(unsigned __int8 **); // [esp+7Ch] [ebp-Ch] + + v11 = 0; + LOBYTE(v7) = 0; + std::__facet_shims::__messages_get(v7, *(_DWORD *)(a2 + 16), v10, a3, a4, a5, *a6, *((_DWORD *)*a6 - 3)); + if ( !v11 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + std::string::string(this, v10[0], (size_t)v10[1], (int)&v9); + if ( v11 ) + v11(v10); + return this; +} +// 44DB4A: variable 'v7' is possibly undefined + +//----- (0044DBE0) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_open( + int *this, + int a2, + int a3) +{ + int v4; // [esp+0h] [ebp-2Ch] + + LOBYTE(v4) = 0; + return std::__facet_shims::__messages_open(v4, this[4], *(unsigned __int8 **)a2, *(_DWORD *)(a2 + 4), a3); +} +// 44DC07: variable 'v4' is possibly undefined + +//----- (0044DC20) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_open( + int *this, + _BYTE **a2, + int a3) +{ + int v4; // [esp+0h] [ebp-2Ch] + + LOBYTE(v4) = 0; + return std::__facet_shims::__messages_open(v4, this[4], *a2, *((_DWORD *)*a2 - 3), a3); +} +// 44DC47: variable 'v4' is possibly undefined + +//----- (0044DC60) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_close(int *this, int a2) +{ + int v3; // [esp+0h] [ebp-1Ch] + + LOBYTE(v3) = 0; + return std::__facet_shims::__messages_close(v3, this[4], a2); +} +// 44DC76: variable 'v3' is possibly undefined + +//----- (0044DC90) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_close(int *this, int a2) +{ + int v3; // [esp+0h] [ebp-1Ch] + + LOBYTE(v3) = 0; + return std::__facet_shims::__messages_close(v3, this[4], a2); +} +// 44DCA6: variable 'v3' is possibly undefined + +//----- (0044DCC0) -------------------------------------------------------- +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_get( + _DWORD *this, + int a2, + int a3, + int a4, + int a5, + int a6) +{ + _WORD *v6; // eax + int v8; // [esp+0h] [ebp-88h] + void *v10[6]; // [esp+64h] [ebp-24h] BYREF + void (__cdecl *v11)(void **); // [esp+7Ch] [ebp-Ch] + + v11 = 0; + LOBYTE(v8) = 0; + std::__facet_shims::__messages_get( + v8, + *(_DWORD *)(a2 + 16), + v10, + a3, + a4, + a5, + *(_WORD **)a6, + *(_DWORD *)(a6 + 4)); + if ( !v11 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + v6 = v10[0]; + *this = this + 2; + std::wstring::_M_construct(this, v6, (int)&v6[(int)v10[1]]); + if ( v11 ) + v11(v10); + return this; +} +// 44DD3D: variable 'v8' is possibly undefined + +//----- (0044DDE0) -------------------------------------------------------- +_DWORD *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_get( + _DWORD *this, + int a2, + int a3, + int a4, + int a5, + _WORD **a6) +{ + int v7; // [esp+0h] [ebp-88h] + void *v9; // [esp+63h] [ebp-25h] BYREF + _WORD *v10[6]; // [esp+64h] [ebp-24h] BYREF + void (__cdecl *v11)(_WORD **); // [esp+7Ch] [ebp-Ch] + + v11 = 0; + LOBYTE(v7) = 0; + std::__facet_shims::__messages_get(v7, *(_DWORD *)(a2 + 16), v10, a3, a4, a5, *a6, *((_DWORD *)*a6 - 3)); + if ( !v11 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + std::wstring::basic_string(this, v10[0], (int)v10[1], (int)&v9); + if ( v11 ) + v11(v10); + return this; +} +// 44DE5A: variable 'v7' is possibly undefined + +//----- (0044DEF0) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_open( + int *this, + int a2, + int a3) +{ + int v4; // [esp+0h] [ebp-2Ch] + + LOBYTE(v4) = 0; + return std::__facet_shims::__messages_open(v4, this[4], *(unsigned __int8 **)a2, *(_DWORD *)(a2 + 4), a3); +} +// 44DF17: variable 'v4' is possibly undefined + +//----- (0044DF30) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_open( + int *this, + _BYTE **a2, + int a3) +{ + int v4; // [esp+0h] [ebp-2Ch] + + LOBYTE(v4) = 0; + return std::__facet_shims::__messages_open(v4, this[4], *a2, *((_DWORD *)*a2 - 3), a3); +} +// 44DF57: variable 'v4' is possibly undefined + +//----- (0044DF70) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_close(int *this, int a2) +{ + int v3; // [esp+0h] [ebp-1Ch] + + LOBYTE(v3) = 0; + return std::__facet_shims::__messages_close(v3, this[4], a2); +} +// 44DF86: variable 'v3' is possibly undefined + +//----- (0044DFA0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::messages_shim::do_close(int *this, int a2) +{ + int v3; // [esp+0h] [ebp-1Ch] + + LOBYTE(v3) = 0; + return std::__facet_shims::__messages_close(v3, this[4], a2); +} +// 44DFB6: variable 'v3' is possibly undefined + +//----- (0044DFD0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_date( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 100); +} +// 44E01E: variable 'v9' is possibly undefined + +//----- (0044E030) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_date( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 100); +} +// 44E07E: variable 'v9' is possibly undefined + +//----- (0044E090) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_time( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 116); +} +// 44E0DE: variable 'v9' is possibly undefined + +//----- (0044E0F0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_time( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 116); +} +// 44E13E: variable 'v9' is possibly undefined + +//----- (0044E150) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_year( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 121); +} +// 44E19E: variable 'v9' is possibly undefined + +//----- (0044E1B0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_year( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 121); +} +// 44E1FE: variable 'v9' is possibly undefined + +//----- (0044E210) -------------------------------------------------------- +int __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::do_date_order(int a1) +{ + int v2; // [esp+0h] [ebp-1Ch] + + LOBYTE(v2) = 0; + return std::__facet_shims::__time_get_dateorder(v2, *(_DWORD *)(a1 + 8)); +} +// 44E21E: variable 'v2' is possibly undefined + +//----- (0044E230) -------------------------------------------------------- +int __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::do_date_order(int a1) +{ + int v2; // [esp+0h] [ebp-1Ch] + + LOBYTE(v2) = 0; + return std::__facet_shims::__time_get_dateorder(v2, *(_DWORD *)(a1 + 8)); +} +// 44E23E: variable 'v2' is possibly undefined + +//----- (0044E250) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_weekday( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 119); +} +// 44E29E: variable 'v9' is possibly undefined + +//----- (0044E2B0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_weekday( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 119); +} +// 44E2FE: variable 'v9' is possibly undefined + +//----- (0044E310) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_monthname( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 109); +} +// 44E35E: variable 'v9' is possibly undefined + +//----- (0044E370) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_monthname( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 109); +} +// 44E3BE: variable 'v9' is possibly undefined + +//----- (0044E3D0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_date( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 100); +} +// 44E41E: variable 'v9' is possibly undefined + +//----- (0044E430) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_date( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 100); +} +// 44E47E: variable 'v9' is possibly undefined + +//----- (0044E490) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_time( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 116); +} +// 44E4DE: variable 'v9' is possibly undefined + +//----- (0044E4F0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_time( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 116); +} +// 44E53E: variable 'v9' is possibly undefined + +//----- (0044E550) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_year( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 121); +} +// 44E59E: variable 'v9' is possibly undefined + +//----- (0044E5B0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_year( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 121); +} +// 44E5FE: variable 'v9' is possibly undefined + +//----- (0044E610) -------------------------------------------------------- +int __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::do_date_order(int a1) +{ + int v2; // [esp+0h] [ebp-1Ch] + + LOBYTE(v2) = 0; + return std::__facet_shims::__time_get_dateorder(v2, *(_DWORD *)(a1 + 8)); +} +// 44E61E: variable 'v2' is possibly undefined + +//----- (0044E630) -------------------------------------------------------- +int __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::do_date_order(int a1) +{ + int v2; // [esp+0h] [ebp-1Ch] + + LOBYTE(v2) = 0; + return std::__facet_shims::__time_get_dateorder(v2, *(_DWORD *)(a1 + 8)); +} +// 44E63E: variable 'v2' is possibly undefined + +//----- (0044E650) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_weekday( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 119); +} +// 44E69E: variable 'v9' is possibly undefined + +//----- (0044E6B0) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_weekday( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 119); +} +// 44E6FE: variable 'v9' is possibly undefined + +//----- (0044E710) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_monthname( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 109); +} +// 44E75E: variable 'v9' is possibly undefined + +//----- (0044E770) -------------------------------------------------------- +int __thiscall std::__facet_shims::`anonymous namespace'::time_get_shim::do_get_monthname( + int *this, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8) +{ + int v9; // [esp+0h] [ebp-3Ch] + + LOBYTE(v9) = 0; + return std::__facet_shims::__time_get(v9, this[2], a2, a3, a4, a5, a6, a7, a8, 109); +} +// 44E7BE: variable 'v9' is possibly undefined + +//----- (0044E7D0) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get( + int *this, + __int64 a2, + int a3, + int a4, + unsigned __int8 a5, + int a6, + int *a7, + void **a8) +{ + void (__cdecl *v8)(void **); // eax + void *v10; // edx + int *v11; // eax + void *v12; // ebx + void *v13; // esi + int v14; // [esp+0h] [ebp-C8h] + int v15; // [esp+78h] [ebp-50h] BYREF + void *Block; // [esp+7Ch] [ebp-4Ch] BYREF + size_t Size; // [esp+80h] [ebp-48h] + int v18[4]; // [esp+84h] [ebp-44h] BYREF + void *v19[6]; // [esp+94h] [ebp-34h] BYREF + void (__cdecl *v20)(void **); // [esp+ACh] [ebp-1Ch] + __int64 v21; // [esp+D0h] [ebp+8h] + + v20 = 0; + v15 = 0; + LOBYTE(v14) = 0; + v21 = std::__facet_shims::__money_get(v14, this[2], a2, a3, a4, a5, a6, &v15, 0, v19); + v8 = v20; + if ( v15 ) + { + *a7 = v15; + goto LABEL_3; + } + if ( !v20 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + Block = v18; + std::string::_M_construct(&Block, (_BYTE *)v19[0], (int)v19[0] + (unsigned int)v19[1]); + v10 = (void *)Size; + v11 = (int *)*a8; + if ( Block == v18 ) + { + if ( Size ) + { + if ( Size == 1 ) + *(_BYTE *)v11 = v18[0]; + else + memcpy(v11, v18, Size); + v10 = (void *)Size; + v11 = (int *)*a8; + } + a8[1] = v10; + *((_BYTE *)v10 + (_DWORD)v11) = 0; + v11 = (int *)Block; + goto LABEL_11; + } + v12 = (void *)v18[0]; + if ( v11 == (int *)(a8 + 2) ) + { + *a8 = Block; + a8[1] = v10; + a8[2] = v12; + goto LABEL_15; + } + v13 = a8[2]; + *a8 = Block; + a8[1] = v10; + a8[2] = v12; + if ( !v11 ) + { +LABEL_15: + Block = v18; + v11 = v18; + goto LABEL_11; + } + Block = v11; + v18[0] = (int)v13; +LABEL_11: + Size = 0; + *(_BYTE *)v11 = 0; + if ( Block != v18 ) + operator delete(Block); + v8 = v20; +LABEL_3: + if ( v8 ) + v8(v19); + return v21; +} +// 44E881: variable 'v14' is possibly undefined + +//----- (0044EA30) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get( + _DWORD *this, + __int64 a2, + int a3, + int a4, + unsigned __int8 a5, + int a6, + _DWORD *a7, + int *a8) +{ + void (__cdecl *v8)(void **); // eax + int v10; // ecx + int v11; // eax + int v12; // [esp+0h] [ebp-A8h] + std::string *v13; // [esp+4h] [ebp-A4h] + char v14[5]; // [esp+7Bh] [ebp-2Dh] BYREF + int v15; // [esp+80h] [ebp-28h] BYREF + void *v16[6]; // [esp+84h] [ebp-24h] BYREF + void (__cdecl *v17)(void **); // [esp+9Ch] [ebp-Ch] + __int64 v18; // [esp+B0h] [ebp+8h] + + v17 = 0; + *(_DWORD *)&v14[1] = 0; + LOBYTE(v12) = 0; + v18 = std::__facet_shims::__money_get(v12, (int *)this[2], a2, a3, a4, a5, a6, &v14[1], 0, v16); + v8 = v17; + if ( *(_DWORD *)&v14[1] ) + { + *a7 = *(_DWORD *)&v14[1]; + } + else + { + if ( !v17 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + std::string::string(&v15, (unsigned __int8 *)v16[0], (size_t)v16[1], (int)v14); + std::string::swap(a8, (std::string *)&v15, v13); + v10 = v15; + if ( _CRT_MT ) + { + v11 = _InterlockedExchangeAdd((volatile signed __int32 *)(v15 - 4), 0xFFFFFFFF); + } + else + { + v11 = *(_DWORD *)(v15 - 4); + *(_DWORD *)(v15 - 4) = v11 - 1; + } + if ( v11 <= 0 ) + std::string::_Rep::_M_destroy((void *)(v10 - 12), (int)v14); + v8 = v17; + } + if ( v8 ) + v8(v16); + return v18; +} +// 44EACC: variable 'v12' is possibly undefined +// 44EB43: variable 'v13' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0044EBD0) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get( + _DWORD *this, + __int64 a2, + int a3, + int a4, + unsigned __int8 a5, + int a6, + _DWORD *a7, + long double *a8) +{ + __int64 result; // rax + int v9; // [esp+0h] [ebp-5Ch] + int *v10; // [esp+4h] [ebp-58h] + int v11; // [esp+3Ch] [ebp-20h] BYREF + LONG_DOUBLE_12 v12[2]; // [esp+40h] [ebp-1Ch] BYREF + + LOBYTE(v9) = 0; + v10 = (int *)this[2]; + v11 = 0; + result = std::__facet_shims::__money_get(v9, v10, a2, a3, a4, a5, a6, &v11, (int)v12, 0); + if ( v11 ) + *a7 = v11; + else + *a8 = *(long double *)v12; + return result; +} +// 44EC31: variable 'v9' is possibly undefined +// 44EBD0: using guessed type long double var_1C[2]; + +//----- (0044EC60) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get( + _DWORD *this, + __int64 a2, + int a3, + int a4, + unsigned __int8 a5, + int a6, + int *a7, + long double *a8) +{ + __int64 result; // rax + int v9; // [esp+0h] [ebp-5Ch] + int v10; // [esp+4h] [ebp-58h] + int v11; // [esp+3Ch] [ebp-20h] BYREF + LONG_DOUBLE_12 v12[2]; // [esp+40h] [ebp-1Ch] BYREF + + LOBYTE(v9) = 0; + v10 = this[2]; + v11 = 0; + result = std::__facet_shims::__money_get(v9, v10, a2, a3, a4, a5, a6, &v11, (int)v12, 0); + if ( v11 ) + *a7 = v11; + else + *a8 = *(long double *)v12; + return result; +} +// 44ECC1: variable 'v9' is possibly undefined +// 44EC60: using guessed type long double var_1C[2]; + +//----- (0044ECF0) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get( + _DWORD *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6, + int a7, + _DWORD *a8, + int a9) +{ + int v9; // eax + void (__cdecl *v10)(void **); // eax + int *v12; // ebx + int v13; // edx + int *v14; // eax + int v15; // ebx + int v16; // esi + int v17; // ecx + int v18; // [esp+0h] [ebp-D8h] + struct _Unwind_Exception *lpuexcpt; // [esp+40h] [ebp-98h] + int v20; // [esp+88h] [ebp-50h] BYREF + int *v21; // [esp+8Ch] [ebp-4Ch] BYREF + int v22; // [esp+90h] [ebp-48h] + int Src[4]; // [esp+94h] [ebp-44h] BYREF + void *v24[6]; // [esp+A4h] [ebp-34h] BYREF + void (__cdecl *v25)(void **); // [esp+BCh] [ebp-1Ch] + + v9 = this[2]; + LOBYTE(v18) = 0; + v25 = 0; + v20 = 0; + lpuexcpt = std::__facet_shims::__money_get(v18, v9, a2, a3, a4, a5, a6, a7, &v20, 0, v24); + v10 = v25; + if ( v20 ) + { + *a8 = v20; + goto LABEL_3; + } + if ( !v25 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + v21 = Src; + std::wstring::_M_construct(&v21, (_WORD *)v24[0], (int)v24[0] + 2 * (int)v24[1]); + v12 = Src; + v13 = v22; + v14 = *(int **)a9; + if ( v21 == Src ) + { + v17 = 2 * v22; + if ( v22 ) + { + if ( v22 == 1 ) + { + *(_WORD *)v14 = Src[0]; + v17 = 2; + } + else + { + memcpy(v14, Src, 2 * v22); + v13 = v22; + v12 = v21; + v14 = *(int **)a9; + v17 = 2 * v22; + } + } + *(_DWORD *)(a9 + 4) = v13; + *(_WORD *)((char *)v14 + v17) = 0; + v14 = v12; + goto LABEL_11; + } + v15 = Src[0]; + if ( v14 == (int *)(a9 + 8) ) + { + *(_DWORD *)a9 = v21; + *(_DWORD *)(a9 + 4) = v13; + *(_DWORD *)(a9 + 8) = v15; + } + else + { + v16 = *(_DWORD *)(a9 + 8); + *(_DWORD *)a9 = v21; + *(_DWORD *)(a9 + 4) = v13; + *(_DWORD *)(a9 + 8) = v15; + if ( v14 ) + { + v21 = v14; + Src[0] = v16; +LABEL_11: + v22 = 0; + *(_WORD *)v14 = 0; + if ( v14 != Src ) + operator delete(v14); + } + } + v10 = v25; +LABEL_3: + if ( v10 ) + v10(v24); + return lpuexcpt; +} +// 44EDB9: variable 'v18' is possibly undefined + +//----- (0044EF70) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get( + _DWORD *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6, + int a7, + _DWORD *a8, + int *a9) +{ + int *v9; // eax + void (__cdecl *v10)(void **); // eax + int v12; // ecx + int v13; // eax + int v14; // [esp+0h] [ebp-B8h] + struct _Unwind_Exception *lpuexcpt; // [esp+40h] [ebp-78h] + char v16[5]; // [esp+8Bh] [ebp-2Dh] BYREF + int v17; // [esp+90h] [ebp-28h] BYREF + void *v18[6]; // [esp+94h] [ebp-24h] BYREF + void (__cdecl *v19)(void **); // [esp+ACh] [ebp-Ch] + + v9 = (int *)this[2]; + LOBYTE(v14) = 0; + v19 = 0; + *(_DWORD *)&v16[1] = 0; + lpuexcpt = std::__facet_shims::__money_get(v14, v9, a2, a3, a4, a5, a6, a7, &v16[1], 0, v18); + v10 = v19; + if ( *(_DWORD *)&v16[1] ) + { + *a8 = *(_DWORD *)&v16[1]; + } + else + { + if ( !v19 ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + std::wstring::basic_string(&v17, (_WORD *)v18[0], (int)v18[1], (int)v16); + std::wstring::swap(a9, &v17); + v12 = v17; + if ( _CRT_MT ) + { + v13 = _InterlockedExchangeAdd((volatile signed __int32 *)(v17 - 4), 0xFFFFFFFF); + } + else + { + v13 = *(_DWORD *)(v17 - 4); + *(_DWORD *)(v17 - 4) = v13 - 1; + } + if ( v13 <= 0 ) + std::wstring::_Rep::_M_destroy((void *)(v12 - 12), (int)v16); + v10 = v19; + } + if ( v10 ) + v10(v18); + return lpuexcpt; +} +// 44F01F: variable 'v14' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0044F140) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get( + _DWORD *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6, + int a7, + _DWORD *a8, + long double *a9) +{ + struct _Unwind_Exception *v9; // ecx + int v11; // [esp+0h] [ebp-6Ch] + int *v12; // [esp+4h] [ebp-68h] + int v13; // [esp+4Ch] [ebp-20h] BYREF + LONG_DOUBLE_12 v14[2]; // [esp+50h] [ebp-1Ch] BYREF + + LOBYTE(v11) = 0; + v12 = (int *)this[2]; + v13 = 0; + v9 = std::__facet_shims::__money_get(v11, v12, a2, a3, a4, a5, a6, a7, &v13, (int)v14, 0); + if ( v13 ) + *a8 = v13; + else + *a9 = *(long double *)v14; + return v9; +} +// 44F1AD: variable 'v11' is possibly undefined +// 44F140: using guessed type long double var_1C[2]; + +//----- (0044F200) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall std::__facet_shims::`anonymous namespace'::money_get_shim::do_get( + _DWORD *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6, + int a7, + _DWORD *a8, + long double *a9) +{ + struct _Unwind_Exception *v9; // ecx + int v11; // [esp+0h] [ebp-6Ch] + int v12; // [esp+4h] [ebp-68h] + int v13; // [esp+4Ch] [ebp-20h] BYREF + LONG_DOUBLE_12 v14[2]; // [esp+50h] [ebp-1Ch] BYREF + + LOBYTE(v11) = 0; + v12 = this[2]; + v13 = 0; + v9 = std::__facet_shims::__money_get(v11, v12, a2, a3, a4, a5, a6, a7, &v13, (int)v14, 0); + if ( v13 ) + *a8 = v13; + else + *a9 = *(long double *)v14; + return v9; +} +// 44F26D: variable 'v11' is possibly undefined +// 44F200: using guessed type long double var_1C[2]; + +//----- (0044F2C0) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put( + int *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + char a6, + int a7) +{ + int *v7; // eax + _BYTE *v8; // edx + size_t v9; // ebx + int v11; // [esp+0h] [ebp-A8h] + void *Src; // [esp+30h] [ebp-78h] + int Size; // [esp+40h] [ebp-68h] + __int64 Sizea; // [esp+40h] [ebp-68h] + int v16; // [esp+80h] [ebp-28h] BYREF + int v17[2]; // [esp+84h] [ebp-24h] BYREF + int v18[4]; // [esp+8Ch] [ebp-1Ch] BYREF + void (__cdecl *v19)(void **); // [esp+9Ch] [ebp-Ch] + + v7 = v18; + v19 = 0; + v8 = *(_BYTE **)a7; + v9 = *(_DWORD *)(a7 + 4); + v17[0] = (int)v18; + Src = v8; + Size = v9; + if ( &v8[v9] && !v8 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v16 = v9; + if ( v9 > 0xF ) + { + v7 = (int *)std::string::_M_create((unsigned int *)&v16, 0); + v17[0] = (int)v7; + v18[0] = v16; +LABEL_12: + memcpy(v7, Src, v9); + Size = v16; + v7 = (int *)v17[0]; + goto LABEL_6; + } + if ( v9 == 1 ) + { + LOBYTE(v18[0]) = *v8; + goto LABEL_6; + } + if ( v9 ) + goto LABEL_12; +LABEL_6: + v17[1] = Size; + *((_BYTE *)v7 + Size) = 0; + v19 = std::__facet_shims::`anonymous namespace'::__destroy_string; + LOBYTE(v11) = 0; + Sizea = std::__facet_shims::__money_put(v11, this[2], a2, a3, a4, a5, a6, 0.0, (int)v17); + if ( v19 ) + v19((void **)v17); + return Sizea; +} +// 44F3AB: variable 'v11' is possibly undefined + +//----- (0044F4A0) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put( + int *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + char a6, + std::string *a7) +{ + int v8; // [esp+0h] [ebp-A8h] + const std::string *v9; // [esp+4h] [ebp-A4h] + __int64 lpuexcpt; // [esp+40h] [ebp-68h] + int v12[6]; // [esp+84h] [ebp-24h] BYREF + void (__cdecl *v13)(int *); // [esp+9Ch] [ebp-Ch] + + v13 = 0; + std::string::string(v12, a7, v9); + v12[1] = *(_DWORD *)(*(_DWORD *)a7 - 12); + v13 = std::__facet_shims::`anonymous namespace'::__destroy_string; + LOBYTE(v8) = 0; + lpuexcpt = std::__facet_shims::__money_put(v8, this[2], a2, a3, a4, a5, a6, 0.0, (int)v12); + if ( v13 ) + v13(v12); + return lpuexcpt; +} +// 44F4F5: variable 'v9' is possibly undefined +// 44F54F: variable 'v8' is possibly undefined + +//----- (0044F5C0) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put( + int *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + char a6, + long double a7) +{ + int v8; // [esp+0h] [ebp-3Ch] + + LOBYTE(v8) = 0; + return std::__facet_shims::__money_put(v8, this[2], a2, a3, a4, a5, a6, a7, 0); +} +// 44F608: variable 'v8' is possibly undefined + +//----- (0044F620) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put( + int *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + char a6, + long double a7) +{ + int v8; // [esp+0h] [ebp-3Ch] + + LOBYTE(v8) = 0; + return std::__facet_shims::__money_put(v8, this[2], a2, a3, a4, a5, a6, a7, 0); +} +// 44F668: variable 'v8' is possibly undefined + +//----- (0044F680) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put( + int *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + unsigned __int16 a6, + int a7) +{ + int v8; // [esp+0h] [ebp-A8h] + __int64 lpuexcpt; // [esp+40h] [ebp-68h] + int v11[2]; // [esp+84h] [ebp-24h] BYREF + char v12; // [esp+8Ch] [ebp-1Ch] BYREF + void (__cdecl *v13)(void **); // [esp+9Ch] [ebp-Ch] + + v13 = 0; + v11[0] = (int)&v12; + std::wstring::_M_construct(v11, *(_WORD **)a7, *(_DWORD *)a7 + 2 * *(_DWORD *)(a7 + 4)); + v13 = std::__facet_shims::`anonymous namespace'::__destroy_string; + LOBYTE(v8) = 0; + lpuexcpt = std::__facet_shims::__money_put(v8, this[2], a2, a3, a4, a5, a6, 0.0, (int)v11); + if ( v13 ) + v13((void **)v11); + return lpuexcpt; +} +// 44F739: variable 'v8' is possibly undefined + +//----- (0044F7A0) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put( + int *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + unsigned __int16 a6, + _DWORD *a7) +{ + int v8; // [esp+0h] [ebp-A8h] + __int64 lpuexcpt; // [esp+40h] [ebp-68h] + int v11[6]; // [esp+84h] [ebp-24h] BYREF + void (__cdecl *v12)(int *); // [esp+9Ch] [ebp-Ch] + + v12 = 0; + std::wstring::basic_string(v11, a7); + v11[1] = *(_DWORD *)(*a7 - 12); + v12 = std::__facet_shims::`anonymous namespace'::__destroy_string; + LOBYTE(v8) = 0; + lpuexcpt = std::__facet_shims::__money_put(v8, this[2], a2, a3, a4, a5, a6, 0.0, (int)v11); + if ( v12 ) + v12(v11); + return lpuexcpt; +} +// 44F84F: variable 'v8' is possibly undefined + +//----- (0044F8C0) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put( + int *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + __int16 a6, + long double a7) +{ + int v8; // [esp+0h] [ebp-3Ch] + + LOBYTE(v8) = 0; + return std::__facet_shims::__money_put(v8, this[2], a2, a3, a4, a5, a6, a7, 0); +} +// 44F908: variable 'v8' is possibly undefined + +//----- (0044F920) -------------------------------------------------------- +__int64 __thiscall std::__facet_shims::`anonymous namespace'::money_put_shim::do_put( + int *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + __int16 a6, + long double a7) +{ + int v8; // [esp+0h] [ebp-3Ch] + + LOBYTE(v8) = 0; + return std::__facet_shims::__money_put(v8, this[2], a2, a3, a4, a5, a6, a7, 0); +} +// 44F968: variable 'v8' is possibly undefined + +//----- (0044F980) -------------------------------------------------------- +const char *_ZGTtNKSt13bad_exception4whatEv() +{ + return "std::bad_exception"; +} + +//----- (0044F990) -------------------------------------------------------- +bool __fastcall std::filebuf::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 40)); +} + +//----- (0044F9A0) -------------------------------------------------------- +bool __fastcall std::wfilebuf::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 40)); +} + +//----- (0044F9B0) -------------------------------------------------------- +int __fastcall std::fstream::rdbuf(int a1) +{ + return a1 + 12; +} + +//----- (0044F9C0) -------------------------------------------------------- +bool __fastcall std::fstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 52)); +} + +//----- (0044F9D0) -------------------------------------------------------- +int __fastcall std::wfstream::rdbuf(int a1) +{ + return a1 + 12; +} + +//----- (0044F9E0) -------------------------------------------------------- +bool __fastcall std::wfstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 52)); +} + +//----- (0044F9F0) -------------------------------------------------------- +int __fastcall std::wistream::gcount(int a1) +{ + return *(_DWORD *)(a1 + 4); +} + +//----- (0044FA00) -------------------------------------------------------- +int __fastcall std::wistream::sentry::operator bool(unsigned __int8 *a1) +{ + return *a1; +} + +//----- (0044FA10) -------------------------------------------------------- +int __fastcall std::wostream::sentry::operator bool(unsigned __int8 *a1) +{ + return *a1; +} + +//----- (0044FA20) -------------------------------------------------------- +long double std::random_device::_M_getentropy() +{ + return 0.0; +} + +//----- (0044FA30) -------------------------------------------------------- +int __fastcall std::ifstream::rdbuf(int a1) +{ + return a1 + 8; +} + +//----- (0044FA40) -------------------------------------------------------- +bool __fastcall std::ifstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 48)); +} + +//----- (0044FA50) -------------------------------------------------------- +int __fastcall std::wifstream::rdbuf(int a1) +{ + return a1 + 8; +} + +//----- (0044FA60) -------------------------------------------------------- +bool __fastcall std::wifstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 48)); +} + +//----- (0044FA70) -------------------------------------------------------- +int __fastcall std::ofstream::rdbuf(int a1) +{ + return a1 + 4; +} + +//----- (0044FA80) -------------------------------------------------------- +bool __fastcall std::ofstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 44)); +} + +//----- (0044FA90) -------------------------------------------------------- +int __fastcall std::wofstream::rdbuf(int a1) +{ + return a1 + 4; +} + +//----- (0044FAA0) -------------------------------------------------------- +bool __fastcall std::wofstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 44)); +} + +//----- (0044FAB0) -------------------------------------------------------- +int __fastcall std::streambuf::gptr(int a1) +{ + return *(_DWORD *)(a1 + 8); +} + +//----- (0044FAC0) -------------------------------------------------------- +int __fastcall std::streambuf::pptr(int a1) +{ + return *(_DWORD *)(a1 + 20); +} + +//----- (0044FAD0) -------------------------------------------------------- +int __fastcall std::streambuf::eback(int a1) +{ + return *(_DWORD *)(a1 + 4); +} + +//----- (0044FAE0) -------------------------------------------------------- +int __fastcall std::streambuf::egptr(int a1) +{ + return *(_DWORD *)(a1 + 12); +} + +//----- (0044FAF0) -------------------------------------------------------- +int __fastcall std::streambuf::epptr(int a1) +{ + return *(_DWORD *)(a1 + 24); +} + +//----- (0044FB00) -------------------------------------------------------- +int __fastcall std::streambuf::pbase(int a1) +{ + return *(_DWORD *)(a1 + 16); +} + +//----- (0044FB10) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::streambuf::getloc(volatile signed __int32 **this, int a2) +{ + const std::locale *v4; // [esp+4h] [ebp-18h] + + std::locale::locale(this, (volatile signed __int32 **)(a2 + 28), v4); + return this; +} +// 44FB20: variable 'v4' is possibly undefined + +//----- (0044FB40) -------------------------------------------------------- +int __fastcall std::wstreambuf::gptr(int a1) +{ + return *(_DWORD *)(a1 + 8); +} + +//----- (0044FB50) -------------------------------------------------------- +int __fastcall std::wstreambuf::pptr(int a1) +{ + return *(_DWORD *)(a1 + 20); +} + +//----- (0044FB60) -------------------------------------------------------- +int __fastcall std::wstreambuf::eback(int a1) +{ + return *(_DWORD *)(a1 + 4); +} + +//----- (0044FB70) -------------------------------------------------------- +int __fastcall std::wstreambuf::egptr(int a1) +{ + return *(_DWORD *)(a1 + 12); +} + +//----- (0044FB80) -------------------------------------------------------- +int __fastcall std::wstreambuf::epptr(int a1) +{ + return *(_DWORD *)(a1 + 24); +} + +//----- (0044FB90) -------------------------------------------------------- +int __fastcall std::wstreambuf::pbase(int a1) +{ + return *(_DWORD *)(a1 + 16); +} + +//----- (0044FBA0) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::wstreambuf::getloc(volatile signed __int32 **this, int a2) +{ + const std::locale *v4; // [esp+4h] [ebp-18h] + + std::locale::locale(this, (volatile signed __int32 **)(a2 + 28), v4); + return this; +} +// 44FBB0: variable 'v4' is possibly undefined + +//----- (0044FBD0) -------------------------------------------------------- +int __stdcall std::__codecvt_utf8_base::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (0044FBF0) -------------------------------------------------------- +int __fastcall std::__codecvt_utf8_base::do_max_length(int a1) +{ + return (*(_DWORD *)(a1 + 12) & 4) == 0 ? 4 : 7; +} + +//----- (0044FC10) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_base::do_in( + int this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + unsigned __int8 **a5, + int a6, + int a7, + _DWORD *a8) +{ + unsigned int v8; // edi + unsigned __int8 *v9; // edx + unsigned int v11; // eax + int result; // eax + unsigned __int8 *v13; // [esp+8h] [ebp-14h] BYREF + unsigned __int8 *v14; // [esp+Ch] [ebp-10h] + + v8 = *(_DWORD *)(this + 8); + v9 = a3; + v13 = a3; + v14 = a4; + if ( (*(_BYTE *)(this + 12) & 4) != 0 + && (unsigned int)(a4 - a3) > 2 + && *(_WORD *)a3 == std::`anonymous namespace'::utf8_bom + && a3[2] == 0xBF ) + { + v9 = a3 + 3; + v13 = a3 + 3; + } + if ( a4 == v9 ) + { +LABEL_14: + result = 0; + } + else + { + while ( 1 ) + { + if ( a7 == a6 ) + { + v9 = v13; + result = 1; + goto LABEL_9; + } + v11 = std::`anonymous namespace'::read_utf8_code_point(&v13, v8); + v9 = v13; + if ( v11 == -2 ) + { + result = 1; + goto LABEL_9; + } + if ( v8 < v11 ) + break; + a6 += 4; + *(_DWORD *)(a6 - 4) = v11; + if ( v14 == v9 ) + goto LABEL_14; + } + result = 2; + } +LABEL_9: + *a5 = v9; + *a8 = a6; + return result; +} +// 515494: using guessed type __int16 std::`anonymous namespace'::utf8_bom; + +//----- (0044FCE0) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_base::do_out( + int this, + int a2, + unsigned int *a3, + unsigned int *a4, + unsigned int **a5, + _BYTE *a6, + _BYTE *a7, + _DWORD *a8) +{ + unsigned int v8; // edi + _BYTE *v9; // eax + unsigned int *v10; // ebx + int v11; // ecx + _BYTE *v13[5]; // [esp+8h] [ebp-14h] BYREF + + v8 = *(_DWORD *)(this + 8); + v9 = a6; + v10 = a3; + v13[0] = a6; + v13[1] = a7; + if ( (*(_BYTE *)(this + 12) & 2) != 0 ) + { + v11 = 1; + if ( (unsigned int)(a7 - a6) <= 2 ) + goto LABEL_8; + a6[2] = -65; + *(_WORD *)a6 = -17425; + v13[0] = a6 + 3; + } + if ( a3 == a4 ) + { +LABEL_11: + v9 = v13[0]; + v11 = 0; + } + else + { + while ( 1 ) + { + if ( v8 < *v10 ) + { + v9 = v13[0]; + v11 = 2; + goto LABEL_8; + } + if ( !(unsigned __int8)std::`anonymous namespace'::write_utf8_code_point(v13, *v10) ) + break; + if ( a4 == ++v10 ) + goto LABEL_11; + } + v9 = v13[0]; + v11 = 1; + } +LABEL_8: + *a5 = v10; + *a8 = v9; + return v11; +} + +//----- (0044FD90) -------------------------------------------------------- +unsigned __int8 *__thiscall std::__codecvt_utf8_base::do_length( + int this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + int a5) +{ + unsigned int v5; // esi + int v6; // ebx + unsigned int utf8_code; // eax + bool v8; // dl + unsigned __int8 *v10[5]; // [esp+8h] [ebp-14h] BYREF + + v5 = *(_DWORD *)(this + 8); + v10[0] = a3; + v10[1] = a4; + if ( (*(_BYTE *)(this + 12) & 4) != 0 + && (unsigned int)(a4 - a3) > 2 + && *(_WORD *)a3 == std::`anonymous namespace'::utf8_bom + && a3[2] == 0xBF ) + { + v10[0] = a3 + 3; + } + v6 = a5 - 1; + if ( a5 ) + { + do + { + utf8_code = std::`anonymous namespace'::read_utf8_code_point(v10, v5); + v8 = v6-- != 0; + } + while ( v5 >= utf8_code && v8 ); + } + return (unsigned __int8 *)(v10[0] - a3); +} +// 515494: using guessed type __int16 std::`anonymous namespace'::utf8_bom; + +//----- (0044FE20) -------------------------------------------------------- +int __stdcall std::__codecvt_utf8_base::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (0044FE40) -------------------------------------------------------- +int __fastcall std::__codecvt_utf8_base::do_max_length(int a1) +{ + return (*(_DWORD *)(a1 + 12) & 4) == 0 ? 3 : 6; +} + +//----- (0044FE60) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_base::do_in( + _DWORD *this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + unsigned __int8 **a5, + char *a6, + char *a7, + char **a8) +{ + int v8; // eax + unsigned int v9; // ecx + int result; // eax + unsigned __int8 *v11[2]; // [esp+8h] [ebp-10h] BYREF + char *v12[2]; // [esp+10h] [ebp-8h] BYREF + + v11[0] = a3; + v11[1] = a4; + v12[0] = a6; + v12[1] = a7; + v8 = this[3]; + v9 = this[2]; + if ( v9 >= 0xFFFF ) + v9 = 0xFFFF; + result = std::`anonymous namespace'::utf16_in(v11, v12, v9, v8 & 6 | 1, 1); + *a5 = v11[0]; + *a8 = v12[0]; + return result; +} + +//----- (0044FED0) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_base::do_out( + int this, + int a2, + unsigned __int16 *a3, + unsigned __int16 *a4, + unsigned __int16 **a5, + _BYTE *a6, + _BYTE *a7, + _DWORD *a8) +{ + unsigned __int16 *v8; // ebx + _BYTE *v9; // eax + unsigned int v10; // edx + int v11; // eax + int v12; // ecx + unsigned __int16 *v14[2]; // [esp+4h] [ebp-1Ch] BYREF + _BYTE *v15[5]; // [esp+Ch] [ebp-14h] BYREF + + v8 = a3; + v9 = a6; + v14[1] = a4; + v10 = *(_DWORD *)(this + 8); + v14[0] = a3; + v15[0] = a6; + v15[1] = a7; + if ( v10 >= 0xFFFF ) + v10 = 0xFFFF; + if ( (*(_BYTE *)(this + 12) & 2) != 0 ) + { + v12 = 1; + if ( (unsigned int)(a7 - a6) <= 2 ) + goto LABEL_5; + a6[2] = -65; + *(_WORD *)a6 = -17425; + v15[0] = a6 + 3; + } + v11 = std::`anonymous namespace'::utf16_out(v14, v15, v10, 1); + v8 = v14[0]; + v12 = v11; + v9 = v15[0]; +LABEL_5: + *a5 = v8; + *a8 = v9; + return v12; +} + +//----- (0044FF70) -------------------------------------------------------- +unsigned __int8 *__thiscall std::__codecvt_utf8_base::do_length( + int this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + int a5) +{ + unsigned int v5; // esi + int v6; // ebx + unsigned int utf8_code; // eax + bool v8; // dl + unsigned __int8 *v10[5]; // [esp+8h] [ebp-14h] BYREF + + v5 = *(_DWORD *)(this + 8); + v10[0] = a3; + v10[1] = a4; + if ( (*(_BYTE *)(this + 12) & 4) != 0 + && (unsigned int)(a4 - a3) > 2 + && *(_WORD *)a3 == std::`anonymous namespace'::utf8_bom + && a3[2] == 0xBF ) + { + v10[0] = a3 + 3; + } + v6 = a5 - 1; + if ( v5 >= 0xFFFF ) + v5 = 0xFFFF; + if ( a5 ) + { + do + { + utf8_code = std::`anonymous namespace'::read_utf8_code_point(v10, v5); + v8 = v6-- != 0; + } + while ( v5 >= utf8_code && v8 ); + } + return (unsigned __int8 *)(v10[0] - a3); +} +// 515494: using guessed type __int16 std::`anonymous namespace'::utf8_bom; + +//----- (00450010) -------------------------------------------------------- +int __stdcall std::__codecvt_utf8_base::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (00450030) -------------------------------------------------------- +int __fastcall std::__codecvt_utf8_base::do_max_length(int a1) +{ + return (*(_DWORD *)(a1 + 16) & 4) == 0 ? 3 : 6; +} + +//----- (00450050) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_base::do_in( + _DWORD *this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + unsigned __int8 **a5, + char *a6, + char *a7, + char **a8) +{ + unsigned int v8; // ecx + int result; // eax + unsigned __int8 *v10[2]; // [esp+8h] [ebp-10h] BYREF + char *v11[2]; // [esp+10h] [ebp-8h] BYREF + + v8 = this[3]; + v10[0] = a3; + v10[1] = a4; + v11[0] = a6; + v11[1] = a7; + if ( v8 >= 0xFFFF ) + v8 = 0xFFFF; + result = std::`anonymous namespace'::utf16_in(v10, v11, v8, 1, 1); + *a5 = v10[0]; + *a8 = v11[0]; + return result; +} + +//----- (004500C0) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_base::do_out( + int this, + int a2, + unsigned __int16 *a3, + unsigned __int16 *a4, + unsigned __int16 **a5, + _BYTE *a6, + _BYTE *a7, + _DWORD *a8) +{ + unsigned __int16 *v8; // ebx + _BYTE *v9; // eax + unsigned int v10; // edx + int v11; // eax + int v12; // ecx + _BYTE *v14[2]; // [esp+4h] [ebp-1Ch] BYREF + unsigned __int16 *v15[5]; // [esp+Ch] [ebp-14h] BYREF + + v8 = a3; + v9 = a6; + v15[1] = a4; + v10 = *(_DWORD *)(this + 12); + v14[0] = a6; + v14[1] = a7; + v15[0] = a3; + if ( v10 >= 0xFFFF ) + v10 = 0xFFFF; + if ( (*(_BYTE *)(this + 16) & 2) != 0 ) + { + v12 = 1; + if ( (unsigned int)(a7 - a6) <= 2 ) + goto LABEL_5; + a6[2] = -65; + *(_WORD *)a6 = -17425; + v14[0] = a6 + 3; + } + v11 = std::`anonymous namespace'::utf16_out(v15, v14, v10, 1); + v8 = v15[0]; + v12 = v11; + v9 = v14[0]; +LABEL_5: + *a5 = v8; + *a8 = v9; + return v12; +} + +//----- (00450160) -------------------------------------------------------- +unsigned __int8 *__thiscall std::__codecvt_utf8_base::do_length( + int this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + int a5) +{ + unsigned int v5; // esi + int v6; // ebx + unsigned int utf8_code; // eax + bool v8; // dl + unsigned __int8 *v10[5]; // [esp+8h] [ebp-14h] BYREF + + v5 = *(_DWORD *)(this + 12); + v10[0] = a3; + v10[1] = a4; + if ( (*(_BYTE *)(this + 16) & 4) != 0 + && (unsigned int)(a4 - a3) > 2 + && *(_WORD *)a3 == std::`anonymous namespace'::utf8_bom + && a3[2] == 0xBF ) + { + v10[0] = a3 + 3; + } + v6 = a5 - 1; + if ( v5 >= 0xFFFF ) + v5 = 0xFFFF; + if ( a5 ) + { + do + { + utf8_code = std::`anonymous namespace'::read_utf8_code_point(v10, v5); + v8 = v6-- != 0; + } + while ( v5 >= utf8_code && v8 ); + } + return (unsigned __int8 *)(v10[0] - a3); +} +// 515494: using guessed type __int16 std::`anonymous namespace'::utf8_bom; + +//----- (00450200) -------------------------------------------------------- +char __userpurge std::__iosfail_type_info::__do_upcast@( + int *a1@, + std::__iosfail_type_info *this, + const __cxxabiv1::__class_type_info *a3, + void **a4) +{ + char result; // al + + result = std::__is_ios_failure_handler(this); + if ( !result ) + return __cxxabiv1::__class_type_info::__do_upcast(a1, this, a3, a4); + *(_DWORD *)a3 += 16; + return result; +} + +//----- (00450250) -------------------------------------------------------- +bool __thiscall std::istreambuf_iterator::equal(_DWORD *this, int a2) +{ + _DWORD *v3; // ecx + unsigned __int8 v4; // dl + _DWORD *v5; // ecx + char v6; // bl + char v7; // di + unsigned __int8 v9; // di + int v10; // eax + int v11; // eax + unsigned __int8 v12; // [esp+Fh] [ebp-Dh] + + v3 = (_DWORD *)*this; + v4 = this[1] == -1; + if ( (v4 & (v3 != 0)) != 0 ) + { + v9 = v4 & (v3 != 0); + v4 = 0; + if ( v3[2] >= v3[3] ) + { + v10 = (*(int (__fastcall **)(_DWORD *))(*v3 + 36))(v3); + v4 = 0; + if ( v10 == -1 ) + { + *this = 0; + v4 = v9; + } + } + } + v5 = *(_DWORD **)a2; + v6 = *(_DWORD *)(a2 + 4) == -1; + v7 = v6 & (*(_DWORD *)a2 != 0); + if ( v7 ) + { + v6 = 0; + if ( v5[2] >= v5[3] ) + { + v12 = v4; + v11 = (*(int (__fastcall **)(_DWORD *))(*v5 + 36))(v5); + v4 = v12; + if ( v11 == -1 ) + { + *(_DWORD *)a2 = 0; + v6 = v7; + } + } + } + return v6 == (char)v4; +} + +//----- (004502F0) -------------------------------------------------------- +unsigned int __fastcall std::istreambuf_iterator::_M_get(int a1) +{ + unsigned int result; // eax + _DWORD *v3; // ecx + unsigned __int8 *v4; // eax + + result = *(_DWORD *)(a1 + 4); + v3 = *(_DWORD **)a1; + if ( __PAIR64__(result, (unsigned int)v3) > 0xFFFFFFFF00000000LL ) + { + v4 = (unsigned __int8 *)v3[2]; + if ( (unsigned int)v4 >= v3[3] ) + { + result = (*(int (__fastcall **)(_DWORD *))(*v3 + 36))(v3); + if ( result == -1 ) + *(_DWORD *)a1 = 0; + } + else + { + return *v4; + } + } + return result; +} + +//----- (00450340) -------------------------------------------------------- +bool __thiscall std::istreambuf_iterator::equal(_WORD *this, int a2) +{ + _DWORD *v3; // ecx + unsigned __int8 v4; // dl + _DWORD *v5; // edi + unsigned __int8 v6; // al + unsigned __int8 v7; // bl + unsigned __int8 v9; // di + _WORD *v10; // eax + __int16 v11; // ax + __int16 *v12; // eax + __int16 v13; // cx + __int16 v14; // ax + unsigned __int8 v15; // [esp+Fh] [ebp-Dh] + + v3 = *(_DWORD **)this; + v4 = this[2] == 0xFFFF; + if ( (v4 & (v3 != 0)) != 0 ) + { + v9 = v4 & (v3 != 0); + v10 = (_WORD *)v3[2]; + v11 = (unsigned int)v10 >= v3[3] ? (*(int (__fastcall **)(_DWORD *))(*v3 + 36))(v3) : *v10; + v4 = 0; + if ( v11 == -1 ) + { + *(_DWORD *)this = 0; + v4 = v9; + } + } + v5 = *(_DWORD **)a2; + v6 = *(_WORD *)(a2 + 4) == 0xFFFF; + v7 = v6 & (*(_DWORD *)a2 != 0); + if ( v7 ) + { + v12 = (__int16 *)v5[2]; + if ( (unsigned int)v12 >= v5[3] ) + { + v15 = v4; + v14 = (*(int (__fastcall **)(_DWORD *))(*v5 + 36))(v5); + v4 = v15; + v13 = v14; + } + else + { + v13 = *v12; + } + v6 = 0; + if ( v13 == -1 ) + { + *(_DWORD *)a2 = 0; + v6 = v7; + } + } + return v4 == v6; +} + +//----- (004503E0) -------------------------------------------------------- +int __fastcall std::istreambuf_iterator::_M_get(int a1) +{ + int result; // eax + _DWORD *v3; // ecx + unsigned __int16 *v4; // eax + + result = *(unsigned __int16 *)(a1 + 4); + v3 = *(_DWORD **)a1; + if ( (_WORD)result == 0xFFFF && v3 ) + { + v4 = (unsigned __int16 *)v3[2]; + if ( (unsigned int)v4 >= v3[3] ) + result = (*(int (__fastcall **)(_DWORD *))(*v3 + 36))(v3); + else + result = *v4; + if ( (_WORD)result == 0xFFFF ) + *(_DWORD *)a1 = 0; + } + return result; +} + +//----- (00450430) -------------------------------------------------------- +int __stdcall std::__codecvt_utf16_base::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (00450450) -------------------------------------------------------- +int __fastcall std::__codecvt_utf16_base::do_max_length(int a1) +{ + return (*(_DWORD *)(a1 + 12) & 4) == 0 ? 4 : 6; +} + +//----- (00450470) -------------------------------------------------------- +unsigned int __thiscall std::__codecvt_utf16_base::do_in( + _DWORD *this, + int a2, + char *a3, + char *a4, + int *a5, + int a6, + int a7, + _DWORD *a8) +{ + unsigned int v8; // esi + char *v10; // ecx + unsigned int v11; // edx + int v12; // edi + unsigned __int16 v13; // dx + unsigned __int16 v14; // bp + unsigned int v15; // eax + int v16; // edx + __int16 v17; // bp + int v18; // eax + int v20; // [esp+0h] [ebp-24h] + int v21; // [esp+8h] [ebp-1Ch] BYREF + char *v22; // [esp+Ch] [ebp-18h] BYREF + char *v23; // [esp+10h] [ebp-14h] + + v8 = this[2]; + v22 = a3; + v23 = a4; + v21 = this[3]; + std::`anonymous namespace'::read_utf16_bom((int)&v22, &v21); + v10 = v22; + v20 = (int)v23; + v11 = (unsigned int)(v23 - v22) >> 1; + if ( !v11 ) + { +LABEL_20: + *a5 = (int)v10; + *a8 = a6; + return 2 * (a4 != v10); + } + v12 = v21 & 1; + while ( a7 != a6 ) + { + LOWORD(v15) = *(_WORD *)v10; + v17 = __ROL2__(*(_WORD *)v10, 8); + if ( !v12 ) + LOWORD(v15) = v17; + v15 = (unsigned __int16)v15; + if ( (unsigned int)(unsigned __int16)v15 - 55296 <= 0x3FF ) + { + if ( v11 == 1 ) + goto LABEL_16; + v13 = *((_WORD *)v10 + 1); + v14 = __ROL2__(v13, 8); + if ( !v12 ) + v13 = v14; + if ( (unsigned int)v13 - 56320 <= 0x3FF ) + { + v15 = v13 + ((unsigned __int16)v15 << 10) - 56613888; + v16 = 2; + if ( v8 < v15 ) + goto LABEL_15; + goto LABEL_8; + } +LABEL_18: + v10 = v22; + v18 = (int)v22; + if ( v8 != -1 ) + { + v11 = 2; + goto LABEL_17; + } + a6 += 4; + *(_DWORD *)(a6 - 4) = -1; + v11 = (unsigned int)(v20 - (_DWORD)v10) >> 1; + if ( !v11 ) + goto LABEL_20; + } + else + { + if ( (unsigned int)(unsigned __int16)v15 - 56320 <= 0x3FF ) + goto LABEL_18; + v16 = 1; + if ( v8 < (unsigned __int16)v15 ) + { +LABEL_15: + v11 = 2; +LABEL_16: + v18 = (int)v22; +LABEL_17: + *a5 = v18; + *a8 = a6; + return v11; + } +LABEL_8: + v10 += 2 * v16; + a6 += 4; + *(_DWORD *)(a6 - 4) = v15; + v22 = v10; + v11 = (unsigned int)(v20 - (_DWORD)v10) >> 1; + if ( !v11 ) + goto LABEL_20; + } + } + *a5 = (int)v22; + *a8 = a7; + return 1; +} + +//----- (00450610) -------------------------------------------------------- +int __thiscall std::__codecvt_utf16_base::do_out( + _DWORD *this, + int a2, + unsigned int *a3, + unsigned int *a4, + unsigned int **a5, + _WORD *a6, + int a7, + _DWORD *a8) +{ + int v8; // edi + unsigned int v9; // ebx + unsigned int *v10; // eax + _WORD *v11; // edx + int v12; // esi + unsigned int v13; // esi + unsigned int v14; // edi + unsigned int v16; // edi + __int16 v17; // si + __int16 v18; // di + __int16 v19; // di + unsigned int v20; // [esp+0h] [ebp-14h] + int v21; // [esp+0h] [ebp-14h] + + v8 = this[3]; + v9 = this[2]; + v10 = a3; + v11 = a6; + if ( (v8 & 2) != 0 ) + { + v20 = a7 - (_DWORD)a6; + v12 = 1; + if ( (v8 & 1) != 0 ) + { + if ( v20 <= 1 ) + goto LABEL_11; + v11 = a6 + 1; + *a6 = -257; + } + else + { + if ( v20 <= 1 ) + goto LABEL_11; + v11 = a6 + 1; + *a6 = -2; + } + } + if ( a3 == a4 ) + { +LABEL_17: + v12 = 0; + } + else + { + v21 = v8 & 1; + while ( 1 ) + { + v13 = *v10; + if ( v9 < *v10 ) + break; + v14 = (unsigned int)(a7 - (_DWORD)v11) >> 1; + if ( v13 > 0xFFFF ) + { + if ( v14 <= 1 ) + { +LABEL_10: + v12 = 1; + goto LABEL_11; + } + v16 = v13 >> 10; + v17 = (v13 & 0x3FF) - 9216; + v18 = v16 - 10304; + if ( !v21 ) + { + v18 = __ROL2__(v18, 8); + v17 = __ROL2__(v17, 8); + } + *v11 = v18; + v11 += 2; + *(v11 - 1) = v17; + } + else + { + if ( !v14 ) + goto LABEL_10; + v19 = __ROL2__(v13, 8); + if ( !v21 ) + LOWORD(v13) = v19; + *v11++ = v13; + } + if ( a4 == ++v10 ) + goto LABEL_17; + } + v12 = 2; + } +LABEL_11: + *a5 = v10; + *a8 = v11; + return v12; +} + +//----- (00450740) -------------------------------------------------------- +char *__thiscall std::__codecvt_utf16_base::do_length(_DWORD *this, int a2, char *a3, int a4, int a5) +{ + unsigned int v5; // ebx + char *v6; // ecx + int v7; // esi + unsigned int v8; // edx + unsigned int v9; // eax + __int16 v10; // bp + unsigned __int16 v11; // dx + unsigned __int16 v12; // bp + int v13; // edx + bool v15; // dl + bool v16; // al + int v17; // [esp+8h] [ebp-1Ch] BYREF + char *v18; // [esp+Ch] [ebp-18h] BYREF + int v19; // [esp+10h] [ebp-14h] + + v5 = this[2]; + v18 = a3; + v19 = a4; + v17 = this[3]; + std::`anonymous namespace'::read_utf16_bom((int)&v18, &v17); + if ( a5 ) + { + v6 = v18; + v7 = a5 - 1; + v8 = (unsigned int)(v19 - (_DWORD)v18) >> 1; + if ( v8 ) + goto LABEL_3; +LABEL_17: + v9 = -2; + while ( 1 ) + { + v15 = v5 >= v9; + v16 = v7-- != 0; + if ( !v16 || !v15 ) + return (char *)(v6 - a3); + v8 = (unsigned int)(v19 - (_DWORD)v6) >> 1; + if ( !v8 ) + goto LABEL_17; +LABEL_3: + LOWORD(v9) = *(_WORD *)v6; + v10 = __ROL2__(*(_WORD *)v6, 8); + if ( (v17 & 1) == 0 ) + LOWORD(v9) = v10; + v9 = (unsigned __int16)v9; + if ( (unsigned int)(unsigned __int16)v9 - 55296 > 0x3FF ) + { + if ( (unsigned int)(unsigned __int16)v9 - 56320 <= 0x3FF ) + goto LABEL_18; + v13 = 1; + if ( v5 < (unsigned __int16)v9 ) + return (char *)(v6 - a3); +LABEL_14: + v6 += 2 * v13; + v18 = v6; + } + else + { + if ( v8 == 1 ) + goto LABEL_17; + v11 = *((_WORD *)v6 + 1); + v12 = __ROL2__(v11, 8); + if ( (v17 & 1) == 0 ) + v11 = v12; + if ( (unsigned int)v11 - 56320 <= 0x3FF ) + { + v9 = v11 + ((unsigned __int16)v9 << 10) - 56613888; + v13 = 2; + if ( v5 < v9 ) + return (char *)(v6 - a3); + goto LABEL_14; + } +LABEL_18: + v9 = -1; + } + } + } + return (char *)(v18 - a3); +} + +//----- (00450880) -------------------------------------------------------- +int __stdcall std::__codecvt_utf16_base::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (004508A0) -------------------------------------------------------- +int __fastcall std::__codecvt_utf16_base::do_max_length(int a1) +{ + return (*(_DWORD *)(a1 + 12) & 4) == 0 ? 2 : 4; +} + +//----- (004508C0) -------------------------------------------------------- +int __thiscall std::__codecvt_utf16_base::do_in( + unsigned int *this, + int a2, + unsigned __int16 *a3, + unsigned __int16 *a4, + unsigned __int16 **a5, + int a6, + int a7, + int *a8) +{ + unsigned int v8; // edx + int result; // eax + unsigned __int16 *v10; // edx + int v11; // esi + unsigned __int16 *v12[2]; // [esp+4h] [ebp-18h] BYREF + int v13[4]; // [esp+Ch] [ebp-10h] BYREF + + v8 = this[3]; + v12[0] = a3; + v12[1] = a4; + v13[0] = a6; + v13[1] = a7; + result = std::`anonymous namespace'::ucs2_in(v12, v13, this[2], v8); + v10 = v12[0]; + v11 = v13[0]; + *a5 = v12[0]; + *a8 = v11; + if ( !result && v10 != a4 ) + return 2; + return result; +} + +//----- (00450930) -------------------------------------------------------- +int __thiscall std::__codecvt_utf16_base::do_out( + _DWORD *this, + int a2, + unsigned __int16 *a3, + unsigned __int16 *a4, + unsigned __int16 **a5, + _WORD *a6, + int a7, + int *a8) +{ + unsigned int v8; // edi + unsigned __int16 *v9; // edx + _WORD *v10; // eax + int v11; // esi + unsigned int v12; // ebx + int v13; // ecx + int v14; // eax + unsigned __int16 *v16[2]; // [esp+4h] [ebp-1Ch] BYREF + int v17[5]; // [esp+Ch] [ebp-14h] BYREF + + v8 = this[2]; + v9 = a3; + v10 = a6; + v16[1] = a4; + v11 = this[3]; + v16[0] = a3; + v17[0] = (int)a6; + v17[1] = a7; + if ( (v11 & 2) == 0 ) + goto LABEL_5; + v12 = a7 - (_DWORD)a6; + v13 = 1; + if ( (v11 & 1) == 0 ) + { + if ( v12 <= 1 ) + goto LABEL_6; + *a6 = -2; + v17[0] = (int)(a6 + 1); + goto LABEL_5; + } + if ( v12 > 1 ) + { + *a6 = -257; + v17[0] = (int)(a6 + 1); +LABEL_5: + v14 = std::`anonymous namespace'::ucs2_out(v16, v17, v8, v11); + v9 = v16[0]; + v13 = v14; + v10 = (_WORD *)v17[0]; + } +LABEL_6: + *a5 = v9; + *a8 = (int)v10; + return v13; +} + +//----- (004509E0) -------------------------------------------------------- +char *__thiscall std::__codecvt_utf16_base::do_length( + _DWORD *this, + int a2, + unsigned __int16 *a3, + int a4, + int a5) +{ + unsigned int v5; // esi + unsigned __int16 *v6; // edx + int v7; // ecx + unsigned __int16 v8; // ax + unsigned __int16 v9; // bx + bool v11; // al + int v12; // [esp+4h] [ebp-1Ch] BYREF + unsigned __int16 *v13; // [esp+8h] [ebp-18h] BYREF + int v14; // [esp+Ch] [ebp-14h] + + v5 = this[2]; + v13 = a3; + v14 = a4; + v12 = this[3]; + std::`anonymous namespace'::read_utf16_bom((int)&v13, &v12); + v6 = v13; + if ( v5 >= 0xFFFF ) + v5 = 0xFFFF; + if ( a5 ) + { + v7 = a5 - 1; + do + { + if ( !((unsigned int)(v14 - (_DWORD)v6) >> 1) ) + break; + v8 = *v6; + v9 = __ROL2__(*v6, 8); + if ( (v12 & 1) == 0 ) + v8 = v9; + if ( (unsigned __int16)(v8 + 10240) <= 0x7FFu ) + break; + if ( v5 < v8 ) + break; + ++v6; + v11 = v7 != 0; + v13 = v6; + --v7; + } + while ( v11 ); + } + return (char *)((char *)v6 - (char *)a3); +} + +//----- (00450AA0) -------------------------------------------------------- +int __stdcall std::__codecvt_utf16_base::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (00450AC0) -------------------------------------------------------- +int __fastcall std::__codecvt_utf16_base::do_max_length(int a1) +{ + return (*(_DWORD *)(a1 + 16) & 4) == 0 ? 2 : 4; +} + +//----- (00450AE0) -------------------------------------------------------- +int __thiscall std::__codecvt_utf16_base::do_in( + unsigned int *this, + int a2, + unsigned __int16 *a3, + unsigned __int16 *a4, + unsigned __int16 **a5, + int a6, + int a7, + int *a8) +{ + unsigned int v8; // edx + int result; // eax + unsigned __int16 *v10; // edx + int v11; // esi + unsigned __int16 *v12[2]; // [esp+4h] [ebp-18h] BYREF + int v13[4]; // [esp+Ch] [ebp-10h] BYREF + + v8 = this[4]; + v12[0] = a3; + v12[1] = a4; + v13[0] = a6; + v13[1] = a7; + result = std::`anonymous namespace'::ucs2_in(v12, v13, this[3], v8); + v10 = v12[0]; + v11 = v13[0]; + *a5 = v12[0]; + *a8 = v11; + if ( !result && v10 != a4 ) + return 2; + return result; +} + +//----- (00450B50) -------------------------------------------------------- +int __thiscall std::__codecvt_utf16_base::do_out( + _DWORD *this, + int a2, + unsigned __int16 *a3, + unsigned __int16 *a4, + unsigned __int16 **a5, + _WORD *a6, + int a7, + int *a8) +{ + unsigned int v8; // edi + unsigned __int16 *v9; // edx + _WORD *v10; // eax + int v11; // esi + unsigned int v12; // ebx + int v13; // ecx + int v14; // eax + int v16[2]; // [esp+4h] [ebp-1Ch] BYREF + unsigned __int16 *v17[5]; // [esp+Ch] [ebp-14h] BYREF + + v8 = this[3]; + v9 = a3; + v10 = a6; + v17[1] = a4; + v11 = this[4]; + v16[0] = (int)a6; + v16[1] = a7; + v17[0] = a3; + if ( (v11 & 2) == 0 ) + goto LABEL_5; + v12 = a7 - (_DWORD)a6; + v13 = 1; + if ( (v11 & 1) == 0 ) + { + if ( v12 <= 1 ) + goto LABEL_6; + *a6 = -2; + v16[0] = (int)(a6 + 1); + goto LABEL_5; + } + if ( v12 > 1 ) + { + *a6 = -257; + v16[0] = (int)(a6 + 1); +LABEL_5: + v14 = std::`anonymous namespace'::ucs2_out(v17, v16, v8, v11); + v9 = v17[0]; + v13 = v14; + v10 = (_WORD *)v16[0]; + } +LABEL_6: + *a5 = v9; + *a8 = (int)v10; + return v13; +} + +//----- (00450C00) -------------------------------------------------------- +char *__thiscall std::__codecvt_utf16_base::do_length( + _DWORD *this, + int a2, + unsigned __int16 *a3, + int a4, + int a5) +{ + unsigned int v5; // esi + unsigned __int16 *v6; // edx + int v7; // ecx + unsigned __int16 v8; // ax + unsigned __int16 v9; // bx + bool v11; // al + int v12; // [esp+4h] [ebp-1Ch] BYREF + unsigned __int16 *v13; // [esp+8h] [ebp-18h] BYREF + int v14; // [esp+Ch] [ebp-14h] + + v5 = this[3]; + v13 = a3; + v14 = a4; + v12 = this[4]; + std::`anonymous namespace'::read_utf16_bom((int)&v13, &v12); + v6 = v13; + if ( v5 >= 0xFFFF ) + v5 = 0xFFFF; + if ( a5 ) + { + v7 = a5 - 1; + do + { + if ( !((unsigned int)(v14 - (_DWORD)v6) >> 1) ) + break; + v8 = *v6; + v9 = __ROL2__(*v6, 8); + if ( (v12 & 1) == 0 ) + v8 = v9; + if ( (unsigned __int16)(v8 + 10240) <= 0x7FFu ) + break; + if ( v5 < v8 ) + break; + ++v6; + v11 = v7 != 0; + v13 = v6; + --v7; + } + while ( v11 ); + } + return (char *)((char *)v6 - (char *)a3); +} + +//----- (00450CC0) -------------------------------------------------------- +const char *std::bad_array_new_length::what() +{ + return "std::bad_array_new_length"; +} + +//----- (00450CD0) -------------------------------------------------------- +int __stdcall std::__codecvt_utf8_utf16_base::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (00450CF0) -------------------------------------------------------- +int __fastcall std::__codecvt_utf8_utf16_base::do_max_length(int a1) +{ + return (*(_DWORD *)(a1 + 12) & 4) == 0 ? 4 : 7; +} + +//----- (00450D10) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_utf16_base::do_in( + int this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + unsigned __int8 **a5, + char *a6, + char *a7, + char **a8) +{ + unsigned int v8; // edi + unsigned __int8 *v9; // ebp + unsigned int v11; // eax + int result; // eax + unsigned __int8 *v13; // [esp+8h] [ebp-18h] BYREF + unsigned __int8 *v14; // [esp+Ch] [ebp-14h] + + v8 = *(_DWORD *)(this + 8); + v9 = a3; + v13 = a3; + v14 = a4; + if ( (*(_BYTE *)(this + 12) & 4) != 0 + && (unsigned int)(a4 - a3) > 2 + && *(_WORD *)a3 == std::`anonymous namespace'::utf8_bom + && a3[2] == 0xBF ) + { + v9 = a3 + 3; + v13 = a3 + 3; + } + if ( a4 == v9 ) + { +LABEL_13: + result = 0; + } + else + { + while ( 1 ) + { + if ( a7 == a6 ) + { + v9 = v13; + result = 0; + goto LABEL_11; + } + v11 = std::`anonymous namespace'::read_utf8_code_point(&v13, v8); + if ( v11 == -2 ) + { + v9 = v13; + result = 1; + goto LABEL_11; + } + if ( v8 < v11 ) + break; + if ( v11 <= 0xFFFF ) + { + *(_DWORD *)a6 = v11; + v9 = v13; + a6 += 4; + if ( v14 == v13 ) + goto LABEL_13; + } + else + { + if ( (unsigned int)(a7 - a6) <= 4 ) + { + result = 1; + goto LABEL_11; + } + v9 = v13; + a6 += 8; + *((_DWORD *)a6 - 1) = (unsigned __int16)((v11 & 0x3FF) - 9216); + *((_DWORD *)a6 - 2) = (unsigned __int16)((v11 >> 10) - 10304); + if ( v14 == v9 ) + goto LABEL_13; + } + } + v9 = v13; + result = 2; + } +LABEL_11: + *a5 = v9; + *a8 = a6; + return result; +} +// 515494: using guessed type __int16 std::`anonymous namespace'::utf8_bom; + +//----- (00450E60) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_utf16_base::do_out( + int this, + int a2, + char *a3, + char *a4, + unsigned int **a5, + _BYTE *a6, + _BYTE *a7, + _DWORD *a8) +{ + unsigned int v8; // edi + _BYTE *v9; // eax + unsigned int *v10; // ebx + char *v11; // ecx + unsigned int v12; // eax + int v13; // ebp + unsigned int v14; // edx + int v15; // ecx + _BYTE *v17[6]; // [esp+8h] [ebp-18h] BYREF + + v8 = *(_DWORD *)(this + 8); + v9 = a6; + v10 = (unsigned int *)a3; + v17[0] = a6; + v17[1] = a7; + if ( (*(_BYTE *)(this + 12) & 2) != 0 ) + { + v15 = 1; + if ( (unsigned int)(a7 - a6) <= 2 ) + goto LABEL_13; + a6[2] = -65; + *(_WORD *)a6 = -17425; + v17[0] = a6 + 3; + } + v11 = (char *)(a4 - a3); + if ( a3 == a4 ) + { +LABEL_16: + v9 = v17[0]; + v15 = 0; + } + else + { + while ( 1 ) + { + v14 = *v10; + if ( *v10 - 55296 <= 0x3FF ) + { + if ( (unsigned int)v11 <= 4 ) + goto LABEL_16; + v12 = v10[1]; + if ( v12 - 56320 > 0x3FF || (v13 = 2, v14 = v12 + (v14 << 10) - 56613888, v8 < v14) ) + { +LABEL_12: + v9 = v17[0]; + v15 = 2; + goto LABEL_13; + } + } + else + { + if ( v14 - 56320 <= 0x3FF ) + goto LABEL_12; + v13 = 1; + if ( v8 < v14 ) + goto LABEL_12; + } + if ( !(unsigned __int8)std::`anonymous namespace'::write_utf8_code_point(v17, v14) ) + break; + v10 += v13; + v11 = (char *)(a4 - (char *)v10); + if ( a4 == (char *)v10 ) + goto LABEL_16; + } + v9 = v17[0]; + v15 = 1; + } +LABEL_13: + *a5 = v10; + *a8 = v9; + return v15; +} + +//----- (00450F70) -------------------------------------------------------- +unsigned __int8 *__thiscall std::__codecvt_utf8_utf16_base::do_length( + unsigned int *this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + unsigned int a5) +{ + return (unsigned __int8 *)(std::`anonymous namespace'::utf16_span(a3, a4, a5, this[2], this[3]) - a3); +} + +//----- (00450FA0) -------------------------------------------------------- +int __stdcall std::__codecvt_utf8_utf16_base::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (00450FC0) -------------------------------------------------------- +int __fastcall std::__codecvt_utf8_utf16_base::do_max_length(int a1) +{ + return (*(_DWORD *)(a1 + 12) & 4) == 0 ? 4 : 7; +} + +//----- (00450FE0) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_utf16_base::do_in( + _DWORD *this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + unsigned __int8 **a5, + char *a6, + char *a7, + char **a8) +{ + unsigned int v8; // edx + int result; // eax + unsigned __int8 *v10[2]; // [esp+8h] [ebp-10h] BYREF + char *v11[2]; // [esp+10h] [ebp-8h] BYREF + + v8 = this[2]; + v10[0] = a3; + v10[1] = a4; + v11[0] = a6; + v11[1] = a7; + result = std::`anonymous namespace'::utf16_in(v10, v11, v8, this[3] & 6 | 1, 0); + *a5 = v10[0]; + *a8 = v11[0]; + return result; +} + +//----- (00451050) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_utf16_base::do_out( + int this, + int a2, + unsigned __int16 *a3, + unsigned __int16 *a4, + unsigned __int16 **a5, + _BYTE *a6, + _BYTE *a7, + _DWORD *a8) +{ + unsigned __int16 *v8; // ebx + _BYTE *v9; // eax + unsigned int v10; // esi + int v11; // eax + int v12; // edx + unsigned __int16 *v14[2]; // [esp+4h] [ebp-18h] BYREF + _BYTE *v15[4]; // [esp+Ch] [ebp-10h] BYREF + + v8 = a3; + v9 = a6; + v14[1] = a4; + v10 = *(_DWORD *)(this + 8); + v14[0] = a3; + v15[0] = a6; + v15[1] = a7; + if ( (*(_BYTE *)(this + 12) & 2) != 0 ) + { + v12 = 1; + if ( (unsigned int)(a7 - a6) <= 2 ) + goto LABEL_3; + a6[2] = -65; + *(_WORD *)a6 = -17425; + v15[0] = a6 + 3; + } + v11 = std::`anonymous namespace'::utf16_out(v14, v15, v10, 0); + v8 = v14[0]; + v12 = v11; + v9 = v15[0]; +LABEL_3: + *a5 = v8; + *a8 = v9; + return v12; +} + +//----- (004510E0) -------------------------------------------------------- +unsigned __int8 *__thiscall std::__codecvt_utf8_utf16_base::do_length( + unsigned int *this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + unsigned int a5) +{ + return (unsigned __int8 *)(std::`anonymous namespace'::utf16_span(a3, a4, a5, this[2], this[3]) - a3); +} + +//----- (00451110) -------------------------------------------------------- +int __stdcall std::__codecvt_utf8_utf16_base::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (00451130) -------------------------------------------------------- +int __fastcall std::__codecvt_utf8_utf16_base::do_max_length(int a1) +{ + return (*(_DWORD *)(a1 + 16) & 4) == 0 ? 4 : 7; +} + +//----- (00451150) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_utf16_base::do_in( + int this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + unsigned __int8 **a5, + char *a6, + char *a7, + char **a8) +{ + unsigned int v8; // edi + unsigned __int8 *v9; // ebp + unsigned int v11; // eax + int result; // eax + unsigned __int8 *v13; // [esp+8h] [ebp-18h] BYREF + unsigned __int8 *v14; // [esp+Ch] [ebp-14h] + + v8 = *(_DWORD *)(this + 12); + v9 = a3; + v13 = a3; + v14 = a4; + if ( (*(_BYTE *)(this + 16) & 4) != 0 + && (unsigned int)(a4 - a3) > 2 + && *(_WORD *)a3 == std::`anonymous namespace'::utf8_bom + && a3[2] == 0xBF ) + { + v9 = a3 + 3; + v13 = a3 + 3; + } + if ( v9 == a4 ) + { +LABEL_13: + result = 0; + } + else + { + while ( 1 ) + { + if ( a7 == a6 ) + { + v9 = v13; + result = 0; + goto LABEL_11; + } + v11 = std::`anonymous namespace'::read_utf8_code_point(&v13, v8); + if ( v11 == -2 ) + { + v9 = v13; + result = 1; + goto LABEL_11; + } + if ( v8 < v11 ) + break; + if ( v11 <= 0xFFFF ) + { + *(_WORD *)a6 = v11; + v9 = v13; + a6 += 2; + if ( v14 == v13 ) + goto LABEL_13; + } + else + { + if ( (unsigned int)(a7 - a6) <= 2 ) + { + result = 1; + goto LABEL_11; + } + v9 = v13; + a6 += 4; + *((_WORD *)a6 - 1) = (v11 & 0x3FF) - 9216; + *((_WORD *)a6 - 2) = (v11 >> 10) - 10304; + if ( v14 == v9 ) + goto LABEL_13; + } + } + v9 = v13; + result = 2; + } +LABEL_11: + *a5 = v9; + *a8 = a6; + return result; +} +// 515494: using guessed type __int16 std::`anonymous namespace'::utf8_bom; + +//----- (00451290) -------------------------------------------------------- +int __thiscall std::__codecvt_utf8_utf16_base::do_out( + int this, + int a2, + char *a3, + char *a4, + unsigned __int16 **a5, + _BYTE *a6, + _BYTE *a7, + _DWORD *a8) +{ + unsigned int v8; // edi + _BYTE *v9; // eax + unsigned __int16 *v10; // ebx + char *v11; // ecx + int v12; // eax + int v13; // ebp + unsigned int v14; // edx + int v15; // ecx + _BYTE *v17[6]; // [esp+8h] [ebp-18h] BYREF + + v8 = *(_DWORD *)(this + 12); + v9 = a6; + v10 = (unsigned __int16 *)a3; + v17[0] = a6; + v17[1] = a7; + if ( (*(_BYTE *)(this + 16) & 2) != 0 ) + { + v15 = 1; + if ( (unsigned int)(a7 - a6) <= 2 ) + goto LABEL_13; + a6[2] = -65; + *(_WORD *)a6 = -17425; + v17[0] = a6 + 3; + } + v11 = (char *)(a4 - a3); + if ( a3 == a4 ) + { +LABEL_16: + v9 = v17[0]; + v15 = 0; + } + else + { + while ( 1 ) + { + v14 = *v10; + if ( v14 - 55296 <= 0x3FF ) + { + if ( (unsigned int)v11 <= 2 ) + goto LABEL_16; + v12 = v10[1]; + if ( (unsigned int)(v12 - 56320) > 0x3FF || (v13 = 2, v14 = v12 + (v14 << 10) - 56613888, v8 < v14) ) + { +LABEL_12: + v9 = v17[0]; + v15 = 2; + goto LABEL_13; + } + } + else + { + if ( v14 - 56320 <= 0x3FF ) + goto LABEL_12; + v13 = 1; + if ( v8 < v14 ) + goto LABEL_12; + } + if ( !(unsigned __int8)std::`anonymous namespace'::write_utf8_code_point(v17, v14) ) + break; + v10 += v13; + v11 = (char *)(a4 - (char *)v10); + if ( a4 == (char *)v10 ) + goto LABEL_16; + } + v9 = v17[0]; + v15 = 1; + } +LABEL_13: + *a5 = v10; + *a8 = v9; + return v15; +} + +//----- (004513B0) -------------------------------------------------------- +unsigned __int8 *__thiscall std::__codecvt_utf8_utf16_base::do_length( + unsigned int *this, + int a2, + unsigned __int8 *a3, + unsigned __int8 *a4, + unsigned int a5) +{ + return (unsigned __int8 *)(std::`anonymous namespace'::utf16_span(a3, a4, a5, this[3], this[4]) - a3); +} + +//----- (004513E0) -------------------------------------------------------- +_DWORD *__thiscall std::_V2::error_category::_M_message[abi:cxx11](_DWORD *this, int a2, int a3) +{ + unsigned int v4; // [esp+8h] [ebp-70h] + void *Block[2]; // [esp+58h] [ebp-20h] BYREF + char v7; // [esp+60h] [ebp-18h] BYREF + + (*(void (__thiscall **)(void **, int, int))(*(_DWORD *)a2 + 16))(Block, a2, a3); + std::__cow_string::__cow_string(this, (std::__cow_string *)Block[0], (size_t)Block[1], v4); + if ( Block[0] != &v7 ) + operator delete(Block[0]); + return this; +} +// 45144C: variable 'v4' is possibly undefined + +//----- (004514B0) -------------------------------------------------------- +void *__thiscall std::_V2::error_category::_M_message(void *ecx0, std::_V2::error_category *this, int a3) +{ + int v3; // ecx + int v4; // eax + unsigned int v6; // [esp+8h] [ebp-60h] + char v8[13]; // [esp+5Bh] [ebp-Dh] BYREF + + (*(void (__thiscall **)(char *, std::_V2::error_category *, int))(*(_DWORD *)this + 12))(&v8[1], this, a3); + std::__sso_string::__sso_string((int)ecx0, *(std::__sso_string **)&v8[1], *(_DWORD *)(*(_DWORD *)&v8[1] - 12), v6); + v3 = *(_DWORD *)&v8[1]; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v8[1] - 4), 0xFFFFFFFF) > 0 ) + return ecx0; +LABEL_5: + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v8); + return ecx0; + } + v4 = *(_DWORD *)(*(_DWORD *)&v8[1] - 4); + *(_DWORD *)(*(_DWORD *)&v8[1] - 4) = v4 - 1; + if ( v4 <= 0 ) + goto LABEL_5; + return ecx0; +} +// 45151C: variable 'v6' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004515A0) -------------------------------------------------------- +bool __userpurge std::_V2::error_category::equivalent@( + int a1@, + std::_V2::error_category *this, + const std::error_code *a3, + int a4) +{ + bool result; // al + + result = 0; + if ( *((_DWORD *)this + 1) == a1 ) + return *(_DWORD *)this == (_DWORD)a3; + return result; +} + +//----- (004515C0) -------------------------------------------------------- +int __thiscall std::_V2::error_category::equivalent(void *this, int a2, _DWORD *a3) +{ + int v3; // eax + int v4; // edx + int v5; // ecx + int v6; // edx + + v3 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)this + 20))(this, a2); + v5 = v4; + v6 = 0; + if ( a3[1] == v5 ) + LOBYTE(v6) = *a3 == v3; + return v6; +} +// 4515D4: variable 'v4' is possibly undefined + +//----- (00451600) -------------------------------------------------------- +std::_V2::error_category *__stdcall std::_V2::error_category::default_error_condition( + std::_V2::error_category *this, + int a2) +{ + return this; +} + +//----- (00451610) -------------------------------------------------------- +BOOL __thiscall std::map>::count(_DWORD *this, int a2) +{ + _DWORD *v2; // esi + _DWORD *v3; // ebx + _DWORD *i; // edi + char v5; // al + _DWORD *v6; // edx + + v2 = this + 1; + v3 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v6 ) + { + v5 = std::operator<((int)(i + 4), a2); + v6 = (_DWORD *)i[3]; + if ( !v5 ) + v6 = (_DWORD *)i[2]; + if ( !v5 ) + v3 = i; + } + if ( v2 != v3 && (unsigned __int8)std::operator<(a2, (int)(v3 + 4)) ) + v3 = v2; + return v2 != v3; +} + +//----- (00451680) -------------------------------------------------------- +unsigned __int8 *__thiscall std::ctype::do_tolower(_DWORD *this, unsigned __int8 *a2, unsigned __int8 *a3) +{ + unsigned __int8 *v3; // ebx + unsigned __int8 v5; // al + int (__thiscall *v6)(_DWORD *, int); // edx + + v3 = a2; + if ( a2 < a3 ) + { + do + { + while ( 1 ) + { + v6 = *(int (__thiscall **)(_DWORD *, int))(*this + 16); + v5 = *v3; + if ( v6 == std::ctype::do_tolower ) + break; + *v3++ = v6(this, (char)v5); + if ( a3 == v3 ) + return a3; + } + if ( (*(_BYTE *)(this[6] + 2 * v5) & 1) != 0 ) + v5 += 32; + *v3++ = v5; + } + while ( a3 != v3 ); + } + return a3; +} + +//----- (004516F0) -------------------------------------------------------- +int __thiscall std::ctype::do_tolower(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + if ( (*(_BYTE *)(this[6] + 2 * (unsigned __int8)a2) & 1) != 0 ) + return a2 + 32; + return result; +} + +//----- (00451710) -------------------------------------------------------- +unsigned __int8 *__thiscall std::ctype::do_toupper(_DWORD *this, unsigned __int8 *a2, unsigned __int8 *a3) +{ + unsigned __int8 *v3; // ebx + unsigned __int8 v5; // al + int (__thiscall *v6)(_DWORD *, int); // edx + + v3 = a2; + if ( a2 < a3 ) + { + do + { + while ( 1 ) + { + v6 = *(int (__thiscall **)(_DWORD *, int))(*this + 8); + v5 = *v3; + if ( v6 == std::ctype::do_toupper ) + break; + *v3++ = v6(this, (char)v5); + if ( a3 == v3 ) + return a3; + } + if ( (*(_BYTE *)(this[6] + 2 * v5) & 2) != 0 ) + v5 -= 32; + *v3++ = v5; + } + while ( a3 != v3 ); + } + return a3; +} + +//----- (00451780) -------------------------------------------------------- +int __thiscall std::ctype::do_toupper(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + if ( (*(_BYTE *)(this[6] + 2 * (unsigned __int8)a2) & 2) != 0 ) + return a2 - 32; + return result; +} + +//----- (004517A0) -------------------------------------------------------- +int __fastcall std::ctype::_M_widen_init(int a1) +{ + int i; // eax + char *Buf2; // edx + void (__thiscall *v4)(int, _DWORD *, char *, int); // eax + int result; // eax + char *v6; // [esp+1Ch] [ebp-120h] + _DWORD Buf1[64]; // [esp+20h] [ebp-11Ch] BYREF + char v8[28]; // [esp+120h] [ebp-1Ch] BYREF + + for ( i = 0; i != 256; ++i ) + *((_BYTE *)Buf1 + i) = i; + Buf2 = (char *)(a1 + 29); + v4 = *(void (__thiscall **)(int, _DWORD *, char *, int))(*(_DWORD *)a1 + 28); + if ( (char *)v4 == (char *)std::ctype::do_widen ) + { + *(_DWORD *)(a1 + 29) = Buf1[0]; + *(_DWORD *)(a1 + 281) = Buf1[63]; + qmemcpy( + (void *)((a1 + 33) & 0xFFFFFFFC), + (const void *)((char *)Buf1 - &Buf2[-((a1 + 33) & 0xFFFFFFFC)]), + 4 * ((unsigned int)&Buf2[-((a1 + 33) & 0xFFFFFFFC) + 256] >> 2)); + } + else + { + v6 = (char *)(a1 + 29); + v4(a1, Buf1, v8, a1 + 29); + Buf2 = v6; + } + *(_BYTE *)(a1 + 28) = 1; + result = memcmp(Buf1, Buf2, 0x100u); + if ( result ) + *(_BYTE *)(a1 + 28) = 2; + return result; +} +// 4517A0: using guessed type char var_1C[28]; + +//----- (00451850) -------------------------------------------------------- +int __fastcall std::ctype::_M_narrow_init(int a1) +{ + int i; // eax + char *Buf2; // edx + void (__thiscall *v4)(int, _DWORD *, char *, _DWORD, int); // eax + int result; // eax + int (__thiscall *v6)(int, _DWORD *, char *, int, char *); // eax + char *v7; // [esp+1Ch] [ebp-130h] + char v8; // [esp+2Fh] [ebp-11Dh] BYREF + _DWORD Buf1[64]; // [esp+30h] [ebp-11Ch] BYREF + char v10[28]; // [esp+130h] [ebp-1Ch] BYREF + + for ( i = 0; i != 256; ++i ) + *((_BYTE *)Buf1 + i) = i; + Buf2 = (char *)(a1 + 285); + v4 = *(void (__thiscall **)(int, _DWORD *, char *, _DWORD, int))(*(_DWORD *)a1 + 36); + if ( (char *)v4 == (char *)std::ctype::do_narrow ) + { + *(_DWORD *)(a1 + 285) = Buf1[0]; + *(_DWORD *)(a1 + 537) = Buf1[63]; + qmemcpy( + (void *)((a1 + 289) & 0xFFFFFFFC), + (const void *)((char *)Buf1 - &Buf2[-((a1 + 289) & 0xFFFFFFFC)]), + 4 * ((unsigned int)&Buf2[-((a1 + 289) & 0xFFFFFFFC) + 256] >> 2)); + } + else + { + v7 = (char *)(a1 + 285); + v4(a1, Buf1, v10, 0, a1 + 285); + Buf2 = v7; + } + *(_BYTE *)(a1 + 541) = 1; + result = memcmp(Buf1, Buf2, 0x100u); + if ( result + || ((v6 = *(int (__thiscall **)(int, _DWORD *, char *, int, char *))(*(_DWORD *)a1 + 36), + (char *)v6 != (char *)std::ctype::do_narrow) + ? (result = v6(a1, Buf1, (char *)Buf1 + 1, 1, &v8)) + : (result = LOBYTE(Buf1[0]), v8 = Buf1[0]), + v8 == 1) ) + { + *(_BYTE *)(a1 + 541) = 2; + } + return result; +} +// 451850: using guessed type char var_1C[28]; + +//----- (00451960) -------------------------------------------------------- +_BYTE *__thiscall std::ctype::widen(_BYTE *this, _BYTE *Src, _BYTE *a3, void *a4) +{ + char v4; // al + _BYTE *(__stdcall *v5)(_BYTE *, _BYTE *, void *); // eax + + v4 = this[28]; + if ( v4 == 1 ) + goto LABEL_4; + if ( v4 ) + { + v5 = *(_BYTE *(__stdcall **)(_BYTE *, _BYTE *, void *))(*(_DWORD *)this + 28); + if ( v5 == std::ctype::do_widen ) + goto LABEL_4; + return v5(Src, a3, a4); + } + std::ctype::_M_widen_init((int)this); + v5 = *(_BYTE *(__stdcall **)(_BYTE *, _BYTE *, void *))(*(_DWORD *)this + 28); + if ( v5 != std::ctype::do_widen ) + return v5(Src, a3, a4); +LABEL_4: + if ( Src == a3 ) + return Src; + memcpy(a4, Src, a3 - Src); + return a3; +} + +//----- (004519F0) -------------------------------------------------------- +int __thiscall std::ctype::narrow(_BYTE *this, int a2, int a3) +{ + int result; // eax + int v5; // ecx + int (__stdcall *v6)(unsigned __int8, int); // eax + + result = (unsigned __int8)this[(unsigned __int8)a2 + 285]; + if ( !(_BYTE)result ) + { + v5 = a2; + v6 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)this + 32); + if ( v6 != std::ctype::do_narrow ) + v5 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v6)(this, (char)a2, (char)a3); + result = a3; + if ( (_BYTE)a3 != (_BYTE)v5 ) + { + this[(unsigned __int8)a2 + 285] = v5; + return v5; + } + } + return result; +} + +//----- (00451A60) -------------------------------------------------------- +_BYTE *__stdcall std::ctype::do_widen(_BYTE *Src, _BYTE *a2, void *a3) +{ + if ( a2 != Src ) + memcpy(a3, Src, a2 - Src); + return a2; +} + +//----- (00451AA0) -------------------------------------------------------- +int __stdcall std::ctype::do_widen(unsigned __int8 a1) +{ + return a1; +} + +//----- (00451AB0) -------------------------------------------------------- +_BYTE *__stdcall std::ctype::do_narrow(_BYTE *Src, _BYTE *a2, int a3, void *a4) +{ + if ( a2 != Src ) + memcpy(a4, Src, a2 - Src); + return a2; +} + +//----- (00451AF0) -------------------------------------------------------- +int __stdcall std::ctype::do_narrow(unsigned __int8 a1, int a2) +{ + return a1; +} + +//----- (00451B00) -------------------------------------------------------- +wint_t *__thiscall std::ctype::do_scan_is(_WORD *this, unsigned __int16 a2, wint_t *a3, unsigned int a4) +{ + _WORD *v4; // edi + wint_t C; // si + int (__thiscall *v6)(_WORD *, unsigned __int16, wint_t); // eax + _WORD *v7; // ebp + wint_t *v9; // [esp+14h] [ebp-28h] + + if ( (unsigned int)a3 >= a4 ) + return a3; + v9 = a3; + v4 = this + 343; + while ( 1 ) + { + C = *v9; + v6 = *(int (__thiscall **)(_WORD *, unsigned __int16, wint_t))(*(_DWORD *)this + 8); + if ( v6 == std::ctype::do_is ) + break; + if ( (unsigned __int8)v6(this, a2, *v9) ) + return v9; +LABEL_10: + if ( a4 <= (unsigned int)++v9 ) + return v9; + } + v7 = this + 327; + while ( (*v7 & a2) == 0 || !iswctype(C, v7[16]) ) + { + if ( v4 == ++v7 ) + goto LABEL_10; + } + return v9; +} + +//----- (00451BE0) -------------------------------------------------------- +unsigned int __stdcall std::ctype::do_tolower(wint_t *a1, unsigned int a2) +{ + wint_t *v2; // ebx + wint_t C; // ax + + v2 = a1; + if ( (unsigned int)a1 < a2 ) + { + do + { + C = *v2++; + *(v2 - 1) = towlower(C); + } + while ( v2 != &a1[((a2 - 1 - (unsigned int)a1) >> 1) + 1] ); + } + return a2; +} + +//----- (00451C30) -------------------------------------------------------- +wint_t __stdcall std::ctype::do_tolower(wint_t C) +{ + return towlower(C); +} + +//----- (00451C50) -------------------------------------------------------- +unsigned int __stdcall std::ctype::do_toupper(wint_t *a1, unsigned int a2) +{ + wint_t *v2; // ebx + wint_t C; // ax + + v2 = a1; + if ( (unsigned int)a1 < a2 ) + { + do + { + C = *v2++; + *(v2 - 1) = towupper(C); + } + while ( v2 != &a1[((a2 - 1 - (unsigned int)a1) >> 1) + 1] ); + } + return a2; +} + +//----- (00451CA0) -------------------------------------------------------- +wint_t __stdcall std::ctype::do_toupper(wint_t C) +{ + return towupper(C); +} + +//----- (00451CC0) -------------------------------------------------------- +wint_t *__thiscall std::ctype::do_scan_not(_WORD *this, unsigned __int16 a2, wint_t *a3, unsigned int a4) +{ + _WORD *v4; // ebp + wint_t C; // si + int (__thiscall *v6)(_WORD *, unsigned __int16, wint_t); // eax + _WORD *v7; // edi + wint_t *v9; // [esp+14h] [ebp-28h] + + if ( (unsigned int)a3 >= a4 ) + return a3; + v9 = a3; + v4 = this + 343; + do + { + while ( 1 ) + { + C = *v9; + v6 = *(int (__thiscall **)(_WORD *, unsigned __int16, wint_t))(*(_DWORD *)this + 8); + if ( v6 == std::ctype::do_is ) + break; + if ( (unsigned __int8)v6(this, a2, *v9) ) + { + if ( a4 > (unsigned int)++v9 ) + continue; + } + return v9; + } + v7 = this + 327; + while ( (*v7 & a2) == 0 || !iswctype(C, v7[16]) ) + { + if ( v4 == ++v7 ) + return v9; + } + ++v9; + } + while ( a4 > (unsigned int)v9 ); + return v9; +} + +//----- (00451DA0) -------------------------------------------------------- +int __stdcall std::ctype::_M_convert_to_wmask(unsigned __int16 a1) +{ + int v1; // edx + int v3; // eax + int v4; // eax + int v5; // eax + int v6; // eax + int v7; // eax + int v8; // eax + int v9; // eax + int v10; // eax + int v11; // eax + int v12; // eax + int v13; // eax + int v14; // eax + + if ( a1 > 0x40u ) + { + switch ( a1 ) + { + case 0x200u: + LOWORD(v13) = wctype("punct"); + return v13; + case 0x20Cu: + LOWORD(v3) = wctype("graph"); + return v3; + case 0x100u: + LOWORD(v4) = wctype("cntrl"); + return v4; + case 0x400u: + LOWORD(v14) = wctype("blank"); + return v14; + default: + return 0; + } + } + else + { + v1 = 0; + if ( a1 ) + { + switch ( a1 ) + { + case 1u: + LOWORD(v6) = wctype("upper"); + v1 = v6; + break; + case 2u: + LOWORD(v7) = wctype("lower"); + v1 = v7; + break; + case 4u: + LOWORD(v8) = wctype("alpha"); + v1 = v8; + break; + case 8u: + LOWORD(v9) = wctype("digit"); + v1 = v9; + break; + case 0xCu: + LOWORD(v10) = wctype("alnum"); + v1 = v10; + break; + case 0x10u: + LOWORD(v11) = wctype("xdigit"); + v1 = v11; + break; + case 0x20u: + LOWORD(v12) = wctype("space"); + v1 = v12; + break; + case 0x40u: + LOWORD(v5) = wctype("print"); + v1 = v5; + break; + default: + return 0; + } + } + } + return v1; +} +// 451DF4: variable 'v3' is possibly undefined +// 451E16: variable 'v4' is possibly undefined +// 451E2C: variable 'v5' is possibly undefined +// 451E3C: variable 'v6' is possibly undefined +// 451E4C: variable 'v7' is possibly undefined +// 451E64: variable 'v8' is possibly undefined +// 451E7C: variable 'v9' is possibly undefined +// 451E94: variable 'v10' is possibly undefined +// 451EAC: variable 'v11' is possibly undefined +// 451EC4: variable 'v12' is possibly undefined +// 451EDC: variable 'v13' is possibly undefined +// 451EF9: variable 'v14' is possibly undefined + +//----- (00451F00) -------------------------------------------------------- +unsigned int __thiscall std::ctype::do_is(char *this, wint_t *a2, unsigned int a3, _WORD *a4) +{ + wint_t *v4; // ebx + char *v5; // edi + char *v6; // ebp + __int16 v7; // si + _WORD *v8; // eax + char *v10; // [esp+1Ch] [ebp-20h] + + v4 = a2; + if ( (unsigned int)a2 < a3 ) + { + v5 = this + 686; + v10 = this + 654; + do + { + v6 = v10; + v7 = 0; + do + { + if ( iswctype(*v4, *((_WORD *)v6 + 16)) ) + v7 |= *(_WORD *)v6; + v6 += 2; + } + while ( v6 != v5 ); + v8 = a4; + ++v4; + ++a4; + *v8 = v7; + } + while ( a3 > (unsigned int)v4 ); + } + return a3; +} + +//----- (00451F80) -------------------------------------------------------- +int __thiscall std::ctype::do_is(_WORD *this, unsigned __int16 a2, wint_t C) +{ + _WORD *v3; // esi + _WORD *v4; // ebx + + v3 = this + 343; + v4 = this + 327; + do + { + if ( (*v4 & a2) != 0 && iswctype(C, v4[16]) ) + return 1; + ++v4; + } + while ( v4 != v3 ); + return 0; +} + +//----- (00451FF0) -------------------------------------------------------- +unsigned __int8 *__thiscall std::ctype::do_widen( + _WORD *this, + unsigned __int8 *a2, + unsigned __int8 *a3, + int a4) +{ + unsigned __int8 *v4; // eax + int v7; // ecx + + v4 = a2; + if ( a2 < a3 ) + { + do + { + v7 = *v4++; + a4 += 2; + *(_WORD *)(a4 - 2) = this[v7 + 71]; + } + while ( a3 != v4 ); + } + return a3; +} + +//----- (00452030) -------------------------------------------------------- +int __thiscall std::ctype::do_widen(unsigned __int16 *this, unsigned __int8 a2) +{ + return this[a2 + 71]; +} + +//----- (00452040) -------------------------------------------------------- +unsigned int __thiscall std::ctype::do_narrow(_BYTE *this, wint_t *a2, unsigned int a3, char a4, int a5) +{ + wint_t *v5; // esi + int v6; // ebx + unsigned int v8; // ebp + int v9; // ecx + int v10; // eax + int v12; // eax + + v5 = a2; + v6 = a5; + if ( this[12] ) + { + if ( (unsigned int)a2 < a3 ) + { + v8 = a5 + ((a3 - 1 - (unsigned int)a2) >> 1) + 1; + do + { + while ( 1 ) + { + v9 = *v5; + if ( (unsigned __int16)v9 > 0x7Fu ) + break; + ++v6; + ++v5; + *(_BYTE *)(v6 - 1) = this[v9 + 13]; + if ( v8 == v6 ) + return a3; + } + v10 = wctob(*v5); + if ( v10 == -1 ) + LOBYTE(v10) = a4; + ++v6; + ++v5; + *(_BYTE *)(v6 - 1) = v10; + } + while ( v8 != v6 ); + } + return a3; + } + if ( (unsigned int)a2 >= a3 ) + return a3; + do + { + v12 = wctob(*v5); + if ( v12 == -1 ) + LOBYTE(v12) = a4; + ++v6; + ++v5; + *(_BYTE *)(v6 - 1) = v12; + } + while ( v6 != a5 + ((a3 - 1 - (unsigned int)a2) >> 1) + 1 ); + return a3; +} + +//----- (00452120) -------------------------------------------------------- +int __thiscall std::ctype::do_narrow(_BYTE *this, wint_t WCh, int a3) +{ + int result; // eax + + if ( WCh <= 0x7Fu && this[12] ) + return (unsigned __int8)this[WCh + 13]; + result = wctob(WCh); + if ( result == -1 ) + return a3; + return result; +} + +//----- (00452160) -------------------------------------------------------- +int __fastcall std::locale::id::_M_id(volatile signed __int32 *a1) +{ + int v1; // eax + + v1 = *a1; + if ( *a1 ) + return v1 - 1; + if ( !_CRT_MT ) + { + v1 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v1; + *a1 = v1; + return v1 - 1; + } + _InterlockedCompareExchange(a1, _InterlockedIncrement(&std::locale::id::_S_refcount), 0); + return *a1 - 1; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C5EC: using guessed type int std::locale::id::_S_refcount; + +//----- (004521B0) -------------------------------------------------------- +int *__thiscall std::locale::name[abi:cxx11](int *this, int a2) +{ + int v2; // eax + unsigned int v3; // eax + int v4; // eax + unsigned int v5; // edx + unsigned int v6; // eax + int v7; // eax + unsigned int v8; // edx + unsigned int v9; // eax + int v10; // eax + unsigned int v11; // edx + unsigned int v12; // eax + size_t v14; // eax + const char *v15; // [esp+0h] [ebp-68h] + char *Str; // [esp+14h] [ebp-54h] + int *v17; // [esp+18h] [ebp-50h] + size_t v18; // [esp+1Ch] [ebp-4Ch] + size_t v19; // [esp+1Ch] [ebp-4Ch] + size_t v20; // [esp+1Ch] [ebp-4Ch] + char *Str1; // [esp+20h] [ebp-48h] + char *Str1a; // [esp+20h] [ebp-48h] + char *Str1b; // [esp+20h] [ebp-48h] + char *Str1c; // [esp+20h] [ebp-48h] + char *Str1d; // [esp+20h] [ebp-48h] + char *Str1e; // [esp+20h] [ebp-48h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-44h] + struct _Unwind_Exception *lpuexcpta; // [esp+24h] [ebp-44h] + struct _Unwind_Exception *lpuexcptb; // [esp+24h] [ebp-44h] + int lpuexcptc; // [esp+24h] [ebp-44h] + + this[1] = 0; + *this = (int)(this + 2); + *((_BYTE *)this + 8) = 0; + v17 = this + 2; + v18 = *(_DWORD *)(*(_DWORD *)a2 + 16); + Str = *(char **)v18; + if ( *(_DWORD *)v18 ) + { + if ( *(_DWORD *)(v18 + 4) ) + { + lpuexcpt = 0; + Str1 = *(char **)v18; + while ( 1 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v15 = Str1; + Str1 = *(char **)(v18 + 4 * (_DWORD)lpuexcpt); + v2 = strcmp(v15, Str1); + if ( (unsigned int)lpuexcpt > 4 ) + break; + if ( v2 ) + goto LABEL_6; + } + if ( !v2 ) + goto LABEL_26; +LABEL_6: + std::string::reserve(this, 0x80u); + v3 = strlen(*std::locale::_S_categories); + if ( v3 > 0x3FFFFFFF - this[1] ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(this, *std::locale::_S_categories, v3); + Str1a = (char *)this[1]; + lpuexcpta = (struct _Unwind_Exception *)(Str1a + 1); + v4 = *this; + if ( v17 == (int *)*this ) + v5 = 15; + else + v5 = this[2]; + if ( (unsigned int)lpuexcpta > v5 ) + { + std::string::_M_mutate((int)this, (size_t)Str1a, 0, 0, 1u); + v4 = *this; + } + Str1a[v4] = 61; + this[1] = (int)lpuexcpta; + Str1a[*this + 1] = 0; + lpuexcptb = **(struct _Unwind_Exception ***)(*(_DWORD *)a2 + 16); + v6 = strlen((const char *)lpuexcptb); + if ( v6 > 0x3FFFFFFF - this[1] ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(this, lpuexcptb, v6); + for ( lpuexcptc = 1; lpuexcptc != 6; ++lpuexcptc ) + { + v19 = this[1]; + Str1b = (char *)(v19 + 1); + v7 = *this; + if ( v17 == (int *)*this ) + v8 = 15; + else + v8 = this[2]; + if ( (unsigned int)Str1b > v8 ) + { + std::string::_M_mutate((int)this, v19, 0, 0, 1u); + v7 = *this; + } + *(_BYTE *)(v7 + v19) = 59; + this[1] = (int)Str1b; + *(_BYTE *)(*this + v19 + 1) = 0; + Str1c = std::locale::_S_categories[lpuexcptc]; + v9 = strlen(Str1c); + if ( v9 > 0x3FFFFFFF - this[1] ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(this, Str1c, v9); + v10 = *this; + v20 = this[1]; + Str1d = (char *)(v20 + 1); + if ( v17 == (int *)*this ) + v11 = 15; + else + v11 = this[2]; + if ( (unsigned int)Str1d > v11 ) + { + std::string::_M_mutate((int)this, v20, 0, 0, 1u); + v10 = *this; + } + *(_BYTE *)(v10 + v20) = 61; + this[1] = (int)Str1d; + *(_BYTE *)(*this + v20 + 1) = 0; + Str1e = *(char **)(*(_DWORD *)(*(_DWORD *)a2 + 16) + lpuexcptc * 4); + v12 = strlen(Str1e); + if ( v12 > 0x3FFFFFFF - this[1] ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(this, Str1e, v12); + } + } + else + { +LABEL_26: + v14 = strlen(Str); + std::string::_M_replace((unsigned int **)this, 0, 0, Str, v14); + } + } + else + { + std::string::_M_replace_aux(this, 0, 0, 1u, 42); + } + return this; +} +// 5154AC: using guessed type char **std::locale::_S_categories; + +//----- (00452650) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +int *__thiscall std::locale::name(int *ecx0, std::locale *this) +{ + _DWORD *v2; // eax + int v3; // edx + int v4; // eax + size_t v5; // eax + int v6; // eax + size_t v7; // eax + int v8; // eax + size_t v9; // eax + int v10; // eax + size_t v11; // eax + size_t v13; // eax + const char *v14; // [esp-4h] [ebp-7Ch] + unsigned int v15; // [esp+0h] [ebp-78h] + unsigned int v16; // [esp+0h] [ebp-78h] + unsigned int v17; // [esp+0h] [ebp-78h] + unsigned int v18; // [esp+0h] [ebp-78h] + unsigned int v19; // [esp+4h] [ebp-74h] + unsigned int v20; // [esp+4h] [ebp-74h] + unsigned int v21; // [esp+4h] [ebp-74h] + char v22; // [esp+Ch] [ebp-6Ch] + char *Str; // [esp+18h] [ebp-60h] + int v24; // [esp+1Ch] [ebp-5Ch] + int v25; // [esp+1Ch] [ebp-5Ch] + int v26; // [esp+1Ch] [ebp-5Ch] + char *Str1; // [esp+20h] [ebp-58h] + char *Str1a; // [esp+20h] [ebp-58h] + char *Str1b; // [esp+20h] [ebp-58h] + char *Str1d; // [esp+20h] [ebp-58h] + char *Str1c; // [esp+20h] [ebp-58h] + char *Str1e; // [esp+20h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-54h] + struct _Unwind_Exception *lpuexcpta; // [esp+24h] [ebp-54h] + struct _Unwind_Exception *lpuexcptc; // [esp+24h] [ebp-54h] + int lpuexcptb; // [esp+24h] [ebp-54h] + unsigned int v38[2]; // [esp+6Fh] [ebp-9h] BYREF + + v2 = std::string::_S_construct(0, 0); + v3 = *(_DWORD *)this; + *ecx0 = (int)v2; + v24 = *(_DWORD *)(v3 + 16); + Str = *(char **)v24; + if ( *(_DWORD *)v24 ) + { + if ( *(_DWORD *)(v24 + 4) ) + { + lpuexcpt = 0; + Str1 = *(char **)v24; + while ( 1 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v14 = Str1; + Str1 = *(char **)(v24 + 4 * (_DWORD)lpuexcpt); + v4 = strcmp(v14, Str1); + if ( (unsigned int)lpuexcpt > 4 ) + break; + if ( v4 ) + goto LABEL_6; + } + if ( !v4 ) + goto LABEL_19; +LABEL_6: + std::string::reserve(ecx0, (std::string *)0x80, v15); + v5 = strlen(*std::locale::_S_categories); + std::string::append((unsigned int *)ecx0, (std::string *)*std::locale::_S_categories, v5, (unsigned int)v38); + Str1a = *(char **)(*ecx0 - 12); + lpuexcpta = (struct _Unwind_Exception *)(Str1a + 1); + if ( (unsigned int)(Str1a + 1) > *(_DWORD *)(*ecx0 - 8) || *(int *)(*ecx0 - 4) > 0 ) + std::string::reserve(ecx0, lpuexcpta, v16); + *(_BYTE *)(*ecx0 + *(_DWORD *)(*ecx0 - 12)) = 61; + v6 = *ecx0; + *(_DWORD *)(v6 - 12) = lpuexcpta; + *(_DWORD *)(v6 - 4) = 0; + Str1a[v6 + 1] = 0; + lpuexcptc = **(struct _Unwind_Exception ***)(*(_DWORD *)this + 16); + v7 = strlen((const char *)lpuexcptc); + std::string::append((unsigned int *)ecx0, lpuexcptc, v7, v19); + for ( lpuexcptb = 1; lpuexcptb != 6; ++lpuexcptb ) + { + v25 = *(_DWORD *)(*ecx0 - 12); + Str1b = (char *)(v25 + 1); + if ( (unsigned int)(v25 + 1) > *(_DWORD *)(*ecx0 - 8) || *(int *)(*ecx0 - 4) > 0 ) + std::string::reserve(ecx0, (std::string *)Str1b, v17); + *(_BYTE *)(*ecx0 + *(_DWORD *)(*ecx0 - 12)) = 59; + v8 = *ecx0; + *(_DWORD *)(v8 - 12) = Str1b; + *(_DWORD *)(v8 - 4) = 0; + *(_BYTE *)(v8 + v25 + 1) = 0; + Str1d = std::locale::_S_categories[lpuexcptb]; + v9 = strlen(Str1d); + std::string::append((unsigned int *)ecx0, (std::string *)Str1d, v9, v20); + v26 = *(_DWORD *)(*ecx0 - 12); + Str1c = (char *)(v26 + 1); + if ( (unsigned int)(v26 + 1) > *(_DWORD *)(*ecx0 - 8) || *(int *)(*ecx0 - 4) > 0 ) + std::string::reserve(ecx0, (std::string *)Str1c, v18); + *(_BYTE *)(*ecx0 + *(_DWORD *)(*ecx0 - 12)) = 61; + v10 = *ecx0; + *(_DWORD *)(v10 - 12) = Str1c; + *(_DWORD *)(v10 - 4) = 0; + *(_BYTE *)(v10 + v26 + 1) = 0; + Str1e = *(char **)(*(_DWORD *)(*(_DWORD *)this + 16) + lpuexcptb * 4); + v11 = strlen(Str1e); + std::string::append((unsigned int *)ecx0, (std::string *)Str1e, v11, v21); + } + } + else + { +LABEL_19: + v13 = strlen(Str); + std::string::assign((char **)ecx0, (std::string *)Str, v13, (unsigned int)v38); + } + } + else + { + std::string::_M_replace_aux((char **)ecx0, 0, *(v2 - 3), 1u, 42, v22); + } + return ecx0; +} +// 4529A6: positive sp value 4 has been found +// 45271E: variable 'v15' is possibly undefined +// 45277B: variable 'v16' is possibly undefined +// 4527CF: variable 'v19' is possibly undefined +// 45280B: variable 'v17' is possibly undefined +// 452860: variable 'v20' is possibly undefined +// 452895: variable 'v18' is possibly undefined +// 4528ED: variable 'v21' is possibly undefined +// 452980: variable 'v22' is possibly undefined +// 5154AC: using guessed type char **std::locale::_S_categories; + +//----- (004529C0) -------------------------------------------------------- +_DWORD *__userpurge std::locale::facet::_M_cow_shim@( + volatile signed __int32 *a1@, + std::locale::facet *this, + const std::locale::id *a3) +{ + void *v3; // eax + _WORD *v5; // eax + _DWORD *v6; // eax + int v7; // ecx + _DWORD *v8; // eax + _DWORD *v9; // eax + _DWORD *v10; // eax + int c_locale; // eax + int v12; // edx + _DWORD *v13; // eax + _DWORD *v14; // eax + _WORD *v15; // eax + _DWORD *v16; // eax + int v17; // ecx + _WORD *v18; // eax + _DWORD *v19; // eax + int v20; // ecx + int v21; // edx + _DWORD *v22; // eax + _DWORD *v23; // eax + _DWORD *v24; // eax + _DWORD *v25; // eax + _DWORD *v26; // eax + _DWORD *v27; // eax + _DWORD *v28; // eax + int v29; // ecx + _DWORD *v30; // eax + _DWORD *v31; // eax + int v32; // edx + int v33; // [esp+0h] [ebp-78h] + int v34; // [esp+0h] [ebp-78h] + int v35; // [esp+0h] [ebp-78h] + int v36; // [esp+0h] [ebp-78h] + int v37; // [esp+0h] [ebp-78h] + int v38; // [esp+0h] [ebp-78h] + int v39; // [esp+30h] [ebp-48h] + int v40; // [esp+30h] [ebp-48h] + int v41; // [esp+30h] [ebp-48h] + int v42; // [esp+30h] [ebp-48h] + int v43; // [esp+30h] [ebp-48h] + int v44; // [esp+30h] [ebp-48h] + _DWORD *Block; // [esp+34h] [ebp-44h] + + v3 = __dynamic_cast( + (const void *)a1, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet::__shim, + -2); + if ( v3 ) + return *(_DWORD **)v3; + if ( this == (std::locale::facet *)&std::numpunct::id ) + { + v5 = operator new(0x68u); + v5[18] = 0; + *((_DWORD *)v5 + 1) = 0; + *(_DWORD *)v5 = &off_51AF60; + *((_DWORD *)v5 + 2) = 0; + *((_DWORD *)v5 + 3) = 0; + *((_BYTE *)v5 + 16) = 0; + *((_DWORD *)v5 + 5) = 0; + *((_DWORD *)v5 + 6) = 0; + *((_DWORD *)v5 + 7) = 0; + *((_DWORD *)v5 + 8) = 0; + *((_BYTE *)v5 + 100) = 0; + v39 = (int)v5; + v6 = operator new(0x14u); + v6[1] = 0; + *v6 = &off_51B6FC; + Block = v6; + v6[2] = v39; + std::numpunct::_M_initialize_numpunct(v6, 0); + v7 = _CRT_MT; + Block[3] = a1; + if ( v7 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519E00; + Block[4] = v39; + LOBYTE(v33) = 0; + std::__facet_shims::__numpunct_fill_cache(v33, (int *)a1, v39); + } + else if ( this == (std::locale::facet *)&std::collate::id ) + { + v10 = operator new(0x10u); + v10[1] = 0; + *v10 = &off_51B590; + Block = v10; + c_locale = std::locale::facet::_S_get_c_locale(); + v12 = _CRT_MT; + Block[2] = c_locale; + Block[3] = a1; + if ( v12 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519D20; + } + else if ( this == (std::locale::facet *)&std::time_get>::id ) + { + v8 = operator new(0xCu); + Block = v8; + v8[1] = 0; + *v8 = &off_51B744; + v8[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v8 = &off_519E90; + } + else if ( this == (std::locale::facet *)&std::money_get>::id ) + { + v13 = operator new(0xCu); + Block = v13; + v13[1] = 0; + *v13 = &off_51B804; + v13[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v13 = &off_519F38; + } + else if ( this == (std::locale::facet *)&std::money_put>::id ) + { + v14 = operator new(0xCu); + Block = v14; + v14[1] = 0; + *v14 = &off_51B834; + v14[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v14 = &off_519F98; + } + else if ( this == (std::locale::facet *)&std::moneypunct::id ) + { + v15 = operator new(0x44u); + v15[8] = 0; + *(_DWORD *)v15 = &off_51B094; + *((_DWORD *)v15 + 1) = 0; + *((_DWORD *)v15 + 2) = 0; + *((_DWORD *)v15 + 3) = 0; + *((_BYTE *)v15 + 18) = 0; + *((_DWORD *)v15 + 5) = 0; + *((_DWORD *)v15 + 6) = 0; + *((_DWORD *)v15 + 7) = 0; + *((_DWORD *)v15 + 8) = 0; + *((_DWORD *)v15 + 9) = 0; + *((_DWORD *)v15 + 10) = 0; + *((_DWORD *)v15 + 11) = 0; + *((_DWORD *)v15 + 12) = 0; + *((_DWORD *)v15 + 13) = 0; + *((_BYTE *)v15 + 67) = 0; + v40 = (int)v15; + v16 = operator new(0x14u); + v16[1] = 0; + *v16 = &off_51A884; + Block = v16; + v16[2] = v40; + std::moneypunct::_M_initialize_moneypunct(v16, 0, 0); + v17 = _CRT_MT; + Block[3] = a1; + if ( v17 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_51A060; + Block[4] = v40; + LOBYTE(v34) = 0; + std::__facet_shims::__moneypunct_fill_cache(v34, (int *)a1, v40); + } + else if ( this == (std::locale::facet *)&std::moneypunct::id ) + { + v18 = operator new(0x44u); + v18[8] = 0; + *(_DWORD *)v18 = &off_51B084; + *((_DWORD *)v18 + 1) = 0; + *((_DWORD *)v18 + 2) = 0; + *((_DWORD *)v18 + 3) = 0; + *((_BYTE *)v18 + 18) = 0; + *((_DWORD *)v18 + 5) = 0; + *((_DWORD *)v18 + 6) = 0; + *((_DWORD *)v18 + 7) = 0; + *((_DWORD *)v18 + 8) = 0; + *((_DWORD *)v18 + 9) = 0; + *((_DWORD *)v18 + 10) = 0; + *((_DWORD *)v18 + 11) = 0; + *((_DWORD *)v18 + 12) = 0; + *((_DWORD *)v18 + 13) = 0; + *((_BYTE *)v18 + 67) = 0; + v41 = (int)v18; + v19 = operator new(0x14u); + v19[1] = 0; + *v19 = &off_51A850; + Block = v19; + v19[2] = v41; + std::moneypunct::_M_initialize_moneypunct(v19, 0, 0); + v20 = _CRT_MT; + Block[3] = a1; + if ( v20 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519FF8; + Block[4] = v41; + LOBYTE(v35) = 0; + std::__facet_shims::__moneypunct_fill_cache(v35, (int *)a1, v41); + } + else if ( this == (std::locale::facet *)&std::messages::id ) + { + Block = operator new(0x14u); + std::messages::messages(Block, 0); + v21 = _CRT_MT; + Block[4] = a1; + if ( v21 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519D90; + } + else if ( this == (std::locale::facet *)&std::numpunct::id ) + { + v22 = operator new(0xA8u); + v22[1] = 0; + *v22 = &off_51AF70; + v22[2] = 0; + v22[3] = 0; + *((_BYTE *)v22 + 16) = 0; + v22[5] = 0; + v22[6] = 0; + v22[7] = 0; + v22[8] = 0; + v22[9] = 0; + *((_BYTE *)v22 + 164) = 0; + v42 = (int)v22; + v23 = operator new(0x14u); + v23[1] = 0; + *v23 = &off_51B720; + Block = v23; + v23[2] = v42; + std::numpunct::_M_initialize_numpunct(v23, 0); + Block[3] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519E48; + Block[4] = v42; + LOBYTE(v36) = 0; + std::__facet_shims::__numpunct_fill_cache(v36, (int *)a1, v42); + } + else if ( this == (std::locale::facet *)&std::collate::id ) + { + v9 = operator new(0x10u); + v9[1] = 0; + *v9 = &off_51B5AC; + Block = v9; + v9[2] = std::locale::facet::_S_get_c_locale(); + Block[3] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519D58; + } + else if ( this == (std::locale::facet *)&std::time_get>::id ) + { + v24 = operator new(0xCu); + Block = v24; + v24[1] = 0; + *v24 = &off_51B76C; + v24[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v24 = &off_519EE4; + } + else if ( this == (std::locale::facet *)&std::money_get>::id ) + { + v25 = operator new(0xCu); + Block = v25; + v25[1] = 0; + *v25 = &off_51B81C; + v25[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v25 = &off_519F68; + } + else if ( this == (std::locale::facet *)std::money_put>::id ) + { + v26 = operator new(0xCu); + Block = v26; + v26[1] = 0; + *v26 = &off_51B84C; + v26[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v26 = &off_519FC8; + } + else if ( this == (std::locale::facet *)&std::moneypunct::id ) + { + v27 = operator new(0x54u); + v27[1] = 0; + *v27 = &off_51B0B4; + v27[2] = 0; + v27[3] = 0; + *((_BYTE *)v27 + 16) = 0; + *(_DWORD *)((char *)v27 + 18) = 0; + v27[6] = 0; + v27[7] = 0; + v27[8] = 0; + v27[9] = 0; + v27[10] = 0; + v27[11] = 0; + v27[12] = 0; + v27[13] = 0; + v27[14] = 0; + *((_BYTE *)v27 + 82) = 0; + v43 = (int)v27; + v28 = operator new(0x14u); + v28[1] = 0; + *v28 = &off_51A8EC; + Block = v28; + v28[2] = v43; + std::moneypunct::_M_initialize_moneypunct(v28, 0, 0); + v29 = _CRT_MT; + Block[3] = a1; + if ( v29 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_51A130; + Block[4] = v43; + LOBYTE(v37) = 0; + std::__facet_shims::__moneypunct_fill_cache(v37, (int *)a1, v43); + } + else if ( this == (std::locale::facet *)&std::moneypunct::id ) + { + v30 = operator new(0x54u); + v30[1] = 0; + *v30 = &off_51B0A4; + v30[2] = 0; + v30[3] = 0; + *((_BYTE *)v30 + 16) = 0; + *(_DWORD *)((char *)v30 + 18) = 0; + v30[6] = 0; + v30[7] = 0; + v30[8] = 0; + v30[9] = 0; + v30[10] = 0; + v30[11] = 0; + v30[12] = 0; + v30[13] = 0; + v30[14] = 0; + *((_BYTE *)v30 + 82) = 0; + v44 = (int)v30; + v31 = operator new(0x14u); + v31[1] = 0; + *v31 = &off_51A8B8; + Block = v31; + v31[2] = v44; + std::moneypunct::_M_initialize_moneypunct(v31, 0, 0); + v32 = _CRT_MT; + Block[3] = a1; + if ( v32 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_51A0C8; + Block[4] = v44; + LOBYTE(v38) = 0; + std::__facet_shims::__moneypunct_fill_cache(v38, (int *)a1, v44); + } + else + { + if ( this != (std::locale::facet *)&std::messages::id ) + std::__throw_logic_error((std::logic_error *)"cannot create shim for unknown locale::facet"); + Block = operator new(0x14u); + std::messages::messages(Block, 0); + Block[4] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519DC8; + } + return Block; +} +// 452C3D: variable 'v33' is possibly undefined +// 452F18: variable 'v34' is possibly undefined +// 453030: variable 'v35' is possibly undefined +// 45317E: variable 'v36' is possibly undefined +// 45339A: variable 'v37' is possibly undefined +// 4534B8: variable 'v38' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C48C: using guessed type signed __int32 std::moneypunct::id; +// 50C490: using guessed type signed __int32 std::moneypunct::id; +// 50C494: using guessed type signed __int32 std::moneypunct::id; +// 50C498: using guessed type signed __int32 std::moneypunct::id; +// 50C660: using guessed type signed __int32 std::collate::id; +// 50C664: using guessed type signed __int32 std::collate::id; +// 50C680: using guessed type signed __int32 std::messages::id; +// 50C684: using guessed type signed __int32 std::messages::id; +// 50C688: using guessed type signed __int32 std::numpunct::id; +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 50C690: using guessed type signed __int32 std::time_get>::id; +// 50C694: using guessed type signed __int32 std::time_get>::id; +// 50C6A0: using guessed type signed __int32 std::money_get>::id; +// 50C6A4: using guessed type signed __int32 std::money_get>::id; +// 50C6A8: using guessed type signed __int32 std::money_put>::id; +// 50C6AC: using guessed type signed __int32 std::money_put>::id[5]; +// 5160E8: using guessed type int *`typeinfo for'std::locale::facet::__shim; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 519D20: using guessed type int (*off_519D20)(); +// 519D58: using guessed type int (*off_519D58)(); +// 519D90: using guessed type int (*off_519D90)(); +// 519DC8: using guessed type int (*off_519DC8)(); +// 519E00: using guessed type int (*off_519E00)(); +// 519E48: using guessed type int (*off_519E48)(); +// 519E90: using guessed type int (*off_519E90)(); +// 519EE4: using guessed type int (*off_519EE4)(); +// 519F38: using guessed type int (*off_519F38)(); +// 519F68: using guessed type int (*off_519F68)(); +// 519F98: using guessed type int (*off_519F98)(); +// 519FC8: using guessed type int (*off_519FC8)(); +// 519FF8: using guessed type int (*off_519FF8)(); +// 51A060: using guessed type int (*off_51A060)(); +// 51A0C8: using guessed type int (*off_51A0C8)(); +// 51A130: using guessed type int (*off_51A130)(); +// 51A850: using guessed type int (*off_51A850)(); +// 51A884: using guessed type int (*off_51A884)(); +// 51A8B8: using guessed type int (*off_51A8B8)(); +// 51A8EC: using guessed type int (*off_51A8EC)(); +// 51AF60: using guessed type int (*off_51AF60)(); +// 51AF70: using guessed type int (*off_51AF70)(); +// 51B084: using guessed type int (*off_51B084)(); +// 51B094: using guessed type int (*off_51B094)(); +// 51B0A4: using guessed type int (*off_51B0A4)(); +// 51B0B4: using guessed type int (*off_51B0B4)(); +// 51B590: using guessed type int (*off_51B590)(); +// 51B5AC: using guessed type int (*off_51B5AC)(); +// 51B6FC: using guessed type int (*off_51B6FC)(); +// 51B720: using guessed type int (*off_51B720)(); +// 51B744: using guessed type int (*off_51B744)(); +// 51B76C: using guessed type int (*off_51B76C)(); +// 51B804: using guessed type int (*off_51B804)(); +// 51B81C: using guessed type int (*off_51B81C)(); +// 51B834: using guessed type int (*off_51B834)(); +// 51B84C: using guessed type int (*off_51B84C)(); + +//----- (00453660) -------------------------------------------------------- +_DWORD *__userpurge std::locale::facet::_M_sso_shim@( + volatile signed __int32 *a1@, + std::locale::facet *this, + const std::locale::id *a3) +{ + void *v3; // eax + _WORD *v5; // eax + _DWORD *v6; // eax + int v7; // ecx + _DWORD *v8; // eax + _DWORD *v9; // eax + _DWORD *v10; // eax + int c_locale; // eax + int v12; // edx + _DWORD *v13; // eax + _DWORD *v14; // eax + _WORD *v15; // eax + _DWORD *v16; // eax + int v17; // ecx + _WORD *v18; // eax + _DWORD *v19; // eax + int v20; // ecx + int v21; // edx + _DWORD *v22; // eax + _DWORD *v23; // eax + _DWORD *v24; // eax + _DWORD *v25; // eax + _DWORD *v26; // eax + _DWORD *v27; // eax + _DWORD *v28; // eax + int v29; // ecx + _DWORD *v30; // eax + _DWORD *v31; // eax + int v32; // edx + int v33; // [esp+0h] [ebp-78h] + int v34; // [esp+0h] [ebp-78h] + int v35; // [esp+0h] [ebp-78h] + int v36; // [esp+0h] [ebp-78h] + int v37; // [esp+0h] [ebp-78h] + int v38; // [esp+0h] [ebp-78h] + int v39; // [esp+30h] [ebp-48h] + int v40; // [esp+30h] [ebp-48h] + int v41; // [esp+30h] [ebp-48h] + int v42; // [esp+30h] [ebp-48h] + int v43; // [esp+30h] [ebp-48h] + int v44; // [esp+30h] [ebp-48h] + _DWORD *Block; // [esp+34h] [ebp-44h] + + v3 = __dynamic_cast( + (const void *)a1, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet::__shim, + -2); + if ( v3 ) + return *(_DWORD **)v3; + if ( this == (std::locale::facet *)&std::numpunct::id ) + { + v5 = operator new(0x68u); + v5[18] = 0; + *((_DWORD *)v5 + 1) = 0; + *(_DWORD *)v5 = &off_51AF60; + *((_DWORD *)v5 + 2) = 0; + *((_DWORD *)v5 + 3) = 0; + *((_BYTE *)v5 + 16) = 0; + *((_DWORD *)v5 + 5) = 0; + *((_DWORD *)v5 + 6) = 0; + *((_DWORD *)v5 + 7) = 0; + *((_DWORD *)v5 + 8) = 0; + *((_BYTE *)v5 + 100) = 0; + v39 = (int)v5; + v6 = operator new(0x14u); + v6[1] = 0; + *v6 = &off_51A688; + Block = v6; + v6[2] = v39; + std::numpunct::_M_initialize_numpunct(v6, 0); + v7 = _CRT_MT; + Block[3] = a1; + if ( v7 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519E24; + Block[4] = v39; + LOBYTE(v33) = 0; + std::__facet_shims::__numpunct_fill_cache(v33, (int *)a1, v39); + } + else if ( this == (std::locale::facet *)&std::collate::id ) + { + v10 = operator new(0x10u); + v10[1] = 0; + *v10 = &off_51A618; + Block = v10; + c_locale = std::locale::facet::_S_get_c_locale(); + v12 = _CRT_MT; + Block[2] = c_locale; + Block[3] = a1; + if ( v12 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519D3C; + } + else if ( this == (std::locale::facet *)&std::time_get>::id ) + { + v8 = operator new(0xCu); + Block = v8; + v8[1] = 0; + *v8 = &off_51A6D0; + v8[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v8 = &off_519EB8; + } + else if ( this == (std::locale::facet *)&std::money_get>::id ) + { + v13 = operator new(0xCu); + Block = v13; + v13[1] = 0; + *v13 = &off_51A728; + v13[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v13 = &off_519F50; + } + else if ( this == (std::locale::facet *)&std::money_put>::id ) + { + v14 = operator new(0xCu); + Block = v14; + v14[1] = 0; + *v14 = &off_51A758; + v14[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v14 = &off_519FB0; + } + else if ( this == (std::locale::facet *)&std::moneypunct::id ) + { + v15 = operator new(0x44u); + v15[8] = 0; + *(_DWORD *)v15 = &off_51B094; + *((_DWORD *)v15 + 1) = 0; + *((_DWORD *)v15 + 2) = 0; + *((_DWORD *)v15 + 3) = 0; + *((_BYTE *)v15 + 18) = 0; + *((_DWORD *)v15 + 5) = 0; + *((_DWORD *)v15 + 6) = 0; + *((_DWORD *)v15 + 7) = 0; + *((_DWORD *)v15 + 8) = 0; + *((_DWORD *)v15 + 9) = 0; + *((_DWORD *)v15 + 10) = 0; + *((_DWORD *)v15 + 11) = 0; + *((_DWORD *)v15 + 12) = 0; + *((_DWORD *)v15 + 13) = 0; + *((_BYTE *)v15 + 67) = 0; + v40 = (int)v15; + v16 = operator new(0x14u); + v16[1] = 0; + *v16 = &off_51A204; + Block = v16; + v16[2] = v40; + std::moneypunct::_M_initialize_moneypunct(v16, 0, 0); + v17 = _CRT_MT; + Block[3] = a1; + if ( v17 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_51A094; + Block[4] = v40; + LOBYTE(v34) = 0; + std::__facet_shims::__moneypunct_fill_cache(v34, (int *)a1, v40); + } + else if ( this == (std::locale::facet *)&std::moneypunct::id ) + { + v18 = operator new(0x44u); + v18[8] = 0; + *(_DWORD *)v18 = &off_51B084; + *((_DWORD *)v18 + 1) = 0; + *((_DWORD *)v18 + 2) = 0; + *((_DWORD *)v18 + 3) = 0; + *((_BYTE *)v18 + 18) = 0; + *((_DWORD *)v18 + 5) = 0; + *((_DWORD *)v18 + 6) = 0; + *((_DWORD *)v18 + 7) = 0; + *((_DWORD *)v18 + 8) = 0; + *((_DWORD *)v18 + 9) = 0; + *((_DWORD *)v18 + 10) = 0; + *((_DWORD *)v18 + 11) = 0; + *((_DWORD *)v18 + 12) = 0; + *((_DWORD *)v18 + 13) = 0; + *((_BYTE *)v18 + 67) = 0; + v41 = (int)v18; + v19 = operator new(0x14u); + v19[1] = 0; + *v19 = &off_51A1D0; + Block = v19; + v19[2] = v41; + std::moneypunct::_M_initialize_moneypunct(v19, 0, 0); + v20 = _CRT_MT; + Block[3] = a1; + if ( v20 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_51A02C; + Block[4] = v41; + LOBYTE(v35) = 0; + std::__facet_shims::__moneypunct_fill_cache(v35, (int *)a1, v41); + } + else if ( this == (std::locale::facet *)&std::messages::id ) + { + Block = operator new(0x14u); + std::messages::messages(Block, 0); + v21 = _CRT_MT; + Block[4] = a1; + if ( v21 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519DAC; + } + else if ( this == (std::locale::facet *)&std::numpunct::id ) + { + v22 = operator new(0xA8u); + v22[1] = 0; + *v22 = &off_51AF70; + v22[2] = 0; + v22[3] = 0; + *((_BYTE *)v22 + 16) = 0; + v22[5] = 0; + v22[6] = 0; + v22[7] = 0; + v22[8] = 0; + v22[9] = 0; + *((_BYTE *)v22 + 164) = 0; + v42 = (int)v22; + v23 = operator new(0x14u); + v23[1] = 0; + *v23 = &off_51A6AC; + Block = v23; + v23[2] = v42; + std::numpunct::_M_initialize_numpunct(v23, 0); + Block[3] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519E6C; + Block[4] = v42; + LOBYTE(v36) = 0; + std::__facet_shims::__numpunct_fill_cache(v36, (int *)a1, v42); + } + else if ( this == (std::locale::facet *)&std::collate::id ) + { + v9 = operator new(0x10u); + v9[1] = 0; + *v9 = &off_51A634; + Block = v9; + v9[2] = std::locale::facet::_S_get_c_locale(); + Block[3] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519D74; + } + else if ( this == (std::locale::facet *)&std::time_get>::id ) + { + v24 = operator new(0xCu); + Block = v24; + v24[1] = 0; + *v24 = &off_51A6FC; + v24[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v24 = &off_519F0C; + } + else if ( this == (std::locale::facet *)&std::money_get>::id ) + { + v25 = operator new(0xCu); + Block = v25; + v25[1] = 0; + *v25 = &off_51A740; + v25[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v25 = &off_519F80; + } + else if ( this == (std::locale::facet *)&std::money_put>::id ) + { + v26 = operator new(0xCu); + Block = v26; + v26[1] = 0; + *v26 = &off_51A770; + v26[2] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *v26 = &off_519FE0; + } + else if ( this == (std::locale::facet *)&std::moneypunct::id ) + { + v27 = operator new(0x54u); + v27[1] = 0; + *v27 = &off_51B0B4; + v27[2] = 0; + v27[3] = 0; + *((_BYTE *)v27 + 16) = 0; + *(_DWORD *)((char *)v27 + 18) = 0; + v27[6] = 0; + v27[7] = 0; + v27[8] = 0; + v27[9] = 0; + v27[10] = 0; + v27[11] = 0; + v27[12] = 0; + v27[13] = 0; + v27[14] = 0; + *((_BYTE *)v27 + 82) = 0; + v43 = (int)v27; + v28 = operator new(0x14u); + v28[1] = 0; + *v28 = &off_51A26C; + Block = v28; + v28[2] = v43; + std::moneypunct::_M_initialize_moneypunct(v28, 0, 0); + v29 = _CRT_MT; + Block[3] = a1; + if ( v29 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_51A164; + Block[4] = v43; + LOBYTE(v37) = 0; + std::__facet_shims::__moneypunct_fill_cache(v37, (int *)a1, v43); + } + else if ( this == (std::locale::facet *)&std::moneypunct::id ) + { + v30 = operator new(0x54u); + v30[1] = 0; + *v30 = &off_51B0A4; + v30[2] = 0; + v30[3] = 0; + *((_BYTE *)v30 + 16) = 0; + *(_DWORD *)((char *)v30 + 18) = 0; + v30[6] = 0; + v30[7] = 0; + v30[8] = 0; + v30[9] = 0; + v30[10] = 0; + v30[11] = 0; + v30[12] = 0; + v30[13] = 0; + v30[14] = 0; + *((_BYTE *)v30 + 82) = 0; + v44 = (int)v30; + v31 = operator new(0x14u); + v31[1] = 0; + *v31 = &off_51A238; + Block = v31; + v31[2] = v44; + std::moneypunct::_M_initialize_moneypunct(v31, 0, 0); + v32 = _CRT_MT; + Block[3] = a1; + if ( v32 ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_51A0FC; + Block[4] = v44; + LOBYTE(v38) = 0; + std::__facet_shims::__moneypunct_fill_cache(v38, (int *)a1, v44); + } + else + { + if ( this != (std::locale::facet *)&std::messages::id ) + std::__throw_logic_error((std::logic_error *)"cannot create shim for unknown locale::facet"); + Block = operator new(0x14u); + std::messages::messages(Block, 0); + Block[4] = a1; + if ( _CRT_MT ) + _InterlockedAdd(a1 + 1, 1u); + else + ++*((_DWORD *)a1 + 1); + *Block = &off_519DE4; + } + return Block; +} +// 4538DD: variable 'v33' is possibly undefined +// 453BB8: variable 'v34' is possibly undefined +// 453CD0: variable 'v35' is possibly undefined +// 453E1E: variable 'v36' is possibly undefined +// 45403A: variable 'v37' is possibly undefined +// 454158: variable 'v38' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C608: using guessed type signed __int32 std::moneypunct::id; +// 50C60C: using guessed type signed __int32 std::moneypunct::id; +// 50C610: using guessed type signed __int32 std::moneypunct::id; +// 50C614: using guessed type signed __int32 std::moneypunct::id; +// 50C618: using guessed type signed __int32 std::collate::id; +// 50C61C: using guessed type signed __int32 std::collate::id; +// 50C620: using guessed type signed __int32 std::messages::id; +// 50C624: using guessed type signed __int32 std::messages::id; +// 50C628: using guessed type signed __int32 std::numpunct::id; +// 50C62C: using guessed type signed __int32 std::numpunct::id; +// 50C630: using guessed type signed __int32 std::time_get>::id; +// 50C634: using guessed type signed __int32 std::time_get>::id; +// 50C638: using guessed type signed __int32 std::money_get>::id; +// 50C63C: using guessed type signed __int32 std::money_get>::id; +// 50C640: using guessed type signed __int32 std::money_put>::id; +// 50C644: using guessed type signed __int32 std::money_put>::id; +// 5160E8: using guessed type int *`typeinfo for'std::locale::facet::__shim; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 519D3C: using guessed type int (*off_519D3C)(); +// 519D74: using guessed type int (*off_519D74)(); +// 519DAC: using guessed type int (*off_519DAC)(); +// 519DE4: using guessed type int (*off_519DE4)(); +// 519E24: using guessed type int (*off_519E24)(); +// 519E6C: using guessed type int (*off_519E6C)(); +// 519EB8: using guessed type int (*off_519EB8)(); +// 519F0C: using guessed type int (*off_519F0C)(); +// 519F50: using guessed type int (*off_519F50)(); +// 519F80: using guessed type int (*off_519F80)(); +// 519FB0: using guessed type int (*off_519FB0)(); +// 519FE0: using guessed type int (*off_519FE0)(); +// 51A02C: using guessed type int (*off_51A02C)(); +// 51A094: using guessed type int (*off_51A094)(); +// 51A0FC: using guessed type int (*off_51A0FC)(); +// 51A164: using guessed type int (*off_51A164)(); +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A618: using guessed type int (*off_51A618)(); +// 51A634: using guessed type int (*off_51A634)(); +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A6D0: using guessed type int (*off_51A6D0)(); +// 51A6FC: using guessed type int (*off_51A6FC)(); +// 51A728: using guessed type int (*off_51A728)(); +// 51A740: using guessed type int (*off_51A740)(); +// 51A758: using guessed type int (*off_51A758)(); +// 51A770: using guessed type int (*off_51A770)(); +// 51AF60: using guessed type int (*off_51AF60)(); +// 51AF70: using guessed type int (*off_51AF70)(); +// 51B084: using guessed type int (*off_51B084)(); +// 51B094: using guessed type int (*off_51B094)(); +// 51B0A4: using guessed type int (*off_51B0A4)(); +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (00454300) -------------------------------------------------------- +int __fastcall std::locale::facet::_M_remove_reference(volatile signed __int32 *a1) +{ + int result; // eax + + if ( _CRT_MT ) + { + result = _InterlockedExchangeAdd(a1 + 1, 0xFFFFFFFF); + } + else + { + result = *((_DWORD *)a1 + 1); + *((_DWORD *)a1 + 1) = result - 1; + } + if ( result == 1 ) + return (*(int (__fastcall **)(volatile signed __int32 *))(*a1 + 4))(a1); + return result; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00454340) -------------------------------------------------------- +BOOL __thiscall std::locale::operator==(void *this, int a2) +{ + const char **v2; // ecx + const char **Block; // [esp+10h] [ebp-78h] + char *Blocka; // [esp+10h] [ebp-78h] + const char **v6; // [esp+14h] [ebp-74h] + char *v7; // [esp+14h] [ebp-74h] + bool lpuexcpta; // [esp+18h] [ebp-70h] + char *v10; // [esp+50h] [ebp-38h] BYREF + size_t Size; // [esp+54h] [ebp-34h] + char v12; // [esp+58h] [ebp-30h] BYREF + void *Buf2[2]; // [esp+68h] [ebp-20h] BYREF + char v14; // [esp+70h] [ebp-18h] BYREF + + if ( *(_DWORD *)this == *(_DWORD *)a2 ) + return 1; + v6 = *(const char ***)(*(_DWORD *)this + 16); + if ( *v6 && (v2 = *(const char ***)(*(_DWORD *)a2 + 16), Block = v2, *v2) && !strcmp(*v6, *v2) ) + { + if ( !v6[1] && !Block[1] ) + return 1; + std::locale::name[abi:cxx11]((int *)Buf2, a2); + std::locale::name[abi:cxx11]((int *)&v10, (int)this); + lpuexcpta = 0; + Blocka = v10; + v7 = (char *)Buf2[0]; + if ( (void *)Size == Buf2[1] ) + { + lpuexcpta = 1; + if ( Size ) + lpuexcpta = memcmp(v10, Buf2[0], Size) == 0; + } + if ( Blocka != &v12 ) + { + operator delete(Blocka); + v7 = (char *)Buf2[0]; + } + if ( v7 != &v14 ) + operator delete(v7); + } + else + { + return 0; + } + return lpuexcpta; +} + +//----- (00454500) -------------------------------------------------------- +unsigned int __thiscall std::vector::_M_check_len(_DWORD *this, unsigned int a2, std::length_error *a3) +{ + int v3; // ebx + unsigned int v4; // edx + unsigned int v5; // eax + int v6; // ecx + bool v7; // cf + unsigned int v8; // eax + + v3 = 89478485; + v4 = a2; + v5 = -1431655765 * ((this[1] - *this) >> 3); + if ( 89478485 - v5 < a2 ) + std::__throw_length_error(a3); + v6 = 89478485; + if ( a2 < v5 ) + v4 = v5; + v7 = __CFADD__(v4, v5); + v8 = v4 + v5; + if ( !v7 ) + { + if ( v8 <= 0x5555555 ) + return v8; + return v3; + } + return v6; +} + +//----- (00454560) -------------------------------------------------------- +int __fastcall std::moneypunct::neg_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 40); + if ( (char *)v1 == (char *)std::moneypunct::do_neg_format ) + return *(_DWORD *)(a1[2] + 52); + else + return v1(); +} + +//----- (00454580) -------------------------------------------------------- +int __fastcall std::moneypunct::pos_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 36); + if ( (char *)v1 == (char *)std::moneypunct::do_pos_format ) + return *(_DWORD *)(a1[2] + 48); + else + return v1(); +} + +//----- (004545A0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::moneypunct::do_curr_symbol ) + { + Str = *(char **)(a2[2] + 20); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 4545E4: variable 'v7' is possibly undefined + +//----- (00454620) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 8); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 454620: using guessed type size_t var_20[8]; + +//----- (004546D0) -------------------------------------------------------- +int __fastcall std::moneypunct::frac_digits(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 32); + if ( (char *)v1 == (char *)std::moneypunct::do_frac_digits ) + return *(_DWORD *)(a1[2] + 44); + else + return v1(); +} + +//----- (004546F0) -------------------------------------------------------- +int __fastcall std::moneypunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::moneypunct::do_decimal_point ) + return *(unsigned __int8 *)(a1[2] + 17); + else + return v1(); +} + +//----- (00454710) -------------------------------------------------------- +int __fastcall std::moneypunct::do_neg_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 52); +} + +//----- (00454720) -------------------------------------------------------- +int __fastcall std::moneypunct::do_pos_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 48); +} + +//----- (00454730) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 28); + if ( (char *)v3 == (char *)std::moneypunct::do_negative_sign ) + { + Str = *(char **)(a2[2] + 36); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 454774: variable 'v7' is possibly undefined + +//----- (004547B0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::moneypunct::do_positive_sign ) + { + Str = *(char **)(a2[2] + 28); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 4547F4: variable 'v7' is possibly undefined + +//----- (00454830) -------------------------------------------------------- +int __fastcall std::moneypunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::moneypunct::do_thousands_sep ) + return *(unsigned __int8 *)(a1[2] + 18); + else + return v1(); +} + +//----- (00454850) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 20); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 454850: using guessed type size_t var_20[8]; + +//----- (00454900) -------------------------------------------------------- +int __fastcall std::moneypunct::do_frac_digits(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 44); +} + +//----- (00454910) -------------------------------------------------------- +int __fastcall std::moneypunct::do_decimal_point(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 17); +} + +//----- (00454920) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 36); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 454920: using guessed type size_t var_20[8]; + +//----- (004549D0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 28); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 4549D0: using guessed type size_t var_20[8]; + +//----- (00454A80) -------------------------------------------------------- +int __fastcall std::moneypunct::do_thousands_sep(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 18); +} + +//----- (00454A90) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::moneypunct::do_grouping ) + { + Str = *(char **)(a2[2] + 8); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 454AD4: variable 'v7' is possibly undefined + +//----- (00454B10) -------------------------------------------------------- +int __fastcall std::moneypunct::neg_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 40); + if ( (char *)v1 == (char *)std::moneypunct::do_neg_format ) + return *(_DWORD *)(a1[2] + 52); + else + return v1(); +} + +//----- (00454B30) -------------------------------------------------------- +int __fastcall std::moneypunct::pos_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 36); + if ( (char *)v1 == (char *)std::moneypunct::do_pos_format ) + return *(_DWORD *)(a1[2] + 48); + else + return v1(); +} + +//----- (00454B50) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::moneypunct::do_curr_symbol ) + { + Str = *(char **)(a2[2] + 20); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 454B94: variable 'v7' is possibly undefined + +//----- (00454BD0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 8); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 454BD0: using guessed type size_t var_20[8]; + +//----- (00454C80) -------------------------------------------------------- +int __fastcall std::moneypunct::frac_digits(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 32); + if ( (char *)v1 == (char *)std::moneypunct::do_frac_digits ) + return *(_DWORD *)(a1[2] + 44); + else + return v1(); +} + +//----- (00454CA0) -------------------------------------------------------- +int __fastcall std::moneypunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::moneypunct::do_decimal_point ) + return *(unsigned __int8 *)(a1[2] + 17); + else + return v1(); +} + +//----- (00454CC0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_neg_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 52); +} + +//----- (00454CD0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_pos_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 48); +} + +//----- (00454CE0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 28); + if ( (char *)v3 == (char *)std::moneypunct::do_negative_sign ) + { + Str = *(char **)(a2[2] + 36); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 454D24: variable 'v7' is possibly undefined + +//----- (00454D60) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::moneypunct::do_positive_sign ) + { + Str = *(char **)(a2[2] + 28); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 454DA4: variable 'v7' is possibly undefined + +//----- (00454DE0) -------------------------------------------------------- +int __fastcall std::moneypunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::moneypunct::do_thousands_sep ) + return *(unsigned __int8 *)(a1[2] + 18); + else + return v1(); +} + +//----- (00454E00) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 20); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 454E00: using guessed type size_t var_20[8]; + +//----- (00454EB0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_frac_digits(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 44); +} + +//----- (00454EC0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_decimal_point(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 17); +} + +//----- (00454ED0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 36); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 454ED0: using guessed type size_t var_20[8]; + +//----- (00454F80) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 28); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 454F80: using guessed type size_t var_20[8]; + +//----- (00455030) -------------------------------------------------------- +int __fastcall std::moneypunct::do_thousands_sep(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 18); +} + +//----- (00455040) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::moneypunct::do_grouping ) + { + Str = *(char **)(a2[2] + 8); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 455084: variable 'v7' is possibly undefined + +//----- (004550C0) -------------------------------------------------------- +int __fastcall std::moneypunct::neg_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 40); + if ( (char *)v1 == (char *)std::moneypunct::do_neg_format ) + return *(_DWORD *)(a1[2] + 56); + else + return v1(); +} + +//----- (004550E0) -------------------------------------------------------- +int __fastcall std::moneypunct::pos_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 36); + if ( (char *)v1 == (char *)std::moneypunct::do_pos_format ) + return *(_DWORD *)(a1[2] + 52); + else + return v1(); +} + +//----- (00455100) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + wchar_t *String; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::moneypunct::do_curr_symbol ) + { + String = *(wchar_t **)(a2[2] + 24); + *this = this + 2; + v5 = -2; + if ( String ) + v5 = (int)&String[wcslen(String)]; + LOBYTE(v7) = 0; + std::wstring::_M_construct(this, String, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 455145: variable 'v7' is possibly undefined + +//----- (00455180) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int a2) +{ + _DWORD *v2; // esi + const char *Str; // edi + size_t v5; // eax + size_t Size; // ebp + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 8); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 455180: using guessed type size_t var_20[8]; + +//----- (00455230) -------------------------------------------------------- +int __fastcall std::moneypunct::frac_digits(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 32); + if ( (char *)v1 == (char *)std::moneypunct::do_frac_digits ) + return *(_DWORD *)(a1[2] + 48); + else + return v1(); +} + +//----- (00455250) -------------------------------------------------------- +int __fastcall std::moneypunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::moneypunct::do_decimal_point ) + return *(unsigned __int16 *)(a1[2] + 18); + else + return v1(); +} + +//----- (00455270) -------------------------------------------------------- +int __fastcall std::moneypunct::do_neg_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 56); +} + +//----- (00455280) -------------------------------------------------------- +int __fastcall std::moneypunct::do_pos_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 52); +} + +//----- (00455290) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + wchar_t *String; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 28); + if ( (char *)v3 == (char *)std::moneypunct::do_negative_sign ) + { + String = *(wchar_t **)(a2[2] + 40); + *this = this + 2; + v5 = -2; + if ( String ) + v5 = (int)&String[wcslen(String)]; + LOBYTE(v7) = 0; + std::wstring::_M_construct(this, String, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 4552D5: variable 'v7' is possibly undefined + +//----- (00455310) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + wchar_t *String; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::moneypunct::do_positive_sign ) + { + String = *(wchar_t **)(a2[2] + 32); + *this = this + 2; + v5 = -2; + if ( String ) + v5 = (int)&String[wcslen(String)]; + LOBYTE(v7) = 0; + std::wstring::_M_construct(this, String, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 455355: variable 'v7' is possibly undefined + +//----- (00455390) -------------------------------------------------------- +int __fastcall std::moneypunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::moneypunct::do_thousands_sep ) + return *(unsigned __int16 *)(a1[2] + 20); + else + return v1(); +} + +//----- (004553B0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int a2) +{ + wchar_t *String; // esi + int v4; // eax + int v6; // [esp+8h] [ebp-14h] + + String = *(wchar_t **)(*(_DWORD *)(a2 + 8) + 24); + *this = this + 2; + v4 = -2; + if ( String ) + v4 = (int)&String[wcslen(String)]; + LOBYTE(v6) = 0; + std::wstring::_M_construct(this, String, v4, v6); + return this; +} +// 4553E8: variable 'v6' is possibly undefined + +//----- (00455400) -------------------------------------------------------- +int __fastcall std::moneypunct::do_frac_digits(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 48); +} + +//----- (00455410) -------------------------------------------------------- +int __fastcall std::moneypunct::do_decimal_point(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 18); +} + +//----- (00455420) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int a2) +{ + wchar_t *String; // esi + int v4; // eax + int v6; // [esp+8h] [ebp-14h] + + String = *(wchar_t **)(*(_DWORD *)(a2 + 8) + 40); + *this = this + 2; + v4 = -2; + if ( String ) + v4 = (int)&String[wcslen(String)]; + LOBYTE(v6) = 0; + std::wstring::_M_construct(this, String, v4, v6); + return this; +} +// 455458: variable 'v6' is possibly undefined + +//----- (00455470) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int a2) +{ + wchar_t *String; // esi + int v4; // eax + int v6; // [esp+8h] [ebp-14h] + + String = *(wchar_t **)(*(_DWORD *)(a2 + 8) + 32); + *this = this + 2; + v4 = -2; + if ( String ) + v4 = (int)&String[wcslen(String)]; + LOBYTE(v6) = 0; + std::wstring::_M_construct(this, String, v4, v6); + return this; +} +// 4554A8: variable 'v6' is possibly undefined + +//----- (004554C0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_thousands_sep(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 20); +} + +//----- (004554D0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::moneypunct::do_grouping ) + { + Str = *(char **)(a2[2] + 8); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + std::string::_M_construct(this, Str, v5); + return this; + } + else + { + v3(a2); + return this; + } +} + +//----- (00455540) -------------------------------------------------------- +int __fastcall std::moneypunct::neg_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 40); + if ( (char *)v1 == (char *)std::moneypunct::do_neg_format ) + return *(_DWORD *)(a1[2] + 56); + else + return v1(); +} + +//----- (00455560) -------------------------------------------------------- +int __fastcall std::moneypunct::pos_format(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 36); + if ( (char *)v1 == (char *)std::moneypunct::do_pos_format ) + return *(_DWORD *)(a1[2] + 52); + else + return v1(); +} + +//----- (00455580) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::curr_symbol(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + wchar_t *String; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::moneypunct::do_curr_symbol ) + { + String = *(wchar_t **)(a2[2] + 24); + *this = this + 2; + v5 = -2; + if ( String ) + v5 = (int)&String[wcslen(String)]; + LOBYTE(v7) = 0; + std::wstring::_M_construct(this, String, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 4555C5: variable 'v7' is possibly undefined + +//----- (00455600) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_grouping(_DWORD *this, int a2) +{ + _DWORD *v2; // esi + const char *Str; // edi + size_t v5; // eax + size_t Size; // ebp + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 8); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 455600: using guessed type size_t var_20[8]; + +//----- (004556B0) -------------------------------------------------------- +int __fastcall std::moneypunct::frac_digits(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 32); + if ( (char *)v1 == (char *)std::moneypunct::do_frac_digits ) + return *(_DWORD *)(a1[2] + 48); + else + return v1(); +} + +//----- (004556D0) -------------------------------------------------------- +int __fastcall std::moneypunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::moneypunct::do_decimal_point ) + return *(unsigned __int16 *)(a1[2] + 18); + else + return v1(); +} + +//----- (004556F0) -------------------------------------------------------- +int __fastcall std::moneypunct::do_neg_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 56); +} + +//----- (00455700) -------------------------------------------------------- +int __fastcall std::moneypunct::do_pos_format(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 52); +} + +//----- (00455710) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::negative_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + wchar_t *String; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 28); + if ( (char *)v3 == (char *)std::moneypunct::do_negative_sign ) + { + String = *(wchar_t **)(a2[2] + 40); + *this = this + 2; + v5 = -2; + if ( String ) + v5 = (int)&String[wcslen(String)]; + LOBYTE(v7) = 0; + std::wstring::_M_construct(this, String, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 455755: variable 'v7' is possibly undefined + +//----- (00455790) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::positive_sign(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + wchar_t *String; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::moneypunct::do_positive_sign ) + { + String = *(wchar_t **)(a2[2] + 32); + *this = this + 2; + v5 = -2; + if ( String ) + v5 = (int)&String[wcslen(String)]; + LOBYTE(v7) = 0; + std::wstring::_M_construct(this, String, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 4557D5: variable 'v7' is possibly undefined + +//----- (00455810) -------------------------------------------------------- +int __fastcall std::moneypunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::moneypunct::do_thousands_sep ) + return *(unsigned __int16 *)(a1[2] + 20); + else + return v1(); +} + +//----- (00455830) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_curr_symbol(_DWORD *this, int a2) +{ + wchar_t *String; // esi + int v4; // eax + int v6; // [esp+8h] [ebp-14h] + + String = *(wchar_t **)(*(_DWORD *)(a2 + 8) + 24); + *this = this + 2; + v4 = -2; + if ( String ) + v4 = (int)&String[wcslen(String)]; + LOBYTE(v6) = 0; + std::wstring::_M_construct(this, String, v4, v6); + return this; +} +// 455868: variable 'v6' is possibly undefined + +//----- (00455880) -------------------------------------------------------- +int __fastcall std::moneypunct::do_frac_digits(int a1) +{ + return *(_DWORD *)(*(_DWORD *)(a1 + 8) + 48); +} + +//----- (00455890) -------------------------------------------------------- +int __fastcall std::moneypunct::do_decimal_point(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 18); +} + +//----- (004558A0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_negative_sign(_DWORD *this, int a2) +{ + wchar_t *String; // esi + int v4; // eax + int v6; // [esp+8h] [ebp-14h] + + String = *(wchar_t **)(*(_DWORD *)(a2 + 8) + 40); + *this = this + 2; + v4 = -2; + if ( String ) + v4 = (int)&String[wcslen(String)]; + LOBYTE(v6) = 0; + std::wstring::_M_construct(this, String, v4, v6); + return this; +} +// 4558D8: variable 'v6' is possibly undefined + +//----- (004558F0) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::do_positive_sign(_DWORD *this, int a2) +{ + wchar_t *String; // esi + int v4; // eax + int v6; // [esp+8h] [ebp-14h] + + String = *(wchar_t **)(*(_DWORD *)(a2 + 8) + 32); + *this = this + 2; + v4 = -2; + if ( String ) + v4 = (int)&String[wcslen(String)]; + LOBYTE(v6) = 0; + std::wstring::_M_construct(this, String, v4, v6); + return this; +} +// 455928: variable 'v6' is possibly undefined + +//----- (00455940) -------------------------------------------------------- +int __fastcall std::moneypunct::do_thousands_sep(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 20); +} + +//----- (00455950) -------------------------------------------------------- +_DWORD *__thiscall std::moneypunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::moneypunct::do_grouping ) + { + Str = *(char **)(a2[2] + 8); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + std::string::_M_construct(this, Str, v5); + return this; + } + else + { + v3(a2); + return this; + } +} + +//----- (004559C0) -------------------------------------------------------- +int __thiscall std::string::_M_disjunct(unsigned int *this, unsigned int a2) +{ + int v2; // edx + + v2 = 1; + if ( *this <= a2 ) + LOBYTE(v2) = this[1] + *this < a2; + return v2; +} + +//----- (004559E0) -------------------------------------------------------- +bool __fastcall std::string::_M_is_local(_DWORD *a1) +{ + return a1 + 2 == (_DWORD *)*a1; +} + +//----- (004559F0) -------------------------------------------------------- +unsigned int __thiscall std::string::find_last_of(int *this, char *Str, unsigned int a3) +{ + unsigned int v4; // ebx + size_t MaxCount; // esi + int v6; // eax + unsigned int v7; // eax + int v8; // ebp + + v4 = a3; + MaxCount = strlen(Str); + v6 = this[1]; + if ( !v6 || !MaxCount ) + return -1; + v7 = v6 - 1; + v8 = *this; + if ( a3 > v7 ) + v4 = v7; + do + { + if ( memchr(Str, *(char *)(v8 + v4), MaxCount) ) + break; + } + while ( v4-- != 0 ); + return v4; +} + +//----- (00455A70) -------------------------------------------------------- +unsigned int __thiscall std::string::find_last_of(int *this, void *Buf, unsigned int a3, size_t MaxCount) +{ + int v4; // eax + unsigned int v5; // ebx + unsigned int v6; // eax + int v7; // ebp + + v4 = this[1]; + v5 = a3; + if ( !v4 || !MaxCount ) + return -1; + v6 = v4 - 1; + v7 = *this; + if ( v6 <= a3 ) + v5 = v6; + do + { + if ( memchr(Buf, *(char *)(v7 + v5), MaxCount) ) + break; + } + while ( v5-- != 0 ); + return v5; +} + +//----- (00455AF0) -------------------------------------------------------- +unsigned int __thiscall std::string::find_last_of(int *this, int a2, unsigned int a3) +{ + int v3; // eax + unsigned int v4; // ebx + size_t MaxCount; // esi + unsigned int v6; // eax + const void *Buf; // ebp + int v8; // edi + + v3 = this[1]; + v4 = a3; + MaxCount = *(_DWORD *)(a2 + 4); + if ( !v3 || !MaxCount ) + return -1; + v6 = v3 - 1; + Buf = *(const void **)a2; + v8 = *this; + if ( a3 > v6 ) + v4 = v6; + do + { + if ( memchr(Buf, *(char *)(v8 + v4), MaxCount) ) + break; + } + while ( v4-- != 0 ); + return v4; +} + +//----- (00455B70) -------------------------------------------------------- +int __thiscall std::string::find_last_of(int *this, char a2, unsigned int a3) +{ + int result; // eax + int v4; // ebx + int v5; // ecx + + result = -1; + v4 = this[1]; + if ( v4 ) + { + result = v4 - 1; + v5 = *this; + if ( a3 <= v4 - 1 ) + result = a3; + do + { + if ( a2 == *(_BYTE *)(v5 + result) ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (00455BB0) -------------------------------------------------------- +int __fastcall std::string::_M_local_data(int a1) +{ + return a1 + 8; +} + +//----- (00455BC0) -------------------------------------------------------- +unsigned int __thiscall std::string::find_first_of(_DWORD *this, char *Str, unsigned int a3) +{ + size_t v5; // eax + size_t MaxCount; // ebx + unsigned int v8; // [esp+1Ch] [ebp-20h] + + v5 = strlen(Str); + if ( v5 ) + { + MaxCount = v5; + v8 = this[1]; + while ( v8 > a3 ) + { + if ( memchr(Str, *(char *)(*this + a3), MaxCount) ) + return a3; + ++a3; + } + } + return -1; +} + +//----- (00455C40) -------------------------------------------------------- +unsigned int __thiscall std::string::find_first_of(_DWORD *this, void *Buf, unsigned int a3, size_t MaxCount) +{ + unsigned int v5; // edi + + if ( MaxCount ) + { + v5 = this[1]; + while ( v5 > a3 ) + { + if ( memchr(Buf, *(char *)(*this + a3), MaxCount) ) + return a3; + ++a3; + } + } + return -1; +} + +//----- (00455CB0) -------------------------------------------------------- +int __thiscall std::string::find_first_of(_DWORD *this, int a2, unsigned int a3) +{ + size_t MaxCount; // esi + const void *Buf; // ebp + unsigned int v8; // [esp+1Ch] [ebp-20h] + + MaxCount = *(_DWORD *)(a2 + 4); + Buf = *(const void **)a2; + if ( MaxCount ) + { + v8 = this[1]; + while ( v8 > a3 ) + { + if ( memchr(Buf, *(char *)(*this + a3), MaxCount) ) + return a3; + ++a3; + } + } + return -1; +} + +//----- (00455D20) -------------------------------------------------------- +char *__thiscall std::string::find_first_of(int *this, char a2, unsigned int a3) +{ + int v3; // ebx + unsigned int v4; // edx + int v5; // esi + char *v6; // eax + + v3 = -1; + v4 = this[1]; + if ( a3 < v4 ) + { + v5 = *this; + v6 = (char *)memchr((const void *)(*this + a3), a2, v4 - a3); + if ( v6 ) + return &v6[-v5]; + } + return (char *)v3; +} + +//----- (00455D70) -------------------------------------------------------- +void *__thiscall std::string::get_allocator(void *this, int a2) +{ + return this; +} + +//----- (00455D80) -------------------------------------------------------- +unsigned int __thiscall std::string::_M_check_length(_DWORD *this, int a2, unsigned int a3, std::length_error *a4) +{ + unsigned int result; // eax + + result = a2 + 0x3FFFFFFF - this[1]; + if ( result < a3 ) + std::__throw_length_error(a4); + return result; +} + +//----- (00455DB0) -------------------------------------------------------- +int __fastcall std::string::_M_get_allocator(int a1) +{ + return a1; +} + +//----- (00455DC0) -------------------------------------------------------- +int __thiscall std::string::find_last_not_of(int *this, char *Str, unsigned int a3) +{ + int v3; // ebx + int v4; // ebp + size_t MaxCount; // esi + unsigned int v6; // edx + int v9; // [esp+1Ch] [ebp-20h] + + v3 = -1; + v9 = this[1]; + if ( v9 ) + { + v4 = *this; + MaxCount = strlen(Str); + v6 = v9 - 1; + if ( a3 <= v9 - 1 ) + v6 = a3; + v3 = v6; + do + { + if ( !MaxCount ) + break; + if ( !memchr(Str, *(char *)(v4 + v3), MaxCount) ) + break; + } + while ( v3-- != 0 ); + } + return v3; +} + +//----- (00455E30) -------------------------------------------------------- +int __thiscall std::string::find_last_not_of(int *this, void *Buf, unsigned int a3, size_t MaxCount) +{ + int v4; // ebx + int v5; // eax + unsigned int v6; // edx + unsigned int v7; // eax + int v8; // ebp + + v4 = -1; + v5 = this[1]; + v6 = a3; + if ( v5 ) + { + v7 = v5 - 1; + v8 = *this; + if ( v7 <= a3 ) + v6 = v7; + v4 = v6; + do + { + if ( !MaxCount ) + break; + if ( !memchr(Buf, *(char *)(v8 + v4), MaxCount) ) + break; + } + while ( v4-- != 0 ); + } + return v4; +} + +//----- (00455E90) -------------------------------------------------------- +int __thiscall std::string::find_last_not_of(int *this, int a2, unsigned int a3) +{ + int v3; // ebx + int v4; // eax + unsigned int v5; // eax + size_t MaxCount; // esi + int v7; // ebp + const void *Buf; // edi + + v3 = -1; + v4 = this[1]; + if ( v4 ) + { + v5 = v4 - 1; + MaxCount = *(_DWORD *)(a2 + 4); + v7 = *this; + Buf = *(const void **)a2; + if ( a3 <= v5 ) + v5 = a3; + v3 = v5; + do + { + if ( !MaxCount ) + break; + if ( !memchr(Buf, *(char *)(v7 + v3), MaxCount) ) + break; + } + while ( v3-- != 0 ); + } + return v3; +} + +//----- (00455EF0) -------------------------------------------------------- +int __thiscall std::string::find_last_not_of(int *this, char a2, unsigned int a3) +{ + int result; // eax + int v4; // ebx + int v5; // ecx + + result = -1; + v4 = this[1]; + if ( v4 ) + { + result = v4 - 1; + v5 = *this; + if ( v4 - 1 > a3 ) + result = a3; + do + { + if ( *(_BYTE *)(v5 + result) != a2 ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (00455F30) -------------------------------------------------------- +unsigned int __thiscall std::string::find_first_not_of(int *this, char *Str, unsigned int a3) +{ + unsigned int v4; // esi + size_t v5; // eax + unsigned int v6; // edi + int v7; // ebp + size_t MaxCount; // ebx + + v4 = a3; + v5 = strlen(Str); + v6 = this[1]; + if ( a3 >= v6 ) + return -1; + v7 = *this; + MaxCount = v5; + if ( v5 ) + { + while ( memchr(Str, *(char *)(v7 + v4), MaxCount) ) + { + if ( ++v4 == v6 ) + return -1; + } + } + return v4; +} + +//----- (00455FA0) -------------------------------------------------------- +unsigned int __thiscall std::string::find_first_not_of(int *this, void *Buf, unsigned int a3, size_t MaxCount) +{ + unsigned int v4; // esi + unsigned int v5; // edi + int v6; // ebp + + v4 = this[1]; + v5 = a3; + if ( a3 >= v4 ) + return -1; + v6 = *this; + if ( MaxCount ) + { + while ( memchr(Buf, *(char *)(v6 + v5), MaxCount) ) + { + if ( ++v5 == v4 ) + return -1; + } + } + return v5; +} + +//----- (00456000) -------------------------------------------------------- +unsigned int __thiscall std::string::find_first_not_of(int *this, int a2, unsigned int a3) +{ + unsigned int v3; // esi + unsigned int v4; // ebp + size_t MaxCount; // ebx + int v6; // edi + void *i; // eax + void *Buf; // [esp+1Ch] [ebp-20h] + + v3 = this[1]; + v4 = a3; + MaxCount = *(_DWORD *)(a2 + 4); + if ( a3 >= v3 ) + return -1; + v6 = *this; + if ( MaxCount ) + { + Buf = *(void **)a2; + for ( i = memchr(*(const void **)a2, *(char *)(v6 + a3), MaxCount); i; i = memchr(Buf, *(char *)(v6 + v4), MaxCount) ) + { + if ( v3 == ++v4 ) + return -1; + } + } + return v4; +} + +//----- (00456070) -------------------------------------------------------- +int __thiscall std::string::find_first_not_of(_DWORD *this, char a2, unsigned int a3) +{ + int result; // eax + unsigned int v4; // edx + + result = a3; + v4 = this[1]; + if ( a3 >= v4 ) + return -1; + while ( *(_BYTE *)(*this + result) == a2 ) + { + if ( ++result == v4 ) + return -1; + } + return result; +} + +//----- (004560B0) -------------------------------------------------------- +unsigned int __thiscall std::string::at(_DWORD *this, unsigned int a2) +{ + if ( a2 >= this[1] ) + std::__throw_out_of_range_fmt("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", a2, this[1]); + return *this + a2; +} + +//----- (004560E0) -------------------------------------------------------- +int __fastcall std::string::end(_DWORD *a1) +{ + return a1[1] + *a1; +} + +//----- (004560F0) -------------------------------------------------------- +int __fastcall std::string::back(_DWORD *a1) +{ + return *a1 + a1[1] - 1; +} + +//----- (00456100) -------------------------------------------------------- +int __fastcall std::string::cend(_DWORD *a1) +{ + return a1[1] + *a1; +} + +//----- (00456110) -------------------------------------------------------- +size_t __thiscall std::string::copy(_DWORD *this, _BYTE *a2, size_t a3, unsigned int a4) +{ + unsigned int v4; // ebx + size_t Size; // ebx + _BYTE *Src; // eax + + v4 = this[1]; + if ( a4 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::copy", + a4, + this[1]); + Size = v4 - a4; + if ( Size > a3 ) + Size = a3; + if ( !Size ) + return Size; + Src = (_BYTE *)(*this + a4); + if ( Size != 1 ) + { + memcpy(a2, Src, Size); + return Size; + } + *a2 = *Src; + return 1; +} + +//----- (00456190) -------------------------------------------------------- +int __fastcall std::string::data(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (004561A0) -------------------------------------------------------- +unsigned int __thiscall std::string::find(int *this, char *Str, int a3) +{ + size_t Size; // eax + + Size = strlen(Str); + return std::string::find(this, Str, a3, Size); +} + +//----- (004561E0) -------------------------------------------------------- +unsigned int __thiscall std::string::find(int *this, char *Buf2, unsigned int a3, size_t Size) +{ + unsigned int v4; // edx + int v6; // ecx + const void *Buf; // eax + int v8; // edi + size_t v9; // edx + size_t MaxCount; // edx + int Val; // ebp + char *v12; // edi + int v14; // ecx + int v15; // [esp+18h] [ebp-24h] + int v16; // [esp+1Ch] [ebp-20h] + + v4 = this[1]; + if ( Size ) + { + v6 = -1; + if ( v4 > a3 ) + { + v16 = *this; + Buf = (const void *)(*this + a3); + v8 = v4 + v16; + v9 = v4 - a3; + v15 = v8; + if ( Size <= v9 ) + { + MaxCount = 1 - Size + v9; + if ( MaxCount ) + { + Val = *Buf2; + while ( 1 ) + { + v12 = (char *)memchr(Buf, Val, MaxCount); + if ( !v12 ) + return -1; + if ( !memcmp(v12, Buf2, Size) ) + break; + Buf = v12 + 1; + if ( Size <= v15 - (int)(v12 + 1) ) + { + MaxCount = v15 - (_DWORD)v12 - Size; + if ( MaxCount ) + continue; + } + return -1; + } + return (unsigned int)&v12[-v16]; + } + } + } + return v6; + } + else + { + v14 = -1; + if ( v4 >= a3 ) + return a3; + return v14; + } +} + +//----- (004562B0) -------------------------------------------------------- +unsigned int __thiscall std::string::find(int *this, int a2, int a3) +{ + return std::string::find(this, *(char **)a2, a3, *(_DWORD *)(a2 + 4)); +} + +//----- (004562E0) -------------------------------------------------------- +char *__thiscall std::string::find(int *this, char a2, unsigned int a3) +{ + int v3; // ebx + unsigned int v4; // edx + int v5; // esi + char *v6; // eax + + v3 = -1; + v4 = this[1]; + if ( a3 < v4 ) + { + v5 = *this; + v6 = (char *)memchr((const void *)(*this + a3), a2, v4 - a3); + if ( v6 ) + return &v6[-v5]; + } + return (char *)v3; +} + +//----- (00456330) -------------------------------------------------------- +_DWORD *__thiscall std::string::rend(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2; + return result; +} + +//----- (00456340) -------------------------------------------------------- +int __fastcall std::string::size(int a1) +{ + return *(_DWORD *)(a1 + 4); +} + +//----- (00456350) -------------------------------------------------------- +int __fastcall std::string::begin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00456360) -------------------------------------------------------- +int __fastcall std::string::c_str(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00456370) -------------------------------------------------------- +_DWORD *__thiscall std::string::crend(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2; + return result; +} + +//----- (00456380) -------------------------------------------------------- +bool __fastcall std::string::empty(int a1) +{ + return *(_DWORD *)(a1 + 4) == 0; +} + +//----- (00456390) -------------------------------------------------------- +int __fastcall std::string::front(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (004563A0) -------------------------------------------------------- +int __thiscall std::string::rfind(int *this, char *Str, int a3) +{ + size_t v4; // eax + + v4 = strlen(Str); + return std::string::rfind(this, Str, a3, v4); +} + +//----- (004563E0) -------------------------------------------------------- +int __thiscall std::string::rfind(int *this, void *Buf2, unsigned int a3, size_t Size) +{ + int v4; // ebx + unsigned int v5; // eax + unsigned int v6; // edx + unsigned int v7; // eax + int v8; // ebp + + v4 = -1; + v5 = this[1]; + v6 = a3; + if ( Size <= v5 ) + { + v7 = v5 - Size; + v8 = *this; + if ( v7 <= a3 ) + v6 = v7; + v4 = v6; + if ( Size ) + { + while ( memcmp((const void *)(v8 + v4), Buf2, Size) ) + { + if ( !v4 ) + return -1; + --v4; + } + } + } + return v4; +} +// 456431: conditional instruction was optimized away because %arg_8.4!=0 + +//----- (00456450) -------------------------------------------------------- +int __thiscall std::string::rfind(int *this, int a2, unsigned int a3) +{ + int v3; // ebx + unsigned int v4; // eax + unsigned int v5; // edx + size_t Size; // esi + unsigned int v7; // eax + const void *Buf2; // edi + int v9; // ebp + + v3 = -1; + v4 = this[1]; + v5 = a3; + Size = *(_DWORD *)(a2 + 4); + if ( Size <= v4 ) + { + v7 = v4 - Size; + Buf2 = *(const void **)a2; + v9 = *this; + if ( v7 <= a3 ) + v5 = v7; + v3 = v5; + if ( Size ) + { + while ( memcmp((const void *)(v9 + v3), Buf2, Size) ) + { + if ( !v3 ) + return -1; + --v3; + } + } + } + return v3; +} +// 4564A2: conditional instruction was optimized away because esi.4!=0 + +//----- (004564C0) -------------------------------------------------------- +int __thiscall std::string::rfind(int *this, char a2, unsigned int a3) +{ + int result; // eax + int v4; // ebx + int v5; // ecx + + result = -1; + v4 = this[1]; + if ( v4 ) + { + result = v4 - 1; + v5 = *this; + if ( v4 - 1 > a3 ) + result = a3; + do + { + if ( *(_BYTE *)(v5 + result) == a2 ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (00456500) -------------------------------------------------------- +int __fastcall std::string::cbegin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00456510) -------------------------------------------------------- +int __fastcall std::string::length(int a1) +{ + return *(_DWORD *)(a1 + 4); +} + +//----- (00456520) -------------------------------------------------------- +_DWORD *__thiscall std::string::rbegin(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2 + a2[1]; + return result; +} + +//----- (00456530) -------------------------------------------------------- +_DWORD *__thiscall std::string::substr(_DWORD *this, _DWORD *a2, unsigned int a3, unsigned int a4) +{ + unsigned int v5; // eax + unsigned int v6; // eax + int v8; // [esp+8h] [ebp-14h] + + v5 = a2[1]; + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::substr", + a3, + a2[1]); + v6 = v5 - a3; + *this = this + 2; + LOBYTE(v8) = 0; + if ( v6 > a4 ) + v6 = a4; + std::string::_M_construct(this, (_BYTE *)(a3 + *a2), a3 + *a2 + v6, v8); + return this; +} +// 45656B: variable 'v8' is possibly undefined + +//----- (004565A0) -------------------------------------------------------- +int __fastcall std::string::_M_data(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (004565B0) -------------------------------------------------------- +int __thiscall std::string::compare(int this, char *Str) +{ + size_t v3; // edi + size_t v4; // ebx + size_t Size; // eax + int result; // eax + + v3 = *(_DWORD *)(this + 4); + v4 = strlen(Str); + Size = v3; + if ( v4 <= v3 ) + Size = v4; + if ( !Size ) + return v3 - v4; + result = memcmp(*(const void **)this, Str, Size); + if ( !result ) + return v3 - v4; + return result; +} + +//----- (00456600) -------------------------------------------------------- +int __thiscall std::string::compare(int this, int a2) +{ + size_t v2; // esi + size_t Size; // edx + size_t v4; // ebx + int result; // eax + + v2 = *(_DWORD *)(this + 4); + Size = v2; + v4 = *(_DWORD *)(a2 + 4); + if ( v4 <= v2 ) + Size = *(_DWORD *)(a2 + 4); + if ( !Size ) + return v2 - v4; + result = memcmp(*(const void **)this, *(const void **)a2, Size); + if ( !result ) + return v2 - v4; + return result; +} + +//----- (00456640) -------------------------------------------------------- +int __thiscall std::string::compare(_DWORD *this, unsigned int a2, unsigned int a3, char *Str) +{ + unsigned int v4; // ebx + unsigned int v5; // ebx + size_t v7; // edi + size_t Size; // eax + int result; // eax + + v4 = this[1]; + if ( a2 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + this[1]); + v5 = v4 - a2; + if ( v5 > a3 ) + v5 = a3; + v7 = strlen(Str); + Size = v5; + if ( v7 <= v5 ) + Size = v7; + if ( !Size ) + return v5 - v7; + result = memcmp((const void *)(*this + a2), Str, Size); + if ( !result ) + return v5 - v7; + return result; +} + +//----- (004566C0) -------------------------------------------------------- +int __thiscall std::string::compare(_DWORD *this, unsigned int a2, size_t a3, void *Buf2, unsigned int a5) +{ + unsigned int v5; // ebx + unsigned int v6; // ebx + size_t Size; // edx + int result; // eax + + v5 = this[1]; + if ( a2 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + this[1]); + v6 = v5 - a2; + if ( v6 > a3 ) + v6 = a3; + Size = a5; + if ( v6 <= a5 ) + Size = v6; + if ( !Size ) + return v6 - a5; + result = memcmp((const void *)(*this + a2), Buf2, Size); + if ( !result ) + return v6 - a5; + return result; +} + +//----- (00456730) -------------------------------------------------------- +int __thiscall std::string::compare(_DWORD *this, unsigned int a2, size_t a3, int a4) +{ + unsigned int v4; // ebx + size_t v5; // ebx + size_t v6; // esi + size_t Size; // edi + int result; // eax + + v4 = this[1]; + if ( a2 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + this[1]); + v5 = v4 - a2; + if ( v5 > a3 ) + v5 = a3; + v6 = *(_DWORD *)(a4 + 4); + Size = v5; + if ( v6 <= v5 ) + Size = *(_DWORD *)(a4 + 4); + if ( !Size ) + return v5 - v6; + result = memcmp((const void *)(*this + a2), *(const void **)a4, Size); + if ( !result ) + return v5 - v6; + return result; +} + +//----- (004567A0) -------------------------------------------------------- +int __thiscall std::string::compare(_DWORD *this, unsigned int a2, size_t a3, _DWORD *a4, unsigned int a5, size_t a6) +{ + unsigned int v6; // ebx + size_t v7; // edi + unsigned int v8; // eax + size_t v9; // ebx + size_t v10; // eax + size_t Size; // eax + int result; // eax + + v6 = this[1]; + v7 = a6; + if ( a2 > v6 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + v6); + v8 = a4[1]; + if ( a5 > v8 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a5, + a4[1]); + v9 = v6 - a2; + if ( v9 > a3 ) + v9 = a3; + v10 = v8 - a5; + if ( v10 <= a6 ) + v7 = v10; + Size = v9; + if ( v7 <= v9 ) + Size = v7; + if ( !Size ) + return v9 - v7; + result = memcmp((const void *)(*this + a2), (const void *)(*a4 + a5), Size); + if ( !result ) + return v9 - v7; + return result; +} + +//----- (00456850) -------------------------------------------------------- +_DWORD *__thiscall std::string::crbegin(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2 + a2[1]; + return result; +} + +//----- (00456860) -------------------------------------------------------- +unsigned int __thiscall std::string::_M_check(_DWORD *this, unsigned int a2, const char *a3) +{ + unsigned int v3; // edx + unsigned int result; // eax + + v3 = this[1]; + result = a2; + if ( a2 > v3 ) + std::__throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)", a3, a2, v3); + return result; +} + +//----- (00456890) -------------------------------------------------------- +unsigned int __thiscall std::string::_M_limit(_DWORD *this, int a2, unsigned int a3) +{ + unsigned int result; // eax + + result = this[1] - a2; + if ( result > a3 ) + return a3; + return result; +} + +//----- (004568B0) -------------------------------------------------------- +int __fastcall std::string::capacity(_DWORD *a1) +{ + if ( (_DWORD *)*a1 == a1 + 2 ) + return 15; + else + return a1[2]; +} + +//----- (004568D0) -------------------------------------------------------- +int std::string::max_size() +{ + return 0x3FFFFFFF; +} + +//----- (004568E0) -------------------------------------------------------- +int __thiscall std::string::operator[](_DWORD *this, int a2) +{ + return a2 + *this; +} + +//----- (004568F0) -------------------------------------------------------- +bool __thiscall std::wstring::_M_disjunct(unsigned int *this, unsigned int a2) +{ + bool result; // al + + result = 1; + if ( *this <= a2 ) + return *this + 2 * this[1] < a2; + return result; +} + +//----- (00456910) -------------------------------------------------------- +bool __fastcall std::wstring::_M_is_local(_DWORD *a1) +{ + return a1 + 2 == (_DWORD *)*a1; +} + +//----- (00456920) -------------------------------------------------------- +int __thiscall std::wstring::find_last_of(_DWORD *this, wchar_t *String, int a3) +{ + int v4; // eax + + v4 = wcslen(String); + return std::wstring::find_last_of(this, String, a3, v4); +} + +//----- (00456960) -------------------------------------------------------- +int __thiscall std::wstring::find_last_of(_DWORD *this, _WORD *a2, unsigned int a3, int a4) +{ + int v4; // eax + unsigned int v5; // ebx + unsigned int v6; // eax + _WORD *v7; // eax + int v8; // edx + + v4 = this[1]; + v5 = a3; + if ( !v4 || !a4 ) + return -1; + v6 = v4 - 1; + if ( v6 <= a3 ) + v5 = v6; + while ( !a2 ) + { +LABEL_9: + if ( v5-- == 0 ) + return v5; + } + v7 = a2; + v8 = a4; + while ( *(_WORD *)(*this + 2 * v5) != *v7 ) + { + ++v7; + if ( !--v8 ) + goto LABEL_9; + } + return v5; +} + +//----- (004569D0) -------------------------------------------------------- +int __thiscall std::wstring::find_last_of(_DWORD *this, int a2, unsigned int a3) +{ + return std::wstring::find_last_of(this, *(_WORD **)a2, a3, *(_DWORD *)(a2 + 4)); +} + +//----- (00456A00) -------------------------------------------------------- +int __thiscall std::wstring::find_last_of(int *this, __int16 a2, unsigned int a3) +{ + int result; // eax + int v4; // ebx + int v5; // ecx + + result = -1; + v4 = this[1]; + if ( v4 ) + { + result = v4 - 1; + v5 = *this; + if ( a3 <= v4 - 1 ) + result = a3; + do + { + if ( a2 == *(_WORD *)(v5 + 2 * result) ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (00456A40) -------------------------------------------------------- +int __fastcall std::wstring::_M_local_data(int a1) +{ + return a1 + 8; +} + +//----- (00456A50) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, wchar_t *String, int a3) +{ + int v4; // eax + + v4 = wcslen(String); + return std::wstring::find_first_of(this, String, a3, v4); +} + +//----- (00456A90) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, _WORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // ebp + unsigned int v5; // ebx + int v6; // edx + _WORD *v7; // eax + + if ( !a4 ) + return -1; + v4 = this[1]; + v5 = a3; + if ( v4 <= a3 ) + return -1; + while ( !a2 ) + { +LABEL_7: + if ( v4 <= ++v5 ) + return -1; + } + v6 = a4; + v7 = a2; + while ( *(_WORD *)(*this + 2 * v5) != *v7 ) + { + ++v7; + if ( !--v6 ) + goto LABEL_7; + } + return v5; +} + +//----- (00456AF0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_first_of(_DWORD *this, int a2, unsigned int a3) +{ + return std::wstring::find_first_of(this, *(_WORD **)a2, a3, *(_DWORD *)(a2 + 4)); +} + +//----- (00456B20) -------------------------------------------------------- +int __thiscall std::wstring::find_first_of(_DWORD *this, __int16 a2, unsigned int a3) +{ + return std::wstring::find(this, a2, a3); +} + +//----- (00456B30) -------------------------------------------------------- +void *__thiscall std::wstring::get_allocator(void *this, int a2) +{ + return this; +} + +//----- (00456B40) -------------------------------------------------------- +unsigned int __thiscall std::wstring::_M_check_length(_DWORD *this, int a2, unsigned int a3, std::length_error *a4) +{ + unsigned int result; // eax + + result = a2 + 0x1FFFFFFF - this[1]; + if ( result < a3 ) + std::__throw_length_error(a4); + return result; +} + +//----- (00456B70) -------------------------------------------------------- +int __fastcall std::wstring::_M_get_allocator(int a1) +{ + return a1; +} + +//----- (00456B80) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, wchar_t *String, int a3) +{ + int v4; // eax + + v4 = wcslen(String); + return std::wstring::find_last_not_of(this, String, a3, v4); +} + +//----- (00456BC0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, _WORD *a2, unsigned int a3, int a4) +{ + int v4; // eax + unsigned int v5; // ebx + unsigned int v6; // eax + _WORD *v7; // eax + int v8; // edx + + v4 = this[1]; + v5 = -1; + if ( v4 ) + { + v6 = v4 - 1; + v5 = a3; + if ( v6 <= a3 ) + v5 = v6; + while ( a4 && a2 ) + { + v7 = a2; + v8 = a4; + while ( *(_WORD *)(*this + 2 * v5) != *v7 ) + { + ++v7; + if ( !--v8 ) + return v5; + } + if ( v5-- == 0 ) + return v5; + } + } + return v5; +} + +//----- (00456C30) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find_last_not_of(_DWORD *this, int a2, unsigned int a3) +{ + return std::wstring::find_last_not_of(this, *(_WORD **)a2, a3, *(_DWORD *)(a2 + 4)); +} + +//----- (00456C60) -------------------------------------------------------- +int __thiscall std::wstring::find_last_not_of(int *this, __int16 a2, unsigned int a3) +{ + int result; // eax + int v4; // ebx + int v5; // ecx + + result = -1; + v4 = this[1]; + if ( v4 ) + { + result = v4 - 1; + v5 = *this; + if ( v4 - 1 > a3 ) + result = a3; + do + { + if ( *(_WORD *)(v5 + 2 * result) != a2 ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (00456CA0) -------------------------------------------------------- +int __thiscall std::wstring::find_first_not_of(int *this, wchar_t *String, unsigned int a3) +{ + unsigned int v4; // ebx + size_t v5; // eax + unsigned int v6; // esi + int v7; // ebp + size_t v8; // edi + __int16 v9; // cx + wchar_t *v10; // eax + size_t v11; // edx + + v4 = a3; + v5 = wcslen(String); + v6 = this[1]; + if ( a3 < v6 ) + { + v7 = *this; + v8 = v5; + if ( !v5 ) + return v4; + v9 = *(_WORD *)(v7 + 2 * a3); + if ( !String ) + return v4; + while ( 1 ) + { + v10 = String; + v11 = v8; + while ( v9 != *v10 ) + { + ++v10; + if ( !--v11 ) + return v4; + } + if ( ++v4 == v6 ) + break; + v9 = *(_WORD *)(v7 + 2 * v4); + } + } + return -1; +} + +//----- (00456D30) -------------------------------------------------------- +int __thiscall std::wstring::find_first_not_of(int *this, _WORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // ebx + unsigned int v5; // esi + int v6; // edi + __int16 v7; // cx + _WORD *v8; // eax + int v9; // edx + + v4 = a3; + v5 = this[1]; + if ( a3 < v5 ) + { + v6 = *this; + if ( !a4 ) + return v4; + v7 = *(_WORD *)(*this + 2 * a3); + if ( !a2 ) + return v4; + while ( 1 ) + { + v8 = a2; + v9 = a4; + while ( v7 != *v8 ) + { + ++v8; + if ( !--v9 ) + return v4; + } + if ( ++v4 == v5 ) + break; + v7 = *(_WORD *)(v6 + 2 * v4); + } + } + return -1; +} + +//----- (00456DB0) -------------------------------------------------------- +int __thiscall std::wstring::find_first_not_of(int *this, _DWORD *a2, unsigned int a3) +{ + unsigned int v3; // esi + unsigned int v4; // ebx + int v5; // edi + __int16 v6; // cx + _WORD *v7; // eax + int v8; // edx + + v3 = this[1]; + v4 = a3; + if ( a3 < v3 ) + { + v5 = *this; + if ( !a2[1] ) + return v4; + v6 = *(_WORD *)(*this + 2 * a3); + if ( !*a2 ) + return v4; + while ( 1 ) + { + v7 = (_WORD *)*a2; + v8 = a2[1]; + while ( v6 != *v7 ) + { + ++v7; + if ( !--v8 ) + return v4; + } + if ( ++v4 == v3 ) + break; + v6 = *(_WORD *)(v5 + 2 * v4); + } + } + return -1; +} + +//----- (00456E30) -------------------------------------------------------- +int __thiscall std::wstring::find_first_not_of(_DWORD *this, __int16 a2, unsigned int a3) +{ + int result; // eax + unsigned int v4; // edx + + result = a3; + v4 = this[1]; + if ( a3 >= v4 ) + return -1; + while ( *(_WORD *)(*this + 2 * result) == a2 ) + { + if ( ++result == v4 ) + return -1; + } + return result; +} + +//----- (00456E80) -------------------------------------------------------- +unsigned int __thiscall std::wstring::at(_DWORD *this, unsigned int a2) +{ + if ( a2 >= this[1] ) + std::__throw_out_of_range_fmt("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", a2, this[1]); + return *this + 2 * a2; +} + +//----- (00456EB0) -------------------------------------------------------- +int __fastcall std::wstring::end(_DWORD *a1) +{ + return *a1 + 2 * a1[1]; +} + +//----- (00456EC0) -------------------------------------------------------- +int __fastcall std::wstring::back(_DWORD *a1) +{ + return *a1 + 2 * a1[1] - 2; +} + +//----- (00456ED0) -------------------------------------------------------- +int __fastcall std::wstring::cend(_DWORD *a1) +{ + return *a1 + 2 * a1[1]; +} + +//----- (00456EE0) -------------------------------------------------------- +int __thiscall std::wstring::copy(_DWORD *this, _WORD *a2, unsigned int a3, unsigned int a4) +{ + unsigned int v4; // ebx + unsigned int v5; // ebx + _WORD *Src; // eax + + v4 = this[1]; + if ( a4 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::copy", + a4, + this[1]); + v5 = v4 - a4; + if ( v5 > a3 ) + v5 = a3; + if ( !v5 ) + return v5; + Src = (_WORD *)(*this + 2 * a4); + if ( v5 != 1 ) + { + memcpy(a2, Src, 2 * v5); + return v5; + } + *a2 = *Src; + return 1; +} + +//----- (00456F60) -------------------------------------------------------- +int __fastcall std::wstring::data(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00456F70) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find(int *this, wchar_t *String, int a3) +{ + unsigned int v4; // eax + + v4 = wcslen(String); + return std::wstring::find(this, String, a3, v4); +} + +//----- (00456FB0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find(int *this, _WORD *a2, unsigned int a3, unsigned int a4) +{ + unsigned int v4; // ebx + _WORD *v5; // eax + unsigned int v6; // edx + int v8; // edx + __int16 v9; // bx + unsigned int v10; // edx + int v11; // ecx + int v12; // [esp+0h] [ebp-18h] + int v13; // [esp+4h] [ebp-14h] + + v4 = this[1]; + if ( a4 ) + { + if ( v4 > a3 && (v13 = *this, v5 = (_WORD *)(*this + 2 * a3), a4 <= v4 - a3) && (v6 = 1 - a4 + v4 - a3, v5) && v6 ) + { + v12 = v13 + 2 * v4; +LABEL_7: + while ( *a2 != *v5 ) + { + ++v5; + if ( !--v6 ) + return -1; + } + if ( a2 != v5 ) + { + v8 = 0; + while ( a4 - 1 != v8 ) + { + v9 = v5[++v8]; + if ( v9 != a2[v8] ) + { + v10 = (v12 - (int)++v5) >> 1; + if ( a4 <= v10 ) + { + v6 = 1 - a4 + v10; + if ( v6 ) + goto LABEL_7; + } + return -1; + } + } + } + return ((int)v5 - v13) >> 1; + } + else + { + return -1; + } + } + else + { + v11 = -1; + if ( v4 >= a3 ) + return a3; + return v11; + } +} + +//----- (004570B0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::find(int *this, int a2, unsigned int a3) +{ + return std::wstring::find(this, *(_WORD **)a2, a3, *(_DWORD *)(a2 + 4)); +} + +//----- (004570E0) -------------------------------------------------------- +int __thiscall std::wstring::find(_DWORD *this, __int16 a2, unsigned int a3) +{ + unsigned int v3; // eax + int v4; // eax + _WORD *v5; // edx + + v3 = this[1]; + if ( a3 >= v3 ) + return -1; + v4 = v3 - a3; + v5 = (_WORD *)(*this + 2 * a3); + if ( !v5 ) + return -1; + while ( *v5 != a2 ) + { + ++v5; + if ( !--v4 ) + return -1; + } + return ((int)v5 - *this) >> 1; +} + +//----- (00457140) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::rend(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2; + return result; +} + +//----- (00457150) -------------------------------------------------------- +int __fastcall std::wstring::size(int a1) +{ + return *(_DWORD *)(a1 + 4); +} + +//----- (00457160) -------------------------------------------------------- +int __fastcall std::wstring::begin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00457170) -------------------------------------------------------- +int __fastcall std::wstring::c_str(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00457180) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::crend(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2; + return result; +} + +//----- (00457190) -------------------------------------------------------- +bool __fastcall std::wstring::empty(int a1) +{ + return *(_DWORD *)(a1 + 4) == 0; +} + +//----- (004571A0) -------------------------------------------------------- +int __fastcall std::wstring::front(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (004571B0) -------------------------------------------------------- +int __thiscall std::wstring::rfind(_DWORD *this, wchar_t *String, int a3) +{ + unsigned int v4; // eax + + v4 = wcslen(String); + return std::wstring::rfind(this, String, a3, v4); +} + +//----- (004571F0) -------------------------------------------------------- +int __thiscall std::wstring::rfind(_DWORD *this, _WORD *a2, unsigned int a3, unsigned int a4) +{ + unsigned int v4; // ebx + unsigned int v5; // eax + unsigned int v6; // eax + _WORD *v7; // esi + _WORD *v8; // eax + _WORD *v9; // edx + unsigned int v10; // ecx + + v4 = -1; + v5 = this[1]; + if ( a4 <= v5 ) + { + v6 = v5 - a4; + v4 = a3; + if ( v6 <= a3 ) + v4 = v6; + v7 = (_WORD *)(*this + 2 * v4); + if ( a4 ) + { + while ( 1 ) + { + v8 = v7; + if ( v7 == a2 ) + break; + if ( (v7 != 0) == (a2 != 0) ) + { + v9 = a2; + v10 = a4; + while ( *v8 == *v9 ) + { + ++v8; + ++v9; + if ( !--v10 ) + return v4; + } + } + --v7; + if ( !v4 ) + return -1; + --v4; + } + } + } + return v4; +} +// 457261: conditional instruction was optimized away because %arg_8.4!=0 + +//----- (00457280) -------------------------------------------------------- +int __thiscall std::wstring::rfind(_DWORD *this, int a2, unsigned int a3) +{ + return std::wstring::rfind(this, *(_WORD **)a2, a3, *(_DWORD *)(a2 + 4)); +} + +//----- (004572B0) -------------------------------------------------------- +int __thiscall std::wstring::rfind(int *this, __int16 a2, unsigned int a3) +{ + int result; // eax + int v4; // ebx + int v5; // ecx + + result = -1; + v4 = this[1]; + if ( v4 ) + { + result = v4 - 1; + v5 = *this; + if ( v4 - 1 > a3 ) + result = a3; + do + { + if ( *(_WORD *)(v5 + 2 * result) == a2 ) + break; + } + while ( result-- != 0 ); + } + return result; +} + +//----- (004572F0) -------------------------------------------------------- +int __fastcall std::wstring::cbegin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00457300) -------------------------------------------------------- +int __fastcall std::wstring::length(int a1) +{ + return *(_DWORD *)(a1 + 4); +} + +//----- (00457310) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::rbegin(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2 + 2 * a2[1]; + return result; +} + +//----- (00457330) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::substr(_DWORD *this, _DWORD *a2, unsigned int a3, unsigned int a4) +{ + unsigned int v5; // eax + unsigned int v6; // eax + int v8; // [esp+8h] [ebp-14h] + + v5 = a2[1]; + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::substr", + a3, + a2[1]); + v6 = v5 - a3; + *this = this + 2; + if ( v6 > a4 ) + v6 = a4; + LOBYTE(v8) = 0; + std::wstring::_M_construct(this, (_WORD *)(*a2 + 2 * a3), *a2 + 2 * a3 + 2 * v6, v8); + return this; +} +// 45736D: variable 'v8' is possibly undefined + +//----- (004573A0) -------------------------------------------------------- +int __fastcall std::wstring::_M_data(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (004573B0) -------------------------------------------------------- +int __thiscall std::wstring::compare(wchar_t **this, wchar_t *String) +{ + wchar_t *v3; // esi + wchar_t *v4; // ebx + size_t v5; // edx + wchar_t *v6; // eax + wchar_t *v7; // edx + wchar_t *v9; // [esp+18h] [ebp-24h] + size_t v10; // [esp+1Ch] [ebp-20h] + + v3 = this[1]; + v4 = String; + v5 = wcslen(String); + v10 = v5; + v6 = v3; + if ( v5 <= (unsigned int)v3 ) + v6 = (wchar_t *)v5; + v9 = v6; + if ( !v6 ) + return (int)v3 - v10; + v7 = *this; + if ( String == *this ) + return (int)v3 - v10; + if ( (v7 != 0) != (String != 0) ) + return String == 0 ? 1 : -1; + while ( *v7 == *v4 ) + { + ++v7; + ++v4; + v9 = (wchar_t *)((char *)v9 - 1); + if ( !v9 ) + return (int)v3 - v10; + } + return *v7 < *v4 ? -1 : 1; +} + +//----- (00457450) -------------------------------------------------------- +int __thiscall std::wstring::compare(_DWORD *this, int a2) +{ + unsigned int v2; // ebx + unsigned int v3; // esi + _WORD *v4; // eax + _WORD *v5; // ecx + unsigned int v7; // [esp+0h] [ebp-18h] + unsigned int v8; // [esp+4h] [ebp-14h] + + v2 = this[1]; + v8 = v2; + v3 = *(_DWORD *)(a2 + 4); + if ( v3 <= v2 ) + v2 = *(_DWORD *)(a2 + 4); + v7 = v2; + if ( !v2 ) + return v8 - v3; + v4 = *(_WORD **)a2; + v5 = (_WORD *)*this; + if ( *(_WORD **)a2 == v5 ) + return v8 - v3; + if ( (v5 != 0) != (v4 != 0) ) + return v4 == 0 ? 1 : -1; + while ( *v5 == *v4 ) + { + ++v5; + ++v4; + if ( !--v7 ) + return v8 - v3; + } + return *v5 < *v4 ? -1 : 1; +} + +//----- (004574F0) -------------------------------------------------------- +int __thiscall std::wstring::compare(_DWORD *this, unsigned int a2, unsigned int a3, wchar_t *String) +{ + unsigned int v4; // ebx + unsigned int v5; // eax + wchar_t *v6; // esi + unsigned int v7; // ebx + unsigned int v9; // ebx + size_t v10; // ecx + size_t v11; // eax + wchar_t *v12; // edx + unsigned int v14; // [esp+1Ch] [ebp-20h] + + v4 = this[1]; + v5 = a3; + v6 = String; + if ( a2 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + this[1]); + v7 = v4 - a2; + if ( v7 <= a3 ) + v5 = v7; + v9 = v5; + v14 = v5; + v10 = wcslen(String); + v11 = v9; + if ( v10 <= v9 ) + v11 = v10; + if ( !v11 ) + return v14 - v10; + v12 = (wchar_t *)(*this + 2 * a2); + if ( v12 == String ) + return v14 - v10; + if ( (v12 != 0) != (String != 0) ) + return String == 0 ? 1 : -1; + while ( *v12 == *v6 ) + { + ++v12; + ++v6; + if ( !--v11 ) + return v14 - v10; + } + return *v12 < *v6 ? -1 : 1; +} + +//----- (004575D0) -------------------------------------------------------- +int __thiscall std::wstring::compare(_DWORD *this, unsigned int a2, unsigned int a3, _WORD *a4, unsigned int a5) +{ + unsigned int v6; // eax + unsigned int v7; // edi + _WORD *v8; // ecx + unsigned int v9; // eax + unsigned int v10; // ebx + unsigned int v11; // edi + _WORD *v12; // edx + unsigned int v14; // [esp+1Ch] [ebp-20h] + + v6 = this[1]; + v7 = a3; + v8 = a4; + if ( a2 > v6 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + v6); + v9 = v6 - a2; + v10 = a5; + if ( v9 <= a3 ) + v7 = v9; + if ( v7 <= a5 ) + v10 = v7; + v14 = v7; + v11 = v10; + if ( !v10 ) + return v14 - a5; + v12 = (_WORD *)(*this + 2 * a2); + if ( v12 == a4 ) + return v14 - a5; + if ( (v12 != 0) != (a4 != 0) ) + return a4 == 0 ? 1 : -1; + while ( *v12 == *v8 ) + { + ++v12; + ++v8; + if ( !--v11 ) + return v14 - a5; + } + return *v12 < *v8 ? -1 : 1; +} + +//----- (004576A0) -------------------------------------------------------- +int __thiscall std::wstring::compare(_DWORD *this, unsigned int a2, unsigned int a3, int a4) +{ + unsigned int v4; // eax + unsigned int v5; // ebx + unsigned int v6; // eax + unsigned int v7; // esi + unsigned int v8; // eax + _WORD *v9; // edx + _WORD *v10; // ecx + unsigned int v12; // [esp+18h] [ebp-24h] + + v4 = this[1]; + v5 = a3; + if ( a2 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + v4); + v6 = v4 - a2; + v7 = *(_DWORD *)(a4 + 4); + if ( v6 <= a3 ) + v5 = v6; + v8 = v5; + if ( v7 <= v5 ) + v8 = *(_DWORD *)(a4 + 4); + v12 = v8; + if ( !v8 ) + return v5 - v7; + v9 = *(_WORD **)a4; + v10 = (_WORD *)(*this + 2 * a2); + if ( v10 == *(_WORD **)a4 ) + return v5 - v7; + if ( (v10 != 0) != (v9 != 0) ) + return v9 == 0 ? 1 : -1; + while ( *v10 == *v9 ) + { + ++v10; + ++v9; + if ( !--v12 ) + return v5 - v7; + } + return *v10 < *v9 ? -1 : 1; +} + +//----- (00457770) -------------------------------------------------------- +int __thiscall std::wstring::compare( + _DWORD *this, + unsigned int a2, + unsigned int a3, + _DWORD *a4, + unsigned int a5, + unsigned int a6) +{ + unsigned int v6; // eax + unsigned int v7; // edi + unsigned int v8; // edx + unsigned int v9; // eax + unsigned int v10; // edx + unsigned int v11; // edx + unsigned int v12; // ebx + _WORD *v13; // esi + _WORD *i; // ecx + + v6 = this[1]; + v7 = a6; + if ( a2 > v6 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a2, + this[1]); + v8 = a4[1]; + if ( a5 > v8 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::compare", + a5, + a4[1]); + v9 = v6 - a2; + if ( v9 > a3 ) + v9 = a3; + v10 = v8 - a5; + if ( v10 <= a6 ) + v7 = v10; + v11 = v9; + if ( v7 <= v9 ) + v11 = v7; + if ( !v11 ) + return v9 - v7; + v12 = *this + 2 * a2; + v13 = (_WORD *)(*a4 + 2 * a5); + if ( v13 == (_WORD *)v12 ) + return v9 - v7; + if ( (v12 != 0) != (v13 != 0) ) + return v13 == 0 ? 1 : -1; + for ( i = (_WORD *)(*this + 2 * a2); *i == *v13; ++i ) + { + ++v13; + if ( !--v11 ) + return v9 - v7; + } + return *i < *v13 ? -1 : 1; +} + +//----- (00457880) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::crbegin(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2 + 2 * a2[1]; + return result; +} + +//----- (004578A0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::_M_check(_DWORD *this, unsigned int a2, const char *a3) +{ + unsigned int v3; // edx + unsigned int result; // eax + + v3 = this[1]; + result = a2; + if ( a2 > v3 ) + std::__throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)", a3, a2, v3); + return result; +} + +//----- (004578D0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::_M_limit(_DWORD *this, int a2, unsigned int a3) +{ + unsigned int result; // eax + + result = this[1] - a2; + if ( result > a3 ) + return a3; + return result; +} + +//----- (004578F0) -------------------------------------------------------- +int __fastcall std::wstring::capacity(_DWORD *a1) +{ + if ( (_DWORD *)*a1 == a1 + 2 ) + return 7; + else + return a1[2]; +} + +//----- (00457910) -------------------------------------------------------- +int std::wstring::max_size() +{ + return 0x1FFFFFFF; +} + +//----- (00457920) -------------------------------------------------------- +int __thiscall std::wstring::operator[](_DWORD *this, int a2) +{ + return *this + 2 * a2; +} + +//----- (00457930) -------------------------------------------------------- +int __thiscall std::stringbuf::str(int this, int a2) +{ + unsigned int v3; // eax + unsigned int v4; // edx + int v5; // ecx + + *(_BYTE *)(this + 8) = 0; + *(_DWORD *)this = this + 8; + *(_DWORD *)(this + 4) = 0; + v3 = *(_DWORD *)(a2 + 20); + if ( v3 ) + { + v4 = *(_DWORD *)(a2 + 12); + v5 = *(_DWORD *)(a2 + 16); + if ( v3 > v4 ) + std::string::_M_replace((unsigned int **)this, 0, 0, *(char **)(a2 + 16), v3 - v5); + else + std::string::_M_replace((unsigned int **)this, 0, 0, *(char **)(a2 + 16), v4 - v5); + } + else + { + std::string::_M_assign(this, a2 + 36); + } + return this; +} + +//----- (00457A50) -------------------------------------------------------- +int __thiscall std::wstringbuf::str(int this, _DWORD *a2) +{ + unsigned int v3; // eax + unsigned int v4; // edx + int v5; // ecx + + *(_DWORD *)(this + 4) = 0; + *(_DWORD *)this = this + 8; + *(_WORD *)(this + 8) = 0; + v3 = a2[5]; + if ( v3 ) + { + v4 = a2[3]; + v5 = a2[4]; + if ( v3 > v4 ) + std::wstring::_M_replace((unsigned int **)this, 0, 0, (char *)a2[4], (int)(v3 - v5) >> 1); + else + std::wstring::_M_replace((unsigned int **)this, 0, 0, (char *)a2[4], (int)(v4 - v5) >> 1); + } + else + { + std::wstring::_M_assign(this, (int)(a2 + 9)); + } + return this; +} + +//----- (00457B80) -------------------------------------------------------- +int __thiscall std::basic_stringstream,std::allocator>::str(int this, int a2) +{ + unsigned int v3; // eax + unsigned int v4; // edx + int v5; // ecx + + *(_BYTE *)(this + 8) = 0; + *(_DWORD *)this = this + 8; + *(_DWORD *)(this + 4) = 0; + v3 = *(_DWORD *)(a2 + 32); + if ( v3 ) + { + v4 = *(_DWORD *)(a2 + 24); + v5 = *(_DWORD *)(a2 + 28); + if ( v3 > v4 ) + std::string::_M_replace((unsigned int **)this, 0, 0, *(char **)(a2 + 28), v3 - v5); + else + std::string::_M_replace((unsigned int **)this, 0, 0, *(char **)(a2 + 28), v4 - v5); + } + else + { + std::string::_M_assign(this, a2 + 48); + } + return this; +} + +//----- (00457CA0) -------------------------------------------------------- +int __fastcall std::basic_stringstream,std::allocator>::rdbuf(int a1) +{ + return a1 + 12; +} + +//----- (00457CB0) -------------------------------------------------------- +int __thiscall std::basic_stringstream,std::allocator>::str( + int this, + _DWORD *a2) +{ + unsigned int v3; // eax + unsigned int v4; // edx + int v5; // ecx + + *(_DWORD *)(this + 4) = 0; + *(_DWORD *)this = this + 8; + *(_WORD *)(this + 8) = 0; + v3 = a2[8]; + if ( v3 ) + { + v4 = a2[6]; + v5 = a2[7]; + if ( v3 > v4 ) + std::wstring::_M_replace((unsigned int **)this, 0, 0, (char *)a2[7], (int)(v3 - v5) >> 1); + else + std::wstring::_M_replace((unsigned int **)this, 0, 0, (char *)a2[7], (int)(v4 - v5) >> 1); + } + else + { + std::wstring::_M_assign(this, (int)(a2 + 12)); + } + return this; +} + +//----- (00457DE0) -------------------------------------------------------- +int __fastcall std::basic_stringstream,std::allocator>::rdbuf(int a1) +{ + return a1 + 12; +} + +//----- (00457DF0) -------------------------------------------------------- +int __thiscall std::istringstream::str(int this, int a2) +{ + unsigned int v3; // eax + unsigned int v4; // edx + int v5; // ecx + + *(_BYTE *)(this + 8) = 0; + *(_DWORD *)this = this + 8; + *(_DWORD *)(this + 4) = 0; + v3 = *(_DWORD *)(a2 + 28); + if ( v3 ) + { + v4 = *(_DWORD *)(a2 + 20); + v5 = *(_DWORD *)(a2 + 24); + if ( v3 > v4 ) + std::string::_M_replace((unsigned int **)this, 0, 0, *(char **)(a2 + 24), v3 - v5); + else + std::string::_M_replace((unsigned int **)this, 0, 0, *(char **)(a2 + 24), v4 - v5); + } + else + { + std::string::_M_assign(this, a2 + 44); + } + return this; +} + +//----- (00457F10) -------------------------------------------------------- +int __fastcall std::istringstream::rdbuf(int a1) +{ + return a1 + 8; +} + +//----- (00457F20) -------------------------------------------------------- +int __thiscall std::wistringstream::str(int this, _DWORD *a2) +{ + unsigned int v3; // eax + unsigned int v4; // edx + int v5; // ecx + + *(_DWORD *)(this + 4) = 0; + *(_DWORD *)this = this + 8; + *(_WORD *)(this + 8) = 0; + v3 = a2[7]; + if ( v3 ) + { + v4 = a2[5]; + v5 = a2[6]; + if ( v3 > v4 ) + std::wstring::_M_replace((unsigned int **)this, 0, 0, (char *)a2[6], (int)(v3 - v5) >> 1); + else + std::wstring::_M_replace((unsigned int **)this, 0, 0, (char *)a2[6], (int)(v4 - v5) >> 1); + } + else + { + std::wstring::_M_assign(this, (int)(a2 + 11)); + } + return this; +} + +//----- (00458050) -------------------------------------------------------- +int __fastcall std::wistringstream::rdbuf(int a1) +{ + return a1 + 8; +} + +//----- (00458060) -------------------------------------------------------- +int __thiscall std::ostringstream::str(int this, int a2) +{ + unsigned int v3; // eax + unsigned int v4; // edx + int v5; // ecx + + *(_BYTE *)(this + 8) = 0; + *(_DWORD *)this = this + 8; + *(_DWORD *)(this + 4) = 0; + v3 = *(_DWORD *)(a2 + 24); + if ( v3 ) + { + v4 = *(_DWORD *)(a2 + 16); + v5 = *(_DWORD *)(a2 + 20); + if ( v3 > v4 ) + std::string::_M_replace((unsigned int **)this, 0, 0, *(char **)(a2 + 20), v3 - v5); + else + std::string::_M_replace((unsigned int **)this, 0, 0, *(char **)(a2 + 20), v4 - v5); + } + else + { + std::string::_M_assign(this, a2 + 40); + } + return this; +} + +//----- (00458180) -------------------------------------------------------- +int __fastcall std::ostringstream::rdbuf(int a1) +{ + return a1 + 4; +} + +//----- (00458190) -------------------------------------------------------- +int __thiscall std::wostringstream::str(int this, _DWORD *a2) +{ + unsigned int v3; // eax + unsigned int v4; // edx + int v5; // ecx + + *(_DWORD *)(this + 4) = 0; + *(_DWORD *)this = this + 8; + *(_WORD *)(this + 8) = 0; + v3 = a2[6]; + if ( v3 ) + { + v4 = a2[4]; + v5 = a2[5]; + if ( v3 > v4 ) + std::wstring::_M_replace((unsigned int **)this, 0, 0, (char *)a2[5], (int)(v3 - v5) >> 1); + else + std::wstring::_M_replace((unsigned int **)this, 0, 0, (char *)a2[5], (int)(v4 - v5) >> 1); + } + else + { + std::wstring::_M_assign(this, (int)(a2 + 10)); + } + return this; +} + +//----- (004582C0) -------------------------------------------------------- +int __fastcall std::wostringstream::rdbuf(int a1) +{ + return a1 + 4; +} + +//----- (004582D0) -------------------------------------------------------- +int __stdcall std::collate::_M_compare(char *String1, char *String2) +{ + int v2; // eax + + v2 = strcoll(String1, String2); + return (v2 >> 30) | (v2 != 0); +} + +//----- (00458300) -------------------------------------------------------- +int __stdcall std::collate::do_compare(_BYTE *a1, int a2, _BYTE *a3, int a4) +{ + int i; // eax + char *v5; // eax + int v7; // [esp+8h] [ebp-90h] + int v8; // [esp+8h] [ebp-90h] + char *v9; // [esp+14h] [ebp-84h] + int v10; // [esp+1Ch] [ebp-7Ch] + char *v11; // [esp+20h] [ebp-78h] + char *v12; // [esp+24h] [ebp-74h] + char *Str; // [esp+28h] [ebp-70h] + char *Stra; // [esp+28h] [ebp-70h] + void *v15[2]; // [esp+60h] [ebp-38h] BYREF + char v16[16]; // [esp+68h] [ebp-30h] BYREF + void *Block[2]; // [esp+78h] [ebp-20h] BYREF + char v18[20]; // [esp+80h] [ebp-18h] BYREF + + LOBYTE(v7) = 0; + v15[0] = v16; + std::string::_M_construct(v15, a1, a2, v7); + Block[0] = v18; + LOBYTE(v8) = 0; + std::string::_M_construct(Block, a3, a4, v8); + Str = (char *)v15[0]; + v9 = (char *)v15[1] + (unsigned int)v15[0]; + v12 = (char *)Block[0]; + v11 = (char *)Block[1] + (unsigned int)Block[0]; + for ( i = std::collate::_M_compare((char *)v15[0], (char *)Block[0]); + ; + i = std::collate::_M_compare(Str, v5 + 1) ) + { + v10 = i; + if ( i ) + break; + Stra = &Str[strlen(Str)]; + v5 = &v12[strlen(v12)]; + if ( v9 == Stra ) + { + if ( v11 == v5 ) + break; + if ( v9 == Stra ) + { + v10 = -1; + break; + } + } + if ( v11 == v5 ) + { + v10 = 1; + break; + } + v12 = v5 + 1; + Str = Stra + 1; + } + if ( Block[0] != v18 ) + operator delete(Block[0]); + if ( v15[0] != v16 ) + operator delete(v15[0]); + return v10; +} +// 458355: variable 'v7' is possibly undefined +// 45837F: variable 'v8' is possibly undefined + +//----- (00458490) -------------------------------------------------------- +size_t __stdcall std::collate::_M_transform(char *Destination, char *Source, size_t MaxCount) +{ + return strxfrm(Destination, Source, MaxCount); +} + +//----- (004584C0) -------------------------------------------------------- +_DWORD *__thiscall std::collate::do_transform(_DWORD *this, int a2, _BYTE *a3, int a4) +{ + unsigned int i; // eax + char *v5; // eax + int v6; // eax + unsigned int v7; // edx + int v9; // [esp+8h] [ebp-90h] + _DWORD *v10; // [esp+1Ch] [ebp-7Ch] + char *v11; // [esp+20h] [ebp-78h] + size_t v12; // [esp+24h] [ebp-74h] + unsigned int v13; // [esp+28h] [ebp-70h] + char *Block; // [esp+2Ch] [ebp-6Ch] + unsigned int v15; // [esp+30h] [ebp-68h] + char *Str; // [esp+34h] [ebp-64h] + void *v18[2]; // [esp+78h] [ebp-20h] BYREF + char v19[20]; // [esp+80h] [ebp-18h] BYREF + + this[1] = 0; + *this = this + 2; + *((_BYTE *)this + 8) = 0; + v18[0] = v19; + LOBYTE(v9) = 0; + v10 = this + 2; + std::string::_M_construct(v18, a3, a4, v9); + Str = (char *)v18[0]; + v11 = (char *)v18[1] + (unsigned int)v18[0]; + v15 = 2 * (a4 - (_DWORD)a3); + Block = (char *)operator new[](v15); + for ( i = std::collate::_M_transform(Block, Str, v15); ; i = std::collate::_M_transform(Block, Str, v15) ) + { + if ( v15 <= i ) + { + v15 = i + 1; + operator delete[](Block); + Block = (char *)operator new[](v15); + i = std::collate::_M_transform(Block, Str, v15); + } + if ( i > 0x3FFFFFFF - this[1] ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(this, Block, i); + v5 = &Str[strlen(Str)]; + if ( v11 == v5 ) + break; + Str = v5 + 1; + v12 = this[1]; + v13 = v12 + 1; + v6 = *this; + if ( v10 == (_DWORD *)*this ) + v7 = 15; + else + v7 = this[2]; + if ( v13 > v7 ) + { + std::string::_M_mutate((int)this, v12, 0, 0, 1u); + v6 = *this; + } + *(_BYTE *)(v6 + v12) = 0; + this[1] = v13; + *(_BYTE *)(*this + v12 + 1) = 0; + } + operator delete[](Block); + if ( v18[0] != v19 ) + operator delete(v18[0]); + return this; +} +// 45852B: variable 'v9' is possibly undefined + +//----- (00458770) -------------------------------------------------------- +int __thiscall std::collate::hash(void *this, char *a2, char *a3) +{ + char *v3; // edx + int (__stdcall *v4)(char *, char *); // eax + int result; // eax + int v6; // ecx + + v3 = a2; + v4 = *(int (__stdcall **)(char *, char *))(*(_DWORD *)this + 16); + if ( v4 != std::collate::do_hash ) + return v4(a2, a3); + result = 0; + if ( a2 < a3 ) + { + do + { + v6 = *v3++; + result = v6 + __ROL4__(result, 7); + } + while ( a3 != v3 ); + } + return result; +} + +//----- (004587C0) -------------------------------------------------------- +int __fastcall std::collate::compare(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 8))(a1); +} + +//----- (004587D0) -------------------------------------------------------- +int __stdcall std::collate::do_hash(char *a1, char *a2) +{ + char *v2; // edx + int result; // eax + int v4; // ecx + + v2 = a1; + result = 0; + if ( a1 < a2 ) + { + do + { + v4 = *v2++; + result = v4 + __ROL4__(result, 7); + } + while ( a2 != v2 ); + } + return result; +} + +//----- (00458800) -------------------------------------------------------- +void *__thiscall std::collate::transform(void *this, int a2, int a3, int a4) +{ + (*(void (__thiscall **)(void *, int, int, int))(*(_DWORD *)a2 + 12))(this, a2, a3, a4); + return this; +} + +//----- (00458830) -------------------------------------------------------- +int __stdcall std::collate::_M_compare(wchar_t *String1, wchar_t *String2) +{ + int v2; // eax + + v2 = wcscoll(String1, String2); + return (v2 >> 30) | (v2 != 0); +} + +//----- (00458860) -------------------------------------------------------- +int __stdcall std::collate::do_compare(_WORD *a1, int a2, _WORD *a3, int a4) +{ + int i; // eax + wchar_t *v5; // eax + int v7; // [esp+8h] [ebp-90h] + int v8; // [esp+8h] [ebp-90h] + wchar_t *v9; // [esp+14h] [ebp-84h] + int v10; // [esp+1Ch] [ebp-7Ch] + char *v11; // [esp+20h] [ebp-78h] + wchar_t *v12; // [esp+24h] [ebp-74h] + wchar_t *String; // [esp+28h] [ebp-70h] + wchar_t *Stringa; // [esp+28h] [ebp-70h] + void *v15[2]; // [esp+60h] [ebp-38h] BYREF + char v16[16]; // [esp+68h] [ebp-30h] BYREF + void *Block[2]; // [esp+78h] [ebp-20h] BYREF + char v18[20]; // [esp+80h] [ebp-18h] BYREF + + LOBYTE(v7) = 0; + v15[0] = v16; + std::wstring::_M_construct(v15, a1, a2, v7); + Block[0] = v18; + LOBYTE(v8) = 0; + std::wstring::_M_construct(Block, a3, a4, v8); + String = (wchar_t *)v15[0]; + v9 = (wchar_t *)((char *)v15[0] + 2 * (int)v15[1]); + v12 = (wchar_t *)Block[0]; + v11 = (char *)Block[0] + 2 * (int)Block[1]; + for ( i = std::collate::_M_compare((wchar_t *)v15[0], (wchar_t *)Block[0]); + ; + i = std::collate::_M_compare(String, v5 + 1) ) + { + v10 = i; + if ( i ) + break; + Stringa = &String[wcslen(String)]; + v5 = &v12[wcslen(v12)]; + if ( v9 == Stringa ) + { + if ( v11 == (char *)v5 ) + break; + if ( v9 == Stringa ) + { + v10 = -1; + break; + } + } + if ( v11 == (char *)v5 ) + { + v10 = 1; + break; + } + v12 = v5 + 1; + String = Stringa + 1; + } + if ( Block[0] != v18 ) + operator delete(Block[0]); + if ( v15[0] != v16 ) + operator delete(v15[0]); + return v10; +} +// 4588B5: variable 'v7' is possibly undefined +// 4588DF: variable 'v8' is possibly undefined + +//----- (00458A00) -------------------------------------------------------- +size_t __stdcall std::collate::_M_transform(wchar_t *Destination, wchar_t *Source, size_t MaxCount) +{ + return wcsxfrm(Destination, Source, MaxCount); +} + +//----- (00458A30) -------------------------------------------------------- +_DWORD *__thiscall std::collate::do_transform(_DWORD *this, int a2, _WORD *a3, int a4) +{ + unsigned int i; // eax + wchar_t *v5; // eax + int v6; // eax + unsigned int v7; // edx + int v9; // [esp+8h] [ebp-90h] + _DWORD *v10; // [esp+1Ch] [ebp-7Ch] + char *v11; // [esp+20h] [ebp-78h] + int v12; // [esp+24h] [ebp-74h] + unsigned int v13; // [esp+28h] [ebp-70h] + wchar_t *Block; // [esp+2Ch] [ebp-6Ch] + wchar_t *String; // [esp+30h] [ebp-68h] + size_t lpuexcpt; // [esp+38h] [ebp-60h] + void *v18[2]; // [esp+78h] [ebp-20h] BYREF + char v19[20]; // [esp+80h] [ebp-18h] BYREF + + this[1] = 0; + *this = this + 2; + v10 = this + 2; + *((_WORD *)this + 4) = 0; + v18[0] = v19; + LOBYTE(v9) = 0; + std::wstring::_M_construct(v18, a3, a4, v9); + String = (wchar_t *)v18[0]; + v11 = (char *)v18[0] + 2 * (int)v18[1]; + lpuexcpt = a4 - (_DWORD)a3; + if ( (unsigned int)(a4 - (_DWORD)a3) > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + Block = (wchar_t *)operator new[](2 * (a4 - (_DWORD)a3)); + for ( i = std::collate::_M_transform(Block, String, lpuexcpt); + ; + i = std::collate::_M_transform(Block, String, lpuexcpt) ) + { + if ( lpuexcpt <= i ) + { + lpuexcpt = i + 1; + operator delete[](Block); + if ( lpuexcpt > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + Block = (wchar_t *)operator new[](2 * lpuexcpt); + i = std::collate::_M_transform(Block, String, lpuexcpt); + } + if ( i > 0x1FFFFFFF - this[1] ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append(this, Block, i); + v5 = &String[wcslen(String)]; + if ( v11 == (char *)v5 ) + break; + String = v5 + 1; + v12 = this[1]; + v13 = v12 + 1; + v6 = *this; + if ( v10 == (_DWORD *)*this ) + v7 = 7; + else + v7 = this[2]; + if ( v13 > v7 ) + { + std::wstring::_M_mutate((int)this, v12, 0, 0, 1); + v6 = *this; + } + *(_WORD *)(v6 + 2 * v12) = 0; + this[1] = v13; + *(_WORD *)(v6 + 2 * v12 + 2) = 0; + } + operator delete[](Block); + if ( v18[0] != v19 ) + operator delete(v18[0]); + return this; +} +// 458A9D: variable 'v9' is possibly undefined + +//----- (00458D20) -------------------------------------------------------- +int __thiscall std::collate::hash(void *this, unsigned __int16 *a2, unsigned int a3) +{ + unsigned __int16 *v3; // edx + int (__stdcall *v4)(unsigned __int16 *, unsigned int); // eax + int result; // eax + int v6; // ecx + + v3 = a2; + v4 = *(int (__stdcall **)(unsigned __int16 *, unsigned int))(*(_DWORD *)this + 16); + if ( v4 != std::collate::do_hash ) + return v4(a2, a3); + result = 0; + if ( (unsigned int)a2 < a3 ) + { + do + { + v6 = *v3++; + result = v6 + __ROL4__(result, 7); + } + while ( a3 > (unsigned int)v3 ); + } + return result; +} + +//----- (00458D70) -------------------------------------------------------- +int __fastcall std::collate::compare(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 8))(a1); +} + +//----- (00458D80) -------------------------------------------------------- +int __stdcall std::collate::do_hash(unsigned __int16 *a1, unsigned int a2) +{ + unsigned __int16 *v2; // edx + int result; // eax + int v4; // ecx + + v2 = a1; + for ( result = 0; a2 > (unsigned int)v2; result = v4 + __ROL4__(result, 7) ) + v4 = *v2++; + return result; +} + +//----- (00458DB0) -------------------------------------------------------- +void *__thiscall std::collate::transform(void *this, int a2, int a3, int a4) +{ + (*(void (__thiscall **)(void *, int, int, int))(*(_DWORD *)a2 + 12))(this, a2, a3, a4); + return this; +} + +//----- (00458DE0) -------------------------------------------------------- +int __stdcall std::messages::_M_convert_to_char(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00458DF0) -------------------------------------------------------- +_DWORD *__thiscall std::messages::_M_convert_from_char(_DWORD *this, int a2, int a3) +{ + _DWORD *result; // eax + + this[1] = 0; + result = this; + *this = this + 2; + *((_BYTE *)this + 8) = 0; + return result; +} + +//----- (00458E10) -------------------------------------------------------- +void *__thiscall std::messages::get(void *this, int a2, int a3, int a4, int a5, int a6) +{ + (*(void (__thiscall **)(void *, int, int, int, int, int))(*(_DWORD *)a2 + 12))(this, a2, a3, a4, a5, a6); + return this; +} + +//----- (00458E50) -------------------------------------------------------- +int __thiscall std::messages::open(void *this, int a2, int a3) +{ + int (__stdcall *v3)(int, int); // eax + + v3 = *(int (__stdcall **)(int, int))(*(_DWORD *)this + 8); + if ( v3 == std::messages::do_open ) + return 0; + else + return v3(a2, a3); +} + +//----- (00458E70) -------------------------------------------------------- +int __thiscall std::messages::open(void *this, int a2, int a3, int a4) +{ + int (__stdcall *v4)(int, int); // edx + + v4 = *(int (__stdcall **)(int, int))(*(_DWORD *)this + 8); + if ( v4 == std::messages::do_open ) + return 0; + else + return v4(a2, a3); +} + +//----- (00458EB0) -------------------------------------------------------- +int (__stdcall *__thiscall std::messages::close(void *this, int a2))(int) +{ + int (__stdcall *result)(int); // eax + + result = *(int (__stdcall **)(int))(*(_DWORD *)this + 16); + if ( result != std::messages::do_close ) + return (int (__stdcall *)(int))result(a2); + return result; +} +// 458F90: using guessed type int __stdcall std::messages::do_close(int); + +//----- (00458ED0) -------------------------------------------------------- +_DWORD *__thiscall std::messages::do_get(_DWORD *this, int a2, int a3, int a4, int a5, int a6) +{ + _DWORD *v6; // eax + _BYTE *Src; // edi + size_t Size; // esi + int v11[4]; // [esp+1Ch] [ebp-10h] BYREF + + v6 = this + 2; + *this = this + 2; + Src = *(_BYTE **)a6; + Size = *(_DWORD *)(a6 + 4); + if ( Size + *(_DWORD *)a6 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v11[0] = *(_DWORD *)(a6 + 4); + if ( Size > 0xF ) + { + v6 = std::string::_M_create((unsigned int *)v11, 0); + *this = v6; + this[2] = v11[0]; + goto LABEL_10; + } + if ( Size != 1 ) + { + if ( !Size ) + goto LABEL_6; +LABEL_10: + memcpy(v6, Src, Size); + Size = v11[0]; + v6 = (_DWORD *)*this; + goto LABEL_6; + } + *((_BYTE *)this + 8) = *Src; +LABEL_6: + this[1] = Size; + *((_BYTE *)v6 + Size) = 0; + return this; +} +// 458ED0: using guessed type size_t var_10[4]; + +//----- (00458F80) -------------------------------------------------------- +int __stdcall std::messages::do_open(int a1, int a2) +{ + return 0; +} + +//----- (00458FA0) -------------------------------------------------------- +int __stdcall std::messages::_M_convert_to_char(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00458FB0) -------------------------------------------------------- +_DWORD *__thiscall std::messages::_M_convert_from_char(_DWORD *this, int a2, int a3) +{ + _DWORD *result; // eax + + this[1] = 0; + result = this; + *this = this + 2; + *((_WORD *)this + 4) = 0; + return result; +} + +//----- (00458FD0) -------------------------------------------------------- +void *__thiscall std::messages::get(void *this, int a2, int a3, int a4, int a5, int a6) +{ + (*(void (__thiscall **)(void *, int, int, int, int, int))(*(_DWORD *)a2 + 12))(this, a2, a3, a4, a5, a6); + return this; +} + +//----- (00459010) -------------------------------------------------------- +int __thiscall std::messages::open(void *this, int a2, int a3) +{ + int (__stdcall *v3)(int, int); // eax + + v3 = *(int (__stdcall **)(int, int))(*(_DWORD *)this + 8); + if ( v3 == std::messages::do_open ) + return 0; + else + return v3(a2, a3); +} + +//----- (00459030) -------------------------------------------------------- +int __thiscall std::messages::open(void *this, int a2, int a3, int a4) +{ + int (__stdcall *v4)(int, int); // edx + + v4 = *(int (__stdcall **)(int, int))(*(_DWORD *)this + 8); + if ( v4 == std::messages::do_open ) + return 0; + else + return v4(a2, a3); +} + +//----- (00459070) -------------------------------------------------------- +int (__stdcall *__thiscall std::messages::close(void *this, int a2))(int) +{ + int (__stdcall *result)(int); // eax + + result = *(int (__stdcall **)(int))(*(_DWORD *)this + 16); + if ( result != std::messages::do_close ) + return (int (__stdcall *)(int))result(a2); + return result; +} +// 459160: using guessed type int __stdcall std::messages::do_close(int); + +//----- (00459090) -------------------------------------------------------- +_DWORD *__thiscall std::messages::do_get(_DWORD *this, int a2, int a3, int a4, int a5, int a6) +{ + _WORD *v6; // eax + _WORD *Src; // ebp + signed int Size; // esi + int v10; // edi + int v11; // edx + int v13[8]; // [esp+1Ch] [ebp-20h] BYREF + + v6 = this + 2; + *this = this + 2; + Src = *(_WORD **)a6; + Size = 2 * *(_DWORD *)(a6 + 4); + if ( Size + *(_DWORD *)a6 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v10 = Size >> 1; + v13[0] = Size >> 1; + if ( (unsigned int)Size > 0xE ) + { + v6 = std::wstring::_M_create((unsigned int *)v13, 0); + *this = v6; + this[2] = v13[0]; + } + if ( v10 == 1 ) + { + *v6 = *Src; + } + else if ( v10 ) + { + memcpy(v6, Src, Size); + v6 = (_WORD *)*this; + } + v11 = v13[0]; + this[1] = v13[0]; + v6[v11] = 0; + return this; +} +// 459090: using guessed type unsigned int var_20[8]; + +//----- (00459150) -------------------------------------------------------- +int __stdcall std::messages::do_open(int a1, int a2) +{ + return 0; +} + +//----- (00459170) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_grouping(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 8); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 459170: using guessed type size_t var_20[8]; + +//----- (00459220) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_truename(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 20); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 459220: using guessed type size_t var_20[8]; + +//----- (004592D0) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_falsename(_DWORD *this, int a2) +{ + _DWORD *v2; // ebp + const char *Str; // edi + size_t v5; // eax + size_t Size; // esi + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 28); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 4592D0: using guessed type size_t var_20[8]; + +//----- (00459380) -------------------------------------------------------- +int __fastcall std::numpunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::numpunct::do_decimal_point ) + return *(unsigned __int8 *)(a1[2] + 36); + else + return v1(); +} + +//----- (004593A0) -------------------------------------------------------- +int __fastcall std::numpunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::numpunct::do_thousands_sep ) + return *(unsigned __int8 *)(a1[2] + 37); + else + return v1(); +} + +//----- (004593C0) -------------------------------------------------------- +int __fastcall std::numpunct::do_decimal_point(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 36); +} + +//----- (004593D0) -------------------------------------------------------- +int __fastcall std::numpunct::do_thousands_sep(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 37); +} + +//----- (004593E0) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::numpunct::do_grouping ) + { + Str = *(char **)(a2[2] + 8); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 459424: variable 'v7' is possibly undefined + +//----- (00459460) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::truename(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::numpunct::do_truename ) + { + Str = *(char **)(a2[2] + 20); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 4594A4: variable 'v7' is possibly undefined + +//----- (004594E0) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::falsename(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::numpunct::do_falsename ) + { + Str = *(char **)(a2[2] + 28); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + LOBYTE(v7) = 0; + std::string::_M_construct(this, Str, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 459524: variable 'v7' is possibly undefined + +//----- (00459560) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_grouping(_DWORD *this, int a2) +{ + _DWORD *v2; // esi + const char *Str; // edi + size_t v5; // eax + size_t Size; // ebp + _DWORD *v8; // eax + int v9[8]; // [esp+1Ch] [ebp-20h] BYREF + + v2 = this + 2; + Str = *(const char **)(*(_DWORD *)(a2 + 8) + 8); + *this = this + 2; + if ( !Str ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v5 = strlen(Str); + v9[0] = v5; + Size = v5; + if ( v5 > 0xF ) + { + v8 = std::string::_M_create((unsigned int *)v9, 0); + *this = v8; + v2 = v8; + this[2] = v9[0]; + goto LABEL_9; + } + if ( v5 != 1 ) + { + if ( !v5 ) + goto LABEL_5; +LABEL_9: + memcpy(v2, Str, Size); + v5 = v9[0]; + v2 = (_DWORD *)*this; + goto LABEL_5; + } + *((_BYTE *)this + 8) = *Str; +LABEL_5: + this[1] = v5; + *((_BYTE *)v2 + v5) = 0; + return this; +} +// 459560: using guessed type size_t var_20[8]; + +//----- (00459610) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_truename(_DWORD *this, int a2) +{ + wchar_t *String; // esi + int v4; // eax + int v6; // [esp+8h] [ebp-14h] + + String = *(wchar_t **)(*(_DWORD *)(a2 + 8) + 20); + *this = this + 2; + v4 = -2; + if ( String ) + v4 = (int)&String[wcslen(String)]; + LOBYTE(v6) = 0; + std::wstring::_M_construct(this, String, v4, v6); + return this; +} +// 459648: variable 'v6' is possibly undefined + +//----- (00459660) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_falsename(_DWORD *this, int a2) +{ + wchar_t *String; // esi + int v4; // eax + int v6; // [esp+8h] [ebp-14h] + + String = *(wchar_t **)(*(_DWORD *)(a2 + 8) + 28); + *this = this + 2; + v4 = -2; + if ( String ) + v4 = (int)&String[wcslen(String)]; + LOBYTE(v6) = 0; + std::wstring::_M_construct(this, String, v4, v6); + return this; +} +// 459698: variable 'v6' is possibly undefined + +//----- (004596B0) -------------------------------------------------------- +int __fastcall std::numpunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::numpunct::do_decimal_point ) + return *(unsigned __int16 *)(a1[2] + 36); + else + return v1(); +} + +//----- (004596D0) -------------------------------------------------------- +int __fastcall std::numpunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::numpunct::do_thousands_sep ) + return *(unsigned __int16 *)(a1[2] + 38); + else + return v1(); +} + +//----- (004596F0) -------------------------------------------------------- +int __fastcall std::numpunct::do_decimal_point(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 36); +} + +//----- (00459700) -------------------------------------------------------- +int __fastcall std::numpunct::do_thousands_sep(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 38); +} + +//----- (00459710) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + char *Str; // esi + int v5; // eax + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::numpunct::do_grouping ) + { + Str = *(char **)(a2[2] + 8); + *this = this + 2; + v5 = -1; + if ( Str ) + v5 = (int)&Str[strlen(Str)]; + std::string::_M_construct(this, Str, v5); + return this; + } + else + { + v3(a2); + return this; + } +} + +//----- (00459780) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::truename(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + wchar_t *String; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::numpunct::do_truename ) + { + String = *(wchar_t **)(a2[2] + 20); + *this = this + 2; + v5 = -2; + if ( String ) + v5 = (int)&String[wcslen(String)]; + LOBYTE(v7) = 0; + std::wstring::_M_construct(this, String, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 4597C5: variable 'v7' is possibly undefined + +//----- (00459800) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::falsename(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + wchar_t *String; // esi + int v5; // eax + int v7; // [esp+8h] [ebp-14h] + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::numpunct::do_falsename ) + { + String = *(wchar_t **)(a2[2] + 28); + *this = this + 2; + v5 = -2; + if ( String ) + v5 = (int)&String[wcslen(String)]; + LOBYTE(v7) = 0; + std::wstring::_M_construct(this, String, v5, v7); + return this; + } + else + { + v3(a2); + return this; + } +} +// 459845: variable 'v7' is possibly undefined + +//----- (00459880) -------------------------------------------------------- +int __fastcall std::time_get>::date_order(int a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*(_DWORD *)a1 + 8); + if ( v1 == std::time_get>::do_date_order ) + return 0; + else + return v1(); +} + +//----- (004598A0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_date( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + _DWORD *v7; // eax + _DWORD *v8; // esi + int v9; // edx + char v10; // dl + char v11; // al + int v13; // eax + int v14; // eax + char v15; // [esp+28h] [ebp-24h] + char v16; // [esp+28h] [ebp-24h] + + v7 = std::use_facet>(a5 + 108); + v8 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + *(char **)(v7[2] + 8)); + v10 = v9 == -1; + v15 = v10 & (v8 != 0); + if ( v15 ) + { + v10 = 0; + if ( v8[2] >= v8[3] ) + { + v14 = (*(int (__fastcall **)(_DWORD *))(*v8 + 36))(v8); + v10 = 0; + if ( v14 == -1 ) + v10 = v15; + if ( v14 == -1 ) + v8 = 0; + } + } + v11 = a4 == -1; + if ( a3 ) + { + if ( a4 == -1 ) + { + v11 = 0; + if ( a3[2] >= a3[3] ) + { + v16 = v10; + v13 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v10 = v16; + v11 = v13 == -1; + } + } + } + if ( v10 == v11 ) + *a6 |= 2u; + return v8; +} +// 459909: variable 'v9' is possibly undefined + +//----- (004599B0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_time( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + _DWORD *v7; // eax + _DWORD *v8; // esi + int v9; // edx + char v10; // dl + char v11; // al + int v13; // eax + int v14; // eax + char v15; // [esp+28h] [ebp-24h] + char v16; // [esp+28h] [ebp-24h] + + v7 = std::use_facet>(a5 + 108); + v8 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + *(char **)(v7[2] + 16)); + v10 = v9 == -1; + v15 = v10 & (v8 != 0); + if ( v15 ) + { + v10 = 0; + if ( v8[2] >= v8[3] ) + { + v14 = (*(int (__fastcall **)(_DWORD *))(*v8 + 36))(v8); + v10 = 0; + if ( v14 == -1 ) + v10 = v15; + if ( v14 == -1 ) + v8 = 0; + } + } + v11 = a4 == -1; + if ( a3 ) + { + if ( a4 == -1 ) + { + v11 = 0; + if ( a3[2] >= a3[3] ) + { + v16 = v10; + v13 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v10 = v16; + v11 = v13 == -1; + } + } + } + if ( v10 == v11 ) + *a6 |= 2u; + return v8; +} +// 459A19: variable 'v9' is possibly undefined + +//----- (00459AC0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_year( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int a7) +{ + int v7; // edx + _DWORD *v8; // ebx + int v9; // eax + char v10; // si + char v11; // al + int v13; // eax + bool v14; // zf + _DWORD *v15; // eax + _DWORD *v16; // [esp+34h] [ebp-38h] + char v17; // [esp+38h] [ebp-34h] + int v18; // [esp+48h] [ebp-24h] BYREF + int v19[8]; // [esp+4Ch] [ebp-20h] BYREF + + v19[0] = 0; + v8 = std::time_get>::_M_extract_num(a1, a2, a3, a4, &v18, 0, 9999, 4u, a5, v19); + v16 = v8; + if ( v19[0] ) + { + *a6 |= 4u; + } + else + { + v9 = v18 - 1900; + if ( v18 < 0 ) + v9 = v18 + 100; + *(_DWORD *)(a7 + 20) = v9; + } + v10 = v7 == -1; + v17 = (v8 != 0) & v10; + if ( v17 ) + { + v10 = 0; + if ( v8[2] >= v8[3] ) + { + v13 = (*(int (__fastcall **)(_DWORD *))(*v8 + 36))(v8); + v14 = v13 == -1; + if ( v13 == -1 ) + v10 = v17; + v15 = 0; + if ( !v14 ) + v15 = v8; + v16 = v15; + } + } + v11 = a4 == -1; + if ( a3 ) + { + if ( a4 == -1 ) + { + v11 = 0; + if ( a3[2] >= a3[3] ) + v11 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + } + } + if ( v10 == v11 ) + *a6 |= 2u; + return v16; +} +// 459B53: variable 'v7' is possibly undefined +// 459AC0: using guessed type int var_20[8]; + +//----- (00459C10) -------------------------------------------------------- +int __fastcall std::time_get>::get_weekday(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 20))(a1); +} + +//----- (00459C20) -------------------------------------------------------- +int std::time_get>::do_date_order() +{ + return 0; +} + +//----- (00459C30) -------------------------------------------------------- +int __fastcall std::time_get>::get_monthname(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 24))(a1); +} + +//----- (00459C40) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::_M_extract_num( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int *a5, + signed int a6, + int a7, + unsigned int a8, + int a9, + _DWORD *a10) +{ + unsigned int v10; // ebp + int v12; // eax + int v13; // edi + char v14; // al + unsigned __int8 v15; // al + unsigned int v16; // eax + bool v17; // dl + char v18; // bl + int v19; // ebx + char v20; // dl + int (__stdcall *v21)(unsigned __int8, int); // eax + int v23; // eax + char *v24; // eax + int v25; // eax + int v26; // eax + unsigned int v28; // [esp+20h] [ebp-2Ch] + _BYTE *v29; // [esp+24h] [ebp-28h] + bool v31; // [esp+2Fh] [ebp-1Dh] + + v10 = 10; + v29 = std::use_facet>(a9 + 108); + if ( a8 != 2 ) + { + v12 = 1; + if ( a8 == 4 ) + v12 = 1000; + v10 = v12; + } + v28 = 0; + v13 = 0; + while ( 1 ) + { + v17 = a2 == -1; + v18 = v17 && a1 != 0; + if ( v18 ) + { + if ( a1[2] >= a1[3] ) + { + v25 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v17 = a2 == -1; + if ( v25 != -1 ) + v18 = 0; + if ( v25 == -1 ) + a1 = 0; + } + else + { + v18 = 0; + } + } + else + { + v18 = a2 == -1; + } + if ( a3 && a4 == -1 ) + { + if ( a3[2] >= a3[3] ) + { + v31 = v17; + v23 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v17 = v31; + if ( v23 == -1 ) + { + a3 = 0; + v18 ^= 1u; + } + } + } + else + { + v18 ^= a4 == -1; + } + if ( v28 >= a8 || !v18 ) + break; + if ( a1 && v17 ) + { + v24 = (char *)a1[2]; + if ( (unsigned int)v24 >= a1[3] ) + { + v26 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + if ( v26 == -1 ) + { + v20 = -1; + v19 = 255; + a1 = 0; + } + else + { + v19 = (unsigned __int8)v26; + v20 = v26; + } + } + else + { + v19 = (unsigned __int8)*v24; + v20 = *v24; + } + } + else + { + v19 = (unsigned __int8)a2; + v20 = a2; + } + v14 = v29[v19 + 285]; + if ( !v14 ) + { + v21 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v29 + 32); + if ( v21 != std::ctype::do_narrow ) + v20 = v21(v20, 42); + if ( v20 == 42 ) + goto LABEL_27; + v29[v19 + 285] = v20; + v14 = v20; + } + v15 = v14 - 48; + if ( v15 > 9u ) + goto LABEL_27; + v13 = (char)v15 + 10 * v13; + if ( (int)(v13 * v10) > a7 || (int)(v10 + v13 * v10) <= a6 ) + goto LABEL_27; + v16 = a1[2]; + v10 /= 0xAu; + if ( v16 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v16 + 1; + ++v28; + a2 = -1; + } + if ( v28 == a8 ) + { +LABEL_30: + *a5 = v13; + return a1; + } +LABEL_27: + if ( a8 == 4 && v28 == 2 ) + { + v13 -= 100; + goto LABEL_30; + } + *a10 |= 4u; + return a1; +} + +//----- (00459F00) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_weekday( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int a7) +{ + _DWORD *v7; // eax + int v8; // edx + int v9; // eax + int v10; // edx + _DWORD *v11; // ecx + _DWORD *v12; // ebp + char v13; // dl + char v14; // al + int v16; // eax + int v17; // eax + char v18; // [esp+34h] [ebp-68h] + char v19; // [esp+34h] [ebp-68h] + _DWORD *v20; // [esp+38h] [ebp-64h] + unsigned int v21; // [esp+40h] [ebp-5Ch] BYREF + int v22; // [esp+44h] [ebp-58h] BYREF + int v23[21]; // [esp+48h] [ebp-54h] BYREF + + v22 = 0; + v7 = (_DWORD *)*((_DWORD *)std::use_facet>(a5 + 108) + 2); + v23[0] = v7[18]; + v23[1] = v7[19]; + v23[2] = v7[20]; + v23[3] = v7[21]; + v23[4] = v7[22]; + v23[5] = v7[23]; + v23[6] = v7[24]; + v23[7] = v7[11]; + v23[8] = v7[12]; + v23[9] = v7[13]; + v23[10] = v7[14]; + v23[11] = v7[15]; + v8 = v7[16]; + v9 = v7[17]; + v23[12] = v8; + v23[13] = v9; + v11 = std::time_get>::_M_extract_wday_or_month( + a1, + a2, + a3, + a4, + &v21, + (int)v23, + 7u, + a5, + &v22); + v12 = v11; + if ( v22 ) + *a6 |= 4u; + else + *(_DWORD *)(a7 + 24) = v21; + v13 = v10 == -1; + v18 = v13 & (v11 != 0); + if ( v18 ) + { + v13 = 0; + if ( v11[2] >= v11[3] ) + { + v12 = 0; + v20 = v11; + v17 = (*(int (**)(void))(*v11 + 36))(); + v13 = 0; + if ( v17 != -1 ) + v12 = v20; + if ( v17 == -1 ) + v13 = v18; + } + } + v14 = a4 == -1; + if ( a3 ) + { + if ( a4 == -1 ) + { + v14 = 0; + if ( a3[2] >= a3[3] ) + { + v19 = v13; + v16 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v13 = v19; + v14 = v16 == -1; + } + } + } + if ( v13 == v14 ) + *a6 |= 2u; + return v12; +} +// 45A00F: variable 'v10' is possibly undefined + +//----- (0045A0C0) -------------------------------------------------------- +unsigned __int64 __stdcall std::time_get>::_M_extract_name( + unsigned __int64 a1, + _DWORD *a2, + int a3, + _DWORD *a4, + int a5, + int a6, + int a7, + _DWORD *a8) +{ + int v8; // eax + void *v9; // esp + void *v10; // esp + unsigned __int8 v11; // dl + unsigned __int8 v12; // bl + int v14; // edx + int v15; // esi + unsigned int v16; // ebx + int v17; // edi + char v18; // al + int v19; // ecx + int *v20; // edi + size_t v21; // eax + unsigned int v22; // esi + unsigned int v23; // ebx + size_t v24; // eax + unsigned int v25; // eax + char v26; // si + unsigned __int8 v27; // dl + int *v28; // ecx + unsigned int v29; // eax + unsigned int i; // esi + unsigned int v31; // eax + int v32; // eax + const char *v33; // edi + const char *v34; // esi + size_t v35; // eax + unsigned int v36; // ebx + unsigned __int8 v37; // dl + char v38; // dl + char v39; // di + _BYTE *v40; // eax + char v41; // di + int v42; // eax + bool v43; // zf + int v44; // eax + int v45; // eax + bool v46; // zf + _DWORD *v47; // eax + int v48; // eax + _BYTE *v49; // eax + int v50; // eax + int v51; // eax + bool v52; // zf + _DWORD *v53; // eax + int v54; // eax + int v55; // eax + bool v56; // zf + int v57; // eax + int v58; // eax + bool v59; // zf + char v60; // dl + char v61; // al + int v62; // eax + int v63; // eax + int v64; // eax + int v65; // eax + int v66; // eax + bool v67; // zf + _DWORD *v68; // eax + int v69; // [esp+10h] [ebp-38h] BYREF + void *v70; // [esp+14h] [ebp-34h] + _DWORD *v71; // [esp+18h] [ebp-30h] + int v72; // [esp+1Ch] [ebp-2Ch] + unsigned __int8 v73; // [esp+22h] [ebp-26h] + unsigned __int8 v74; // [esp+23h] [ebp-25h] + unsigned __int64 v75; // [esp+24h] [ebp-24h] + const char *v76; // [esp+2Ch] [ebp-1Ch] + + v72 = HIDWORD(a1); + v75 = a1; + v71 = a2; + v70 = std::use_facet>(a7 + 108); + v8 = 16 * ((unsigned int)(4 * a6 + 27) >> 4); + v9 = alloca(v8); + v10 = alloca(v8); + LOBYTE(v76) = HIDWORD(a1) == -1; + if ( ((unsigned __int8)v76 & ((_DWORD)a1 != 0)) != 0 ) + { + if ( *(_DWORD *)(v75 + 8) >= *(_DWORD *)(v75 + 12) ) + { + v54 = *(_DWORD *)v75; + v74 = (unsigned __int8)v76 & ((_DWORD)a1 != 0); + v55 = (*(int (__fastcall **)(_DWORD))(v54 + 36))(v75); + v11 = v74; + v56 = v55 == -1; + if ( v55 != -1 ) + v11 = 0; + v57 = 0; + if ( !v56 ) + v57 = v75; + LODWORD(v75) = v57; + } + else + { + v11 = 0; + } + } + else + { + v11 = (unsigned __int8)v76; + } + v74 = a3 == -1; + v12 = v74 & (a2 != 0); + if ( v12 ) + { + if ( a2[2] >= a2[3] ) + { + v50 = *a2; + v73 = v11; + v51 = (*(int (__fastcall **)(_DWORD *))(v50 + 36))(a2); + v11 = v73; + v52 = v51 == -1; + if ( v51 != -1 ) + v12 = 0; + v53 = 0; + if ( !v52 ) + v53 = a2; + v71 = v53; + } + else + { + v12 = 0; + } + } + else + { + v12 = v74; + } + if ( v12 == v11 ) + goto LABEL_6; + if ( (_DWORD)v75 && (_BYTE)v76 ) + { + v49 = *(_BYTE **)(v75 + 8); + if ( (unsigned int)v49 >= *(_DWORD *)(v75 + 12) ) + { + v58 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v75 + 36))(v75); + v59 = v58 == -1; + v60 = v58; + v61 = -1; + if ( !v59 ) + v61 = v60; + LOBYTE(v76) = v61; + v62 = 0; + if ( !v59 ) + v62 = v75; + LODWORD(v75) = v62; + } + else + { + LOBYTE(v76) = *v49; + } + } + else + { + LOBYTE(v76) = v72; + } + if ( !a6 ) + { +LABEL_6: + *a8 |= 4u; + return v75; + } + v72 = (int)&v69; + v14 = a5; + v15 = 0; + v16 = 0; + v17 = (int)v70; + do + { + while ( 1 ) + { + v19 = **(char **)(v14 + 4 * v15); + if ( (_BYTE)v19 == (_BYTE)v76 ) + break; + a5 = v14; + v18 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v17 + 8))(v17, v19); + v14 = a5; + if ( v18 == (_BYTE)v76 ) + break; + if ( a6 == ++v15 ) + goto LABEL_17; + } + *(_DWORD *)(v72 + 4 * v16++) = v15++; + } + while ( a6 != v15 ); +LABEL_17: + v76 = 0; + v20 = (int *)v72; + if ( v16 <= 1 ) + goto LABEL_39; + do + { + v72 = *v20; + v21 = strlen(*(const char **)(a5 + 4 * v72)); + HIDWORD(v75) = v16; + v22 = v21; + v23 = 1; + do + { + v24 = strlen(*(const char **)(a5 + 4 * v20[v23])); + if ( v22 > v24 ) + v22 = v24; + ++v23; + } + while ( v23 < HIDWORD(v75) ); + v16 = HIDWORD(v75); + v25 = *(_DWORD *)(v75 + 8); + if ( v25 >= *(_DWORD *)(v75 + 12) ) + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)v75 + 40))(v75); + else + *(_DWORD *)(v75 + 8) = v25 + 1; + if ( (unsigned int)++v76 >= v22 ) + goto LABEL_57; + v26 = 0; + if ( *(_DWORD *)(v75 + 8) >= *(_DWORD *)(v75 + 12) ) + { + v26 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v75 + 36))(v75) == -1; + v48 = 0; + if ( !v26 ) + v48 = v75; + LODWORD(v75) = v48; + } + if ( (v74 & (v71 != 0)) != 0 ) + { + if ( v71[2] < v71[3] ) + { + if ( !v26 ) + goto LABEL_57; + goto LABEL_29; + } + v44 = *v71; + BYTE4(v75) = v74 & (v71 != 0); + v45 = (*(int (__fastcall **)(_DWORD *))(v44 + 36))(v71); + v27 = BYTE4(v75); + v46 = v45 == -1; + if ( v45 != -1 ) + v27 = 0; + v47 = 0; + if ( !v46 ) + v47 = v71; + v71 = v47; + } + else + { + v27 = v74; + } + if ( v26 == v27 ) + goto LABEL_57; +LABEL_29: + v28 = (int *)v75; + v29 = v72; + for ( i = 0; ; v29 = v20[i] ) + { + v14 = (unsigned __int8)v76[*(_DWORD *)(a5 + 4 * v29)]; + LOBYTE(v29) = -1; + if ( v28 ) + { + v29 = v28[2]; + if ( v29 >= v28[3] ) + { + v42 = *v28; + LOBYTE(v75) = v14; + HIDWORD(v75) = v28; + v29 = (*(int (**)(void))(v42 + 36))(); + v43 = v29 == -1; + if ( v29 == -1 ) + LOBYTE(v29) = -1; + v28 = (int *)HIDWORD(v75); + if ( v43 ) + v28 = 0; + v14 = (unsigned __int8)v75; + } + else + { + LOBYTE(v29) = *(_BYTE *)v29; + } + } + if ( (_BYTE)v14 == (_BYTE)v29 ) + break; + v20[i] = v20[--v16]; + if ( v16 <= i ) + goto LABEL_37; +LABEL_31: + ; + } + if ( v16 > ++i ) + goto LABEL_31; +LABEL_37: + LODWORD(v75) = v28; + } + while ( v16 > 1 ); + HIDWORD(v75) = -1; +LABEL_39: + if ( v16 != 1 ) + goto LABEL_6; + v31 = *(_DWORD *)(v75 + 8); + if ( v31 >= *(_DWORD *)(v75 + 12) ) + (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)v75 + 40))(v75, v14); + else + *(_DWORD *)(v75 + 8) = v31 + 1; + v32 = *v20; + v33 = *(const char **)(a5 + 4 * *v20); + v72 = v32; + v34 = v76 + 1; + v35 = strlen(v33); + HIDWORD(v75) = v35; + if ( (unsigned int)(v76 + 1) < v35 ) + { + v76 = v33; + v36 = v75; + while ( 1 ) + { + v41 = 0; + if ( *(_DWORD *)(v36 + 8) >= *(_DWORD *)(v36 + 12) ) + { + v41 = (*(int (__fastcall **)(unsigned int))(*(_DWORD *)v36 + 36))(v36) == -1; + if ( v41 ) + v36 = 0; + } + if ( (v74 & (v71 != 0)) != 0 ) + { + if ( v71[2] >= v71[3] ) + { + v65 = *v71; + LOBYTE(v75) = v74 & (v71 != 0); + v66 = (*(int (__fastcall **)(_DWORD *))(v65 + 36))(v71); + v37 = v75; + v67 = v66 == -1; + if ( v66 != -1 ) + v37 = 0; + v68 = 0; + if ( !v67 ) + v68 = v71; + v71 = v68; + } + else + { + v37 = 0; + } + } + else + { + v37 = v74; + } + if ( v41 == v37 ) + { +LABEL_95: + v75 = v36 | 0xFFFFFFFF00000000LL; + goto LABEL_6; + } + v38 = -1; + v39 = v34[(_DWORD)v76]; + if ( v36 ) + { + v40 = *(_BYTE **)(v36 + 8); + if ( (unsigned int)v40 < *(_DWORD *)(v36 + 12) ) + { + if ( v39 != *v40 ) + goto LABEL_95; + goto LABEL_49; + } + v63 = *(_DWORD *)v36; + LOBYTE(v75) = -1; + v64 = (*(int (__fastcall **)(unsigned int))(v63 + 36))(v36); + v38 = v75; + if ( v64 != -1 ) + v38 = v64; + if ( v64 == -1 ) + v36 = 0; + } + if ( v39 != v38 ) + goto LABEL_95; + v40 = *(_BYTE **)(v36 + 8); + if ( (unsigned int)v40 >= *(_DWORD *)(v36 + 12) ) + { + (*(void (__fastcall **)(unsigned int))(*(_DWORD *)v36 + 40))(v36); + goto LABEL_50; + } +LABEL_49: + *(_DWORD *)(v36 + 8) = v40 + 1; +LABEL_50: + if ( ++v34 == (const char *)HIDWORD(v75) ) + { + LODWORD(v75) = v36; + goto LABEL_98; + } + } + } + if ( v34 != (const char *)v35 ) + { +LABEL_57: + HIDWORD(v75) = -1; + goto LABEL_6; + } +LABEL_98: + HIDWORD(v75) = -1; + *a4 = v72; + return v75; +} + +//----- (0045A5F0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_monthname( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int a7) +{ + _DWORD *v7; // eax + int v8; // edx + int v9; // edx + int v10; // edx + _DWORD *v11; // ecx + _DWORD *v12; // ebp + char v13; // dl + char v14; // al + int v16; // eax + int v17; // eax + char v18; // [esp+34h] [ebp-98h] + char v19; // [esp+34h] [ebp-98h] + _DWORD *v20; // [esp+38h] [ebp-94h] + unsigned int v21; // [esp+48h] [ebp-84h] BYREF + int v22; // [esp+4Ch] [ebp-80h] BYREF + int v23[31]; // [esp+50h] [ebp-7Ch] BYREF + + v7 = (_DWORD *)*((_DWORD *)std::use_facet>(a5 + 108) + 2); + v23[0] = v7[37]; + v23[1] = v7[38]; + v23[2] = v7[39]; + v23[3] = v7[40]; + v23[4] = v7[41]; + v23[5] = v7[42]; + v23[6] = v7[43]; + v23[7] = v7[44]; + v23[8] = v7[45]; + v23[9] = v7[46]; + v23[10] = v7[47]; + v23[11] = v7[48]; + v23[12] = v7[25]; + v23[13] = v7[26]; + v23[14] = v7[27]; + v23[15] = v7[28]; + v8 = v7[29]; + v22 = 0; + v23[16] = v8; + v23[17] = v7[30]; + v23[18] = v7[31]; + v23[19] = v7[32]; + v23[20] = v7[33]; + v23[21] = v7[34]; + v9 = v7[35]; + v23[23] = v7[36]; + v23[22] = v9; + v11 = std::time_get>::_M_extract_wday_or_month( + a1, + a2, + a3, + a4, + &v21, + (int)v23, + 0xCu, + a5, + &v22); + v12 = v11; + if ( v22 ) + *a6 |= 4u; + else + *(_DWORD *)(a7 + 16) = v21; + v13 = v10 == -1; + v18 = v13 & (v11 != 0); + if ( v18 ) + { + v13 = 0; + if ( v11[2] >= v11[3] ) + { + v12 = 0; + v20 = v11; + v17 = (*(int (**)(void))(*v11 + 36))(); + v13 = 0; + if ( v17 != -1 ) + v12 = v20; + if ( v17 == -1 ) + v13 = v18; + } + } + v14 = a4 == -1; + if ( a3 ) + { + if ( a4 == -1 ) + { + v14 = 0; + if ( a3[2] >= a3[3] ) + { + v19 = v13; + v16 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v13 = v19; + v14 = v16 == -1; + } + } + } + if ( v13 == v14 ) + *a6 |= 2u; + return v12; +} +// 45A79C: variable 'v10' is possibly undefined + +//----- (0045A850) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::_M_extract_via_format( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7, + char *a8) +{ + size_t v8; // esi + _BYTE *v10; // edi + bool v11; // bl + char v12; // dl + char v13; // cl + char v14; // al + int (__stdcall *v15)(unsigned __int8, int); // eax + char v16; // dl + int v17; // eax + int v18; // edx + char v19; // al + int (__stdcall *v20)(unsigned __int8, int); // eax + char v21; // al + int v23; // eax + _BYTE *v24; // eax + int v25; // esi + int (__stdcall *v26)(unsigned __int8, int); // eax + int v27; // edx + int v28; // eax + _DWORD *v29; // eax + int v30; // eax + unsigned __int64 v31; // kr00_8 + char v32; // al + void (__fastcall *v33)(_BYTE *, int, const char *, const char *, int *); // eax + _DWORD *v34; // eax + int v35; // edx + int v36; // edx + char v37; // al + void (__fastcall *v38)(_BYTE *, int, const char *, const char *, int *); // eax + int v39; // edx + _DWORD *v40; // eax + unsigned __int8 *v41; // eax + int v42; // ebx + int v43; // edx + char v44; // al + int (__stdcall *v45)(unsigned __int8, int); // eax + unsigned int v46; // eax + unsigned __int8 *v47; // eax + int v48; // eax + unsigned __int64 v49; // rax + char v50; // si + int v51; // esi + char v52; // dl + int v53; // esi + char v54; // dl + _DWORD *v55; // eax + int v56; // edx + int v57; // edx + _DWORD *v58; // eax + int v59; // eax + unsigned __int64 v60; // kr08_8 + _DWORD *v61; // eax + int v62; // edx + char v63; // al + void (__fastcall *v64)(_BYTE *, int, const char *, void *, int *); // eax + _DWORD *v65; // eax + _DWORD *v66; // eax + int v67; // edx + unsigned __int8 *v68; // eax + int v69; // eax + int v70; // edx + unsigned __int8 *v71; // eax + int v72; // ebx + char v73; // al + int (__stdcall *v74)(unsigned __int8, int); // eax + int v75; // eax + bool v76; // zf + _DWORD *v77; // eax + int v78; // eax + int v79; // eax + int (__stdcall *v80)(unsigned __int8); // eax + char *v81; // ecx + int (__stdcall *v82)(unsigned __int8); // eax + __int64 v83; // rax + _BYTE *v84; // eax + _BYTE *v85; // eax + char *Str; // [esp+0h] [ebp-BCh] + int v87; // [esp+14h] [ebp-A8h] + int v88; // [esp+20h] [ebp-9Ch] + size_t v90; // [esp+38h] [ebp-84h] + char v91; // [esp+38h] [ebp-84h] + char *v93; // [esp+44h] [ebp-78h] + int v94; // [esp+44h] [ebp-78h] + bool v95; // [esp+44h] [ebp-78h] + size_t v96; // [esp+48h] [ebp-74h] + int v97; // [esp+4Ch] [ebp-70h] + char v98; // [esp+4Ch] [ebp-70h] + _DWORD *v99; // [esp+54h] [ebp-68h] + char v100; // [esp+5Ah] [ebp-62h] + char v101; // [esp+5Ah] [ebp-62h] + bool v102; // [esp+5Bh] [ebp-61h] + int v103; // [esp+5Ch] [ebp-60h] + int v104; // [esp+68h] [ebp-54h] BYREF + int v105; // [esp+6Ch] [ebp-50h] BYREF + int v106[3]; // [esp+70h] [ebp-4Ch] BYREF + int v107; // [esp+7Ch] [ebp-40h] + int v108; // [esp+80h] [ebp-3Ch] + int v109; // [esp+84h] [ebp-38h] + int v110; // [esp+88h] [ebp-34h] + int v111; // [esp+8Ch] [ebp-30h] + int v112; // [esp+90h] [ebp-2Ch] + int v113; // [esp+94h] [ebp-28h] + int v114; // [esp+98h] [ebp-24h] + int v115; // [esp+9Ch] [ebp-20h] + + v8 = 0; + v99 = std::use_facet>(a5 + 108); + v10 = std::use_facet>(a5 + 108); + v104 = 0; + v96 = strlen(a8); + while ( 1 ) + { + v11 = a2 == -1; + if ( v11 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v75 = (*(int (__thiscall **)(_DWORD *, char *))(*a1 + 36))(a1, Str); + v12 = v11 && a1 != 0; + if ( v75 != -1 ) + v12 = 0; + if ( v75 == -1 ) + a1 = 0; + } + else + { + v12 = 0; + } + } + else + { + v12 = a2 == -1; + } + v100 = a4 == -1; + if ( a3 && a4 == -1 ) + { + if ( a3[2] >= a3[3] ) + { + v91 = v12; + v23 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v12 = v91; + if ( v23 == -1 ) + { + a3 = 0; + v12 = v91 ^ 1; + } + } + } + else + { + v12 ^= v100; + } + if ( v8 >= v96 || !v12 ) + break; + if ( v104 ) + goto LABEL_32; + v93 = &a8[v8]; + v90 = v8 + 1; + v97 = (unsigned __int8)a8[v8]; + v13 = a8[v8]; + v14 = v10[v97 + 285]; + if ( v14 ) + { +LABEL_15: + if ( v14 != 37 ) + goto LABEL_16; + v94 = (unsigned __int8)a8[v8 + 1]; + v18 = v94; + v19 = v10[v94 + 285]; + if ( !v19 ) + { + v20 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v10 + 32); + if ( v20 != std::ctype::do_narrow ) + v18 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v20)(v10, (char)v94, 0); + if ( !(_BYTE)v18 ) + { +LABEL_47: + v104 |= 4u; + goto LABEL_48; + } + v10[v94 + 285] = v18; + v19 = v18; + } + v105 = 0; + if ( (v19 == 69 || v19 == 79) + && (v90 = v8 + 2, v25 = (unsigned __int8)a8[v8 + 2], v19 = v10[v25 + 285], v18 = v25, !v19) ) + { + v26 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v10 + 32); + if ( v26 != std::ctype::do_narrow ) + v18 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v26)(v10, (char)v25, 0); + if ( !(_BYTE)v18 ) + goto LABEL_47; + v10[v25 + 285] = v18; + v21 = v18 - 65; + if ( (unsigned __int8)(v18 - 65) > 0x38u ) + goto LABEL_47; + } + else + { + v21 = v19 - 65; + } + switch ( v21 ) + { + case 0: + v65 = (_DWORD *)v99[2]; + v106[0] = v65[11]; + v106[1] = v65[12]; + v106[2] = v65[13]; + v107 = v65[14]; + v108 = v65[15]; + v109 = v65[16]; + v59 = v65[17]; + goto LABEL_114; + case 1: + v40 = (_DWORD *)v99[2]; + v106[0] = v40[25]; + v106[1] = v40[26]; + v106[2] = v40[27]; + v107 = v40[28]; + v108 = v40[29]; + v109 = v40[30]; + v110 = v40[31]; + v111 = v40[32]; + v112 = v40[33]; + v113 = v40[34]; + v114 = v40[35]; + v30 = v40[36]; + goto LABEL_57; + case 2: + case 24: + case 56: + a1 = std::time_get>::_M_extract_num( + a1, + a2, + a3, + a4, + &v105, + 0, + 9999, + 4u, + a5, + &v104); + a2 = v27; + if ( !v104 ) + { + v28 = v105 - 1900; + if ( v105 < 0 ) + v28 = v105 + 100; + a7[5] = v28; + } + break; + case 3: + v32 = v10[28]; + if ( v32 == 1 ) + goto LABEL_156; + if ( !v32 ) + std::ctype::_M_widen_init((int)v10); + v33 = *(void (__fastcall **)(_BYTE *, int, const char *, const char *, int *))(*(_DWORD *)v10 + 28); + if ( (char *)v33 == (char *)std::ctype::do_widen ) +LABEL_156: + strcpy((char *)v106, "%m/%d/%y"); + else + v33(v10, v18, "%m/%d/%y", "%H:%M", v106); + goto LABEL_155; + case 7: + v34 = std::time_get>::_M_extract_num( + a1, + a2, + a3, + a4, + &v105, + 0, + 23, + 2u, + a5, + &v104); + goto LABEL_65; + case 8: + v34 = std::time_get>::_M_extract_num( + a1, + a2, + a3, + a4, + &v105, + 1, + 12, + 2u, + a5, + &v104); +LABEL_65: + a1 = v34; + a2 = v35; + if ( !v104 ) + a7[2] = v105; + break; + case 12: + a1 = std::time_get>::_M_extract_num( + a1, + a2, + a3, + a4, + &v105, + 0, + 59, + 2u, + a5, + &v104); + a2 = v36; + if ( !v104 ) + a7[1] = v105; + break; + case 17: + v37 = v10[28]; + if ( v37 == 1 ) + goto LABEL_157; + if ( !v37 ) + std::ctype::_M_widen_init((int)v10); + v38 = *(void (__fastcall **)(_BYTE *, int, const char *, const char *, int *))(*(_DWORD *)v10 + 28); + if ( (char *)v38 == (char *)std::ctype::do_widen ) +LABEL_157: + strcpy((char *)v106, "%H:%M"); + else + v38(v10, v18, "%H:%M", "%H:%M:%S", v106); + goto LABEL_155; + case 18: + a1 = std::time_get>::_M_extract_num( + a1, + a2, + a3, + a4, + &v105, + 0, + 60, + 2u, + a5, + &v104); + a2 = v39; + if ( !v104 ) + *a7 = v105; + break; + case 19: + v63 = v10[28]; + if ( v63 == 1 ) + goto LABEL_154; + if ( !v63 ) + std::ctype::_M_widen_init((int)v10); + v64 = *(void (__fastcall **)(_BYTE *, int, const char *, void *, int *))(*(_DWORD *)v10 + 28); + if ( (char *)v64 == (char *)std::ctype::do_widen ) +LABEL_154: + strcpy((char *)v106, "%H:%M:%S"); + else + v64(v10, v18, "%H:%M:%S", &unk_51183A, v106); +LABEL_155: + v61 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + &v104, + a7, + (char *)v106); + goto LABEL_117; + case 23: + v61 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + &v104, + a7, + *(char **)(v99[2] + 16)); + goto LABEL_117; + case 25: + if ( a1 && a2 == -1 ) + { + v47 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v47 >= a1[3] ) + { + v48 = (*(int (__fastcall **)(_DWORD *, int))(*a1 + 36))(a1, v18); + if ( v48 == -1 ) + { + v48 = 255; + a1 = 0; + } + else + { + v48 = (unsigned __int8)v48; + } + } + else + { + v48 = *v47; + } + } + else + { + v48 = (unsigned __int8)a2; + } + if ( (*(_BYTE *)(*((_DWORD *)v10 + 6) + 2 * v48) & 1) == 0 ) + goto LABEL_47; + v49 = std::time_get>::_M_extract_name( + __PAIR64__(a2, (unsigned int)a1), + a3, + a4, + v106, + (int)std::__timepunct_cache::_S_timezones, + 14, + a5, + &v104); + a1 = (_DWORD *)v49; + v95 = HIDWORD(v49) == -1; + v103 = HIDWORD(v49); + a2 = HIDWORD(v49); + BYTE4(v49) = v95; + v102 = v95 && (_DWORD)v49 != 0; + if ( v102 ) + { + BYTE4(v49) = 0; + if ( *(_DWORD *)(v49 + 8) >= *(_DWORD *)(v49 + 12) ) + { + LODWORD(v49) = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v49 + 36))(v49); + BYTE4(v49) = 0; + if ( (_DWORD)v49 == -1 ) + { + BYTE4(v49) = v102; + a1 = 0; + v102 = 0; + } + } + } + v50 = v100 & (a3 != 0); + if ( v50 ) + { + v100 = 0; + if ( a3[2] >= a3[3] ) + { + v98 = BYTE4(v49); + LODWORD(v49) = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + BYTE4(v49) = v98; + v76 = (_DWORD)v49 == -1; + if ( (_DWORD)v49 != -1 ) + v50 = 0; + v100 = v50; + v77 = 0; + if ( !v76 ) + v77 = a3; + a3 = v77; + } + } + if ( BYTE4(v49) != v100 && !(v106[0] | v104) ) + { + LOBYTE(v51) = v103; + if ( v102 ) + { + v84 = (_BYTE *)a1[2]; + if ( (unsigned int)v84 >= a1[3] ) + { + v51 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + if ( v51 == -1 ) + a1 = 0; + } + else + { + LOBYTE(v51) = *v84; + } + } + if ( v10[28] ) + { + v52 = v10[74]; + } + else + { + std::ctype::_M_widen_init((int)v10); + v52 = 45; + v80 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v10 + 24); + if ( v80 != std::ctype::do_widen ) + { + v52 = ((int (__fastcall *)(_BYTE *, int, int))v80)(v10, 45, 45); + Str = v81; + } + } + if ( (_BYTE)v51 == v52 ) + goto LABEL_112; + if ( a1 && v95 ) + { + v85 = (_BYTE *)a1[2]; + if ( (unsigned int)v85 >= a1[3] ) + { + v53 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + if ( v53 == -1 ) + a1 = 0; + } + else + { + LOBYTE(v53) = *v85; + } + } + else + { + LOBYTE(v53) = v103; + } + if ( v10[28] ) + { + v54 = v10[72]; + } + else + { + std::ctype::_M_widen_init((int)v10); + v54 = 43; + v82 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v10 + 24); + if ( v82 != std::ctype::do_widen ) + { + v83 = ((__int64 (__fastcall *)(_BYTE *, int, int))v82)(v10, 43, 43); + Str = (char *)HIDWORD(v83); + v54 = v83; + } + } + if ( (_BYTE)v53 == v54 ) + { +LABEL_112: + v55 = std::time_get>::_M_extract_num( + a1, + v103, + a3, + a4, + v106, + 0, + 23, + 2u, + a5, + &v104); + a1 = std::time_get>::_M_extract_num( + v55, + v56, + a3, + a4, + v106, + 0, + 59, + 2u, + a5, + &v104); + a2 = v57; + } + } + break; + case 32: + v58 = (_DWORD *)v99[2]; + v106[0] = v58[18]; + v106[1] = v58[19]; + v106[2] = v58[20]; + v107 = v58[21]; + v108 = v58[22]; + v109 = v58[23]; + v59 = v58[24]; +LABEL_114: + v110 = v59; + v60 = std::time_get>::_M_extract_name( + __PAIR64__(a2, (unsigned int)a1), + a3, + a4, + &v105, + (int)v106, + 7, + a5, + &v104); + a2 = HIDWORD(v60); + a1 = (_DWORD *)v60; + if ( !v104 ) + a7[6] = v105; + break; + case 33: + case 39: + v29 = (_DWORD *)v99[2]; + v106[0] = v29[37]; + v106[1] = v29[38]; + v106[2] = v29[39]; + v107 = v29[40]; + v108 = v29[41]; + v109 = v29[42]; + v110 = v29[43]; + v111 = v29[44]; + v112 = v29[45]; + v113 = v29[46]; + v114 = v29[47]; + v30 = v29[48]; +LABEL_57: + v115 = v30; + v31 = std::time_get>::_M_extract_name( + __PAIR64__(a2, (unsigned int)a1), + a3, + a4, + &v105, + (int)v106, + 12, + a5, + &v104); + a2 = HIDWORD(v31); + a1 = (_DWORD *)v31; + if ( !v104 ) + a7[4] = v105; + break; + case 34: + v61 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + &v104, + a7, + *(char **)(v99[2] + 24)); + goto LABEL_117; + case 35: + v88 = a5; + v87 = 1; + goto LABEL_126; + case 36: + if ( a1 && a2 == -1 ) + { + v68 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v68 < a1[3] ) + { + if ( (*(_BYTE *)(*((_DWORD *)v10 + 6) + 2 * *v68) & 0x20) != 0 ) + goto LABEL_133; + goto LABEL_164; + } + v69 = (*(int (__fastcall **)(_DWORD *, int))(*a1 + 36))(a1, v18); + if ( v69 == -1 ) + a1 = 0; + } + else + { + LOBYTE(v69) = a2; + } + if ( (*(_BYTE *)(*((_DWORD *)v10 + 6) + 2 * (unsigned __int8)v69) & 0x20) != 0 ) + { + v68 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v68 < a1[3] ) +LABEL_133: + a1[2] = v68 + 1; + else + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + v66 = std::time_get>::_M_extract_num( + a1, + -1, + a3, + a4, + &v105, + 1, + 9, + 1u, + a5, + &v104); + goto LABEL_127; + } +LABEL_164: + v88 = a5; + v87 = 10; +LABEL_126: + v66 = std::time_get>::_M_extract_num( + a1, + a2, + a3, + a4, + &v105, + v87, + 31, + 2u, + v88, + &v104); +LABEL_127: + a1 = v66; + a2 = v67; + if ( !v104 ) + a7[3] = v105; + break; + case 44: + a1 = std::time_get>::_M_extract_num( + a1, + a2, + a3, + a4, + &v105, + 1, + 12, + 2u, + a5, + &v104); + a2 = v70; + if ( !v104 ) + a7[4] = v105 - 1; + break; + case 45: + if ( a1 && a2 == -1 ) + { + v41 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v41 >= a1[3] ) + { + v79 = (*(int (__fastcall **)(_DWORD *, int))(*a1 + 36))(a1, v18); + if ( v79 == -1 ) + { + v42 = 255; + v43 = -1; + a1 = 0; + } + else + { + v43 = v79; + v42 = (unsigned __int8)v79; + } + } + else + { + v42 = *v41; + v43 = v42; + } + } + else + { + v43 = a2; + v42 = (unsigned __int8)a2; + } + v44 = v10[v42 + 285]; + if ( v44 ) + goto LABEL_88; + v45 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v10 + 32); + if ( v45 != std::ctype::do_narrow ) + v43 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v45)(v10, (char)v43, 0); + if ( (_BYTE)v43 ) + { + v10[v42 + 285] = v43; + v44 = v43; +LABEL_88: + if ( v44 == 10 ) + goto LABEL_89; + } + goto LABEL_47; + case 51: + if ( a1 && a2 == -1 ) + { + v71 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v71 >= a1[3] ) + { + v78 = (*(int (__fastcall **)(_DWORD *, int))(*a1 + 36))(a1, v18); + if ( v78 == -1 ) + { + v72 = 255; + v43 = -1; + a1 = 0; + } + else + { + v43 = v78; + v72 = (unsigned __int8)v78; + } + } + else + { + v72 = *v71; + v43 = v72; + } + } + else + { + v43 = a2; + v72 = (unsigned __int8)a2; + } + v73 = v10[v72 + 285]; + if ( v73 ) + goto LABEL_151; + v74 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v10 + 32); + if ( v74 != std::ctype::do_narrow ) + v43 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v74)(v10, (char)v43, 0); + if ( !(_BYTE)v43 ) + goto LABEL_47; + v10[v72 + 285] = v43; + v73 = v43; +LABEL_151: + if ( v73 != 9 ) + goto LABEL_47; +LABEL_89: + v46 = a1[2]; + if ( v46 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *, int))(*a1 + 40))(a1, v43); + else + a1[2] = v46 + 1; + a2 = -1; + break; + case 55: + v61 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + &v104, + a7, + *(char **)(v99[2] + 8)); +LABEL_117: + a1 = v61; + a2 = v62; + break; + default: + goto LABEL_47; + } +LABEL_48: + v8 = v90 + 1; + } + else + { + v15 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v10 + 32); + if ( v15 != std::ctype::do_narrow ) + v13 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v15)(v10, (char)v97, 0); + if ( v13 ) + { + v10[v97 + 285] = v13; + v14 = v13; + goto LABEL_15; + } +LABEL_16: + v16 = *v93; + if ( !a1 || a2 != -1 ) + { + LOBYTE(v17) = a2; + goto LABEL_19; + } + v24 = (_BYTE *)a1[2]; + if ( (unsigned int)v24 >= a1[3] ) + { + v101 = *v93; + v17 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v16 = v101; + if ( v17 == -1 ) + a1 = 0; +LABEL_19: + if ( v16 != (_BYTE)v17 ) + goto LABEL_20; + v24 = (_BYTE *)a1[2]; + if ( (unsigned int)v24 < a1[3] ) + { +LABEL_40: + a1[2] = v24 + 1; + goto LABEL_41; + } + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); +LABEL_41: + a2 = -1; + ++v8; + } + else + { + if ( v16 == *v24 ) + goto LABEL_40; +LABEL_20: + v104 |= 4u; + ++v8; + } + } + } + if ( v104 || v8 != v96 ) +LABEL_32: + *a6 |= 4u; + return a1; +} +// 45ABC8: variable 'v27' is possibly undefined +// 45AD40: variable 'v18' is possibly undefined +// 45ADA6: variable 'v35' is possibly undefined +// 45AE59: variable 'v36' is possibly undefined +// 45AF1F: variable 'v39' is possibly undefined +// 45B207: variable 'v56' is possibly undefined +// 45B211: variable 'v57' is possibly undefined +// 45B337: variable 'v62' is possibly undefined +// 45B439: variable 'v67' is possibly undefined +// 45B560: variable 'v70' is possibly undefined +// 45B689: variable 'Str' is possibly undefined +// 45B884: variable 'v81' is possibly undefined +// 50C560: using guessed type void *std::__timepunct_cache::_S_timezones[2]; + +//----- (0045B970) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::_M_extract_wday_or_month( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + unsigned int *a5, + int a6, + unsigned int a7, + int a8, + _DWORD *a9) +{ + int v9; // eax + void *v10; // esp + void *v11; // esp + char v12; // dl + char v13; // bl + unsigned int v14; // esi + unsigned int v15; // edi + char v16; // dl + char v17; // bl + unsigned int v18; // edx + unsigned int *v19; // ecx + unsigned int v20; // eax + char *v22; // eax + unsigned int v23; // eax + int v24; // edx + unsigned int v25; // ebx + int v26; // esi + char v27; // al + int v28; // ecx + unsigned int v29; // eax + int v30; // eax + void *v31; // esp + void *v32; // esp + int v33; // ebx + int v34; // eax + int v35; // eax + _DWORD *v36; // ebx + int v37; // eax + char v38; // dl + bool v39; // zf + _DWORD *v40; // eax + int v41; // eax + bool v42; // zf + _DWORD *v43; // eax + _DWORD *v44; // ebx + int v45; // eax + int v46; // eax + char v47; // dl + bool v48; // zf + _DWORD *v49; // eax + _BYTE *v50; // eax + int v51; // eax + int v52; // eax + bool v53; // zf + _DWORD *v54; // eax + _DWORD *v55; // edi + int v56; // eax + bool v57; // zf + char v58; // si + char v59; // al + _DWORD *v60; // eax + _BYTE v61[12]; // [esp+10h] [ebp-48h] BYREF + _DWORD *v62; // [esp+1Ch] [ebp-3Ch] + _DWORD *v63; // [esp+20h] [ebp-38h] + int v64; // [esp+24h] [ebp-34h] + _DWORD *v65; // [esp+28h] [ebp-30h] + bool v66; // [esp+2Eh] [ebp-2Ah] + char v67; // [esp+2Fh] [ebp-29h] + char *v68; // [esp+30h] [ebp-28h] + unsigned int *v69; // [esp+34h] [ebp-24h] + unsigned int *v70; // [esp+38h] [ebp-20h] + _DWORD *v71; // [esp+3Ch] [ebp-1Ch] + + v65 = a1; + v64 = a2; + v63 = a3; + v68 = (char *)std::use_facet>(a8 + 108); + v9 = 16 * ((8 * a7 + 27) >> 4); + v10 = alloca(v9); + v11 = alloca(v9); + v70 = (unsigned int *)v61; + v12 = a2 == -1; + LOBYTE(v71) = v12 & (a1 != 0); + if ( (_BYTE)v71 ) + { + v12 = 0; + if ( v65[2] >= v65[3] ) + { + v34 = *v65; + LOBYTE(v69) = 0; + v35 = (*(int (__fastcall **)(_DWORD *))(v34 + 36))(v65); + v12 = (char)v69; + if ( v35 == -1 ) + { + v12 = (char)v71; + v65 = 0; + LOBYTE(v71) = 0; + } + } + } + v66 = a4 == -1; + v13 = v66 && a3 != 0; + if ( v13 ) + { + if ( a3[2] >= a3[3] ) + { + v51 = *a3; + LOBYTE(v69) = v12; + v52 = (*(int (__fastcall **)(_DWORD *))(v51 + 36))(a3); + v12 = (char)v69; + v53 = v52 == -1; + if ( v52 != -1 ) + v13 = 0; + v54 = 0; + if ( !v53 ) + v54 = a3; + v63 = v54; + } + else + { + v13 = 0; + } + } + else + { + v13 = v66; + } + if ( v12 == v13 ) + { + v62 = 0; + v14 = 0; + v15 = 0; + goto LABEL_6; + } + if ( (_BYTE)v71 ) + { + v50 = (_BYTE *)v65[2]; + if ( (unsigned int)v50 >= v65[3] ) + { + v55 = v65; + v56 = (*(int (__fastcall **)(_DWORD *))(*v65 + 36))(v65); + v57 = v56 == -1; + v58 = v56; + v59 = -1; + if ( !v57 ) + v59 = v58; + LOBYTE(v71) = v59; + v60 = 0; + if ( !v57 ) + v60 = v55; + v65 = v60; + } + else + { + LOBYTE(v71) = *v50; + } + } + else + { + LOBYTE(v71) = a2; + } + v14 = 2 * a7; + if ( !(2 * a7) ) + { + v62 = 0; + v15 = 0; + goto LABEL_6; + } + v69 = (unsigned int *)(2 * a7); + v24 = a6; + v25 = 0; + v15 = 0; + v26 = (int)v68; + do + { + while ( 1 ) + { + v28 = **(char **)(v24 + 4 * v25); + if ( (_BYTE)v28 == (_BYTE)v71 ) + break; + a6 = v24; + v27 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v26 + 8))(v26, v28); + v24 = a6; + if ( v27 == (_BYTE)v71 ) + break; + if ( (unsigned int *)++v25 == v69 ) + goto LABEL_50; + } + v70[v15++] = v25++; + } + while ( (unsigned int *)v25 != v69 ); +LABEL_50: + v62 = 0; + v14 = 0; + if ( v15 ) + { + v29 = v65[2]; + if ( v29 >= v65[3] ) + (*(void (__fastcall **)(_DWORD *, int))(*v65 + 40))(v65, v24); + else + v65[2] = v29 + 1; + v30 = 16 * ((4 * v15 + 27) >> 4); + v31 = alloca(v30); + v14 = 0; + v32 = alloca(v30); + v71 = (_DWORD *)v15; + v62 = v61; + v69 = (unsigned int *)v61; + v33 = (int)v70; + do + { + v69[v14] = strlen(*(const char **)(a6 + 4 * *(_DWORD *)(v33 + 4 * v14))); + ++v14; + } + while ( v71 != (_DWORD *)v14 ); + v64 = -1; + v15 = 1; + } +LABEL_6: + while ( 2 ) + { + v16 = v64 == -1; + LOBYTE(v71) = v16 & (v65 != 0); + if ( (_BYTE)v71 ) + { + if ( v65[2] >= v65[3] ) + { + v44 = v65; + v45 = *v65; + LOBYTE(v69) = v64 == -1; + v46 = (*(int (__fastcall **)(_DWORD *))(v45 + 36))(v65); + v47 = (char)v71; + v48 = v46 == -1; + if ( v46 != -1 ) + v47 = 0; + v49 = 0; + if ( !v48 ) + v49 = v44; + LOBYTE(v71) = v47; + v16 = (char)v69; + v65 = v49; + } + else + { + LOBYTE(v71) = 0; + } + } + else + { + LOBYTE(v71) = v64 == -1; + } + v17 = v66 && v63 != 0; + if ( v17 ) + { + if ( v63[2] < v63[3] ) + { + if ( !(_BYTE)v71 ) + break; + goto LABEL_11; + } + LOBYTE(v69) = v16; + v41 = (*(int (__fastcall **)(_DWORD *))(*v63 + 36))(v63); + v16 = (char)v69; + v42 = v41 == -1; + if ( v41 != -1 ) + v17 = 0; + v43 = 0; + if ( !v42 ) + v43 = v63; + v63 = v43; + } + else + { + v17 = v66; + } + if ( (_BYTE)v71 == v17 ) + break; +LABEL_11: + if ( v65 && v16 ) + { + v22 = (char *)v65[2]; + if ( (unsigned int)v22 >= v65[3] ) + { + v36 = v65; + v37 = (*(int (__fastcall **)(_DWORD *))(*v65 + 36))(v65); + v38 = -1; + v39 = v37 == -1; + if ( v37 != -1 ) + v38 = v37; + v40 = 0; + if ( !v39 ) + v40 = v36; + v67 = v38; + v65 = v40; + } + else + { + v67 = *v22; + } + } + else + { + v67 = v64; + } + if ( !v14 ) + { +LABEL_30: + *a9 |= 4u; + return v65; + } + v18 = 0; + v68 = 0; + v71 = v62; + do + { + while ( 1 ) + { + v19 = &v71[v18]; + if ( *v19 > v15 ) + break; + ++v68; + ++v18; +LABEL_17: + if ( v14 <= v18 ) + goto LABEL_21; + } + v69 = &v70[v18]; + if ( v67 == *(_BYTE *)(*(_DWORD *)(a6 + 4 * *v69) + v15) ) + { + ++v18; + goto LABEL_17; + } + *v69 = v70[--v14]; + *v19 = v71[v14]; + } + while ( v14 > v18 ); +LABEL_21: + if ( v68 != (char *)v14 ) + { + v20 = v65[2]; + if ( v20 >= v65[3] ) + (*(void (__fastcall **)(_DWORD *))(*v65 + 40))(v65); + else + v65[2] = v20 + 1; + v64 = -1; + ++v15; + continue; + } + break; + } + if ( v14 != 1 ) + { + if ( v14 == 2 && (*v62 == v15 || v62[1] == v15) ) + goto LABEL_39; + goto LABEL_30; + } + if ( *v62 != v15 ) + goto LABEL_30; +LABEL_39: + v23 = *v70; + if ( *v70 >= a7 ) + v23 = *v70 - a7; + *a5 = v23; + return v65; +} + +//----- (0045BE10) -------------------------------------------------------- +_DWORD *__thiscall std::time_get>::get( + void *this, + _DWORD *a2, + int a3, + _DWORD *a4, + int a5, + int a6, + _DWORD *a7, + _DWORD *a8, + unsigned __int8 *a9, + unsigned __int8 *a10) +{ + unsigned __int8 *v10; // edi + _DWORD *v12; // ebp + int v13; // edx + char v14; // dl + char v15; // bl + char v16; // dl + char v17; // bl + unsigned int v18; // eax + char v19; // dl + char v20; // bl + char v21; // bl + signed __int8 v22; // dl + int (__stdcall *v23)(unsigned __int8, int); // eax + unsigned __int8 v24; // dl + int (__stdcall *v25)(unsigned __int8, int); // eax + int v26; // ecx + __int64 (__thiscall *v27)(void *, _DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *, int, int); // eax + _BYTE *v28; // eax + char v29; // dl + _BYTE *v30; // edi + _DWORD *v31; // eax + int v32; // edx + char v33; // bl + char v34; // dl + char v35; // al + unsigned __int8 *i; // edi + int j; // ebp + bool v39; // al + bool v40; // di + char v41; // dl + char v42; // bl + int v43; // eax + unsigned __int8 *v44; // eax + int v45; // edi + char v46; // al + int (__stdcall *v47)(unsigned __int8, int); // eax + int (__stdcall *v48)(unsigned __int8); // eax + __int64 v49; // kr00_8 + char *v50; // eax + int v51; // eax + bool v52; // zf + _DWORD *v53; // eax + int v54; // eax + char *v55; // eax + signed __int8 v56; // al + int v57; // eax + int v58; // eax + bool v59; // zf + _DWORD *v60; // eax + int v61; // eax + int v62; // eax + bool v63; // [esp+4Bh] [ebp-51h] + bool v65; // [esp+50h] [ebp-4Ch] + char v66; // [esp+50h] [ebp-4Ch] + _DWORD *v67; // [esp+50h] [ebp-4Ch] + char v68; // [esp+50h] [ebp-4Ch] + char v70; // [esp+54h] [ebp-48h] + bool v71; // [esp+54h] [ebp-48h] + int v72; // [esp+58h] [ebp-44h] + unsigned __int8 *v73; // [esp+58h] [ebp-44h] + char v74; // [esp+58h] [ebp-44h] + int v76; // [esp+60h] [ebp-3Ch] + unsigned __int8 v77; // [esp+60h] [ebp-3Ch] + int v78; // [esp+68h] [ebp-34h] + char v79; // [esp+7Ch] [ebp-20h] BYREF + char v80; // [esp+7Dh] [ebp-1Fh] + char v81; // [esp+7Eh] [ebp-1Eh] + char v82; // [esp+7Fh] [ebp-1Dh] + unsigned __int8 *v83; // [esp+BCh] [ebp+20h] + + v10 = a9; + v12 = std::use_facet>(a6 + 108); + *a7 = 0; + if ( a9 == a10 ) + return a2; + v63 = a5 == -1; + while ( 1 ) + { + v65 = a3 == -1; + if ( !v65 || a2 == 0 ) + { + v19 = a3 == -1; + goto LABEL_19; + } + if ( a2[2] >= a2[3] ) + { + v57 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + v19 = v65 && a2 != 0; + if ( v57 != -1 ) + v19 = 0; + if ( v57 == -1 ) + a2 = 0; +LABEL_19: + v20 = v63 && a4 != 0; + if ( !v20 ) + goto LABEL_20; + goto LABEL_84; + } + v19 = 0; + v20 = v63 && a4 != 0; + if ( !v20 ) + { +LABEL_20: + v20 = a5 == -1; + goto LABEL_21; + } +LABEL_84: + if ( a4[2] >= a4[3] ) + { + v74 = v19; + v58 = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4); + v19 = v74; + v59 = v58 == -1; + if ( v58 != -1 ) + v20 = 0; + v60 = 0; + if ( !v59 ) + v60 = a4; + a4 = v60; +LABEL_21: + if ( v19 == v20 ) + goto LABEL_86; + goto LABEL_22; + } + if ( !v19 ) + { +LABEL_86: + *a7 = 6; + return a2; + } +LABEL_22: + v21 = *((_BYTE *)v12 + *v10 + 285); + v72 = *v10; + v22 = *v10; + if ( !v21 ) + { + v23 = *(int (__stdcall **)(unsigned __int8, int))(*v12 + 32); + if ( v23 != std::ctype::do_narrow ) + v22 = ((int (__thiscall *)(_DWORD *, _DWORD, _DWORD))v23)(v12, v22, 0); + if ( !v22 ) + goto LABEL_3; + v21 = v22; + *((_BYTE *)v12 + v72 + 285) = v22; + } + if ( v21 == 37 ) + { + v73 = v10 + 1; + if ( a10 == v10 + 1 ) + break; + v76 = v10[1]; + v24 = v10[1]; + v66 = *((_BYTE *)v12 + v76 + 285); + if ( !v66 ) + { + v25 = *(int (__stdcall **)(unsigned __int8, int))(*v12 + 32); + if ( v25 != std::ctype::do_narrow ) + v24 = ((int (__thiscall *)(_DWORD *, _DWORD, _DWORD))v25)(v12, (char)v76, 0); + if ( !v24 ) + { + v66 = 0; + v26 = 0; + v78 = 0; + goto LABEL_37; + } + v66 = v24; + *((_BYTE *)v12 + v76 + 285) = v24; + } + v24 = v66; + if ( v66 == 69 || v66 == 79 ) + { + v73 = v10 + 2; + if ( a10 == v10 + 2 ) + break; + v45 = v10[2]; + v46 = *((_BYTE *)v12 + v45 + 285); + v78 = v66; + v24 = v45; + if ( v46 ) + { + v26 = v46; + v24 = *((_BYTE *)v12 + v45 + 285); + } + else + { + v26 = (char)v45; + v47 = *(int (__stdcall **)(unsigned __int8, int))(*v12 + 32); + if ( v47 != std::ctype::do_narrow ) + { + v56 = ((int (__fastcall *)(_DWORD *, int, _DWORD, _DWORD))v47)(v12, v45, (char)v45, 0); + v26 = v56; + v24 = v56; + } + if ( v24 ) + *((_BYTE *)v12 + v45 + 285) = v24; + } + } + else + { + v78 = 0; + v26 = v66; + v66 = 0; + } +LABEL_37: + v77 = v24; + v27 = *(__int64 (__thiscall **)(void *, _DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *, int, int))(*(_DWORD *)this + 32); + if ( (char *)v27 == (char *)std::time_get>::do_get ) + { + v28 = std::use_facet>(a6 + 108); + v29 = v77; + v30 = v28; + *a7 = 0; + if ( v28[28] ) + { + v21 = v28[66]; + } + else + { + std::ctype::_M_widen_init((int)v28); + v29 = v77; + v48 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v30 + 24); + if ( v48 != std::ctype::do_widen ) + { + v21 = ((int (__fastcall *)(_BYTE *, _DWORD, int))v48)(v30, v77, 37); + v29 = v77; + } + } + v79 = v21; + if ( v66 ) + { + v81 = v29; + v82 = 0; + v80 = v66; + } + else + { + v80 = v29; + v81 = 0; + } + v31 = std::time_get>::_M_extract_via_format( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + &v79); + a2 = v31; + v33 = v32 == -1; + a3 = v32; + v34 = v33 & (v31 != 0); + if ( v34 ) + { + v33 = 0; + if ( v31[2] >= v31[3] ) + { + v68 = v34; + if ( (*(int (__fastcall **)(_DWORD *))(*v31 + 36))(v31) == -1 ) + { + v33 = v68; + a2 = 0; + } + } + } + if ( a4 && a5 == -1 ) + { + v35 = 0; + if ( a4[2] >= a4[3] ) + v35 = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4) == -1; + } + else + { + v35 = a5 == -1; + } + if ( v35 == v33 ) + *a7 |= 2u; + } + else + { + v49 = v27(this, a2, a3, a4, a5, a6, a7, a8, v26, v78); + a3 = HIDWORD(v49); + a2 = (_DWORD *)v49; + } + v10 = v73 + 1; + if ( a10 == v73 + 1 ) + return a2; + goto LABEL_16; + } +LABEL_3: + v13 = v12[6]; + if ( (*(_BYTE *)(v13 + 2 * *v10) & 0x20) != 0 ) + { + for ( i = v10 + 1; a10 != i; ++i ) + { + if ( (*(_BYTE *)(v13 + 2 * *i) & 0x20) == 0 ) + break; + } + v83 = i; + v67 = v12; + for ( j = a3; ; j = -1 ) + { + v39 = j == -1; + v40 = v39; + if ( v39 && a2 != 0 ) + { + if ( a2[2] >= a2[3] ) + { + v71 = v39 && a2 != 0; + v54 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + v41 = v71; + if ( v54 != -1 ) + v41 = 0; + if ( v54 == -1 ) + a2 = 0; + } + else + { + v41 = 0; + } + } + else + { + v41 = j == -1; + } + v42 = v63 && a4 != 0; + if ( !v42 ) + break; + if ( a4[2] >= a4[3] ) + { + v70 = v41; + v51 = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4); + v41 = v70; + v52 = v51 == -1; + if ( v51 != -1 ) + v42 = 0; + v53 = 0; + if ( !v52 ) + v53 = a4; + a4 = v53; +LABEL_59: + if ( v41 == v42 ) + goto LABEL_72; + goto LABEL_60; + } + if ( !v41 ) + { +LABEL_72: + a3 = j; + v10 = v83; + v12 = v67; + goto LABEL_15; + } +LABEL_60: + if ( a2 && v40 ) + { + v44 = (unsigned __int8 *)a2[2]; + if ( (unsigned int)v44 < a2[3] ) + { + if ( (*(_BYTE *)(v67[6] + 2 * *v44) & 0x20) == 0 ) + { + a3 = -1; + v10 = v83; + v12 = v67; + goto LABEL_15; + } +LABEL_65: + a2[2] = v44 + 1; + continue; + } + v43 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + if ( v43 == -1 ) + a2 = 0; + } + else + { + LOBYTE(v43) = j; + } + if ( (*(_BYTE *)(v67[6] + 2 * (unsigned __int8)v43) & 0x20) == 0 ) + goto LABEL_72; + v44 = (unsigned __int8 *)a2[2]; + if ( (unsigned int)v44 < a2[3] ) + goto LABEL_65; + (*(void (__fastcall **)(_DWORD *))(*a2 + 40))(a2); + } + v42 = a5 == -1; + goto LABEL_59; + } + if ( a2 && a3 == -1 ) + { + v50 = (char *)a2[2]; + if ( (unsigned int)v50 >= a2[3] ) + { + v61 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + v14 = v61; + if ( v61 == -1 ) + v14 = -1; + if ( v61 == -1 ) + a2 = 0; + } + else + { + v14 = *v50; + } + } + else + { + v14 = a3; + } + v15 = (*(int (__thiscall **)(_DWORD *, _DWORD))(*v12 + 16))(v12, v14); + if ( (*(unsigned __int8 (__thiscall **)(_DWORD *, _DWORD))(*v12 + 16))(v12, (char)*v10) != v15 ) + { + if ( a2 && a3 == -1 ) + { + v55 = (char *)a2[2]; + if ( (unsigned int)v55 >= a2[3] ) + { + v62 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + v16 = v62; + if ( v62 == -1 ) + v16 = -1; + if ( v62 == -1 ) + a2 = 0; + } + else + { + v16 = *v55; + } + } + else + { + v16 = a3; + } + v17 = (*(int (__thiscall **)(_DWORD *, _DWORD))(*v12 + 8))(v12, v16); + if ( (*(unsigned __int8 (__thiscall **)(_DWORD *, _DWORD))(*v12 + 8))(v12, (char)*v10) != v17 ) + break; + } + v18 = a2[2]; + if ( v18 >= a2[3] ) + (*(void (__fastcall **)(_DWORD *))(*a2 + 40))(a2); + else + a2[2] = v18 + 1; + a3 = -1; + ++v10; +LABEL_15: + if ( a10 == v10 ) + return a2; +LABEL_16: + if ( *a7 ) + return a2; + } + *a7 = 4; + return a2; +} +// 45C571: conditional instruction was optimized away because eax.4==FFFFFFFF +// 45C107: variable 'v32' is possibly undefined + +//----- (0045C6A0) -------------------------------------------------------- +_DWORD *__thiscall std::time_get>::get( + void *this, + _DWORD *a2, + int a3, + _DWORD *a4, + int a5, + int a6, + _DWORD *a7, + _DWORD *a8, + char a9, + char a10) +{ + _DWORD *(__stdcall *v10)(_DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *, char, char); // eax + _BYTE *v11; // eax + char v12; // dl + _DWORD *v13; // esi + int v14; // edx + char v15; // dl + char v16; // al + int (__stdcall *v18)(unsigned __int8); // eax + int v19; // eax + int v20; // eax + char v21; // [esp+24h] [ebp-48h] + char v22; // [esp+28h] [ebp-44h] + _BYTE *v23; // [esp+3Ch] [ebp-30h] + char v24; // [esp+4Ch] [ebp-20h] BYREF + char v25; // [esp+4Dh] [ebp-1Fh] + char v26; // [esp+4Eh] [ebp-1Eh] + char v27; // [esp+4Fh] [ebp-1Dh] + + v10 = *(_DWORD *(__stdcall **)(_DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *, char, char))(*(_DWORD *)this + 32); + if ( v10 != std::time_get>::do_get ) + return (_DWORD *)((int (__thiscall *)(void *, _DWORD *, int, _DWORD *, int, int, _DWORD *, _DWORD *, _DWORD, _DWORD))v10)( + this, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10); + v11 = std::use_facet>(a6 + 108); + *a7 = 0; + if ( v11[28] ) + { + v12 = v11[66]; + } + else + { + v23 = v11; + std::ctype::_M_widen_init((int)v11); + v12 = 37; + v18 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v23 + 24); + if ( v18 != std::ctype::do_widen ) + v12 = v18(37u); + } + v24 = v12; + if ( a10 ) + { + v27 = 0; + v25 = a10; + v26 = a9; + } + else + { + v26 = 0; + v25 = a9; + } + v13 = std::time_get>::_M_extract_via_format(a2, a3, a4, a5, a6, a7, a8, &v24); + v15 = v14 == -1; + v22 = v15 & (v13 != 0); + if ( v22 ) + { + v15 = 0; + if ( v13[2] >= v13[3] ) + { + v20 = (*(int (__fastcall **)(_DWORD *))(*v13 + 36))(v13); + v15 = 0; + if ( v20 == -1 ) + v15 = v22; + if ( v20 == -1 ) + v13 = 0; + } + } + v16 = a5 == -1; + if ( a4 ) + { + if ( a5 == -1 ) + { + v16 = 0; + if ( a4[2] >= a4[3] ) + { + v21 = v15; + v19 = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4); + v15 = v21; + v16 = v19 == -1; + } + } + } + if ( v15 == v16 ) + *a7 |= 2u; + return v13; +} +// 45C781: variable 'v14' is possibly undefined + +//----- (0045C8E0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7, + char a8, + char a9) +{ + _BYTE *v9; // ebp + char v10; // dl + _DWORD *v11; // esi + int v12; // edx + char v13; // dl + char v14; // bp + char v15; // al + int (__stdcall *v17)(unsigned __int8); // eax + int v18; // eax + int v19; // eax + char v20; // [esp+20h] [ebp-3Ch] + char v21; // [esp+3Ch] [ebp-20h] BYREF + char v22; // [esp+3Dh] [ebp-1Fh] + char v23; // [esp+3Eh] [ebp-1Eh] + char v24; // [esp+3Fh] [ebp-1Dh] + + v9 = std::use_facet>(a5 + 108); + *a6 = 0; + if ( v9[28] ) + { + v10 = v9[66]; + } + else + { + std::ctype::_M_widen_init((int)v9); + v10 = 37; + v17 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v9 + 24); + if ( v17 != std::ctype::do_widen ) + v10 = ((int (__fastcall *)(_BYTE *, int, int))v17)(v9, 37, 37); + } + v21 = v10; + if ( a9 ) + { + v24 = 0; + v22 = a9; + v23 = a8; + } + else + { + v23 = 0; + v22 = a8; + } + v11 = std::time_get>::_M_extract_via_format(a1, a2, a3, a4, a5, a6, a7, &v21); + v13 = v12 == -1; + v14 = v13 & (v11 != 0); + if ( v14 ) + { + v13 = 0; + if ( v11[2] >= v11[3] ) + { + v19 = (*(int (__fastcall **)(_DWORD *))(*v11 + 36))(v11); + v13 = 0; + if ( v19 == -1 ) + { + v13 = v14; + v11 = 0; + } + } + } + v15 = a4 == -1; + if ( a3 ) + { + if ( a4 == -1 ) + { + v15 = 0; + if ( a3[2] >= a3[3] ) + { + v20 = v13; + v18 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v13 = v20; + v15 = v18 == -1; + } + } + } + if ( v13 == v15 ) + *a6 |= 2u; + return v11; +} +// 45CA89: conditional instruction was optimized away because eax.4==FFFFFFFF +// 45C99D: variable 'v12' is possibly undefined + +//----- (0045CAA0) -------------------------------------------------------- +int __fastcall std::time_get>::get_date(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 16))(a1); +} + +//----- (0045CAB0) -------------------------------------------------------- +int __fastcall std::time_get>::get_time(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 12))(a1); +} + +//----- (0045CAC0) -------------------------------------------------------- +int __fastcall std::time_get>::get_year(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 28))(a1); +} + +//----- (0045CAD0) -------------------------------------------------------- +int __fastcall std::time_get>::date_order(int a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*(_DWORD *)a1 + 8); + if ( v1 == std::time_get>::do_date_order ) + return 0; + else + return v1(); +} + +//----- (0045CAF0) -------------------------------------------------------- +int *__stdcall std::time_get>::do_get_date( + int *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + _DWORD *v7; // eax + int *v8; // ecx + int *v9; // ebp + __int16 v10; // dx + _BOOL2 v11; // bx + bool v12; // cl + __int16 *v14; // eax + __int16 v15; // ax + bool v16; // si + __int16 *v17; // eax + __int16 v18; // ax + int *v19; // [esp+30h] [ebp-2Ch] + + v7 = std::use_facet>(a5 + 108); + v8 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + *(wchar_t **)(v7[2] + 8)); + v9 = v8; + v11 = v10 == -1; + if ( v11 && v8 != 0 ) + { + v16 = v11 && v8 != 0; + v17 = (__int16 *)v8[2]; + if ( (unsigned int)v17 >= v8[3] ) + { + v19 = v8; + v18 = (*(int (**)(void))(*v8 + 36))(); + v8 = v19; + } + else + { + v18 = *v17; + } + LOBYTE(v11) = 0; + v9 = 0; + if ( v18 == -1 ) + LOBYTE(v11) = v16; + if ( v18 != -1 ) + v9 = v8; + } + v12 = (_WORD)a4 == 0xFFFF; + if ( a3 && (_WORD)a4 == 0xFFFF ) + { + v14 = (__int16 *)a3[2]; + if ( (unsigned int)v14 >= a3[3] ) + v15 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v15 = *v14; + v12 = v15 == -1; + } + if ( v11 == v12 ) + *a6 |= 2u; + return v9; +} +// 45CB6F: variable 'v10' is possibly undefined + +//----- (0045CC20) -------------------------------------------------------- +int *__stdcall std::time_get>::do_get_time( + int *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + _DWORD *v7; // eax + int *v8; // ecx + int *v9; // ebp + __int16 v10; // dx + _BOOL2 v11; // bx + bool v12; // cl + __int16 *v14; // eax + __int16 v15; // ax + bool v16; // si + __int16 *v17; // eax + __int16 v18; // ax + int *v19; // [esp+30h] [ebp-2Ch] + + v7 = std::use_facet>(a5 + 108); + v8 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + *(wchar_t **)(v7[2] + 16)); + v9 = v8; + v11 = v10 == -1; + if ( v11 && v8 != 0 ) + { + v16 = v11 && v8 != 0; + v17 = (__int16 *)v8[2]; + if ( (unsigned int)v17 >= v8[3] ) + { + v19 = v8; + v18 = (*(int (**)(void))(*v8 + 36))(); + v8 = v19; + } + else + { + v18 = *v17; + } + LOBYTE(v11) = 0; + v9 = 0; + if ( v18 == -1 ) + LOBYTE(v11) = v16; + if ( v18 != -1 ) + v9 = v8; + } + v12 = (_WORD)a4 == 0xFFFF; + if ( a3 && (_WORD)a4 == 0xFFFF ) + { + v14 = (__int16 *)a3[2]; + if ( (unsigned int)v14 >= a3[3] ) + v15 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v15 = *v14; + v12 = v15 == -1; + } + if ( v11 == v12 ) + *a6 |= 2u; + return v9; +} +// 45CC9F: variable 'v10' is possibly undefined + +//----- (0045CD50) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_year( + _DWORD *a1, + unsigned __int16 a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + int a7) +{ + __int16 v7; // dx + _DWORD *v8; // ecx + _DWORD *v9; // ebp + int v10; // ebx + char v11; // bl + char v12; // cl + __int16 *v14; // eax + __int16 v15; // ax + __int16 *v16; // eax + __int16 v17; // ax + bool v18; // zf + _DWORD *v19; // eax + char v20; // [esp+40h] [ebp-3Ch] + _DWORD *v21; // [esp+44h] [ebp-38h] + int v22; // [esp+58h] [ebp-24h] BYREF + int v23[8]; // [esp+5Ch] [ebp-20h] BYREF + + v23[0] = 0; + v8 = std::time_get>::_M_extract_num( + a1, + a2, + a3, + a4, + &v22, + 0, + 9999, + 4u, + a5, + v23); + v9 = v8; + if ( v23[0] ) + { + *a6 |= 4u; + } + else + { + v10 = v22 + 100; + if ( v22 >= 0 ) + v10 = v22 - 1900; + *(_DWORD *)(a7 + 20) = v10; + } + v11 = v7 == -1; + v20 = v11 & (v8 != 0); + if ( v20 ) + { + v16 = (__int16 *)v8[2]; + if ( (unsigned int)v16 >= v8[3] ) + { + v21 = v8; + v17 = (*(int (**)(void))(*v8 + 36))(); + v8 = v21; + } + else + { + v17 = *v16; + } + v18 = v17 == -1; + v11 = 0; + if ( v17 == -1 ) + v11 = v20; + v19 = 0; + if ( !v18 ) + v19 = v8; + v9 = v19; + } + v12 = a4 == -1; + if ( a3 && a4 == -1 ) + { + v14 = (__int16 *)a3[2]; + if ( (unsigned int)v14 >= a3[3] ) + v15 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v15 = *v14; + v12 = v15 == -1; + } + if ( v12 == v11 ) + *a6 |= 2u; + return v9; +} +// 45CE0D: variable 'v7' is possibly undefined +// 45CD50: using guessed type int var_20[8]; + +//----- (0045CEC0) -------------------------------------------------------- +int __fastcall std::time_get>::get_weekday(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 20))(a1); +} + +//----- (0045CED0) -------------------------------------------------------- +int std::time_get>::do_date_order() +{ + return 0; +} + +//----- (0045CEE0) -------------------------------------------------------- +int __fastcall std::time_get>::get_monthname(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 24))(a1); +} + +//----- (0045CEF0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::_M_extract_num( + _DWORD *a1, + unsigned __int16 a2, + _DWORD *a3, + __int16 a4, + int *a5, + signed int a6, + int a7, + unsigned int a8, + int a9, + _DWORD *a10) +{ + unsigned int v10; // ebp + int v12; // eax + int v13; // edi + char v14; // dl + char v15; // bl + int v16; // edx + unsigned __int8 v17; // al + unsigned int v18; // eax + __int16 *v19; // eax + __int16 v20; // ax + __int16 *v21; // eax + __int16 v22; // ax + bool v23; // zf + _DWORD *v24; // eax + unsigned __int16 *v26; // eax + bool v27; // [esp+1Bh] [ebp-31h] + unsigned int v28; // [esp+1Ch] [ebp-30h] + void *v30; // [esp+24h] [ebp-28h] + char v32; // [esp+2Eh] [ebp-1Eh] + char v33; // [esp+2Fh] [ebp-1Dh] + + v10 = 10; + v30 = std::use_facet>(a9 + 108); + if ( a8 != 2 ) + { + v12 = 1; + if ( a8 == 4 ) + v12 = 1000; + v10 = v12; + } + v28 = 0; + v32 = a4 == -1; + v13 = 0; + while ( 1 ) + { + v27 = a2 == 0xFFFF; + v14 = v27 && a1 != 0; + if ( v14 ) + break; + v14 = a2 == 0xFFFF; + v15 = v32 & (a3 != 0); + if ( v15 ) + goto LABEL_26; +LABEL_7: + if ( v14 == v32 ) + goto LABEL_33; +LABEL_8: + if ( v28 >= a8 ) + goto LABEL_33; + if ( a1 && a2 == 0xFFFF ) + { + v26 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v26 >= a1[3] ) + v16 = (*(unsigned __int16 (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v16 = *v26; + if ( (_WORD)v16 == 0xFFFF ) + a1 = 0; + } + else + { + v16 = a2; + } + v17 = (*(int (__thiscall **)(void *, int, int))(*(_DWORD *)v30 + 48))(v30, v16, 42) - 48; + if ( v17 > 9u ) + goto LABEL_34; + v13 = (char)v17 + 10 * v13; + if ( (int)(v13 * v10) > a7 || (int)(v10 + v13 * v10) <= a6 ) + goto LABEL_34; + v18 = a1[2]; + v10 /= 0xAu; + if ( v18 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v18 + 2; + ++v28; + a2 = -1; + } + v19 = (__int16 *)a1[2]; + if ( (unsigned int)v19 >= a1[3] ) + { + v20 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v14 = v27 && a1 != 0; + } + else + { + v20 = *v19; + } + if ( v20 == -1 ) + a1 = 0; + if ( v20 != -1 ) + v14 = 0; + v15 = v32 & (a3 != 0); + if ( !v15 ) + goto LABEL_7; +LABEL_26: + v21 = (__int16 *)a3[2]; + if ( (unsigned int)v21 >= a3[3] ) + { + v33 = v14; + v22 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v14 = v33; + } + else + { + v22 = *v21; + } + v23 = v22 == -1; + v24 = 0; + if ( !v23 ) + v24 = a3; + a3 = v24; + if ( !v23 ) + v15 = 0; + if ( v14 != v15 ) + goto LABEL_8; +LABEL_33: + if ( v28 == a8 ) + { +LABEL_37: + *a5 = v13; + return a1; + } +LABEL_34: + if ( a8 == 4 && v28 == 2 ) + { + v13 -= 100; + goto LABEL_37; + } + *a10 |= 4u; + return a1; +} + +//----- (0045D170) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_weekday( + _DWORD *a1, + int a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + int a7) +{ + _DWORD *v7; // eax + int v8; // ecx + int v9; // eax + __int16 v10; // dx + _DWORD *v11; // ecx + _DWORD *v12; // ebp + char v13; // bl + char v14; // si + char v15; // cl + __int16 *v17; // eax + __int16 v18; // ax + __int16 *v19; // eax + __int16 v20; // ax + _DWORD *v21; // [esp+40h] [ebp-6Ch] + unsigned int v22; // [esp+50h] [ebp-5Ch] BYREF + int v23; // [esp+54h] [ebp-58h] BYREF + int v24[21]; // [esp+58h] [ebp-54h] BYREF + + v23 = 0; + v7 = (_DWORD *)*((_DWORD *)std::use_facet>(a5 + 108) + 2); + v24[0] = v7[18]; + v24[1] = v7[19]; + v24[2] = v7[20]; + v24[3] = v7[21]; + v24[4] = v7[22]; + v24[5] = v7[23]; + v24[6] = v7[24]; + v24[7] = v7[11]; + v24[8] = v7[12]; + v24[9] = v7[13]; + v24[10] = v7[14]; + v24[11] = v7[15]; + v8 = v7[16]; + v9 = v7[17]; + v24[12] = v8; + v24[13] = v9; + v11 = std::time_get>::_M_extract_wday_or_month( + a1, + a2, + a3, + a4, + &v22, + (int)v24, + 7u, + a5, + &v23); + v12 = v11; + if ( v23 ) + *a6 |= 4u; + else + *(_DWORD *)(a7 + 24) = v22; + v13 = v10 == -1; + v14 = v13 & (v11 != 0); + if ( v14 ) + { + v19 = (__int16 *)v11[2]; + if ( (unsigned int)v19 >= v11[3] ) + { + v21 = v11; + v20 = (*(int (**)(void))(*v11 + 36))(); + v11 = v21; + } + else + { + v20 = *v19; + } + v13 = 0; + v12 = 0; + if ( v20 == -1 ) + v13 = v14; + if ( v20 != -1 ) + v12 = v11; + } + v15 = a4 == -1; + if ( a3 && a4 == -1 ) + { + v17 = (__int16 *)a3[2]; + if ( (unsigned int)v17 >= a3[3] ) + v18 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v18 = *v17; + v15 = v18 == -1; + } + if ( v13 == v15 ) + *a6 |= 2u; + return v12; +} +// 45D29D: variable 'v10' is possibly undefined + +//----- (0045D360) -------------------------------------------------------- +int *__stdcall std::time_get>::_M_extract_name( + int *a1, + int a2, + _DWORD *a3, + int a4, + int **a5, + int a6, + int a7, + int a8, + _DWORD *a9) +{ + void *v9; // edi + int v10; // eax + void *v11; // esp + void *v12; // esp + int *v13; // edx + char v14; // bl + int v15; // eax + int v17; // ebx + int v18; // edx + size_t v19; // esi + __int16 v20; // ax + int v21; // ecx + int *v22; // edx + int *v23; // ebx + int *v24; // edi + size_t v25; // eax + unsigned int v26; // ebx + unsigned int v27; // esi + size_t v28; // eax + unsigned int v29; // edi + unsigned int v30; // eax + __int16 *v31; // eax + __int16 v32; // ax + bool v33; // zf + int v34; // eax + char v35; // di + char v36; // dl + int *v37; // ecx + size_t v38; // edi + int i; // eax + __int16 v40; // ax + __int16 *v41; // eax + unsigned int v42; // eax + int *v43; // ebx + const wchar_t *v44; // edi + unsigned int v45; // ebx + int *v46; // esi + unsigned int v47; // eax + __int16 *v48; // eax + __int16 v49; // ax + char v50; // di + char v51; // dl + wchar_t v52; // di + __int16 v53; // ax + _WORD *v54; // eax + __int16 *v55; // eax + __int16 v56; // ax + bool v57; // zf + _DWORD *v58; // eax + int v59; // eax + __int16 *v60; // eax + __int16 v61; // ax + bool v62; // zf + int *v63; // eax + char v64; // cl + __int16 *v65; // eax + __int16 v66; // ax + bool v67; // zf + _DWORD *v68; // eax + _WORD *v69; // eax + int v70; // eax + int v71; // eax + int v72; // eax + __int16 v73; // ax + __int16 *v74; // eax + __int16 v75; // ax + bool v76; // zf + _DWORD *v77; // eax + int v78; // [esp+10h] [ebp-38h] BYREF + _DWORD *v79; // [esp+14h] [ebp-34h] + bool v80; // [esp+1Bh] [ebp-2Dh] + int v81; // [esp+1Ch] [ebp-2Ch] + int *v82; // [esp+20h] [ebp-28h] + int *v83; // [esp+24h] [ebp-24h] + const wchar_t *v84; // [esp+28h] [ebp-20h] + size_t v85; // [esp+2Ch] [ebp-1Ch] + + v81 = a4; + v78 = a2; + LOWORD(v84) = a2; + v82 = a1; + v79 = a3; + v9 = std::use_facet>(a8 + 108); + v10 = 16 * ((unsigned int)(4 * a7 + 27) >> 4); + v11 = alloca(v10); + v12 = alloca(v10); + v13 = &v78; + LOBYTE(v85) = (_WORD)a2 == 0xFFFF; + LOBYTE(v83) = v85 & (a1 != 0); + if ( (_BYTE)v83 ) + { + v60 = (__int16 *)a1[2]; + if ( (unsigned int)v60 >= a1[3] ) + { + v72 = *a1; + v82 = &v78; + v61 = (*(int (__fastcall **)(int *))(v72 + 36))(a1); + v13 = v82; + } + else + { + v61 = *v60; + } + v62 = v61 == -1; + v63 = 0; + v64 = (char)v83; + if ( !v62 ) + v63 = a1; + v82 = v63; + if ( !v62 ) + v64 = 0; + LOBYTE(v83) = v64; + } + else + { + LOBYTE(v83) = v85; + } + v80 = (_WORD)v81 == 0xFFFF; + v14 = v80 && a3 != 0; + if ( v14 ) + { + v65 = (__int16 *)a3[2]; + if ( (unsigned int)v65 >= a3[3] ) + { + v71 = *a3; + v81 = (int)v13; + v66 = (*(int (__fastcall **)(_DWORD *))(v71 + 36))(a3); + v13 = (int *)v81; + } + else + { + v66 = *v65; + } + v67 = v66 == -1; + v68 = 0; + if ( !v67 ) + v68 = a3; + v79 = v68; + if ( !v67 ) + v14 = 0; + } + else + { + v14 = v80; + } + if ( v14 == (_BYTE)v83 ) + goto LABEL_6; + if ( v82 && (_BYTE)v85 ) + { + v69 = (_WORD *)v82[2]; + if ( (unsigned int)v69 >= v82[3] ) + { + v83 = v13; + v73 = (*(int (__fastcall **)(int *))(*v82 + 36))(v82); + v13 = v83; + LOWORD(v85) = v73; + } + else + { + LOWORD(v85) = *v69; + } + v70 = 0; + if ( (_WORD)v85 != 0xFFFF ) + v70 = (int)v82; + v82 = (int *)v70; + } + else + { + LOWORD(v85) = (_WORD)v84; + } + if ( !a7 ) + goto LABEL_6; + v83 = v13; + v17 = 0; + v18 = a6; + v19 = 0; + do + { + while ( 1 ) + { + v21 = **(unsigned __int16 **)(v18 + 4 * v17); + if ( (_WORD)v21 == (_WORD)v85 ) + break; + a6 = v18; + v20 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v9 + 24))(v9, v21); + v18 = a6; + if ( v20 == (_WORD)v85 ) + break; + if ( a7 == ++v17 ) + goto LABEL_17; + } + v83[v19++] = v17++; + } + while ( a7 != v17 ); +LABEL_17: + v22 = v83; + v83 = 0; + if ( v19 <= 1 ) + goto LABEL_44; + v23 = v22; + do + { + v24 = v23; + v81 = *v23; + v25 = wcslen(*(const wchar_t **)(a6 + 4 * v81)); + v85 = v19; + v26 = 1; + v27 = v25; + do + { + v28 = wcslen(*(const wchar_t **)(a6 + 4 * v24[v26])); + if ( v27 > v28 ) + v27 = v28; + ++v26; + } + while ( v26 < v85 ); + v23 = v24; + v29 = v27; + v19 = v85; + v30 = v82[2]; + if ( v30 >= v82[3] ) + (*(void (__fastcall **)(int *))(*v82 + 40))(v82); + else + v82[2] = v30 + 2; + v83 = (int *)((char *)v83 + 1); + if ( (unsigned int)v83 >= v29 ) + goto LABEL_73; + v31 = (__int16 *)v82[2]; + if ( (unsigned int)v31 >= v82[3] ) + v32 = (*(int (__fastcall **)(int *))(*v82 + 36))(v82); + else + v32 = *v31; + v33 = v32 == -1; + v34 = 0; + if ( !v33 ) + v34 = (int)v82; + v82 = (int *)v34; + v35 = v33; + v36 = v80 && v79 != 0; + if ( v36 ) + { + v55 = (__int16 *)v79[2]; + if ( (unsigned int)v55 >= v79[3] ) + { + LOBYTE(v85) = v80 && v79 != 0; + v56 = (*(int (__fastcall **)(_DWORD *))(*v79 + 36))(v79); + v36 = v85; + } + else + { + v56 = *v55; + } + v57 = v56 == -1; + v58 = 0; + if ( !v57 ) + v58 = v79; + v79 = v58; + if ( !v57 ) + v36 = 0; + if ( v35 == v36 ) + goto LABEL_73; + } + else if ( v33 == v80 ) + { + goto LABEL_73; + } + v37 = v82; + v38 = 0; + v84 = (const wchar_t *)(2 * (_DWORD)v83); + for ( i = v81; ; i = v23[v38] ) + { + LOWORD(v85) = *(const wchar_t *)((char *)v84 + *(_DWORD *)(a6 + 4 * i)); + v40 = -1; + if ( v37 ) + { + v41 = (__int16 *)v37[2]; + if ( (unsigned int)v41 >= v37[3] ) + { + v59 = *v37; + v82 = v37; + v40 = (*(int (**)(void))(v59 + 36))(); + v37 = v82; + } + else + { + v40 = *v41; + } + if ( v40 == -1 ) + v37 = 0; + } + if ( (_WORD)v85 == v40 ) + break; + v23[v38] = v23[--v19]; + if ( v19 <= v38 ) + goto LABEL_42; +LABEL_34: + ; + } + if ( v19 > ++v38 ) + goto LABEL_34; +LABEL_42: + v82 = v37; + } + while ( v19 > 1 ); + LOWORD(v84) = -1; + v22 = v23; +LABEL_44: + if ( v19 == 1 ) + { + v42 = v82[2]; + if ( v42 >= v82[3] ) + { + v85 = (size_t)v22; + (*(void (__fastcall **)(int *))(*v82 + 40))(v82); + v22 = (int *)v85; + } + else + { + v82[2] = v42 + 2; + } + v43 = v83; + v44 = *(const wchar_t **)(a6 + 4 * *v22); + v83 = (int *)*v22; + v45 = (unsigned int)v43 + 1; + v85 = wcslen(v44); + if ( v45 < v85 ) + { + v84 = v44; + v46 = v82; + do + { + v48 = (__int16 *)v46[2]; + if ( (unsigned int)v48 >= v46[3] ) + v49 = (*(int (__fastcall **)(int *))(*v46 + 36))(v46); + else + v49 = *v48; + v50 = v49 == -1; + if ( v49 == -1 ) + v46 = 0; + v51 = v80 && v79 != 0; + if ( v51 ) + { + v74 = (__int16 *)v79[2]; + if ( (unsigned int)v74 >= v79[3] ) + { + LOBYTE(v82) = v80 && v79 != 0; + v75 = (*(int (__fastcall **)(_DWORD *))(*v79 + 36))(v79); + v51 = (char)v82; + } + else + { + v75 = *v74; + } + v76 = v75 == -1; + v77 = 0; + if ( !v76 ) + v77 = v79; + v79 = v77; + if ( !v76 ) + v51 = 0; + } + else + { + v51 = v80; + } + if ( v51 == v50 ) + goto LABEL_108; + v52 = v84[v45]; + v53 = -1; + if ( v46 ) + { + v54 = (_WORD *)v46[2]; + v53 = (unsigned int)v54 >= v46[3] ? (*(int (__fastcall **)(int *))(*v46 + 36))(v46) : *v54; + if ( v53 == -1 ) + v46 = 0; + } + if ( v52 != v53 ) + { +LABEL_108: + v82 = v46; + LOWORD(v84) = -1; + goto LABEL_6; + } + v47 = v46[2]; + if ( v47 >= v46[3] ) + (*(void (__fastcall **)(int *))(*v46 + 40))(v46); + else + v46[2] = v47 + 2; + ++v45; + } + while ( v45 < v85 ); + v82 = v46; + } + if ( v85 == v45 ) + { + *a5 = v83; + LOWORD(v84) = -1; + goto LABEL_7; + } +LABEL_73: + LOWORD(v84) = -1; + } +LABEL_6: + *a9 |= 4u; +LABEL_7: + HIWORD(v15) = HIWORD(v78); + LOWORD(v15) = (_WORD)v84; + v78 = v15; + return v82; +} + +//----- (0045D8B0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_monthname( + _DWORD *a1, + int a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + int a7) +{ + _DWORD *v7; // eax + int v8; // ecx + int v9; // ecx + __int16 v10; // dx + _DWORD *v11; // ecx + _DWORD *v12; // ebp + char v13; // bl + char v14; // si + char v15; // cl + __int16 *v17; // eax + __int16 v18; // ax + __int16 *v19; // eax + __int16 v20; // ax + _DWORD *v21; // [esp+40h] [ebp-9Ch] + unsigned int v22; // [esp+58h] [ebp-84h] BYREF + int v23; // [esp+5Ch] [ebp-80h] BYREF + int v24[31]; // [esp+60h] [ebp-7Ch] BYREF + + v7 = (_DWORD *)*((_DWORD *)std::use_facet>(a5 + 108) + 2); + v24[0] = v7[37]; + v24[1] = v7[38]; + v24[2] = v7[39]; + v24[3] = v7[40]; + v24[4] = v7[41]; + v24[5] = v7[42]; + v24[6] = v7[43]; + v24[7] = v7[44]; + v24[8] = v7[45]; + v24[9] = v7[46]; + v24[10] = v7[47]; + v24[11] = v7[48]; + v24[12] = v7[25]; + v24[13] = v7[26]; + v24[14] = v7[27]; + v24[15] = v7[28]; + v8 = v7[29]; + v23 = 0; + v24[16] = v8; + v24[17] = v7[30]; + v24[18] = v7[31]; + v24[19] = v7[32]; + v24[20] = v7[33]; + v24[21] = v7[34]; + v9 = v7[35]; + v24[23] = v7[36]; + v24[22] = v9; + v11 = std::time_get>::_M_extract_wday_or_month( + a1, + a2, + a3, + a4, + &v22, + (int)v24, + 0xCu, + a5, + &v23); + v12 = v11; + if ( v23 ) + *a6 |= 4u; + else + *(_DWORD *)(a7 + 16) = v22; + v13 = v10 == -1; + v14 = v13 & (v11 != 0); + if ( v14 ) + { + v19 = (__int16 *)v11[2]; + if ( (unsigned int)v19 >= v11[3] ) + { + v21 = v11; + v20 = (*(int (**)(void))(*v11 + 36))(); + v11 = v21; + } + else + { + v20 = *v19; + } + v13 = 0; + v12 = 0; + if ( v20 == -1 ) + v13 = v14; + if ( v20 != -1 ) + v12 = v11; + } + v15 = a4 == -1; + if ( a3 && a4 == -1 ) + { + v17 = (__int16 *)a3[2]; + if ( (unsigned int)v17 >= a3[3] ) + v18 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v18 = *v17; + v15 = v18 == -1; + } + if ( v13 == v15 ) + *a6 |= 2u; + return v12; +} +// 45DA7A: variable 'v10' is possibly undefined + +//----- (0045DB40) -------------------------------------------------------- +int *__stdcall std::time_get>::_M_extract_via_format( + int *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7, + wchar_t *String) +{ + int v8; // ebp + void *v9; // esi + size_t v10; // edi + char v11; // dl + char v12; // bl + size_t v13; // ebx + char v14; // al + unsigned __int8 v15; // al + wchar_t v16; // bx + unsigned __int16 v17; // ax + __int16 *v19; // eax + __int16 v20; // ax + bool v21; // zf + int *v22; // eax + __int16 *v23; // eax + __int16 v24; // ax + bool v25; // zf + _DWORD *v26; // eax + unsigned int v27; // eax + unsigned __int16 *v28; // eax + int *v29; // edi + unsigned __int16 v30; // dx + int *v31; // eax + _DWORD *v32; // eax + int *v33; // eax + unsigned __int16 v34; // dx + _DWORD *v35; // eax + int *v36; // eax + unsigned __int16 v37; // dx + unsigned __int16 v38; // dx + int *v39; // eax + unsigned __int16 v40; // dx + unsigned __int16 v41; // dx + unsigned __int16 v42; // dx + unsigned __int16 v43; // dx + unsigned __int16 v44; // ax + int *v45; // eax + unsigned __int16 v46; // dx + unsigned __int16 v47; // di + char v48; // dl + char v49; // bl + unsigned __int16 v50; // bx + _DWORD *v51; // eax + unsigned __int16 v52; // dx + unsigned __int16 v53; // dx + int *v54; // eax + unsigned __int16 v55; // dx + int *v56; // eax + unsigned __int16 v57; // dx + unsigned __int16 v58; // dx + _DWORD *v59; // eax + _DWORD *v60; // eax + unsigned __int16 v61; // dx + unsigned __int16 v62; // ax + unsigned int v63; // eax + unsigned __int16 v64; // dx + unsigned __int16 v65; // dx + unsigned __int16 v66; // ax + unsigned int v67; // eax + unsigned __int16 v68; // ax + unsigned __int16 v69; // dx + unsigned __int16 *v70; // eax + int *v71; // edi + unsigned __int16 *v72; // eax + int *v73; // edi + unsigned __int16 *v74; // eax + int *v75; // edi + unsigned __int16 *v76; // eax + int *v77; // edi + __int16 *v78; // eax + __int16 v79; // ax + bool v80; // zf + _DWORD *v81; // eax + _WORD *v82; // edx + __int16 v83; // ax + unsigned __int16 *v84; // eax + int *v85; // eax + unsigned __int16 *v86; // eax + int *v87; // eax + bool v88; // [esp+5Fh] [ebp-12Dh] + bool v89; // [esp+5Fh] [ebp-12Dh] + size_t v92; // [esp+68h] [ebp-124h] + char v93; // [esp+68h] [ebp-124h] + size_t v94; // [esp+6Ch] [ebp-120h] + bool v95; // [esp+70h] [ebp-11Ch] + _DWORD *v96; // [esp+7Ch] [ebp-110h] + unsigned __int16 v97; // [esp+80h] [ebp-10Ch] + unsigned __int16 v98; // [esp+84h] [ebp-108h] + bool v99; // [esp+86h] [ebp-106h] + char v100; // [esp+87h] [ebp-105h] + int v101; // [esp+138h] [ebp-54h] BYREF + int *v102; // [esp+13Ch] [ebp-50h] BYREF + wchar_t v103[2]; // [esp+140h] [ebp-4Ch] BYREF + int v104; // [esp+144h] [ebp-48h] + int v105; // [esp+148h] [ebp-44h] + int v106; // [esp+14Ch] [ebp-40h] + int v107; // [esp+150h] [ebp-3Ch] + int v108; // [esp+154h] [ebp-38h] + int v109; // [esp+158h] [ebp-34h] + int v110; // [esp+15Ch] [ebp-30h] + int v111; // [esp+160h] [ebp-2Ch] + int v112; // [esp+164h] [ebp-28h] + int v113; // [esp+168h] [ebp-24h] + int v114; // [esp+16Ch] [ebp-20h] + + HIWORD(v8) = HIWORD(a2); + v98 = a2; + v96 = std::use_facet>(a5 + 108); + v9 = std::use_facet>(a5 + 108); + v101 = 0; + v94 = wcslen(String); + v99 = (_WORD)a4 == 0xFFFF; + v10 = 0; + while ( 1 ) + { + v88 = v98 == 0xFFFF; + v11 = v88 && a1 != 0; + if ( v11 ) + { + v19 = (__int16 *)a1[2]; + if ( (unsigned int)v19 >= a1[3] ) + { + v20 = (*(int (__fastcall **)(int *))(*a1 + 36))(a1); + v11 = v88 && a1 != 0; + } + else + { + v20 = *v19; + } + v21 = v20 == -1; + v22 = 0; + if ( !v21 ) + v22 = a1; + a1 = v22; + if ( !v21 ) + v11 = 0; + v12 = v99 && a3 != 0; + if ( !v12 ) + { +LABEL_4: + v12 = (_WORD)a4 == 0xFFFF; + goto LABEL_5; + } + } + else + { + v11 = v98 == 0xFFFF; + v12 = v99 && a3 != 0; + if ( !v12 ) + goto LABEL_4; + } + v23 = (__int16 *)a3[2]; + if ( (unsigned int)v23 >= a3[3] ) + { + v93 = v11; + v24 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v11 = v93; + } + else + { + v24 = *v23; + } + v25 = v24 == -1; + v26 = 0; + if ( !v25 ) + v26 = a3; + a3 = v26; + if ( !v25 ) + v12 = 0; +LABEL_5: + if ( v11 == v12 || v10 >= v94 ) + break; + if ( v101 ) + goto LABEL_22; + v13 = v10; + v92 = v10 + 1; + if ( (*(unsigned __int8 (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v9 + 48))(v9, String[v10], 0) == 37 ) + { + v14 = (*(int (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v9 + 48))(v9, String[v13 + 1], 0); + v102 = 0; + if ( v14 == 69 || v14 == 79 ) + { + v92 = v10 + 2; + v15 = (*(int (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v9 + 48))(v9, String[v13 + 2], 0) - 65; + if ( v15 > 0x38u ) + { +LABEL_19: + v101 |= 4u; + goto LABEL_20; + } + } + else + { + v15 = v14 - 65; + } + switch ( v15 ) + { + case 0u: + LOWORD(v8) = v98; + v59 = (_DWORD *)v96[2]; + *(_DWORD *)v103 = v59[11]; + v104 = v59[12]; + v105 = v59[13]; + v106 = v59[14]; + v107 = v59[15]; + v108 = v59[16]; + v109 = v59[17]; + v36 = std::time_get>::_M_extract_name( + a1, + v8, + a3, + a4, + &v102, + (int)v103, + 7, + a5, + &v101); + goto LABEL_56; + case 1u: + LOWORD(v8) = v98; + v60 = (_DWORD *)v96[2]; + *(_DWORD *)v103 = v60[25]; + v104 = v60[26]; + v105 = v60[27]; + v106 = v60[28]; + v107 = v60[29]; + v108 = v60[30]; + v109 = v60[31]; + v110 = v60[32]; + v111 = v60[33]; + v112 = v60[34]; + v113 = v60[35]; + v114 = v60[36]; + v33 = std::time_get>::_M_extract_name( + a1, + v8, + a3, + a4, + &v102, + (int)v103, + 12, + a5, + &v101); + goto LABEL_53; + case 2u: + case 0x18u: + case 0x38u: + a1 = std::time_get>::_M_extract_num( + a1, + v98, + a3, + a4, + (int *)&v102, + 0, + 9999, + 4u, + a5, + &v101); + v98 = v30; + if ( !v101 ) + { + v31 = v102 - 475; + if ( (int)v102 < 0 ) + v31 = v102 + 25; + a7[5] = v31; + } + break; + case 3u: + (*(void (__thiscall **)(void *, const char *, const char *, wchar_t *))(*(_DWORD *)v9 + 44))( + v9, + "%m/%d/%y", + "%H:%M", + v103); + LOWORD(v8) = v98; + a1 = std::time_get>::_M_extract_via_format( + a1, + v8, + a3, + a4, + a5, + &v101, + a7, + v103); + v98 = v61; + break; + case 7u: + v54 = std::time_get>::_M_extract_num( + a1, + v98, + a3, + a4, + (int *)&v102, + 0, + 23, + 2u, + a5, + &v101); + goto LABEL_83; + case 8u: + v54 = std::time_get>::_M_extract_num( + a1, + v98, + a3, + a4, + (int *)&v102, + 1, + 12, + 2u, + a5, + &v101); +LABEL_83: + a1 = v54; + v98 = v55; + if ( !v101 ) + a7[2] = v102; + break; + case 0xCu: + v56 = std::time_get>::_M_extract_num( + a1, + v98, + a3, + a4, + (int *)&v102, + 0, + 59, + 2u, + a5, + &v101); + v98 = v57; + a1 = v56; + if ( !v101 ) + a7[1] = v102; + break; + case 0x11u: + (*(void (__thiscall **)(void *, const char *, const char *, wchar_t *))(*(_DWORD *)v9 + 44))( + v9, + "%H:%M", + "%H:%M:%S", + v103); + LOWORD(v8) = v98; + a1 = std::time_get>::_M_extract_via_format( + a1, + v8, + a3, + a4, + a5, + &v101, + a7, + v103); + v98 = v58; + break; + case 0x12u: + a1 = std::time_get>::_M_extract_num( + a1, + v98, + a3, + a4, + (int *)&v102, + 0, + 60, + 2u, + a5, + &v101); + v98 = v41; + if ( !v101 ) + *a7 = v102; + break; + case 0x13u: + (*(void (__thiscall **)(void *, const char *, void *, wchar_t *))(*(_DWORD *)v9 + 44))( + v9, + "%H:%M:%S", + &unk_511B8A, + v103); + LOWORD(v8) = v98; + a1 = std::time_get>::_M_extract_via_format( + a1, + v8, + a3, + a4, + a5, + &v101, + a7, + v103); + v98 = v42; + break; + case 0x17u: + LOWORD(v8) = v98; + a1 = std::time_get>::_M_extract_via_format( + a1, + v8, + a3, + a4, + a5, + &v101, + a7, + *(wchar_t **)(v96[2] + 16)); + v98 = v43; + break; + case 0x19u: + if ( a1 && v98 == 0xFFFF ) + { + v76 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v76 >= a1[3] ) + v44 = (*(int (__fastcall **)(int *))(*a1 + 36))(a1); + else + v44 = *v76; + v77 = 0; + if ( v44 != 0xFFFF ) + v77 = a1; + a1 = v77; + } + else + { + v44 = v98; + } + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v9 + 8))(v9, 1, v44) ) + goto LABEL_19; + LOWORD(v8) = v98; + v45 = std::time_get>::_M_extract_name( + a1, + v8, + a3, + a4, + (int **)v103, + (int)std::__timepunct_cache::_S_timezones, + 14, + a5, + &v101); + v47 = v46; + v89 = v46 == 0xFFFF; + v97 = v46; + a1 = v45; + v48 = v89; + v98 = v47; + v95 = v89 && v45 != 0; + if ( v95 ) + { + v82 = (_WORD *)v45[2]; + v83 = (unsigned int)v82 >= v45[3] ? (*(int (__fastcall **)(int *))(*v45 + 36))(v45) : *v82; + v48 = 0; + if ( v83 == -1 ) + { + v48 = v95; + a1 = 0; + v95 = 0; + } + } + v49 = v99 && a3 != 0; + if ( v49 ) + { + v78 = (__int16 *)a3[2]; + if ( (unsigned int)v78 >= a3[3] ) + { + v100 = v48; + v79 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v48 = v100; + } + else + { + v79 = *v78; + } + v80 = v79 == -1; + v81 = 0; + if ( !v80 ) + v81 = a3; + a3 = v81; + if ( !v80 ) + v49 = 0; + } + else + { + v49 = (_WORD)a4 == 0xFFFF; + } + if ( v48 != v49 && !(*(_DWORD *)v103 | v101) ) + { + v50 = v47; + if ( v95 ) + { + v84 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v84 >= a1[3] ) + v50 = (*(int (__fastcall **)(int *))(*a1 + 36))(a1); + else + v50 = *v84; + v85 = 0; + if ( v50 != 0xFFFF ) + v85 = a1; + a1 = v85; + } + if ( (*(unsigned __int16 (__thiscall **)(void *, int))(*(_DWORD *)v9 + 40))(v9, 45) == v50 ) + goto LABEL_81; + if ( a1 && v89 ) + { + v86 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v86 >= a1[3] ) + v47 = (*(int (__fastcall **)(int *))(*a1 + 36))(a1); + else + v47 = *v86; + v87 = 0; + if ( v47 != 0xFFFF ) + v87 = a1; + a1 = v87; + } + if ( (*(unsigned __int16 (__thiscall **)(void *, int))(*(_DWORD *)v9 + 40))(v9, 43) == v47 ) + { +LABEL_81: + v51 = std::time_get>::_M_extract_num( + a1, + v97, + a3, + a4, + (int *)v103, + 0, + 23, + 2u, + a5, + &v101); + a1 = std::time_get>::_M_extract_num( + v51, + v52, + a3, + a4, + (int *)v103, + 0, + 59, + 2u, + a5, + &v101); + v98 = v53; + } + } + break; + case 0x20u: + LOWORD(v8) = v98; + v35 = (_DWORD *)v96[2]; + *(_DWORD *)v103 = v35[18]; + v104 = v35[19]; + v105 = v35[20]; + v106 = v35[21]; + v107 = v35[22]; + v108 = v35[23]; + v109 = v35[24]; + v36 = std::time_get>::_M_extract_name( + a1, + v8, + a3, + a4, + &v102, + (int)v103, + 7, + a5, + &v101); +LABEL_56: + a1 = v36; + v98 = v37; + if ( !v101 ) + a7[6] = v102; + break; + case 0x21u: + case 0x27u: + LOWORD(v8) = v98; + v32 = (_DWORD *)v96[2]; + *(_DWORD *)v103 = v32[37]; + v104 = v32[38]; + v105 = v32[39]; + v106 = v32[40]; + v107 = v32[41]; + v108 = v32[42]; + v109 = v32[43]; + v110 = v32[44]; + v111 = v32[45]; + v112 = v32[46]; + v113 = v32[47]; + v114 = v32[48]; + v33 = std::time_get>::_M_extract_name( + a1, + v8, + a3, + a4, + &v102, + (int)v103, + 12, + a5, + &v101); +LABEL_53: + a1 = v33; + v98 = v34; + if ( !v101 ) + a7[4] = v102; + break; + case 0x22u: + LOWORD(v8) = v98; + a1 = std::time_get>::_M_extract_via_format( + a1, + v8, + a3, + a4, + a5, + &v101, + a7, + *(wchar_t **)(v96[2] + 24)); + v98 = v38; + break; + case 0x23u: + v39 = std::time_get>::_M_extract_num( + a1, + v98, + a3, + a4, + (int *)&v102, + 1, + 31, + 2u, + a5, + &v101); + goto LABEL_60; + case 0x24u: + if ( a1 && v98 == 0xFFFF ) + { + v74 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v74 >= a1[3] ) + v62 = (*(int (__fastcall **)(int *))(*a1 + 36))(a1); + else + v62 = *v74; + v75 = 0; + if ( v62 != 0xFFFF ) + v75 = a1; + a1 = v75; + } + else + { + v62 = v98; + } + if ( (*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v9 + 8))(v9, 32, v62) ) + { + v63 = a1[2]; + if ( v63 >= a1[3] ) + (*(void (__fastcall **)(int *))(*a1 + 40))(a1); + else + a1[2] = v63 + 2; + a1 = std::time_get>::_M_extract_num( + a1, + 0xFFFFu, + a3, + a4, + (int *)&v102, + 1, + 9, + 1u, + a5, + &v101); + v98 = v64; + } + else + { + v39 = std::time_get>::_M_extract_num( + a1, + v98, + a3, + a4, + (int *)&v102, + 10, + 31, + 2u, + a5, + &v101); +LABEL_60: + a1 = v39; + v98 = v40; + } + if ( !v101 ) + a7[3] = v102; + break; + case 0x2Cu: + a1 = std::time_get>::_M_extract_num( + a1, + v98, + a3, + a4, + (int *)&v102, + 1, + 12, + 2u, + a5, + &v101); + v98 = v65; + if ( !v101 ) + a7[4] = (char *)v102 - 1; + break; + case 0x2Du: + if ( a1 && v98 == 0xFFFF ) + { + v70 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v70 >= a1[3] ) + v66 = (*(int (__fastcall **)(int *))(*a1 + 36))(a1); + else + v66 = *v70; + v71 = 0; + if ( v66 != 0xFFFF ) + v71 = a1; + a1 = v71; + } + else + { + v66 = v98; + } + if ( (*(unsigned __int8 (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v9 + 48))(v9, v66, 0) != 10 ) + goto LABEL_19; + goto LABEL_105; + case 0x33u: + if ( a1 && v98 == 0xFFFF ) + { + v72 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v72 >= a1[3] ) + v68 = (*(int (__fastcall **)(int *))(*a1 + 36))(a1); + else + v68 = *v72; + v73 = 0; + if ( v68 != 0xFFFF ) + v73 = a1; + a1 = v73; + } + else + { + v68 = v98; + } + if ( (*(unsigned __int8 (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v9 + 48))(v9, v68, 0) != 9 ) + goto LABEL_19; +LABEL_105: + v67 = a1[2]; + if ( v67 >= a1[3] ) + (*(void (__fastcall **)(int *))(*a1 + 40))(a1); + else + a1[2] = v67 + 2; + v98 = -1; + break; + case 0x37u: + LOWORD(v8) = v98; + a1 = std::time_get>::_M_extract_via_format( + a1, + v8, + a3, + a4, + a5, + &v101, + a7, + *(wchar_t **)(v96[2] + 8)); + v98 = v69; + break; + default: + goto LABEL_19; + } +LABEL_20: + v10 = v92 + 1; + } + else + { + v16 = String[v10]; + if ( a1 && v98 == 0xFFFF ) + { + v28 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v28 >= a1[3] ) + v17 = (*(int (__fastcall **)(int *))(*a1 + 36))(a1); + else + v17 = *v28; + v29 = 0; + if ( v17 != 0xFFFF ) + v29 = a1; + a1 = v29; + } + else + { + v17 = v98; + } + if ( v16 == v17 ) + { + v27 = a1[2]; + if ( v27 >= a1[3] ) + (*(void (__fastcall **)(int *))(*a1 + 40))(a1); + else + a1[2] = v27 + 2; + v10 = v92; + v98 = -1; + } + else + { + v101 |= 4u; + v10 = v92; + } + } + } + if ( v10 != v94 || v101 ) +LABEL_22: + *a6 |= 4u; + return a1; +} +// 45DEC3: variable 'v30' is possibly undefined +// 45E017: variable 'v34' is possibly undefined +// 45E103: variable 'v37' is possibly undefined +// 45E196: variable 'v38' is possibly undefined +// 45E21A: variable 'v40' is possibly undefined +// 45E2C5: variable 'v41' is possibly undefined +// 45E371: variable 'v42' is possibly undefined +// 45E3EB: variable 'v43' is possibly undefined +// 45E48C: variable 'v46' is possibly undefined +// 45E605: variable 'v52' is possibly undefined +// 45E61C: variable 'v53' is possibly undefined +// 45E6B1: variable 'v55' is possibly undefined +// 45E7BB: variable 'v57' is possibly undefined +// 45E87A: variable 'v58' is possibly undefined +// 45EACF: variable 'v61' is possibly undefined +// 45EBA0: variable 'v64' is possibly undefined +// 45EC2B: variable 'v65' is possibly undefined +// 45ED58: variable 'v69' is possibly undefined +// 50C5A0: using guessed type wchar_t *std::__timepunct_cache::_S_timezones[14]; + +//----- (0045F020) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::_M_extract_wday_or_month( + _DWORD *a1, + int a2, + _DWORD *a3, + __int16 a4, + unsigned int *a5, + int a6, + unsigned int a7, + int a8, + _DWORD *a9) +{ + int v9; // eax + void *v10; // esp + void *v11; // esp + char v12; // dl + char v13; // di + char v14; // bl + unsigned int v15; // edi + unsigned int *v16; // esi + char v17; // dl + char v18; // bl + unsigned int v19; // edx + unsigned int *v20; // ecx + unsigned int v21; // ebx + unsigned int v22; // eax + __int16 *v23; // eax + __int16 v24; // ax + bool v25; // zf + _DWORD *v26; // eax + __int16 *v28; // eax + __int16 v29; // ax + bool v30; // zf + _DWORD *v31; // eax + __int16 *v32; // eax + _DWORD *v33; // eax + unsigned int v34; // eax + __int16 v35; // si + int v36; // edx + unsigned int v37; // ebx + int v38; // edi + __int16 v39; // ax + int v40; // ecx + unsigned int v41; // eax + unsigned int v42; // eax + int v43; // eax + void *v44; // esp + void *v45; // esp + int v46; // ebx + __int16 *v47; // eax + __int16 v48; // ax + bool v49; // zf + _DWORD *v50; // eax + _WORD *v51; // eax + __int16 v52; // ax + __int16 *v53; // eax + _DWORD *v54; // eax + int v55; // eax + _DWORD v56[2]; // [esp+10h] [ebp-48h] BYREF + _DWORD *v57; // [esp+18h] [ebp-40h] + char v58; // [esp+1Fh] [ebp-39h] + _DWORD *v59; // [esp+20h] [ebp-38h] + unsigned int v60; // [esp+24h] [ebp-34h] + __int16 v61; // [esp+28h] [ebp-30h] + __int16 v62; // [esp+2Ah] [ebp-2Eh] + int v63; // [esp+2Ch] [ebp-2Ch] + unsigned int *v64; // [esp+30h] [ebp-28h] + unsigned int *v65; // [esp+34h] [ebp-24h] + unsigned int v66; // [esp+38h] [ebp-20h] + unsigned int v67; // [esp+3Ch] [ebp-1Ch] + + v59 = a1; + v56[1] = a2; + v61 = a2; + v57 = a3; + v64 = (unsigned int *)std::use_facet>(a8 + 108); + v9 = 16 * ((8 * a7 + 27) >> 4); + v10 = alloca(v9); + v11 = alloca(v9); + v12 = (_WORD)a2 == 0xFFFF; + v65 = v56; + v13 = v12 & (a1 != 0); + if ( v13 ) + { + v51 = (_WORD *)v59[2]; + v52 = (unsigned int)v51 >= v59[3] ? (*(int (__fastcall **)(_DWORD *))(*v59 + 36))(v59) : *v51; + v12 = 0; + if ( v52 == -1 ) + { + v12 = v13; + v59 = 0; + v13 = 0; + } + } + v58 = a4 == -1; + v14 = v58 & (a3 != 0); + if ( v14 ) + { + v47 = (__int16 *)a3[2]; + if ( (unsigned int)v47 >= a3[3] ) + { + v55 = *a3; + LOBYTE(v67) = v12; + v48 = (*(int (__fastcall **)(_DWORD *))(v55 + 36))(a3); + v12 = v67; + } + else + { + v48 = *v47; + } + v49 = v48 == -1; + v50 = 0; + if ( !v49 ) + v50 = a3; + v57 = v50; + if ( !v49 ) + v14 = 0; + } + else + { + v14 = v58; + } + if ( v12 == v14 ) + { + v66 = 0; + v15 = 0; + v16 = 0; + goto LABEL_6; + } + v35 = v61; + if ( v13 ) + { + v53 = (__int16 *)v59[2]; + if ( (unsigned int)v53 >= v59[3] ) + v35 = (*(int (__fastcall **)(_DWORD *))(*v59 + 36))(v59); + else + v35 = *v53; + v54 = 0; + if ( v35 != -1 ) + v54 = v59; + v59 = v54; + } + v15 = 2 * a7; + if ( !(2 * a7) ) + { + v66 = 0; + v16 = 0; + goto LABEL_6; + } + v67 = 2 * a7; + v36 = a6; + v37 = 0; + v66 = 0; + v38 = (int)v64; + do + { + while ( 1 ) + { + v40 = **(unsigned __int16 **)(v36 + 4 * v37); + if ( (_WORD)v40 == v35 ) + break; + a6 = v36; + v39 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v38 + 24))(v38, v40); + v36 = a6; + if ( v39 == v35 ) + break; + if ( ++v37 == v67 ) + goto LABEL_62; + } + v41 = v66; + v65[v66] = v37++; + v66 = v41 + 1; + } + while ( v37 != v67 ); +LABEL_62: + v15 = 0; + v16 = 0; + if ( v66 ) + { + v42 = v59[2]; + if ( v42 >= v59[3] ) + (*(void (__fastcall **)(_DWORD *, int))(*v59 + 40))(v59, v36); + else + v59[2] = v42 + 2; + v43 = 16 * ((4 * v66 + 27) >> 4); + v44 = alloca(v43); + v15 = 0; + v45 = alloca(v43); + v64 = v56; + v67 = (unsigned int)v56; + v46 = (int)v65; + do + { + *(_DWORD *)(v67 + 4 * v15) = wcslen(*(const wchar_t **)(a6 + 4 * *(_DWORD *)(v46 + 4 * v15))); + ++v15; + } + while ( v66 != v15 ); + v66 = 1; + v16 = v64; + v61 = -1; + } +LABEL_6: + while ( 2 ) + { + LOBYTE(v67) = v61 == -1; + v17 = v67 & (v59 != 0); + if ( v17 ) + { + v28 = (__int16 *)v59[2]; + if ( (unsigned int)v28 >= v59[3] ) + { + LOBYTE(v64) = v67 & (v59 != 0); + v29 = (*(int (__fastcall **)(_DWORD *))(*v59 + 36))(v59); + v17 = (char)v64; + } + else + { + v29 = *v28; + } + v30 = v29 == -1; + v31 = 0; + if ( !v30 ) + v31 = v59; + v59 = v31; + if ( !v30 ) + v17 = 0; + } + else + { + v17 = v67; + } + v18 = v58 & (v57 != 0); + if ( v18 ) + { + v23 = (__int16 *)v57[2]; + if ( (unsigned int)v23 >= v57[3] ) + { + LOBYTE(v64) = v17; + v24 = (*(int (__fastcall **)(_DWORD *))(*v57 + 36))(v57); + v17 = (char)v64; + } + else + { + v24 = *v23; + } + v25 = v24 == -1; + v26 = 0; + if ( !v25 ) + v26 = v57; + v57 = v26; + if ( !v25 ) + v18 = 0; + if ( v17 == v18 ) + break; + } + else if ( v17 == v58 ) + { + break; + } + if ( v59 && (_BYTE)v67 ) + { + v32 = (__int16 *)v59[2]; + if ( (unsigned int)v32 >= v59[3] ) + v62 = (*(int (__fastcall **)(_DWORD *))(*v59 + 36))(v59); + else + v62 = *v32; + v33 = 0; + if ( v62 != -1 ) + v33 = v59; + v59 = v33; + } + else + { + v62 = v61; + } + if ( !v15 ) + { +LABEL_34: + *a9 |= 4u; + return v59; + } + v67 = (unsigned int)v16; + v19 = 0; + v63 = 0; + v60 = 2 * v66; + do + { + while ( 1 ) + { + v20 = (unsigned int *)(v67 + 4 * v19); + if ( *v20 > v66 ) + break; + ++v63; + ++v19; +LABEL_16: + if ( v19 >= v15 ) + goto LABEL_20; + } + v21 = v65[v19]; + v64 = &v65[v19]; + if ( *(_WORD *)(*(_DWORD *)(a6 + 4 * v21) + v60) == v62 ) + { + ++v19; + goto LABEL_16; + } + *v64 = v65[--v15]; + *v20 = *(_DWORD *)(v67 + 4 * v15); + } + while ( v19 < v15 ); +LABEL_20: + v16 = (unsigned int *)v67; + if ( v15 != v63 ) + { + v22 = v59[2]; + if ( v22 >= v59[3] ) + (*(void (__fastcall **)(_DWORD *))(*v59 + 40))(v59); + else + v59[2] = v22 + 2; + ++v66; + v61 = -1; + continue; + } + break; + } + if ( v15 != 1 ) + { + if ( v15 == 2 && (*v16 == v66 || v16[1] == v66) ) + goto LABEL_52; + goto LABEL_34; + } + if ( *v16 != v66 ) + goto LABEL_34; +LABEL_52: + v34 = *v65; + if ( *v65 >= a7 ) + v34 = *v65 - a7; + *a5 = v34; + return v59; +} + +//----- (0045F4E0) -------------------------------------------------------- +int *__thiscall std::time_get>::get( + void *this, + int *a2, + int a3, + _DWORD *a4, + int a5, + int a6, + _DWORD *a7, + _DWORD *a8, + unsigned __int16 *a9, + unsigned __int16 *a10) +{ + unsigned __int16 *v10; // ebp + void *v12; // ebx + int v13; // edx + __int16 v14; // si + int v15; // edx + __int16 v16; // si + unsigned int v17; // eax + char v18; // si + char v19; // dl + char v20; // si + int v21; // eax + int *(__stdcall *v22)(int *, int, _DWORD *, int, int, _DWORD *, _DWORD *, char, char); // edx + int v23; // eax + void *v24; // eax + int *v25; // esi + unsigned __int16 v26; // dx + char v27; // dl + char v28; // bp + char v29; // al + unsigned __int16 *i; // ebp + void *v32; // ebp + char v33; // dl + char v34; // bl + int v35; // edx + unsigned int v36; // eax + bool v37; // si + __int16 *v38; // eax + __int16 v39; // ax + __int16 *v40; // eax + __int16 v41; // ax + bool v42; // zf + _DWORD *v43; // eax + unsigned __int16 *v44; // eax + char v45; // dl + __int16 *v46; // eax + __int16 v47; // ax + bool v48; // zf + _DWORD *v49; // eax + __int16 *v50; // eax + __int16 v51; // ax + int v52; // ecx + int v53; // ebp + unsigned __int16 v54; // dx + unsigned __int16 *v55; // eax + __int16 *v56; // eax + __int16 v57; // ax + __int16 *v58; // eax + __int16 v59; // ax + unsigned __int16 *v60; // eax + unsigned __int16 v61; // [esp+5Eh] [ebp-4Ah] + unsigned __int16 *v63; // [esp+64h] [ebp-44h] + char v64; // [esp+64h] [ebp-44h] + int v65; // [esp+68h] [ebp-40h] + int v66; // [esp+6Ch] [ebp-3Ch] + char v68; // [esp+74h] [ebp-34h] + char v69; // [esp+75h] [ebp-33h] + char v70; // [esp+75h] [ebp-33h] + wchar_t v71; // [esp+84h] [ebp-24h] BYREF + __int16 v72; // [esp+86h] [ebp-22h] + __int16 v73; // [esp+88h] [ebp-20h] + __int16 v74; // [esp+8Ah] [ebp-1Eh] + unsigned __int16 *v75; // [esp+C8h] [ebp+20h] + + v10 = a9; + HIWORD(v65) = HIWORD(a3); + v61 = a3; + HIWORD(v66) = HIWORD(a5); + v12 = std::use_facet>(a6 + 108); + *a7 = 0; + if ( a9 != a10 ) + { + v68 = (_WORD)a5 == 0xFFFF; + while ( 1 ) + { + v18 = v61 == 0xFFFF && a2 != 0; + if ( v18 ) + { + v50 = (__int16 *)a2[2]; + if ( (unsigned int)v50 >= a2[3] ) + v51 = (*(int (__fastcall **)(int *))(*a2 + 36))(a2); + else + v51 = *v50; + if ( v51 == -1 ) + a2 = 0; + if ( v51 != -1 ) + v18 = 0; + } + else + { + v18 = v61 == 0xFFFF; + } + v19 = v68 & (a4 != 0); + if ( v19 ) + { + v46 = (__int16 *)a4[2]; + if ( (unsigned int)v46 >= a4[3] ) + { + v47 = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4); + v19 = v68 & (a4 != 0); + } + else + { + v47 = *v46; + } + v48 = v47 == -1; + v49 = 0; + if ( !v48 ) + v49 = a4; + a4 = v49; + if ( !v48 ) + v19 = 0; + if ( v18 == v19 ) + { +LABEL_81: + *a7 = 6; + return a2; + } + } + else if ( v18 == v68 ) + { + goto LABEL_81; + } + if ( (*(unsigned __int8 (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v12 + 48))(v12, *v10, 0) == 37 ) + { + v63 = v10 + 1; + if ( a10 == v10 + 1 ) + goto LABEL_115; + v20 = (*(int (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v12 + 48))(v12, v10[1], 0); + if ( v20 == 69 || (v69 = 0, v21 = 0, v20 == 79) ) + { + v63 = v10 + 2; + if ( a10 == v10 + 2 ) + goto LABEL_115; + v45 = (*(int (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v12 + 48))(v12, v10[2], 0); + v69 = v20; + v21 = v20; + v20 = v45; + } + v22 = *(int *(__stdcall **)(int *, int, _DWORD *, int, int, _DWORD *, _DWORD *, char, char))(*(_DWORD *)this + 32); + if ( v22 == std::time_get>::do_get ) + { + HIWORD(v23) = HIWORD(v65); + LOWORD(v23) = v61; + v65 = v23; + HIWORD(v23) = HIWORD(v66); + LOWORD(v23) = a5; + v66 = v23; + v24 = std::use_facet>(a6 + 108); + *a7 = 0; + v71 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v24 + 40))(v24, 37); + if ( v69 ) + { + v73 = v20; + v72 = v69; + v74 = 0; + } + else + { + v72 = v20; + v73 = 0; + } + v25 = std::time_get>::_M_extract_via_format( + a2, + v65, + a4, + v66, + a6, + a7, + a8, + &v71); + a2 = v25; + v61 = v26; + v27 = v26 == 0xFFFF; + v28 = v27 & (v25 != 0); + if ( v28 ) + { + v56 = (__int16 *)v25[2]; + if ( (unsigned int)v56 >= v25[3] ) + v57 = (*(int (__fastcall **)(int *))(*v25 + 36))(v25); + else + v57 = *v56; + v27 = 0; + a2 = 0; + if ( v57 == -1 ) + v27 = v28; + if ( v57 != -1 ) + a2 = v25; + } + if ( a4 && (_WORD)a5 == 0xFFFF ) + { + v58 = (__int16 *)a4[2]; + if ( (unsigned int)v58 >= a4[3] ) + { + v70 = v27; + v59 = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4); + v27 = v70; + } + else + { + v59 = *v58; + } + v29 = v59 == -1; + } + else + { + v29 = (_WORD)a5 == 0xFFFF; + } + if ( v29 == v27 ) + *a7 |= 2u; + } + else + { + HIWORD(v52) = HIWORD(v65); + HIWORD(v53) = HIWORD(v66); + LOWORD(v52) = v61; + LOWORD(v53) = a5; + a2 = (int *)((int (__thiscall *)(void *, int *, int, _DWORD *, int, int, _DWORD *, _DWORD *, _DWORD, int))v22)( + this, + a2, + v52, + a4, + v53, + a6, + a7, + a8, + v20, + v21); + v61 = v54; + } + v10 = v63 + 1; + if ( a10 == v63 + 1 ) + return a2; + goto LABEL_16; + } + if ( (*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v12 + 8))(v12, 32, *v10) ) + break; + if ( a2 && v61 == 0xFFFF ) + { + v55 = (unsigned __int16 *)a2[2]; + if ( (unsigned int)v55 >= a2[3] ) + v13 = (*(unsigned __int16 (__fastcall **)(int *))(*a2 + 36))(a2); + else + v13 = *v55; + if ( (_WORD)v13 == 0xFFFF ) + a2 = 0; + } + else + { + v13 = v61; + } + v14 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v12 + 32))(v12, v13); + if ( (*(unsigned __int16 (__thiscall **)(void *, _DWORD))(*(_DWORD *)v12 + 32))(v12, *v10) != v14 ) + { + if ( a2 && v61 == 0xFFFF ) + { + v60 = (unsigned __int16 *)a2[2]; + if ( (unsigned int)v60 >= a2[3] ) + v15 = (*(unsigned __int16 (__fastcall **)(int *))(*a2 + 36))(a2); + else + v15 = *v60; + if ( (_WORD)v15 == 0xFFFF ) + a2 = 0; + } + else + { + v15 = v61; + } + v16 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v12 + 24))(v12, v15); + if ( (*(unsigned __int16 (__thiscall **)(void *, _DWORD))(*(_DWORD *)v12 + 24))(v12, *v10) != v16 ) + { +LABEL_115: + *a7 = 4; + return a2; + } + } + v17 = a2[2]; + if ( v17 >= a2[3] ) + (*(void (__fastcall **)(int *))(*a2 + 40))(a2); + else + a2[2] = v17 + 2; + ++v10; + v61 = -1; +LABEL_15: + if ( a10 == v10 ) + return a2; +LABEL_16: + if ( *a7 ) + return a2; + } + for ( i = v10 + 1; a10 != i; ++i ) + { + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v12 + 8))(v12, 32, *i) ) + break; + } + v75 = i; + v32 = v12; + while ( 1 ) + { + v37 = v61 == 0xFFFF; + v33 = v37 && a2 != 0; + if ( v33 ) + { + v38 = (__int16 *)a2[2]; + if ( (unsigned int)v38 >= a2[3] ) + { + v39 = (*(int (__fastcall **)(int *))(*a2 + 36))(a2); + v33 = v37 && a2 != 0; + } + else + { + v39 = *v38; + } + if ( v39 == -1 ) + a2 = 0; + if ( v39 != -1 ) + v33 = 0; + v34 = v68 & (a4 != 0); + if ( !v34 ) + { +LABEL_42: + if ( v68 == v33 ) + goto LABEL_65; + goto LABEL_43; + } + } + else + { + v33 = v61 == 0xFFFF; + v34 = v68 & (a4 != 0); + if ( !v34 ) + goto LABEL_42; + } + v40 = (__int16 *)a4[2]; + if ( (unsigned int)v40 >= a4[3] ) + { + v64 = v33; + v41 = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4); + v33 = v64; + } + else + { + v41 = *v40; + } + v42 = v41 == -1; + v43 = 0; + if ( !v42 ) + v43 = a4; + a4 = v43; + if ( !v42 ) + v34 = 0; + if ( v34 == v33 ) + { +LABEL_65: + v12 = v32; + v10 = v75; + goto LABEL_15; + } +LABEL_43: + if ( a2 && v61 == 0xFFFF ) + { + v44 = (unsigned __int16 *)a2[2]; + if ( (unsigned int)v44 >= a2[3] ) + v35 = (*(unsigned __int16 (__fastcall **)(int *))(*a2 + 36))(a2); + else + v35 = *v44; + if ( (_WORD)v35 == 0xFFFF ) + a2 = 0; + } + else + { + v35 = v61; + } + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, int))(*(_DWORD *)v32 + 8))(v32, 32, v35) ) + goto LABEL_65; + v36 = a2[2]; + if ( v36 >= a2[3] ) + (*(void (__fastcall **)(int *))(*a2 + 40))(a2); + else + a2[2] = v36 + 2; + v61 = -1; + } + } + return a2; +} +// 45F7BF: variable 'v26' is possibly undefined +// 45FB06: variable 'v54' is possibly undefined + +//----- (0045FC70) -------------------------------------------------------- +int *__thiscall std::time_get>::get( + void *this, + int *a2, + int a3, + _DWORD *a4, + int a5, + int a6, + _DWORD *a7, + _DWORD *a8, + char a9, + char a10) +{ + int *(__stdcall *v10)(int *, int, _DWORD *, int, int, _DWORD *, _DWORD *, char, char); // eax + void *v11; // eax + int *v12; // ecx + int *v13; // ebp + __int16 v14; // dx + _BOOL2 v15; // bx + bool v16; // si + bool v17; // cl + __int16 *v19; // eax + __int16 v20; // ax + __int16 *v21; // eax + __int16 v22; // ax + int v23; // [esp+28h] [ebp-48h] + wchar_t v24; // [esp+4Ch] [ebp-24h] BYREF + __int16 v25; // [esp+4Eh] [ebp-22h] + __int16 v26; // [esp+50h] [ebp-20h] + __int16 v27; // [esp+52h] [ebp-1Eh] + + v10 = *(int *(__stdcall **)(int *, int, _DWORD *, int, int, _DWORD *, _DWORD *, char, char))(*(_DWORD *)this + 32); + if ( v10 != std::time_get>::do_get ) + return (int *)((int (__thiscall *)(void *, int *, int, _DWORD *, int, int, _DWORD *, _DWORD *, _DWORD, _DWORD))v10)( + this, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10); + v11 = std::use_facet>(a6 + 108); + *a7 = 0; + v24 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v11 + 40))(v11, 37); + if ( a10 ) + { + v26 = a9; + v25 = a10; + v27 = 0; + } + else + { + v25 = a9; + v26 = 0; + } + v12 = std::time_get>::_M_extract_via_format( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + &v24); + v13 = v12; + v15 = v14 == -1; + v16 = v15 && v12 != 0; + if ( v16 ) + { + v19 = (__int16 *)v12[2]; + if ( (unsigned int)v19 >= v12[3] ) + { + v23 = (int)v12; + v20 = (*(int (**)(void))(*v12 + 36))(); + v12 = (int *)v23; + } + else + { + v20 = *v19; + } + LOBYTE(v15) = 0; + v13 = 0; + if ( v20 == -1 ) + LOBYTE(v15) = v16; + if ( v20 != -1 ) + v13 = v12; + } + v17 = (_WORD)a5 == 0xFFFF; + if ( a4 && (_WORD)a5 == 0xFFFF ) + { + v21 = (__int16 *)a4[2]; + if ( (unsigned int)v21 >= a4[3] ) + v22 = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4); + else + v22 = *v21; + v17 = v22 == -1; + } + if ( v15 == v17 ) + *a7 |= 2u; + return v13; +} +// 45FD79: variable 'v14' is possibly undefined + +//----- (0045FEC0) -------------------------------------------------------- +int *__stdcall std::time_get>::do_get( + int *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7, + char a8, + char a9) +{ + void *v9; // eax + int *v10; // ecx + int *v11; // ebp + __int16 v12; // dx + _BOOL2 v13; // bx + bool v14; // si + bool v15; // cl + __int16 *v17; // eax + __int16 v18; // ax + __int16 *v19; // eax + __int16 v20; // ax + int v21; // [esp+34h] [ebp-3Ch] + wchar_t v22; // [esp+4Ch] [ebp-24h] BYREF + __int16 v23; // [esp+4Eh] [ebp-22h] + __int16 v24; // [esp+50h] [ebp-20h] + __int16 v25; // [esp+52h] [ebp-1Eh] + + v9 = std::use_facet>(a5 + 108); + *a6 = 0; + v22 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v9 + 40))(v9, 37); + if ( a9 ) + { + v24 = a8; + v23 = a9; + v25 = 0; + } + else + { + v23 = a8; + v24 = 0; + } + v10 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + a6, + a7, + &v22); + v11 = v10; + v13 = v12 == -1; + v14 = v13 && v10 != 0; + if ( v14 ) + { + v19 = (__int16 *)v10[2]; + if ( (unsigned int)v19 >= v10[3] ) + { + v21 = (int)v10; + v20 = (*(int (**)(void))(*v10 + 36))(); + v10 = (int *)v21; + } + else + { + v20 = *v19; + } + LOBYTE(v13) = 0; + v11 = 0; + if ( v20 == -1 ) + LOBYTE(v13) = v14; + if ( v20 != -1 ) + v11 = v10; + } + v15 = (_WORD)a4 == 0xFFFF; + if ( a3 && (_WORD)a4 == 0xFFFF ) + { + v17 = (__int16 *)a3[2]; + if ( (unsigned int)v17 >= a3[3] ) + v18 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v18 = *v17; + v15 = v18 == -1; + } + if ( v13 == v15 ) + *a6 |= 2u; + return v11; +} +// 45FFA4: variable 'v12' is possibly undefined + +//----- (00460080) -------------------------------------------------------- +int __fastcall std::time_get>::get_date(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 16))(a1); +} + +//----- (00460090) -------------------------------------------------------- +int __fastcall std::time_get>::get_time(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 12))(a1); +} + +//----- (004600A0) -------------------------------------------------------- +int __fastcall std::time_get>::get_year(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 28))(a1); +} + +//----- (004600B0) -------------------------------------------------------- +_DWORD *__stdcall std::money_get>::_M_extract( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + _BYTE *v7; // edx + unsigned int v8; // eax + _DWORD *v9; // ecx + unsigned int v10; // eax + char v11; // al + _BYTE *v12; // eax + char v13; // al + _BYTE *v14; // edx + unsigned int v15; // eax + char v16; // al + int v17; // eax + char v18; // dl + _BYTE *v19; // eax + int v20; // eax + _DWORD *v21; // eax + char v22; // al + int v23; // eax + unsigned __int8 *v24; // eax + char v25; // al + int v26; // edx + int v27; // eax + _BYTE *v28; // eax + int v29; // eax + _DWORD *v30; // eax + char v31; // al + int v32; // eax + unsigned __int8 *v33; // eax + bool v34; // zf + char v35; // al + _DWORD *v36; // edx + char v37; // al + char *v39; // eax + char v40; // al + bool v41; // zf + _DWORD *v42; // edx + char v43; // al + char v44; // al + _BYTE *v45; // edx + unsigned int v46; // eax + int v47; // eax + unsigned __int8 v48; // dl + bool v49; // zf + _DWORD *v50; // eax + char v51; // al + unsigned int first_not_of; // eax + bool v53; // zf + _DWORD *v54; // eax + bool v55; // bl + int v56; // eax + bool v57; // zf + char v58; // dl + _DWORD *v59; // eax + _DWORD *v60; // eax + bool v61; // zf + _DWORD *v62; // edx + bool v63; // zf + _DWORD *v64; // eax + bool v65; // bl + _BYTE *v66; // eax + bool v67; // zf + _DWORD *v68; // eax + int v69; // eax + _BYTE *v70; // eax + int v71; // eax + _DWORD *v72; // edx + bool v73; // zf + _DWORD *v74; // eax + char v75; // bl + int v76; // eax + _DWORD *v77; // eax + bool v78; // zf + _DWORD *v79; // eax + bool v80; // bl + _DWORD *v81; // edx + bool v82; // zf + _DWORD *v83; // edx + bool v84; // zf + _DWORD *v85; // edx + bool v86; // zf + _DWORD *v87; // eax + bool v88; // bl + _DWORD *v89; // edx + bool v90; // zf + _DWORD *v91; // eax + bool v92; // bl + _DWORD *v93; // edx + _DWORD *v94; // edx + unsigned int v95; // [esp+8h] [ebp-D0h] + std::locale::_Impl *v96; // [esp+14h] [ebp-C4h] + char v97; // [esp+18h] [ebp-C0h] + char v98; // [esp+1Ch] [ebp-BCh] + unsigned int v99; // [esp+1Ch] [ebp-BCh] + _DWORD *v100; // [esp+20h] [ebp-B8h] + unsigned int v101; // [esp+24h] [ebp-B4h] + int v102; // [esp+2Ch] [ebp-ACh] + char v103; // [esp+30h] [ebp-A8h] + char v104; // [esp+30h] [ebp-A8h] + int v105; // [esp+30h] [ebp-A8h] + unsigned int v106; // [esp+30h] [ebp-A8h] + char v107; // [esp+30h] [ebp-A8h] + char v108; // [esp+30h] [ebp-A8h] + char v109; // [esp+30h] [ebp-A8h] + bool v110; // [esp+35h] [ebp-A3h] + char v111; // [esp+36h] [ebp-A2h] + char v112; // [esp+37h] [ebp-A1h] + unsigned int Buf; // [esp+38h] [ebp-A0h] + std::locale::facet *Bufa; // [esp+38h] [ebp-A0h] + int *v115; // [esp+3Ch] [ebp-9Ch] + int v116; // [esp+3Ch] [ebp-9Ch] + int v117; // [esp+40h] [ebp-98h] + std::locale::facet *v119; // [esp+4Ch] [ebp-8Ch] + std::locale::facet *v120; // [esp+4Ch] [ebp-8Ch] + char v121; // [esp+4Ch] [ebp-8Ch] + std::locale::facet *v122; // [esp+4Ch] [ebp-8Ch] + char v123; // [esp+4Ch] [ebp-8Ch] + unsigned __int8 v124; // [esp+4Ch] [ebp-8Ch] + char v125; // [esp+4Ch] [ebp-8Ch] + char v126; // [esp+4Ch] [ebp-8Ch] + char v127; // [esp+4Ch] [ebp-8Ch] + char v128; // [esp+4Ch] [ebp-8Ch] + char v129; // [esp+4Ch] [ebp-8Ch] + bool v130; // [esp+4Ch] [ebp-8Ch] + char v131; // [esp+50h] [ebp-88h] + bool v132; // [esp+50h] [ebp-88h] + char v133; // [esp+50h] [ebp-88h] + char v134; // [esp+50h] [ebp-88h] + unsigned __int8 v135; // [esp+50h] [ebp-88h] + bool v136; // [esp+50h] [ebp-88h] + bool v137; // [esp+50h] [ebp-88h] + bool v138; // [esp+50h] [ebp-88h] + bool v139; // [esp+50h] [ebp-88h] + size_t v140; // [esp+50h] [ebp-88h] + char v141; // [esp+50h] [ebp-88h] + size_t v143; // [esp+54h] [ebp-84h] + size_t v144; // [esp+54h] [ebp-84h] + int v146; // [esp+9Ch] [ebp-3Ch] + void *v147; // [esp+A0h] [ebp-38h] BYREF + std::locale::facet *v148; // [esp+A4h] [ebp-34h] + int v149[4]; // [esp+A8h] [ebp-30h] BYREF + void *Block; // [esp+B8h] [ebp-20h] BYREF + size_t v151; // [esp+BCh] [ebp-1Ch] + int v152[5]; // [esp+C0h] [ebp-18h] BYREF + + v100 = std::use_facet>(a5 + 108); + v119 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v115 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)v119); + v117 = *v115; + if ( !*v115 ) + { + v60 = operator new(0x44u); + *v60 = &off_51B084; + v60[1] = 0; + v60[2] = 0; + v60[3] = 0; + *((_WORD *)v60 + 8) = 0; + *((_BYTE *)v60 + 18) = 0; + v60[5] = 0; + v60[6] = 0; + v60[7] = 0; + v60[8] = 0; + v60[9] = 0; + v60[10] = 0; + v60[11] = 0; + v60[12] = 0; + v60[13] = 0; + *((_BYTE *)v60 + 67) = 0; + v96 = (std::locale::_Impl *)v60; + std::__moneypunct_cache::_M_cache((int)v60, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v96, v119, v95); + v117 = *v115; + } + if ( *(_DWORD *)(v117 + 32) ) + v110 = *(_DWORD *)(v117 + 40) != 0; + else + v110 = 0; + v148 = 0; + v147 = v149; + LOBYTE(v149[0]) = 0; + if ( *(_BYTE *)(v117 + 16) ) + std::string::reserve(&v147, 0x20u); + Block = v152; + v151 = 0; + LOBYTE(v152[0]) = 0; + std::string::reserve(&Block, 0x20u); + v102 = 0; + v112 = 0; + v116 = 0; + v146 = *(_DWORD *)(v117 + 52); + v97 = 0; + v101 = 0; + v111 = 0; + while ( 2 ) + { + switch ( *((_BYTE *)&v146 + v102) ) + { + case 0: + v104 = 1; + goto LABEL_37; + case 1: + v138 = a2 == -1; + if ( v138 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v86 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v87 = 0; + if ( !v86 ) + v87 = a1; + v88 = v138 && a1 != 0; + a1 = v87; + if ( !v86 ) + v88 = 0; + v127 = v88; + } + else + { + v127 = 0; + } + } + else + { + v127 = a2 == -1; + } + v31 = a4 == -1; + v107 = v31 & (a3 != 0); + if ( v107 ) + { + v31 = 0; + if ( a3[2] >= a3[3] ) + { + v61 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + v31 = 0; + if ( v61 ) + v31 = v107; + v62 = 0; + if ( !v61 ) + v62 = a3; + a3 = v62; + } + } + v104 = 0; + if ( v127 == v31 ) + goto LABEL_37; + if ( !a1 || a2 != -1 ) + { + LOBYTE(v32) = a2; + goto LABEL_107; + } + v33 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v33 >= a1[3] ) + { + v32 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v89 = 0; + if ( v32 != -1 ) + v89 = a1; + a1 = v89; +LABEL_107: + v104 = 0; + if ( (*(_BYTE *)(v100[6] + 2 * (unsigned __int8)v32) & 0x20) == 0 ) + goto LABEL_37; + v33 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v33 >= a1[3] ) + { + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + goto LABEL_110; + } +LABEL_109: + a1[2] = v33 + 1; +LABEL_110: + a2 = -1; + v104 = 1; + goto LABEL_37; + } + if ( (*(_BYTE *)(v100[6] + 2 * *v33) & 0x20) != 0 ) + goto LABEL_109; + a2 = -1; +LABEL_37: + if ( v102 == 3 ) + { + v16 = v104 & (v101 > 1); +LABEL_39: + if ( v16 ) + { + if ( v111 ) + v17 = *(_DWORD *)(v117 + 36); + else + v17 = *(_DWORD *)(v117 + 28); + v105 = v17; + for ( Buf = 1; ; ++Buf ) + { + v135 = a2 == -1; + if ( (v135 & (a1 != 0)) != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v73 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v74 = 0; + if ( !v73 ) + v74 = a1; + v75 = v135 & (a1 != 0); + a1 = v74; + if ( !v73 ) + v75 = 0; + v123 = v75; + } + else + { + v123 = 0; + } + } + else + { + v123 = a2 == -1; + } + if ( a3 && a4 == -1 ) + { + if ( a3[2] >= a3[3] ) + { + v20 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v123 ^= v20 == -1; + v34 = v20 == -1; + v21 = 0; + if ( !v34 ) + v21 = a3; + a3 = v21; + } + } + else + { + v123 ^= a4 == -1; + } + if ( Buf >= v101 || !v123 ) + { + if ( Buf != v101 ) + { +LABEL_195: + v124 = v135 & (a1 != 0); + goto LABEL_120; + } + if ( v151 > 1 ) + goto LABEL_207; + goto LABEL_174; + } + v18 = a2; + v124 = v135 & (a1 != 0); + if ( v124 ) + { + v19 = (_BYTE *)a1[2]; + if ( (unsigned int)v19 < a1[3] ) + { + if ( *(_BYTE *)(v105 + Buf) != *v19 ) + { + v135 &= a1 != 0; + goto LABEL_120; + } +LABEL_49: + a1[2] = v19 + 1; + goto LABEL_50; + } + v76 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v34 = v76 == -1; + v18 = v76; + v77 = 0; + if ( !v34 ) + v77 = a1; + a1 = v77; + } + if ( *(_BYTE *)(v105 + Buf) != v18 ) + goto LABEL_195; + v19 = (_BYTE *)a1[2]; + if ( (unsigned int)v19 < a1[3] ) + goto LABEL_49; + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); +LABEL_50: + a2 = -1; + } + } + if ( !v104 ) + goto LABEL_119; + if ( v151 > 1 ) + { +LABEL_207: + first_not_of = std::string::find_first_not_of(&Block, 48, 0); + if ( first_not_of ) + { + if ( first_not_of != -1 ) + goto LABEL_209; + first_not_of = v151 - 1; + if ( !v151 ) + { + v151 = 0; + *(_BYTE *)Block = 0; + goto LABEL_174; + } + if ( v151 != 1 ) + { +LABEL_209: + if ( v151 <= first_not_of ) + first_not_of = v151; + std::string::_M_erase((int *)&Block, 0, first_not_of); + } + } + } +LABEL_174: + if ( v111 && *(_BYTE *)Block != 48 ) + std::string::_M_replace_aux(&Block, 0, 0, 1u, 45); + v140 = (size_t)v148; + if ( v148 ) + { + v44 = v97; + if ( !v112 ) + v44 = v116; + v45 = v147; + Bufa = (std::locale::facet *)((char *)v148 + 1); + v129 = v44; + v46 = 15; + if ( v147 != v149 ) + v46 = v149[0]; + if ( (unsigned int)v148 + 1 > v46 ) + { + std::string::_M_mutate((int)&v147, (size_t)v148, 0, 0, 1u); + v45 = v147; + } + v45[v140] = v129; + v148 = Bufa; + *((_BYTE *)v147 + v140 + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v117 + 8), *(_DWORD *)(v117 + 12), (int)&v147) ) + *a6 |= 4u; + } + v135 = a2 == -1; + v124 = v135 & (a1 != 0); + if ( v112 && *(_DWORD *)(v117 + 44) != v116 ) + goto LABEL_120; + std::string::swap(a7, &Block); + if ( !v124 ) + goto LABEL_121; +LABEL_189: + v135 = 0; + if ( a1[2] >= a1[3] ) + { + v47 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v48 = v124; + v49 = v47 == -1; + if ( v47 != -1 ) + v48 = 0; + v50 = 0; + if ( !v49 ) + v50 = a1; + v135 = v48; + a1 = v50; + } + goto LABEL_121; + } + while ( 1 ) + { + v136 = a2 == -1; + if ( v136 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v63 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v64 = 0; + if ( !v63 ) + v64 = a1; + v65 = v136 && a1 != 0; + a1 = v64; + if ( !v63 ) + v65 = 0; + v125 = v65; + } + else + { + v125 = 0; + } + } + else + { + v125 = a2 == -1; + } + v22 = a4 == -1; + v98 = v22 & (a3 != 0); + if ( v98 ) + { + v22 = 0; + if ( a3[2] >= a3[3] ) + { + v41 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + v22 = v98; + if ( !v41 ) + v22 = 0; + v42 = 0; + if ( !v41 ) + v42 = a3; + a3 = v42; + } + } + if ( v22 == v125 ) + goto LABEL_136; + if ( a1 && a2 == -1 ) + { + v24 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v24 < a1[3] ) + { + if ( (*(_BYTE *)(v100[6] + 2 * *v24) & 0x20) == 0 ) + { + a2 = -1; + v25 = v104 ^ 1; + goto LABEL_137; + } +LABEL_67: + a1[2] = v24 + 1; + goto LABEL_68; + } + v23 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v72 = 0; + if ( v23 != -1 ) + v72 = a1; + a1 = v72; + } + else + { + LOBYTE(v23) = a2; + } + if ( (*(_BYTE *)(v100[6] + 2 * (unsigned __int8)v23) & 0x20) == 0 ) + goto LABEL_136; + v24 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v24 < a1[3] ) + goto LABEL_67; + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); +LABEL_68: + a2 = -1; + } + case 2: + if ( (*(_BYTE *)(a5 + 13) & 2) != 0 ) + goto LABEL_82; + v25 = v102 == 0 || v101 > 1; + if ( v25 ) + goto LABEL_82; + if ( v102 != 1 ) + { + v104 = 1; + if ( v102 == 2 ) + { + if ( HIBYTE(v146) == 4 ) + goto LABEL_82; + v26 = 3; + if ( HIBYTE(v146) == 3 && v110 ) + goto LABEL_82; + goto LABEL_139; + } +LABEL_137: + v26 = v102 + 1; + if ( v102 + 1 > 3 || v25 ) + { + v16 = v104 & (v101 > 1); + goto LABEL_39; + } +LABEL_139: + v102 = v26; + continue; + } + if ( !v110 && (_BYTE)v146 != 3 && BYTE2(v146) != 1 ) + { + v26 = 2; + goto LABEL_139; + } +LABEL_82: + v106 = 0; + v99 = *(_DWORD *)(v117 + 24); + while ( 2 ) + { + v137 = a2 == -1; + if ( v137 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v78 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v79 = 0; + if ( !v78 ) + v79 = a1; + v80 = v137 && a1 != 0; + a1 = v79; + if ( !v78 ) + v80 = 0; + v126 = v80; + } + else + { + v126 = 0; + } + } + else + { + v126 = a2 == -1; + } + if ( a3 && a4 == -1 ) + { + if ( a3[2] >= a3[3] ) + { + v29 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v126 ^= v29 == -1; + v34 = v29 == -1; + v30 = 0; + if ( !v34 ) + v30 = a3; + a3 = v30; + } + } + else + { + v126 ^= a4 == -1; + } + v25 = v126 & (v106 < v99); + if ( v25 ) + { + if ( !a1 || a2 != -1 ) + { + LOBYTE(v27) = a2; + goto LABEL_88; + } + v28 = (_BYTE *)a1[2]; + if ( (unsigned int)v28 < a1[3] ) + { + if ( *(_BYTE *)(*(_DWORD *)(v117 + 20) + v106) != *v28 ) + { + a2 = -1; + goto LABEL_168; + } + goto LABEL_90; + } + v27 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v81 = 0; + if ( v27 != -1 ) + v81 = a1; + a1 = v81; +LABEL_88: + if ( *(_BYTE *)(*(_DWORD *)(v117 + 20) + v106) != (_BYTE)v27 ) + goto LABEL_168; + v28 = (_BYTE *)a1[2]; + if ( (unsigned int)v28 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else +LABEL_90: + a1[2] = v28 + 1; + ++v106; + a2 = -1; + continue; + } + break; + } + if ( v106 == v99 ) + goto LABEL_198; +LABEL_168: + if ( !v106 ) + { + v104 = (*(_BYTE *)(a5 + 13) & 2) == 0; + v25 = (*(_BYTE *)(a5 + 13) & 2) != 0; + goto LABEL_137; + } +LABEL_119: + v135 = a2 == -1; + v124 = v135 & (a1 != 0); +LABEL_120: + *a6 |= 4u; + if ( v124 ) + goto LABEL_189; +LABEL_121: + v37 = a4 == -1; + if ( a3 ) + { + if ( a4 == -1 ) + { + v37 = 0; + if ( a3[2] >= a3[3] ) + v37 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + } + } + if ( v37 == v135 ) + *a6 |= 2u; + if ( Block != v152 ) + operator delete(Block); + if ( v147 != v149 ) + operator delete(v147); + return a1; + case 3: + if ( !*(_DWORD *)(v117 + 32) ) + { + if ( !*(_DWORD *)(v117 + 40) ) + goto LABEL_74; +LABEL_199: + v141 = a2 == -1; + if ( !a1 || a2 != -1 ) + { + v130 = a2 == -1; + goto LABEL_202; + } +LABEL_253: + v130 = 1; + v141 = 0; + if ( a1[2] >= a1[3] ) + { + v67 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v68 = 0; + if ( !v67 ) + v68 = a1; + v130 = 1; + v141 = v67; + a1 = v68; + } +LABEL_202: + v51 = a4 == -1; + v109 = v51 & (a3 != 0); + if ( v109 ) + { + v51 = 0; + if ( a3[2] >= a3[3] ) + { + v84 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + v51 = 0; + if ( v84 ) + v51 = v109; + v85 = 0; + if ( !v84 ) + v85 = a3; + a3 = v85; + } + } + if ( v51 == v141 ) + { +LABEL_204: + if ( !*(_DWORD *)(v117 + 32) || *(_DWORD *)(v117 + 40) ) + { +LABEL_74: + v25 = v110; + v104 = !v110; + goto LABEL_137; + } + goto LABEL_157; + } + if ( a1 && v130 ) + { + v70 = (_BYTE *)a1[2]; + if ( (unsigned int)v70 < a1[3] ) + { + if ( *v70 != **(_BYTE **)(v117 + 36) ) + goto LABEL_204; + v101 = *(_DWORD *)(v117 + 40); + goto LABEL_267; + } + v71 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v93 = 0; + if ( v71 != -1 ) + v93 = a1; + a1 = v93; + } + else + { + LOBYTE(v71) = a2; + } + if ( **(_BYTE **)(v117 + 36) != (_BYTE)v71 ) + goto LABEL_204; + v101 = *(_DWORD *)(v117 + 40); + v70 = (_BYTE *)a1[2]; + if ( (unsigned int)v70 >= a1[3] ) + { + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + goto LABEL_268; + } +LABEL_267: + a1[2] = v70 + 1; +LABEL_268: + a2 = -1; + v25 = 0; + v104 = 1; + v111 = 1; + goto LABEL_137; + } + v139 = a2 == -1; + if ( v139 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v90 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v91 = 0; + if ( !v90 ) + v91 = a1; + v92 = v139 && a1 != 0; + a1 = v91; + if ( !v90 ) + v92 = 0; + v128 = v92; + } + else + { + v128 = 0; + } + } + else + { + v128 = a2 == -1; + } + v43 = a4 == -1; + v108 = v43 & (a3 != 0); + if ( v108 ) + { + v43 = 0; + if ( a3[2] >= a3[3] ) + { + v82 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + v43 = 0; + if ( v82 ) + v43 = v108; + v83 = 0; + if ( !v82 ) + v83 = a3; + a3 = v83; + } + } + if ( v128 == v43 ) + { +LABEL_155: + if ( *(_DWORD *)(v117 + 40) ) + goto LABEL_199; +LABEL_156: + if ( !*(_DWORD *)(v117 + 32) ) + goto LABEL_74; +LABEL_157: + v104 = 1; + v25 = 0; + v111 = 1; + goto LABEL_137; + } + if ( a1 && a2 == -1 ) + { + v66 = (_BYTE *)a1[2]; + if ( (unsigned int)v66 < a1[3] ) + { + if ( **(_BYTE **)(v117 + 28) != *v66 ) + { + if ( *(_DWORD *)(v117 + 40) ) + goto LABEL_253; + goto LABEL_156; + } + v101 = *(_DWORD *)(v117 + 32); + goto LABEL_260; + } + v69 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v94 = 0; + if ( v69 != -1 ) + v94 = a1; + a1 = v94; + } + else + { + LOBYTE(v69) = a2; + } + if ( **(_BYTE **)(v117 + 28) != (_BYTE)v69 ) + goto LABEL_155; + v101 = *(_DWORD *)(v117 + 32); + v66 = (_BYTE *)a1[2]; + if ( (unsigned int)v66 >= a1[3] ) + { + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); +LABEL_261: + a2 = -1; + v25 = 0; +LABEL_198: + v104 = 1; + goto LABEL_137; + } +LABEL_260: + a1[2] = v66 + 1; + goto LABEL_261; + case 4: + while ( 2 ) + { + v132 = a2 == -1; + if ( v132 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v53 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v54 = 0; + if ( !v53 ) + v54 = a1; + v55 = v132 && a1 != 0; + a1 = v54; + if ( !v53 ) + v55 = 0; + v121 = v55; + } + else + { + v121 = 0; + } + } + else + { + v121 = a2 == -1; + } + v11 = a4 == -1; + v103 = v11 & (a3 != 0); + if ( v103 && (v11 = 0, a3[2] >= a3[3]) ) + { + v34 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + v35 = v103; + if ( !v34 ) + v35 = 0; + v36 = 0; + if ( !v34 ) + v36 = a3; + a3 = v36; + if ( v35 == v121 ) + goto LABEL_117; + } + else if ( v11 == v121 ) + { + goto LABEL_117; + } + if ( a1 && a2 == -1 ) + { + v39 = (char *)a1[2]; + if ( (unsigned int)v39 >= a1[3] ) + { + v56 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v57 = v56 == -1; + v58 = -1; + if ( v56 != -1 ) + v58 = v56; + v59 = 0; + if ( !v57 ) + v59 = a1; + v133 = v58; + a1 = v59; + } + else + { + v133 = *v39; + } + } + else + { + v133 = a2; + } + v12 = memchr((const void *)(v117 + 57), v133, 0xAu); + if ( v12 ) + { + v7 = Block; + v131 = v12[(_DWORD)std::money_base::_S_atoms - 56 - v117]; + v143 = v151; + v8 = 15; + if ( Block != v152 ) + v8 = v152[0]; + v120 = (std::locale::facet *)(v151 + 1); + if ( v151 + 1 > v8 ) + { + std::string::_M_mutate((int)&Block, v151, 0, 0, 1u); + v7 = Block; + } + ++v116; + v7[v143] = v131; + v151 = (size_t)v120; + *((_BYTE *)Block + v143 + 1) = 0; +LABEL_14: + v9 = a1; + v10 = a1[2]; + if ( v10 < a1[3] ) + { +LABEL_15: + v9[2] = v10 + 1; +LABEL_16: + a2 = -1; + continue; + } +LABEL_35: + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + goto LABEL_16; + } + break; + } + v104 = v112 | (*(_BYTE *)(v117 + 17) != (unsigned __int8)v133); + if ( !v104 ) + { + if ( *(int *)(v117 + 44) > 0 ) + { + v40 = v116; + v112 = 1; + v116 = 0; + v97 = v40; + goto LABEL_14; + } + v112 = 0; +LABEL_117: + v104 = 1; +LABEL_118: + if ( !v151 ) + goto LABEL_119; + goto LABEL_136; + } + v13 = *(_BYTE *)(v117 + 16); + if ( !v13 ) + goto LABEL_118; + if ( *(_BYTE *)(v117 + 18) == v133 ) + { + if ( !v112 ) + { + if ( v116 ) + { + v134 = v116; + v14 = v147; + v144 = (size_t)v148; + v15 = 15; + if ( v147 != v149 ) + v15 = v149[0]; + v122 = (std::locale::facet *)((char *)v148 + 1); + if ( (unsigned int)v148 + 1 > v15 ) + { + std::string::_M_mutate((int)&v147, (size_t)v148, 0, 0, 1u); + v14 = v147; + } + v116 = 0; + v14[v144] = v134; + v148 = v122; + *((_BYTE *)v147 + v144 + 1) = 0; + v9 = a1; + v10 = a1[2]; + if ( v10 < a1[3] ) + goto LABEL_15; + goto LABEL_35; + } + v104 = 0; + goto LABEL_118; + } + v13 = v112; + } + v104 = v13; + if ( !v151 ) + goto LABEL_119; +LABEL_136: + v25 = v104 ^ 1; + goto LABEL_137; + default: + v104 = 1; + v25 = 0; + goto LABEL_137; + } + } +} +// 46129B: variable 'v95' is possibly undefined +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 50C608: using guessed type signed __int32 std::moneypunct::id; +// 51B084: using guessed type int (*off_51B084)(); + +//----- (004619E0) -------------------------------------------------------- +_DWORD *__stdcall std::money_get>::_M_extract( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + _BYTE *v7; // edx + unsigned int v8; // eax + _DWORD *v9; // ecx + unsigned int v10; // eax + char v11; // al + _BYTE *v12; // eax + char v13; // al + _BYTE *v14; // edx + unsigned int v15; // eax + char v16; // al + int v17; // eax + char v18; // dl + _BYTE *v19; // eax + int v20; // eax + _DWORD *v21; // eax + char v22; // al + int v23; // eax + unsigned __int8 *v24; // eax + char v25; // al + int v26; // edx + int v27; // eax + _BYTE *v28; // eax + int v29; // eax + _DWORD *v30; // eax + char v31; // al + int v32; // eax + unsigned __int8 *v33; // eax + bool v34; // zf + char v35; // al + _DWORD *v36; // edx + char v37; // al + char *v39; // eax + char v40; // al + bool v41; // zf + _DWORD *v42; // edx + char v43; // al + char v44; // al + _BYTE *v45; // edx + unsigned int v46; // eax + int v47; // eax + unsigned __int8 v48; // dl + bool v49; // zf + _DWORD *v50; // eax + char v51; // al + unsigned int first_not_of; // eax + bool v53; // zf + _DWORD *v54; // eax + bool v55; // bl + int v56; // eax + bool v57; // zf + char v58; // dl + _DWORD *v59; // eax + _DWORD *v60; // eax + bool v61; // zf + _DWORD *v62; // edx + bool v63; // zf + _DWORD *v64; // eax + bool v65; // bl + _BYTE *v66; // eax + bool v67; // zf + _DWORD *v68; // eax + int v69; // eax + _BYTE *v70; // eax + int v71; // eax + _DWORD *v72; // edx + bool v73; // zf + _DWORD *v74; // eax + char v75; // bl + int v76; // eax + _DWORD *v77; // eax + bool v78; // zf + _DWORD *v79; // eax + bool v80; // bl + _DWORD *v81; // edx + bool v82; // zf + _DWORD *v83; // edx + bool v84; // zf + _DWORD *v85; // edx + bool v86; // zf + _DWORD *v87; // eax + bool v88; // bl + _DWORD *v89; // edx + bool v90; // zf + _DWORD *v91; // eax + bool v92; // bl + _DWORD *v93; // edx + _DWORD *v94; // edx + unsigned int v95; // [esp+8h] [ebp-D0h] + std::locale::_Impl *v96; // [esp+14h] [ebp-C4h] + char v97; // [esp+18h] [ebp-C0h] + char v98; // [esp+1Ch] [ebp-BCh] + unsigned int v99; // [esp+1Ch] [ebp-BCh] + _DWORD *v100; // [esp+20h] [ebp-B8h] + unsigned int v101; // [esp+24h] [ebp-B4h] + int v102; // [esp+2Ch] [ebp-ACh] + char v103; // [esp+30h] [ebp-A8h] + char v104; // [esp+30h] [ebp-A8h] + int v105; // [esp+30h] [ebp-A8h] + unsigned int v106; // [esp+30h] [ebp-A8h] + char v107; // [esp+30h] [ebp-A8h] + char v108; // [esp+30h] [ebp-A8h] + char v109; // [esp+30h] [ebp-A8h] + bool v110; // [esp+35h] [ebp-A3h] + char v111; // [esp+36h] [ebp-A2h] + char v112; // [esp+37h] [ebp-A1h] + unsigned int Buf; // [esp+38h] [ebp-A0h] + std::locale::facet *Bufa; // [esp+38h] [ebp-A0h] + int *v115; // [esp+3Ch] [ebp-9Ch] + int v116; // [esp+3Ch] [ebp-9Ch] + int v117; // [esp+40h] [ebp-98h] + std::locale::facet *v119; // [esp+4Ch] [ebp-8Ch] + std::locale::facet *v120; // [esp+4Ch] [ebp-8Ch] + char v121; // [esp+4Ch] [ebp-8Ch] + std::locale::facet *v122; // [esp+4Ch] [ebp-8Ch] + char v123; // [esp+4Ch] [ebp-8Ch] + unsigned __int8 v124; // [esp+4Ch] [ebp-8Ch] + char v125; // [esp+4Ch] [ebp-8Ch] + char v126; // [esp+4Ch] [ebp-8Ch] + char v127; // [esp+4Ch] [ebp-8Ch] + char v128; // [esp+4Ch] [ebp-8Ch] + char v129; // [esp+4Ch] [ebp-8Ch] + bool v130; // [esp+4Ch] [ebp-8Ch] + char v131; // [esp+50h] [ebp-88h] + bool v132; // [esp+50h] [ebp-88h] + char v133; // [esp+50h] [ebp-88h] + char v134; // [esp+50h] [ebp-88h] + unsigned __int8 v135; // [esp+50h] [ebp-88h] + bool v136; // [esp+50h] [ebp-88h] + bool v137; // [esp+50h] [ebp-88h] + bool v138; // [esp+50h] [ebp-88h] + bool v139; // [esp+50h] [ebp-88h] + size_t v140; // [esp+50h] [ebp-88h] + char v141; // [esp+50h] [ebp-88h] + size_t v143; // [esp+54h] [ebp-84h] + size_t v144; // [esp+54h] [ebp-84h] + int v146; // [esp+9Ch] [ebp-3Ch] + void *v147; // [esp+A0h] [ebp-38h] BYREF + std::locale::facet *v148; // [esp+A4h] [ebp-34h] + int v149[4]; // [esp+A8h] [ebp-30h] BYREF + void *Block; // [esp+B8h] [ebp-20h] BYREF + size_t v151; // [esp+BCh] [ebp-1Ch] + int v152[5]; // [esp+C0h] [ebp-18h] BYREF + + v100 = std::use_facet>(a5 + 108); + v119 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v115 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)v119); + v117 = *v115; + if ( !*v115 ) + { + v60 = operator new(0x44u); + *v60 = &off_51B094; + v60[1] = 0; + v60[2] = 0; + v60[3] = 0; + *((_WORD *)v60 + 8) = 0; + *((_BYTE *)v60 + 18) = 0; + v60[5] = 0; + v60[6] = 0; + v60[7] = 0; + v60[8] = 0; + v60[9] = 0; + v60[10] = 0; + v60[11] = 0; + v60[12] = 0; + v60[13] = 0; + *((_BYTE *)v60 + 67) = 0; + v96 = (std::locale::_Impl *)v60; + std::__moneypunct_cache::_M_cache((int)v60, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v96, v119, v95); + v117 = *v115; + } + if ( *(_DWORD *)(v117 + 32) ) + v110 = *(_DWORD *)(v117 + 40) != 0; + else + v110 = 0; + v148 = 0; + v147 = v149; + LOBYTE(v149[0]) = 0; + if ( *(_BYTE *)(v117 + 16) ) + std::string::reserve(&v147, 0x20u); + Block = v152; + v151 = 0; + LOBYTE(v152[0]) = 0; + std::string::reserve(&Block, 0x20u); + v102 = 0; + v112 = 0; + v116 = 0; + v146 = *(_DWORD *)(v117 + 52); + v97 = 0; + v101 = 0; + v111 = 0; + while ( 2 ) + { + switch ( *((_BYTE *)&v146 + v102) ) + { + case 0: + v104 = 1; + goto LABEL_37; + case 1: + v138 = a2 == -1; + if ( v138 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v86 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v87 = 0; + if ( !v86 ) + v87 = a1; + v88 = v138 && a1 != 0; + a1 = v87; + if ( !v86 ) + v88 = 0; + v127 = v88; + } + else + { + v127 = 0; + } + } + else + { + v127 = a2 == -1; + } + v31 = a4 == -1; + v107 = v31 & (a3 != 0); + if ( v107 ) + { + v31 = 0; + if ( a3[2] >= a3[3] ) + { + v61 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + v31 = 0; + if ( v61 ) + v31 = v107; + v62 = 0; + if ( !v61 ) + v62 = a3; + a3 = v62; + } + } + v104 = 0; + if ( v127 == v31 ) + goto LABEL_37; + if ( !a1 || a2 != -1 ) + { + LOBYTE(v32) = a2; + goto LABEL_107; + } + v33 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v33 >= a1[3] ) + { + v32 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v89 = 0; + if ( v32 != -1 ) + v89 = a1; + a1 = v89; +LABEL_107: + v104 = 0; + if ( (*(_BYTE *)(v100[6] + 2 * (unsigned __int8)v32) & 0x20) == 0 ) + goto LABEL_37; + v33 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v33 >= a1[3] ) + { + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + goto LABEL_110; + } +LABEL_109: + a1[2] = v33 + 1; +LABEL_110: + a2 = -1; + v104 = 1; + goto LABEL_37; + } + if ( (*(_BYTE *)(v100[6] + 2 * *v33) & 0x20) != 0 ) + goto LABEL_109; + a2 = -1; +LABEL_37: + if ( v102 == 3 ) + { + v16 = v104 & (v101 > 1); +LABEL_39: + if ( v16 ) + { + if ( v111 ) + v17 = *(_DWORD *)(v117 + 36); + else + v17 = *(_DWORD *)(v117 + 28); + v105 = v17; + for ( Buf = 1; ; ++Buf ) + { + v135 = a2 == -1; + if ( (v135 & (a1 != 0)) != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v73 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v74 = 0; + if ( !v73 ) + v74 = a1; + v75 = v135 & (a1 != 0); + a1 = v74; + if ( !v73 ) + v75 = 0; + v123 = v75; + } + else + { + v123 = 0; + } + } + else + { + v123 = a2 == -1; + } + if ( a3 && a4 == -1 ) + { + if ( a3[2] >= a3[3] ) + { + v20 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v123 ^= v20 == -1; + v34 = v20 == -1; + v21 = 0; + if ( !v34 ) + v21 = a3; + a3 = v21; + } + } + else + { + v123 ^= a4 == -1; + } + if ( Buf >= v101 || !v123 ) + { + if ( Buf != v101 ) + { +LABEL_195: + v124 = v135 & (a1 != 0); + goto LABEL_120; + } + if ( v151 > 1 ) + goto LABEL_207; + goto LABEL_174; + } + v18 = a2; + v124 = v135 & (a1 != 0); + if ( v124 ) + { + v19 = (_BYTE *)a1[2]; + if ( (unsigned int)v19 < a1[3] ) + { + if ( *(_BYTE *)(v105 + Buf) != *v19 ) + { + v135 &= a1 != 0; + goto LABEL_120; + } +LABEL_49: + a1[2] = v19 + 1; + goto LABEL_50; + } + v76 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v34 = v76 == -1; + v18 = v76; + v77 = 0; + if ( !v34 ) + v77 = a1; + a1 = v77; + } + if ( *(_BYTE *)(v105 + Buf) != v18 ) + goto LABEL_195; + v19 = (_BYTE *)a1[2]; + if ( (unsigned int)v19 < a1[3] ) + goto LABEL_49; + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); +LABEL_50: + a2 = -1; + } + } + if ( !v104 ) + goto LABEL_119; + if ( v151 > 1 ) + { +LABEL_207: + first_not_of = std::string::find_first_not_of(&Block, 48, 0); + if ( first_not_of ) + { + if ( first_not_of != -1 ) + goto LABEL_209; + first_not_of = v151 - 1; + if ( !v151 ) + { + v151 = 0; + *(_BYTE *)Block = 0; + goto LABEL_174; + } + if ( v151 != 1 ) + { +LABEL_209: + if ( v151 <= first_not_of ) + first_not_of = v151; + std::string::_M_erase((int *)&Block, 0, first_not_of); + } + } + } +LABEL_174: + if ( v111 && *(_BYTE *)Block != 48 ) + std::string::_M_replace_aux(&Block, 0, 0, 1u, 45); + v140 = (size_t)v148; + if ( v148 ) + { + v44 = v97; + if ( !v112 ) + v44 = v116; + v45 = v147; + Bufa = (std::locale::facet *)((char *)v148 + 1); + v129 = v44; + v46 = 15; + if ( v147 != v149 ) + v46 = v149[0]; + if ( (unsigned int)v148 + 1 > v46 ) + { + std::string::_M_mutate((int)&v147, (size_t)v148, 0, 0, 1u); + v45 = v147; + } + v45[v140] = v129; + v148 = Bufa; + *((_BYTE *)v147 + v140 + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v117 + 8), *(_DWORD *)(v117 + 12), (int)&v147) ) + *a6 |= 4u; + } + v135 = a2 == -1; + v124 = v135 & (a1 != 0); + if ( v112 && *(_DWORD *)(v117 + 44) != v116 ) + goto LABEL_120; + std::string::swap(a7, &Block); + if ( !v124 ) + goto LABEL_121; +LABEL_189: + v135 = 0; + if ( a1[2] >= a1[3] ) + { + v47 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v48 = v124; + v49 = v47 == -1; + if ( v47 != -1 ) + v48 = 0; + v50 = 0; + if ( !v49 ) + v50 = a1; + v135 = v48; + a1 = v50; + } + goto LABEL_121; + } + while ( 1 ) + { + v136 = a2 == -1; + if ( v136 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v63 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v64 = 0; + if ( !v63 ) + v64 = a1; + v65 = v136 && a1 != 0; + a1 = v64; + if ( !v63 ) + v65 = 0; + v125 = v65; + } + else + { + v125 = 0; + } + } + else + { + v125 = a2 == -1; + } + v22 = a4 == -1; + v98 = v22 & (a3 != 0); + if ( v98 ) + { + v22 = 0; + if ( a3[2] >= a3[3] ) + { + v41 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + v22 = v98; + if ( !v41 ) + v22 = 0; + v42 = 0; + if ( !v41 ) + v42 = a3; + a3 = v42; + } + } + if ( v22 == v125 ) + goto LABEL_136; + if ( a1 && a2 == -1 ) + { + v24 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v24 < a1[3] ) + { + if ( (*(_BYTE *)(v100[6] + 2 * *v24) & 0x20) == 0 ) + { + a2 = -1; + v25 = v104 ^ 1; + goto LABEL_137; + } +LABEL_67: + a1[2] = v24 + 1; + goto LABEL_68; + } + v23 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v72 = 0; + if ( v23 != -1 ) + v72 = a1; + a1 = v72; + } + else + { + LOBYTE(v23) = a2; + } + if ( (*(_BYTE *)(v100[6] + 2 * (unsigned __int8)v23) & 0x20) == 0 ) + goto LABEL_136; + v24 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v24 < a1[3] ) + goto LABEL_67; + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); +LABEL_68: + a2 = -1; + } + case 2: + if ( (*(_BYTE *)(a5 + 13) & 2) != 0 ) + goto LABEL_82; + v25 = v102 == 0 || v101 > 1; + if ( v25 ) + goto LABEL_82; + if ( v102 != 1 ) + { + v104 = 1; + if ( v102 == 2 ) + { + if ( HIBYTE(v146) == 4 ) + goto LABEL_82; + v26 = 3; + if ( HIBYTE(v146) == 3 && v110 ) + goto LABEL_82; + goto LABEL_139; + } +LABEL_137: + v26 = v102 + 1; + if ( v102 + 1 > 3 || v25 ) + { + v16 = v104 & (v101 > 1); + goto LABEL_39; + } +LABEL_139: + v102 = v26; + continue; + } + if ( !v110 && (_BYTE)v146 != 3 && BYTE2(v146) != 1 ) + { + v26 = 2; + goto LABEL_139; + } +LABEL_82: + v106 = 0; + v99 = *(_DWORD *)(v117 + 24); + while ( 2 ) + { + v137 = a2 == -1; + if ( v137 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v78 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v79 = 0; + if ( !v78 ) + v79 = a1; + v80 = v137 && a1 != 0; + a1 = v79; + if ( !v78 ) + v80 = 0; + v126 = v80; + } + else + { + v126 = 0; + } + } + else + { + v126 = a2 == -1; + } + if ( a3 && a4 == -1 ) + { + if ( a3[2] >= a3[3] ) + { + v29 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v126 ^= v29 == -1; + v34 = v29 == -1; + v30 = 0; + if ( !v34 ) + v30 = a3; + a3 = v30; + } + } + else + { + v126 ^= a4 == -1; + } + v25 = v126 & (v106 < v99); + if ( v25 ) + { + if ( !a1 || a2 != -1 ) + { + LOBYTE(v27) = a2; + goto LABEL_88; + } + v28 = (_BYTE *)a1[2]; + if ( (unsigned int)v28 < a1[3] ) + { + if ( *(_BYTE *)(*(_DWORD *)(v117 + 20) + v106) != *v28 ) + { + a2 = -1; + goto LABEL_168; + } + goto LABEL_90; + } + v27 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v81 = 0; + if ( v27 != -1 ) + v81 = a1; + a1 = v81; +LABEL_88: + if ( *(_BYTE *)(*(_DWORD *)(v117 + 20) + v106) != (_BYTE)v27 ) + goto LABEL_168; + v28 = (_BYTE *)a1[2]; + if ( (unsigned int)v28 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else +LABEL_90: + a1[2] = v28 + 1; + ++v106; + a2 = -1; + continue; + } + break; + } + if ( v106 == v99 ) + goto LABEL_198; +LABEL_168: + if ( !v106 ) + { + v104 = (*(_BYTE *)(a5 + 13) & 2) == 0; + v25 = (*(_BYTE *)(a5 + 13) & 2) != 0; + goto LABEL_137; + } +LABEL_119: + v135 = a2 == -1; + v124 = v135 & (a1 != 0); +LABEL_120: + *a6 |= 4u; + if ( v124 ) + goto LABEL_189; +LABEL_121: + v37 = a4 == -1; + if ( a3 ) + { + if ( a4 == -1 ) + { + v37 = 0; + if ( a3[2] >= a3[3] ) + v37 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + } + } + if ( v37 == v135 ) + *a6 |= 2u; + if ( Block != v152 ) + operator delete(Block); + if ( v147 != v149 ) + operator delete(v147); + return a1; + case 3: + if ( !*(_DWORD *)(v117 + 32) ) + { + if ( !*(_DWORD *)(v117 + 40) ) + goto LABEL_74; +LABEL_199: + v141 = a2 == -1; + if ( !a1 || a2 != -1 ) + { + v130 = a2 == -1; + goto LABEL_202; + } +LABEL_253: + v130 = 1; + v141 = 0; + if ( a1[2] >= a1[3] ) + { + v67 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v68 = 0; + if ( !v67 ) + v68 = a1; + v130 = 1; + v141 = v67; + a1 = v68; + } +LABEL_202: + v51 = a4 == -1; + v109 = v51 & (a3 != 0); + if ( v109 ) + { + v51 = 0; + if ( a3[2] >= a3[3] ) + { + v84 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + v51 = 0; + if ( v84 ) + v51 = v109; + v85 = 0; + if ( !v84 ) + v85 = a3; + a3 = v85; + } + } + if ( v51 == v141 ) + { +LABEL_204: + if ( !*(_DWORD *)(v117 + 32) || *(_DWORD *)(v117 + 40) ) + { +LABEL_74: + v25 = v110; + v104 = !v110; + goto LABEL_137; + } + goto LABEL_157; + } + if ( a1 && v130 ) + { + v70 = (_BYTE *)a1[2]; + if ( (unsigned int)v70 < a1[3] ) + { + if ( *v70 != **(_BYTE **)(v117 + 36) ) + goto LABEL_204; + v101 = *(_DWORD *)(v117 + 40); + goto LABEL_267; + } + v71 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v93 = 0; + if ( v71 != -1 ) + v93 = a1; + a1 = v93; + } + else + { + LOBYTE(v71) = a2; + } + if ( **(_BYTE **)(v117 + 36) != (_BYTE)v71 ) + goto LABEL_204; + v101 = *(_DWORD *)(v117 + 40); + v70 = (_BYTE *)a1[2]; + if ( (unsigned int)v70 >= a1[3] ) + { + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + goto LABEL_268; + } +LABEL_267: + a1[2] = v70 + 1; +LABEL_268: + a2 = -1; + v25 = 0; + v104 = 1; + v111 = 1; + goto LABEL_137; + } + v139 = a2 == -1; + if ( v139 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v90 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v91 = 0; + if ( !v90 ) + v91 = a1; + v92 = v139 && a1 != 0; + a1 = v91; + if ( !v90 ) + v92 = 0; + v128 = v92; + } + else + { + v128 = 0; + } + } + else + { + v128 = a2 == -1; + } + v43 = a4 == -1; + v108 = v43 & (a3 != 0); + if ( v108 ) + { + v43 = 0; + if ( a3[2] >= a3[3] ) + { + v82 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + v43 = 0; + if ( v82 ) + v43 = v108; + v83 = 0; + if ( !v82 ) + v83 = a3; + a3 = v83; + } + } + if ( v128 == v43 ) + { +LABEL_155: + if ( *(_DWORD *)(v117 + 40) ) + goto LABEL_199; +LABEL_156: + if ( !*(_DWORD *)(v117 + 32) ) + goto LABEL_74; +LABEL_157: + v104 = 1; + v25 = 0; + v111 = 1; + goto LABEL_137; + } + if ( a1 && a2 == -1 ) + { + v66 = (_BYTE *)a1[2]; + if ( (unsigned int)v66 < a1[3] ) + { + if ( **(_BYTE **)(v117 + 28) != *v66 ) + { + if ( *(_DWORD *)(v117 + 40) ) + goto LABEL_253; + goto LABEL_156; + } + v101 = *(_DWORD *)(v117 + 32); + goto LABEL_260; + } + v69 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v94 = 0; + if ( v69 != -1 ) + v94 = a1; + a1 = v94; + } + else + { + LOBYTE(v69) = a2; + } + if ( **(_BYTE **)(v117 + 28) != (_BYTE)v69 ) + goto LABEL_155; + v101 = *(_DWORD *)(v117 + 32); + v66 = (_BYTE *)a1[2]; + if ( (unsigned int)v66 >= a1[3] ) + { + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); +LABEL_261: + a2 = -1; + v25 = 0; +LABEL_198: + v104 = 1; + goto LABEL_137; + } +LABEL_260: + a1[2] = v66 + 1; + goto LABEL_261; + case 4: + while ( 2 ) + { + v132 = a2 == -1; + if ( v132 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v53 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1) == -1; + v54 = 0; + if ( !v53 ) + v54 = a1; + v55 = v132 && a1 != 0; + a1 = v54; + if ( !v53 ) + v55 = 0; + v121 = v55; + } + else + { + v121 = 0; + } + } + else + { + v121 = a2 == -1; + } + v11 = a4 == -1; + v103 = v11 & (a3 != 0); + if ( v103 && (v11 = 0, a3[2] >= a3[3]) ) + { + v34 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + v35 = v103; + if ( !v34 ) + v35 = 0; + v36 = 0; + if ( !v34 ) + v36 = a3; + a3 = v36; + if ( v35 == v121 ) + goto LABEL_117; + } + else if ( v11 == v121 ) + { + goto LABEL_117; + } + if ( a1 && a2 == -1 ) + { + v39 = (char *)a1[2]; + if ( (unsigned int)v39 >= a1[3] ) + { + v56 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v57 = v56 == -1; + v58 = -1; + if ( v56 != -1 ) + v58 = v56; + v59 = 0; + if ( !v57 ) + v59 = a1; + v133 = v58; + a1 = v59; + } + else + { + v133 = *v39; + } + } + else + { + v133 = a2; + } + v12 = memchr((const void *)(v117 + 57), v133, 0xAu); + if ( v12 ) + { + v7 = Block; + v131 = v12[(_DWORD)std::money_base::_S_atoms - 56 - v117]; + v143 = v151; + v8 = 15; + if ( Block != v152 ) + v8 = v152[0]; + v120 = (std::locale::facet *)(v151 + 1); + if ( v151 + 1 > v8 ) + { + std::string::_M_mutate((int)&Block, v151, 0, 0, 1u); + v7 = Block; + } + ++v116; + v7[v143] = v131; + v151 = (size_t)v120; + *((_BYTE *)Block + v143 + 1) = 0; +LABEL_14: + v9 = a1; + v10 = a1[2]; + if ( v10 < a1[3] ) + { +LABEL_15: + v9[2] = v10 + 1; +LABEL_16: + a2 = -1; + continue; + } +LABEL_35: + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + goto LABEL_16; + } + break; + } + v104 = v112 | (*(_BYTE *)(v117 + 17) != (unsigned __int8)v133); + if ( !v104 ) + { + if ( *(int *)(v117 + 44) > 0 ) + { + v40 = v116; + v112 = 1; + v116 = 0; + v97 = v40; + goto LABEL_14; + } + v112 = 0; +LABEL_117: + v104 = 1; +LABEL_118: + if ( !v151 ) + goto LABEL_119; + goto LABEL_136; + } + v13 = *(_BYTE *)(v117 + 16); + if ( !v13 ) + goto LABEL_118; + if ( *(_BYTE *)(v117 + 18) == v133 ) + { + if ( !v112 ) + { + if ( v116 ) + { + v134 = v116; + v14 = v147; + v144 = (size_t)v148; + v15 = 15; + if ( v147 != v149 ) + v15 = v149[0]; + v122 = (std::locale::facet *)((char *)v148 + 1); + if ( (unsigned int)v148 + 1 > v15 ) + { + std::string::_M_mutate((int)&v147, (size_t)v148, 0, 0, 1u); + v14 = v147; + } + v116 = 0; + v14[v144] = v134; + v148 = v122; + *((_BYTE *)v147 + v144 + 1) = 0; + v9 = a1; + v10 = a1[2]; + if ( v10 < a1[3] ) + goto LABEL_15; + goto LABEL_35; + } + v104 = 0; + goto LABEL_118; + } + v13 = v112; + } + v104 = v13; + if ( !v151 ) + goto LABEL_119; +LABEL_136: + v25 = v104 ^ 1; + goto LABEL_137; + default: + v104 = 1; + v25 = 0; + goto LABEL_137; + } + } +} +// 462BCB: variable 'v95' is possibly undefined +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 50C60C: using guessed type signed __int32 std::moneypunct::id; +// 51B094: using guessed type int (*off_51B094)(); + +//----- (00463310) -------------------------------------------------------- +int __thiscall std::money_get>::get( + void *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6) +{ + return (*(int (__thiscall **)(void *, int, int, int, int, _DWORD))(*(_DWORD *)this + 12))(this, a2, a3, a4, a5, a6); +} + +//----- (00463320) -------------------------------------------------------- +int __thiscall std::money_get>::get( + void *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6) +{ + return (*(int (__thiscall **)(void *, int, int, int, int, _DWORD))(*(_DWORD *)this + 8))(this, a2, a3, a4, a5, a6); +} + +//----- (00463330) -------------------------------------------------------- +__int64 __stdcall std::money_get>::do_get( + __int64 a1, + _DWORD *a2, + int a3, + char a4, + int a5, + _DWORD *a6, + int *a7) +{ + __int64 v7; // rax + char v9; // al + void (__thiscall *v10)(_BYTE *, char *, char *, void *); // eax + void *v11; // [esp+28h] [ebp-70h] + char *v12; // [esp+2Ch] [ebp-6Ch] + _BYTE *v13; // [esp+30h] [ebp-68h] + _DWORD *Size; // [esp+34h] [ebp-64h] + char *Block; // [esp+38h] [ebp-60h] + void *v16; // [esp+78h] [ebp-20h] BYREF + _DWORD *v17; // [esp+7Ch] [ebp-1Ch] + char v18[24]; // [esp+80h] [ebp-18h] BYREF + __int64 v19; // [esp+A0h] [ebp+8h] + + v18[0] = 0; + v13 = std::use_facet>(a5 + 108); + v16 = v18; + v17 = 0; + if ( a4 ) + LODWORD(v7) = std::money_get>::_M_extract( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + a5, + a6, + &v16); + else + LODWORD(v7) = std::money_get>::_M_extract( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + a5, + a6, + &v16); + v19 = v7; + Size = v17; + if ( !v17 ) + goto LABEL_4; + std::string::resize(a7, v17, 0); + Block = (char *)v16; + v12 = (char *)v16 + (_DWORD)Size; + v9 = v13[28]; + v11 = (void *)*a7; + if ( v9 != 1 ) + { + if ( !v9 ) + std::ctype::_M_widen_init((int)v13); + v10 = *(void (__thiscall **)(_BYTE *, char *, char *, void *))(*(_DWORD *)v13 + 28); + if ( (char *)v10 == (char *)std::ctype::do_widen ) + { + if ( v12 != Block ) + { +LABEL_14: + memcpy(v11, Block, (size_t)Size); + Block = (char *)v16; + goto LABEL_5; + } + } + else + { + v10(v13, Block, v12, v11); + } +LABEL_4: + Block = (char *)v16; + goto LABEL_5; + } + if ( v12 != v16 ) + goto LABEL_14; +LABEL_5: + if ( Block != v18 ) + operator delete(Block); + return v19; +} +// 4633D6: variable 'v7' is possibly undefined + +//----- (00463540) -------------------------------------------------------- +__int64 __stdcall std::money_get>::do_get( + __int64 a1, + _DWORD *a2, + int a3, + char a4, + int a5, + _DWORD *a6, + long double *a7) +{ + __int64 v7; // rax + void *Block[2]; // [esp+68h] [ebp-20h] BYREF + char v10[24]; // [esp+70h] [ebp-18h] BYREF + __int64 v11; // [esp+90h] [ebp+8h] + + Block[0] = v10; + Block[1] = 0; + v10[0] = 0; + if ( a4 ) + LODWORD(v7) = std::money_get>::_M_extract( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + a5, + a6, + Block); + else + LODWORD(v7) = std::money_get>::_M_extract( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + a5, + a6, + Block); + v11 = v7; + std::locale::facet::_S_get_c_locale(); + std::__convert_to_v((char *)Block[0], a7, a6); + if ( Block[0] != v10 ) + operator delete(Block[0]); + return v11; +} +// 4635D1: variable 'v7' is possibly undefined + +//----- (00463670) -------------------------------------------------------- +_DWORD *__stdcall std::money_get>::_M_extract( + _DWORD *a1, + __int16 a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + char v7; // al + _BYTE *v8; // edx + unsigned int v9; // eax + _DWORD *v10; // ecx + unsigned int v11; // eax + char v12; // al + __int16 v13; // dx + _WORD *v14; // eax + _BYTE *v15; // edx + unsigned int v16; // eax + char v17; // al + int v18; // eax + char v19; // al + __int16 v20; // ax + unsigned int v21; // eax + __int16 *v22; // eax + __int16 v23; // ax + bool v24; // zf + _DWORD *v25; // eax + char v26; // bl + char v27; // al + unsigned __int16 v28; // ax + unsigned int v29; // eax + __int16 *v30; // eax + __int16 v31; // ax + bool v32; // zf + _DWORD *v33; // eax + bool v34; // bl + char v35; // al + unsigned __int16 v36; // ax + unsigned int v37; // eax + char v38; // al + int v39; // edx + bool v40; // al + __int16 v41; // ax + unsigned int v42; // eax + __int16 *v43; // eax + __int16 v44; // ax + bool v45; // zf + _DWORD *v46; // eax + bool v47; // bl + __int16 *v48; // eax + __int16 v49; // ax + bool v50; // zf + _DWORD *v51; // ebx + char v52; // al + _DWORD *v53; // eax + _DWORD *v54; // edx + __int16 *v56; // eax + __int16 v57; // ax + bool v58; // zf + _DWORD *v59; // eax + bool v60; // bl + __int16 *v61; // eax + _DWORD *v62; // eax + char v63; // al + __int16 *v64; // eax + __int16 v65; // ax + bool v66; // zf + _DWORD *v67; // ebx + unsigned __int16 *v68; // eax + _DWORD *v69; // ebx + char v70; // al + __int16 *v71; // eax + __int16 v72; // ax + bool v73; // zf + _DWORD *v74; // ebx + char v75; // al + _BYTE *v76; // eax + unsigned int v77; // edx + __int16 *v78; // eax + _DWORD *v79; // ebx + __int16 *v80; // eax + __int16 v81; // ax + bool v82; // zf + _DWORD *v83; // ebx + __int16 *v84; // eax + _DWORD *v85; // ebx + char v86; // al + unsigned int first_not_of; // eax + __int16 v88; // ax + unsigned int v89; // eax + _DWORD *v90; // eax + __int16 *v91; // eax + __int16 v92; // ax + __int16 *v93; // eax + __int16 v94; // ax + unsigned __int8 v95; // bl + bool v96; // zf + __int16 *v97; // eax + __int16 v98; // ax + bool v99; // zf + _DWORD *v100; // ebx + __int16 *v101; // eax + __int16 v102; // ax + bool v103; // zf + _DWORD *v104; // eax + bool v105; // bl + __int16 *v106; // eax + __int16 v107; // ax + _DWORD *v108; // ebx + unsigned int v109; // eax + __int16 *v110; // eax + _DWORD *v111; // ebx + __int16 *v112; // eax + __int16 v113; // ax + bool v114; // zf + _DWORD *v115; // eax + bool v116; // bl + __int16 *v117; // eax + __int16 v118; // ax + bool v119; // zf + _DWORD *v120; // eax + bool v121; // bl + __int16 *v122; // eax + __int16 v123; // ax + bool v124; // zf + _DWORD *v125; // ebx + unsigned __int16 *v126; // eax + _DWORD *v127; // ebx + __int16 *v128; // eax + __int16 v129; // ax + bool v130; // zf + _DWORD *v131; // ebx + unsigned int v132; // [esp+8h] [ebp-E0h] + std::locale::_Impl *v133; // [esp+1Ch] [ebp-CCh] + char v134; // [esp+20h] [ebp-C8h] + char v135; // [esp+2Ch] [ebp-BCh] + unsigned int v136; // [esp+2Ch] [ebp-BCh] + void *v137; // [esp+30h] [ebp-B8h] + unsigned int v138; // [esp+34h] [ebp-B4h] + int v139; // [esp+3Ch] [ebp-ACh] + int v140; // [esp+3Ch] [ebp-ACh] + bool v141; // [esp+40h] [ebp-A8h] + char v142; // [esp+41h] [ebp-A7h] + bool v143; // [esp+42h] [ebp-A6h] + char v144; // [esp+43h] [ebp-A5h] + char v145; // [esp+44h] [ebp-A4h] + char v146; // [esp+48h] [ebp-A0h] + char v147; // [esp+48h] [ebp-A0h] + unsigned int i; // [esp+48h] [ebp-A0h] + char v149; // [esp+48h] [ebp-A0h] + unsigned int v150; // [esp+48h] [ebp-A0h] + char v151; // [esp+48h] [ebp-A0h] + char v152; // [esp+48h] [ebp-A0h] + int *v153; // [esp+4Ch] [ebp-9Ch] + int v154; // [esp+4Ch] [ebp-9Ch] + size_t v155; // [esp+50h] [ebp-98h] + int v156; // [esp+54h] [ebp-94h] + std::locale::facet *v157; // [esp+58h] [ebp-90h] + std::locale::facet *v158; // [esp+58h] [ebp-90h] + char v159; // [esp+58h] [ebp-90h] + std::locale::facet *v160; // [esp+58h] [ebp-90h] + char v161; // [esp+58h] [ebp-90h] + char v162; // [esp+58h] [ebp-90h] + char v163; // [esp+58h] [ebp-90h] + bool v164; // [esp+58h] [ebp-90h] + char v165; // [esp+58h] [ebp-90h] + char v166; // [esp+58h] [ebp-90h] + bool v167; // [esp+58h] [ebp-90h] + char v169; // [esp+60h] [ebp-88h] + bool v170; // [esp+60h] [ebp-88h] + char v171; // [esp+60h] [ebp-88h] + unsigned __int8 v172; // [esp+60h] [ebp-88h] + bool v173; // [esp+60h] [ebp-88h] + bool v174; // [esp+60h] [ebp-88h] + bool v175; // [esp+60h] [ebp-88h] + bool v176; // [esp+60h] [ebp-88h] + size_t v177; // [esp+60h] [ebp-88h] + char v178; // [esp+60h] [ebp-88h] + size_t v180; // [esp+64h] [ebp-84h] + size_t v181; // [esp+64h] [ebp-84h] + int v183; // [esp+ACh] [ebp-3Ch] + void *v184; // [esp+B0h] [ebp-38h] BYREF + size_t v185; // [esp+B4h] [ebp-34h] + int v186[4]; // [esp+B8h] [ebp-30h] BYREF + void *Block; // [esp+C8h] [ebp-20h] BYREF + size_t v188; // [esp+CCh] [ebp-1Ch] + int v189[5]; // [esp+D0h] [ebp-18h] BYREF + + v137 = std::use_facet>(a5 + 108); + v157 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v153 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)v157); + v156 = *v153; + if ( !*v153 ) + { + v90 = operator new(0x54u); + v90[1] = 0; + *v90 = &off_51B0A4; + v90[2] = 0; + v90[3] = 0; + *((_BYTE *)v90 + 16) = 0; + *(_DWORD *)((char *)v90 + 18) = 0; + v90[6] = 0; + v90[7] = 0; + v90[8] = 0; + v90[9] = 0; + v90[10] = 0; + v90[11] = 0; + v90[12] = 0; + v90[13] = 0; + v90[14] = 0; + *((_BYTE *)v90 + 82) = 0; + v133 = (std::locale::_Impl *)v90; + std::__moneypunct_cache::_M_cache((int)v90, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v133, v157, v132); + v156 = *v153; + } + if ( *(_DWORD *)(v156 + 36) ) + v141 = *(_DWORD *)(v156 + 44) != 0; + else + v141 = 0; + v185 = 0; + v184 = v186; + LOBYTE(v186[0]) = 0; + if ( *(_BYTE *)(v156 + 16) ) + std::string::reserve(&v184, 0x20u); + Block = v189; + v188 = 0; + LOBYTE(v189[0]) = 0; + std::string::reserve(&Block, 0x20u); + v139 = 0; + v144 = 0; + v154 = 0; + v183 = *(_DWORD *)(v156 + 56); + v134 = 0; + v138 = 0; + v142 = 0; + while ( 2 ) + { + switch ( *((_BYTE *)&v183 + v139) ) + { + case 0: + v146 = 1; + goto LABEL_39; + case 1: + v174 = a2 == -1; + if ( v174 && a1 != 0 ) + { + v101 = (__int16 *)a1[2]; + if ( (unsigned int)v101 >= a1[3] ) + v102 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v102 = *v101; + v103 = v102 == -1; + v104 = 0; + if ( !v103 ) + v104 = a1; + v105 = v174 && a1 != 0; + a1 = v104; + if ( !v103 ) + v105 = 0; + v163 = v105; + } + else + { + v163 = a2 == -1; + } + v35 = a4 == -1; + v149 = v35 & (a3 != 0); + if ( v149 ) + { + v97 = (__int16 *)a3[2]; + if ( (unsigned int)v97 >= a3[3] ) + v98 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v98 = *v97; + v99 = v98 == -1; + v35 = 0; + if ( v99 ) + v35 = v149; + v100 = 0; + if ( !v99 ) + v100 = a3; + a3 = v100; + } + v146 = 0; + if ( v35 != v163 ) + { + if ( a1 && a2 == -1 ) + { + v126 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v126 >= a1[3] ) + v36 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v36 = *v126; + v127 = 0; + if ( v36 != 0xFFFF ) + v127 = a1; + a1 = v127; + } + else + { + v36 = a2; + } + v146 = (*(int (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v137 + 8))(v137, 32, v36); + if ( v146 ) + { + v37 = a1[2]; + if ( v37 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v37 + 2; + a2 = -1; + } + } +LABEL_39: + if ( v139 == 3 ) + { + v17 = v146 & (v138 > 1); + goto LABEL_41; + } + while ( 1 ) + { + v173 = a2 == -1; + if ( v173 && a1 != 0 ) + { + v30 = (__int16 *)a1[2]; + if ( (unsigned int)v30 >= a1[3] ) + v31 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v31 = *v30; + v32 = v31 == -1; + v33 = 0; + if ( !v32 ) + v33 = a1; + v34 = v173 && a1 != 0; + a1 = v33; + if ( !v32 ) + v34 = 0; + v162 = v34; + } + else + { + v162 = a2 == -1; + } + v27 = a4 == -1; + v135 = v27 & (a3 != 0); + if ( v135 ) + { + v64 = (__int16 *)a3[2]; + if ( (unsigned int)v64 >= a3[3] ) + v65 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v65 = *v64; + v66 = v65 == -1; + v67 = 0; + v27 = v135; + if ( !v66 ) + v67 = a3; + a3 = v67; + if ( !v66 ) + v27 = 0; + } + if ( v162 == v27 ) + break; + if ( a1 && a2 == -1 ) + { + v68 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v68 >= a1[3] ) + v28 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v28 = *v68; + v69 = 0; + if ( v28 != 0xFFFF ) + v69 = a1; + a1 = v69; + } + else + { + v28 = a2; + } + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v137 + 8))(v137, 32, v28) ) + break; + v29 = a1[2]; + if ( v29 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v29 + 2; + a2 = -1; + } + goto LABEL_157; + case 2: + if ( (*(_BYTE *)(a5 + 13) & 2) != 0 ) + goto LABEL_103; + v38 = v139 == 0 || v138 > 1; + if ( v38 ) + goto LABEL_103; + if ( v139 != 1 ) + { + v146 = 1; + if ( v139 != 2 ) + goto LABEL_158; + if ( HIBYTE(v183) == 4 ) + goto LABEL_103; + v39 = 3; + if ( HIBYTE(v183) == 3 && v141 ) + goto LABEL_103; +LABEL_160: + v139 = v39; + continue; + } + if ( !v141 && (_BYTE)v183 != 3 && BYTE2(v183) != 1 ) + { + v39 = 2; + goto LABEL_160; + } +LABEL_103: + v150 = 0; + v136 = *(_DWORD *)(v156 + 28); + while ( 1 ) + { + v175 = a2 == -1; + if ( v175 && a1 != 0 ) + { + v43 = (__int16 *)a1[2]; + if ( (unsigned int)v43 >= a1[3] ) + v44 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v44 = *v43; + v45 = v44 == -1; + v46 = 0; + if ( !v45 ) + v46 = a1; + v47 = v175 && a1 != 0; + a1 = v46; + if ( !v45 ) + v47 = 0; + v164 = v47; + } + else + { + v164 = a2 == -1; + } + v40 = a4 == -1; + v143 = v40 && a3 != 0; + if ( v143 ) + { + v80 = (__int16 *)a3[2]; + if ( (unsigned int)v80 >= a3[3] ) + v81 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v81 = *v80; + v82 = v81 == -1; + v83 = 0; + v40 = v143; + if ( !v82 ) + v83 = a3; + a3 = v83; + if ( !v82 ) + v40 = 0; + } + v38 = (v150 < v136) & (v164 ^ v40); + if ( !v38 ) + break; + if ( a1 && a2 == -1 ) + { + v84 = (__int16 *)a1[2]; + if ( (unsigned int)v84 >= a1[3] ) + v41 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v41 = *v84; + v85 = 0; + if ( v41 != -1 ) + v85 = a1; + a1 = v85; + } + else + { + v41 = a2; + } + if ( *(_WORD *)(*(_DWORD *)(v156 + 24) + 2 * v150) != v41 ) + goto LABEL_227; + v42 = a1[2]; + if ( v42 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v42 + 2; + ++v150; + a2 = -1; + } + if ( v150 == v136 ) + { +LABEL_247: + v146 = 1; + } + else + { +LABEL_227: + if ( v150 ) + goto LABEL_131; + v146 = (*(_BYTE *)(a5 + 13) & 2) == 0; + v38 = (*(_BYTE *)(a5 + 13) & 2) != 0; + } +LABEL_158: + v39 = v139 + 1; + if ( v139 + 1 <= 3 && !v38 ) + goto LABEL_160; + v17 = v146 & (v138 > 1); +LABEL_41: + if ( v17 ) + { + if ( v142 ) + v18 = *(_DWORD *)(v156 + 40); + else + v18 = *(_DWORD *)(v156 + 32); + v140 = v18; + for ( i = 1; ; ++i ) + { + v172 = a2 == -1; + if ( (v172 & (a1 != 0)) != 0 ) + { + v22 = (__int16 *)a1[2]; + if ( (unsigned int)v22 >= a1[3] ) + v23 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v23 = *v22; + v24 = v23 == -1; + v25 = 0; + if ( !v24 ) + v25 = a1; + v26 = v172 & (a1 != 0); + a1 = v25; + if ( !v24 ) + v26 = 0; + v161 = v26; + } + else + { + v161 = a2 == -1; + } + v19 = a4 == -1; + v145 = v19 & (a3 != 0); + if ( v145 ) + { + v71 = (__int16 *)a3[2]; + if ( (unsigned int)v71 >= a3[3] ) + v72 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v72 = *v71; + v73 = v72 == -1; + v74 = 0; + v19 = v145; + if ( !v73 ) + v74 = a3; + a3 = v74; + if ( !v73 ) + v19 = 0; + if ( i >= v138 ) + { +LABEL_189: + if ( i == v138 ) + { + if ( v188 <= 1 ) + goto LABEL_191; + goto LABEL_236; + } + goto LABEL_132; + } + } + else if ( i >= v138 ) + { + goto LABEL_189; + } + if ( v19 == v161 ) + goto LABEL_189; + if ( a1 && a2 == -1 ) + { + v78 = (__int16 *)a1[2]; + if ( (unsigned int)v78 >= a1[3] ) + v20 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v20 = *v78; + v79 = 0; + if ( v20 != -1 ) + v79 = a1; + a1 = v79; + } + else + { + v20 = a2; + } + if ( *(_WORD *)(v140 + 2 * i) != v20 ) + goto LABEL_132; + v21 = a1[2]; + if ( v21 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v21 + 2; + a2 = -1; + } + } + if ( !v146 ) + { +LABEL_131: + v172 = a2 == -1; + goto LABEL_132; + } + if ( v188 <= 1 ) + goto LABEL_191; +LABEL_236: + first_not_of = std::string::find_first_not_of(&Block, 48, 0); + if ( first_not_of ) + { + if ( first_not_of != -1 ) + goto LABEL_238; + first_not_of = v188 - 1; + if ( !v188 ) + { + v188 = 0; + *(_BYTE *)Block = 0; + goto LABEL_191; + } + if ( v188 != 1 ) + { +LABEL_238: + if ( v188 <= first_not_of ) + first_not_of = v188; + std::string::_M_erase((int *)&Block, 0, first_not_of); + } + } +LABEL_191: + if ( v142 && *(_BYTE *)Block != 48 ) + std::string::_M_replace_aux(&Block, 0, 0, 1u, 45); + v177 = v185; + if ( v185 ) + { + v75 = v134; + if ( !v144 ) + v75 = v154; + v155 = v185 + 1; + v166 = v75; + v76 = v184; + v77 = 15; + if ( v184 != v186 ) + v77 = v186[0]; + if ( v185 + 1 > v77 ) + { + std::string::_M_mutate((int)&v184, v185, 0, 0, 1u); + v76 = v184; + } + v76[v177] = v166; + v185 = v155; + *((_BYTE *)v184 + v177 + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v156 + 8), *(_DWORD *)(v156 + 12), (int)&v184) ) + *a6 |= 4u; + } + v172 = a2 == -1; + if ( v144 && *(_DWORD *)(v156 + 48) != v154 ) + { +LABEL_132: + v53 = a6; + *a6 |= 4u; + } + else + { + v53 = std::string::swap(a7, &Block); + } + if ( (v172 & (a1 != 0)) != 0 ) + { + v93 = (__int16 *)a1[2]; + if ( (unsigned int)v93 >= a1[3] ) + v94 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v94 = *v93; + v95 = v172 & (a1 != 0); + v96 = v94 == -1; + if ( v94 != -1 ) + v95 = 0; + v53 = 0; + if ( !v96 ) + v53 = a1; + v172 = v95; + a1 = v53; + } + LOBYTE(v53) = a4 == -1; + v54 = v53; + if ( a3 && a4 == -1 ) + { + v91 = (__int16 *)a3[2]; + if ( (unsigned int)v91 >= a3[3] ) + v92 = (*(int (__fastcall **)(_DWORD *, _DWORD *))(*a3 + 36))(a3, v54); + else + v92 = *v91; + LOBYTE(v54) = v92 == -1; + } + if ( (_BYTE)v54 == v172 ) + *a6 |= 2u; + if ( Block != v189 ) + operator delete(Block); + if ( v184 != v186 ) + operator delete(v184); + return a1; + case 3: + if ( *(_DWORD *)(v156 + 36) ) + { + v176 = a2 == -1; + if ( v176 && a1 != 0 ) + { + v112 = (__int16 *)a1[2]; + if ( (unsigned int)v112 >= a1[3] ) + v113 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v113 = *v112; + v114 = v113 == -1; + v115 = 0; + if ( !v114 ) + v115 = a1; + v116 = v176 && a1 != 0; + a1 = v115; + if ( !v114 ) + v116 = 0; + v165 = v116; + } + else + { + v165 = a2 == -1; + } + v70 = a4 == -1; + v151 = v70 & (a3 != 0); + if ( v151 ) + { + v122 = (__int16 *)a3[2]; + if ( (unsigned int)v122 >= a3[3] ) + v123 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v123 = *v122; + v124 = v123 == -1; + v70 = 0; + if ( v124 ) + v70 = v151; + v125 = 0; + if ( !v124 ) + v125 = a3; + a3 = v125; + } + if ( v165 != v70 ) + { + if ( a1 && a2 == -1 ) + { + v110 = (__int16 *)a1[2]; + if ( (unsigned int)v110 >= a1[3] ) + v88 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v88 = *v110; + v111 = 0; + if ( v88 != -1 ) + v111 = a1; + a1 = v111; + } + else + { + v88 = a2; + } + if ( **(_WORD **)(v156 + 32) == v88 ) + { + v138 = *(_DWORD *)(v156 + 36); + v89 = a1[2]; + if ( v89 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v89 + 2; + v38 = 0; + a2 = -1; + goto LABEL_247; + } + } + if ( !*(_DWORD *)(v156 + 44) ) + { + if ( !*(_DWORD *)(v156 + 36) ) + goto LABEL_95; +LABEL_181: + v146 = 1; + v38 = 0; + v142 = 1; + goto LABEL_158; + } + } + else if ( !*(_DWORD *)(v156 + 44) ) + { + goto LABEL_95; + } + v167 = a2 == -1; + if ( v167 && a1 != 0 ) + { + v117 = (__int16 *)a1[2]; + if ( (unsigned int)v117 >= a1[3] ) + v118 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v118 = *v117; + v119 = v118 == -1; + v120 = 0; + if ( !v119 ) + v120 = a1; + v121 = v167 && a1 != 0; + a1 = v120; + if ( !v119 ) + v121 = 0; + v178 = v121; + } + else + { + v178 = a2 == -1; + } + v86 = a4 == -1; + v152 = v86 & (a3 != 0); + if ( v152 ) + { + v128 = (__int16 *)a3[2]; + if ( (unsigned int)v128 >= a3[3] ) + v129 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v129 = *v128; + v130 = v129 == -1; + v86 = 0; + if ( v130 ) + v86 = v152; + v131 = 0; + if ( !v130 ) + v131 = a3; + a3 = v131; + } + if ( v178 == v86 ) + goto LABEL_369; + if ( a1 && a2 == -1 ) + { + v106 = (__int16 *)a1[2]; + if ( (unsigned int)v106 >= a1[3] ) + v107 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v107 = *v106; + v108 = 0; + if ( v107 != -1 ) + v108 = a1; + a1 = v108; + } + else + { + v107 = a2; + } + if ( **(_WORD **)(v156 + 40) != v107 ) + { +LABEL_369: + if ( !*(_DWORD *)(v156 + 36) || *(_DWORD *)(v156 + 44) ) + { +LABEL_95: + v38 = v141; + v146 = !v141; + goto LABEL_158; + } + goto LABEL_181; + } + v138 = *(_DWORD *)(v156 + 44); + v109 = a1[2]; + if ( v109 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v109 + 2; + v146 = 1; + v38 = 0; + a2 = -1; + v142 = 1; + goto LABEL_158; + case 4: + while ( 2 ) + { + v170 = a2 == -1; + if ( v170 && a1 != 0 ) + { + v56 = (__int16 *)a1[2]; + if ( (unsigned int)v56 >= a1[3] ) + v57 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v57 = *v56; + v58 = v57 == -1; + v59 = 0; + if ( !v58 ) + v59 = a1; + v60 = v170 && a1 != 0; + a1 = v59; + if ( !v58 ) + v60 = 0; + v159 = v60; + } + else + { + v159 = a2 == -1; + } + v12 = a4 == -1; + v147 = v12 & (a3 != 0); + if ( v147 ) + { + v48 = (__int16 *)a3[2]; + if ( (unsigned int)v48 >= a3[3] ) + v49 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v49 = *v48; + v50 = v49 == -1; + v51 = 0; + v52 = v147; + if ( !v50 ) + v51 = a3; + a3 = v51; + if ( !v50 ) + v52 = 0; + if ( v159 == v52 ) + goto LABEL_129; + } + else if ( v159 == v12 ) + { + goto LABEL_129; + } + if ( a1 && a2 == -1 ) + { + v61 = (__int16 *)a1[2]; + if ( (unsigned int)v61 >= a1[3] ) + v13 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v13 = *v61; + v62 = 0; + if ( v13 != -1 ) + v62 = a1; + a1 = v62; + } + else + { + v13 = a2; + } + v14 = (_WORD *)(v156 + 62); + if ( v13 == *(_WORD *)(v156 + 62) ) + { +LABEL_32: + v15 = Block; + v171 = std::money_base::_S_atoms[((int)v14 - v156 - 60) >> 1]; + v181 = v188; + v16 = 15; + if ( Block != v189 ) + v16 = v189[0]; + v160 = (std::locale::facet *)(v188 + 1); + if ( v188 + 1 > v16 ) + { + std::string::_M_mutate((int)&Block, v188, 0, 0, 1u); + v15 = Block; + } + ++v154; + v15[v181] = v171; + v188 = (size_t)v160; + *((_BYTE *)Block + v181 + 1) = 0; + v10 = a1; + v11 = a1[2]; + if ( v11 >= a1[3] ) + { +LABEL_37: + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + goto LABEL_21; + } +LABEL_20: + v10[2] = v11 + 2; +LABEL_21: + a2 = -1; + continue; + } + break; + } + while ( ++v14 != (_WORD *)(v156 + 82) ) + { + if ( v13 == *v14 ) + goto LABEL_32; + } + v7 = v144 | (*(_WORD *)(v156 + 18) != (unsigned __int16)v13); + if ( v7 ) + { + v146 = *(_BYTE *)(v156 + 16); + if ( !v146 ) + goto LABEL_249; + if ( *(_WORD *)(v156 + 20) == v13 ) + { + if ( !v144 ) + { + if ( v154 ) + { + v169 = v154; + v8 = v184; + v180 = v185; + v9 = 15; + if ( v184 != v186 ) + v9 = v186[0]; + v158 = (std::locale::facet *)(v185 + 1); + if ( v185 + 1 > v9 ) + { + std::string::_M_mutate((int)&v184, v185, 0, 0, 1u); + v8 = v184; + } + v154 = 0; + v8[v180] = v169; + v185 = (size_t)v158; + *((_BYTE *)v184 + v180 + 1) = 0; +LABEL_19: + v10 = a1; + v11 = a1[2]; + if ( v11 >= a1[3] ) + goto LABEL_37; + goto LABEL_20; + } + v146 = 0; + goto LABEL_130; + } + v7 = v144; +LABEL_249: + v146 = v7; + if ( !v188 ) + goto LABEL_131; + goto LABEL_157; + } +LABEL_130: + if ( !v188 ) + goto LABEL_131; +LABEL_157: + v38 = v146 ^ 1; + goto LABEL_158; + } + if ( *(int *)(v156 + 48) > 0 ) + { + v63 = v154; + v144 = 1; + v154 = 0; + v134 = v63; + goto LABEL_19; + } + v144 = 0; +LABEL_129: + v146 = 1; + goto LABEL_130; + default: + v146 = 1; + v38 = 0; + goto LABEL_158; + } + } +} +// 4647EF: variable 'v132' is possibly undefined +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 50C610: using guessed type signed __int32 std::moneypunct::id; +// 51B0A4: using guessed type int (*off_51B0A4)(); + +//----- (00464E70) -------------------------------------------------------- +_DWORD *__stdcall std::money_get>::_M_extract( + _DWORD *a1, + __int16 a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + char v7; // al + _BYTE *v8; // edx + unsigned int v9; // eax + _DWORD *v10; // ecx + unsigned int v11; // eax + char v12; // al + __int16 v13; // dx + _WORD *v14; // eax + _BYTE *v15; // edx + unsigned int v16; // eax + char v17; // al + int v18; // eax + char v19; // al + __int16 v20; // ax + unsigned int v21; // eax + __int16 *v22; // eax + __int16 v23; // ax + bool v24; // zf + _DWORD *v25; // eax + char v26; // bl + char v27; // al + unsigned __int16 v28; // ax + unsigned int v29; // eax + __int16 *v30; // eax + __int16 v31; // ax + bool v32; // zf + _DWORD *v33; // eax + bool v34; // bl + char v35; // al + unsigned __int16 v36; // ax + unsigned int v37; // eax + char v38; // al + int v39; // edx + bool v40; // al + __int16 v41; // ax + unsigned int v42; // eax + __int16 *v43; // eax + __int16 v44; // ax + bool v45; // zf + _DWORD *v46; // eax + bool v47; // bl + __int16 *v48; // eax + __int16 v49; // ax + bool v50; // zf + _DWORD *v51; // ebx + char v52; // al + _DWORD *v53; // eax + _DWORD *v54; // edx + __int16 *v56; // eax + __int16 v57; // ax + bool v58; // zf + _DWORD *v59; // eax + bool v60; // bl + __int16 *v61; // eax + _DWORD *v62; // eax + char v63; // al + __int16 *v64; // eax + __int16 v65; // ax + bool v66; // zf + _DWORD *v67; // ebx + unsigned __int16 *v68; // eax + _DWORD *v69; // ebx + char v70; // al + __int16 *v71; // eax + __int16 v72; // ax + bool v73; // zf + _DWORD *v74; // ebx + char v75; // al + _BYTE *v76; // eax + unsigned int v77; // edx + __int16 *v78; // eax + _DWORD *v79; // ebx + __int16 *v80; // eax + __int16 v81; // ax + bool v82; // zf + _DWORD *v83; // ebx + __int16 *v84; // eax + _DWORD *v85; // ebx + char v86; // al + unsigned int first_not_of; // eax + __int16 v88; // ax + unsigned int v89; // eax + _DWORD *v90; // eax + __int16 *v91; // eax + __int16 v92; // ax + __int16 *v93; // eax + __int16 v94; // ax + unsigned __int8 v95; // bl + bool v96; // zf + __int16 *v97; // eax + __int16 v98; // ax + bool v99; // zf + _DWORD *v100; // ebx + __int16 *v101; // eax + __int16 v102; // ax + bool v103; // zf + _DWORD *v104; // eax + bool v105; // bl + __int16 *v106; // eax + __int16 v107; // ax + _DWORD *v108; // ebx + unsigned int v109; // eax + __int16 *v110; // eax + _DWORD *v111; // ebx + __int16 *v112; // eax + __int16 v113; // ax + bool v114; // zf + _DWORD *v115; // eax + bool v116; // bl + __int16 *v117; // eax + __int16 v118; // ax + bool v119; // zf + _DWORD *v120; // eax + bool v121; // bl + __int16 *v122; // eax + __int16 v123; // ax + bool v124; // zf + _DWORD *v125; // ebx + unsigned __int16 *v126; // eax + _DWORD *v127; // ebx + __int16 *v128; // eax + __int16 v129; // ax + bool v130; // zf + _DWORD *v131; // ebx + unsigned int v132; // [esp+8h] [ebp-E0h] + std::locale::_Impl *v133; // [esp+1Ch] [ebp-CCh] + char v134; // [esp+20h] [ebp-C8h] + char v135; // [esp+2Ch] [ebp-BCh] + unsigned int v136; // [esp+2Ch] [ebp-BCh] + void *v137; // [esp+30h] [ebp-B8h] + unsigned int v138; // [esp+34h] [ebp-B4h] + int v139; // [esp+3Ch] [ebp-ACh] + int v140; // [esp+3Ch] [ebp-ACh] + bool v141; // [esp+40h] [ebp-A8h] + char v142; // [esp+41h] [ebp-A7h] + bool v143; // [esp+42h] [ebp-A6h] + char v144; // [esp+43h] [ebp-A5h] + char v145; // [esp+44h] [ebp-A4h] + char v146; // [esp+48h] [ebp-A0h] + char v147; // [esp+48h] [ebp-A0h] + unsigned int i; // [esp+48h] [ebp-A0h] + char v149; // [esp+48h] [ebp-A0h] + unsigned int v150; // [esp+48h] [ebp-A0h] + char v151; // [esp+48h] [ebp-A0h] + char v152; // [esp+48h] [ebp-A0h] + int *v153; // [esp+4Ch] [ebp-9Ch] + int v154; // [esp+4Ch] [ebp-9Ch] + size_t v155; // [esp+50h] [ebp-98h] + int v156; // [esp+54h] [ebp-94h] + std::locale::facet *v157; // [esp+58h] [ebp-90h] + std::locale::facet *v158; // [esp+58h] [ebp-90h] + char v159; // [esp+58h] [ebp-90h] + std::locale::facet *v160; // [esp+58h] [ebp-90h] + char v161; // [esp+58h] [ebp-90h] + char v162; // [esp+58h] [ebp-90h] + char v163; // [esp+58h] [ebp-90h] + bool v164; // [esp+58h] [ebp-90h] + char v165; // [esp+58h] [ebp-90h] + char v166; // [esp+58h] [ebp-90h] + bool v167; // [esp+58h] [ebp-90h] + char v169; // [esp+60h] [ebp-88h] + bool v170; // [esp+60h] [ebp-88h] + char v171; // [esp+60h] [ebp-88h] + unsigned __int8 v172; // [esp+60h] [ebp-88h] + bool v173; // [esp+60h] [ebp-88h] + bool v174; // [esp+60h] [ebp-88h] + bool v175; // [esp+60h] [ebp-88h] + bool v176; // [esp+60h] [ebp-88h] + size_t v177; // [esp+60h] [ebp-88h] + char v178; // [esp+60h] [ebp-88h] + size_t v180; // [esp+64h] [ebp-84h] + size_t v181; // [esp+64h] [ebp-84h] + int v183; // [esp+ACh] [ebp-3Ch] + void *v184; // [esp+B0h] [ebp-38h] BYREF + size_t v185; // [esp+B4h] [ebp-34h] + int v186[4]; // [esp+B8h] [ebp-30h] BYREF + void *Block; // [esp+C8h] [ebp-20h] BYREF + size_t v188; // [esp+CCh] [ebp-1Ch] + int v189[5]; // [esp+D0h] [ebp-18h] BYREF + + v137 = std::use_facet>(a5 + 108); + v157 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v153 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)v157); + v156 = *v153; + if ( !*v153 ) + { + v90 = operator new(0x54u); + v90[1] = 0; + *v90 = &off_51B0B4; + v90[2] = 0; + v90[3] = 0; + *((_BYTE *)v90 + 16) = 0; + *(_DWORD *)((char *)v90 + 18) = 0; + v90[6] = 0; + v90[7] = 0; + v90[8] = 0; + v90[9] = 0; + v90[10] = 0; + v90[11] = 0; + v90[12] = 0; + v90[13] = 0; + v90[14] = 0; + *((_BYTE *)v90 + 82) = 0; + v133 = (std::locale::_Impl *)v90; + std::__moneypunct_cache::_M_cache((int)v90, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v133, v157, v132); + v156 = *v153; + } + if ( *(_DWORD *)(v156 + 36) ) + v141 = *(_DWORD *)(v156 + 44) != 0; + else + v141 = 0; + v185 = 0; + v184 = v186; + LOBYTE(v186[0]) = 0; + if ( *(_BYTE *)(v156 + 16) ) + std::string::reserve(&v184, 0x20u); + Block = v189; + v188 = 0; + LOBYTE(v189[0]) = 0; + std::string::reserve(&Block, 0x20u); + v139 = 0; + v144 = 0; + v154 = 0; + v183 = *(_DWORD *)(v156 + 56); + v134 = 0; + v138 = 0; + v142 = 0; + while ( 2 ) + { + switch ( *((_BYTE *)&v183 + v139) ) + { + case 0: + v146 = 1; + goto LABEL_39; + case 1: + v174 = a2 == -1; + if ( v174 && a1 != 0 ) + { + v101 = (__int16 *)a1[2]; + if ( (unsigned int)v101 >= a1[3] ) + v102 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v102 = *v101; + v103 = v102 == -1; + v104 = 0; + if ( !v103 ) + v104 = a1; + v105 = v174 && a1 != 0; + a1 = v104; + if ( !v103 ) + v105 = 0; + v163 = v105; + } + else + { + v163 = a2 == -1; + } + v35 = a4 == -1; + v149 = v35 & (a3 != 0); + if ( v149 ) + { + v97 = (__int16 *)a3[2]; + if ( (unsigned int)v97 >= a3[3] ) + v98 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v98 = *v97; + v99 = v98 == -1; + v35 = 0; + if ( v99 ) + v35 = v149; + v100 = 0; + if ( !v99 ) + v100 = a3; + a3 = v100; + } + v146 = 0; + if ( v35 != v163 ) + { + if ( a1 && a2 == -1 ) + { + v126 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v126 >= a1[3] ) + v36 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v36 = *v126; + v127 = 0; + if ( v36 != 0xFFFF ) + v127 = a1; + a1 = v127; + } + else + { + v36 = a2; + } + v146 = (*(int (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v137 + 8))(v137, 32, v36); + if ( v146 ) + { + v37 = a1[2]; + if ( v37 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v37 + 2; + a2 = -1; + } + } +LABEL_39: + if ( v139 == 3 ) + { + v17 = v146 & (v138 > 1); + goto LABEL_41; + } + while ( 1 ) + { + v173 = a2 == -1; + if ( v173 && a1 != 0 ) + { + v30 = (__int16 *)a1[2]; + if ( (unsigned int)v30 >= a1[3] ) + v31 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v31 = *v30; + v32 = v31 == -1; + v33 = 0; + if ( !v32 ) + v33 = a1; + v34 = v173 && a1 != 0; + a1 = v33; + if ( !v32 ) + v34 = 0; + v162 = v34; + } + else + { + v162 = a2 == -1; + } + v27 = a4 == -1; + v135 = v27 & (a3 != 0); + if ( v135 ) + { + v64 = (__int16 *)a3[2]; + if ( (unsigned int)v64 >= a3[3] ) + v65 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v65 = *v64; + v66 = v65 == -1; + v67 = 0; + v27 = v135; + if ( !v66 ) + v67 = a3; + a3 = v67; + if ( !v66 ) + v27 = 0; + } + if ( v162 == v27 ) + break; + if ( a1 && a2 == -1 ) + { + v68 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v68 >= a1[3] ) + v28 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v28 = *v68; + v69 = 0; + if ( v28 != 0xFFFF ) + v69 = a1; + a1 = v69; + } + else + { + v28 = a2; + } + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v137 + 8))(v137, 32, v28) ) + break; + v29 = a1[2]; + if ( v29 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v29 + 2; + a2 = -1; + } + goto LABEL_157; + case 2: + if ( (*(_BYTE *)(a5 + 13) & 2) != 0 ) + goto LABEL_103; + v38 = v139 == 0 || v138 > 1; + if ( v38 ) + goto LABEL_103; + if ( v139 != 1 ) + { + v146 = 1; + if ( v139 != 2 ) + goto LABEL_158; + if ( HIBYTE(v183) == 4 ) + goto LABEL_103; + v39 = 3; + if ( HIBYTE(v183) == 3 && v141 ) + goto LABEL_103; +LABEL_160: + v139 = v39; + continue; + } + if ( !v141 && (_BYTE)v183 != 3 && BYTE2(v183) != 1 ) + { + v39 = 2; + goto LABEL_160; + } +LABEL_103: + v150 = 0; + v136 = *(_DWORD *)(v156 + 28); + while ( 1 ) + { + v175 = a2 == -1; + if ( v175 && a1 != 0 ) + { + v43 = (__int16 *)a1[2]; + if ( (unsigned int)v43 >= a1[3] ) + v44 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v44 = *v43; + v45 = v44 == -1; + v46 = 0; + if ( !v45 ) + v46 = a1; + v47 = v175 && a1 != 0; + a1 = v46; + if ( !v45 ) + v47 = 0; + v164 = v47; + } + else + { + v164 = a2 == -1; + } + v40 = a4 == -1; + v143 = v40 && a3 != 0; + if ( v143 ) + { + v80 = (__int16 *)a3[2]; + if ( (unsigned int)v80 >= a3[3] ) + v81 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v81 = *v80; + v82 = v81 == -1; + v83 = 0; + v40 = v143; + if ( !v82 ) + v83 = a3; + a3 = v83; + if ( !v82 ) + v40 = 0; + } + v38 = (v150 < v136) & (v164 ^ v40); + if ( !v38 ) + break; + if ( a1 && a2 == -1 ) + { + v84 = (__int16 *)a1[2]; + if ( (unsigned int)v84 >= a1[3] ) + v41 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v41 = *v84; + v85 = 0; + if ( v41 != -1 ) + v85 = a1; + a1 = v85; + } + else + { + v41 = a2; + } + if ( *(_WORD *)(*(_DWORD *)(v156 + 24) + 2 * v150) != v41 ) + goto LABEL_227; + v42 = a1[2]; + if ( v42 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v42 + 2; + ++v150; + a2 = -1; + } + if ( v150 == v136 ) + { +LABEL_247: + v146 = 1; + } + else + { +LABEL_227: + if ( v150 ) + goto LABEL_131; + v146 = (*(_BYTE *)(a5 + 13) & 2) == 0; + v38 = (*(_BYTE *)(a5 + 13) & 2) != 0; + } +LABEL_158: + v39 = v139 + 1; + if ( v139 + 1 <= 3 && !v38 ) + goto LABEL_160; + v17 = v146 & (v138 > 1); +LABEL_41: + if ( v17 ) + { + if ( v142 ) + v18 = *(_DWORD *)(v156 + 40); + else + v18 = *(_DWORD *)(v156 + 32); + v140 = v18; + for ( i = 1; ; ++i ) + { + v172 = a2 == -1; + if ( (v172 & (a1 != 0)) != 0 ) + { + v22 = (__int16 *)a1[2]; + if ( (unsigned int)v22 >= a1[3] ) + v23 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v23 = *v22; + v24 = v23 == -1; + v25 = 0; + if ( !v24 ) + v25 = a1; + v26 = v172 & (a1 != 0); + a1 = v25; + if ( !v24 ) + v26 = 0; + v161 = v26; + } + else + { + v161 = a2 == -1; + } + v19 = a4 == -1; + v145 = v19 & (a3 != 0); + if ( v145 ) + { + v71 = (__int16 *)a3[2]; + if ( (unsigned int)v71 >= a3[3] ) + v72 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v72 = *v71; + v73 = v72 == -1; + v74 = 0; + v19 = v145; + if ( !v73 ) + v74 = a3; + a3 = v74; + if ( !v73 ) + v19 = 0; + if ( i >= v138 ) + { +LABEL_189: + if ( i == v138 ) + { + if ( v188 <= 1 ) + goto LABEL_191; + goto LABEL_236; + } + goto LABEL_132; + } + } + else if ( i >= v138 ) + { + goto LABEL_189; + } + if ( v19 == v161 ) + goto LABEL_189; + if ( a1 && a2 == -1 ) + { + v78 = (__int16 *)a1[2]; + if ( (unsigned int)v78 >= a1[3] ) + v20 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v20 = *v78; + v79 = 0; + if ( v20 != -1 ) + v79 = a1; + a1 = v79; + } + else + { + v20 = a2; + } + if ( *(_WORD *)(v140 + 2 * i) != v20 ) + goto LABEL_132; + v21 = a1[2]; + if ( v21 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v21 + 2; + a2 = -1; + } + } + if ( !v146 ) + { +LABEL_131: + v172 = a2 == -1; + goto LABEL_132; + } + if ( v188 <= 1 ) + goto LABEL_191; +LABEL_236: + first_not_of = std::string::find_first_not_of(&Block, 48, 0); + if ( first_not_of ) + { + if ( first_not_of != -1 ) + goto LABEL_238; + first_not_of = v188 - 1; + if ( !v188 ) + { + v188 = 0; + *(_BYTE *)Block = 0; + goto LABEL_191; + } + if ( v188 != 1 ) + { +LABEL_238: + if ( v188 <= first_not_of ) + first_not_of = v188; + std::string::_M_erase((int *)&Block, 0, first_not_of); + } + } +LABEL_191: + if ( v142 && *(_BYTE *)Block != 48 ) + std::string::_M_replace_aux(&Block, 0, 0, 1u, 45); + v177 = v185; + if ( v185 ) + { + v75 = v134; + if ( !v144 ) + v75 = v154; + v155 = v185 + 1; + v166 = v75; + v76 = v184; + v77 = 15; + if ( v184 != v186 ) + v77 = v186[0]; + if ( v185 + 1 > v77 ) + { + std::string::_M_mutate((int)&v184, v185, 0, 0, 1u); + v76 = v184; + } + v76[v177] = v166; + v185 = v155; + *((_BYTE *)v184 + v177 + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v156 + 8), *(_DWORD *)(v156 + 12), (int)&v184) ) + *a6 |= 4u; + } + v172 = a2 == -1; + if ( v144 && *(_DWORD *)(v156 + 48) != v154 ) + { +LABEL_132: + v53 = a6; + *a6 |= 4u; + } + else + { + v53 = std::string::swap(a7, &Block); + } + if ( (v172 & (a1 != 0)) != 0 ) + { + v93 = (__int16 *)a1[2]; + if ( (unsigned int)v93 >= a1[3] ) + v94 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v94 = *v93; + v95 = v172 & (a1 != 0); + v96 = v94 == -1; + if ( v94 != -1 ) + v95 = 0; + v53 = 0; + if ( !v96 ) + v53 = a1; + v172 = v95; + a1 = v53; + } + LOBYTE(v53) = a4 == -1; + v54 = v53; + if ( a3 && a4 == -1 ) + { + v91 = (__int16 *)a3[2]; + if ( (unsigned int)v91 >= a3[3] ) + v92 = (*(int (__fastcall **)(_DWORD *, _DWORD *))(*a3 + 36))(a3, v54); + else + v92 = *v91; + LOBYTE(v54) = v92 == -1; + } + if ( (_BYTE)v54 == v172 ) + *a6 |= 2u; + if ( Block != v189 ) + operator delete(Block); + if ( v184 != v186 ) + operator delete(v184); + return a1; + case 3: + if ( *(_DWORD *)(v156 + 36) ) + { + v176 = a2 == -1; + if ( v176 && a1 != 0 ) + { + v112 = (__int16 *)a1[2]; + if ( (unsigned int)v112 >= a1[3] ) + v113 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v113 = *v112; + v114 = v113 == -1; + v115 = 0; + if ( !v114 ) + v115 = a1; + v116 = v176 && a1 != 0; + a1 = v115; + if ( !v114 ) + v116 = 0; + v165 = v116; + } + else + { + v165 = a2 == -1; + } + v70 = a4 == -1; + v151 = v70 & (a3 != 0); + if ( v151 ) + { + v122 = (__int16 *)a3[2]; + if ( (unsigned int)v122 >= a3[3] ) + v123 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v123 = *v122; + v124 = v123 == -1; + v70 = 0; + if ( v124 ) + v70 = v151; + v125 = 0; + if ( !v124 ) + v125 = a3; + a3 = v125; + } + if ( v165 != v70 ) + { + if ( a1 && a2 == -1 ) + { + v110 = (__int16 *)a1[2]; + if ( (unsigned int)v110 >= a1[3] ) + v88 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v88 = *v110; + v111 = 0; + if ( v88 != -1 ) + v111 = a1; + a1 = v111; + } + else + { + v88 = a2; + } + if ( **(_WORD **)(v156 + 32) == v88 ) + { + v138 = *(_DWORD *)(v156 + 36); + v89 = a1[2]; + if ( v89 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v89 + 2; + v38 = 0; + a2 = -1; + goto LABEL_247; + } + } + if ( !*(_DWORD *)(v156 + 44) ) + { + if ( !*(_DWORD *)(v156 + 36) ) + goto LABEL_95; +LABEL_181: + v146 = 1; + v38 = 0; + v142 = 1; + goto LABEL_158; + } + } + else if ( !*(_DWORD *)(v156 + 44) ) + { + goto LABEL_95; + } + v167 = a2 == -1; + if ( v167 && a1 != 0 ) + { + v117 = (__int16 *)a1[2]; + if ( (unsigned int)v117 >= a1[3] ) + v118 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v118 = *v117; + v119 = v118 == -1; + v120 = 0; + if ( !v119 ) + v120 = a1; + v121 = v167 && a1 != 0; + a1 = v120; + if ( !v119 ) + v121 = 0; + v178 = v121; + } + else + { + v178 = a2 == -1; + } + v86 = a4 == -1; + v152 = v86 & (a3 != 0); + if ( v152 ) + { + v128 = (__int16 *)a3[2]; + if ( (unsigned int)v128 >= a3[3] ) + v129 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v129 = *v128; + v130 = v129 == -1; + v86 = 0; + if ( v130 ) + v86 = v152; + v131 = 0; + if ( !v130 ) + v131 = a3; + a3 = v131; + } + if ( v178 == v86 ) + goto LABEL_369; + if ( a1 && a2 == -1 ) + { + v106 = (__int16 *)a1[2]; + if ( (unsigned int)v106 >= a1[3] ) + v107 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v107 = *v106; + v108 = 0; + if ( v107 != -1 ) + v108 = a1; + a1 = v108; + } + else + { + v107 = a2; + } + if ( **(_WORD **)(v156 + 40) != v107 ) + { +LABEL_369: + if ( !*(_DWORD *)(v156 + 36) || *(_DWORD *)(v156 + 44) ) + { +LABEL_95: + v38 = v141; + v146 = !v141; + goto LABEL_158; + } + goto LABEL_181; + } + v138 = *(_DWORD *)(v156 + 44); + v109 = a1[2]; + if ( v109 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v109 + 2; + v146 = 1; + v38 = 0; + a2 = -1; + v142 = 1; + goto LABEL_158; + case 4: + while ( 2 ) + { + v170 = a2 == -1; + if ( v170 && a1 != 0 ) + { + v56 = (__int16 *)a1[2]; + if ( (unsigned int)v56 >= a1[3] ) + v57 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v57 = *v56; + v58 = v57 == -1; + v59 = 0; + if ( !v58 ) + v59 = a1; + v60 = v170 && a1 != 0; + a1 = v59; + if ( !v58 ) + v60 = 0; + v159 = v60; + } + else + { + v159 = a2 == -1; + } + v12 = a4 == -1; + v147 = v12 & (a3 != 0); + if ( v147 ) + { + v48 = (__int16 *)a3[2]; + if ( (unsigned int)v48 >= a3[3] ) + v49 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v49 = *v48; + v50 = v49 == -1; + v51 = 0; + v52 = v147; + if ( !v50 ) + v51 = a3; + a3 = v51; + if ( !v50 ) + v52 = 0; + if ( v159 == v52 ) + goto LABEL_129; + } + else if ( v159 == v12 ) + { + goto LABEL_129; + } + if ( a1 && a2 == -1 ) + { + v61 = (__int16 *)a1[2]; + if ( (unsigned int)v61 >= a1[3] ) + v13 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v13 = *v61; + v62 = 0; + if ( v13 != -1 ) + v62 = a1; + a1 = v62; + } + else + { + v13 = a2; + } + v14 = (_WORD *)(v156 + 62); + if ( v13 == *(_WORD *)(v156 + 62) ) + { +LABEL_32: + v15 = Block; + v171 = std::money_base::_S_atoms[((int)v14 - v156 - 60) >> 1]; + v181 = v188; + v16 = 15; + if ( Block != v189 ) + v16 = v189[0]; + v160 = (std::locale::facet *)(v188 + 1); + if ( v188 + 1 > v16 ) + { + std::string::_M_mutate((int)&Block, v188, 0, 0, 1u); + v15 = Block; + } + ++v154; + v15[v181] = v171; + v188 = (size_t)v160; + *((_BYTE *)Block + v181 + 1) = 0; + v10 = a1; + v11 = a1[2]; + if ( v11 >= a1[3] ) + { +LABEL_37: + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + goto LABEL_21; + } +LABEL_20: + v10[2] = v11 + 2; +LABEL_21: + a2 = -1; + continue; + } + break; + } + while ( ++v14 != (_WORD *)(v156 + 82) ) + { + if ( v13 == *v14 ) + goto LABEL_32; + } + v7 = v144 | (*(_WORD *)(v156 + 18) != (unsigned __int16)v13); + if ( v7 ) + { + v146 = *(_BYTE *)(v156 + 16); + if ( !v146 ) + goto LABEL_249; + if ( *(_WORD *)(v156 + 20) == v13 ) + { + if ( !v144 ) + { + if ( v154 ) + { + v169 = v154; + v8 = v184; + v180 = v185; + v9 = 15; + if ( v184 != v186 ) + v9 = v186[0]; + v158 = (std::locale::facet *)(v185 + 1); + if ( v185 + 1 > v9 ) + { + std::string::_M_mutate((int)&v184, v185, 0, 0, 1u); + v8 = v184; + } + v154 = 0; + v8[v180] = v169; + v185 = (size_t)v158; + *((_BYTE *)v184 + v180 + 1) = 0; +LABEL_19: + v10 = a1; + v11 = a1[2]; + if ( v11 >= a1[3] ) + goto LABEL_37; + goto LABEL_20; + } + v146 = 0; + goto LABEL_130; + } + v7 = v144; +LABEL_249: + v146 = v7; + if ( !v188 ) + goto LABEL_131; + goto LABEL_157; + } +LABEL_130: + if ( !v188 ) + goto LABEL_131; +LABEL_157: + v38 = v146 ^ 1; + goto LABEL_158; + } + if ( *(int *)(v156 + 48) > 0 ) + { + v63 = v154; + v144 = 1; + v154 = 0; + v134 = v63; + goto LABEL_19; + } + v144 = 0; +LABEL_129: + v146 = 1; + goto LABEL_130; + default: + v146 = 1; + v38 = 0; + goto LABEL_158; + } + } +} +// 465FEF: variable 'v132' is possibly undefined +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 50C614: using guessed type signed __int32 std::moneypunct::id; +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (00466670) -------------------------------------------------------- +int __thiscall std::money_get>::get( + void *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6) +{ + return (*(int (__thiscall **)(void *, int, int, int, int, _DWORD))(*(_DWORD *)this + 12))(this, a2, a3, a4, a5, a6); +} + +//----- (00466680) -------------------------------------------------------- +int __thiscall std::money_get>::get( + void *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6) +{ + return (*(int (__thiscall **)(void *, int, int, int, int, _DWORD))(*(_DWORD *)this + 8))(this, a2, a3, a4, a5, a6); +} + +//----- (00466690) -------------------------------------------------------- +struct _Unwind_Exception *__stdcall std::money_get>::do_get( + _DWORD *a1, + __int16 a2, + _DWORD *a3, + __int16 a4, + char a5, + int a6, + _DWORD *a7, + int *a8) +{ + struct _Unwind_Exception *v8; // eax + void *v10; // [esp+20h] [ebp-78h] + unsigned int v11; // [esp+28h] [ebp-70h] + struct _Unwind_Exception *lpuexcpt; // [esp+30h] [ebp-68h] + void *Block; // [esp+78h] [ebp-20h] BYREF + unsigned int v14; // [esp+7Ch] [ebp-1Ch] + char v15[20]; // [esp+80h] [ebp-18h] BYREF + + v15[0] = 0; + v10 = std::use_facet>(a6 + 108); + Block = v15; + v14 = 0; + if ( a5 ) + v8 = (struct _Unwind_Exception *)std::money_get>::_M_extract( + a1, + a2, + a3, + a4, + a6, + a7, + &Block); + else + v8 = (struct _Unwind_Exception *)std::money_get>::_M_extract( + a1, + a2, + a3, + a4, + a6, + a7, + &Block); + lpuexcpt = v8; + v11 = v14; + if ( v14 ) + { + std::wstring::resize(a8, v14, 0); + (*(void (__thiscall **)(void *, void *, char *, _DWORD))(*(_DWORD *)v10 + 44))(v10, Block, (char *)Block + v11, *a8); + } + if ( Block != v15 ) + operator delete(Block); + return lpuexcpt; +} + +//----- (00466860) -------------------------------------------------------- +struct _Unwind_Exception *__stdcall std::money_get>::do_get( + _DWORD *a1, + __int16 a2, + _DWORD *a3, + __int16 a4, + char a5, + int a6, + _DWORD *a7, + long double *a8) +{ + struct _Unwind_Exception *v8; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+30h] [ebp-68h] + void *Block[2]; // [esp+78h] [ebp-20h] BYREF + char v12[20]; // [esp+80h] [ebp-18h] BYREF + + Block[0] = v12; + Block[1] = 0; + v12[0] = 0; + if ( a5 ) + v8 = (struct _Unwind_Exception *)std::money_get>::_M_extract( + a1, + a2, + a3, + a4, + a6, + a7, + Block); + else + v8 = (struct _Unwind_Exception *)std::money_get>::_M_extract( + a1, + a2, + a3, + a4, + a6, + a7, + Block); + lpuexcpt = v8; + std::locale::facet::_S_get_c_locale(); + std::__convert_to_v((char *)Block[0], a8, a7); + if ( Block[0] != v12 ) + operator delete(Block[0]); + return lpuexcpt; +} + +//----- (004669D0) -------------------------------------------------------- +int __thiscall std::money_put>::put( + void *this, + __int64 a2, + unsigned __int8 a3, + int a4, + char a5, + int a6) +{ + __int64 (__stdcall *v6)(__int64, char, int, char, int); // edx + + v6 = *(__int64 (__stdcall **)(__int64, char, int, char, int))(*(_DWORD *)this + 12); + if ( v6 != std::money_put>::do_put ) + return ((int (__stdcall *)(_DWORD, _DWORD, _DWORD, int, _DWORD, int))v6)(a2, HIDWORD(a2), a3, a4, a5, a6); + if ( a3 ) + return std::money_put>::_M_insert(a2, a4, a5, a6); + return std::money_put>::_M_insert(a2, a4, a5, a6); +} + +//----- (00466A70) -------------------------------------------------------- +int __thiscall std::money_put>::put( + void *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + char a6) +{ + return (*(int (__thiscall **)(void *, int, int, _DWORD, int, _DWORD))(*(_DWORD *)this + 8))(this, a2, a3, a4, a5, a6); +} + +//----- (00466A90) -------------------------------------------------------- +__int64 __stdcall std::money_put>::do_put( + __int64 a1, + char a2, + int a3, + char a4, + int a5) +{ + if ( a2 ) + return std::money_put>::_M_insert(a1, a3, a4, a5); + else + return std::money_put>::_M_insert(a1, a3, a4, a5); +} + +//----- (00466B00) -------------------------------------------------------- +__int64 __thiscall std::money_put>::do_put( + void *this, + __int64 a2, + int a3, + int a4, + int a5, + long double a6) +{ + void *v6; // esp + void *v7; // esp + int v8; // eax + int v9; // eax + void *v10; // esp + void *v11; // esp + char v12; // al + void (__thiscall *v13)(_BYTE *, void *, char *, void *); // eax + __int64 v14; // rax + const std::locale *v16[22]; // [esp-30h] [ebp-D8h] BYREF + void *v17; // [esp+28h] [ebp-80h] + char *v18; // [esp+2Ch] [ebp-7Ch] + int v19; // [esp+30h] [ebp-78h] + int v20; // [esp+34h] [ebp-74h] + void *v21; // [esp+38h] [ebp-70h] + _BYTE *v22; // [esp+3Ch] [ebp-6Ch] + __int64 Size; // [esp+40h] [ebp-68h] + void *Src; // [esp+48h] [ebp-60h] + _DWORD *v25; // [esp+84h] [ebp-24h] BYREF + void *Block[2]; // [esp+88h] [ebp-20h] BYREF + char v27[24]; // [esp+90h] [ebp-18h] BYREF + + v21 = this; + v20 = a3; + v19 = a5; + std::locale::locale((volatile signed __int32 **)&v25, (volatile signed __int32 **)(a4 + 108), v16[13]); + v22 = std::use_facet>((int)&v25); + v6 = alloca(80); + v7 = alloca(80); + LODWORD(Size) = v16; + Src = v16; + Block[0] = (void *)std::locale::facet::_S_get_c_locale(); + v8 = std::__convert_from_v((int *const *)Block, (char *)Size, 64, "%.*Lf", 0, a6); + LODWORD(Size) = v8; + if ( v8 > 63 ) + { + LODWORD(Size) = v8 + 1; + v9 = 16 * ((unsigned int)(v8 + 28) >> 4); + v10 = alloca(v9); + v11 = alloca(v9); + v18 = (char *)v16; + Src = v16; + Block[0] = (void *)std::locale::facet::_S_get_c_locale(); + LODWORD(Size) = std::__convert_from_v((int *const *)Block, v18, Size, "%.*Lf", 0, a6); + } + Block[0] = v27; + std::string::_M_construct(Block, Size, 0); + v12 = v22[28]; + v17 = Block[0]; + v18 = (char *)Src + Size; + if ( v12 == 1 ) + { + if ( (char *)Src + (_DWORD)Size != Src ) +LABEL_7: + memcpy(v17, Src, Size); + } + else + { + if ( v12 ) + { + v13 = *(void (__thiscall **)(_BYTE *, void *, char *, void *))(*(_DWORD *)v22 + 28); + if ( (char *)v13 == (char *)std::ctype::do_widen ) + goto LABEL_6; + } + else + { + std::ctype::_M_widen_init((int)v22); + v13 = *(void (__thiscall **)(_BYTE *, void *, char *, void *))(*(_DWORD *)v22 + 28); + if ( (char *)v13 == (char *)std::ctype::do_widen ) + { +LABEL_6: + if ( v18 == Src ) + goto LABEL_8; + goto LABEL_7; + } + } + v13(v22, Src, v18, v17); + } +LABEL_8: + if ( (_BYTE)v20 ) + v14 = std::money_put>::_M_insert(a2, a4, v19, (int)Block); + else + v14 = std::money_put>::_M_insert(a2, a4, v19, (int)Block); + Size = v14; + if ( Block[0] != v27 ) + operator delete(Block[0]); + std::locale::~locale(&v25); + return Size; +} + +//----- (00466E10) -------------------------------------------------------- +__int64 __stdcall std::money_put>::_M_insert( + __int64 a1, + int a2, + char a3, + int a4) +{ + int v4; // ecx + char *v5; // ebx + struct _Unwind_Exception *v6; // eax + unsigned __int8 *v7; // ecx + int v9; // eax + bool v10; // sf + size_t v11; // eax + _BYTE *v12; // eax + bool v13; // dl + _BYTE *v14; // edx + unsigned int v15; // eax + size_t v16; // edx + int v17; // edx + int *v18; // eax + char v19; // bl + int v20; // edx + int v21; // ebx + _BYTE *v22; // edx + size_t v23; // eax + size_t v24; // edx + _BYTE *v25; // edx + unsigned int v26; // eax + _WORD *v27; // eax + unsigned int v28; // [esp+8h] [ebp-E0h] + size_t v29; // [esp+8h] [ebp-E0h] + int v30; // [esp+20h] [ebp-C8h] + char v31; // [esp+24h] [ebp-C4h] + int v32; // [esp+24h] [ebp-C4h] + std::locale::_Impl *v33; // [esp+28h] [ebp-C0h] + int v34; // [esp+2Ch] [ebp-BCh] + int v35; // [esp+2Ch] [ebp-BCh] + size_t v36; // [esp+30h] [ebp-B8h] + size_t v37; // [esp+30h] [ebp-B8h] + char v38; // [esp+34h] [ebp-B4h] + size_t v39; // [esp+38h] [ebp-B0h] + bool v40; // [esp+38h] [ebp-B0h] + signed int v41; // [esp+3Ch] [ebp-ACh] + int v42; // [esp+3Ch] [ebp-ACh] + int *v43; // [esp+40h] [ebp-A8h] + char *v44; // [esp+40h] [ebp-A8h] + std::locale::facet *v45; // [esp+4Ch] [ebp-9Ch] + std::locale::facet *v46; // [esp+4Ch] [ebp-9Ch] + _DWORD *v47; // [esp+50h] [ebp-98h] + size_t v48; // [esp+50h] [ebp-98h] + size_t v49; // [esp+50h] [ebp-98h] + __int64 v50; // [esp+54h] [ebp-94h] + int v51; // [esp+5Ch] [ebp-8Ch] + struct _Unwind_Exception *lpuexcpt; // [esp+60h] [ebp-88h] + struct _Unwind_Exception *lpuexcpta; // [esp+60h] [ebp-88h] + void **lpuexcptb; // [esp+60h] [ebp-88h] + char lpuexcptc; // [esp+60h] [ebp-88h] + int v56; // [esp+ACh] [ebp-3Ch] BYREF + void *v57; // [esp+B0h] [ebp-38h] BYREF + size_t v58; // [esp+B4h] [ebp-34h] + int v59[4]; // [esp+B8h] [ebp-30h] BYREF + void *Block; // [esp+C8h] [ebp-20h] BYREF + int v61; // [esp+CCh] [ebp-1Ch] + int v62[5]; // [esp+D0h] [ebp-18h] BYREF + + v50 = a1; + v47 = std::use_facet>(a2 + 108); + v45 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v43 = (int *)(*(_DWORD *)(*(_DWORD *)(a2 + 108) + 12) + 4 * (_DWORD)v45); + v51 = *v43; + if ( !*v43 ) + { + v27 = operator new(0x44u); + *(_DWORD *)v27 = &off_51B084; + v27[8] = 0; + *((_DWORD *)v27 + 1) = 0; + *((_DWORD *)v27 + 2) = 0; + *((_DWORD *)v27 + 3) = 0; + *((_BYTE *)v27 + 18) = 0; + *((_DWORD *)v27 + 5) = 0; + *((_DWORD *)v27 + 6) = 0; + *((_DWORD *)v27 + 7) = 0; + *((_DWORD *)v27 + 8) = 0; + *((_DWORD *)v27 + 9) = 0; + *((_DWORD *)v27 + 10) = 0; + *((_DWORD *)v27 + 11) = 0; + *((_DWORD *)v27 + 12) = 0; + *((_DWORD *)v27 + 13) = 0; + *((_BYTE *)v27 + 67) = 0; + v33 = (std::locale::_Impl *)v27; + std::__moneypunct_cache::_M_cache((int)v27, a2 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a2 + 108), v33, v45, v28); + v51 = *v43; + } + v4 = *(_DWORD *)(a4 + 4); + lpuexcpt = *(struct _Unwind_Exception **)a4; + if ( **(_BYTE **)a4 == *(_BYTE *)(v51 + 56) ) + { + v56 = *(_DWORD *)(v51 + 52); + if ( !v4 ) + goto LABEL_10; + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v44 = *(char **)(v51 + 36); + v46 = *(std::locale::facet **)(v51 + 40); + } + else + { + v5 = *(char **)(v51 + 28); + v56 = *(_DWORD *)(v51 + 48); + v44 = v5; + v46 = *(std::locale::facet **)(v51 + 32); + } + v6 = lpuexcpt; + v7 = (unsigned __int8 *)lpuexcpt + v4; + if ( v7 > (unsigned __int8 *)lpuexcpt ) + { + do + { + if ( (*(_BYTE *)(v47[6] + 2 * *(unsigned __int8 *)v6) & 8) == 0 ) + break; + v6 = (struct _Unwind_Exception *)((char *)v6 + 1); + } + while ( v7 != (unsigned __int8 *)v6 ); + v48 = v6 - lpuexcpt; + if ( v6 != lpuexcpt ) + { + LOBYTE(v59[0]) = 0; + v57 = v59; + v58 = 0; + std::string::reserve(&v57, 2 * v48); + v9 = *(_DWORD *)(v51 + 44); + v41 = v48 - v9; + if ( (int)(v48 - v9) > 0 ) + { + v10 = v9 < 0; + v11 = v48 - v9; + if ( v10 ) + v11 = v48; + v41 = v11; + if ( *(_DWORD *)(v51 + 12) ) + { + std::string::_M_replace_aux(&v57, 0, v58, 2 * v11, 0); + v12 = std::__add_grouping( + v57, + *(_BYTE *)(v51 + 18), + *(char **)(v51 + 8), + *(_DWORD *)(v51 + 12), + lpuexcpt, + (_BYTE *)lpuexcpt + v41); + if ( v12 - (_BYTE *)v57 > v58 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + v12 - (_BYTE *)v57, + v58); + v58 = v12 - (_BYTE *)v57; + *v12 = 0; + v9 = *(_DWORD *)(v51 + 44); + } + else + { + std::string::_M_replace((unsigned int **)&v57, 0, v58, (char *)lpuexcpt, v11); + v9 = *(_DWORD *)(v51 + 44); + } + } + v39 = v58; + if ( v9 > 0 ) + { + v22 = v57; + v37 = v58 + 1; + v38 = *(_BYTE *)(v51 + 17); + v23 = 15; + if ( v57 != v59 ) + v23 = v59[0]; + if ( v58 + 1 > v23 ) + { + std::string::_M_mutate((int)&v57, v58, 0, 0, 1u); + v22 = v57; + } + v22[v39] = v38; + v58 = v37; + *((_BYTE *)v57 + v37) = 0; + if ( v41 < 0 ) + { + std::string::_M_replace_aux(&v57, v58, 0, -v41, *(_BYTE *)(v51 + 57)); + if ( v48 > 0x3FFFFFFF - v58 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&v57, lpuexcpt, v48); + } + else + { + v24 = *(_DWORD *)(v51 + 44); + if ( v24 > 0x3FFFFFFF - v58 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&v57, (_BYTE *)lpuexcpt + v41, v24); + } + v39 = v58; + } + v42 = *(_DWORD *)(a2 + 12) & 0xB0; + lpuexcpta = (std::locale::facet *)((char *)v46 + v39); + if ( (*(_DWORD *)(a2 + 12) & 0x200) != 0 ) + lpuexcpta = (std::locale::facet *)((char *)v46 + v39 + *(_DWORD *)(v51 + 24)); + LOBYTE(v62[0]) = 0; + Block = v62; + v61 = 0; + std::string::reserve(&Block, 2 * (_DWORD)lpuexcpta); + v49 = *(_DWORD *)(a2 + 8); + v13 = v49 > (unsigned int)lpuexcpta && v42 == 16; + v36 = v49 - (_DWORD)lpuexcpta; + lpuexcptb = (void **)&v56; + v40 = v13; + do + { + switch ( *(_BYTE *)lpuexcptb ) + { + case 0: + if ( v40 ) + goto LABEL_34; + break; + case 1: + v35 = v61; + if ( v40 ) + { +LABEL_34: + std::string::_M_replace_aux(&Block, v61, 0, v36, a3); + } + else + { + v25 = Block; + v26 = 15; + if ( Block != v62 ) + v26 = v62[0]; + v32 = v61 + 1; + if ( v61 + 1 > v26 ) + { + std::string::_M_mutate((int)&Block, v61, 0, 0, 1u); + v25 = Block; + } + v25[v35] = a3; + v61 = v32; + *((_BYTE *)Block + v35 + 1) = 0; + } + break; + case 2: + if ( (*(_BYTE *)(a2 + 13) & 2) != 0 ) + { + v16 = *(_DWORD *)(v51 + 24); + if ( v16 > 0x3FFFFFFF - v61 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&Block, *(_BYTE **)(v51 + 20), v16); + } + break; + case 3: + if ( v46 ) + { + v14 = Block; + v31 = *v44; + v34 = v61; + v15 = 15; + if ( Block != v62 ) + v15 = v62[0]; + v30 = v61 + 1; + if ( v61 + 1 > v15 ) + { + std::string::_M_mutate((int)&Block, v61, 0, 0, 1u); + v14 = Block; + } + v14[v34] = v31; + v61 = v30; + *((_BYTE *)Block + v34 + 1) = 0; + } + break; + case 4: + std::string::_M_append(&Block, v57, v58); + break; + default: + break; + } + lpuexcptb = (void **)((char *)lpuexcptb + 1); + } + while ( &v57 != lpuexcptb ); + v17 = v61; + if ( (unsigned int)v46 > 1 ) + { + if ( (unsigned int)v46 - 1 > 0x3FFFFFFF - v61 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&Block, v44 + 1, (size_t)v46 - 1); + v17 = v61; + if ( v61 < v49 ) + goto LABEL_41; + } + else if ( v61 < v49 ) + { +LABEL_41: + v29 = v49 - v17; + if ( v42 == 32 ) + std::string::_M_replace_aux(&Block, v17, 0, v29, a3); + else + std::string::_M_replace_aux(&Block, 0, 0, v29, a3); + goto LABEL_43; + } + v49 = v17; +LABEL_43: + v18 = (int *)Block; + lpuexcptc = BYTE4(a1); + if ( !BYTE4(a1) ) + { + v19 = 0; + v20 = (*(int (__thiscall **)(_DWORD, void *, size_t))(*(_DWORD *)a1 + 48))(a1, Block, v49); + v18 = (int *)Block; + if ( v49 != v20 ) + v19 = 1; + lpuexcptc = v19; + } + v21 = HIDWORD(a1); + LOBYTE(v21) = lpuexcptc; + HIDWORD(v50) = v21; + if ( v18 != v62 ) + operator delete(v18); + if ( v57 != v59 ) + operator delete(v57); + } + } +LABEL_10: + *(_DWORD *)(a2 + 8) = 0; + return v50; +} +// 467623: variable 'v28' is possibly undefined +// 50C608: using guessed type signed __int32 std::moneypunct::id; +// 51B084: using guessed type int (*off_51B084)(); + +//----- (004678C0) -------------------------------------------------------- +__int64 __stdcall std::money_put>::_M_insert( + __int64 a1, + int a2, + char a3, + int a4) +{ + int v4; // ecx + char *v5; // ebx + struct _Unwind_Exception *v6; // eax + unsigned __int8 *v7; // ecx + int v9; // eax + bool v10; // sf + size_t v11; // eax + _BYTE *v12; // eax + bool v13; // dl + _BYTE *v14; // edx + unsigned int v15; // eax + size_t v16; // edx + int v17; // edx + int *v18; // eax + char v19; // bl + int v20; // edx + int v21; // ebx + _BYTE *v22; // edx + size_t v23; // eax + size_t v24; // edx + _BYTE *v25; // edx + unsigned int v26; // eax + _WORD *v27; // eax + unsigned int v28; // [esp+8h] [ebp-E0h] + size_t v29; // [esp+8h] [ebp-E0h] + int v30; // [esp+20h] [ebp-C8h] + char v31; // [esp+24h] [ebp-C4h] + int v32; // [esp+24h] [ebp-C4h] + std::locale::_Impl *v33; // [esp+28h] [ebp-C0h] + int v34; // [esp+2Ch] [ebp-BCh] + int v35; // [esp+2Ch] [ebp-BCh] + size_t v36; // [esp+30h] [ebp-B8h] + size_t v37; // [esp+30h] [ebp-B8h] + char v38; // [esp+34h] [ebp-B4h] + size_t v39; // [esp+38h] [ebp-B0h] + bool v40; // [esp+38h] [ebp-B0h] + signed int v41; // [esp+3Ch] [ebp-ACh] + int v42; // [esp+3Ch] [ebp-ACh] + int *v43; // [esp+40h] [ebp-A8h] + char *v44; // [esp+40h] [ebp-A8h] + std::locale::facet *v45; // [esp+4Ch] [ebp-9Ch] + std::locale::facet *v46; // [esp+4Ch] [ebp-9Ch] + _DWORD *v47; // [esp+50h] [ebp-98h] + size_t v48; // [esp+50h] [ebp-98h] + size_t v49; // [esp+50h] [ebp-98h] + __int64 v50; // [esp+54h] [ebp-94h] + int v51; // [esp+5Ch] [ebp-8Ch] + struct _Unwind_Exception *lpuexcpt; // [esp+60h] [ebp-88h] + struct _Unwind_Exception *lpuexcpta; // [esp+60h] [ebp-88h] + void **lpuexcptb; // [esp+60h] [ebp-88h] + char lpuexcptc; // [esp+60h] [ebp-88h] + int v56; // [esp+ACh] [ebp-3Ch] BYREF + void *v57; // [esp+B0h] [ebp-38h] BYREF + size_t v58; // [esp+B4h] [ebp-34h] + int v59[4]; // [esp+B8h] [ebp-30h] BYREF + void *Block; // [esp+C8h] [ebp-20h] BYREF + int v61; // [esp+CCh] [ebp-1Ch] + int v62[5]; // [esp+D0h] [ebp-18h] BYREF + + v50 = a1; + v47 = std::use_facet>(a2 + 108); + v45 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v43 = (int *)(*(_DWORD *)(*(_DWORD *)(a2 + 108) + 12) + 4 * (_DWORD)v45); + v51 = *v43; + if ( !*v43 ) + { + v27 = operator new(0x44u); + *(_DWORD *)v27 = &off_51B094; + v27[8] = 0; + *((_DWORD *)v27 + 1) = 0; + *((_DWORD *)v27 + 2) = 0; + *((_DWORD *)v27 + 3) = 0; + *((_BYTE *)v27 + 18) = 0; + *((_DWORD *)v27 + 5) = 0; + *((_DWORD *)v27 + 6) = 0; + *((_DWORD *)v27 + 7) = 0; + *((_DWORD *)v27 + 8) = 0; + *((_DWORD *)v27 + 9) = 0; + *((_DWORD *)v27 + 10) = 0; + *((_DWORD *)v27 + 11) = 0; + *((_DWORD *)v27 + 12) = 0; + *((_DWORD *)v27 + 13) = 0; + *((_BYTE *)v27 + 67) = 0; + v33 = (std::locale::_Impl *)v27; + std::__moneypunct_cache::_M_cache((int)v27, a2 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a2 + 108), v33, v45, v28); + v51 = *v43; + } + v4 = *(_DWORD *)(a4 + 4); + lpuexcpt = *(struct _Unwind_Exception **)a4; + if ( **(_BYTE **)a4 == *(_BYTE *)(v51 + 56) ) + { + v56 = *(_DWORD *)(v51 + 52); + if ( !v4 ) + goto LABEL_10; + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v44 = *(char **)(v51 + 36); + v46 = *(std::locale::facet **)(v51 + 40); + } + else + { + v5 = *(char **)(v51 + 28); + v56 = *(_DWORD *)(v51 + 48); + v44 = v5; + v46 = *(std::locale::facet **)(v51 + 32); + } + v6 = lpuexcpt; + v7 = (unsigned __int8 *)lpuexcpt + v4; + if ( v7 > (unsigned __int8 *)lpuexcpt ) + { + do + { + if ( (*(_BYTE *)(v47[6] + 2 * *(unsigned __int8 *)v6) & 8) == 0 ) + break; + v6 = (struct _Unwind_Exception *)((char *)v6 + 1); + } + while ( v7 != (unsigned __int8 *)v6 ); + v48 = v6 - lpuexcpt; + if ( v6 != lpuexcpt ) + { + LOBYTE(v59[0]) = 0; + v57 = v59; + v58 = 0; + std::string::reserve(&v57, 2 * v48); + v9 = *(_DWORD *)(v51 + 44); + v41 = v48 - v9; + if ( (int)(v48 - v9) > 0 ) + { + v10 = v9 < 0; + v11 = v48 - v9; + if ( v10 ) + v11 = v48; + v41 = v11; + if ( *(_DWORD *)(v51 + 12) ) + { + std::string::_M_replace_aux(&v57, 0, v58, 2 * v11, 0); + v12 = std::__add_grouping( + v57, + *(_BYTE *)(v51 + 18), + *(char **)(v51 + 8), + *(_DWORD *)(v51 + 12), + lpuexcpt, + (_BYTE *)lpuexcpt + v41); + if ( v12 - (_BYTE *)v57 > v58 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + v12 - (_BYTE *)v57, + v58); + v58 = v12 - (_BYTE *)v57; + *v12 = 0; + v9 = *(_DWORD *)(v51 + 44); + } + else + { + std::string::_M_replace((unsigned int **)&v57, 0, v58, (char *)lpuexcpt, v11); + v9 = *(_DWORD *)(v51 + 44); + } + } + v39 = v58; + if ( v9 > 0 ) + { + v22 = v57; + v37 = v58 + 1; + v38 = *(_BYTE *)(v51 + 17); + v23 = 15; + if ( v57 != v59 ) + v23 = v59[0]; + if ( v58 + 1 > v23 ) + { + std::string::_M_mutate((int)&v57, v58, 0, 0, 1u); + v22 = v57; + } + v22[v39] = v38; + v58 = v37; + *((_BYTE *)v57 + v37) = 0; + if ( v41 < 0 ) + { + std::string::_M_replace_aux(&v57, v58, 0, -v41, *(_BYTE *)(v51 + 57)); + if ( v48 > 0x3FFFFFFF - v58 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&v57, lpuexcpt, v48); + } + else + { + v24 = *(_DWORD *)(v51 + 44); + if ( v24 > 0x3FFFFFFF - v58 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&v57, (_BYTE *)lpuexcpt + v41, v24); + } + v39 = v58; + } + v42 = *(_DWORD *)(a2 + 12) & 0xB0; + lpuexcpta = (std::locale::facet *)((char *)v46 + v39); + if ( (*(_DWORD *)(a2 + 12) & 0x200) != 0 ) + lpuexcpta = (std::locale::facet *)((char *)v46 + v39 + *(_DWORD *)(v51 + 24)); + LOBYTE(v62[0]) = 0; + Block = v62; + v61 = 0; + std::string::reserve(&Block, 2 * (_DWORD)lpuexcpta); + v49 = *(_DWORD *)(a2 + 8); + v13 = v49 > (unsigned int)lpuexcpta && v42 == 16; + v36 = v49 - (_DWORD)lpuexcpta; + lpuexcptb = (void **)&v56; + v40 = v13; + do + { + switch ( *(_BYTE *)lpuexcptb ) + { + case 0: + if ( v40 ) + goto LABEL_34; + break; + case 1: + v35 = v61; + if ( v40 ) + { +LABEL_34: + std::string::_M_replace_aux(&Block, v61, 0, v36, a3); + } + else + { + v25 = Block; + v26 = 15; + if ( Block != v62 ) + v26 = v62[0]; + v32 = v61 + 1; + if ( v61 + 1 > v26 ) + { + std::string::_M_mutate((int)&Block, v61, 0, 0, 1u); + v25 = Block; + } + v25[v35] = a3; + v61 = v32; + *((_BYTE *)Block + v35 + 1) = 0; + } + break; + case 2: + if ( (*(_BYTE *)(a2 + 13) & 2) != 0 ) + { + v16 = *(_DWORD *)(v51 + 24); + if ( v16 > 0x3FFFFFFF - v61 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&Block, *(_BYTE **)(v51 + 20), v16); + } + break; + case 3: + if ( v46 ) + { + v14 = Block; + v31 = *v44; + v34 = v61; + v15 = 15; + if ( Block != v62 ) + v15 = v62[0]; + v30 = v61 + 1; + if ( v61 + 1 > v15 ) + { + std::string::_M_mutate((int)&Block, v61, 0, 0, 1u); + v14 = Block; + } + v14[v34] = v31; + v61 = v30; + *((_BYTE *)Block + v34 + 1) = 0; + } + break; + case 4: + std::string::_M_append(&Block, v57, v58); + break; + default: + break; + } + lpuexcptb = (void **)((char *)lpuexcptb + 1); + } + while ( &v57 != lpuexcptb ); + v17 = v61; + if ( (unsigned int)v46 > 1 ) + { + if ( (unsigned int)v46 - 1 > 0x3FFFFFFF - v61 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&Block, v44 + 1, (size_t)v46 - 1); + v17 = v61; + if ( v61 < v49 ) + goto LABEL_41; + } + else if ( v61 < v49 ) + { +LABEL_41: + v29 = v49 - v17; + if ( v42 == 32 ) + std::string::_M_replace_aux(&Block, v17, 0, v29, a3); + else + std::string::_M_replace_aux(&Block, 0, 0, v29, a3); + goto LABEL_43; + } + v49 = v17; +LABEL_43: + v18 = (int *)Block; + lpuexcptc = BYTE4(a1); + if ( !BYTE4(a1) ) + { + v19 = 0; + v20 = (*(int (__thiscall **)(_DWORD, void *, size_t))(*(_DWORD *)a1 + 48))(a1, Block, v49); + v18 = (int *)Block; + if ( v49 != v20 ) + v19 = 1; + lpuexcptc = v19; + } + v21 = HIDWORD(a1); + LOBYTE(v21) = lpuexcptc; + HIDWORD(v50) = v21; + if ( v18 != v62 ) + operator delete(v18); + if ( v57 != v59 ) + operator delete(v57); + } + } +LABEL_10: + *(_DWORD *)(a2 + 8) = 0; + return v50; +} +// 4680D3: variable 'v28' is possibly undefined +// 50C60C: using guessed type signed __int32 std::moneypunct::id; +// 51B094: using guessed type int (*off_51B094)(); + +//----- (00468370) -------------------------------------------------------- +int __thiscall std::money_put>::put( + void *this, + __int64 a2, + unsigned __int8 a3, + int a4, + __int16 a5, + int a6) +{ + __int64 (__stdcall *v6)(__int64, char, int, __int16, int); // edx + + v6 = *(__int64 (__stdcall **)(__int64, char, int, __int16, int))(*(_DWORD *)this + 12); + if ( v6 != std::money_put>::do_put ) + return ((int (__stdcall *)(_DWORD, _DWORD, _DWORD, int, _DWORD, int))v6)( + a2, + HIDWORD(a2), + a3, + a4, + (unsigned __int16)a5, + a6); + if ( a3 ) + return std::money_put>::_M_insert(a2, a4, a5, a6); + return std::money_put>::_M_insert(a2, a4, a5, a6); +} + +//----- (00468410) -------------------------------------------------------- +int __thiscall std::money_put>::put( + void *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + unsigned __int16 a6) +{ + return (*(int (__thiscall **)(void *, int, int, _DWORD, int, _DWORD))(*(_DWORD *)this + 8))(this, a2, a3, a4, a5, a6); +} + +//----- (00468430) -------------------------------------------------------- +__int64 __stdcall std::money_put>::do_put( + __int64 a1, + char a2, + int a3, + __int16 a4, + int a5) +{ + if ( a2 ) + return std::money_put>::_M_insert(a1, a3, a4, a5); + else + return std::money_put>::_M_insert(a1, a3, a4, a5); +} + +//----- (004684A0) -------------------------------------------------------- +__int64 __thiscall std::money_put>::do_put( + void *this, + __int64 a2, + int a3, + int a4, + int a5, + long double a6) +{ + void *v6; // esp + void *v7; // esp + int v8; // eax + int v9; // eax + void *v10; // esp + void *v11; // esp + __int64 v12; // rax + int v14; // [esp-44h] [ebp-ECh] + int v15; // [esp-40h] [ebp-E8h] + int v16; // [esp-3Ch] [ebp-E4h] + int v17; // [esp-38h] [ebp-E0h] + int v18; // [esp-34h] [ebp-DCh] + char *v19[23]; // [esp-30h] [ebp-D8h] BYREF + char *v20; // [esp+2Ch] [ebp-7Ch] + int v21; // [esp+30h] [ebp-78h] + int v22; // [esp+34h] [ebp-74h] + void *v23; // [esp+38h] [ebp-70h] + void *v24; // [esp+3Ch] [ebp-6Ch] + __int64 lpuexcpt; // [esp+40h] [ebp-68h] + char **v26; // [esp+48h] [ebp-60h] + _DWORD *v27; // [esp+84h] [ebp-24h] BYREF + void *Block[2]; // [esp+88h] [ebp-20h] BYREF + char v29[20]; // [esp+90h] [ebp-18h] BYREF + + v23 = this; + v22 = a3; + v21 = a5; + std::locale::locale( + (volatile signed __int32 **)&v27, + (volatile signed __int32 **)(a4 + 108), + (const std::locale *)v19[13]); + v24 = std::use_facet>((int)&v27); + v6 = alloca(80); + v7 = alloca(80); + LODWORD(lpuexcpt) = v19; + v26 = v19; + Block[0] = (void *)std::locale::facet::_S_get_c_locale(); + v8 = std::__convert_from_v((int *const *)Block, (char *)lpuexcpt, 64, "%.*Lf", 0, a6); + LODWORD(lpuexcpt) = v8; + if ( v8 > 63 ) + { + LODWORD(lpuexcpt) = v8 + 1; + v9 = 16 * ((unsigned int)(v8 + 28) >> 4); + v10 = alloca(v9); + v11 = alloca(v9); + v20 = (char *)v19; + v26 = v19; + Block[0] = (void *)std::locale::facet::_S_get_c_locale(); + LODWORD(lpuexcpt) = std::__convert_from_v((int *const *)Block, v20, lpuexcpt, "%.*Lf", 0, a6); + } + Block[0] = v29; + std::wstring::_M_construct(Block, lpuexcpt, 0); + (*(void (__thiscall **)(void *, char **, char *, void *, int, int, int, int, int, char *, char *, char *, char *, char *, char *, char *, char *, char *, char *))(*(_DWORD *)v24 + 44))( + v24, + v26, + (char *)v26 + lpuexcpt, + Block[0], + v14, + v15, + v16, + v17, + v18, + v19[0], + v19[1], + v19[2], + v19[3], + v19[4], + v19[5], + v19[6], + v19[7], + v19[8], + v19[9]); + if ( (_BYTE)v22 ) + v12 = std::money_put>::_M_insert(a2, a4, v21, (int)Block); + else + v12 = std::money_put>::_M_insert(a2, a4, v21, (int)Block); + lpuexcpt = v12; + if ( Block[0] != v29 ) + operator delete(Block[0]); + std::locale::~locale(&v27); + return lpuexcpt; +} +// 468611: variable 'v14' is possibly undefined +// 468611: variable 'v15' is possibly undefined +// 468611: variable 'v16' is possibly undefined +// 468611: variable 'v17' is possibly undefined +// 468611: variable 'v18' is possibly undefined + +//----- (00468700) -------------------------------------------------------- +__int64 __stdcall std::money_put>::_M_insert( + __int64 a1, + int a2, + __int16 a3, + int a4) +{ + int v4; // eax + signed int v5; // eax + std::locale::facet *v7; // esi + char *v8; // edx + int v9; // eax + bool v10; // sf + unsigned int v11; // eax + char *v12; // edx + unsigned int v13; // eax + bool v14; // dl + _WORD *v15; // eax + unsigned int v16; // edx + unsigned int v17; // edx + int v18; // ecx + int *v19; // eax + char v20; // bl + int v21; // edx + int v22; // ebx + _WORD *v23; // eax + unsigned int v24; // edx + unsigned int v25; // edx + _WORD *v26; // eax + unsigned int v27; // edx + _DWORD *v28; // eax + unsigned int v29; // [esp-4h] [ebp-ECh] + unsigned int v30; // [esp+8h] [ebp-E0h] + unsigned int v31; // [esp+20h] [ebp-C8h] + __int16 v32; // [esp+24h] [ebp-C4h] + unsigned int v33; // [esp+24h] [ebp-C4h] + std::locale::_Impl *v34; // [esp+28h] [ebp-C0h] + int v35; // [esp+2Ch] [ebp-BCh] + int v36; // [esp+2Ch] [ebp-BCh] + unsigned int v37; // [esp+30h] [ebp-B8h] + __int16 v38; // [esp+30h] [ebp-B8h] + int v39; // [esp+34h] [ebp-B4h] + int v40; // [esp+38h] [ebp-B0h] + bool v41; // [esp+38h] [ebp-B0h] + __int16 *v42; // [esp+3Ch] [ebp-ACh] + int *v43; // [esp+48h] [ebp-A0h] + unsigned int v44; // [esp+48h] [ebp-A0h] + int v45; // [esp+48h] [ebp-A0h] + std::locale::facet *v46; // [esp+4Ch] [ebp-9Ch] + std::locale::facet *v47; // [esp+4Ch] [ebp-9Ch] + void *v48; // [esp+50h] [ebp-98h] + int v49; // [esp+50h] [ebp-98h] + int v50; // [esp+50h] [ebp-98h] + unsigned int v51; // [esp+50h] [ebp-98h] + __int64 v52; // [esp+54h] [ebp-94h] + int v53; // [esp+5Ch] [ebp-8Ch] + char *lpuexcpt; // [esp+60h] [ebp-88h] + struct _Unwind_Exception *lpuexcpta; // [esp+60h] [ebp-88h] + void **lpuexcptb; // [esp+60h] [ebp-88h] + char lpuexcptc; // [esp+60h] [ebp-88h] + int v58; // [esp+ACh] [ebp-3Ch] BYREF + void *v59; // [esp+B0h] [ebp-38h] BYREF + int v60; // [esp+B4h] [ebp-34h] + int v61[4]; // [esp+B8h] [ebp-30h] BYREF + void *Block; // [esp+C8h] [ebp-20h] BYREF + unsigned int v63; // [esp+CCh] [ebp-1Ch] + int v64[6]; // [esp+D0h] [ebp-18h] BYREF + + v52 = a1; + v48 = std::use_facet>(a2 + 108); + v46 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v43 = (int *)(*(_DWORD *)(*(_DWORD *)(a2 + 108) + 12) + 4 * (_DWORD)v46); + v53 = *v43; + if ( !*v43 ) + { + v28 = operator new(0x54u); + v28[1] = 0; + *v28 = &off_51B0A4; + v28[2] = 0; + v28[3] = 0; + *((_BYTE *)v28 + 16) = 0; + *(_DWORD *)((char *)v28 + 18) = 0; + v28[6] = 0; + v28[7] = 0; + v28[8] = 0; + v28[9] = 0; + v28[10] = 0; + v28[11] = 0; + v28[12] = 0; + v28[13] = 0; + v28[14] = 0; + *((_BYTE *)v28 + 82) = 0; + v34 = (std::locale::_Impl *)v28; + std::__moneypunct_cache::_M_cache((int)v28, a2 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a2 + 108), v34, v46, v30); + v53 = *v43; + } + v4 = *(_DWORD *)(a4 + 4); + lpuexcpt = *(char **)a4; + if ( **(_WORD **)a4 == *(_WORD *)(v53 + 60) ) + { + v42 = *(__int16 **)(v53 + 40); + v7 = *(std::locale::facet **)(v53 + 44); + v58 = *(_DWORD *)(v53 + 56); + v47 = v7; + v8 = lpuexcpt + 2; + if ( !v4 ) + v8 = lpuexcpt; + lpuexcpt = v8; + } + else + { + v58 = *(_DWORD *)(v53 + 52); + v42 = *(__int16 **)(v53 + 32); + v47 = *(std::locale::facet **)(v53 + 36); + } + v5 = (*(int (__thiscall **)(void *, int, char *, char *))(*(_DWORD *)v48 + 20))(v48, 8, lpuexcpt, &lpuexcpt[2 * v4]) + - (_DWORD)lpuexcpt; + v44 = v5 >> 1; + if ( v5 >> 1 ) + { + v59 = v61; + v60 = 0; + LOWORD(v61[0]) = 0; + std::wstring::reserve((int)&v59, v5); + v9 = *(_DWORD *)(v53 + 48); + v49 = v60; + v40 = v44 - v9; + if ( (int)(v44 - v9) > 0 ) + { + v10 = v9 < 0; + v11 = v44 - v9; + if ( v10 ) + v11 = v44; + v40 = v11; + if ( *(_DWORD *)(v53 + 12) ) + { + v50 = 2 * v11; + std::wstring::_M_replace_aux(&v59, 0, v60, 2 * v11, 0); + v12 = (char *)std::__add_grouping( + v59, + *(_WORD *)(v53 + 20), + *(char **)(v53 + 8), + *(_DWORD *)(v53 + 12), + lpuexcpt, + &lpuexcpt[v50]); + v13 = (v12 - (_BYTE *)v59) >> 1; + v49 = v13; + if ( v13 > v60 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + v13, + v60); + v60 = (v12 - (_BYTE *)v59) >> 1; + *(_WORD *)v12 = 0; + v9 = *(_DWORD *)(v53 + 48); + } + else + { + std::wstring::_M_replace((unsigned int **)&v59, 0, v60, lpuexcpt, v11); + v49 = v60; + v9 = *(_DWORD *)(v53 + 48); + } + } + if ( v9 > 0 ) + { + v38 = *(_WORD *)(v53 + 18); + v23 = v59; + v39 = v49 + 1; + v24 = 7; + if ( v59 != v61 ) + v24 = v61[0]; + if ( v49 + 1 > v24 ) + { + std::wstring::_M_mutate((int)&v59, v49, 0, 0, 1); + v23 = v59; + } + v23[v49] = v38; + v60 = v49 + 1; + v23[v49 + 1] = 0; + if ( v40 < 0 ) + { + std::wstring::_M_replace_aux(&v59, v39, 0, -v40, *(_WORD *)(v53 + 62)); + if ( v44 > 0x1FFFFFFF - v60 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append(&v59, lpuexcpt, v44); + } + else + { + v25 = *(_DWORD *)(v53 + 48); + if ( v25 > 0x1FFFFFFF - v39 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append(&v59, &lpuexcpt[2 * v40], v25); + } + v49 = v60; + } + v45 = *(_DWORD *)(a2 + 12) & 0xB0; + lpuexcpta = (std::locale::facet *)((char *)v47 + v49); + if ( (*(_DWORD *)(a2 + 12) & 0x200) != 0 ) + lpuexcpta = (std::locale::facet *)((char *)v47 + v49 + *(_DWORD *)(v53 + 28)); + Block = v64; + v63 = 0; + LOWORD(v64[0]) = 0; + std::wstring::reserve((int)&Block, 2 * (_DWORD)lpuexcpta); + v51 = *(_DWORD *)(a2 + 8); + v14 = v51 > (unsigned int)lpuexcpta && v45 == 16; + v37 = v51 - (_DWORD)lpuexcpta; + lpuexcptb = (void **)&v58; + v41 = v14; + do + { + switch ( *(_BYTE *)lpuexcptb ) + { + case 0: + if ( v41 ) + goto LABEL_31; + break; + case 1: + v36 = v63; + if ( v41 ) + { +LABEL_31: + std::wstring::_M_replace_aux(&Block, v63, 0, v37, a3); + } + else + { + v26 = Block; + v33 = v63 + 1; + v27 = 7; + if ( Block != v64 ) + v27 = v64[0]; + if ( v63 + 1 > v27 ) + { + std::wstring::_M_mutate((int)&Block, v63, 0, 0, 1); + v26 = Block; + } + v26[v36] = a3; + v63 = v33; + v26[v36 + 1] = 0; + } + break; + case 2: + if ( (*(_BYTE *)(a2 + 13) & 2) != 0 ) + { + v17 = *(_DWORD *)(v53 + 28); + if ( v17 > 0x1FFFFFFF - v63 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append(&Block, *(_WORD **)(v53 + 24), v17); + } + break; + case 3: + if ( v47 ) + { + v32 = *v42; + v35 = v63; + v15 = Block; + v31 = v63 + 1; + v16 = 7; + if ( Block != v64 ) + v16 = v64[0]; + if ( v63 + 1 > v16 ) + { + std::wstring::_M_mutate((int)&Block, v63, 0, 0, 1); + v15 = Block; + } + v15[v35] = v32; + v63 = v31; + v15[v35 + 1] = 0; + } + break; + case 4: + std::wstring::_M_append(&Block, v59, v60); + break; + default: + break; + } + lpuexcptb = (void **)((char *)lpuexcptb + 1); + } + while ( &v59 != lpuexcptb ); + v18 = v63; + if ( (unsigned int)v47 > 1 ) + { + if ( (unsigned int)v47 - 1 > 0x1FFFFFFF - v63 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append(&Block, v42 + 1, (int)v47 - 1); + v18 = v63; + if ( v51 > v63 ) + goto LABEL_38; + } + else if ( v51 > v63 ) + { +LABEL_38: + v29 = v51 - v18; + if ( v45 == 32 ) + std::wstring::_M_replace_aux(&Block, v18, 0, v29, a3); + else + std::wstring::_M_replace_aux(&Block, 0, 0, v29, a3); + goto LABEL_40; + } + v51 = v18; +LABEL_40: + v19 = (int *)Block; + lpuexcptc = BYTE4(a1); + if ( !BYTE4(a1) ) + { + v20 = 0; + v21 = (*(int (__thiscall **)(_DWORD, void *, unsigned int))(*(_DWORD *)a1 + 48))(a1, Block, v51); + v19 = (int *)Block; + if ( v51 != v21 ) + v20 = 1; + lpuexcptc = v20; + } + v22 = HIDWORD(a1); + LOBYTE(v22) = lpuexcptc; + HIDWORD(v52) = v22; + if ( v19 != v64 ) + operator delete(v19); + if ( v59 != v61 ) + operator delete(v59); + } + *(_DWORD *)(a2 + 8) = 0; + return v52; +} +// 468F4C: variable 'v30' is possibly undefined +// 50C610: using guessed type signed __int32 std::moneypunct::id; +// 51B0A4: using guessed type int (*off_51B0A4)(); + +//----- (00469220) -------------------------------------------------------- +__int64 __stdcall std::money_put>::_M_insert( + __int64 a1, + int a2, + __int16 a3, + int a4) +{ + int v4; // eax + signed int v5; // eax + std::locale::facet *v7; // esi + char *v8; // edx + int v9; // eax + bool v10; // sf + unsigned int v11; // eax + char *v12; // edx + unsigned int v13; // eax + bool v14; // dl + _WORD *v15; // eax + unsigned int v16; // edx + unsigned int v17; // edx + int v18; // ecx + int *v19; // eax + char v20; // bl + int v21; // edx + int v22; // ebx + _WORD *v23; // eax + unsigned int v24; // edx + unsigned int v25; // edx + _WORD *v26; // eax + unsigned int v27; // edx + _DWORD *v28; // eax + unsigned int v29; // [esp-4h] [ebp-ECh] + unsigned int v30; // [esp+8h] [ebp-E0h] + unsigned int v31; // [esp+20h] [ebp-C8h] + __int16 v32; // [esp+24h] [ebp-C4h] + unsigned int v33; // [esp+24h] [ebp-C4h] + std::locale::_Impl *v34; // [esp+28h] [ebp-C0h] + int v35; // [esp+2Ch] [ebp-BCh] + int v36; // [esp+2Ch] [ebp-BCh] + unsigned int v37; // [esp+30h] [ebp-B8h] + __int16 v38; // [esp+30h] [ebp-B8h] + int v39; // [esp+34h] [ebp-B4h] + int v40; // [esp+38h] [ebp-B0h] + bool v41; // [esp+38h] [ebp-B0h] + __int16 *v42; // [esp+3Ch] [ebp-ACh] + int *v43; // [esp+48h] [ebp-A0h] + unsigned int v44; // [esp+48h] [ebp-A0h] + int v45; // [esp+48h] [ebp-A0h] + std::locale::facet *v46; // [esp+4Ch] [ebp-9Ch] + std::locale::facet *v47; // [esp+4Ch] [ebp-9Ch] + void *v48; // [esp+50h] [ebp-98h] + int v49; // [esp+50h] [ebp-98h] + int v50; // [esp+50h] [ebp-98h] + unsigned int v51; // [esp+50h] [ebp-98h] + __int64 v52; // [esp+54h] [ebp-94h] + int v53; // [esp+5Ch] [ebp-8Ch] + char *lpuexcpt; // [esp+60h] [ebp-88h] + struct _Unwind_Exception *lpuexcpta; // [esp+60h] [ebp-88h] + void **lpuexcptb; // [esp+60h] [ebp-88h] + char lpuexcptc; // [esp+60h] [ebp-88h] + int v58; // [esp+ACh] [ebp-3Ch] BYREF + void *v59; // [esp+B0h] [ebp-38h] BYREF + int v60; // [esp+B4h] [ebp-34h] + int v61[4]; // [esp+B8h] [ebp-30h] BYREF + void *Block; // [esp+C8h] [ebp-20h] BYREF + unsigned int v63; // [esp+CCh] [ebp-1Ch] + int v64[6]; // [esp+D0h] [ebp-18h] BYREF + + v52 = a1; + v48 = std::use_facet>(a2 + 108); + v46 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v43 = (int *)(*(_DWORD *)(*(_DWORD *)(a2 + 108) + 12) + 4 * (_DWORD)v46); + v53 = *v43; + if ( !*v43 ) + { + v28 = operator new(0x54u); + v28[1] = 0; + *v28 = &off_51B0B4; + v28[2] = 0; + v28[3] = 0; + *((_BYTE *)v28 + 16) = 0; + *(_DWORD *)((char *)v28 + 18) = 0; + v28[6] = 0; + v28[7] = 0; + v28[8] = 0; + v28[9] = 0; + v28[10] = 0; + v28[11] = 0; + v28[12] = 0; + v28[13] = 0; + v28[14] = 0; + *((_BYTE *)v28 + 82) = 0; + v34 = (std::locale::_Impl *)v28; + std::__moneypunct_cache::_M_cache((int)v28, a2 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a2 + 108), v34, v46, v30); + v53 = *v43; + } + v4 = *(_DWORD *)(a4 + 4); + lpuexcpt = *(char **)a4; + if ( **(_WORD **)a4 == *(_WORD *)(v53 + 60) ) + { + v42 = *(__int16 **)(v53 + 40); + v7 = *(std::locale::facet **)(v53 + 44); + v58 = *(_DWORD *)(v53 + 56); + v47 = v7; + v8 = lpuexcpt + 2; + if ( !v4 ) + v8 = lpuexcpt; + lpuexcpt = v8; + } + else + { + v58 = *(_DWORD *)(v53 + 52); + v42 = *(__int16 **)(v53 + 32); + v47 = *(std::locale::facet **)(v53 + 36); + } + v5 = (*(int (__thiscall **)(void *, int, char *, char *))(*(_DWORD *)v48 + 20))(v48, 8, lpuexcpt, &lpuexcpt[2 * v4]) + - (_DWORD)lpuexcpt; + v44 = v5 >> 1; + if ( v5 >> 1 ) + { + v59 = v61; + v60 = 0; + LOWORD(v61[0]) = 0; + std::wstring::reserve((int)&v59, v5); + v9 = *(_DWORD *)(v53 + 48); + v49 = v60; + v40 = v44 - v9; + if ( (int)(v44 - v9) > 0 ) + { + v10 = v9 < 0; + v11 = v44 - v9; + if ( v10 ) + v11 = v44; + v40 = v11; + if ( *(_DWORD *)(v53 + 12) ) + { + v50 = 2 * v11; + std::wstring::_M_replace_aux(&v59, 0, v60, 2 * v11, 0); + v12 = (char *)std::__add_grouping( + v59, + *(_WORD *)(v53 + 20), + *(char **)(v53 + 8), + *(_DWORD *)(v53 + 12), + lpuexcpt, + &lpuexcpt[v50]); + v13 = (v12 - (_BYTE *)v59) >> 1; + v49 = v13; + if ( v13 > v60 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + v13, + v60); + v60 = (v12 - (_BYTE *)v59) >> 1; + *(_WORD *)v12 = 0; + v9 = *(_DWORD *)(v53 + 48); + } + else + { + std::wstring::_M_replace((unsigned int **)&v59, 0, v60, lpuexcpt, v11); + v49 = v60; + v9 = *(_DWORD *)(v53 + 48); + } + } + if ( v9 > 0 ) + { + v38 = *(_WORD *)(v53 + 18); + v23 = v59; + v39 = v49 + 1; + v24 = 7; + if ( v59 != v61 ) + v24 = v61[0]; + if ( v49 + 1 > v24 ) + { + std::wstring::_M_mutate((int)&v59, v49, 0, 0, 1); + v23 = v59; + } + v23[v49] = v38; + v60 = v49 + 1; + v23[v49 + 1] = 0; + if ( v40 < 0 ) + { + std::wstring::_M_replace_aux(&v59, v39, 0, -v40, *(_WORD *)(v53 + 62)); + if ( v44 > 0x1FFFFFFF - v60 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append(&v59, lpuexcpt, v44); + } + else + { + v25 = *(_DWORD *)(v53 + 48); + if ( v25 > 0x1FFFFFFF - v39 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append(&v59, &lpuexcpt[2 * v40], v25); + } + v49 = v60; + } + v45 = *(_DWORD *)(a2 + 12) & 0xB0; + lpuexcpta = (std::locale::facet *)((char *)v47 + v49); + if ( (*(_DWORD *)(a2 + 12) & 0x200) != 0 ) + lpuexcpta = (std::locale::facet *)((char *)v47 + v49 + *(_DWORD *)(v53 + 28)); + Block = v64; + v63 = 0; + LOWORD(v64[0]) = 0; + std::wstring::reserve((int)&Block, 2 * (_DWORD)lpuexcpta); + v51 = *(_DWORD *)(a2 + 8); + v14 = v51 > (unsigned int)lpuexcpta && v45 == 16; + v37 = v51 - (_DWORD)lpuexcpta; + lpuexcptb = (void **)&v58; + v41 = v14; + do + { + switch ( *(_BYTE *)lpuexcptb ) + { + case 0: + if ( v41 ) + goto LABEL_31; + break; + case 1: + v36 = v63; + if ( v41 ) + { +LABEL_31: + std::wstring::_M_replace_aux(&Block, v63, 0, v37, a3); + } + else + { + v26 = Block; + v33 = v63 + 1; + v27 = 7; + if ( Block != v64 ) + v27 = v64[0]; + if ( v63 + 1 > v27 ) + { + std::wstring::_M_mutate((int)&Block, v63, 0, 0, 1); + v26 = Block; + } + v26[v36] = a3; + v63 = v33; + v26[v36 + 1] = 0; + } + break; + case 2: + if ( (*(_BYTE *)(a2 + 13) & 2) != 0 ) + { + v17 = *(_DWORD *)(v53 + 28); + if ( v17 > 0x1FFFFFFF - v63 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append(&Block, *(_WORD **)(v53 + 24), v17); + } + break; + case 3: + if ( v47 ) + { + v32 = *v42; + v35 = v63; + v15 = Block; + v31 = v63 + 1; + v16 = 7; + if ( Block != v64 ) + v16 = v64[0]; + if ( v63 + 1 > v16 ) + { + std::wstring::_M_mutate((int)&Block, v63, 0, 0, 1); + v15 = Block; + } + v15[v35] = v32; + v63 = v31; + v15[v35 + 1] = 0; + } + break; + case 4: + std::wstring::_M_append(&Block, v59, v60); + break; + default: + break; + } + lpuexcptb = (void **)((char *)lpuexcptb + 1); + } + while ( &v59 != lpuexcptb ); + v18 = v63; + if ( (unsigned int)v47 > 1 ) + { + if ( (unsigned int)v47 - 1 > 0x1FFFFFFF - v63 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append(&Block, v42 + 1, (int)v47 - 1); + v18 = v63; + if ( v51 > v63 ) + goto LABEL_38; + } + else if ( v51 > v63 ) + { +LABEL_38: + v29 = v51 - v18; + if ( v45 == 32 ) + std::wstring::_M_replace_aux(&Block, v18, 0, v29, a3); + else + std::wstring::_M_replace_aux(&Block, 0, 0, v29, a3); + goto LABEL_40; + } + v51 = v18; +LABEL_40: + v19 = (int *)Block; + lpuexcptc = BYTE4(a1); + if ( !BYTE4(a1) ) + { + v20 = 0; + v21 = (*(int (__thiscall **)(_DWORD, void *, unsigned int))(*(_DWORD *)a1 + 48))(a1, Block, v51); + v19 = (int *)Block; + if ( v51 != v21 ) + v20 = 1; + lpuexcptc = v20; + } + v22 = HIDWORD(a1); + LOBYTE(v22) = lpuexcptc; + HIDWORD(v52) = v22; + if ( v19 != v64 ) + operator delete(v19); + if ( v59 != v61 ) + operator delete(v59); + } + *(_DWORD *)(a2 + 8) = 0; + return v52; +} +// 469A6C: variable 'v30' is possibly undefined +// 50C614: using guessed type signed __int32 std::moneypunct::id; +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (00469D40) -------------------------------------------------------- +int __stdcall std::codecvt::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (00469D60) -------------------------------------------------------- +int __stdcall std::codecvt::do_in( + int a1, + unsigned __int8 *a2, + unsigned __int8 *a3, + unsigned __int8 **a4, + int a5, + int a6, + _DWORD *a7) +{ + unsigned __int8 *v7; // edx + unsigned int v9; // eax + int result; // eax + unsigned __int8 *v11; // [esp+8h] [ebp-10h] BYREF + unsigned __int8 *v12; // [esp+Ch] [ebp-Ch] + + v7 = a3; + v11 = a2; + v12 = a3; + if ( a2 == a3 ) + { +LABEL_9: + result = 0; + } + else + { + while ( 1 ) + { + if ( a6 == a5 ) + { + v7 = v11; + result = 1; + goto LABEL_8; + } + v9 = std::`anonymous namespace'::read_utf8_code_point(&v11, 0x10FFFFu); + v7 = v11; + if ( v9 == -2 ) + { + result = 1; + goto LABEL_8; + } + if ( v9 > 0x10FFFF ) + break; + a5 += 4; + *(_DWORD *)(a5 - 4) = v9; + if ( v12 == v7 ) + goto LABEL_9; + } + result = 2; + } +LABEL_8: + *a4 = v7; + *a7 = a5; + return result; +} + +//----- (00469E00) -------------------------------------------------------- +int __stdcall std::codecvt::do_out( + int a1, + unsigned int *a2, + unsigned int *a3, + unsigned int **a4, + _BYTE *a5, + _BYTE *a6, + _DWORD *a7) +{ + _BYTE *v7; // eax + unsigned int *v8; // ebx + unsigned int v9; // edx + int v11; // edx + _BYTE *v12; // [esp+8h] [ebp-10h] BYREF + _BYTE *v13; // [esp+Ch] [ebp-Ch] + + v7 = a5; + v8 = a2; + v12 = a5; + v13 = a6; + if ( a2 == a3 ) + { + v11 = 0; + } + else + { + do + { + v9 = *v8; + if ( *v8 > 0x10FFFF ) + { + v7 = v12; + v11 = 2; + goto LABEL_11; + } + if ( v9 <= 0x7F ) + { + v7 = v12; + if ( v13 == v12 ) + { + v11 = 1; + goto LABEL_11; + } + ++v12; + *v7 = v9; + } + else if ( !(unsigned __int8)std::`anonymous namespace'::write_utf8_code_point((int)&v12, v9) ) + { + v7 = v12; + v11 = 1; + goto LABEL_11; + } + ++v8; + } + while ( a3 != v8 ); + v7 = v12; + v11 = 0; + } +LABEL_11: + *a4 = v8; + *a7 = v7; + return v11; +} + +//----- (00469EC0) -------------------------------------------------------- +unsigned __int8 *__stdcall std::codecvt::do_length( + int a1, + unsigned __int8 *a2, + unsigned __int8 *a3, + int a4) +{ + int v4; // ebx + bool v5; // dl + bool v6; // al + unsigned __int8 *v8[4]; // [esp+8h] [ebp-10h] BYREF + + v8[0] = a2; + v8[1] = a3; + if ( !a4 ) + return 0; + v4 = a4 - 1; + do + { + v5 = (unsigned int)std::`anonymous namespace'::read_utf8_code_point(v8, 0x10FFFFu) <= 0x10FFFF; + v6 = v4-- != 0; + } + while ( v6 && v5 ); + return (unsigned __int8 *)(v8[0] - a2); +} + +//----- (00469F20) -------------------------------------------------------- +int __stdcall std::codecvt::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (00469F40) -------------------------------------------------------- +int __stdcall std::codecvt::do_in( + int a1, + unsigned __int8 *a2, + unsigned __int8 *a3, + unsigned __int8 **a4, + int a5, + int a6, + _DWORD *a7) +{ + unsigned __int8 *v7; // edx + unsigned int v9; // eax + int result; // eax + unsigned __int8 *v11; // [esp+8h] [ebp-10h] BYREF + unsigned __int8 *v12; // [esp+Ch] [ebp-Ch] + + v7 = a3; + v11 = a2; + v12 = a3; + if ( a2 == a3 ) + { +LABEL_9: + result = 0; + } + else + { + while ( 1 ) + { + if ( a6 == a5 ) + { + v7 = v11; + result = 1; + goto LABEL_8; + } + v9 = std::`anonymous namespace'::read_utf8_code_point(&v11, 0x10FFFFu); + v7 = v11; + if ( v9 == -2 ) + { + result = 1; + goto LABEL_8; + } + if ( v9 > 0x10FFFF ) + break; + a5 += 4; + *(_DWORD *)(a5 - 4) = v9; + if ( v12 == v7 ) + goto LABEL_9; + } + result = 2; + } +LABEL_8: + *a4 = v7; + *a7 = a5; + return result; +} + +//----- (00469FE0) -------------------------------------------------------- +int __stdcall std::codecvt::do_out( + int a1, + unsigned int *a2, + unsigned int *a3, + unsigned int **a4, + _BYTE *a5, + _BYTE *a6, + _DWORD *a7) +{ + _BYTE *v7; // eax + unsigned int *v8; // ebx + int v10; // ecx + _BYTE *v11[4]; // [esp+8h] [ebp-10h] BYREF + + v7 = a5; + v8 = a2; + v11[0] = a5; + v11[1] = a6; + if ( a2 == a3 ) + { + v10 = 0; + } + else + { + do + { + if ( *v8 > 0x10FFFF ) + { + v7 = v11[0]; + v10 = 2; + goto LABEL_7; + } + if ( !(unsigned __int8)std::`anonymous namespace'::write_utf8_code_point(v11, *v8) ) + { + v7 = v11[0]; + v10 = 1; + goto LABEL_7; + } + ++v8; + } + while ( a3 != v8 ); + v7 = v11[0]; + v10 = 0; + } +LABEL_7: + *a4 = v8; + *a7 = v7; + return v10; +} + +//----- (0046A070) -------------------------------------------------------- +unsigned __int8 *__stdcall std::codecvt::do_length( + int a1, + unsigned __int8 *a2, + unsigned __int8 *a3, + int a4) +{ + int v4; // ebx + bool v5; // dl + bool v6; // al + unsigned __int8 *v8[4]; // [esp+8h] [ebp-10h] BYREF + + v8[0] = a2; + v8[1] = a3; + if ( !a4 ) + return 0; + v4 = a4 - 1; + do + { + v5 = (unsigned int)std::`anonymous namespace'::read_utf8_code_point(v8, 0x10FFFFu) <= 0x10FFFF; + v6 = v4-- != 0; + } + while ( v6 && v5 ); + return (unsigned __int8 *)(v8[0] - a2); +} + +//----- (0046A0D0) -------------------------------------------------------- +int __stdcall std::codecvt::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (0046A0F0) -------------------------------------------------------- +int __stdcall std::codecvt::do_in( + int a1, + unsigned __int8 *a2, + unsigned __int8 *a3, + unsigned __int8 **a4, + char *a5, + char *a6, + char **a7) +{ + unsigned __int8 *v7; // edi + unsigned int v9; // eax + int result; // eax + unsigned __int8 *v11; // [esp+8h] [ebp-14h] BYREF + unsigned __int8 *v12; // [esp+Ch] [ebp-10h] + + v7 = a2; + v11 = a2; + v12 = a3; + if ( a2 == a3 ) + { +LABEL_12: + result = 0; + } + else + { + while ( 1 ) + { + if ( a6 == a5 ) + { + v7 = v11; + result = 0; + goto LABEL_10; + } + v9 = std::`anonymous namespace'::read_utf8_code_point(&v11, 0x10FFFFu); + if ( v9 == -2 ) + { + v7 = v11; + result = 1; + goto LABEL_10; + } + if ( v9 > 0x10FFFF ) + break; + if ( v9 <= 0xFFFF ) + { + *(_WORD *)a5 = v9; + v7 = v11; + a5 += 2; + if ( v12 == v11 ) + goto LABEL_12; + } + else + { + if ( (unsigned int)(a6 - a5) <= 2 ) + { + result = 1; + goto LABEL_10; + } + v7 = v11; + a5 += 4; + *((_WORD *)a5 - 1) = (v9 & 0x3FF) - 9216; + *((_WORD *)a5 - 2) = (v9 >> 10) - 10304; + if ( v12 == v7 ) + goto LABEL_12; + } + } + v7 = v11; + result = 2; + } +LABEL_10: + *a4 = v7; + *a7 = a5; + return result; +} + +//----- (0046A1E0) -------------------------------------------------------- +int __stdcall std::codecvt::do_out( + int a1, + char *a2, + char *a3, + unsigned __int16 **a4, + _BYTE *a5, + _BYTE *a6, + _DWORD *a7) +{ + unsigned __int16 *v7; // ebx + _BYTE *v8; // eax + char *v9; // edi + int v10; // eax + int v11; // edi + unsigned int v12; // edx + unsigned __int16 v13; // cx + int v15; // edx + _BYTE *v16; // [esp+8h] [ebp-14h] BYREF + _BYTE *v17; // [esp+Ch] [ebp-10h] + + v7 = (unsigned __int16 *)a2; + v8 = a5; + v16 = a5; + v9 = (char *)(a3 - a2); + v17 = a6; + if ( a2 != a3 ) + { + while ( 1 ) + { + while ( 1 ) + { + v12 = *v7; + v13 = *v7; + if ( v12 - 55296 > 0x3FF ) + break; + if ( (unsigned int)v9 <= 2 ) + goto LABEL_13; + v10 = v7[1]; + if ( (unsigned int)(v10 - 56320) > 0x3FF ) + { +LABEL_16: + v8 = v16; + v15 = 2; + goto LABEL_15; + } + v11 = 2; + v12 = v10 + (v12 << 10) - 56613888; +LABEL_6: + if ( !(unsigned __int8)std::`anonymous namespace'::write_utf8_code_point((int)&v16, v12) ) + { + v8 = v16; + v15 = 1; + goto LABEL_15; + } + v7 += v11; + v9 = (char *)(a3 - (char *)v7); + if ( a3 == (char *)v7 ) + goto LABEL_13; + } + if ( v12 - 56320 <= 0x3FF ) + goto LABEL_16; + if ( v12 > 0x7F ) + { + v11 = 1; + goto LABEL_6; + } + v8 = v16; + if ( v17 == v16 ) + { + v15 = 1; + goto LABEL_15; + } + ++v16; + *v8 = v13; + v9 = (char *)(a3 - (char *)++v7); + if ( a3 == (char *)v7 ) + { +LABEL_13: + v8 = v16; + v15 = 0; + goto LABEL_15; + } + } + } + v15 = 0; +LABEL_15: + *a4 = v7; + *a7 = v8; + return v15; +} + +//----- (0046A300) -------------------------------------------------------- +unsigned __int8 *__stdcall std::codecvt::do_length( + int a1, + unsigned __int8 *a2, + unsigned __int8 *a3, + unsigned int a4) +{ + unsigned int v4; // ebx + unsigned int v5; // esi + unsigned int utf8_code; // eax + unsigned __int8 *v8[6]; // [esp+8h] [ebp-18h] BYREF + + v4 = 1; + v8[0] = a2; + v8[1] = a3; + if ( a4 > 1 ) + { + v5 = 0; + do + { + utf8_code = std::`anonymous namespace'::read_utf8_code_point(v8, 0x10FFFFu); + if ( utf8_code > 0x10FFFF ) + return (unsigned __int8 *)(v8[0] - a2); + if ( utf8_code <= 0xFFFF ) + v4 = v5; + v5 = v4 + 1; + v4 += 2; + } + while ( a4 > v4 ); + } + if ( a4 != v4 ) + return (unsigned __int8 *)(v8[0] - a2); + std::`anonymous namespace'::read_utf8_code_point(v8, 0xFFFFu); + return (unsigned __int8 *)(v8[0] - a2); +} + +//----- (0046A3A0) -------------------------------------------------------- +int __stdcall std::codecvt::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (0046A3C0) -------------------------------------------------------- +int std::codecvt::do_encoding() +{ + return 0; +} + +//----- (0046A3D0) -------------------------------------------------------- +int std::codecvt::do_max_length() +{ + return 4; +} + +//----- (0046A3E0) -------------------------------------------------------- +int std::codecvt::do_always_noconv() +{ + return 0; +} + +//----- (0046A3F0) -------------------------------------------------------- +int __stdcall std::codecvt::do_in( + int a1, + unsigned __int8 *a2, + unsigned __int8 *a3, + unsigned __int8 **a4, + char *a5, + char *a6, + char **a7) +{ + int result; // eax + unsigned __int8 *v8[2]; // [esp+8h] [ebp-10h] BYREF + char *v9[2]; // [esp+10h] [ebp-8h] BYREF + + v8[0] = a2; + v8[1] = a3; + v9[0] = a5; + v9[1] = a6; + result = std::`anonymous namespace'::utf16_in(v8, v9, 0x10FFFFu, 1, 0); + *a4 = v8[0]; + *a7 = v9[0]; + return result; +} + +//----- (0046A450) -------------------------------------------------------- +int __stdcall std::codecvt::do_out( + int a1, + unsigned __int16 *a2, + unsigned __int16 *a3, + unsigned __int16 **a4, + _BYTE *a5, + _BYTE *a6, + _BYTE **a7) +{ + int result; // eax + unsigned __int16 *v8[2]; // [esp+4h] [ebp-10h] BYREF + _BYTE *v9[2]; // [esp+Ch] [ebp-8h] BYREF + + v8[0] = a2; + v8[1] = a3; + v9[0] = a5; + v9[1] = a6; + result = std::`anonymous namespace'::utf16_out(v8, v9, 0x10FFFFu, 0); + *a4 = v8[0]; + *a7 = v9[0]; + return result; +} + +//----- (0046A4B0) -------------------------------------------------------- +unsigned __int8 *__stdcall std::codecvt::do_length( + int a1, + unsigned __int8 *a2, + unsigned __int8 *a3, + unsigned int a4) +{ + return (unsigned __int8 *)(std::`anonymous namespace'::utf16_span(a2, a3, a4, 0x10FFFFu, 0) - a2); +} + +//----- (0046A4E0) -------------------------------------------------------- +int __stdcall std::codecvt::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (0046A500) -------------------------------------------------------- +int std::codecvt::do_max_length() +{ + return 1; +} + +//----- (0046A510) -------------------------------------------------------- +int std::codecvt::do_always_noconv() +{ + return 1; +} + +//----- (0046A520) -------------------------------------------------------- +int __stdcall std::codecvt::do_in(int a1, int a2, int a3, _DWORD *a4, int a5, int a6, _DWORD *a7) +{ + *a4 = a2; + *a7 = a5; + return 3; +} + +//----- (0046A540) -------------------------------------------------------- +int __stdcall std::codecvt::do_out(int a1, int a2, int a3, _DWORD *a4, int a5, int a6, _DWORD *a7) +{ + *a4 = a2; + *a7 = a5; + return 3; +} + +//----- (0046A560) -------------------------------------------------------- +unsigned int __stdcall std::codecvt::do_length(int a1, int a2, int a3, unsigned int a4) +{ + unsigned int result; // eax + + result = a3 - a2; + if ( a3 - a2 > a4 ) + return a4; + return result; +} + +//----- (0046A580) -------------------------------------------------------- +int __stdcall std::codecvt::do_unshift(int a1, int a2, int a3, _DWORD *a4) +{ + *a4 = a2; + return 3; +} + +//----- (0046A5A0) -------------------------------------------------------- +BOOL __cdecl std::codecvt::do_encoding() +{ + return ____mb_cur_max_func() == 1; +} + +//----- (0046A620) -------------------------------------------------------- +int __cdecl std::codecvt::do_max_length() +{ + return ____mb_cur_max_func(); +} + +//----- (0046A6A0) -------------------------------------------------------- +int std::codecvt::do_always_noconv() +{ + return 0; +} + +//----- (0046A6B0) -------------------------------------------------------- +int __stdcall std::codecvt::do_in( + unsigned int *a1, + char *a2, + unsigned int a3, + char **a4, + wchar_t *a5, + unsigned int a6, + wchar_t **a7) +{ + char *v7; // esi + wchar_t *v8; // edi + const char *SrcCh; // edi + wchar_t *DstCh; // esi + size_t v11; // eax + int result; // eax + mbstate_t State; // [esp+1Ch] [ebp-20h] BYREF + wchar_t *v14; // [esp+50h] [ebp+14h] + wchar_t *v15; // [esp+50h] [ebp+14h] + wchar_t *v16; // [esp+50h] [ebp+14h] + + v7 = a2; + v8 = a5; + State._Wchar = *a1; + if ( (unsigned int)a5 >= a6 || (unsigned int)a2 >= a3 ) + { +LABEL_12: + result = (unsigned int)v7 < a3; + } + else + { + SrcCh = a2; + DstCh = a5; + while ( 1 ) + { + v11 = mbrtowc(DstCh, SrcCh, a3 - (_DWORD)SrcCh, &State); + if ( v11 == -1 ) + { + v14 = DstCh; + result = 2; + v7 = (char *)SrcCh; + v8 = v14; + goto LABEL_13; + } + if ( v11 == -2 ) + break; + if ( !v11 ) + { + *DstCh = 0; + v11 = 1; + } + SrcCh += v11; + ++DstCh; + *a1 = State._Wchar; + if ( a3 <= (unsigned int)SrcCh || a6 <= (unsigned int)DstCh ) + { + v15 = DstCh; + v7 = (char *)SrcCh; + v8 = v15; + goto LABEL_12; + } + } + v16 = DstCh; + result = 1; + v7 = (char *)SrcCh; + v8 = v16; + } +LABEL_13: + *a4 = v7; + *a7 = v8; + return result; +} + +//----- (0046A7A0) -------------------------------------------------------- +int __stdcall std::codecvt::do_out( + unsigned int *a1, + wchar_t *a2, + unsigned int a3, + wchar_t **a4, + char *a5, + unsigned int a6, + char **a7) +{ + wchar_t *v7; // edi + char *v8; // ebx + size_t Size; // eax + int result; // eax + size_t v11; // eax + char *Dest; // [esp+0h] [ebp-4Ch] + mbstate_t Src; // [esp+24h] [ebp-28h] BYREF + + v7 = a2; + v8 = a5; + Src._Wchar = *a1; + if ( (int)(____mb_cur_max_func() * ((int)(a3 - (_DWORD)a2) >> 1) - (a6 - (_DWORD)a5)) <= 0 ) + { + if ( a3 <= (unsigned int)a2 ) + { +LABEL_18: + result = 0; + goto LABEL_12; + } + while ( 1 ) + { + v11 = wcrtomb(v8, *v7, &Src); + if ( v11 == -1 ) + break; + v8 += v11; + ++v7; + *a1 = Src._Wchar; + if ( a3 <= (unsigned int)v7 ) + goto LABEL_18; + } + } + else + { + if ( a3 <= (unsigned int)a2 || a6 <= (unsigned int)a5 ) + { +LABEL_11: + result = (unsigned int)v7 < a3; + goto LABEL_12; + } + for ( Size = wcrtomb((char *)&Src._State + 1, *a2, &Src); Size != -1; Size = wcrtomb( + (char *)&Src._State + 1, + *v7, + &Src) ) + { + if ( a6 - (unsigned int)v8 < Size ) + { + result = 1; + goto LABEL_12; + } + Dest = v8; + ++v7; + v8 += Size; + memcpy(Dest, (char *)&Src._State + 1, Size); + *a1 = Src._Wchar; + if ( a3 <= (unsigned int)v7 || a6 <= (unsigned int)v8 ) + goto LABEL_11; + } + } + result = 2; +LABEL_12: + *a4 = v7; + *a7 = v8; + return result; +} + +//----- (0046A8D0) -------------------------------------------------------- +int __stdcall std::codecvt::do_length(unsigned int *a1, char *a2, unsigned int a3, int a4) +{ + int v4; // esi + const char *SrcCh; // ebp + int v6; // edi + size_t v7; // eax + mbstate_t State; // [esp+1Ch] [ebp-20h] BYREF + + v4 = 0; + State._Wchar = *a1; + if ( a4 && (unsigned int)a2 < a3 ) + { + SrcCh = a2; + v6 = a4; + do + { + v7 = mbrtowc(0, SrcCh, a3 - (_DWORD)SrcCh, &State); + if ( v7 > 0xFFFFFFFD ) + break; + if ( !v7 ) + v7 = 1; + --v6; + SrcCh += v7; + *a1 = State._Wchar; + v4 += v7; + if ( a3 <= (unsigned int)SrcCh ) + break; + } + while ( v6 ); + } + return v4; +} + +//----- (0046A960) -------------------------------------------------------- +int __stdcall std::collate::_M_compare(char *String1, char *String2) +{ + int v2; // eax + + v2 = strcoll(String1, String2); + return (v2 >> 30) | (v2 != 0); +} + +//----- (0046A990) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +int __stdcall std::collate::do_compare(void *a1, _BYTE *a2, void *a3, int a4) +{ + int i; // eax + char *v5; // eax + int v6; // eax + int v7; // eax + char *v9; // [esp+18h] [ebp-74h] + char *v10; // [esp+18h] [ebp-74h] + char *Str; // [esp+1Ch] [ebp-70h] + char *v12; // [esp+20h] [ebp-6Ch] + int v13; // [esp+24h] [ebp-68h] + char *v14; // [esp+2Ch] [ebp-60h] + char *v15; // [esp+30h] [ebp-5Ch] + char *v16; // [esp+34h] [ebp-58h] + char v17; // [esp+7Bh] [ebp-11h] BYREF + _BYTE *retaddr; // [esp+8Ch] [ebp+0h] + + v15 = (char *)std::string::_S_construct(retaddr, (int)a1); + v16 = (char *)std::string::_S_construct(a2, (int)a3); + Str = v16; + v9 = v15; + v12 = &v16[*((_DWORD *)v16 - 3)]; + v14 = &v15[*((_DWORD *)v15 - 3)]; + for ( i = std::collate::_M_compare(v15, v16); ; i = std::collate::_M_compare(v9, v5 + 1) ) + { + v13 = i; + if ( i ) + break; + v10 = &v9[strlen(v9)]; + v5 = &Str[strlen(Str)]; + if ( v14 == v10 ) + { + if ( v12 == v5 ) + break; + if ( v14 == v10 ) + { + v13 = -1; + break; + } + } + if ( v12 == v5 ) + { + v13 = 1; + break; + } + Str = v5 + 1; + v9 = v10 + 1; + } + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v16 - 1, 0xFFFFFFFF) > 0 ) + goto LABEL_11; + } + else + { + v6 = *((_DWORD *)v16 - 1); + *((_DWORD *)v16 - 1) = v6 - 1; + if ( v6 > 0 ) + goto LABEL_11; + } + std::string::_Rep::_M_destroy(v16 - 12, (int)&v17); +LABEL_11: + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v15 - 1, 0xFFFFFFFF) > 0 ) + return v13; +LABEL_15: + std::string::_Rep::_M_destroy(v15 - 12, (int)&v17); + return v13; + } + v7 = *((_DWORD *)v15 - 1); + *((_DWORD *)v15 - 1) = v7 - 1; + if ( v7 <= 0 ) + goto LABEL_15; + return v13; +} +// 46ABB0: positive sp value 4 has been found +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0046ABD0) -------------------------------------------------------- +size_t __stdcall std::collate::_M_transform(char *Destination, char *Source, size_t MaxCount) +{ + return strxfrm(Destination, Source, MaxCount); +} + +//----- (0046AC00) -------------------------------------------------------- +unsigned int *__thiscall std::collate::do_transform(unsigned int *this, int a2, _BYTE *a3, int a4) +{ + size_t i; // eax + unsigned int v5; // eax + char *v6; // eax + int v7; // eax + unsigned int v9; // [esp+4h] [ebp-84h] + unsigned int v10; // [esp+8h] [ebp-80h] + char *v11; // [esp+1Ch] [ebp-6Ch] + char *v12; // [esp+20h] [ebp-68h] + int v13; // [esp+24h] [ebp-64h] + std::string *v14; // [esp+28h] [ebp-60h] + char *Block; // [esp+2Ch] [ebp-5Ch] + unsigned int v17; // [esp+34h] [ebp-54h] + char *Str; // [esp+38h] [ebp-50h] + int v19; // [esp+7Fh] [ebp-9h] BYREF + + *this = (unsigned int)std::string::_S_construct(0, 0); + v11 = (char *)std::string::_S_construct(a3, a4); + v17 = 2 * (a4 - (_DWORD)a3); + v12 = &v11[*((_DWORD *)v11 - 3)]; + Block = (char *)operator new[](v17); + Str = v11; + for ( i = std::collate::_M_transform(Block, v11, v17); ; i = std::collate::_M_transform(Block, Str, v17) ) + { + if ( v17 <= i ) + { + v17 = i + 1; + operator delete[](Block); + Block = (char *)operator new[](v17); + i = std::collate::_M_transform(Block, Str, v17); + } + std::string::append(this, (std::string *)Block, i, v10); + v6 = &Str[strlen(Str)]; + if ( v12 == v6 ) + break; + Str = v6 + 1; + v13 = *(_DWORD *)(*this - 12); + v14 = (std::string *)(v13 + 1); + if ( (unsigned int)(v13 + 1) > *(_DWORD *)(*this - 8) || *(int *)(*this - 4) > 0 ) + std::string::reserve((int *)this, v14, v9); + *(_BYTE *)(*this + *(_DWORD *)(*this - 12)) = 0; + v5 = *this; + *(_DWORD *)(v5 - 4) = 0; + *(_DWORD *)(v5 - 12) = v14; + *(_BYTE *)(v5 + v13 + 1) = 0; + } + operator delete[](Block); + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v11 - 1, 0xFFFFFFFF) > 0 ) + return this; +LABEL_13: + std::string::_Rep::_M_destroy(v11 - 12, (int)&v19); + return this; + } + v7 = *((_DWORD *)v11 - 1); + *((_DWORD *)v11 - 1) = v7 - 1; + if ( v7 <= 0 ) + goto LABEL_13; + return this; +} +// 46ACE3: variable 'v9' is possibly undefined +// 46AD88: variable 'v10' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0046AEB0) -------------------------------------------------------- +int __thiscall std::collate::hash(void *this, char *a2, char *a3) +{ + char *v3; // edx + int (__stdcall *v4)(char *, char *); // eax + int result; // eax + int v6; // ecx + + v3 = a2; + v4 = *(int (__stdcall **)(char *, char *))(*(_DWORD *)this + 16); + if ( v4 != std::collate::do_hash ) + return v4(a2, a3); + result = 0; + if ( a2 < a3 ) + { + do + { + v6 = *v3++; + result = v6 + __ROL4__(result, 7); + } + while ( a3 != v3 ); + } + return result; +} + +//----- (0046AF00) -------------------------------------------------------- +int __fastcall std::collate::compare(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 8))(a1); +} + +//----- (0046AF10) -------------------------------------------------------- +int __stdcall std::collate::do_hash(char *a1, char *a2) +{ + char *v2; // edx + int result; // eax + int v4; // ecx + + v2 = a1; + result = 0; + if ( a1 < a2 ) + { + do + { + v4 = *v2++; + result = v4 + __ROL4__(result, 7); + } + while ( a2 != v2 ); + } + return result; +} + +//----- (0046AF40) -------------------------------------------------------- +void *__thiscall std::collate::transform(void *this, int a2, int a3, int a4) +{ + (*(void (__thiscall **)(void *, int, int, int))(*(_DWORD *)a2 + 12))(this, a2, a3, a4); + return this; +} + +//----- (0046AF70) -------------------------------------------------------- +int __stdcall std::collate::_M_compare(wchar_t *String1, wchar_t *String2) +{ + int v2; // eax + + v2 = wcscoll(String1, String2); + return (v2 >> 30) | (v2 != 0); +} + +//----- (0046AFA0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +int __stdcall std::collate::do_compare(void *a1, _WORD *a2, void *a3, int a4) +{ + int i; // eax + wchar_t *v5; // eax + int v6; // eax + int v7; // eax + wchar_t *v9; // [esp+18h] [ebp-74h] + wchar_t *v10; // [esp+18h] [ebp-74h] + wchar_t *String; // [esp+1Ch] [ebp-70h] + wchar_t *v12; // [esp+20h] [ebp-6Ch] + int v13; // [esp+24h] [ebp-68h] + wchar_t *v14; // [esp+2Ch] [ebp-60h] + wchar_t *v15; // [esp+30h] [ebp-5Ch] + wchar_t *v16; // [esp+34h] [ebp-58h] + char v17; // [esp+7Bh] [ebp-11h] BYREF + _WORD *retaddr; // [esp+8Ch] [ebp+0h] + + v15 = (wchar_t *)std::wstring::_S_construct(retaddr, (int)a1); + v16 = (wchar_t *)std::wstring::_S_construct(a2, (int)a3); + String = v16; + v9 = v15; + v14 = &v15[*((_DWORD *)v15 - 3)]; + v12 = &String[*((_DWORD *)String - 3)]; + for ( i = std::collate::_M_compare(v15, v16); ; i = std::collate::_M_compare(v9, v5 + 1) ) + { + v13 = i; + if ( i ) + break; + v10 = &v9[wcslen(v9)]; + v5 = &String[wcslen(String)]; + if ( v14 == v10 ) + { + if ( v12 == v5 ) + break; + if ( v14 == v10 ) + { + v13 = -1; + break; + } + } + if ( v12 == v5 ) + { + v13 = 1; + break; + } + String = v5 + 1; + v9 = v10 + 1; + } + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v16 - 1, 0xFFFFFFFF) > 0 ) + goto LABEL_11; + } + else + { + v6 = *((_DWORD *)v16 - 1); + *((_DWORD *)v16 - 1) = v6 - 1; + if ( v6 > 0 ) + goto LABEL_11; + } + std::wstring::_Rep::_M_destroy(v16 - 6, (int)&v17); +LABEL_11: + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v15 - 1, 0xFFFFFFFF) > 0 ) + return v13; +LABEL_15: + std::wstring::_Rep::_M_destroy(v15 - 6, (int)&v17); + return v13; + } + v7 = *((_DWORD *)v15 - 1); + *((_DWORD *)v15 - 1) = v7 - 1; + if ( v7 <= 0 ) + goto LABEL_15; + return v13; +} +// 46B1C8: positive sp value 4 has been found +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0046B1E0) -------------------------------------------------------- +size_t __stdcall std::collate::_M_transform(wchar_t *Destination, wchar_t *Source, size_t MaxCount) +{ + return wcsxfrm(Destination, Source, MaxCount); +} + +//----- (0046B210) -------------------------------------------------------- +unsigned int *__thiscall std::collate::do_transform(unsigned int *this, int a2, _WORD *a3, int a4) +{ + unsigned int i; // eax + unsigned int v5; // eax + wchar_t *v6; // eax + int v7; // eax + wchar_t *v9; // [esp+10h] [ebp-68h] + wchar_t *v10; // [esp+14h] [ebp-64h] + unsigned int v11; // [esp+18h] [ebp-60h] + wchar_t *Block; // [esp+1Ch] [ebp-5Ch] + wchar_t *String; // [esp+24h] [ebp-54h] + size_t lpuexcpt; // [esp+28h] [ebp-50h] + int v16; // [esp+6Fh] [ebp-9h] BYREF + + *this = (unsigned int)std::wstring::_S_construct(0, 0); + v9 = (wchar_t *)std::wstring::_S_construct(a3, a4); + v10 = &v9[*((_DWORD *)v9 - 3)]; + lpuexcpt = a4 - (_DWORD)a3; + if ( (unsigned int)(a4 - (_DWORD)a3) > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + Block = (wchar_t *)operator new[](2 * (a4 - (_DWORD)a3)); + String = v9; + for ( i = std::collate::_M_transform(Block, v9, lpuexcpt); + ; + i = std::collate::_M_transform(Block, String, lpuexcpt) ) + { + if ( lpuexcpt <= i ) + { + lpuexcpt = i + 1; + operator delete[](Block); + if ( lpuexcpt > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + Block = (wchar_t *)operator new[](2 * lpuexcpt); + i = std::collate::_M_transform(Block, String, lpuexcpt); + } + std::wstring::append(this, (char *)Block, i); + v6 = &String[wcslen(String)]; + if ( v10 == v6 ) + break; + String = v6 + 1; + v11 = *(_DWORD *)(*this - 12) + 1; + if ( v11 > *(_DWORD *)(*this - 8) || *(int *)(*this - 4) > 0 ) + std::wstring::reserve((int *)this, v11); + v5 = *this; + *(_WORD *)(v5 + 2 * *(_DWORD *)(*this - 12)) = 0; + *(_DWORD *)(v5 - 4) = 0; + *(_DWORD *)(v5 - 12) = v11; + *(_WORD *)(v5 + 2 * v11) = 0; + } + operator delete[](Block); + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v9 - 1, 0xFFFFFFFF) > 0 ) + return this; +LABEL_15: + std::wstring::_Rep::_M_destroy(v9 - 6, (int)&v16); + return this; + } + v7 = *((_DWORD *)v9 - 1); + *((_DWORD *)v9 - 1) = v7 - 1; + if ( v7 <= 0 ) + goto LABEL_15; + return this; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0046B4F0) -------------------------------------------------------- +int __thiscall std::collate::hash(void *this, unsigned __int16 *a2, unsigned int a3) +{ + unsigned __int16 *v3; // edx + int (__stdcall *v4)(unsigned __int16 *, unsigned int); // eax + int result; // eax + int v6; // ecx + + v3 = a2; + v4 = *(int (__stdcall **)(unsigned __int16 *, unsigned int))(*(_DWORD *)this + 16); + if ( v4 != std::collate::do_hash ) + return v4(a2, a3); + result = 0; + if ( (unsigned int)a2 < a3 ) + { + do + { + v6 = *v3++; + result = v6 + __ROL4__(result, 7); + } + while ( a3 > (unsigned int)v3 ); + } + return result; +} + +//----- (0046B540) -------------------------------------------------------- +int __fastcall std::collate::compare(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 8))(a1); +} + +//----- (0046B550) -------------------------------------------------------- +int __stdcall std::collate::do_hash(unsigned __int16 *a1, unsigned int a2) +{ + unsigned __int16 *v2; // edx + int result; // eax + int v4; // ecx + + v2 = a1; + for ( result = 0; a2 > (unsigned int)v2; result = v4 + __ROL4__(result, 7) ) + v4 = *v2++; + return result; +} + +//----- (0046B580) -------------------------------------------------------- +void *__thiscall std::collate::transform(void *this, int a2, int a3, int a4) +{ + (*(void (__thiscall **)(void *, int, int, int))(*(_DWORD *)a2 + 12))(this, a2, a3, a4); + return this; +} + +//----- (0046B5B0) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + unsigned int v11; // eax + _DWORD *v12; // ebx + unsigned int v13; // eax + unsigned int v14; // edx + unsigned int v15; // eax + int v16; // eax + int v17; // eax + _DWORD *v18; // ecx + unsigned int v19; // eax + unsigned int v20; // edx + unsigned int v21; // eax + int *v22; // eax + bool v24; // al + bool v25; // zf + _DWORD *v26; // eax + char *v27; // eax + char *v28; // eax + unsigned int v29; // edx + _BYTE *v30; // eax + int v31; // eax + _DWORD *v32; // ecx + unsigned int v33; // eax + unsigned int v34; // edx + unsigned int v35; // eax + char *v36; // eax + size_t v37; // edx + size_t v38; // edx + int v39; // edx + char *v40; // eax + char *v41; // eax + _DWORD *v42; // eax + int v43; // eax + bool v44; // bl + bool v45; // zf + _DWORD *v46; // eax + bool v47; // zf + _DWORD *v48; // eax + bool v49; // zf + _DWORD *v50; // eax + bool v51; // dl + bool v52; // zf + _DWORD *v53; // eax + int v54; // eax + bool v55; // zf + char v56; // bl + _DWORD *v57; // eax + int v58; // eax + bool v59; // zf + char v60; // dl + _DWORD *v61; // eax + char v62; // bl + int v63; // eax + bool v64; // zf + _DWORD *v65; // eax + char v66; // bl + int v67; // eax + bool v68; // zf + _DWORD *v69; // eax + bool v70; // zf + char v71; // al + _DWORD *v72; // eax + bool v73; // zf + _DWORD *v74; // eax + bool v75; // cl + char v76; // bl + int v77; // eax + bool v78; // dl + bool v79; // zf + _DWORD *v80; // eax + int v81; // eax + bool v82; // bl + bool v83; // zf + _DWORD *v84; // eax + int v85; // eax + char v86; // dl + bool v87; // zf + _DWORD *v88; // eax + int v89; // eax + bool v90; // dl + bool v91; // zf + _DWORD *v92; // eax + unsigned int v93; // [esp+8h] [ebp-B0h] + std::locale::_Impl *v94; // [esp+18h] [ebp-A0h] + size_t MaxCount; // [esp+1Ch] [ebp-9Ch] + int Buf; // [esp+20h] [ebp-98h] + void *Bufa; // [esp+20h] [ebp-98h] + bool v98; // [esp+26h] [ebp-92h] + char v99; // [esp+27h] [ebp-91h] + unsigned int v100; // [esp+28h] [ebp-90h] + char v101; // [esp+2Ch] [ebp-8Ch] + char v102; // [esp+2Ch] [ebp-8Ch] + int v103; // [esp+30h] [ebp-88h] + char v104; // [esp+30h] [ebp-88h] + char v105; // [esp+34h] [ebp-84h] + int v106; // [esp+34h] [ebp-84h] + size_t v107; // [esp+34h] [ebp-84h] + char v108; // [esp+38h] [ebp-80h] + unsigned int v109; // [esp+38h] [ebp-80h] + _DWORD *v110; // [esp+3Ch] [ebp-7Ch] + char v111; // [esp+40h] [ebp-78h] + bool v112; // [esp+40h] [ebp-78h] + int *v113; // [esp+44h] [ebp-74h] + unsigned int v114; // [esp+44h] [ebp-74h] + char v115; // [esp+48h] [ebp-70h] + bool v116; // [esp+48h] [ebp-70h] + char v117; // [esp+48h] [ebp-70h] + char v118; // [esp+48h] [ebp-70h] + char v119; // [esp+48h] [ebp-70h] + char v120; // [esp+48h] [ebp-70h] + _DWORD *v121; // [esp+4Ch] [ebp-6Ch] + bool v122; // [esp+50h] [ebp-68h] + int v123; // [esp+54h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+58h] [ebp-60h] + bool lpuexcpta; // [esp+58h] [ebp-60h] + char lpuexcptb; // [esp+58h] [ebp-60h] + char lpuexcptc; // [esp+58h] [ebp-60h] + struct _Unwind_Exception *lpuexcptd; // [esp+58h] [ebp-60h] + char lpuexcpte; // [esp+58h] [ebp-60h] + void *Block; // [esp+98h] [ebp-20h] BYREF + size_t v131; // [esp+9Ch] [ebp-1Ch] + int v132[5]; // [esp+A0h] [ebp-18h] BYREF + + v121 = a1; + v110 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v113 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v123 = *v113; + if ( !*v113 ) + { + v42 = operator new(0x68u); + v42[1] = 0; + *v42 = &off_51AF60; + v42[2] = 0; + v42[3] = 0; + *((_BYTE *)v42 + 16) = 0; + v42[5] = 0; + v42[6] = 0; + v42[7] = 0; + v42[8] = 0; + *((_WORD *)v42 + 18) = 0; + *((_BYTE *)v42 + 100) = 0; + v94 = (std::locale::_Impl *)v42; + std::__numpunct_cache::_M_cache((int)v42, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v94, lpuexcpt, v93); + v123 = *v113; + } + v114 = 8; + v103 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v103 != 64 ) + { + v7 = 10; + if ( v103 == 8 ) + v7 = 16; + v114 = v7; + } + lpuexcpta = a2 == -1; + if ( lpuexcpta && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v81 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v82 = lpuexcpta && a1 != 0; + v83 = v81 == -1; + if ( v81 != -1 ) + v82 = 0; + v84 = 0; + if ( !v83 ) + v84 = a1; + v105 = v82; + v121 = v84; + } + else + { + v105 = 0; + } + } + else + { + v105 = a2 == -1; + } + v122 = a4 == -1; + if ( v122 && a3 != 0 ) + { + if ( a3[2] >= a3[3] ) + { + v77 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v78 = v122 && a3 != 0; + v79 = v77 == -1; + if ( v77 != -1 ) + v78 = 0; + v80 = 0; + if ( !v79 ) + v80 = a3; + v101 = v78; + v110 = v80; + } + else + { + v101 = 0; + } + } + else + { + v101 = a4 == -1; + } + if ( v105 != v101 ) + { + if ( v121 && a2 == -1 ) + { + v41 = (char *)v121[2]; + if ( (unsigned int)v41 >= v121[3] ) + { + v85 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v86 = -1; + v87 = v85 == -1; + if ( v85 != -1 ) + v86 = v85; + v88 = 0; + if ( !v87 ) + v88 = v121; + lpuexcptb = v86; + v121 = v88; + } + else + { + lpuexcptb = *v41; + } + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v123 + 16); + v98 = *(_BYTE *)(v123 + 74) == (unsigned __int8)lpuexcptb; + if ( *(_BYTE *)(v123 + 74) == lpuexcptb || *(_BYTE *)(v123 + 75) == lpuexcptb ) + { + if ( (!v8 || *(_BYTE *)(v123 + 37) != lpuexcptb) && *(_BYTE *)(v123 + 36) != lpuexcptb ) + { + v9 = v121[2]; + v10 = v121[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v11 = v121[2]; + v10 = v121[3]; + } + else + { + v11 = v9 + 1; + v121[2] = v11; + } + v111 = 0; + if ( v11 >= v10 ) + { + v52 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v53 = 0; + if ( !v52 ) + v53 = v121; + v111 = v52; + v121 = v53; + } + if ( v122 && v110 != 0 ) + { + if ( v110[2] >= v110[3] ) + { + v89 = (*(int (__fastcall **)(_DWORD *))(*v110 + 36))(v110); + v90 = v122 && v110 != 0; + v91 = v89 == -1; + if ( v89 != -1 ) + v90 = 0; + v92 = 0; + if ( !v91 ) + v92 = v110; + v115 = v90; + v110 = v92; + } + else + { + v115 = 0; + } + } + else + { + v115 = a4 == -1; + } + if ( v111 == v115 ) + { + v104 = 1; + v106 = 0; + v112 = 0; + goto LABEL_43; + } + lpuexcptb = -1; + if ( v121 ) + { + v40 = (char *)v121[2]; + if ( (unsigned int)v40 >= v121[3] ) + { + v62 = -1; + v63 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v64 = v63 == -1; + if ( v63 != -1 ) + v62 = v63; + v65 = 0; + if ( !v64 ) + v65 = v121; + lpuexcptb = v62; + v121 = v65; + } + else + { + lpuexcptb = *v40; + } + } + v8 = *(_BYTE *)(v123 + 16); + } + } + else + { + v98 = 0; + } + v106 = 0; + v112 = 0; + while ( 1 ) + { + if ( v8 && *(_BYTE *)(v123 + 37) == lpuexcptb || *(_BYTE *)(v123 + 36) == lpuexcptb ) + { +LABEL_111: + v104 = 0; + goto LABEL_43; + } + if ( *(_BYTE *)(v123 + 78) != lpuexcptb ) + break; + v24 = v114 == 10 || !v112; + if ( !v24 ) + goto LABEL_33; + v112 = v103 == 0 || v114 == 8; + if ( !v112 ) + { + ++v106; + v112 = v24; + goto LABEL_37; + } + v12 = v121; + v114 = 8; + v106 = 0; + v13 = v121[2]; + v14 = v121[3]; + if ( v13 < v14 ) + { +LABEL_38: + v15 = v13 + 1; + v108 = 0; + v12[2] = v15; + if ( v15 < v14 ) + goto LABEL_39; + goto LABEL_76; + } +LABEL_75: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v108 = 0; + if ( v121[2] < v121[3] ) + { +LABEL_39: + v116 = v122 && v110 != 0; + if ( !v116 ) + goto LABEL_40; + goto LABEL_79; + } +LABEL_76: + v25 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v26 = 0; + if ( !v25 ) + v26 = v121; + v108 = v25; + v121 = v26; + v116 = v122 && v110 != 0; + if ( !v116 ) + { +LABEL_40: + v117 = a4 == -1; + goto LABEL_41; + } +LABEL_79: + if ( v110[2] >= v110[3] ) + { + v43 = (*(int (__fastcall **)(_DWORD *))(*v110 + 36))(v110); + v44 = v116; + v45 = v43 == -1; + if ( v43 != -1 ) + v44 = 0; + v46 = 0; + if ( !v45 ) + v46 = v110; + v117 = v44; + v110 = v46; +LABEL_41: + if ( v108 == v117 ) + goto LABEL_42; + goto LABEL_81; + } + if ( !v108 ) + { +LABEL_42: + v104 = 1; + goto LABEL_43; + } +LABEL_81: + lpuexcptb = -1; + if ( v121 ) + { + v27 = (char *)v121[2]; + if ( (unsigned int)v27 >= v121[3] ) + { + v66 = -1; + v67 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v68 = v67 == -1; + if ( v67 != -1 ) + v66 = v67; + v69 = 0; + if ( !v68 ) + v69 = v121; + lpuexcptb = v66; + v121 = v69; + } + else + { + lpuexcptb = *v27; + } + } + if ( !v112 ) + { + v104 = 0; + goto LABEL_43; + } + v8 = *(_BYTE *)(v123 + 16); + } + if ( !v112 ) + goto LABEL_111; +LABEL_33: + if ( *(_BYTE *)(v123 + 76) != lpuexcptb && *(_BYTE *)(v123 + 77) != lpuexcptb ) + { + v104 = 0; + v112 = 1; + goto LABEL_43; + } + if ( v103 != 0 && v114 != 16 ) + { + v104 = 0; + MaxCount = v114; + Buf = v114; + v112 = 1; + goto LABEL_46; + } + v106 = 0; + v112 = 0; + v114 = 16; +LABEL_37: + v12 = v121; + v13 = v121[2]; + v14 = v121[3]; + if ( v13 < v14 ) + goto LABEL_38; + goto LABEL_75; + } + v98 = 0; + v104 = 1; + lpuexcptb = 0; + v106 = 0; + v112 = 0; +LABEL_43: + v16 = 22; + if ( v114 != 16 ) + v16 = v114; + MaxCount = v16; + Buf = v16; +LABEL_46: + v131 = 0; + Block = v132; + LOBYTE(v132[0]) = 0; + if ( *(_BYTE *)(v123 + 16) ) + std::string::reserve(&Block, 0x20u); + v100 = 0xFFFFFFFF / v114; + v99 = *(_BYTE *)(v123 + 100); + if ( !v99 ) + { + if ( v104 ) + { + v76 = v104; + v102 = 0; + v104 = 0; + lpuexcptd = (struct _Unwind_Exception *)v131; + v22 = (int *)Block; + v99 = v76; + v109 = 0; + goto LABEL_63; + } + v102 = 0; + v109 = 0; + while ( Buf > 10 ) + { + if ( (unsigned __int8)(lpuexcptb - 48) <= 9u ) + goto LABEL_54; + if ( (unsigned __int8)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int8)(lpuexcptb - 65) > 5u ) + goto LABEL_110; + v17 = lpuexcptb - 55; + goto LABEL_55; + } + v17 = lpuexcptb - 87; + if ( v100 < v109 ) + { +LABEL_56: + v18 = v121; + v102 = 1; + v19 = v121[2]; + v20 = v121[3]; + if ( v19 < v20 ) + goto LABEL_57; + goto LABEL_90; + } +LABEL_89: + v102 |= ~v17 < v114 * v109; + v18 = v121; + v109 = v114 * v109 + v17; + v20 = v121[3]; + v19 = v121[2]; + ++v106; + if ( v19 < v20 ) + { +LABEL_57: + v21 = v19 + 1; + v18[2] = v21; + goto LABEL_58; + } +LABEL_90: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v21 = v121[2]; + v20 = v121[3]; +LABEL_58: + v118 = 0; + if ( v21 >= v20 ) + { + v47 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v48 = 0; + if ( !v47 ) + v48 = v121; + v118 = v47; + v121 = v48; + } + if ( v122 && v110 != 0 ) + { + if ( v110[2] >= v110[3] ) + { + v49 = (*(int (__fastcall **)(_DWORD *))(*v110 + 36))(v110) == -1; + v50 = 0; + if ( !v49 ) + v50 = v110; + v51 = v122 && v110 != 0; + v110 = v50; + if ( !v49 ) + v51 = 0; + lpuexcptc = v51; + } + else + { + lpuexcptc = 0; + } + } + else + { + lpuexcptc = a4 == -1; + } + if ( lpuexcptc == v118 ) + { + v99 = 1; + lpuexcptd = (struct _Unwind_Exception *)v131; + v22 = (int *)Block; + goto LABEL_63; + } + if ( v121 ) + { + v28 = (char *)v121[2]; + if ( (unsigned int)v28 >= v121[3] ) + { + v54 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v55 = v54 == -1; + v56 = -1; + if ( v54 != -1 ) + v56 = v54; + v57 = 0; + if ( !v55 ) + v57 = v121; + lpuexcptb = v56; + v121 = v57; + } + else + { + lpuexcptb = *v28; + } + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 47 || (char)(Buf + 48) <= lpuexcptb ) + goto LABEL_110; +LABEL_54: + v17 = lpuexcptb - 48; +LABEL_55: + if ( v100 < v109 ) + goto LABEL_56; + goto LABEL_89; + } + if ( v104 ) + { + v109 = 0; + v102 = 0; + lpuexcptd = (struct _Unwind_Exception *)v131; + v22 = (int *)Block; + v99 = v104; + v104 = 0; + goto LABEL_63; + } + v102 = 0; + v109 = 0; + Bufa = (void *)(v123 + 78); + while ( !*(_BYTE *)(v123 + 16) || *(_BYTE *)(v123 + 37) != lpuexcptb ) + { + if ( lpuexcptb == *(_BYTE *)(v123 + 36) || (v30 = memchr(Bufa, lpuexcptb, MaxCount)) == 0 ) + { +LABEL_110: + v99 = 0; + lpuexcptd = (struct _Unwind_Exception *)v131; + v22 = (int *)Block; + goto LABEL_63; + } + v31 = v30 - (_BYTE *)Bufa; + if ( v31 > 15 ) + v31 -= 6; + if ( v100 >= v109 ) + { + v102 |= ~v31 < v114 * v109; + ++v106; + v109 = v114 * v109 + v31; + goto LABEL_122; + } + v32 = v121; + v102 = v99; + v34 = v121[3]; + v33 = v121[2]; + if ( v33 < v34 ) + { +LABEL_123: + v35 = v33 + 1; + v32[2] = v35; + goto LABEL_124; + } +LABEL_130: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v35 = v121[2]; + v34 = v121[3]; +LABEL_124: + v119 = 0; + if ( v34 <= v35 ) + { + v70 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v71 = 0; + if ( v70 ) + v71 = v99; + v119 = v71; + v72 = 0; + if ( !v70 ) + v72 = v121; + v121 = v72; + } + if ( v122 && v110 != 0 ) + { + if ( v110[2] >= v110[3] ) + { + v73 = (*(int (__fastcall **)(_DWORD *))(*v110 + 36))(v110) == -1; + v74 = 0; + if ( !v73 ) + v74 = v110; + v75 = v122 && v110 != 0; + v110 = v74; + if ( !v73 ) + v75 = 0; + lpuexcpte = v75; + } + else + { + lpuexcpte = 0; + } + } + else + { + lpuexcpte = a4 == -1; + } + if ( lpuexcpte == v119 ) + { + lpuexcptd = (struct _Unwind_Exception *)v131; + v22 = (int *)Block; + goto LABEL_63; + } + if ( v121 ) + { + v36 = (char *)v121[2]; + if ( (unsigned int)v36 >= v121[3] ) + { + v58 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v59 = v58 == -1; + v60 = -1; + if ( v58 != -1 ) + v60 = v58; + v61 = 0; + if ( !v59 ) + v61 = v121; + lpuexcptb = v60; + v121 = v61; + } + else + { + lpuexcptb = *v36; + } + } + else + { + lpuexcptb = -1; + } + } + v22 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v131; + if ( v106 ) + { + v120 = v106; + v37 = 15; + if ( Block != v132 ) + v37 = v132[0]; + v107 = v131 + 1; + if ( v131 + 1 > v37 ) + { + std::string::_M_mutate((int)&Block, v131, 0, 0, 1u); + v22 = (int *)Block; + } + v38 = v107; + v106 = 0; + *((_BYTE *)lpuexcptd + (_DWORD)v22) = v120; + v131 = v38; + *((_BYTE *)Block + v38) = 0; +LABEL_122: + v32 = v121; + v33 = v121[2]; + v34 = v121[3]; + if ( v33 < v34 ) + goto LABEL_123; + goto LABEL_130; + } + v99 = 0; + v104 = *(_BYTE *)(v123 + 16); +LABEL_63: + if ( lpuexcptd ) + { + v29 = 15; + if ( v22 != v132 ) + v29 = v132[0]; + if ( (unsigned int)lpuexcptd + 1 > v29 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v22 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v22) = v106; + v131 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v123 + 8), *(_DWORD *)(v123 + 12), (int)&Block) ) + *a6 = 4; + v22 = (int *)Block; + if ( v112 || v131 | v106 ) + goto LABEL_102; +LABEL_66: + *a7 = 0; + *a6 = 4; + } + else + { + if ( !v106 && !v112 ) + goto LABEL_66; +LABEL_102: + if ( v104 ) + goto LABEL_66; + if ( v102 ) + { + *a7 = -1; + *a6 = 4; + } + else + { + v39 = -v109; + if ( !v98 ) + v39 = v109; + *a7 = v39; + } + } + if ( v99 ) + *a6 |= 2u; + if ( v22 != v132 ) + operator delete(v22); + return v121; +} +// 46C0B7: variable 'v93' is possibly undefined +// 50C628: using guessed type signed __int32 std::numpunct::id; +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (0046C5E0) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + unsigned int v11; // eax + _DWORD *v12; // ebx + unsigned int v13; // eax + unsigned int v14; // edx + unsigned int v15; // eax + int v16; // eax + int v17; // eax + _DWORD *v18; // ecx + unsigned int v19; // eax + unsigned int v20; // edx + unsigned int v21; // eax + int *v22; // eax + bool v24; // al + bool v25; // zf + _DWORD *v26; // eax + char *v27; // eax + char *v28; // eax + unsigned int v29; // edx + _BYTE *v30; // eax + int v31; // eax + _DWORD *v32; // ecx + unsigned int v33; // eax + unsigned int v34; // edx + unsigned int v35; // eax + char *v36; // eax + size_t v37; // edx + size_t v38; // edx + int v39; // edx + char *v40; // eax + char *v41; // eax + _DWORD *v42; // eax + int v43; // eax + bool v44; // dl + bool v45; // zf + _DWORD *v46; // eax + bool v47; // zf + _DWORD *v48; // eax + bool v49; // zf + _DWORD *v50; // eax + bool v51; // cl + bool v52; // zf + _DWORD *v53; // eax + int v54; // eax + bool v55; // zf + char v56; // bl + _DWORD *v57; // eax + int v58; // eax + bool v59; // zf + char v60; // dl + _DWORD *v61; // eax + char v62; // bl + int v63; // eax + bool v64; // zf + _DWORD *v65; // eax + char v66; // bl + int v67; // eax + bool v68; // zf + _DWORD *v69; // eax + bool v70; // zf + char v71; // al + _DWORD *v72; // eax + bool v73; // zf + _DWORD *v74; // eax + bool v75; // cl + char v76; // bl + int v77; // eax + bool v78; // dl + bool v79; // zf + _DWORD *v80; // eax + int v81; // eax + bool v82; // bl + bool v83; // zf + _DWORD *v84; // eax + int v85; // eax + char v86; // dl + bool v87; // zf + _DWORD *v88; // eax + int v89; // eax + bool v90; // dl + bool v91; // zf + _DWORD *v92; // eax + unsigned int v93; // [esp+8h] [ebp-B0h] + std::locale::_Impl *v94; // [esp+10h] [ebp-A8h] + bool v95; // [esp+14h] [ebp-A4h] + size_t MaxCount; // [esp+18h] [ebp-A0h] + unsigned int v97; // [esp+1Ch] [ebp-9Ch] + int Buf; // [esp+20h] [ebp-98h] + void *Bufa; // [esp+20h] [ebp-98h] + char v100; // [esp+27h] [ebp-91h] + unsigned int v101; // [esp+28h] [ebp-90h] + char v102; // [esp+2Ch] [ebp-8Ch] + char v103; // [esp+2Ch] [ebp-8Ch] + int v104; // [esp+30h] [ebp-88h] + char v105; // [esp+30h] [ebp-88h] + char v106; // [esp+34h] [ebp-84h] + int v107; // [esp+34h] [ebp-84h] + size_t v108; // [esp+34h] [ebp-84h] + char v109; // [esp+38h] [ebp-80h] + unsigned int v110; // [esp+38h] [ebp-80h] + _DWORD *v111; // [esp+3Ch] [ebp-7Ch] + char v112; // [esp+40h] [ebp-78h] + bool v113; // [esp+40h] [ebp-78h] + int *v114; // [esp+44h] [ebp-74h] + unsigned int v115; // [esp+44h] [ebp-74h] + char v116; // [esp+48h] [ebp-70h] + bool v117; // [esp+48h] [ebp-70h] + char v118; // [esp+48h] [ebp-70h] + char v119; // [esp+48h] [ebp-70h] + char v120; // [esp+48h] [ebp-70h] + char v121; // [esp+48h] [ebp-70h] + _DWORD *v122; // [esp+4Ch] [ebp-6Ch] + bool v123; // [esp+50h] [ebp-68h] + int v124; // [esp+54h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+58h] [ebp-60h] + bool lpuexcpta; // [esp+58h] [ebp-60h] + char lpuexcptb; // [esp+58h] [ebp-60h] + char lpuexcptc; // [esp+58h] [ebp-60h] + struct _Unwind_Exception *lpuexcptd; // [esp+58h] [ebp-60h] + char lpuexcpte; // [esp+58h] [ebp-60h] + void *Block; // [esp+98h] [ebp-20h] BYREF + size_t v132; // [esp+9Ch] [ebp-1Ch] + int v133[5]; // [esp+A0h] [ebp-18h] BYREF + + v122 = a1; + v111 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v114 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v124 = *v114; + if ( !*v114 ) + { + v42 = operator new(0x68u); + v42[1] = 0; + *v42 = &off_51AF60; + v42[2] = 0; + v42[3] = 0; + *((_BYTE *)v42 + 16) = 0; + v42[5] = 0; + v42[6] = 0; + v42[7] = 0; + v42[8] = 0; + *((_WORD *)v42 + 18) = 0; + *((_BYTE *)v42 + 100) = 0; + v94 = (std::locale::_Impl *)v42; + std::__numpunct_cache::_M_cache((int)v42, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v94, lpuexcpt, v93); + v124 = *v114; + } + v115 = 8; + v104 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v104 != 64 ) + { + v7 = 10; + if ( v104 == 8 ) + v7 = 16; + v115 = v7; + } + lpuexcpta = a2 == -1; + if ( lpuexcpta && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v81 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v82 = lpuexcpta && a1 != 0; + v83 = v81 == -1; + if ( v81 != -1 ) + v82 = 0; + v84 = 0; + if ( !v83 ) + v84 = a1; + v106 = v82; + v122 = v84; + } + else + { + v106 = 0; + } + } + else + { + v106 = a2 == -1; + } + v123 = a4 == -1; + if ( v123 && a3 != 0 ) + { + if ( a3[2] >= a3[3] ) + { + v77 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v78 = v123 && a3 != 0; + v79 = v77 == -1; + if ( v77 != -1 ) + v78 = 0; + v80 = 0; + if ( !v79 ) + v80 = a3; + v102 = v78; + v111 = v80; + } + else + { + v102 = 0; + } + } + else + { + v102 = a4 == -1; + } + if ( v106 != v102 ) + { + if ( v122 && a2 == -1 ) + { + v41 = (char *)v122[2]; + if ( (unsigned int)v41 >= v122[3] ) + { + v85 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + v86 = -1; + v87 = v85 == -1; + if ( v85 != -1 ) + v86 = v85; + v88 = 0; + if ( !v87 ) + v88 = v122; + lpuexcptb = v86; + v122 = v88; + } + else + { + lpuexcptb = *v41; + } + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v124 + 16); + v95 = *(_BYTE *)(v124 + 74) == (unsigned __int8)lpuexcptb; + if ( *(_BYTE *)(v124 + 74) == lpuexcptb || *(_BYTE *)(v124 + 75) == lpuexcptb ) + { + if ( (!v8 || *(_BYTE *)(v124 + 37) != lpuexcptb) && *(_BYTE *)(v124 + 36) != lpuexcptb ) + { + v9 = v122[2]; + v10 = v122[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v11 = v122[2]; + v10 = v122[3]; + } + else + { + v11 = v9 + 1; + v122[2] = v11; + } + v112 = 0; + if ( v11 >= v10 ) + { + v52 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122) == -1; + v53 = 0; + if ( !v52 ) + v53 = v122; + v112 = v52; + v122 = v53; + } + if ( v123 && v111 != 0 ) + { + if ( v111[2] >= v111[3] ) + { + v89 = (*(int (__fastcall **)(_DWORD *))(*v111 + 36))(v111); + v90 = v123 && v111 != 0; + v91 = v89 == -1; + if ( v89 != -1 ) + v90 = 0; + v92 = 0; + if ( !v91 ) + v92 = v111; + v116 = v90; + v111 = v92; + } + else + { + v116 = 0; + } + } + else + { + v116 = a4 == -1; + } + if ( v112 == v116 ) + { + v105 = 1; + v107 = 0; + v113 = 0; + goto LABEL_43; + } + lpuexcptb = -1; + if ( v122 ) + { + v40 = (char *)v122[2]; + if ( (unsigned int)v40 >= v122[3] ) + { + v62 = -1; + v63 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + v64 = v63 == -1; + if ( v63 != -1 ) + v62 = v63; + v65 = 0; + if ( !v64 ) + v65 = v122; + lpuexcptb = v62; + v122 = v65; + } + else + { + lpuexcptb = *v40; + } + } + v8 = *(_BYTE *)(v124 + 16); + } + } + else + { + v95 = 0; + } + v107 = 0; + v113 = 0; + while ( 1 ) + { + if ( v8 && *(_BYTE *)(v124 + 37) == lpuexcptb || *(_BYTE *)(v124 + 36) == lpuexcptb ) + { +LABEL_111: + v105 = 0; + goto LABEL_43; + } + if ( *(_BYTE *)(v124 + 78) != lpuexcptb ) + break; + v24 = v115 == 10 || !v113; + if ( !v24 ) + goto LABEL_33; + v113 = v104 == 0 || v115 == 8; + if ( !v113 ) + { + ++v107; + v113 = v24; + goto LABEL_37; + } + v12 = v122; + v115 = 8; + v107 = 0; + v13 = v122[2]; + v14 = v122[3]; + if ( v13 < v14 ) + { +LABEL_38: + v15 = v13 + 1; + v109 = 0; + v12[2] = v15; + if ( v15 < v14 ) + goto LABEL_39; + goto LABEL_76; + } +LABEL_75: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v109 = 0; + if ( v122[2] < v122[3] ) + { +LABEL_39: + v117 = v123 && v111 != 0; + if ( !v117 ) + goto LABEL_40; + goto LABEL_79; + } +LABEL_76: + v25 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122) == -1; + v26 = 0; + if ( !v25 ) + v26 = v122; + v109 = v25; + v122 = v26; + v117 = v123 && v111 != 0; + if ( !v117 ) + { +LABEL_40: + v118 = a4 == -1; + goto LABEL_41; + } +LABEL_79: + if ( v111[2] >= v111[3] ) + { + v43 = (*(int (__fastcall **)(_DWORD *))(*v111 + 36))(v111); + v44 = v117; + v45 = v43 == -1; + if ( v43 != -1 ) + v44 = 0; + v46 = 0; + if ( !v45 ) + v46 = v111; + v118 = v44; + v111 = v46; +LABEL_41: + if ( v109 == v118 ) + goto LABEL_42; + goto LABEL_81; + } + if ( !v109 ) + { +LABEL_42: + v105 = 1; + goto LABEL_43; + } +LABEL_81: + lpuexcptb = -1; + if ( v122 ) + { + v27 = (char *)v122[2]; + if ( (unsigned int)v27 >= v122[3] ) + { + v66 = -1; + v67 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + v68 = v67 == -1; + if ( v67 != -1 ) + v66 = v67; + v69 = 0; + if ( !v68 ) + v69 = v122; + lpuexcptb = v66; + v122 = v69; + } + else + { + lpuexcptb = *v27; + } + } + if ( !v113 ) + { + v105 = 0; + goto LABEL_43; + } + v8 = *(_BYTE *)(v124 + 16); + } + if ( !v113 ) + goto LABEL_111; +LABEL_33: + if ( *(_BYTE *)(v124 + 76) != lpuexcptb && *(_BYTE *)(v124 + 77) != lpuexcptb ) + { + v105 = 0; + v113 = 1; + goto LABEL_43; + } + if ( v104 != 0 && v115 != 16 ) + { + v105 = 0; + MaxCount = v115; + Buf = v115; + v113 = 1; + goto LABEL_46; + } + v107 = 0; + v113 = 0; + v115 = 16; +LABEL_37: + v12 = v122; + v13 = v122[2]; + v14 = v122[3]; + if ( v13 < v14 ) + goto LABEL_38; + goto LABEL_75; + } + v95 = 0; + v105 = 1; + lpuexcptb = 0; + v107 = 0; + v113 = 0; +LABEL_43: + v16 = 22; + if ( v115 != 16 ) + v16 = v115; + MaxCount = v16; + Buf = v16; +LABEL_46: + v132 = 0; + Block = v133; + LOBYTE(v133[0]) = 0; + if ( *(_BYTE *)(v124 + 16) ) + std::string::reserve(&Block, 0x20u); + v97 = v95 + 0x7FFFFFFF; + v101 = v97 / v115; + v100 = *(_BYTE *)(v124 + 100); + if ( !v100 ) + { + if ( v105 ) + { + v76 = v105; + v103 = 0; + v105 = 0; + lpuexcptd = (struct _Unwind_Exception *)v132; + v22 = (int *)Block; + v100 = v76; + v110 = 0; + goto LABEL_63; + } + v103 = 0; + v110 = 0; + while ( Buf > 10 ) + { + if ( (unsigned __int8)(lpuexcptb - 48) <= 9u ) + goto LABEL_54; + if ( (unsigned __int8)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int8)(lpuexcptb - 65) > 5u ) + goto LABEL_110; + v17 = lpuexcptb - 55; + goto LABEL_55; + } + v17 = lpuexcptb - 87; + if ( v101 < v110 ) + { +LABEL_56: + v18 = v122; + v103 = 1; + v19 = v122[2]; + v20 = v122[3]; + if ( v19 < v20 ) + goto LABEL_57; + goto LABEL_90; + } +LABEL_89: + v103 |= v97 - v17 < v115 * v110; + v18 = v122; + v110 = v115 * v110 + v17; + v20 = v122[3]; + v19 = v122[2]; + ++v107; + if ( v19 < v20 ) + { +LABEL_57: + v21 = v19 + 1; + v18[2] = v21; + goto LABEL_58; + } +LABEL_90: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v21 = v122[2]; + v20 = v122[3]; +LABEL_58: + v119 = 0; + if ( v21 >= v20 ) + { + v47 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122) == -1; + v48 = 0; + if ( !v47 ) + v48 = v122; + v119 = v47; + v122 = v48; + } + if ( v123 && v111 != 0 ) + { + if ( v111[2] >= v111[3] ) + { + v49 = (*(int (__fastcall **)(_DWORD *))(*v111 + 36))(v111) == -1; + v50 = 0; + if ( !v49 ) + v50 = v111; + v51 = v123 && v111 != 0; + v111 = v50; + if ( !v49 ) + v51 = 0; + lpuexcptc = v51; + } + else + { + lpuexcptc = 0; + } + } + else + { + lpuexcptc = a4 == -1; + } + if ( lpuexcptc == v119 ) + { + v100 = 1; + lpuexcptd = (struct _Unwind_Exception *)v132; + v22 = (int *)Block; + goto LABEL_63; + } + if ( v122 ) + { + v28 = (char *)v122[2]; + if ( (unsigned int)v28 >= v122[3] ) + { + v54 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + v55 = v54 == -1; + v56 = -1; + if ( v54 != -1 ) + v56 = v54; + v57 = 0; + if ( !v55 ) + v57 = v122; + lpuexcptb = v56; + v122 = v57; + } + else + { + lpuexcptb = *v28; + } + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 47 || (char)(Buf + 48) <= lpuexcptb ) + goto LABEL_110; +LABEL_54: + v17 = lpuexcptb - 48; +LABEL_55: + if ( v101 < v110 ) + goto LABEL_56; + goto LABEL_89; + } + if ( v105 ) + { + v110 = 0; + v103 = 0; + lpuexcptd = (struct _Unwind_Exception *)v132; + v22 = (int *)Block; + v100 = v105; + v105 = 0; + goto LABEL_63; + } + v103 = 0; + v110 = 0; + Bufa = (void *)(v124 + 78); + while ( !*(_BYTE *)(v124 + 16) || *(_BYTE *)(v124 + 37) != lpuexcptb ) + { + if ( lpuexcptb == *(_BYTE *)(v124 + 36) || (v30 = memchr(Bufa, lpuexcptb, MaxCount)) == 0 ) + { +LABEL_110: + v100 = 0; + lpuexcptd = (struct _Unwind_Exception *)v132; + v22 = (int *)Block; + goto LABEL_63; + } + v31 = v30 - (_BYTE *)Bufa; + if ( v31 > 15 ) + v31 -= 6; + if ( v101 >= v110 ) + { + v103 |= v97 - v31 < v115 * v110; + ++v107; + v110 = v115 * v110 + v31; + goto LABEL_122; + } + v32 = v122; + v103 = v100; + v34 = v122[3]; + v33 = v122[2]; + if ( v33 < v34 ) + { +LABEL_123: + v35 = v33 + 1; + v32[2] = v35; + goto LABEL_124; + } +LABEL_130: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v35 = v122[2]; + v34 = v122[3]; +LABEL_124: + v120 = 0; + if ( v34 <= v35 ) + { + v70 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122) == -1; + v71 = 0; + if ( v70 ) + v71 = v100; + v120 = v71; + v72 = 0; + if ( !v70 ) + v72 = v122; + v122 = v72; + } + if ( v123 && v111 != 0 ) + { + if ( v111[2] >= v111[3] ) + { + v73 = (*(int (__fastcall **)(_DWORD *))(*v111 + 36))(v111) == -1; + v74 = 0; + if ( !v73 ) + v74 = v111; + v75 = v123 && v111 != 0; + v111 = v74; + if ( !v73 ) + v75 = 0; + lpuexcpte = v75; + } + else + { + lpuexcpte = 0; + } + } + else + { + lpuexcpte = a4 == -1; + } + if ( lpuexcpte == v120 ) + { + lpuexcptd = (struct _Unwind_Exception *)v132; + v22 = (int *)Block; + goto LABEL_63; + } + if ( v122 ) + { + v36 = (char *)v122[2]; + if ( (unsigned int)v36 >= v122[3] ) + { + v58 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + v59 = v58 == -1; + v60 = -1; + if ( v58 != -1 ) + v60 = v58; + v61 = 0; + if ( !v59 ) + v61 = v122; + lpuexcptb = v60; + v122 = v61; + } + else + { + lpuexcptb = *v36; + } + } + else + { + lpuexcptb = -1; + } + } + v22 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v132; + if ( v107 ) + { + v121 = v107; + v37 = 15; + if ( Block != v133 ) + v37 = v133[0]; + v108 = v132 + 1; + if ( v132 + 1 > v37 ) + { + std::string::_M_mutate((int)&Block, v132, 0, 0, 1u); + v22 = (int *)Block; + } + v38 = v108; + v107 = 0; + *((_BYTE *)lpuexcptd + (_DWORD)v22) = v121; + v132 = v38; + *((_BYTE *)Block + v38) = 0; +LABEL_122: + v32 = v122; + v33 = v122[2]; + v34 = v122[3]; + if ( v33 < v34 ) + goto LABEL_123; + goto LABEL_130; + } + v100 = 0; + v105 = *(_BYTE *)(v124 + 16); +LABEL_63: + if ( lpuexcptd ) + { + v29 = 15; + if ( v22 != v133 ) + v29 = v133[0]; + if ( (unsigned int)lpuexcptd + 1 > v29 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v22 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v22) = v107; + v132 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v124 + 8), *(_DWORD *)(v124 + 12), (int)&Block) ) + *a6 = 4; + v22 = (int *)Block; + if ( v113 || v132 | v107 ) + goto LABEL_102; +LABEL_66: + *a7 = 0; + *a6 = 4; + } + else + { + if ( !v107 && !v113 ) + goto LABEL_66; +LABEL_102: + if ( v105 ) + goto LABEL_66; + if ( v103 ) + { + *a7 = v95 + 0x7FFFFFFF; + *a6 = 4; + } + else + { + v39 = -v110; + if ( !v95 ) + v39 = v110; + *a7 = v39; + } + } + if ( v100 ) + *a6 |= 2u; + if ( v22 != v133 ) + operator delete(v22); + return v122; +} +// 46D0F5: variable 'v93' is possibly undefined +// 50C628: using guessed type signed __int32 std::numpunct::id; +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (0046D620) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + unsigned int v11; // eax + _DWORD *v12; // ebx + unsigned int v13; // eax + unsigned int v14; // edx + unsigned int v15; // eax + int v16; // eax + int v17; // eax + _DWORD *v18; // ecx + unsigned int v19; // eax + unsigned int v20; // edx + unsigned int v21; // eax + int *v22; // eax + bool v24; // al + bool v25; // zf + _DWORD *v26; // eax + char *v27; // eax + char *v28; // eax + unsigned int v29; // edx + _BYTE *v30; // eax + int v31; // eax + _DWORD *v32; // ecx + unsigned int v33; // eax + unsigned int v34; // edx + unsigned int v35; // eax + char *v36; // eax + size_t v37; // edx + size_t v38; // edx + int v39; // edx + char *v40; // eax + char *v41; // eax + _DWORD *v42; // eax + int v43; // eax + bool v44; // bl + bool v45; // zf + _DWORD *v46; // eax + bool v47; // zf + _DWORD *v48; // eax + bool v49; // zf + _DWORD *v50; // eax + bool v51; // dl + bool v52; // zf + _DWORD *v53; // eax + int v54; // eax + bool v55; // zf + char v56; // bl + _DWORD *v57; // eax + int v58; // eax + bool v59; // zf + char v60; // dl + _DWORD *v61; // eax + char v62; // bl + int v63; // eax + bool v64; // zf + _DWORD *v65; // eax + char v66; // bl + int v67; // eax + bool v68; // zf + _DWORD *v69; // eax + bool v70; // zf + char v71; // al + _DWORD *v72; // eax + bool v73; // zf + _DWORD *v74; // eax + bool v75; // cl + char v76; // bl + int v77; // eax + bool v78; // dl + bool v79; // zf + _DWORD *v80; // eax + int v81; // eax + bool v82; // bl + bool v83; // zf + _DWORD *v84; // eax + int v85; // eax + char v86; // dl + bool v87; // zf + _DWORD *v88; // eax + int v89; // eax + bool v90; // dl + bool v91; // zf + _DWORD *v92; // eax + unsigned int v93; // [esp+8h] [ebp-B0h] + std::locale::_Impl *v94; // [esp+18h] [ebp-A0h] + size_t MaxCount; // [esp+1Ch] [ebp-9Ch] + int Buf; // [esp+20h] [ebp-98h] + void *Bufa; // [esp+20h] [ebp-98h] + bool v98; // [esp+26h] [ebp-92h] + char v99; // [esp+27h] [ebp-91h] + unsigned int v100; // [esp+28h] [ebp-90h] + char v101; // [esp+2Ch] [ebp-8Ch] + char v102; // [esp+2Ch] [ebp-8Ch] + int v103; // [esp+30h] [ebp-88h] + char v104; // [esp+30h] [ebp-88h] + char v105; // [esp+34h] [ebp-84h] + int v106; // [esp+34h] [ebp-84h] + size_t v107; // [esp+34h] [ebp-84h] + char v108; // [esp+38h] [ebp-80h] + unsigned int v109; // [esp+38h] [ebp-80h] + _DWORD *v110; // [esp+3Ch] [ebp-7Ch] + char v111; // [esp+40h] [ebp-78h] + bool v112; // [esp+40h] [ebp-78h] + int *v113; // [esp+44h] [ebp-74h] + unsigned int v114; // [esp+44h] [ebp-74h] + char v115; // [esp+48h] [ebp-70h] + bool v116; // [esp+48h] [ebp-70h] + char v117; // [esp+48h] [ebp-70h] + char v118; // [esp+48h] [ebp-70h] + char v119; // [esp+48h] [ebp-70h] + char v120; // [esp+48h] [ebp-70h] + _DWORD *v121; // [esp+4Ch] [ebp-6Ch] + bool v122; // [esp+50h] [ebp-68h] + int v123; // [esp+54h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+58h] [ebp-60h] + bool lpuexcpta; // [esp+58h] [ebp-60h] + char lpuexcptb; // [esp+58h] [ebp-60h] + char lpuexcptc; // [esp+58h] [ebp-60h] + struct _Unwind_Exception *lpuexcptd; // [esp+58h] [ebp-60h] + char lpuexcpte; // [esp+58h] [ebp-60h] + void *Block; // [esp+98h] [ebp-20h] BYREF + size_t v131; // [esp+9Ch] [ebp-1Ch] + int v132[5]; // [esp+A0h] [ebp-18h] BYREF + + v121 = a1; + v110 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v113 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v123 = *v113; + if ( !*v113 ) + { + v42 = operator new(0x68u); + v42[1] = 0; + *v42 = &off_51AF60; + v42[2] = 0; + v42[3] = 0; + *((_BYTE *)v42 + 16) = 0; + v42[5] = 0; + v42[6] = 0; + v42[7] = 0; + v42[8] = 0; + *((_WORD *)v42 + 18) = 0; + *((_BYTE *)v42 + 100) = 0; + v94 = (std::locale::_Impl *)v42; + std::__numpunct_cache::_M_cache((int)v42, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v94, lpuexcpt, v93); + v123 = *v113; + } + v114 = 8; + v103 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v103 != 64 ) + { + v7 = 10; + if ( v103 == 8 ) + v7 = 16; + v114 = v7; + } + lpuexcpta = a2 == -1; + if ( lpuexcpta && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v81 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v82 = lpuexcpta && a1 != 0; + v83 = v81 == -1; + if ( v81 != -1 ) + v82 = 0; + v84 = 0; + if ( !v83 ) + v84 = a1; + v105 = v82; + v121 = v84; + } + else + { + v105 = 0; + } + } + else + { + v105 = a2 == -1; + } + v122 = a4 == -1; + if ( v122 && a3 != 0 ) + { + if ( a3[2] >= a3[3] ) + { + v77 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v78 = v122 && a3 != 0; + v79 = v77 == -1; + if ( v77 != -1 ) + v78 = 0; + v80 = 0; + if ( !v79 ) + v80 = a3; + v101 = v78; + v110 = v80; + } + else + { + v101 = 0; + } + } + else + { + v101 = a4 == -1; + } + if ( v105 != v101 ) + { + if ( v121 && a2 == -1 ) + { + v41 = (char *)v121[2]; + if ( (unsigned int)v41 >= v121[3] ) + { + v85 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v86 = -1; + v87 = v85 == -1; + if ( v85 != -1 ) + v86 = v85; + v88 = 0; + if ( !v87 ) + v88 = v121; + lpuexcptb = v86; + v121 = v88; + } + else + { + lpuexcptb = *v41; + } + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v123 + 16); + v98 = *(_BYTE *)(v123 + 74) == (unsigned __int8)lpuexcptb; + if ( *(_BYTE *)(v123 + 74) == lpuexcptb || *(_BYTE *)(v123 + 75) == lpuexcptb ) + { + if ( (!v8 || *(_BYTE *)(v123 + 37) != lpuexcptb) && *(_BYTE *)(v123 + 36) != lpuexcptb ) + { + v9 = v121[2]; + v10 = v121[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v11 = v121[2]; + v10 = v121[3]; + } + else + { + v11 = v9 + 1; + v121[2] = v11; + } + v111 = 0; + if ( v11 >= v10 ) + { + v52 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v53 = 0; + if ( !v52 ) + v53 = v121; + v111 = v52; + v121 = v53; + } + if ( v122 && v110 != 0 ) + { + if ( v110[2] >= v110[3] ) + { + v89 = (*(int (__fastcall **)(_DWORD *))(*v110 + 36))(v110); + v90 = v122 && v110 != 0; + v91 = v89 == -1; + if ( v89 != -1 ) + v90 = 0; + v92 = 0; + if ( !v91 ) + v92 = v110; + v115 = v90; + v110 = v92; + } + else + { + v115 = 0; + } + } + else + { + v115 = a4 == -1; + } + if ( v111 == v115 ) + { + v104 = 1; + v106 = 0; + v112 = 0; + goto LABEL_43; + } + lpuexcptb = -1; + if ( v121 ) + { + v40 = (char *)v121[2]; + if ( (unsigned int)v40 >= v121[3] ) + { + v62 = -1; + v63 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v64 = v63 == -1; + if ( v63 != -1 ) + v62 = v63; + v65 = 0; + if ( !v64 ) + v65 = v121; + lpuexcptb = v62; + v121 = v65; + } + else + { + lpuexcptb = *v40; + } + } + v8 = *(_BYTE *)(v123 + 16); + } + } + else + { + v98 = 0; + } + v106 = 0; + v112 = 0; + while ( 1 ) + { + if ( v8 && *(_BYTE *)(v123 + 37) == lpuexcptb || *(_BYTE *)(v123 + 36) == lpuexcptb ) + { +LABEL_111: + v104 = 0; + goto LABEL_43; + } + if ( *(_BYTE *)(v123 + 78) != lpuexcptb ) + break; + v24 = v114 == 10 || !v112; + if ( !v24 ) + goto LABEL_33; + v112 = v103 == 0 || v114 == 8; + if ( !v112 ) + { + ++v106; + v112 = v24; + goto LABEL_37; + } + v12 = v121; + v114 = 8; + v106 = 0; + v13 = v121[2]; + v14 = v121[3]; + if ( v13 < v14 ) + { +LABEL_38: + v15 = v13 + 1; + v108 = 0; + v12[2] = v15; + if ( v15 < v14 ) + goto LABEL_39; + goto LABEL_76; + } +LABEL_75: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v108 = 0; + if ( v121[2] < v121[3] ) + { +LABEL_39: + v116 = v122 && v110 != 0; + if ( !v116 ) + goto LABEL_40; + goto LABEL_79; + } +LABEL_76: + v25 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v26 = 0; + if ( !v25 ) + v26 = v121; + v108 = v25; + v121 = v26; + v116 = v122 && v110 != 0; + if ( !v116 ) + { +LABEL_40: + v117 = a4 == -1; + goto LABEL_41; + } +LABEL_79: + if ( v110[2] >= v110[3] ) + { + v43 = (*(int (__fastcall **)(_DWORD *))(*v110 + 36))(v110); + v44 = v116; + v45 = v43 == -1; + if ( v43 != -1 ) + v44 = 0; + v46 = 0; + if ( !v45 ) + v46 = v110; + v117 = v44; + v110 = v46; +LABEL_41: + if ( v108 == v117 ) + goto LABEL_42; + goto LABEL_81; + } + if ( !v108 ) + { +LABEL_42: + v104 = 1; + goto LABEL_43; + } +LABEL_81: + lpuexcptb = -1; + if ( v121 ) + { + v27 = (char *)v121[2]; + if ( (unsigned int)v27 >= v121[3] ) + { + v66 = -1; + v67 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v68 = v67 == -1; + if ( v67 != -1 ) + v66 = v67; + v69 = 0; + if ( !v68 ) + v69 = v121; + lpuexcptb = v66; + v121 = v69; + } + else + { + lpuexcptb = *v27; + } + } + if ( !v112 ) + { + v104 = 0; + goto LABEL_43; + } + v8 = *(_BYTE *)(v123 + 16); + } + if ( !v112 ) + goto LABEL_111; +LABEL_33: + if ( *(_BYTE *)(v123 + 76) != lpuexcptb && *(_BYTE *)(v123 + 77) != lpuexcptb ) + { + v104 = 0; + v112 = 1; + goto LABEL_43; + } + if ( v103 != 0 && v114 != 16 ) + { + v104 = 0; + MaxCount = v114; + Buf = v114; + v112 = 1; + goto LABEL_46; + } + v106 = 0; + v112 = 0; + v114 = 16; +LABEL_37: + v12 = v121; + v13 = v121[2]; + v14 = v121[3]; + if ( v13 < v14 ) + goto LABEL_38; + goto LABEL_75; + } + v98 = 0; + v104 = 1; + lpuexcptb = 0; + v106 = 0; + v112 = 0; +LABEL_43: + v16 = 22; + if ( v114 != 16 ) + v16 = v114; + MaxCount = v16; + Buf = v16; +LABEL_46: + v131 = 0; + Block = v132; + LOBYTE(v132[0]) = 0; + if ( *(_BYTE *)(v123 + 16) ) + std::string::reserve(&Block, 0x20u); + v100 = 0xFFFFFFFF / v114; + v99 = *(_BYTE *)(v123 + 100); + if ( !v99 ) + { + if ( v104 ) + { + v76 = v104; + v102 = 0; + v104 = 0; + lpuexcptd = (struct _Unwind_Exception *)v131; + v22 = (int *)Block; + v99 = v76; + v109 = 0; + goto LABEL_63; + } + v102 = 0; + v109 = 0; + while ( Buf > 10 ) + { + if ( (unsigned __int8)(lpuexcptb - 48) <= 9u ) + goto LABEL_54; + if ( (unsigned __int8)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int8)(lpuexcptb - 65) > 5u ) + goto LABEL_110; + v17 = lpuexcptb - 55; + goto LABEL_55; + } + v17 = lpuexcptb - 87; + if ( v100 < v109 ) + { +LABEL_56: + v18 = v121; + v102 = 1; + v19 = v121[2]; + v20 = v121[3]; + if ( v19 < v20 ) + goto LABEL_57; + goto LABEL_90; + } +LABEL_89: + v102 |= ~v17 < v114 * v109; + v18 = v121; + v109 = v114 * v109 + v17; + v20 = v121[3]; + v19 = v121[2]; + ++v106; + if ( v19 < v20 ) + { +LABEL_57: + v21 = v19 + 1; + v18[2] = v21; + goto LABEL_58; + } +LABEL_90: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v21 = v121[2]; + v20 = v121[3]; +LABEL_58: + v118 = 0; + if ( v21 >= v20 ) + { + v47 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v48 = 0; + if ( !v47 ) + v48 = v121; + v118 = v47; + v121 = v48; + } + if ( v122 && v110 != 0 ) + { + if ( v110[2] >= v110[3] ) + { + v49 = (*(int (__fastcall **)(_DWORD *))(*v110 + 36))(v110) == -1; + v50 = 0; + if ( !v49 ) + v50 = v110; + v51 = v122 && v110 != 0; + v110 = v50; + if ( !v49 ) + v51 = 0; + lpuexcptc = v51; + } + else + { + lpuexcptc = 0; + } + } + else + { + lpuexcptc = a4 == -1; + } + if ( lpuexcptc == v118 ) + { + v99 = 1; + lpuexcptd = (struct _Unwind_Exception *)v131; + v22 = (int *)Block; + goto LABEL_63; + } + if ( v121 ) + { + v28 = (char *)v121[2]; + if ( (unsigned int)v28 >= v121[3] ) + { + v54 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v55 = v54 == -1; + v56 = -1; + if ( v54 != -1 ) + v56 = v54; + v57 = 0; + if ( !v55 ) + v57 = v121; + lpuexcptb = v56; + v121 = v57; + } + else + { + lpuexcptb = *v28; + } + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 47 || (char)(Buf + 48) <= lpuexcptb ) + goto LABEL_110; +LABEL_54: + v17 = lpuexcptb - 48; +LABEL_55: + if ( v100 < v109 ) + goto LABEL_56; + goto LABEL_89; + } + if ( v104 ) + { + v109 = 0; + v102 = 0; + lpuexcptd = (struct _Unwind_Exception *)v131; + v22 = (int *)Block; + v99 = v104; + v104 = 0; + goto LABEL_63; + } + v102 = 0; + v109 = 0; + Bufa = (void *)(v123 + 78); + while ( !*(_BYTE *)(v123 + 16) || *(_BYTE *)(v123 + 37) != lpuexcptb ) + { + if ( lpuexcptb == *(_BYTE *)(v123 + 36) || (v30 = memchr(Bufa, lpuexcptb, MaxCount)) == 0 ) + { +LABEL_110: + v99 = 0; + lpuexcptd = (struct _Unwind_Exception *)v131; + v22 = (int *)Block; + goto LABEL_63; + } + v31 = v30 - (_BYTE *)Bufa; + if ( v31 > 15 ) + v31 -= 6; + if ( v100 >= v109 ) + { + v102 |= ~v31 < v114 * v109; + ++v106; + v109 = v114 * v109 + v31; + goto LABEL_122; + } + v32 = v121; + v102 = v99; + v34 = v121[3]; + v33 = v121[2]; + if ( v33 < v34 ) + { +LABEL_123: + v35 = v33 + 1; + v32[2] = v35; + goto LABEL_124; + } +LABEL_130: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v35 = v121[2]; + v34 = v121[3]; +LABEL_124: + v119 = 0; + if ( v34 <= v35 ) + { + v70 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v71 = 0; + if ( v70 ) + v71 = v99; + v119 = v71; + v72 = 0; + if ( !v70 ) + v72 = v121; + v121 = v72; + } + if ( v122 && v110 != 0 ) + { + if ( v110[2] >= v110[3] ) + { + v73 = (*(int (__fastcall **)(_DWORD *))(*v110 + 36))(v110) == -1; + v74 = 0; + if ( !v73 ) + v74 = v110; + v75 = v122 && v110 != 0; + v110 = v74; + if ( !v73 ) + v75 = 0; + lpuexcpte = v75; + } + else + { + lpuexcpte = 0; + } + } + else + { + lpuexcpte = a4 == -1; + } + if ( lpuexcpte == v119 ) + { + lpuexcptd = (struct _Unwind_Exception *)v131; + v22 = (int *)Block; + goto LABEL_63; + } + if ( v121 ) + { + v36 = (char *)v121[2]; + if ( (unsigned int)v36 >= v121[3] ) + { + v58 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v59 = v58 == -1; + v60 = -1; + if ( v58 != -1 ) + v60 = v58; + v61 = 0; + if ( !v59 ) + v61 = v121; + lpuexcptb = v60; + v121 = v61; + } + else + { + lpuexcptb = *v36; + } + } + else + { + lpuexcptb = -1; + } + } + v22 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v131; + if ( v106 ) + { + v120 = v106; + v37 = 15; + if ( Block != v132 ) + v37 = v132[0]; + v107 = v131 + 1; + if ( v131 + 1 > v37 ) + { + std::string::_M_mutate((int)&Block, v131, 0, 0, 1u); + v22 = (int *)Block; + } + v38 = v107; + v106 = 0; + *((_BYTE *)lpuexcptd + (_DWORD)v22) = v120; + v131 = v38; + *((_BYTE *)Block + v38) = 0; +LABEL_122: + v32 = v121; + v33 = v121[2]; + v34 = v121[3]; + if ( v33 < v34 ) + goto LABEL_123; + goto LABEL_130; + } + v99 = 0; + v104 = *(_BYTE *)(v123 + 16); +LABEL_63: + if ( lpuexcptd ) + { + v29 = 15; + if ( v22 != v132 ) + v29 = v132[0]; + if ( (unsigned int)lpuexcptd + 1 > v29 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v22 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v22) = v106; + v131 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v123 + 8), *(_DWORD *)(v123 + 12), (int)&Block) ) + *a6 = 4; + v22 = (int *)Block; + if ( v112 || v131 | v106 ) + goto LABEL_102; +LABEL_66: + *a7 = 0; + *a6 = 4; + } + else + { + if ( !v106 && !v112 ) + goto LABEL_66; +LABEL_102: + if ( v104 ) + goto LABEL_66; + if ( v102 ) + { + *a7 = -1; + *a6 = 4; + } + else + { + v39 = -v109; + if ( !v98 ) + v39 = v109; + *a7 = v39; + } + } + if ( v99 ) + *a6 |= 2u; + if ( v22 != v132 ) + operator delete(v22); + return v121; +} +// 46E127: variable 'v93' is possibly undefined +// 50C628: using guessed type signed __int32 std::numpunct::id; +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (0046E650) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _WORD *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + unsigned int v11; // eax + _DWORD *v12; // ebx + unsigned int v13; // eax + unsigned int v14; // edx + unsigned int v15; // eax + int v16; // eax + int v17; // eax + _DWORD *v18; // ecx + unsigned int v19; // eax + unsigned int v20; // edx + unsigned int v21; // eax + int *v22; // eax + bool v24; // al + bool v25; // zf + _DWORD *v26; // eax + char *v27; // eax + char *v28; // eax + unsigned int v29; // edx + _BYTE *v30; // eax + int v31; // eax + int v32; // ebx + _DWORD *v33; // ecx + unsigned int v34; // eax + unsigned int v35; // edx + unsigned int v36; // eax + char *v37; // eax + size_t v38; // ebx + unsigned int v39; // edx + int v40; // edx + char *v41; // eax + char *v42; // eax + _DWORD *v43; // eax + int v44; // eax + bool v45; // bl + bool v46; // zf + _DWORD *v47; // eax + bool v48; // zf + _DWORD *v49; // eax + bool v50; // zf + _DWORD *v51; // eax + bool v52; // cl + bool v53; // zf + _DWORD *v54; // eax + int v55; // eax + bool v56; // zf + char v57; // dl + _DWORD *v58; // eax + int v59; // eax + bool v60; // zf + char v61; // dl + _DWORD *v62; // eax + int v63; // eax + char v64; // dl + bool v65; // zf + _DWORD *v66; // eax + char v67; // bl + int v68; // eax + bool v69; // zf + _DWORD *v70; // eax + bool v71; // zf + char v72; // al + _DWORD *v73; // eax + bool v74; // zf + _DWORD *v75; // eax + bool v76; // dl + char v77; // bl + int v78; // eax + bool v79; // bl + bool v80; // zf + _DWORD *v81; // eax + int v82; // eax + bool v83; // dl + bool v84; // zf + _DWORD *v85; // eax + char v86; // bl + int v87; // eax + char v88; // dl + bool v89; // zf + _DWORD *v90; // eax + int v91; // eax + bool v92; // bl + bool v93; // zf + _DWORD *v94; // eax + unsigned int v95; // [esp+8h] [ebp-B0h] + std::locale::_Impl *v96; // [esp+18h] [ebp-A0h] + size_t MaxCount; // [esp+1Ch] [ebp-9Ch] + int Buf; // [esp+20h] [ebp-98h] + void *Bufa; // [esp+20h] [ebp-98h] + bool v100; // [esp+26h] [ebp-92h] + char v101; // [esp+27h] [ebp-91h] + int v102; // [esp+28h] [ebp-90h] + char v103; // [esp+2Ch] [ebp-8Ch] + char v104; // [esp+2Ch] [ebp-8Ch] + int v105; // [esp+30h] [ebp-88h] + char v106; // [esp+30h] [ebp-88h] + char v107; // [esp+34h] [ebp-84h] + int v108; // [esp+34h] [ebp-84h] + char v109; // [esp+38h] [ebp-80h] + unsigned __int16 v110; // [esp+38h] [ebp-80h] + _DWORD *v111; // [esp+3Ch] [ebp-7Ch] + char v112; // [esp+40h] [ebp-78h] + bool v113; // [esp+40h] [ebp-78h] + int *v114; // [esp+44h] [ebp-74h] + int v115; // [esp+44h] [ebp-74h] + char v116; // [esp+48h] [ebp-70h] + bool v117; // [esp+48h] [ebp-70h] + char v118; // [esp+48h] [ebp-70h] + char v119; // [esp+48h] [ebp-70h] + char v120; // [esp+48h] [ebp-70h] + char v121; // [esp+48h] [ebp-70h] + _DWORD *v122; // [esp+4Ch] [ebp-6Ch] + bool v123; // [esp+50h] [ebp-68h] + int v124; // [esp+54h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+58h] [ebp-60h] + bool lpuexcpta; // [esp+58h] [ebp-60h] + char lpuexcptb; // [esp+58h] [ebp-60h] + char lpuexcptc; // [esp+58h] [ebp-60h] + struct _Unwind_Exception *lpuexcptd; // [esp+58h] [ebp-60h] + char lpuexcpte; // [esp+58h] [ebp-60h] + void *Block; // [esp+98h] [ebp-20h] BYREF + size_t v132; // [esp+9Ch] [ebp-1Ch] + int v133[5]; // [esp+A0h] [ebp-18h] BYREF + + v122 = a1; + v111 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v114 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v124 = *v114; + if ( !*v114 ) + { + v43 = operator new(0x68u); + v43[1] = 0; + *v43 = &off_51AF60; + v43[2] = 0; + v43[3] = 0; + *((_BYTE *)v43 + 16) = 0; + v43[5] = 0; + v43[6] = 0; + v43[7] = 0; + v43[8] = 0; + *((_WORD *)v43 + 18) = 0; + *((_BYTE *)v43 + 100) = 0; + v96 = (std::locale::_Impl *)v43; + std::__numpunct_cache::_M_cache((int)v43, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v96, lpuexcpt, v95); + v124 = *v114; + } + v115 = 8; + v105 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v105 != 64 ) + { + v7 = 10; + if ( v105 == 8 ) + v7 = 16; + v115 = v7; + } + lpuexcpta = a2 == -1; + if ( lpuexcpta && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v82 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v83 = lpuexcpta && a1 != 0; + v84 = v82 == -1; + if ( v82 != -1 ) + v83 = 0; + v85 = 0; + if ( !v84 ) + v85 = a1; + v107 = v83; + v122 = v85; + } + else + { + v107 = 0; + } + } + else + { + v107 = a2 == -1; + } + v123 = a4 == -1; + if ( v123 && a3 != 0 ) + { + if ( a3[2] >= a3[3] ) + { + v78 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v79 = v123 && a3 != 0; + v80 = v78 == -1; + if ( v78 != -1 ) + v79 = 0; + v81 = 0; + if ( !v80 ) + v81 = a3; + v103 = v79; + v111 = v81; + } + else + { + v103 = 0; + } + } + else + { + v103 = a4 == -1; + } + if ( v107 != v103 ) + { + if ( v122 && a2 == -1 ) + { + v42 = (char *)v122[2]; + if ( (unsigned int)v42 >= v122[3] ) + { + v87 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + v88 = -1; + v89 = v87 == -1; + if ( v87 != -1 ) + v88 = v87; + v90 = 0; + if ( !v89 ) + v90 = v122; + lpuexcptb = v88; + v122 = v90; + } + else + { + lpuexcptb = *v42; + } + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v124 + 16); + v100 = *(_BYTE *)(v124 + 74) == (unsigned __int8)lpuexcptb; + if ( *(_BYTE *)(v124 + 74) == lpuexcptb || *(_BYTE *)(v124 + 75) == lpuexcptb ) + { + if ( (!v8 || *(_BYTE *)(v124 + 37) != lpuexcptb) && *(_BYTE *)(v124 + 36) != lpuexcptb ) + { + v9 = v122[2]; + v10 = v122[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v11 = v122[2]; + v10 = v122[3]; + } + else + { + v11 = v9 + 1; + v122[2] = v11; + } + v112 = 0; + if ( v11 >= v10 ) + { + v53 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122) == -1; + v54 = 0; + if ( !v53 ) + v54 = v122; + v112 = v53; + v122 = v54; + } + if ( v123 && v111 != 0 ) + { + if ( v111[2] >= v111[3] ) + { + v91 = (*(int (__fastcall **)(_DWORD *))(*v111 + 36))(v111); + v92 = v123 && v111 != 0; + v93 = v91 == -1; + if ( v91 != -1 ) + v92 = 0; + v94 = 0; + if ( !v93 ) + v94 = v111; + v116 = v92; + v111 = v94; + } + else + { + v116 = 0; + } + } + else + { + v116 = a4 == -1; + } + if ( v112 == v116 ) + { + v106 = 1; + v108 = 0; + v113 = 0; + goto LABEL_43; + } + lpuexcptb = -1; + if ( v122 ) + { + v41 = (char *)v122[2]; + if ( (unsigned int)v41 >= v122[3] ) + { + v63 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + v64 = -1; + v65 = v63 == -1; + if ( v63 != -1 ) + v64 = v63; + v66 = 0; + if ( !v65 ) + v66 = v122; + lpuexcptb = v64; + v122 = v66; + } + else + { + lpuexcptb = *v41; + } + } + v8 = *(_BYTE *)(v124 + 16); + } + } + else + { + v100 = 0; + } + v108 = 0; + v113 = 0; + while ( 1 ) + { + if ( v8 && *(_BYTE *)(v124 + 37) == lpuexcptb || *(_BYTE *)(v124 + 36) == lpuexcptb ) + { +LABEL_111: + v106 = 0; + goto LABEL_43; + } + if ( *(_BYTE *)(v124 + 78) != lpuexcptb ) + break; + v24 = v115 == 10 || !v113; + if ( !v24 ) + goto LABEL_33; + v113 = v105 == 0 || v115 == 8; + if ( !v113 ) + { + ++v108; + v113 = v24; + goto LABEL_37; + } + v12 = v122; + v115 = 8; + v108 = 0; + v13 = v122[2]; + v14 = v122[3]; + if ( v13 < v14 ) + { +LABEL_38: + v15 = v13 + 1; + v109 = 0; + v12[2] = v15; + if ( v15 < v14 ) + goto LABEL_39; + goto LABEL_76; + } +LABEL_75: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v109 = 0; + if ( v122[2] < v122[3] ) + { +LABEL_39: + v117 = v123 && v111 != 0; + if ( !v117 ) + goto LABEL_40; + goto LABEL_79; + } +LABEL_76: + v25 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122) == -1; + v26 = 0; + if ( !v25 ) + v26 = v122; + v109 = v25; + v122 = v26; + v117 = v123 && v111 != 0; + if ( !v117 ) + { +LABEL_40: + v118 = a4 == -1; + goto LABEL_41; + } +LABEL_79: + if ( v111[2] >= v111[3] ) + { + v44 = (*(int (__fastcall **)(_DWORD *))(*v111 + 36))(v111); + v45 = v117; + v46 = v44 == -1; + if ( v44 != -1 ) + v45 = 0; + v47 = 0; + if ( !v46 ) + v47 = v111; + v118 = v45; + v111 = v47; +LABEL_41: + if ( v109 == v118 ) + goto LABEL_42; + goto LABEL_81; + } + if ( !v109 ) + { +LABEL_42: + v106 = 1; + goto LABEL_43; + } +LABEL_81: + lpuexcptb = -1; + if ( v122 ) + { + v27 = (char *)v122[2]; + if ( (unsigned int)v27 >= v122[3] ) + { + v67 = -1; + v68 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + v69 = v68 == -1; + if ( v68 != -1 ) + v67 = v68; + v70 = 0; + if ( !v69 ) + v70 = v122; + lpuexcptb = v67; + v122 = v70; + } + else + { + lpuexcptb = *v27; + } + } + if ( !v113 ) + { + v106 = 0; + goto LABEL_43; + } + v8 = *(_BYTE *)(v124 + 16); + } + if ( !v113 ) + goto LABEL_111; +LABEL_33: + if ( *(_BYTE *)(v124 + 76) != lpuexcptb && *(_BYTE *)(v124 + 77) != lpuexcptb ) + { + v106 = 0; + v113 = 1; + goto LABEL_43; + } + if ( v105 != 0 && v115 != 16 ) + { + v106 = 0; + MaxCount = v115; + Buf = v115; + v113 = 1; + goto LABEL_46; + } + v108 = 0; + v113 = 0; + v115 = 16; +LABEL_37: + v12 = v122; + v13 = v122[2]; + v14 = v122[3]; + if ( v13 < v14 ) + goto LABEL_38; + goto LABEL_75; + } + v100 = 0; + v106 = 1; + lpuexcptb = 0; + v108 = 0; + v113 = 0; +LABEL_43: + v16 = 22; + if ( v115 != 16 ) + v16 = v115; + MaxCount = v16; + Buf = v16; +LABEL_46: + v132 = 0; + Block = v133; + LOBYTE(v133[0]) = 0; + if ( *(_BYTE *)(v124 + 16) ) + std::string::reserve(&Block, 0x20u); + v102 = 0xFFFF / v115; + v101 = *(_BYTE *)(v124 + 100); + if ( !v101 ) + { + if ( v106 ) + { + v77 = v106; + v104 = 0; + v106 = 0; + lpuexcptd = (struct _Unwind_Exception *)v132; + v22 = (int *)Block; + v101 = v77; + v110 = 0; + goto LABEL_63; + } + v104 = 0; + v110 = 0; + while ( Buf > 10 ) + { + if ( (unsigned __int8)(lpuexcptb - 48) <= 9u ) + goto LABEL_54; + if ( (unsigned __int8)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int8)(lpuexcptb - 65) > 5u ) + goto LABEL_110; + v17 = lpuexcptb - 55; + goto LABEL_55; + } + v17 = lpuexcptb - 87; + if ( (unsigned __int16)v102 < v110 ) + { +LABEL_56: + v18 = v122; + v104 = 1; + v19 = v122[2]; + v20 = v122[3]; + if ( v19 < v20 ) + goto LABEL_57; + goto LABEL_90; + } +LABEL_89: + v104 |= (unsigned __int16)(v115 * v110) > 0xFFFF - v17; + v18 = v122; + v110 = v115 * v110 + v17; + v20 = v122[3]; + v19 = v122[2]; + ++v108; + if ( v19 < v20 ) + { +LABEL_57: + v21 = v19 + 1; + v18[2] = v21; + goto LABEL_58; + } +LABEL_90: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v21 = v122[2]; + v20 = v122[3]; +LABEL_58: + v119 = 0; + if ( v21 >= v20 ) + { + v48 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122) == -1; + v49 = 0; + if ( !v48 ) + v49 = v122; + v119 = v48; + v122 = v49; + } + if ( v123 && v111 != 0 ) + { + if ( v111[2] >= v111[3] ) + { + v50 = (*(int (__fastcall **)(_DWORD *))(*v111 + 36))(v111) == -1; + v51 = 0; + if ( !v50 ) + v51 = v111; + v52 = v123 && v111 != 0; + v111 = v51; + if ( !v50 ) + v52 = 0; + lpuexcptc = v52; + } + else + { + lpuexcptc = 0; + } + } + else + { + lpuexcptc = a4 == -1; + } + if ( lpuexcptc == v119 ) + { + v101 = 1; + lpuexcptd = (struct _Unwind_Exception *)v132; + v22 = (int *)Block; + goto LABEL_63; + } + if ( v122 ) + { + v28 = (char *)v122[2]; + if ( (unsigned int)v28 >= v122[3] ) + { + v55 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + v56 = v55 == -1; + v57 = -1; + if ( v55 != -1 ) + v57 = v55; + v58 = 0; + if ( !v56 ) + v58 = v122; + lpuexcptb = v57; + v122 = v58; + } + else + { + lpuexcptb = *v28; + } + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 47 || (char)(Buf + 48) <= lpuexcptb ) + goto LABEL_110; +LABEL_54: + v17 = lpuexcptb - 48; +LABEL_55: + if ( (unsigned __int16)v102 < v110 ) + goto LABEL_56; + goto LABEL_89; + } + if ( v106 ) + { + v86 = v106; + v104 = 0; + v106 = 0; + v101 = v86; + lpuexcptd = (struct _Unwind_Exception *)v132; + v22 = (int *)Block; + v110 = 0; + goto LABEL_63; + } + v104 = 0; + Bufa = (void *)(v124 + 78); + v110 = 0; + while ( !*(_BYTE *)(v124 + 16) || *(_BYTE *)(v124 + 37) != lpuexcptb ) + { + if ( lpuexcptb == *(_BYTE *)(v124 + 36) || (v30 = memchr(Bufa, lpuexcptb, MaxCount)) == 0 ) + { +LABEL_110: + v101 = 0; + lpuexcptd = (struct _Unwind_Exception *)v132; + v22 = (int *)Block; + goto LABEL_63; + } + v31 = v30 - (_BYTE *)Bufa; + if ( v31 > 15 ) + v31 -= 6; + if ( (unsigned __int16)v102 >= v110 ) + { + v32 = (unsigned __int16)(v115 * v110); + v104 |= v32 > 0xFFFF - v31; + ++v108; + v110 = v32 + v31; + goto LABEL_122; + } + v33 = v122; + v104 = v101; + v35 = v122[3]; + v34 = v122[2]; + if ( v34 < v35 ) + { +LABEL_123: + v36 = v34 + 1; + v33[2] = v36; + goto LABEL_124; + } +LABEL_130: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v36 = v122[2]; + v35 = v122[3]; +LABEL_124: + v120 = 0; + if ( v35 <= v36 ) + { + v71 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122) == -1; + v72 = 0; + if ( v71 ) + v72 = v101; + v120 = v72; + v73 = 0; + if ( !v71 ) + v73 = v122; + v122 = v73; + } + if ( v123 && v111 != 0 ) + { + if ( v111[2] >= v111[3] ) + { + v74 = (*(int (__fastcall **)(_DWORD *))(*v111 + 36))(v111) == -1; + v75 = 0; + if ( !v74 ) + v75 = v111; + v76 = v123 && v111 != 0; + v111 = v75; + if ( !v74 ) + v76 = 0; + lpuexcpte = v76; + } + else + { + lpuexcpte = 0; + } + } + else + { + lpuexcpte = a4 == -1; + } + if ( lpuexcpte == v120 ) + { + lpuexcptd = (struct _Unwind_Exception *)v132; + v22 = (int *)Block; + goto LABEL_63; + } + if ( v122 ) + { + v37 = (char *)v122[2]; + if ( (unsigned int)v37 >= v122[3] ) + { + v59 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + v60 = v59 == -1; + v61 = -1; + if ( v59 != -1 ) + v61 = v59; + v62 = 0; + if ( !v60 ) + v62 = v122; + lpuexcptb = v61; + v122 = v62; + } + else + { + lpuexcptb = *v37; + } + } + else + { + lpuexcptb = -1; + } + } + v22 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v132; + if ( v108 ) + { + v121 = v108; + v39 = 15; + if ( Block != v133 ) + v39 = v133[0]; + v38 = v132 + 1; + if ( v132 + 1 > v39 ) + { + std::string::_M_mutate((int)&Block, v132, 0, 0, 1u); + v22 = (int *)Block; + } + v108 = 0; + *((_BYTE *)lpuexcptd + (_DWORD)v22) = v121; + v132 = v38; + *((_BYTE *)Block + v38) = 0; +LABEL_122: + v33 = v122; + v34 = v122[2]; + v35 = v122[3]; + if ( v34 < v35 ) + goto LABEL_123; + goto LABEL_130; + } + v101 = 0; + v106 = *(_BYTE *)(v124 + 16); +LABEL_63: + if ( lpuexcptd ) + { + v29 = 15; + if ( v22 != v133 ) + v29 = v133[0]; + if ( (unsigned int)lpuexcptd + 1 > v29 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v22 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v22) = v108; + v132 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v124 + 8), *(_DWORD *)(v124 + 12), (int)&Block) ) + *a6 = 4; + v22 = (int *)Block; + if ( v113 || v132 | v108 ) + goto LABEL_102; +LABEL_66: + *a7 = 0; + *a6 = 4; + } + else + { + if ( !v108 && !v113 ) + goto LABEL_66; +LABEL_102: + if ( v106 ) + goto LABEL_66; + if ( v104 ) + { + *a7 = -1; + *a6 = 4; + } + else + { + v40 = -v110; + if ( !v100 ) + LOWORD(v40) = v110; + *a7 = v40; + } + } + if ( v101 ) + *a6 |= 2u; + if ( v22 != v133 ) + operator delete(v22); + return v122; +} +// 46F165: variable 'v95' is possibly undefined +// 50C628: using guessed type signed __int32 std::numpunct::id; +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (0046F690) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + unsigned int v11; // eax + _DWORD *v12; // edi + unsigned int v13; // eax + unsigned int v14; // edx + unsigned int v15; // eax + int v16; // eax + unsigned __int64 v17; // kr00_8 + int v18; // esi + _DWORD *v19; // ecx + unsigned int v20; // eax + unsigned int v21; // edx + unsigned int v22; // eax + int *v23; // eax + bool v25; // al + bool v26; // zf + _DWORD *v27; // eax + char *v28; // eax + char *v29; // eax + unsigned int v30; // edx + int v31; // ecx + int v32; // ebx + _BYTE *v33; // eax + int v34; // esi + _DWORD *v35; // esi + unsigned int v36; // eax + unsigned int v37; // edx + unsigned int v38; // eax + char *v39; // eax + size_t v40; // edi + unsigned int v41; // edx + char *v42; // eax + char *v43; // eax + _DWORD *v44; // eax + int v45; // eax + bool v46; // dl + bool v47; // zf + _DWORD *v48; // eax + bool v49; // zf + _DWORD *v50; // eax + bool v51; // zf + _DWORD *v52; // eax + bool v53; // bl + bool v54; // zf + _DWORD *v55; // eax + int v56; // eax + bool v57; // zf + char v58; // dl + _DWORD *v59; // eax + int v60; // eax + bool v61; // zf + char v62; // dl + _DWORD *v63; // eax + int v64; // eax + char v65; // dl + bool v66; // zf + _DWORD *v67; // eax + int v68; // eax + char v69; // dl + bool v70; // zf + _DWORD *v71; // eax + bool v72; // zf + char v73; // al + _DWORD *v74; // eax + bool v75; // zf + _DWORD *v76; // eax + bool v77; // dl + char v78; // cl + int v79; // eax + bool v80; // si + bool v81; // zf + _DWORD *v82; // eax + int v83; // eax + bool v84; // dl + bool v85; // zf + _DWORD *v86; // eax + int v87; // eax + bool v88; // zf + char v89; // si + _DWORD *v90; // eax + int v91; // eax + bool v92; // bl + bool v93; // zf + _DWORD *v94; // eax + unsigned int v95; // [esp+8h] [ebp-D0h] + std::locale::_Impl *v96; // [esp+14h] [ebp-C4h] + unsigned __int64 v97; // [esp+18h] [ebp-C0h] + size_t MaxCount; // [esp+20h] [ebp-B8h] + int Buf; // [esp+24h] [ebp-B4h] + void *Bufa; // [esp+24h] [ebp-B4h] + bool v101; // [esp+2Ah] [ebp-AEh] + char v102; // [esp+2Bh] [ebp-ADh] + char v103; // [esp+34h] [ebp-A4h] + char v104; // [esp+34h] [ebp-A4h] + int v105; // [esp+38h] [ebp-A0h] + char v106; // [esp+38h] [ebp-A0h] + char v107; // [esp+3Ch] [ebp-9Ch] + int v108; // [esp+3Ch] [ebp-9Ch] + char v109; // [esp+40h] [ebp-98h] + char v110; // [esp+40h] [ebp-98h] + char v111; // [esp+40h] [ebp-98h] + char v112; // [esp+40h] [ebp-98h] + _DWORD *v113; // [esp+44h] [ebp-94h] + int *v114; // [esp+48h] [ebp-90h] + int v115; // [esp+48h] [ebp-90h] + char v116; // [esp+50h] [ebp-88h] + char v117; // [esp+50h] [ebp-88h] + unsigned __int64 v118; // [esp+50h] [ebp-88h] + char v119; // [esp+58h] [ebp-80h] + bool v120; // [esp+58h] [ebp-80h] + _DWORD *v121; // [esp+5Ch] [ebp-7Ch] + bool v122; // [esp+60h] [ebp-78h] + int v123; // [esp+64h] [ebp-74h] + struct _Unwind_Exception *lpuexcpt; // [esp+68h] [ebp-70h] + bool lpuexcpta; // [esp+68h] [ebp-70h] + char lpuexcptb; // [esp+68h] [ebp-70h] + char lpuexcptc; // [esp+68h] [ebp-70h] + struct _Unwind_Exception *lpuexcptd; // [esp+68h] [ebp-70h] + char lpuexcpte; // [esp+68h] [ebp-70h] + void *Block; // [esp+A8h] [ebp-30h] BYREF + size_t v131; // [esp+ACh] [ebp-2Ch] + int v132[10]; // [esp+B0h] [ebp-28h] BYREF + + v121 = a1; + v113 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v114 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v123 = *v114; + if ( !*v114 ) + { + v44 = operator new(0x68u); + v44[1] = 0; + *v44 = &off_51AF60; + v44[2] = 0; + v44[3] = 0; + *((_BYTE *)v44 + 16) = 0; + v44[5] = 0; + v44[6] = 0; + v44[7] = 0; + v44[8] = 0; + *((_WORD *)v44 + 18) = 0; + *((_BYTE *)v44 + 100) = 0; + v96 = (std::locale::_Impl *)v44; + std::__numpunct_cache::_M_cache((int)v44, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v96, lpuexcpt, v95); + v123 = *v114; + } + v115 = 8; + v105 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v105 != 64 ) + { + v7 = 10; + if ( v105 == 8 ) + v7 = 16; + v115 = v7; + } + lpuexcpta = a2 == -1; + if ( lpuexcpta && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v83 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v84 = lpuexcpta && a1 != 0; + v85 = v83 == -1; + if ( v83 != -1 ) + v84 = 0; + v86 = 0; + if ( !v85 ) + v86 = a1; + v107 = v84; + v121 = v86; + } + else + { + v107 = 0; + } + } + else + { + v107 = a2 == -1; + } + v122 = a4 == -1; + if ( v122 && a3 != 0 ) + { + if ( a3[2] >= a3[3] ) + { + v79 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v80 = v122 && a3 != 0; + v81 = v79 == -1; + if ( v79 != -1 ) + v80 = 0; + v103 = v80; + v82 = 0; + if ( !v81 ) + v82 = a3; + v113 = v82; + } + else + { + v103 = 0; + } + } + else + { + v103 = a4 == -1; + } + if ( v107 != v103 ) + { + if ( v121 && a2 == -1 ) + { + v43 = (char *)v121[2]; + if ( (unsigned int)v43 >= v121[3] ) + { + v87 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v88 = v87 == -1; + v89 = -1; + if ( v87 != -1 ) + v89 = v87; + lpuexcptb = v89; + v90 = 0; + if ( !v88 ) + v90 = v121; + v121 = v90; + } + else + { + lpuexcptb = *v43; + } + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v123 + 16); + v101 = *(_BYTE *)(v123 + 74) == (unsigned __int8)lpuexcptb; + if ( *(_BYTE *)(v123 + 74) == lpuexcptb || *(_BYTE *)(v123 + 75) == lpuexcptb ) + { + if ( (!v8 || *(_BYTE *)(v123 + 37) != lpuexcptb) && *(_BYTE *)(v123 + 36) != lpuexcptb ) + { + v9 = v121[2]; + v10 = v121[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v11 = v121[2]; + v10 = v121[3]; + } + else + { + v11 = v9 + 1; + v121[2] = v11; + } + v119 = 0; + if ( v11 >= v10 ) + { + v54 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v55 = 0; + if ( !v54 ) + v55 = v121; + v119 = v54; + v121 = v55; + } + if ( v122 && v113 != 0 ) + { + if ( v113[2] >= v113[3] ) + { + v91 = (*(int (__fastcall **)(_DWORD *))(*v113 + 36))(v113); + v92 = v122 && v113 != 0; + v93 = v91 == -1; + if ( v91 != -1 ) + v92 = 0; + v94 = 0; + if ( !v93 ) + v94 = v113; + v116 = v92; + v113 = v94; + } + else + { + v116 = 0; + } + } + else + { + v116 = a4 == -1; + } + if ( v119 == v116 ) + { + v106 = 1; + v108 = 0; + v120 = 0; + goto LABEL_43; + } + lpuexcptb = -1; + if ( v121 ) + { + v42 = (char *)v121[2]; + if ( (unsigned int)v42 >= v121[3] ) + { + v64 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v65 = -1; + v66 = v64 == -1; + if ( v64 != -1 ) + v65 = v64; + v67 = 0; + if ( !v66 ) + v67 = v121; + lpuexcptb = v65; + v121 = v67; + } + else + { + lpuexcptb = *v42; + } + } + v8 = *(_BYTE *)(v123 + 16); + } + } + else + { + v101 = 0; + } + v108 = 0; + v120 = 0; + while ( 1 ) + { + if ( v8 && *(_BYTE *)(v123 + 37) == lpuexcptb || *(_BYTE *)(v123 + 36) == lpuexcptb ) + { +LABEL_115: + v106 = 0; + goto LABEL_43; + } + if ( *(_BYTE *)(v123 + 78) != lpuexcptb ) + break; + v25 = v115 == 10 || !v120; + if ( !v25 ) + goto LABEL_33; + v120 = v105 == 0 || v115 == 8; + if ( !v120 ) + { + ++v108; + v120 = v25; + goto LABEL_37; + } + v108 = 0; + v12 = v121; + v115 = 8; + v13 = v121[2]; + v14 = v121[3]; + if ( v13 >= v14 ) + { +LABEL_77: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v109 = 0; + if ( v121[2] < v121[3] ) + goto LABEL_39; + goto LABEL_78; + } +LABEL_38: + v15 = v13 + 1; + v109 = 0; + v12[2] = v15; + if ( v15 < v14 ) + goto LABEL_39; +LABEL_78: + v26 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v27 = 0; + if ( !v26 ) + v27 = v121; + v109 = v26; + v121 = v27; +LABEL_39: + if ( v122 && v113 != 0 ) + { + if ( v113[2] >= v113[3] ) + { + v45 = (*(int (__fastcall **)(_DWORD *))(*v113 + 36))(v113); + v46 = v122 && v113 != 0; + v47 = v45 == -1; + if ( v45 != -1 ) + v46 = 0; + v48 = 0; + if ( !v47 ) + v48 = v113; + v117 = v46; + v113 = v48; + } + else + { + v117 = 0; + } + } + else + { + v117 = a4 == -1; + } + if ( v109 == v117 ) + { + v106 = 1; + goto LABEL_43; + } + lpuexcptb = -1; + if ( v121 ) + { + v28 = (char *)v121[2]; + if ( (unsigned int)v28 >= v121[3] ) + { + v68 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v69 = -1; + v70 = v68 == -1; + if ( v68 != -1 ) + v69 = v68; + v71 = 0; + if ( !v70 ) + v71 = v121; + lpuexcptb = v69; + v121 = v71; + } + else + { + lpuexcptb = *v28; + } + } + if ( !v120 ) + { + v106 = 0; + goto LABEL_43; + } + v8 = *(_BYTE *)(v123 + 16); + } + if ( !v120 ) + goto LABEL_115; +LABEL_33: + if ( *(_BYTE *)(v123 + 76) != lpuexcptb && *(_BYTE *)(v123 + 77) != lpuexcptb ) + { + v106 = 0; + v120 = 1; + goto LABEL_43; + } + if ( v105 != 0 && v115 != 16 ) + { + v106 = 0; + MaxCount = v115; + Buf = v115; + v120 = 1; + goto LABEL_46; + } + v108 = 0; + v120 = 0; + v115 = 16; +LABEL_37: + v12 = v121; + v13 = v121[2]; + v14 = v121[3]; + if ( v13 >= v14 ) + goto LABEL_77; + goto LABEL_38; + } + v101 = 0; + v106 = 1; + lpuexcptb = 0; + v108 = 0; + v120 = 0; +LABEL_43: + v16 = 22; + if ( v115 != 16 ) + v16 = v115; + MaxCount = v16; + Buf = v16; +LABEL_46: + v131 = 0; + Block = v132; + LOBYTE(v132[0]) = 0; + if ( *(_BYTE *)(v123 + 16) ) + std::string::reserve(&Block, 0x20u); + v97 = 0x8000000000000000LL; + if ( !v101 ) + v97 = 0x7FFFFFFFFFFFFFFFLL; + v17 = v97 / v115; + v102 = *(_BYTE *)(v123 + 100); + if ( !v102 ) + { + if ( v106 ) + { + v78 = v106; + v104 = 0; + v106 = 0; + lpuexcptd = (struct _Unwind_Exception *)v131; + v23 = (int *)Block; + v102 = v78; + v118 = 0LL; + goto LABEL_65; + } + v104 = 0; + v118 = 0LL; + while ( Buf > 10 ) + { + if ( (unsigned __int8)(lpuexcptb - 48) <= 9u ) + goto LABEL_56; + if ( (unsigned __int8)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int8)(lpuexcptb - 65) > 5u ) + goto LABEL_114; + v18 = lpuexcptb - 55; + } + else + { + v18 = lpuexcptb - 87; + } +LABEL_57: + if ( v17 >= v118 ) + { + v104 |= v97 - v18 < v115 * v118; + v19 = v121; + v118 = v115 * v118 + v18; + v20 = v121[2]; + v21 = v121[3]; + ++v108; + if ( v20 < v21 ) + { +LABEL_59: + v22 = v20 + 1; + v19[2] = v22; + goto LABEL_60; + } + } + else + { + v19 = v121; + v104 = 1; + v20 = v121[2]; + v21 = v121[3]; + if ( v20 < v21 ) + goto LABEL_59; + } + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v22 = v121[2]; + v21 = v121[3]; +LABEL_60: + v110 = 0; + if ( v22 >= v21 ) + { + v49 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v50 = 0; + if ( !v49 ) + v50 = v121; + v110 = v49; + v121 = v50; + } + if ( v122 && v113 != 0 ) + { + if ( v113[2] >= v113[3] ) + { + v51 = (*(int (__fastcall **)(_DWORD *))(*v113 + 36))(v113) == -1; + v52 = 0; + if ( !v51 ) + v52 = v113; + v53 = v122 && v113 != 0; + v113 = v52; + if ( !v51 ) + v53 = 0; + lpuexcptc = v53; + } + else + { + lpuexcptc = 0; + } + } + else + { + lpuexcptc = a4 == -1; + } + if ( lpuexcptc == v110 ) + { + v102 = 1; + lpuexcptd = (struct _Unwind_Exception *)v131; + v23 = (int *)Block; + goto LABEL_65; + } + if ( v121 ) + { + v29 = (char *)v121[2]; + if ( (unsigned int)v29 >= v121[3] ) + { + v56 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v57 = v56 == -1; + v58 = -1; + if ( v56 != -1 ) + v58 = v56; + v59 = 0; + if ( !v57 ) + v59 = v121; + lpuexcptb = v58; + v121 = v59; + } + else + { + lpuexcptb = *v29; + } + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 47 || (char)(Buf + 48) <= lpuexcptb ) + goto LABEL_114; +LABEL_56: + v18 = lpuexcptb - 48; + goto LABEL_57; + } + if ( v106 ) + { + v118 = 0LL; + lpuexcptd = (struct _Unwind_Exception *)v131; + v23 = (int *)Block; + v102 = v106; + v104 = 0; + v106 = 0; + goto LABEL_65; + } + v104 = 0; + v118 = 0LL; + Bufa = (void *)(v123 + 78); + while ( !*(_BYTE *)(v123 + 16) || *(_BYTE *)(v123 + 37) != lpuexcptb ) + { + if ( lpuexcptb == *(_BYTE *)(v123 + 36) || (v33 = memchr(Bufa, lpuexcptb, MaxCount)) == 0 ) + { +LABEL_114: + v102 = 0; + lpuexcptd = (struct _Unwind_Exception *)v131; + v23 = (int *)Block; + goto LABEL_65; + } + v34 = v33 - (_BYTE *)Bufa; + if ( v33 - (_BYTE *)Bufa > 15 ) + v34 -= 6; + if ( v17 >= v118 ) + { + v104 |= v97 - v34 < v115 * v118; + ++v108; + v118 = v115 * v118 + v34; + goto LABEL_126; + } + v35 = v121; + v104 = v102; + v37 = v121[3]; + v36 = v121[2]; + if ( v36 < v37 ) + { +LABEL_127: + v38 = v36 + 1; + v35[2] = v38; + goto LABEL_128; + } +LABEL_134: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v38 = v121[2]; + v37 = v121[3]; +LABEL_128: + v111 = 0; + if ( v37 <= v38 ) + { + v72 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121) == -1; + v73 = 0; + if ( v72 ) + v73 = v102; + v111 = v73; + v74 = 0; + if ( !v72 ) + v74 = v121; + v121 = v74; + } + if ( v122 && v113 != 0 ) + { + if ( v113[2] >= v113[3] ) + { + v75 = (*(int (__fastcall **)(_DWORD *))(*v113 + 36))(v113) == -1; + v76 = 0; + if ( !v75 ) + v76 = v113; + v77 = v122 && v113 != 0; + v113 = v76; + if ( !v75 ) + v77 = 0; + lpuexcpte = v77; + } + else + { + lpuexcpte = 0; + } + } + else + { + lpuexcpte = a4 == -1; + } + if ( lpuexcpte == v111 ) + { + lpuexcptd = (struct _Unwind_Exception *)v131; + v23 = (int *)Block; + goto LABEL_65; + } + if ( v121 ) + { + v39 = (char *)v121[2]; + if ( (unsigned int)v39 >= v121[3] ) + { + v60 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + v61 = v60 == -1; + v62 = -1; + if ( v60 != -1 ) + v62 = v60; + v63 = 0; + if ( !v61 ) + v63 = v121; + lpuexcptb = v62; + v121 = v63; + } + else + { + lpuexcptb = *v39; + } + } + else + { + lpuexcptb = -1; + } + } + v23 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v131; + if ( v108 ) + { + v41 = 15; + if ( Block != v132 ) + v41 = v132[0]; + v112 = v108; + v40 = v131 + 1; + if ( v131 + 1 > v41 ) + { + std::string::_M_mutate((int)&Block, v131, 0, 0, 1u); + v23 = (int *)Block; + } + v108 = 0; + *((_BYTE *)lpuexcptd + (_DWORD)v23) = v112; + v131 = v40; + *((_BYTE *)Block + v40) = 0; +LABEL_126: + v35 = v121; + v36 = v121[2]; + v37 = v121[3]; + if ( v36 < v37 ) + goto LABEL_127; + goto LABEL_134; + } + v102 = 0; + v106 = *(_BYTE *)(v123 + 16); +LABEL_65: + if ( lpuexcptd ) + { + v30 = 15; + if ( v23 != v132 ) + v30 = v132[0]; + if ( (unsigned int)lpuexcptd + 1 > v30 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v23 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v23) = v108; + v131 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v123 + 8), *(_DWORD *)(v123 + 12), (int)&Block) ) + *a6 = 4; + v23 = (int *)Block; + if ( v120 || v131 | v108 ) + goto LABEL_104; +LABEL_68: + *a7 = 0; + a7[1] = 0; + *a6 = 4; + } + else + { + if ( !v108 && !v120 ) + goto LABEL_68; +LABEL_104: + if ( v106 ) + goto LABEL_68; + if ( v104 ) + { + v31 = 0; + v32 = 0x80000000; + if ( !v101 ) + { + v31 = -1; + v32 = 0x7FFFFFFF; + } + a7[1] = v32; + *a7 = v31; + *a6 = 4; + } + else + { + if ( v101 ) + v118 = -(__int64)v118; + *(_QWORD *)a7 = v118; + } + } + if ( v102 ) + *a6 |= 2u; + if ( v23 != v132 ) + operator delete(v23); + return v121; +} +// 470387: variable 'v95' is possibly undefined +// 50C628: using guessed type signed __int32 std::numpunct::id; +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (00470910) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + unsigned int v11; // eax + _DWORD *v12; // edi + unsigned int v13; // eax + unsigned int v14; // edx + unsigned int v15; // eax + int v16; // eax + unsigned __int64 v17; // kr08_8 + int v18; // esi + _DWORD *v19; // ecx + unsigned int v20; // eax + unsigned int v21; // edx + unsigned int v22; // eax + int *v23; // eax + bool v25; // al + bool v26; // zf + _DWORD *v27; // eax + char *v28; // eax + char *v29; // eax + unsigned int v30; // edx + _BYTE *v31; // eax + int v32; // esi + _DWORD *v33; // ebx + unsigned int v34; // eax + unsigned int v35; // edx + unsigned int v36; // eax + char *v37; // eax + size_t v38; // edx + size_t v39; // esi + char *v40; // eax + char *v41; // eax + _DWORD *v42; // eax + int v43; // eax + bool v44; // dl + bool v45; // zf + _DWORD *v46; // eax + bool v47; // zf + _DWORD *v48; // eax + bool v49; // zf + _DWORD *v50; // eax + bool v51; // di + bool v52; // zf + _DWORD *v53; // eax + int v54; // eax + bool v55; // zf + char v56; // dl + _DWORD *v57; // eax + int v58; // eax + bool v59; // zf + char v60; // dl + _DWORD *v61; // eax + char v62; // si + int v63; // eax + bool v64; // zf + _DWORD *v65; // eax + char v66; // bl + int v67; // eax + bool v68; // zf + _DWORD *v69; // eax + bool v70; // zf + char v71; // al + _DWORD *v72; // eax + bool v73; // zf + _DWORD *v74; // eax + bool v75; // di + char v76; // bl + int v77; // eax + bool v78; // bl + bool v79; // zf + _DWORD *v80; // eax + int v81; // eax + bool v82; // dl + bool v83; // zf + _DWORD *v84; // eax + int v85; // eax + char v86; // dl + bool v87; // zf + _DWORD *v88; // eax + int v89; // eax + bool v90; // di + bool v91; // zf + _DWORD *v92; // eax + unsigned int v93; // [esp+8h] [ebp-D0h] + std::locale::_Impl *v94; // [esp+18h] [ebp-C0h] + size_t MaxCount; // [esp+1Ch] [ebp-BCh] + int Buf; // [esp+20h] [ebp-B8h] + void *Bufa; // [esp+20h] [ebp-B8h] + bool v98; // [esp+26h] [ebp-B2h] + char v99; // [esp+27h] [ebp-B1h] + char v100; // [esp+30h] [ebp-A8h] + char v101; // [esp+30h] [ebp-A8h] + int v102; // [esp+34h] [ebp-A4h] + char v103; // [esp+34h] [ebp-A4h] + char v104; // [esp+38h] [ebp-A0h] + int v105; // [esp+38h] [ebp-A0h] + size_t v106; // [esp+38h] [ebp-A0h] + char v107; // [esp+3Ch] [ebp-9Ch] + char v108; // [esp+3Ch] [ebp-9Ch] + char v109; // [esp+3Ch] [ebp-9Ch] + char v110; // [esp+3Ch] [ebp-9Ch] + int *v111; // [esp+40h] [ebp-98h] + int v112; // [esp+40h] [ebp-98h] + _DWORD *v113; // [esp+48h] [ebp-90h] + char v114; // [esp+4Ch] [ebp-8Ch] + bool v115; // [esp+4Ch] [ebp-8Ch] + char v116; // [esp+50h] [ebp-88h] + char v117; // [esp+50h] [ebp-88h] + unsigned __int64 v118; // [esp+50h] [ebp-88h] + _DWORD *v119; // [esp+58h] [ebp-80h] + bool v120; // [esp+5Ch] [ebp-7Ch] + struct _Unwind_Exception *lpuexcpt; // [esp+60h] [ebp-78h] + bool lpuexcpta; // [esp+60h] [ebp-78h] + char lpuexcptb; // [esp+60h] [ebp-78h] + char lpuexcptc; // [esp+60h] [ebp-78h] + struct _Unwind_Exception *lpuexcptd; // [esp+60h] [ebp-78h] + char lpuexcpte; // [esp+60h] [ebp-78h] + int v127; // [esp+68h] [ebp-70h] + void *Block; // [esp+A8h] [ebp-30h] BYREF + size_t v129; // [esp+ACh] [ebp-2Ch] + int v130[10]; // [esp+B0h] [ebp-28h] BYREF + + v119 = a1; + v113 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v111 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v127 = *v111; + if ( !*v111 ) + { + v42 = operator new(0x68u); + v42[1] = 0; + *v42 = &off_51AF60; + v42[2] = 0; + v42[3] = 0; + *((_BYTE *)v42 + 16) = 0; + v42[5] = 0; + v42[6] = 0; + v42[7] = 0; + v42[8] = 0; + *((_WORD *)v42 + 18) = 0; + *((_BYTE *)v42 + 100) = 0; + v94 = (std::locale::_Impl *)v42; + std::__numpunct_cache::_M_cache((int)v42, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v94, lpuexcpt, v93); + v127 = *v111; + } + v112 = 8; + v102 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v102 != 64 ) + { + v7 = 10; + if ( v102 == 8 ) + v7 = 16; + v112 = v7; + } + lpuexcpta = a2 == -1; + if ( lpuexcpta && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v81 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v82 = lpuexcpta && a1 != 0; + v83 = v81 == -1; + if ( v81 != -1 ) + v82 = 0; + v84 = 0; + if ( !v83 ) + v84 = a1; + v104 = v82; + v119 = v84; + } + else + { + v104 = 0; + } + } + else + { + v104 = a2 == -1; + } + v120 = a4 == -1; + if ( v120 && a3 != 0 ) + { + if ( a3[2] >= a3[3] ) + { + v77 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v78 = v120 && a3 != 0; + v79 = v77 == -1; + if ( v77 != -1 ) + v78 = 0; + v80 = 0; + if ( !v79 ) + v80 = a3; + v100 = v78; + v113 = v80; + } + else + { + v100 = 0; + } + } + else + { + v100 = a4 == -1; + } + if ( v104 != v100 ) + { + if ( v119 && a2 == -1 ) + { + v41 = (char *)v119[2]; + if ( (unsigned int)v41 >= v119[3] ) + { + v85 = (*(int (__fastcall **)(_DWORD *))(*v119 + 36))(v119); + v86 = -1; + v87 = v85 == -1; + if ( v85 != -1 ) + v86 = v85; + v88 = 0; + if ( !v87 ) + v88 = v119; + lpuexcptb = v86; + v119 = v88; + } + else + { + lpuexcptb = *v41; + } + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v127 + 16); + v98 = *(_BYTE *)(v127 + 74) == (unsigned __int8)lpuexcptb; + if ( *(_BYTE *)(v127 + 74) == lpuexcptb || *(_BYTE *)(v127 + 75) == lpuexcptb ) + { + if ( (!v8 || *(_BYTE *)(v127 + 37) != lpuexcptb) && *(_BYTE *)(v127 + 36) != lpuexcptb ) + { + v9 = v119[2]; + v10 = v119[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v119 + 40))(v119); + v11 = v119[2]; + v10 = v119[3]; + } + else + { + v11 = v9 + 1; + v119[2] = v11; + } + v114 = 0; + if ( v11 >= v10 ) + { + v52 = (*(int (__fastcall **)(_DWORD *))(*v119 + 36))(v119) == -1; + v53 = 0; + if ( !v52 ) + v53 = v119; + v114 = v52; + v119 = v53; + } + if ( v120 && v113 != 0 ) + { + if ( v113[2] >= v113[3] ) + { + v89 = (*(int (__fastcall **)(_DWORD *))(*v113 + 36))(v113); + v90 = v120 && v113 != 0; + v91 = v89 == -1; + if ( v89 != -1 ) + v90 = 0; + v116 = v90; + v92 = 0; + if ( !v91 ) + v92 = v113; + v113 = v92; + } + else + { + v116 = 0; + } + } + else + { + v116 = a4 == -1; + } + if ( v114 == v116 ) + { + v103 = 1; + v105 = 0; + v115 = 0; + goto LABEL_43; + } + lpuexcptb = -1; + if ( v119 ) + { + v40 = (char *)v119[2]; + if ( (unsigned int)v40 >= v119[3] ) + { + v62 = -1; + v63 = (*(int (__fastcall **)(_DWORD *))(*v119 + 36))(v119); + v64 = v63 == -1; + if ( v63 != -1 ) + v62 = v63; + lpuexcptb = v62; + v65 = 0; + if ( !v64 ) + v65 = v119; + v119 = v65; + } + else + { + lpuexcptb = *v40; + } + } + v8 = *(_BYTE *)(v127 + 16); + } + } + else + { + v98 = 0; + } + v105 = 0; + v115 = 0; + while ( 1 ) + { + if ( v8 && *(_BYTE *)(v127 + 37) == lpuexcptb || *(_BYTE *)(v127 + 36) == lpuexcptb ) + { +LABEL_112: + v103 = 0; + goto LABEL_43; + } + if ( *(_BYTE *)(v127 + 78) != lpuexcptb ) + break; + v25 = v112 == 10 || !v115; + if ( !v25 ) + goto LABEL_33; + v115 = v102 == 0 || v112 == 8; + if ( !v115 ) + { + ++v105; + v115 = v25; + goto LABEL_37; + } + v105 = 0; + v12 = v119; + v112 = 8; + v13 = v119[2]; + v14 = v119[3]; + if ( v13 >= v14 ) + { +LABEL_75: + (*(void (__fastcall **)(_DWORD *))(*v119 + 40))(v119); + v107 = 0; + if ( v119[2] < v119[3] ) + goto LABEL_39; + goto LABEL_76; + } +LABEL_38: + v15 = v13 + 1; + v107 = 0; + v12[2] = v15; + if ( v15 < v14 ) + goto LABEL_39; +LABEL_76: + v26 = (*(int (__fastcall **)(_DWORD *))(*v119 + 36))(v119) == -1; + v27 = 0; + if ( !v26 ) + v27 = v119; + v107 = v26; + v119 = v27; +LABEL_39: + if ( v120 && v113 != 0 ) + { + if ( v113[2] >= v113[3] ) + { + v43 = (*(int (__fastcall **)(_DWORD *))(*v113 + 36))(v113); + v44 = v120 && v113 != 0; + v45 = v43 == -1; + if ( v43 != -1 ) + v44 = 0; + v46 = 0; + if ( !v45 ) + v46 = v113; + v117 = v44; + v113 = v46; + } + else + { + v117 = 0; + } + } + else + { + v117 = a4 == -1; + } + if ( v107 == v117 ) + { + v103 = 1; + goto LABEL_43; + } + lpuexcptb = -1; + if ( v119 ) + { + v28 = (char *)v119[2]; + if ( (unsigned int)v28 >= v119[3] ) + { + v66 = -1; + v67 = (*(int (__fastcall **)(_DWORD *))(*v119 + 36))(v119); + v68 = v67 == -1; + if ( v67 != -1 ) + v66 = v67; + v69 = 0; + if ( !v68 ) + v69 = v119; + lpuexcptb = v66; + v119 = v69; + } + else + { + lpuexcptb = *v28; + } + } + if ( !v115 ) + { + v103 = 0; + goto LABEL_43; + } + v8 = *(_BYTE *)(v127 + 16); + } + if ( !v115 ) + goto LABEL_112; +LABEL_33: + if ( *(_BYTE *)(v127 + 76) != lpuexcptb && *(_BYTE *)(v127 + 77) != lpuexcptb ) + { + v103 = 0; + v115 = 1; + goto LABEL_43; + } + if ( v102 != 0 && v112 != 16 ) + { + v103 = 0; + MaxCount = v112; + Buf = v112; + v115 = 1; + goto LABEL_46; + } + v105 = 0; + v115 = 0; + v112 = 16; +LABEL_37: + v12 = v119; + v13 = v119[2]; + v14 = v119[3]; + if ( v13 >= v14 ) + goto LABEL_75; + goto LABEL_38; + } + v98 = 0; + v103 = 1; + lpuexcptb = 0; + v105 = 0; + v115 = 0; +LABEL_43: + v16 = 22; + if ( v112 != 16 ) + v16 = v112; + MaxCount = v16; + Buf = v16; +LABEL_46: + v129 = 0; + Block = v130; + LOBYTE(v130[0]) = 0; + if ( *(_BYTE *)(v127 + 16) ) + std::string::reserve(&Block, 0x20u); + v17 = 0xFFFFFFFFFFFFFFFFLL / v112; + v99 = *(_BYTE *)(v127 + 100); + if ( !v99 ) + { + if ( v103 ) + { + v76 = v103; + v101 = 0; + v103 = 0; + lpuexcptd = (struct _Unwind_Exception *)v129; + v23 = (int *)Block; + v99 = v76; + v118 = 0LL; + goto LABEL_63; + } + v101 = 0; + v118 = 0LL; + while ( Buf > 10 ) + { + if ( (unsigned __int8)(lpuexcptb - 48) <= 9u ) + goto LABEL_54; + v18 = lpuexcptb - 87; + if ( (unsigned __int8)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int8)(lpuexcptb - 65) > 5u ) + goto LABEL_111; + v18 = lpuexcptb - 55; + } +LABEL_55: + if ( v17 >= v118 ) + { + v101 |= __PAIR64__(~(v18 >> 31), ~v18) < v112 * v118; + v19 = v119; + ++v105; + v20 = v119[2]; + v21 = v119[3]; + v118 = v112 * v118 + v18; + if ( v20 < v21 ) + { +LABEL_57: + v22 = v20 + 1; + v19[2] = v22; + goto LABEL_58; + } + } + else + { + v19 = v119; + v101 = 1; + v20 = v119[2]; + v21 = v119[3]; + if ( v20 < v21 ) + goto LABEL_57; + } + (*(void (__fastcall **)(_DWORD *))(*v119 + 40))(v119); + v22 = v119[2]; + v21 = v119[3]; +LABEL_58: + v108 = 0; + if ( v22 >= v21 ) + { + v47 = (*(int (__fastcall **)(_DWORD *))(*v119 + 36))(v119) == -1; + v48 = 0; + if ( !v47 ) + v48 = v119; + v108 = v47; + v119 = v48; + } + if ( v120 && v113 != 0 ) + { + if ( v113[2] >= v113[3] ) + { + v49 = (*(int (__fastcall **)(_DWORD *))(*v113 + 36))(v113) == -1; + v50 = 0; + if ( !v49 ) + v50 = v113; + v51 = v120 && v113 != 0; + v113 = v50; + if ( !v49 ) + v51 = 0; + lpuexcptc = v51; + } + else + { + lpuexcptc = 0; + } + } + else + { + lpuexcptc = a4 == -1; + } + if ( lpuexcptc == v108 ) + { + v99 = 1; + lpuexcptd = (struct _Unwind_Exception *)v129; + v23 = (int *)Block; + goto LABEL_63; + } + if ( v119 ) + { + v29 = (char *)v119[2]; + if ( (unsigned int)v29 >= v119[3] ) + { + v54 = (*(int (__fastcall **)(_DWORD *))(*v119 + 36))(v119); + v55 = v54 == -1; + v56 = -1; + if ( v54 != -1 ) + v56 = v54; + v57 = 0; + if ( !v55 ) + v57 = v119; + lpuexcptb = v56; + v119 = v57; + } + else + { + lpuexcptb = *v29; + } + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 47 || (char)(Buf + 48) <= lpuexcptb ) + goto LABEL_111; +LABEL_54: + v18 = lpuexcptb - 48; + goto LABEL_55; + } + if ( v103 ) + { + v118 = 0LL; + lpuexcptd = (struct _Unwind_Exception *)v129; + v23 = (int *)Block; + v99 = v103; + v101 = 0; + v103 = 0; + goto LABEL_63; + } + v101 = 0; + v118 = 0LL; + Bufa = (void *)(v127 + 78); + while ( !*(_BYTE *)(v127 + 16) || *(_BYTE *)(v127 + 37) != lpuexcptb ) + { + if ( lpuexcptb == *(_BYTE *)(v127 + 36) || (v31 = memchr(Bufa, lpuexcptb, MaxCount)) == 0 ) + { +LABEL_111: + v99 = 0; + lpuexcptd = (struct _Unwind_Exception *)v129; + v23 = (int *)Block; + goto LABEL_63; + } + v32 = v31 - (_BYTE *)Bufa; + if ( v31 - (_BYTE *)Bufa > 15 ) + v32 -= 6; + if ( v17 >= v118 ) + { + v101 |= __PAIR64__(~(v32 >> 31), ~v32) < v112 * v118; + v118 = v112 * v118 + v32; + ++v105; + goto LABEL_123; + } + v33 = v119; + v101 = v99; + v35 = v119[3]; + v34 = v119[2]; + if ( v34 < v35 ) + { +LABEL_124: + v36 = v34 + 1; + v33[2] = v36; + goto LABEL_125; + } +LABEL_131: + (*(void (__fastcall **)(_DWORD *))(*v119 + 40))(v119); + v36 = v119[2]; + v35 = v119[3]; +LABEL_125: + v109 = 0; + if ( v35 <= v36 ) + { + v70 = (*(int (__fastcall **)(_DWORD *))(*v119 + 36))(v119) == -1; + v71 = 0; + if ( v70 ) + v71 = v99; + v109 = v71; + v72 = 0; + if ( !v70 ) + v72 = v119; + v119 = v72; + } + if ( v120 && v113 != 0 ) + { + if ( v113[2] >= v113[3] ) + { + v73 = (*(int (__fastcall **)(_DWORD *))(*v113 + 36))(v113) == -1; + v74 = 0; + if ( !v73 ) + v74 = v113; + v75 = v120 && v113 != 0; + v113 = v74; + if ( !v73 ) + v75 = 0; + lpuexcpte = v75; + } + else + { + lpuexcpte = 0; + } + } + else + { + lpuexcpte = a4 == -1; + } + if ( lpuexcpte == v109 ) + { + lpuexcptd = (struct _Unwind_Exception *)v129; + v23 = (int *)Block; + goto LABEL_63; + } + if ( v119 ) + { + v37 = (char *)v119[2]; + if ( (unsigned int)v37 >= v119[3] ) + { + v58 = (*(int (__fastcall **)(_DWORD *))(*v119 + 36))(v119); + v59 = v58 == -1; + v60 = -1; + if ( v58 != -1 ) + v60 = v58; + v61 = 0; + if ( !v59 ) + v61 = v119; + lpuexcptb = v60; + v119 = v61; + } + else + { + lpuexcptb = *v37; + } + } + else + { + lpuexcptb = -1; + } + } + v23 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v129; + if ( v105 ) + { + v38 = 15; + if ( Block != v130 ) + v38 = v130[0]; + v110 = v105; + v106 = v129 + 1; + if ( v129 + 1 > v38 ) + { + std::string::_M_mutate((int)&Block, v129, 0, 0, 1u); + v23 = (int *)Block; + } + v39 = v106; + v105 = 0; + *((_BYTE *)lpuexcptd + (_DWORD)v23) = v110; + v129 = v39; + *((_BYTE *)Block + v39) = 0; +LABEL_123: + v33 = v119; + v34 = v119[2]; + v35 = v119[3]; + if ( v34 < v35 ) + goto LABEL_124; + goto LABEL_131; + } + v99 = 0; + v103 = *(_BYTE *)(v127 + 16); +LABEL_63: + if ( lpuexcptd ) + { + v30 = 15; + if ( v23 != v130 ) + v30 = v130[0]; + if ( (unsigned int)lpuexcptd + 1 > v30 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v23 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v23) = v105; + v129 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v127 + 8), *(_DWORD *)(v127 + 12), (int)&Block) ) + *a6 = 4; + v23 = (int *)Block; + if ( v115 || v129 | v105 ) + goto LABEL_103; +LABEL_66: + *a7 = 0; + a7[1] = 0; + *a6 = 4; + } + else + { + if ( !v105 && !v115 ) + goto LABEL_66; +LABEL_103: + if ( v103 ) + goto LABEL_66; + if ( v101 ) + { + *a7 = -1; + a7[1] = -1; + *a6 = 4; + } + else + { + if ( v98 ) + v118 = -(__int64)v118; + *(_QWORD *)a7 = v118; + } + } + if ( v99 ) + *a6 |= 2u; + if ( v23 != v130 ) + operator delete(v23); + return v119; +} +// 471605: variable 'v93' is possibly undefined +// 50C628: using guessed type signed __int32 std::numpunct::id; +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (00471BB0) -------------------------------------------------------- +unsigned __int64 __stdcall std::num_get>::_M_extract_int( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + int *a6) +{ + int v6; // eax + _BYTE *v7; // eax + char v8; // al + int v9; // eax + unsigned int v10; // edx + int v11; // eax + int v12; // eax + _DWORD *v13; // ecx + unsigned int v14; // eax + char v15; // al + const char *v16; // ecx + int v17; // eax + _DWORD *v19; // ecx + unsigned int v20; // eax + bool v21; // al + _BYTE *v22; // eax + char v23; // al + char i; // al + _BYTE *v25; // eax + int v26; // eax + _DWORD *v27; // ecx + unsigned int v28; // eax + char v29; // al + char v30; // al + int v31; // edx + int v32; // eax + char *v33; // eax + char *v34; // eax + bool v35; // al + int v36; // eax + unsigned int v37; // [esp+4h] [ebp-94h] + bool v38; // [esp+1Fh] [ebp-79h] + size_t MaxCount; // [esp+20h] [ebp-78h] + int Buf; // [esp+24h] [ebp-74h] + void *Bufa; // [esp+24h] [ebp-74h] + unsigned int v42; // [esp+28h] [ebp-70h] + char v43; // [esp+28h] [ebp-70h] + int v44; // [esp+2Ch] [ebp-6Ch] + char v45; // [esp+2Ch] [ebp-6Ch] + int v46; // [esp+30h] [ebp-68h] + char v47; // [esp+34h] [ebp-64h] + char v48; // [esp+35h] [ebp-63h] + char v49; // [esp+35h] [ebp-63h] + bool v50; // [esp+36h] [ebp-62h] + char v51; // [esp+36h] [ebp-62h] + bool v52; // [esp+37h] [ebp-61h] + unsigned int v53; // [esp+38h] [ebp-60h] + struct _Unwind_Exception *v54; // [esp+3Ch] [ebp-5Ch] + char lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + unsigned __int64 lpuexcptb; // [esp+40h] [ebp-58h] + char lpuexcptc; // [esp+40h] [ebp-58h] + unsigned int v59; // [esp+48h] [ebp-50h] + char v60; // [esp+48h] [ebp-50h] + int v61; // [esp+8Bh] [ebp-Dh] BYREF + const char *v62[2]; // [esp+8Ch] [ebp-Ch] BYREF + + v54 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v44 = v6; + if ( v6 == 64 ) + { + v53 = 8; +LABEL_4: + v50 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v50 ) + { + lpuexcpt = 0; + v46 = 0; + MaxCount = v53; + Buf = v53; + v52 = 0; + v38 = 0; + goto LABEL_17; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v53 = 10; + goto LABEL_4; + } + v50 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v50 ) + { + MaxCount = 22; + lpuexcpt = 0; + v46 = 0; + v52 = 0; + v38 = 0; + v53 = 16; + Buf = 22; + goto LABEL_17; + } + v53 = 16; +LABEL_5: + LOBYTE(v7) = BYTE4(a1); + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_7; + v7 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v7 < *(_DWORD *)(a1 + 12) ) + { + LOBYTE(v7) = *v7; +LABEL_7: + lpuexcpt = (char)v7; + goto LABEL_8; + } + v7 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v7 != (_BYTE *)-1 ) + goto LABEL_7; + LODWORD(a1) = 0; + lpuexcpt = -1; +LABEL_8: + v8 = *((_BYTE *)v54 + 16); + v38 = *((_BYTE *)v54 + 74) == (unsigned __int8)lpuexcpt; + if ( *((_BYTE *)v54 + 74) != lpuexcpt && *((_BYTE *)v54 + 75) != lpuexcpt + || v8 && *((_BYTE *)v54 + 37) == lpuexcpt + || *((_BYTE *)v54 + 36) == lpuexcpt ) + { + goto LABEL_45; + } + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + v46 = 0; + v50 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v52 = 0; + if ( !v50 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v8 = *((_BYTE *)v54 + 16); +LABEL_45: + v46 = 0; + v52 = 0; + while ( 1 ) + { + if ( v8 && *((_BYTE *)v54 + 37) == lpuexcpt || *((_BYTE *)v54 + 36) == lpuexcpt ) + { +LABEL_94: + v50 = 0; + goto LABEL_14; + } + if ( *((_BYTE *)v54 + 78) != lpuexcpt ) + break; + v21 = v53 == 10 || !v52; + if ( !v21 ) + goto LABEL_51; + v52 = v44 == 0 || v53 == 8; + if ( !v52 ) + { + ++v46; + v52 = v21; + goto LABEL_55; + } + v19 = (_DWORD *)a1; + v46 = 0; + v53 = 8; + v20 = *(_DWORD *)(a1 + 8); + if ( v20 < *(_DWORD *)(a1 + 12) ) + { +LABEL_56: + HIDWORD(a1) = -1; + v19[2] = v20 + 1; + goto LABEL_57; + } +LABEL_64: + (*(void (__fastcall **)(_DWORD *))(*v19 + 40))(v19); + v19 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + v51 = 1; + goto LABEL_58; + } +LABEL_57: + v51 = 0; + if ( v19[2] >= v19[3] && (*(int (__fastcall **)(_DWORD *))(*v19 + 36))(v19) == -1 ) + { + LODWORD(a1) = 0; + v51 = 1; + } +LABEL_58: + v60 = a3 == -1; + v43 = v60 & (a2 != 0); + if ( v43 ) + { + v60 = 0; + if ( a2[2] >= a2[3] && (*(int (**)(void))(*a2 + 36))() == -1 ) + { + a2 = 0; + v60 = v43; + } + } + if ( v51 == v60 ) + { + v50 = 1; + goto LABEL_14; + } + LOBYTE(v22) = BYTE4(a1); + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_68; + v22 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v22 < *(_DWORD *)(a1 + 12) ) + { + LOBYTE(v22) = *v22; +LABEL_68: + lpuexcpt = (char)v22; + goto LABEL_69; + } + v22 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v22 != (_BYTE *)-1 ) + goto LABEL_68; + LODWORD(a1) = 0; + lpuexcpt = -1; +LABEL_69: + if ( !v52 ) + goto LABEL_94; + v8 = *((_BYTE *)v54 + 16); + } + if ( !v52 ) + goto LABEL_94; +LABEL_51: + if ( *((_BYTE *)v54 + 76) != lpuexcpt && *((_BYTE *)v54 + 77) != lpuexcpt ) + { + v50 = 0; + v52 = 1; + goto LABEL_14; + } + if ( v44 != 0 && v53 != 16 ) + { + v50 = 0; + v52 = 1; + MaxCount = v53; + Buf = v53; + goto LABEL_17; + } + v46 = 0; + v52 = 0; + v53 = 16; +LABEL_55: + v19 = (_DWORD *)a1; + v20 = *(_DWORD *)(a1 + 8); + if ( v20 < *(_DWORD *)(a1 + 12) ) + goto LABEL_56; + goto LABEL_64; + } +LABEL_14: + v9 = 22; + if ( v53 != 16 ) + v9 = v53; + MaxCount = v9; + Buf = v9; +LABEL_17: + v62[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v54 + 16) ) + std::string::reserve((int *)v62, (std::string *)0x20, v37); + v10 = 0xFFFFFFFF % v53; + v42 = 0xFFFFFFFF / v53; + v48 = *((_BYTE *)v54 + 100); + if ( v48 ) + { + if ( v50 ) + { + v59 = 0; + v45 = 0; + v48 = v50; + v50 = 0; + goto LABEL_33; + } + v45 = 0; + v59 = 0; + Bufa = (char *)v54 + 78; +LABEL_100: + for ( i = *((_BYTE *)v54 + 16); i && *((_BYTE *)v54 + 37) == lpuexcpt; i = *((_BYTE *)v54 + 16) ) + { + if ( !v46 ) + { + v48 = 0; + v50 = i; + goto LABEL_33; + } + std::string::push_back((int *)v62, (std::string *)(char)v46, v37); + v27 = (_DWORD *)a1; + v46 = 0; + v28 = *(_DWORD *)(a1 + 8); + if ( v28 < *(_DWORD *)(a1 + 12) ) + goto LABEL_109; +LABEL_118: + (*(void (__fastcall **)(_DWORD *))(*v27 + 40))(v27); + v27 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_110; + lpuexcptc = v48; +LABEL_111: + v29 = a3 == -1; + v47 = v29 & (a2 != 0); + if ( v47 ) + { + v29 = 0; + if ( a2[2] >= a2[3] ) + { + v31 = (*(int (**)(void))(*a2 + 36))(); + v29 = 0; + if ( v31 == -1 ) + { + a2 = 0; + v29 = v47; + } + } + } + if ( v29 == lpuexcptc ) + goto LABEL_33; + v30 = BYTE4(a1); + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v34 = *(char **)(a1 + 8); + if ( (unsigned int)v34 >= *(_DWORD *)(a1 + 12) ) + { + v36 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v36; + if ( v36 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpt = -1; + } + goto LABEL_100; + } + v30 = *v34; + } + lpuexcpt = v30; + } + if ( lpuexcpt != *((_BYTE *)v54 + 36) ) + { + v25 = memchr(Bufa, lpuexcpt, MaxCount); + if ( v25 ) + { + v26 = v25 - (_BYTE *)Bufa; + if ( v26 > 15 ) + v26 -= 6; + if ( v42 < v59 ) + { + v45 = v48; + } + else + { + v45 |= ~v26 < v53 * v59; + ++v46; + v59 = v53 * v59 + v26; + } + v27 = (_DWORD *)a1; + v28 = *(_DWORD *)(a1 + 8); + if ( v28 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_118; +LABEL_109: + HIDWORD(a1) = -1; + v27[2] = v28 + 1; +LABEL_110: + lpuexcptc = 0; + if ( v27[2] >= v27[3] ) + { + lpuexcptc = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v27 + 36))(v27) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v48; + } + } + goto LABEL_111; + } + } +LABEL_97: + v48 = 0; + } + else + { + v45 = 0; + if ( !v50 ) + { + v59 = 0; +LABEL_22: + v11 = lpuexcpt; + if ( Buf > 10 ) + { + v10 = (unsigned __int8)lpuexcpt; + if ( (unsigned __int8)(lpuexcpt - 48) <= 9u ) + goto LABEL_25; + while ( (unsigned __int8)(v10 - 97) <= 5u ) + { + v12 = v11 - 87; + if ( v42 < v59 ) + goto LABEL_27; +LABEL_74: + v10 = v53 * v59; + v45 |= ~v12 < v53 * v59; + v13 = (_DWORD *)a1; + v59 = v53 * v59 + v12; + ++v46; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 < *(_DWORD *)(a1 + 12) ) + goto LABEL_28; +LABEL_75: + (*(void (__fastcall **)(_DWORD *, unsigned int))(*v13 + 40))(v13, v10); + v13 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_29; + lpuexcpta = 1; +LABEL_30: + v15 = a3 == -1; + LOBYTE(v10) = v15 & (a2 != 0); + v49 = v10; + if ( (_BYTE)v10 ) + { + v15 = 0; + if ( a2[2] >= a2[3] ) + { + v10 = (*(int (**)(void))(*a2 + 36))(); + v15 = 0; + if ( v10 == -1 ) + { + a2 = 0; + v15 = v49; + } + } + } + if ( lpuexcpta == v15 ) + { + v48 = 1; + goto LABEL_33; + } + v23 = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_81; + v33 = *(char **)(a1 + 8); + if ( (unsigned int)v33 < *(_DWORD *)(a1 + 12) ) + { + v23 = *v33; +LABEL_81: + lpuexcpt = v23; + goto LABEL_22; + } + v11 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v11; + if ( v11 != -1 ) + goto LABEL_22; + LODWORD(a1) = 0; + if ( Buf <= 10 ) + goto LABEL_97; + v10 = -1; + } + v10 -= 65; + if ( (unsigned __int8)v10 <= 5u ) + { + v12 = v11 - 55; + goto LABEL_26; + } + } + else if ( lpuexcpt > 47 && (char)(Buf + 48) > lpuexcpt ) + { +LABEL_25: + v12 = lpuexcpt - 48; +LABEL_26: + if ( v42 >= v59 ) + goto LABEL_74; +LABEL_27: + v13 = (_DWORD *)a1; + v45 = 1; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_75; +LABEL_28: + HIDWORD(a1) = -1; + v13[2] = v14 + 1; +LABEL_29: + lpuexcpta = 0; + if ( v13[2] >= v13[3] ) + { + lpuexcpta = 0; + if ( (*(int (__fastcall **)(_DWORD *, unsigned int))(*v13 + 36))(v13, v10) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } + } + goto LABEL_30; + } + goto LABEL_97; + } + v35 = v50; + v59 = 0; + v50 = 0; + v48 = v35; + } +LABEL_33: + v16 = v62[0]; + if ( *((_DWORD *)v62[0] - 3) ) + { + std::string::push_back((int *)v62, (std::string *)(char)v46, v37); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v54 + 2), *((_DWORD *)v54 + 3), v62) ) + *a5 = 4; + v16 = v62[0]; + if ( !v46 && !v52 && !*((_DWORD *)v62[0] - 3) ) + goto LABEL_36; + } + else if ( !v52 && !v46 ) + { + goto LABEL_36; + } + if ( v50 ) + { +LABEL_36: + *a6 = 0; + *a5 = 4; + goto LABEL_37; + } + if ( v45 ) + { + *a6 = -1; + *a5 = 4; + } + else + { + v32 = -v59; + if ( !v38 ) + v32 = v59; + *a6 = v32; + } +LABEL_37: + if ( v48 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v16 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_125: + std::string::_Rep::_M_destroy((void *)(v16 - 12), (int)&v61); + return lpuexcptb; + } + v17 = *((_DWORD *)v16 - 1); + *((_DWORD *)v16 - 1) = v17 - 1; + if ( v17 <= 0 ) + goto LABEL_125; + return lpuexcptb; +} +// 472409: variable 'v37' is possibly undefined +// 4720B7: variable 'v10' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00472720) -------------------------------------------------------- +unsigned __int64 __stdcall std::num_get>::_M_extract_int( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + int *a6) +{ + int v6; // eax + char v7; // dl + char v8; // al + int v9; // eax + unsigned int v10; // edx + int v11; // eax + int v12; // eax + _DWORD *v13; // ecx + unsigned int v14; // eax + char v15; // al + const char *v16; // ecx + int v17; // eax + _DWORD *v19; // ecx + unsigned int v20; // eax + bool v21; // al + _BYTE *v22; // eax + char v23; // al + char i; // al + _BYTE *v25; // eax + int v26; // eax + _DWORD *v27; // ecx + unsigned int v28; // eax + char v29; // al + char v30; // al + int v31; // edx + int v32; // eax + char *v33; // eax + char *v34; // eax + bool v35; // al + int v36; // eax + unsigned int v37; // [esp+4h] [ebp-94h] + bool v38; // [esp+18h] [ebp-80h] + size_t MaxCount; // [esp+1Ch] [ebp-7Ch] + unsigned int v40; // [esp+20h] [ebp-78h] + int Buf; // [esp+24h] [ebp-74h] + void *Bufa; // [esp+24h] [ebp-74h] + unsigned int v43; // [esp+28h] [ebp-70h] + char v44; // [esp+28h] [ebp-70h] + int v45; // [esp+2Ch] [ebp-6Ch] + char v46; // [esp+2Ch] [ebp-6Ch] + int v47; // [esp+30h] [ebp-68h] + char v48; // [esp+34h] [ebp-64h] + char v49; // [esp+35h] [ebp-63h] + char v50; // [esp+35h] [ebp-63h] + bool v51; // [esp+36h] [ebp-62h] + char v52; // [esp+36h] [ebp-62h] + bool v53; // [esp+37h] [ebp-61h] + unsigned int v54; // [esp+38h] [ebp-60h] + struct _Unwind_Exception *v55; // [esp+3Ch] [ebp-5Ch] + char lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + unsigned __int64 lpuexcptb; // [esp+40h] [ebp-58h] + char lpuexcptc; // [esp+40h] [ebp-58h] + unsigned int v60; // [esp+48h] [ebp-50h] + char v61; // [esp+48h] [ebp-50h] + int v62; // [esp+8Bh] [ebp-Dh] BYREF + const char *v63[2]; // [esp+8Ch] [ebp-Ch] BYREF + + v55 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v45 = v6; + if ( v6 == 64 ) + { + v54 = 8; +LABEL_4: + v51 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v51 ) + { + lpuexcpt = 0; + v47 = 0; + MaxCount = v54; + Buf = v54; + v53 = 0; + v38 = 0; + goto LABEL_14; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v54 = 10; + goto LABEL_4; + } + v51 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v51 ) + { + MaxCount = 22; + lpuexcpt = 0; + v47 = 0; + v53 = 0; + v38 = 0; + v54 = 16; + Buf = 22; + goto LABEL_14; + } + v54 = 16; +LABEL_5: + v7 = std::istreambuf_iterator::_M_get((int)&a1); + lpuexcpt = v7; + v38 = *((_BYTE *)v55 + 74) == (unsigned __int8)v7; + if ( *((_BYTE *)v55 + 74) == v7 ) + { + v8 = *((_BYTE *)v55 + 16); + } + else + { + v8 = *((_BYTE *)v55 + 16); + if ( *((_BYTE *)v55 + 75) != v7 ) + { +LABEL_42: + v47 = 0; + v53 = 0; + while ( 1 ) + { + if ( v8 && *((_BYTE *)v55 + 37) == lpuexcpt || *((_BYTE *)v55 + 36) == lpuexcpt ) + { +LABEL_91: + v51 = 0; + goto LABEL_11; + } + if ( *((_BYTE *)v55 + 78) != lpuexcpt ) + break; + v21 = v54 == 10 || !v53; + if ( !v21 ) + goto LABEL_48; + v53 = v54 == 8 || v45 == 0; + if ( !v53 ) + { + ++v47; + v53 = v21; + goto LABEL_52; + } + v19 = (_DWORD *)a1; + v47 = 0; + v54 = 8; + v20 = *(_DWORD *)(a1 + 8); + if ( v20 < *(_DWORD *)(a1 + 12) ) + { +LABEL_53: + HIDWORD(a1) = -1; + v19[2] = v20 + 1; + goto LABEL_54; + } +LABEL_61: + (*(void (__fastcall **)(_DWORD *))(*v19 + 40))(v19); + v19 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + v52 = 1; + goto LABEL_55; + } +LABEL_54: + v52 = 0; + if ( v19[2] >= v19[3] && (*(int (__fastcall **)(_DWORD *))(*v19 + 36))(v19) == -1 ) + { + LODWORD(a1) = 0; + v52 = 1; + } +LABEL_55: + v61 = a3 == -1; + v44 = v61 & (a2 != 0); + if ( v44 ) + { + v61 = 0; + if ( a2[2] >= a2[3] && (*(int (**)(void))(*a2 + 36))() == -1 ) + { + a2 = 0; + v61 = v44; + } + } + if ( v61 == v52 ) + { + v51 = 1; + goto LABEL_11; + } + LOBYTE(v22) = BYTE4(a1); + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_65; + v22 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v22 < *(_DWORD *)(a1 + 12) ) + { + LOBYTE(v22) = *v22; +LABEL_65: + lpuexcpt = (char)v22; + goto LABEL_66; + } + v22 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v22 != (_BYTE *)-1 ) + goto LABEL_65; + LODWORD(a1) = 0; + lpuexcpt = -1; +LABEL_66: + if ( !v53 ) + goto LABEL_91; + v8 = *((_BYTE *)v55 + 16); + } + if ( !v53 ) + goto LABEL_91; +LABEL_48: + if ( *((_BYTE *)v55 + 76) != lpuexcpt && *((_BYTE *)v55 + 77) != lpuexcpt ) + { + v51 = 0; + v53 = 1; + goto LABEL_11; + } + if ( v45 != 0 && v54 != 16 ) + { + v51 = 0; + v53 = 1; + MaxCount = v54; + Buf = v54; + goto LABEL_14; + } + v47 = 0; + v53 = 0; + v54 = 16; +LABEL_52: + v19 = (_DWORD *)a1; + v20 = *(_DWORD *)(a1 + 8); + if ( v20 < *(_DWORD *)(a1 + 12) ) + goto LABEL_53; + goto LABEL_61; + } + } + if ( v8 && *((_BYTE *)v55 + 37) == v7 || *((_BYTE *)v55 + 36) == v7 ) + goto LABEL_42; + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + v47 = 0; + v51 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v53 = 0; + if ( !v51 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v8 = *((_BYTE *)v55 + 16); + goto LABEL_42; + } +LABEL_11: + v9 = 22; + if ( v54 != 16 ) + v9 = v54; + MaxCount = v9; + Buf = v9; +LABEL_14: + v63[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v55 + 16) ) + std::string::reserve((int *)v63, (std::string *)0x20, v37); + v40 = v38 + 0x7FFFFFFF; + v10 = v40 % v54; + v43 = v40 / v54; + v49 = *((_BYTE *)v55 + 100); + if ( v49 ) + { + if ( v51 ) + { + v60 = 0; + v46 = 0; + v49 = v51; + v51 = 0; + goto LABEL_30; + } + v46 = 0; + v60 = 0; + Bufa = (char *)v55 + 78; +LABEL_97: + for ( i = *((_BYTE *)v55 + 16); i && *((_BYTE *)v55 + 37) == lpuexcpt; i = *((_BYTE *)v55 + 16) ) + { + if ( !v47 ) + { + v49 = 0; + v51 = i; + goto LABEL_30; + } + std::string::push_back((int *)v63, (std::string *)(char)v47, v37); + v27 = (_DWORD *)a1; + v47 = 0; + v28 = *(_DWORD *)(a1 + 8); + if ( v28 < *(_DWORD *)(a1 + 12) ) + goto LABEL_106; +LABEL_116: + (*(void (__fastcall **)(_DWORD *))(*v27 + 40))(v27); + v27 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_107; + lpuexcptc = v49; +LABEL_108: + v29 = a3 == -1; + v48 = v29 & (a2 != 0); + if ( v48 ) + { + v29 = 0; + if ( a2[2] >= a2[3] ) + { + v31 = (*(int (**)(void))(*a2 + 36))(); + v29 = 0; + if ( v31 == -1 ) + { + a2 = 0; + v29 = v48; + } + } + } + if ( v29 == lpuexcptc ) + goto LABEL_30; + v30 = BYTE4(a1); + if ( (_DWORD)a1 && HIDWORD(a1) == -1 ) + { + v34 = *(char **)(a1 + 8); + if ( (unsigned int)v34 >= *(_DWORD *)(a1 + 12) ) + { + v36 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v36; + if ( v36 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpt = -1; + } + goto LABEL_97; + } + v30 = *v34; + } + lpuexcpt = v30; + } + if ( lpuexcpt != *((_BYTE *)v55 + 36) ) + { + v25 = memchr(Bufa, lpuexcpt, MaxCount); + if ( v25 ) + { + v26 = v25 - (_BYTE *)Bufa; + if ( v26 > 15 ) + v26 -= 6; + if ( v43 < v60 ) + { + v46 = v49; + } + else + { + v46 |= v40 - v26 < v60 * v54; + ++v47; + v60 = v60 * v54 + v26; + } + v27 = (_DWORD *)a1; + v28 = *(_DWORD *)(a1 + 8); + if ( v28 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_116; +LABEL_106: + HIDWORD(a1) = -1; + v27[2] = v28 + 1; +LABEL_107: + lpuexcptc = 0; + if ( v27[2] >= v27[3] ) + { + lpuexcptc = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v27 + 36))(v27) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v49; + } + } + goto LABEL_108; + } + } +LABEL_94: + v49 = 0; + } + else + { + v46 = 0; + if ( !v51 ) + { + v60 = 0; +LABEL_19: + v11 = lpuexcpt; + if ( Buf > 10 ) + { + v10 = (unsigned __int8)lpuexcpt; + if ( (unsigned __int8)(lpuexcpt - 48) <= 9u ) + goto LABEL_22; + while ( (unsigned __int8)(v10 - 97) <= 5u ) + { + v12 = v11 - 87; + if ( v43 < v60 ) + goto LABEL_24; +LABEL_71: + v10 = v54 * v60; + v46 |= v40 - v12 < v54 * v60; + v13 = (_DWORD *)a1; + v60 = v54 * v60 + v12; + ++v47; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 < *(_DWORD *)(a1 + 12) ) + goto LABEL_25; +LABEL_72: + (*(void (__fastcall **)(_DWORD *, unsigned int))(*v13 + 40))(v13, v10); + v13 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_26; + lpuexcpta = 1; +LABEL_27: + v15 = a3 == -1; + LOBYTE(v10) = v15 & (a2 != 0); + v50 = v10; + if ( (_BYTE)v10 ) + { + v10 = a2[3]; + v15 = 0; + if ( a2[2] >= v10 ) + { + v10 = (*(int (**)(void))(*a2 + 36))(); + v15 = 0; + if ( v10 == -1 ) + { + a2 = 0; + v15 = v50; + } + } + } + if ( lpuexcpta == v15 ) + { + v49 = 1; + goto LABEL_30; + } + v23 = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_78; + v33 = *(char **)(a1 + 8); + if ( (unsigned int)v33 < *(_DWORD *)(a1 + 12) ) + { + v23 = *v33; +LABEL_78: + lpuexcpt = v23; + goto LABEL_19; + } + v11 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v11; + if ( v11 != -1 ) + goto LABEL_19; + LODWORD(a1) = 0; + if ( Buf <= 10 ) + goto LABEL_94; + v10 = -1; + } + v10 -= 65; + if ( (unsigned __int8)v10 <= 5u ) + { + v12 = v11 - 55; + goto LABEL_23; + } + } + else if ( lpuexcpt > 47 && (char)(Buf + 48) > lpuexcpt ) + { +LABEL_22: + v12 = lpuexcpt - 48; +LABEL_23: + if ( v43 >= v60 ) + goto LABEL_71; +LABEL_24: + v13 = (_DWORD *)a1; + v46 = 1; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_72; +LABEL_25: + HIDWORD(a1) = -1; + v13[2] = v14 + 1; +LABEL_26: + lpuexcpta = 0; + if ( v13[2] >= v13[3] ) + { + lpuexcpta = 0; + if ( (*(int (__fastcall **)(_DWORD *, unsigned int))(*v13 + 36))(v13, v10) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } + } + goto LABEL_27; + } + goto LABEL_94; + } + v35 = v51; + v60 = 0; + v51 = 0; + v49 = v35; + } +LABEL_30: + v16 = v63[0]; + if ( *((_DWORD *)v63[0] - 3) ) + { + std::string::push_back((int *)v63, (std::string *)(char)v47, v37); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v55 + 2), *((_DWORD *)v55 + 3), v63) ) + *a5 = 4; + v16 = v63[0]; + if ( !v47 && !v53 && !*((_DWORD *)v63[0] - 3) ) + goto LABEL_33; + } + else if ( !v53 && !v47 ) + { + goto LABEL_33; + } + if ( v51 ) + { +LABEL_33: + *a6 = 0; + *a5 = 4; + goto LABEL_34; + } + if ( v46 ) + { + *a6 = v38 + 0x7FFFFFFF; + *a5 = 4; + } + else + { + v32 = -v60; + if ( !v38 ) + v32 = v60; + *a6 = v32; + } +LABEL_34: + if ( v49 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v16 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_123: + std::string::_Rep::_M_destroy((void *)(v16 - 12), (int)&v62); + return lpuexcptb; + } + v17 = *((_DWORD *)v16 - 1); + *((_DWORD *)v16 - 1) = v17 - 1; + if ( v17 <= 0 ) + goto LABEL_123; + return lpuexcptb; +} +// 472F99: variable 'v37' is possibly undefined +// 472C38: variable 'v10' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00473280) -------------------------------------------------------- +unsigned __int64 __stdcall std::num_get>::_M_extract_int( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + int *a6) +{ + int v6; // eax + _BYTE *v7; // eax + char v8; // al + int v9; // eax + unsigned int v10; // edx + int v11; // eax + int v12; // eax + _DWORD *v13; // ecx + unsigned int v14; // eax + char v15; // al + const char *v16; // ecx + int v17; // eax + _DWORD *v19; // ecx + unsigned int v20; // eax + bool v21; // al + _BYTE *v22; // eax + char v23; // al + char i; // al + _BYTE *v25; // eax + int v26; // eax + _DWORD *v27; // ecx + unsigned int v28; // eax + char v29; // al + char v30; // al + int v31; // edx + int v32; // eax + char *v33; // eax + char *v34; // eax + bool v35; // al + int v36; // eax + unsigned int v37; // [esp+4h] [ebp-94h] + bool v38; // [esp+1Fh] [ebp-79h] + size_t MaxCount; // [esp+20h] [ebp-78h] + int Buf; // [esp+24h] [ebp-74h] + void *Bufa; // [esp+24h] [ebp-74h] + unsigned int v42; // [esp+28h] [ebp-70h] + char v43; // [esp+28h] [ebp-70h] + int v44; // [esp+2Ch] [ebp-6Ch] + char v45; // [esp+2Ch] [ebp-6Ch] + int v46; // [esp+30h] [ebp-68h] + char v47; // [esp+34h] [ebp-64h] + char v48; // [esp+35h] [ebp-63h] + char v49; // [esp+35h] [ebp-63h] + bool v50; // [esp+36h] [ebp-62h] + char v51; // [esp+36h] [ebp-62h] + bool v52; // [esp+37h] [ebp-61h] + unsigned int v53; // [esp+38h] [ebp-60h] + struct _Unwind_Exception *v54; // [esp+3Ch] [ebp-5Ch] + char lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + unsigned __int64 lpuexcptb; // [esp+40h] [ebp-58h] + char lpuexcptc; // [esp+40h] [ebp-58h] + unsigned int v59; // [esp+48h] [ebp-50h] + char v60; // [esp+48h] [ebp-50h] + int v61; // [esp+8Bh] [ebp-Dh] BYREF + const char *v62[2]; // [esp+8Ch] [ebp-Ch] BYREF + + v54 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v44 = v6; + if ( v6 == 64 ) + { + v53 = 8; +LABEL_4: + v50 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v50 ) + { + lpuexcpt = 0; + v46 = 0; + MaxCount = v53; + Buf = v53; + v52 = 0; + v38 = 0; + goto LABEL_17; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v53 = 10; + goto LABEL_4; + } + v50 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v50 ) + { + MaxCount = 22; + lpuexcpt = 0; + v46 = 0; + v52 = 0; + v38 = 0; + v53 = 16; + Buf = 22; + goto LABEL_17; + } + v53 = 16; +LABEL_5: + LOBYTE(v7) = BYTE4(a1); + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_7; + v7 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v7 < *(_DWORD *)(a1 + 12) ) + { + LOBYTE(v7) = *v7; +LABEL_7: + lpuexcpt = (char)v7; + goto LABEL_8; + } + v7 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v7 != (_BYTE *)-1 ) + goto LABEL_7; + LODWORD(a1) = 0; + lpuexcpt = -1; +LABEL_8: + v8 = *((_BYTE *)v54 + 16); + v38 = *((_BYTE *)v54 + 74) == (unsigned __int8)lpuexcpt; + if ( *((_BYTE *)v54 + 74) != lpuexcpt && *((_BYTE *)v54 + 75) != lpuexcpt + || v8 && *((_BYTE *)v54 + 37) == lpuexcpt + || *((_BYTE *)v54 + 36) == lpuexcpt ) + { + goto LABEL_45; + } + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + v46 = 0; + v50 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v52 = 0; + if ( !v50 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v8 = *((_BYTE *)v54 + 16); +LABEL_45: + v46 = 0; + v52 = 0; + while ( 1 ) + { + if ( v8 && *((_BYTE *)v54 + 37) == lpuexcpt || *((_BYTE *)v54 + 36) == lpuexcpt ) + { +LABEL_94: + v50 = 0; + goto LABEL_14; + } + if ( *((_BYTE *)v54 + 78) != lpuexcpt ) + break; + v21 = v53 == 10 || !v52; + if ( !v21 ) + goto LABEL_51; + v52 = v44 == 0 || v53 == 8; + if ( !v52 ) + { + ++v46; + v52 = v21; + goto LABEL_55; + } + v19 = (_DWORD *)a1; + v46 = 0; + v53 = 8; + v20 = *(_DWORD *)(a1 + 8); + if ( v20 < *(_DWORD *)(a1 + 12) ) + { +LABEL_56: + HIDWORD(a1) = -1; + v19[2] = v20 + 1; + goto LABEL_57; + } +LABEL_64: + (*(void (__fastcall **)(_DWORD *))(*v19 + 40))(v19); + v19 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + v51 = 1; + goto LABEL_58; + } +LABEL_57: + v51 = 0; + if ( v19[2] >= v19[3] && (*(int (__fastcall **)(_DWORD *))(*v19 + 36))(v19) == -1 ) + { + LODWORD(a1) = 0; + v51 = 1; + } +LABEL_58: + v60 = a3 == -1; + v43 = v60 & (a2 != 0); + if ( v43 ) + { + v60 = 0; + if ( a2[2] >= a2[3] && (*(int (**)(void))(*a2 + 36))() == -1 ) + { + a2 = 0; + v60 = v43; + } + } + if ( v51 == v60 ) + { + v50 = 1; + goto LABEL_14; + } + LOBYTE(v22) = BYTE4(a1); + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_68; + v22 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v22 < *(_DWORD *)(a1 + 12) ) + { + LOBYTE(v22) = *v22; +LABEL_68: + lpuexcpt = (char)v22; + goto LABEL_69; + } + v22 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v22 != (_BYTE *)-1 ) + goto LABEL_68; + LODWORD(a1) = 0; + lpuexcpt = -1; +LABEL_69: + if ( !v52 ) + goto LABEL_94; + v8 = *((_BYTE *)v54 + 16); + } + if ( !v52 ) + goto LABEL_94; +LABEL_51: + if ( *((_BYTE *)v54 + 76) != lpuexcpt && *((_BYTE *)v54 + 77) != lpuexcpt ) + { + v50 = 0; + v52 = 1; + goto LABEL_14; + } + if ( v44 != 0 && v53 != 16 ) + { + v50 = 0; + v52 = 1; + MaxCount = v53; + Buf = v53; + goto LABEL_17; + } + v46 = 0; + v52 = 0; + v53 = 16; +LABEL_55: + v19 = (_DWORD *)a1; + v20 = *(_DWORD *)(a1 + 8); + if ( v20 < *(_DWORD *)(a1 + 12) ) + goto LABEL_56; + goto LABEL_64; + } +LABEL_14: + v9 = 22; + if ( v53 != 16 ) + v9 = v53; + MaxCount = v9; + Buf = v9; +LABEL_17: + v62[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v54 + 16) ) + std::string::reserve((int *)v62, (std::string *)0x20, v37); + v10 = 0xFFFFFFFF % v53; + v42 = 0xFFFFFFFF / v53; + v48 = *((_BYTE *)v54 + 100); + if ( v48 ) + { + if ( v50 ) + { + v59 = 0; + v45 = 0; + v48 = v50; + v50 = 0; + goto LABEL_33; + } + v45 = 0; + v59 = 0; + Bufa = (char *)v54 + 78; +LABEL_100: + for ( i = *((_BYTE *)v54 + 16); i && *((_BYTE *)v54 + 37) == lpuexcpt; i = *((_BYTE *)v54 + 16) ) + { + if ( !v46 ) + { + v48 = 0; + v50 = i; + goto LABEL_33; + } + std::string::push_back((int *)v62, (std::string *)(char)v46, v37); + v27 = (_DWORD *)a1; + v46 = 0; + v28 = *(_DWORD *)(a1 + 8); + if ( v28 < *(_DWORD *)(a1 + 12) ) + goto LABEL_109; +LABEL_118: + (*(void (__fastcall **)(_DWORD *))(*v27 + 40))(v27); + v27 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_110; + lpuexcptc = v48; +LABEL_111: + v29 = a3 == -1; + v47 = v29 & (a2 != 0); + if ( v47 ) + { + v29 = 0; + if ( a2[2] >= a2[3] ) + { + v31 = (*(int (**)(void))(*a2 + 36))(); + v29 = 0; + if ( v31 == -1 ) + { + a2 = 0; + v29 = v47; + } + } + } + if ( v29 == lpuexcptc ) + goto LABEL_33; + v30 = BYTE4(a1); + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v34 = *(char **)(a1 + 8); + if ( (unsigned int)v34 >= *(_DWORD *)(a1 + 12) ) + { + v36 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v36; + if ( v36 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpt = -1; + } + goto LABEL_100; + } + v30 = *v34; + } + lpuexcpt = v30; + } + if ( lpuexcpt != *((_BYTE *)v54 + 36) ) + { + v25 = memchr(Bufa, lpuexcpt, MaxCount); + if ( v25 ) + { + v26 = v25 - (_BYTE *)Bufa; + if ( v26 > 15 ) + v26 -= 6; + if ( v42 < v59 ) + { + v45 = v48; + } + else + { + v45 |= ~v26 < v53 * v59; + ++v46; + v59 = v53 * v59 + v26; + } + v27 = (_DWORD *)a1; + v28 = *(_DWORD *)(a1 + 8); + if ( v28 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_118; +LABEL_109: + HIDWORD(a1) = -1; + v27[2] = v28 + 1; +LABEL_110: + lpuexcptc = 0; + if ( v27[2] >= v27[3] ) + { + lpuexcptc = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v27 + 36))(v27) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v48; + } + } + goto LABEL_111; + } + } +LABEL_97: + v48 = 0; + } + else + { + v45 = 0; + if ( !v50 ) + { + v59 = 0; +LABEL_22: + v11 = lpuexcpt; + if ( Buf > 10 ) + { + v10 = (unsigned __int8)lpuexcpt; + if ( (unsigned __int8)(lpuexcpt - 48) <= 9u ) + goto LABEL_25; + while ( (unsigned __int8)(v10 - 97) <= 5u ) + { + v12 = v11 - 87; + if ( v42 < v59 ) + goto LABEL_27; +LABEL_74: + v10 = v53 * v59; + v45 |= ~v12 < v53 * v59; + v13 = (_DWORD *)a1; + v59 = v53 * v59 + v12; + ++v46; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 < *(_DWORD *)(a1 + 12) ) + goto LABEL_28; +LABEL_75: + (*(void (__fastcall **)(_DWORD *, unsigned int))(*v13 + 40))(v13, v10); + v13 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_29; + lpuexcpta = 1; +LABEL_30: + v15 = a3 == -1; + LOBYTE(v10) = v15 & (a2 != 0); + v49 = v10; + if ( (_BYTE)v10 ) + { + v15 = 0; + if ( a2[2] >= a2[3] ) + { + v10 = (*(int (**)(void))(*a2 + 36))(); + v15 = 0; + if ( v10 == -1 ) + { + a2 = 0; + v15 = v49; + } + } + } + if ( lpuexcpta == v15 ) + { + v48 = 1; + goto LABEL_33; + } + v23 = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_81; + v33 = *(char **)(a1 + 8); + if ( (unsigned int)v33 < *(_DWORD *)(a1 + 12) ) + { + v23 = *v33; +LABEL_81: + lpuexcpt = v23; + goto LABEL_22; + } + v11 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v11; + if ( v11 != -1 ) + goto LABEL_22; + LODWORD(a1) = 0; + if ( Buf <= 10 ) + goto LABEL_97; + v10 = -1; + } + v10 -= 65; + if ( (unsigned __int8)v10 <= 5u ) + { + v12 = v11 - 55; + goto LABEL_26; + } + } + else if ( lpuexcpt > 47 && (char)(Buf + 48) > lpuexcpt ) + { +LABEL_25: + v12 = lpuexcpt - 48; +LABEL_26: + if ( v42 >= v59 ) + goto LABEL_74; +LABEL_27: + v13 = (_DWORD *)a1; + v45 = 1; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_75; +LABEL_28: + HIDWORD(a1) = -1; + v13[2] = v14 + 1; +LABEL_29: + lpuexcpta = 0; + if ( v13[2] >= v13[3] ) + { + lpuexcpta = 0; + if ( (*(int (__fastcall **)(_DWORD *, unsigned int))(*v13 + 36))(v13, v10) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } + } + goto LABEL_30; + } + goto LABEL_97; + } + v35 = v50; + v59 = 0; + v50 = 0; + v48 = v35; + } +LABEL_33: + v16 = v62[0]; + if ( *((_DWORD *)v62[0] - 3) ) + { + std::string::push_back((int *)v62, (std::string *)(char)v46, v37); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v54 + 2), *((_DWORD *)v54 + 3), v62) ) + *a5 = 4; + v16 = v62[0]; + if ( !v46 && !v52 && !*((_DWORD *)v62[0] - 3) ) + goto LABEL_36; + } + else if ( !v52 && !v46 ) + { + goto LABEL_36; + } + if ( v50 ) + { +LABEL_36: + *a6 = 0; + *a5 = 4; + goto LABEL_37; + } + if ( v45 ) + { + *a6 = -1; + *a5 = 4; + } + else + { + v32 = -v59; + if ( !v38 ) + v32 = v59; + *a6 = v32; + } +LABEL_37: + if ( v48 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v16 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_125: + std::string::_Rep::_M_destroy((void *)(v16 - 12), (int)&v61); + return lpuexcptb; + } + v17 = *((_DWORD *)v16 - 1); + *((_DWORD *)v16 - 1) = v17 - 1; + if ( v17 <= 0 ) + goto LABEL_125; + return lpuexcptb; +} +// 473AD9: variable 'v37' is possibly undefined +// 473787: variable 'v10' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00473DF0) -------------------------------------------------------- +unsigned __int64 __stdcall std::num_get>::_M_extract_int( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _WORD *a6) +{ + int v6; // eax + _BYTE *v7; // eax + char v8; // al + int v9; // eax + unsigned int v10; // edx + int v11; // eax + int v12; // eax + _DWORD *v13; // ecx + unsigned int v14; // eax + char v15; // al + const char *v16; // ecx + int v17; // eax + _DWORD *v19; // ecx + unsigned int v20; // eax + bool v21; // al + _BYTE *v22; // eax + char v23; // al + char i; // al + _BYTE *v25; // eax + int v26; // eax + _DWORD *v27; // ecx + unsigned int v28; // eax + char v29; // al + char v30; // al + int v31; // edx + int v32; // eax + char *v33; // eax + char *v34; // eax + bool v35; // al + bool v36; // al + int v37; // eax + unsigned int v38; // [esp+4h] [ebp-94h] + bool v39; // [esp+1Fh] [ebp-79h] + size_t MaxCount; // [esp+20h] [ebp-78h] + int Buf; // [esp+24h] [ebp-74h] + void *Bufa; // [esp+24h] [ebp-74h] + int v43; // [esp+28h] [ebp-70h] + char v44; // [esp+28h] [ebp-70h] + int v45; // [esp+2Ch] [ebp-6Ch] + char v46; // [esp+2Ch] [ebp-6Ch] + int v47; // [esp+30h] [ebp-68h] + char v48; // [esp+34h] [ebp-64h] + char v49; // [esp+35h] [ebp-63h] + char v50; // [esp+35h] [ebp-63h] + bool v51; // [esp+36h] [ebp-62h] + char v52; // [esp+36h] [ebp-62h] + bool v53; // [esp+37h] [ebp-61h] + int v54; // [esp+38h] [ebp-60h] + struct _Unwind_Exception *v55; // [esp+3Ch] [ebp-5Ch] + char lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + unsigned __int64 lpuexcptb; // [esp+40h] [ebp-58h] + char lpuexcptc; // [esp+40h] [ebp-58h] + unsigned __int16 v60; // [esp+48h] [ebp-50h] + char v61; // [esp+48h] [ebp-50h] + int v62; // [esp+8Bh] [ebp-Dh] BYREF + const char *v63[2]; // [esp+8Ch] [ebp-Ch] BYREF + + v55 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v45 = v6; + if ( v6 == 64 ) + { + v54 = 8; +LABEL_4: + v51 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v51 ) + { + lpuexcpt = 0; + v47 = 0; + MaxCount = v54; + Buf = v54; + v53 = 0; + v39 = 0; + goto LABEL_17; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v54 = 10; + goto LABEL_4; + } + v51 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v51 ) + { + MaxCount = 22; + lpuexcpt = 0; + v47 = 0; + v53 = 0; + v39 = 0; + v54 = 16; + Buf = 22; + goto LABEL_17; + } + v54 = 16; +LABEL_5: + LOBYTE(v7) = BYTE4(a1); + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_7; + v7 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v7 < *(_DWORD *)(a1 + 12) ) + { + LOBYTE(v7) = *v7; +LABEL_7: + lpuexcpt = (char)v7; + goto LABEL_8; + } + v7 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v7 != (_BYTE *)-1 ) + goto LABEL_7; + LODWORD(a1) = 0; + lpuexcpt = -1; +LABEL_8: + v8 = *((_BYTE *)v55 + 16); + v39 = *((_BYTE *)v55 + 74) == (unsigned __int8)lpuexcpt; + if ( *((_BYTE *)v55 + 74) != lpuexcpt && *((_BYTE *)v55 + 75) != lpuexcpt + || v8 && *((_BYTE *)v55 + 37) == lpuexcpt + || *((_BYTE *)v55 + 36) == lpuexcpt ) + { + goto LABEL_45; + } + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + v47 = 0; + v51 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v53 = 0; + if ( !v51 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v8 = *((_BYTE *)v55 + 16); +LABEL_45: + v47 = 0; + v53 = 0; + while ( 1 ) + { + if ( v8 && *((_BYTE *)v55 + 37) == lpuexcpt || *((_BYTE *)v55 + 36) == lpuexcpt ) + { +LABEL_94: + v51 = 0; + goto LABEL_14; + } + if ( *((_BYTE *)v55 + 78) != lpuexcpt ) + break; + v21 = v54 == 10 || !v53; + if ( !v21 ) + goto LABEL_51; + v53 = v45 == 0 || v54 == 8; + if ( !v53 ) + { + ++v47; + v53 = v21; + goto LABEL_55; + } + v19 = (_DWORD *)a1; + v47 = 0; + v54 = 8; + v20 = *(_DWORD *)(a1 + 8); + if ( v20 < *(_DWORD *)(a1 + 12) ) + { +LABEL_56: + HIDWORD(a1) = -1; + v19[2] = v20 + 1; + goto LABEL_57; + } +LABEL_64: + (*(void (__fastcall **)(_DWORD *))(*v19 + 40))(v19); + v19 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + v52 = 1; + goto LABEL_58; + } +LABEL_57: + v52 = 0; + if ( v19[2] >= v19[3] && (*(int (__fastcall **)(_DWORD *))(*v19 + 36))(v19) == -1 ) + { + LODWORD(a1) = 0; + v52 = 1; + } +LABEL_58: + v61 = a3 == -1; + v44 = v61 & (a2 != 0); + if ( v44 ) + { + v61 = 0; + if ( a2[2] >= a2[3] && (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2) == -1 ) + { + a2 = 0; + v61 = v44; + } + } + if ( v52 == v61 ) + { + v51 = 1; + goto LABEL_14; + } + LOBYTE(v22) = BYTE4(a1); + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_68; + v22 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v22 < *(_DWORD *)(a1 + 12) ) + { + LOBYTE(v22) = *v22; +LABEL_68: + lpuexcpt = (char)v22; + goto LABEL_69; + } + v22 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v22 != (_BYTE *)-1 ) + goto LABEL_68; + LODWORD(a1) = 0; + lpuexcpt = -1; +LABEL_69: + if ( !v53 ) + goto LABEL_94; + v8 = *((_BYTE *)v55 + 16); + } + if ( !v53 ) + goto LABEL_94; +LABEL_51: + if ( *((_BYTE *)v55 + 76) != lpuexcpt && *((_BYTE *)v55 + 77) != lpuexcpt ) + { + v51 = 0; + v53 = 1; + goto LABEL_14; + } + if ( v45 != 0 && v54 != 16 ) + { + v51 = 0; + v53 = 1; + MaxCount = v54; + Buf = v54; + goto LABEL_17; + } + v47 = 0; + v53 = 0; + v54 = 16; +LABEL_55: + v19 = (_DWORD *)a1; + v20 = *(_DWORD *)(a1 + 8); + if ( v20 < *(_DWORD *)(a1 + 12) ) + goto LABEL_56; + goto LABEL_64; + } +LABEL_14: + v9 = 22; + if ( v54 != 16 ) + v9 = v54; + MaxCount = v9; + Buf = v9; +LABEL_17: + v63[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v55 + 16) ) + std::string::reserve((int *)v63, (std::string *)0x20, v38); + v10 = 0xFFFF % v54; + v43 = 0xFFFF / v54; + v49 = *((_BYTE *)v55 + 100); + if ( v49 ) + { + if ( v51 ) + { + v36 = v51; + v46 = 0; + v51 = 0; + v49 = v36; + v60 = 0; + goto LABEL_33; + } + v46 = 0; + v60 = 0; + Bufa = (char *)v55 + 78; +LABEL_100: + for ( i = *((_BYTE *)v55 + 16); i && *((_BYTE *)v55 + 37) == lpuexcpt; i = *((_BYTE *)v55 + 16) ) + { + if ( !v47 ) + { + v49 = 0; + v51 = i; + goto LABEL_33; + } + std::string::push_back((int *)v63, (std::string *)(char)v47, v38); + v27 = (_DWORD *)a1; + v47 = 0; + v28 = *(_DWORD *)(a1 + 8); + if ( v28 < *(_DWORD *)(a1 + 12) ) + goto LABEL_109; +LABEL_118: + (*(void (__fastcall **)(_DWORD *))(*v27 + 40))(v27); + v27 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_110; + lpuexcptc = v49; +LABEL_111: + v29 = a3 == -1; + v48 = v29 & (a2 != 0); + if ( v48 ) + { + v29 = 0; + if ( a2[2] >= a2[3] ) + { + v31 = (*(int (**)(void))(*a2 + 36))(); + v29 = 0; + if ( v31 == -1 ) + { + a2 = 0; + v29 = v48; + } + } + } + if ( v29 == lpuexcptc ) + goto LABEL_33; + v30 = BYTE4(a1); + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v34 = *(char **)(a1 + 8); + if ( (unsigned int)v34 >= *(_DWORD *)(a1 + 12) ) + { + v37 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v37; + if ( v37 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpt = -1; + } + goto LABEL_100; + } + v30 = *v34; + } + lpuexcpt = v30; + } + if ( lpuexcpt != *((_BYTE *)v55 + 36) ) + { + v25 = memchr(Bufa, lpuexcpt, MaxCount); + if ( v25 ) + { + v26 = v25 - (_BYTE *)Bufa; + if ( v26 > 15 ) + v26 -= 6; + if ( (unsigned __int16)v43 < v60 ) + { + v46 = v49; + } + else + { + v46 |= (unsigned __int16)(v54 * v60) > 0xFFFF - v26; + ++v47; + v60 = v54 * v60 + v26; + } + v27 = (_DWORD *)a1; + v28 = *(_DWORD *)(a1 + 8); + if ( v28 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_118; +LABEL_109: + HIDWORD(a1) = -1; + v27[2] = v28 + 1; +LABEL_110: + lpuexcptc = 0; + if ( v27[2] >= v27[3] ) + { + lpuexcptc = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v27 + 36))(v27) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v49; + } + } + goto LABEL_111; + } + } +LABEL_97: + v49 = 0; + } + else + { + v46 = 0; + if ( !v51 ) + { + v60 = 0; +LABEL_22: + v11 = lpuexcpt; + if ( Buf > 10 ) + { + v10 = (unsigned __int8)lpuexcpt; + if ( (unsigned __int8)(lpuexcpt - 48) <= 9u ) + goto LABEL_25; + while ( (unsigned __int8)(v10 - 97) <= 5u ) + { + v12 = v11 - 87; + if ( (unsigned __int16)v43 < v60 ) + goto LABEL_27; +LABEL_74: + v10 = v60; + LOWORD(v10) = v54 * v60; + v46 |= (unsigned __int16)(v54 * v60) > 0xFFFF - v12; + v13 = (_DWORD *)a1; + v60 = v54 * v60 + v12; + ++v47; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 < *(_DWORD *)(a1 + 12) ) + goto LABEL_28; +LABEL_75: + (*(void (__fastcall **)(_DWORD *, unsigned int))(*v13 + 40))(v13, v10); + v13 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_29; + lpuexcpta = 1; +LABEL_30: + v15 = a3 == -1; + LOBYTE(v10) = v15 & (a2 != 0); + v50 = v10; + if ( (_BYTE)v10 ) + { + v10 = a2[3]; + v15 = 0; + if ( a2[2] >= v10 ) + { + v10 = (*(int (**)(void))(*a2 + 36))(); + v15 = 0; + if ( v10 == -1 ) + { + a2 = 0; + v15 = v50; + } + } + } + if ( lpuexcpta == v15 ) + { + v49 = 1; + goto LABEL_33; + } + v23 = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_81; + v33 = *(char **)(a1 + 8); + if ( (unsigned int)v33 < *(_DWORD *)(a1 + 12) ) + { + v23 = *v33; +LABEL_81: + lpuexcpt = v23; + goto LABEL_22; + } + v11 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v11; + if ( v11 != -1 ) + goto LABEL_22; + LODWORD(a1) = 0; + if ( Buf <= 10 ) + goto LABEL_97; + v10 = -1; + } + v10 -= 65; + if ( (unsigned __int8)v10 <= 5u ) + { + v12 = v11 - 55; + goto LABEL_26; + } + } + else if ( lpuexcpt > 47 && (char)(Buf + 48) > lpuexcpt ) + { +LABEL_25: + v12 = lpuexcpt - 48; +LABEL_26: + if ( (unsigned __int16)v43 >= v60 ) + goto LABEL_74; +LABEL_27: + v13 = (_DWORD *)a1; + v46 = 1; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_75; +LABEL_28: + HIDWORD(a1) = -1; + v13[2] = v14 + 1; +LABEL_29: + lpuexcpta = 0; + if ( v13[2] >= v13[3] ) + { + lpuexcpta = 0; + if ( (*(int (__fastcall **)(_DWORD *, unsigned int))(*v13 + 36))(v13, v10) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } + } + goto LABEL_30; + } + goto LABEL_97; + } + v35 = v51; + v51 = 0; + v49 = v35; + v60 = 0; + } +LABEL_33: + v16 = v63[0]; + if ( *((_DWORD *)v63[0] - 3) ) + { + std::string::push_back((int *)v63, (std::string *)(char)v47, v38); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v55 + 2), *((_DWORD *)v55 + 3), v63) ) + *a5 = 4; + v16 = v63[0]; + if ( !v47 && !v53 && !*((_DWORD *)v63[0] - 3) ) + goto LABEL_36; + } + else if ( !v53 && !v47 ) + { + goto LABEL_36; + } + if ( v51 ) + { +LABEL_36: + *a6 = 0; + *a5 = 4; + goto LABEL_37; + } + if ( v46 ) + { + *a6 = -1; + *a5 = 4; + } + else + { + v32 = -v60; + if ( !v39 ) + LOWORD(v32) = v60; + *a6 = v32; + } +LABEL_37: + if ( v49 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v16 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_125: + std::string::_Rep::_M_destroy((void *)(v16 - 12), (int)&v62); + return lpuexcptb; + } + v17 = *((_DWORD *)v16 - 1); + *((_DWORD *)v16 - 1) = v17 - 1; + if ( v17 <= 0 ) + goto LABEL_125; + return lpuexcptb; +} +// 474661: variable 'v38' is possibly undefined +// 474300: variable 'v10' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00474970) -------------------------------------------------------- +unsigned __int64 __stdcall std::num_get>::_M_extract_int( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + int *a6) +{ + int v6; // eax + char v7; // dl + char v8; // al + int v9; // eax + unsigned __int64 v10; // kr00_8 + int v11; // esi + int v12; // esi + _DWORD *v13; // ecx + unsigned int v14; // eax + char v15; // al + const char *v16; // ecx + int *v17; // eax + int v18; // eax + _DWORD *v20; // ecx + unsigned int v21; // eax + bool v22; // al + _BYTE *v23; // eax + char v24; // al + char v25; // al + int v26; // eax + unsigned int v27; // edx + int *v28; // esi + _DWORD *v29; // eax + int v30; // edx + char v31; // al + _BYTE *v32; // eax + int v33; // esi + _DWORD *v34; // ecx + unsigned int v35; // eax + char v36; // al + char v37; // al + int v38; // edx + char *v39; // eax + char *v40; // eax + bool v41; // al + int v42; // eax + int v43; // eax + unsigned int v44; // [esp+4h] [ebp-B4h] + char v45; // [esp+4h] [ebp-B4h] + char v46; // [esp+1Bh] [ebp-9Dh] + size_t MaxCount; // [esp+1Ch] [ebp-9Ch] + unsigned __int64 v48; // [esp+20h] [ebp-98h] + int Buf; // [esp+28h] [ebp-90h] + void *Bufa; // [esp+28h] [ebp-90h] + char v51; // [esp+30h] [ebp-88h] + int v52; // [esp+34h] [ebp-84h] + char v53; // [esp+34h] [ebp-84h] + int v54; // [esp+38h] [ebp-80h] + int v55; // [esp+40h] [ebp-78h] + bool v56; // [esp+44h] [ebp-74h] + char v57; // [esp+45h] [ebp-73h] + char v58; // [esp+45h] [ebp-73h] + bool v59; // [esp+46h] [ebp-72h] + char v60; // [esp+46h] [ebp-72h] + bool v61; // [esp+47h] [ebp-71h] + unsigned __int64 v62; // [esp+48h] [ebp-70h] + char v63; // [esp+48h] [ebp-70h] + char lpuexcpt; // [esp+50h] [ebp-68h] + char lpuexcpta; // [esp+50h] [ebp-68h] + unsigned __int64 lpuexcptb; // [esp+50h] [ebp-68h] + char lpuexcptc; // [esp+50h] [ebp-68h] + struct _Unwind_Exception *v68; // [esp+58h] [ebp-60h] + int v69; // [esp+9Bh] [ebp-1Dh] BYREF + const char *v70[7]; // [esp+9Ch] [ebp-1Ch] BYREF + + v68 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v52 = v6; + if ( v6 == 64 ) + { + v54 = 8; +LABEL_4: + v59 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v59 ) + { + lpuexcpt = 0; + v55 = 0; + MaxCount = v54; + Buf = v54; + v61 = 0; + v56 = 0; + goto LABEL_14; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v54 = 10; + goto LABEL_4; + } + v59 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v59 ) + { + MaxCount = 22; + lpuexcpt = 0; + v55 = 0; + v61 = 0; + v56 = 0; + v54 = 16; + Buf = 22; + goto LABEL_14; + } + v54 = 16; +LABEL_5: + v7 = std::istreambuf_iterator::_M_get((int)&a1); + lpuexcpt = v7; + v56 = *((_BYTE *)v68 + 74) == (unsigned __int8)v7; + if ( *((_BYTE *)v68 + 74) == v7 ) + { + v8 = *((_BYTE *)v68 + 16); + } + else + { + v8 = *((_BYTE *)v68 + 16); + if ( *((_BYTE *)v68 + 75) != v7 ) + { +LABEL_44: + v55 = 0; + v61 = 0; + while ( 1 ) + { + if ( v8 && *((_BYTE *)v68 + 37) == lpuexcpt || *((_BYTE *)v68 + 36) == lpuexcpt ) + { +LABEL_95: + v59 = 0; + goto LABEL_11; + } + if ( *((_BYTE *)v68 + 78) != lpuexcpt ) + break; + v22 = v54 == 10 || !v61; + if ( !v22 ) + goto LABEL_50; + v61 = v54 == 8 || v52 == 0; + if ( !v61 ) + { + ++v55; + v61 = v22; + goto LABEL_54; + } + v20 = (_DWORD *)a1; + v55 = 0; + v54 = 8; + v21 = *(_DWORD *)(a1 + 8); + if ( v21 < *(_DWORD *)(a1 + 12) ) + { +LABEL_55: + HIDWORD(a1) = -1; + v20[2] = v21 + 1; + goto LABEL_56; + } +LABEL_63: + (*(void (__fastcall **)(_DWORD *))(*v20 + 40))(v20); + v20 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + v60 = 1; + goto LABEL_57; + } +LABEL_56: + v60 = 0; + if ( v20[2] >= v20[3] && (*(int (__fastcall **)(_DWORD *))(*v20 + 36))(v20) == -1 ) + { + LODWORD(a1) = 0; + v60 = 1; + } +LABEL_57: + v63 = a3 == -1; + v51 = v63 & (a2 != 0); + if ( v51 ) + { + v63 = 0; + if ( a2[2] >= a2[3] && (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2) == -1 ) + { + a2 = 0; + v63 = v51; + } + } + if ( v63 == v60 ) + { + v59 = 1; + goto LABEL_11; + } + LOBYTE(v23) = BYTE4(a1); + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_67; + v23 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v23 < *(_DWORD *)(a1 + 12) ) + { + LOBYTE(v23) = *v23; +LABEL_67: + lpuexcpt = (char)v23; + goto LABEL_68; + } + v23 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v23 != (_BYTE *)-1 ) + goto LABEL_67; + LODWORD(a1) = 0; + lpuexcpt = -1; +LABEL_68: + if ( !v61 ) + goto LABEL_95; + v8 = *((_BYTE *)v68 + 16); + } + if ( !v61 ) + goto LABEL_95; +LABEL_50: + if ( *((_BYTE *)v68 + 76) != lpuexcpt && *((_BYTE *)v68 + 77) != lpuexcpt ) + { + v59 = 0; + v61 = 1; + goto LABEL_11; + } + if ( v52 != 0 && v54 != 16 ) + { + v59 = 0; + v61 = 1; + MaxCount = v54; + Buf = v54; + goto LABEL_14; + } + v55 = 0; + v61 = 0; + v54 = 16; +LABEL_54: + v20 = (_DWORD *)a1; + v21 = *(_DWORD *)(a1 + 8); + if ( v21 < *(_DWORD *)(a1 + 12) ) + goto LABEL_55; + goto LABEL_63; + } + } + if ( v8 && *((_BYTE *)v68 + 37) == v7 || *((_BYTE *)v68 + 36) == v7 ) + goto LABEL_44; + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + v55 = 0; + v59 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v61 = 0; + if ( !v59 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v8 = *((_BYTE *)v68 + 16); + goto LABEL_44; + } +LABEL_11: + v9 = 22; + if ( v54 != 16 ) + v9 = v54; + MaxCount = v9; + Buf = v9; +LABEL_14: + v70[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v68 + 16) ) + std::string::reserve((int *)v70, (std::string *)0x20, v44); + v48 = 0x8000000000000000LL; + if ( !v56 ) + v48 = 0x7FFFFFFFFFFFFFFFLL; + v10 = v48 / v54; + v57 = *((_BYTE *)v68 + 100); + if ( !v57 ) + { + v53 = 0; + if ( v59 ) + { + v41 = v59; + v62 = 0LL; + v59 = 0; + v57 = v41; + goto LABEL_32; + } + v62 = 0LL; +LABEL_21: + v11 = lpuexcpt; + if ( Buf <= 10 ) + { + if ( lpuexcpt > 47 && (char)(Buf + 48) > lpuexcpt ) + { +LABEL_24: + v12 = lpuexcpt - 48; + goto LABEL_25; + } +LABEL_98: + v57 = 0; + goto LABEL_32; + } + v24 = lpuexcpt; + if ( (unsigned __int8)(lpuexcpt - 48) <= 9u ) + goto LABEL_24; + while ( 1 ) + { + if ( (unsigned __int8)(v24 - 97) > 5u ) + { + if ( (unsigned __int8)(v24 - 65) > 5u ) + goto LABEL_98; + v12 = v11 - 55; + } + else + { + v12 = v11 - 87; + } +LABEL_25: + if ( v10 >= v62 ) + { + v53 |= v48 - v12 < v54 * v62; + v13 = (_DWORD *)a1; + v62 = v54 * v62 + v12; + ++v55; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 < *(_DWORD *)(a1 + 12) ) + { +LABEL_27: + HIDWORD(a1) = -1; + v13[2] = v14 + 1; + goto LABEL_28; + } + } + else + { + v13 = (_DWORD *)a1; + v53 = 1; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 < *(_DWORD *)(a1 + 12) ) + goto LABEL_27; + } + (*(void (__fastcall **)(_DWORD *))(*v13 + 40))(v13); + v13 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcpta = 1; + goto LABEL_29; + } +LABEL_28: + lpuexcpta = 0; + if ( v13[2] >= v13[3] ) + { + lpuexcpta = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v13 + 36))(v13) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } + } +LABEL_29: + v15 = a3 == -1; + v58 = v15 & (a2 != 0); + if ( v58 ) + { + v15 = 0; + if ( a2[2] >= a2[3] ) + { + v30 = (*(int (**)(void))(*a2 + 36))(); + v15 = 0; + if ( v30 == -1 ) + { + a2 = 0; + v15 = v58; + } + } + } + if ( lpuexcpta == v15 ) + { + v57 = 1; + goto LABEL_32; + } + v25 = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_80; + v39 = *(char **)(a1 + 8); + if ( (unsigned int)v39 < *(_DWORD *)(a1 + 12) ) + { + v25 = *v39; +LABEL_80: + lpuexcpt = v25; + goto LABEL_21; + } + v42 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v42; + v11 = v42; + if ( v42 != -1 ) + goto LABEL_21; + LODWORD(a1) = 0; + if ( Buf <= 10 ) + goto LABEL_98; + v24 = -1; + } + } + if ( v59 ) + { + v62 = 0LL; + v57 = v59; + v53 = 0; + v59 = 0; + } + else + { + v53 = 0; + v62 = 0LL; + Bufa = (char *)v68 + 78; +LABEL_101: + v31 = *((_BYTE *)v68 + 16); + if ( !v31 || *((_BYTE *)v68 + 37) != lpuexcpt ) + { +LABEL_103: + if ( lpuexcpt == *((_BYTE *)v68 + 36) ) + goto LABEL_98; + v32 = memchr(Bufa, lpuexcpt, MaxCount); + if ( !v32 ) + goto LABEL_98; + v33 = v32 - (_BYTE *)Bufa; + if ( v32 - (_BYTE *)Bufa > 15 ) + v33 -= 6; + if ( v10 < v62 ) + { + v53 = v57; + } + else + { + v53 |= v48 - v33 < v54 * v62; + ++v55; + v62 = v54 * v62 + v33; + } + v34 = (_DWORD *)a1; + v35 = *(_DWORD *)(a1 + 8); + if ( v35 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_120; +LABEL_110: + HIDWORD(a1) = -1; + v34[2] = v35 + 1; +LABEL_111: + lpuexcptc = 0; + if ( v34[2] >= v34[3] ) + { + lpuexcptc = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v34 + 36))(v34) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v57; + } + } + goto LABEL_112; + } + while ( v55 ) + { + std::string::push_back((int *)v70, (std::string *)(char)v55, v45); + v34 = (_DWORD *)a1; + v55 = 0; + v35 = *(_DWORD *)(a1 + 8); + if ( v35 < *(_DWORD *)(a1 + 12) ) + goto LABEL_110; +LABEL_120: + (*(void (__fastcall **)(_DWORD *))(*v34 + 40))(v34); + v34 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_111; + lpuexcptc = v57; +LABEL_112: + v36 = a3 == -1; + v46 = v36 & (a2 != 0); + if ( v46 ) + { + v36 = 0; + if ( a2[2] >= a2[3] ) + { + v38 = (*(int (**)(void))(*a2 + 36))(); + v36 = 0; + if ( v38 == -1 ) + { + a2 = 0; + v36 = v46; + } + } + } + if ( v36 == lpuexcptc ) + goto LABEL_32; + v37 = BYTE4(a1); + if ( (_DWORD)a1 && HIDWORD(a1) == -1 ) + { + v40 = *(char **)(a1 + 8); + if ( (unsigned int)v40 >= *(_DWORD *)(a1 + 12) ) + { + v43 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v43; + if ( v43 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpt = -1; + } + goto LABEL_101; + } + v37 = *v40; + } + lpuexcpt = v37; + v31 = *((_BYTE *)v68 + 16); + if ( !v31 || *((_BYTE *)v68 + 37) != lpuexcpt ) + goto LABEL_103; + } + v57 = 0; + v59 = v31; + } +LABEL_32: + v16 = v70[0]; + if ( *((_DWORD *)v70[0] - 3) ) + { + std::string::push_back((int *)v70, (std::string *)(char)v55, v45); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v68 + 2), *((_DWORD *)v68 + 3), v70) ) + *a5 = 4; + v16 = v70[0]; + if ( !v55 && !v61 && !*((_DWORD *)v70[0] - 3) ) + goto LABEL_35; + } + else if ( !v61 && !v55 ) + { + goto LABEL_35; + } + if ( v59 ) + { +LABEL_35: + v17 = a6; + *a6 = 0; + v17[1] = 0; + *a5 = 4; + goto LABEL_36; + } + if ( v53 ) + { + v26 = 0; + v27 = 0x80000000; + if ( !v56 ) + { + v26 = -1; + v27 = 0x7FFFFFFF; + } + v28 = a6; + *a6 = v26; + v29 = a5; + v28[1] = v27; + *v29 = 4; + } + else + { + if ( v56 ) + v62 = -(__int64)v62; + *(_QWORD *)a6 = v62; + } +LABEL_36: + if ( v57 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v16 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_127: + std::string::_Rep::_M_destroy((void *)(v16 - 12), (int)&v69); + return lpuexcptb; + } + v18 = *((_DWORD *)v16 - 1); + *((_DWORD *)v16 - 1) = v18 - 1; + if ( v18 <= 0 ) + goto LABEL_127; + return lpuexcptb; +} +// 475309: variable 'v44' is possibly undefined +// 474FC9: variable 'v45' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00475620) -------------------------------------------------------- +unsigned __int64 __stdcall std::num_get>::_M_extract_int( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6) +{ + int v6; // eax + char v7; // dl + char v8; // al + int v9; // eax + unsigned __int64 v10; // kr08_8 + int v11; // eax + int v12; // esi + _DWORD *v13; // ecx + unsigned int v14; // eax + char v15; // al + const char *v16; // ecx + _DWORD *v17; // eax + int v18; // eax + _DWORD *v20; // ecx + unsigned int v21; // eax + bool v22; // al + _BYTE *v23; // eax + char v24; // dl + char v25; // al + int v26; // edx + char v27; // al + _BYTE *v28; // eax + int v29; // esi + _DWORD *v30; // ecx + unsigned int v31; // eax + char v32; // al + char v33; // al + int v34; // edx + _DWORD *v35; // eax + char *v36; // eax + char *v37; // eax + bool v38; // al + int v39; // eax + unsigned int v40; // [esp+4h] [ebp-A4h] + char v41; // [esp+4h] [ebp-A4h] + bool v42; // [esp+13h] [ebp-95h] + size_t MaxCount; // [esp+14h] [ebp-94h] + int Buf; // [esp+18h] [ebp-90h] + void *Bufa; // [esp+18h] [ebp-90h] + char v46; // [esp+20h] [ebp-88h] + int v47; // [esp+24h] [ebp-84h] + char v48; // [esp+24h] [ebp-84h] + int v49; // [esp+28h] [ebp-80h] + int v50; // [esp+30h] [ebp-78h] + char v51; // [esp+34h] [ebp-74h] + char v52; // [esp+35h] [ebp-73h] + char v53; // [esp+35h] [ebp-73h] + bool v54; // [esp+36h] [ebp-72h] + char v55; // [esp+36h] [ebp-72h] + bool v56; // [esp+37h] [ebp-71h] + unsigned __int64 v57; // [esp+38h] [ebp-70h] + char v58; // [esp+38h] [ebp-70h] + char lpuexcpt; // [esp+40h] [ebp-68h] + char lpuexcpta; // [esp+40h] [ebp-68h] + unsigned __int64 lpuexcptb; // [esp+40h] [ebp-68h] + char lpuexcptc; // [esp+40h] [ebp-68h] + struct _Unwind_Exception *v63; // [esp+48h] [ebp-60h] + int v64; // [esp+8Bh] [ebp-1Dh] BYREF + const char *v65[7]; // [esp+8Ch] [ebp-1Ch] BYREF + + v63 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v47 = v6; + if ( v6 == 64 ) + { + v49 = 8; +LABEL_4: + v54 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v54 ) + { + lpuexcpt = 0; + v50 = 0; + MaxCount = v49; + Buf = v49; + v56 = 0; + v42 = 0; + goto LABEL_14; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v49 = 10; + goto LABEL_4; + } + v54 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v54 ) + { + MaxCount = 22; + lpuexcpt = 0; + v50 = 0; + v56 = 0; + v42 = 0; + v49 = 16; + Buf = 22; + goto LABEL_14; + } + v49 = 16; +LABEL_5: + v7 = std::istreambuf_iterator::_M_get((int)&a1); + lpuexcpt = v7; + v42 = *((_BYTE *)v63 + 74) == (unsigned __int8)v7; + if ( *((_BYTE *)v63 + 74) == v7 ) + { + v8 = *((_BYTE *)v63 + 16); + } + else + { + v8 = *((_BYTE *)v63 + 16); + if ( *((_BYTE *)v63 + 75) != v7 ) + { +LABEL_42: + v50 = 0; + v56 = 0; + while ( 1 ) + { + if ( v8 && *((_BYTE *)v63 + 37) == lpuexcpt || *((_BYTE *)v63 + 36) == lpuexcpt ) + { +LABEL_94: + v54 = 0; + goto LABEL_11; + } + if ( *((_BYTE *)v63 + 78) != lpuexcpt ) + break; + v22 = v49 == 10 || !v56; + if ( !v22 ) + goto LABEL_48; + v56 = v49 == 8 || v47 == 0; + if ( !v56 ) + { + ++v50; + v56 = v22; + goto LABEL_52; + } + v20 = (_DWORD *)a1; + v50 = 0; + v49 = 8; + v21 = *(_DWORD *)(a1 + 8); + if ( v21 < *(_DWORD *)(a1 + 12) ) + { +LABEL_53: + HIDWORD(a1) = -1; + v20[2] = v21 + 1; + goto LABEL_54; + } +LABEL_61: + (*(void (__fastcall **)(_DWORD *))(*v20 + 40))(v20); + v20 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + v55 = 1; + goto LABEL_55; + } +LABEL_54: + v55 = 0; + if ( v20[2] >= v20[3] && (*(int (__fastcall **)(_DWORD *))(*v20 + 36))(v20) == -1 ) + { + LODWORD(a1) = 0; + v55 = 1; + } +LABEL_55: + v58 = a3 == -1; + v46 = v58 & (a2 != 0); + if ( v46 ) + { + v58 = 0; + if ( a2[2] >= a2[3] && (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2) == -1 ) + { + a2 = 0; + v58 = v46; + } + } + if ( v58 == v55 ) + { + v54 = 1; + goto LABEL_11; + } + LOBYTE(v23) = BYTE4(a1); + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_65; + v23 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v23 < *(_DWORD *)(a1 + 12) ) + { + LOBYTE(v23) = *v23; +LABEL_65: + lpuexcpt = (char)v23; + goto LABEL_66; + } + v23 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v23 != (_BYTE *)-1 ) + goto LABEL_65; + LODWORD(a1) = 0; + lpuexcpt = -1; +LABEL_66: + if ( !v56 ) + goto LABEL_94; + v8 = *((_BYTE *)v63 + 16); + } + if ( !v56 ) + goto LABEL_94; +LABEL_48: + if ( *((_BYTE *)v63 + 76) != lpuexcpt && *((_BYTE *)v63 + 77) != lpuexcpt ) + { + v54 = 0; + v56 = 1; + goto LABEL_11; + } + if ( v47 != 0 && v49 != 16 ) + { + v54 = 0; + v56 = 1; + MaxCount = v49; + Buf = v49; + goto LABEL_14; + } + v50 = 0; + v56 = 0; + v49 = 16; +LABEL_52: + v20 = (_DWORD *)a1; + v21 = *(_DWORD *)(a1 + 8); + if ( v21 < *(_DWORD *)(a1 + 12) ) + goto LABEL_53; + goto LABEL_61; + } + } + if ( v8 && *((_BYTE *)v63 + 37) == v7 || *((_BYTE *)v63 + 36) == v7 ) + goto LABEL_42; + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + v50 = 0; + v54 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v56 = 0; + if ( !v54 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v8 = *((_BYTE *)v63 + 16); + goto LABEL_42; + } +LABEL_11: + v9 = 22; + if ( v49 != 16 ) + v9 = v49; + MaxCount = v9; + Buf = v9; +LABEL_14: + v65[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v63 + 16) ) + std::string::reserve((int *)v65, (std::string *)0x20, v40); + v10 = 0xFFFFFFFFFFFFFFFFLL / v49; + v52 = *((_BYTE *)v63 + 100); + if ( !v52 ) + { + v48 = 0; + if ( v54 ) + { + v38 = v54; + v57 = 0LL; + v54 = 0; + v52 = v38; + goto LABEL_30; + } + v57 = 0LL; +LABEL_19: + v11 = lpuexcpt; + if ( Buf <= 10 ) + { + if ( lpuexcpt > 47 && (char)(Buf + 48) > lpuexcpt ) + { +LABEL_22: + v12 = lpuexcpt - 48; + goto LABEL_23; + } +LABEL_95: + v52 = 0; + goto LABEL_30; + } + v24 = lpuexcpt; + if ( (unsigned __int8)(lpuexcpt - 48) <= 9u ) + goto LABEL_22; + while ( 1 ) + { + v12 = v11 - 87; + if ( (unsigned __int8)(v24 - 97) > 5u ) + { + if ( (unsigned __int8)(v24 - 65) > 5u ) + goto LABEL_95; + v12 = v11 - 55; + } +LABEL_23: + if ( v10 >= v57 ) + { + v48 |= __PAIR64__(~(v12 >> 31), ~v12) < v49 * v57; + v13 = (_DWORD *)a1; + ++v50; + v57 = v49 * v57 + v12; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 < *(_DWORD *)(a1 + 12) ) + { +LABEL_25: + HIDWORD(a1) = -1; + v13[2] = v14 + 1; + goto LABEL_26; + } + } + else + { + v13 = (_DWORD *)a1; + v48 = 1; + v14 = *(_DWORD *)(a1 + 8); + if ( v14 < *(_DWORD *)(a1 + 12) ) + goto LABEL_25; + } + (*(void (__fastcall **)(_DWORD *))(*v13 + 40))(v13); + v13 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcpta = 1; + goto LABEL_27; + } +LABEL_26: + lpuexcpta = 0; + if ( v13[2] >= v13[3] ) + { + lpuexcpta = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v13 + 36))(v13) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } + } +LABEL_27: + v15 = a3 == -1; + v53 = v15 & (a2 != 0); + if ( v53 ) + { + v15 = 0; + if ( a2[2] >= a2[3] ) + { + v26 = (*(int (**)(void))(*a2 + 36))(); + v15 = 0; + if ( v26 == -1 ) + { + a2 = 0; + v15 = v53; + } + } + } + if ( v15 == lpuexcpta ) + { + v52 = 1; + goto LABEL_30; + } + v25 = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_79; + v36 = *(char **)(a1 + 8); + if ( (unsigned int)v36 < *(_DWORD *)(a1 + 12) ) + { + v25 = *v36; +LABEL_79: + lpuexcpt = v25; + goto LABEL_19; + } + v11 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v11; + if ( v11 != -1 ) + goto LABEL_19; + LODWORD(a1) = 0; + if ( Buf <= 10 ) + goto LABEL_95; + v24 = -1; + } + } + if ( v54 ) + { + v57 = 0LL; + v52 = v54; + v48 = 0; + v54 = 0; + } + else + { + v48 = 0; + v57 = 0LL; + Bufa = (char *)v63 + 78; +LABEL_98: + v27 = *((_BYTE *)v63 + 16); + if ( !v27 || *((_BYTE *)v63 + 37) != lpuexcpt ) + { +LABEL_100: + if ( lpuexcpt == *((_BYTE *)v63 + 36) ) + goto LABEL_95; + v28 = memchr(Bufa, lpuexcpt, MaxCount); + if ( !v28 ) + goto LABEL_95; + v29 = v28 - (_BYTE *)Bufa; + if ( v28 - (_BYTE *)Bufa > 15 ) + v29 -= 6; + if ( v10 < v57 ) + { + v48 = v52; + } + else + { + v48 |= __PAIR64__(~(v29 >> 31), ~v29) < v49 * v57; + v57 = v49 * v57 + v29; + ++v50; + } + v30 = (_DWORD *)a1; + v31 = *(_DWORD *)(a1 + 8); + if ( v31 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_117; +LABEL_107: + HIDWORD(a1) = -1; + v30[2] = v31 + 1; +LABEL_108: + lpuexcptc = 0; + if ( v30[2] >= v30[3] ) + { + lpuexcptc = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v30 + 36))(v30) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v52; + } + } + goto LABEL_109; + } + while ( v50 ) + { + std::string::push_back((int *)v65, (std::string *)(char)v50, v41); + v30 = (_DWORD *)a1; + v50 = 0; + v31 = *(_DWORD *)(a1 + 8); + if ( v31 < *(_DWORD *)(a1 + 12) ) + goto LABEL_107; +LABEL_117: + (*(void (__fastcall **)(_DWORD *))(*v30 + 40))(v30); + v30 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_108; + lpuexcptc = v52; +LABEL_109: + v32 = a3 == -1; + v51 = v32 & (a2 != 0); + if ( v51 ) + { + v32 = 0; + if ( a2[2] >= a2[3] ) + { + v34 = (*(int (**)(void))(*a2 + 36))(); + v32 = 0; + if ( v34 == -1 ) + { + a2 = 0; + v32 = v51; + } + } + } + if ( lpuexcptc == v32 ) + goto LABEL_30; + v33 = BYTE4(a1); + if ( (_DWORD)a1 && HIDWORD(a1) == -1 ) + { + v37 = *(char **)(a1 + 8); + if ( (unsigned int)v37 >= *(_DWORD *)(a1 + 12) ) + { + v39 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v39; + if ( v39 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpt = -1; + } + goto LABEL_98; + } + v33 = *v37; + } + lpuexcpt = v33; + v27 = *((_BYTE *)v63 + 16); + if ( !v27 || *((_BYTE *)v63 + 37) != lpuexcpt ) + goto LABEL_100; + } + v52 = 0; + v54 = v27; + } +LABEL_30: + v16 = v65[0]; + if ( *((_DWORD *)v65[0] - 3) ) + { + std::string::push_back((int *)v65, (std::string *)(char)v50, v41); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v63 + 2), *((_DWORD *)v63 + 3), v65) ) + *a5 = 4; + v16 = v65[0]; + if ( !v50 && !v56 && !*((_DWORD *)v65[0] - 3) ) + goto LABEL_33; + } + else if ( !v56 && !v50 ) + { + goto LABEL_33; + } + if ( v54 ) + { +LABEL_33: + v17 = a6; + *a6 = 0; + v17[1] = 0; + *a5 = 4; + goto LABEL_34; + } + if ( v48 ) + { + v35 = a6; + *a6 = -1; + v35[1] = -1; + *a5 = 4; + } + else + { + if ( v42 ) + v57 = -(__int64)v57; + *(_QWORD *)a6 = v57; + } +LABEL_34: + if ( v52 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v16 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_124: + std::string::_Rep::_M_destroy((void *)(v16 - 12), (int)&v64); + return lpuexcptb; + } + v18 = *((_DWORD *)v16 - 1); + *((_DWORD *)v16 - 1) = v18 - 1; + if ( v18 <= 0 ) + goto LABEL_124; + return lpuexcptb; +} +// 475F79: variable 'v40' is possibly undefined +// 475C61: variable 'v41' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00476290) -------------------------------------------------------- +unsigned __int64 __stdcall std::num_get>::_M_extract_float( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + int *a6) +{ + char v6; // dl + char v7; // cl + int v8; // eax + _DWORD *v9; // ecx + unsigned int v10; // eax + char v11; // al + char v12; // al + char v13; // al + int v14; // eax + char v15; // al + void *v16; // eax + int v17; // eax + _DWORD *v18; // ecx + unsigned int v19; // eax + char v20; // al + int v21; // eax + bool v23; // zf + int v24; // eax + int v25; // eax + char v26; // al + int v27; // eax + _DWORD *v28; // ecx + unsigned int v29; // eax + char v30; // al + char v31; // al + char v32; // dl + int v33; // edx + char v34; // cl + const char *v35; // eax + int v36; // ebx + int v37; // edx + char *v38; // eax + char *v39; // eax + int v40; // edx + char *v41; // eax + char v42; // cl + char v43; // al + char i; // dl + _DWORD *v45; // ecx + unsigned int v46; // eax + int v47; // eax + _BYTE *v48; // eax + bool v49; // al + int v50; // eax + int v51; // eax + int v52; // eax + unsigned int v53; // [esp+4h] [ebp-84h] + unsigned int v54; // [esp+4h] [ebp-84h] + unsigned int v55; // [esp+Ch] [ebp-7Ch] + int v56; // [esp+14h] [ebp-74h] + char v57; // [esp+14h] [ebp-74h] + void *Buf; // [esp+18h] [ebp-70h] + bool v59; // [esp+1Ch] [ebp-6Ch] + char v60; // [esp+1Ch] [ebp-6Ch] + int v61; // [esp+1Ch] [ebp-6Ch] + char v62; // [esp+20h] [ebp-68h] + int v63; // [esp+20h] [ebp-68h] + char v64; // [esp+20h] [ebp-68h] + int v65; // [esp+20h] [ebp-68h] + char v66; // [esp+20h] [ebp-68h] + int v67; // [esp+24h] [ebp-64h] + char v68; // [esp+28h] [ebp-60h] + int v69; // [esp+28h] [ebp-60h] + char v70; // [esp+28h] [ebp-60h] + char v71; // [esp+28h] [ebp-60h] + int v72; // [esp+28h] [ebp-60h] + char v73; // [esp+2Ch] [ebp-5Ch] + char v74; // [esp+2Ch] [ebp-5Ch] + char v75; // [esp+2Ch] [ebp-5Ch] + char v76; // [esp+2Ch] [ebp-5Ch] + std::string *v77; // [esp+2Ch] [ebp-5Ch] + struct _Unwind_Exception *v78; // [esp+30h] [ebp-58h] + unsigned __int64 v79; // [esp+30h] [ebp-58h] + char lpuexcpt; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcpta; // [esp+38h] [ebp-50h] + char lpuexcptb; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcptc; // [esp+38h] [ebp-50h] + char lpuexcptd; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcpte; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcptf; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcptg; // [esp+38h] [ebp-50h] + char lpuexcpth; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcpti; // [esp+38h] [ebp-50h] + int v90; // [esp+7Bh] [ebp-Dh] BYREF + const char *v91[2]; // [esp+7Ch] [ebp-Ch] BYREF + + v78 = std::__use_cache>::operator()((int *)(a4 + 108)); + v59 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v59 ) + { + lpuexcpt = 0; + v67 = 0; + v73 = 0; + goto LABEL_3; + } + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v42 = *((_BYTE *)v78 + 75); + if ( v42 == lpuexcpt ) + { + v43 = *((_BYTE *)v78 + 16); + } + else + { + v43 = *((_BYTE *)v78 + 16); + if ( *((_BYTE *)v78 + 74) != lpuexcpt ) + { +LABEL_113: + v67 = 0; + for ( i = 0; ; i = 1 ) + { + if ( v43 && *((_BYTE *)v78 + 37) == lpuexcpt + || *((_BYTE *)v78 + 36) == lpuexcpt + || *((_BYTE *)v78 + 78) != lpuexcpt ) + { + v73 = i; + goto LABEL_3; + } + if ( i ) + { + v45 = (_DWORD *)a1; + ++v67; + v46 = *(_DWORD *)(a1 + 8); + if ( v46 < *(_DWORD *)(a1 + 12) ) + goto LABEL_120; + } + else + { + v72 = *(_DWORD *)(*a6 - 12); + v77 = (std::string *)(v72 + 1); + if ( (unsigned int)(v72 + 1) > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, v77, v53); + ++v67; + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = 48; + v47 = *a6; + *(_DWORD *)(v47 - 12) = v77; + *(_DWORD *)(v47 - 4) = 0; + *(_BYTE *)(v47 + v72 + 1) = 0; + v45 = (_DWORD *)a1; + v46 = *(_DWORD *)(a1 + 8); + if ( v46 < *(_DWORD *)(a1 + 12) ) + { +LABEL_120: + HIDWORD(a1) = -1; + v45[2] = v46 + 1; + goto LABEL_121; + } + } + (*(void (__fastcall **)(_DWORD *))(*v45 + 40))(v45); + v45 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + v71 = 1; + goto LABEL_122; + } +LABEL_121: + v71 = 0; + if ( v45[2] >= v45[3] && (*(int (__fastcall **)(_DWORD *))(*v45 + 36))(v45) == -1 ) + { + LODWORD(a1) = 0; + v71 = 1; + } +LABEL_122: + v76 = a3 == -1; + v66 = v76 & (a2 != 0); + if ( v66 ) + { + v76 = 0; + if ( a2[2] >= a2[3] && (*(int (**)(void))(*a2 + 36))() == -1 ) + { + a2 = 0; + v76 = v66; + } + } + if ( v71 == v76 ) + { + v73 = 1; + v59 = 1; + goto LABEL_3; + } + LOBYTE(v48) = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_132; + v48 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v48 < *(_DWORD *)(a1 + 12) ) + { + LOBYTE(v48) = *v48; +LABEL_132: + lpuexcpt = (char)v48; + goto LABEL_133; + } + v48 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v48 != (_BYTE *)-1 ) + goto LABEL_132; + LODWORD(a1) = 0; + lpuexcpt = -1; +LABEL_133: + v43 = *((_BYTE *)v78 + 16); + } + } + } + if ( v43 && *((_BYTE *)v78 + 37) == lpuexcpt || *((_BYTE *)v78 + 36) == lpuexcpt ) + goto LABEL_113; + std::string::push_back(a6, (std::string *)(2 * (v42 != lpuexcpt) + 43), v53); + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + v49 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( !v49 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v43 = *((_BYTE *)v78 + 16); + goto LABEL_113; + } + v73 = 0; + v59 = v49; + v67 = 0; +LABEL_3: + v91[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v78 + 16) ) + std::string::reserve((int *)v91, (std::string *)0x20, v54); + v68 = *((_BYTE *)v78 + 100); + if ( !v68 ) + { + if ( !v59 ) + { + v62 = 0; + v60 = 0; +LABEL_8: + v6 = lpuexcpt; + if ( (unsigned __int8)(lpuexcpt - 48) <= 9u ) + { +LABEL_9: + v74 = v6; + v69 = *(_DWORD *)(*a6 - 12); + lpuexcpta = (struct _Unwind_Exception *)(v69 + 1); + if ( (unsigned int)(v69 + 1) > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, lpuexcpta, v54); + v7 = v74; + v73 = 1; + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = v7; + v8 = *a6; + *(_DWORD *)(v8 - 4) = 0; + *(_DWORD *)(v8 - 12) = lpuexcpta; + *(_BYTE *)(v8 + v69 + 1) = 0; + goto LABEL_13; + } + while ( 1 ) + { + if ( *((_BYTE *)v78 + 36) == lpuexcpt && !((unsigned __int8)v60 | (unsigned __int8)v62) ) + { + std::string::push_back(a6, (std::string *)0x2E, v54); + v62 = 0; + v60 = 1; +LABEL_13: + v9 = (_DWORD *)a1; + v10 = *(_DWORD *)(a1 + 8); + if ( v10 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_29; +LABEL_14: + HIDWORD(a1) = -1; + v9[2] = v10 + 1; +LABEL_15: + lpuexcptb = 0; + if ( v9[2] >= v9[3] ) + { + lpuexcptb = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v9 + 36))(v9) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptb = 1; + } + } + goto LABEL_16; + } + if ( *((_BYTE *)v78 + 92) != lpuexcpt && *((_BYTE *)v78 + 98) != lpuexcpt ) + goto LABEL_46; + v73 &= v62 ^ 1; + if ( !v73 ) + goto LABEL_46; + std::string::push_back(a6, (std::string *)0x65, v54); + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) ) + goto LABEL_164; + v13 = std::istreambuf_iterator::_M_get((int)&a1); + lpuexcpt = v13; + if ( *((_BYTE *)v78 + 75) == v13 ) + { + v14 = 43; + } + else + { + if ( *((_BYTE *)v78 + 74) != v13 ) + { + v62 = v73; + goto LABEL_8; + } + v14 = 45; + } + std::string::push_back(a6, (std::string *)v14, v54); + v9 = (_DWORD *)a1; + v62 = v73; + v10 = *(_DWORD *)(a1 + 8); + if ( v10 < *(_DWORD *)(a1 + 12) ) + goto LABEL_14; +LABEL_29: + (*(void (__fastcall **)(_DWORD *))(*v9 + 40))(v9); + v9 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_15; + lpuexcptb = 1; +LABEL_16: + v11 = a3 == -1; + v70 = v11 & (a2 != 0); + if ( v70 ) + { + v11 = 0; + if ( a2[2] >= a2[3] ) + { + v33 = (*(int (**)(void))(*a2 + 36))(); + v11 = 0; + if ( v33 == -1 ) + { + a2 = 0; + v11 = v70; + } + } + } + if ( v11 == lpuexcptb ) + goto LABEL_46; + v12 = BYTE4(a1); + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v38 = *(char **)(a1 + 8); + if ( (unsigned int)v38 >= *(_DWORD *)(a1 + 12) ) + { + v50 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v50; + if ( v50 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpt = -1; + } + goto LABEL_8; + } + v12 = *v38; + } + lpuexcpt = v12; + v6 = v12; + if ( (unsigned __int8)(v12 - 48) <= 9u ) + goto LABEL_9; + } + } +LABEL_166: + lpuexcpte = (struct _Unwind_Exception *)v91[0]; + if ( *((_DWORD *)v91[0] - 3) ) + goto LABEL_50; + goto LABEL_53; + } + if ( v59 ) + goto LABEL_166; + v62 = 0; + v60 = 0; + v15 = *((_BYTE *)v78 + 16); + Buf = (char *)v78 + 78; + while ( 1 ) + { + while ( 1 ) + { + if ( v15 && *((_BYTE *)v78 + 37) == lpuexcpt ) + { + v60 |= v62; + if ( v60 ) + { + lpuexcpte = (struct _Unwind_Exception *)v91[0]; + v24 = *((_DWORD *)v91[0] - 3); +LABEL_160: + if ( v24 ) + goto LABEL_51; + goto LABEL_53; + } + if ( !v67 ) + { + std::string::_M_mutate((char **)a6, 0, *(_DWORD *)(*a6 - 12), 0, v55); + lpuexcpte = (struct _Unwind_Exception *)v91[0]; + if ( *((_DWORD *)v91[0] - 3) ) + goto LABEL_50; + goto LABEL_53; + } + v65 = *((_DWORD *)v91[0] - 3); + lpuexcpti = (struct _Unwind_Exception *)(v65 + 1); + if ( (unsigned int)(v65 + 1) > *((_DWORD *)v91[0] - 2) || *((int *)v91[0] - 1) > 0 ) + std::string::reserve((int *)v91, lpuexcpti, v54); + v34 = v67; + v67 = 0; + v91[0][*((_DWORD *)v91[0] - 3)] = v34; + v35 = v91[0]; + *((_DWORD *)v91[0] - 3) = lpuexcpti; + v36 = v65; + *((_DWORD *)v35 - 1) = 0; + v62 = 0; + v35[v36 + 1] = 0; +LABEL_41: + v18 = (_DWORD *)a1; + v19 = *(_DWORD *)(a1 + 8); + if ( v19 < *(_DWORD *)(a1 + 12) ) + goto LABEL_42; + goto LABEL_62; + } + if ( *((_BYTE *)v78 + 36) == lpuexcpt ) + break; + v16 = memchr(Buf, lpuexcpt, 0xAu); + if ( v16 ) + { + v75 = (_BYTE)v16 - (_BYTE)Buf + 48; + v56 = *(_DWORD *)(*a6 - 12); + lpuexcptc = (struct _Unwind_Exception *)(v56 + 1); + if ( (unsigned int)(v56 + 1) > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, lpuexcptc, v54); + ++v67; + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = v75; + v17 = *a6; + *(_DWORD *)(v17 - 12) = lpuexcptc; + *(_DWORD *)(v17 - 4) = 0; + *(_BYTE *)(v17 + v56 + 1) = 0; + v73 = v68; + goto LABEL_41; + } + if ( *((_BYTE *)v78 + 92) != lpuexcpt && *((_BYTE *)v78 + 98) != lpuexcpt ) + goto LABEL_46; + v23 = (((unsigned __int8)v62 ^ 1) & (unsigned __int8)v73) == 0; + v73 &= v62 ^ 1; + lpuexcpte = (struct _Unwind_Exception *)v91[0]; + v21 = *((_DWORD *)v91[0] - 3); + if ( v23 ) + goto LABEL_47; + if ( v21 && !v60 ) + std::string::push_back((int *)v91, (std::string *)(char)v67, v54); + v63 = *(_DWORD *)(*a6 - 12); + lpuexcptg = (struct _Unwind_Exception *)(v63 + 1); + if ( (unsigned int)(v63 + 1) > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, lpuexcptg, v54); + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = 101; + v27 = *a6; + *(_DWORD *)(v27 - 12) = lpuexcptg; + *(_DWORD *)(v27 - 4) = 0; + *(_BYTE *)(v27 + v63 + 1) = 0; + v28 = (_DWORD *)a1; + v29 = *(_DWORD *)(a1 + 8); + if ( v29 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v28 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcpth = v73; + goto LABEL_79; + } + } + else + { + HIDWORD(a1) = -1; + *(_DWORD *)(a1 + 8) = v29 + 1; + } + lpuexcpth = 0; + if ( v28[2] >= v28[3] ) + { + lpuexcpth = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v28 + 36))(v28) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpth = v73; + } + } +LABEL_79: + v30 = a3 == -1; + v64 = v30 & (a2 != 0); + if ( v64 ) + { + v30 = 0; + if ( a2[2] >= a2[3] ) + { + v40 = (*(int (**)(void))(*a2 + 36))(); + v30 = 0; + if ( v40 == -1 ) + { + a2 = 0; + v30 = v64; + } + } + } + if ( v30 == lpuexcpth ) + { +LABEL_164: + lpuexcpte = (struct _Unwind_Exception *)v91[0]; + if ( *((_DWORD *)v91[0] - 3) ) + goto LABEL_51; + goto LABEL_53; + } + v31 = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_82; + v41 = *(char **)(a1 + 8); + if ( (unsigned int)v41 < *(_DWORD *)(a1 + 12) ) + { + v31 = *v41; +LABEL_82: + lpuexcpt = v31; + goto LABEL_83; + } + v52 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v52; + if ( v52 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpt = -1; + } +LABEL_83: + v32 = *((_BYTE *)v78 + 75); + v15 = *((_BYTE *)v78 + 16); + if ( v32 != lpuexcpt && *((_BYTE *)v78 + 74) != lpuexcpt ) + goto LABEL_85; + if ( v15 && *((_BYTE *)v78 + 37) == lpuexcpt ) + { + v62 = *((_BYTE *)v78 + 16); + v73 = v62; + } + else + { + if ( *((_BYTE *)v78 + 36) != lpuexcpt ) + { + std::string::push_back(a6, (std::string *)(2 * (v32 != lpuexcpt) + 43), v54); + v62 = v73; + goto LABEL_41; + } +LABEL_85: + v62 = v73; + } + } + v23 = ((unsigned __int8)v60 | (unsigned __int8)v62) == 0; + v62 |= v60; + lpuexcpte = (struct _Unwind_Exception *)v91[0]; + v24 = *((_DWORD *)v91[0] - 3); + if ( !v23 ) + goto LABEL_160; + if ( v24 ) + std::string::push_back((int *)v91, (std::string *)(char)v67, v54); + v61 = *(_DWORD *)(*a6 - 12); + lpuexcptf = (struct _Unwind_Exception *)(v61 + 1); + if ( (unsigned int)(v61 + 1) > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, lpuexcptf, v54); + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = 46; + v25 = *a6; + *(_DWORD *)(v25 - 12) = lpuexcptf; + *(_DWORD *)(v25 - 4) = 0; + *(_BYTE *)(v25 + v61 + 1) = 0; + v18 = (_DWORD *)a1; + v60 = v68; + v19 = *(_DWORD *)(a1 + 8); + if ( v19 < *(_DWORD *)(a1 + 12) ) + { +LABEL_42: + HIDWORD(a1) = -1; + v18[2] = v19 + 1; + goto LABEL_43; + } +LABEL_62: + (*(void (__fastcall **)(_DWORD *))(*v18 + 40))(v18); + v18 = (_DWORD *)a1; + HIDWORD(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcptd = v68; + goto LABEL_44; + } +LABEL_43: + lpuexcptd = 0; + if ( v18[2] >= v18[3] ) + { + lpuexcptd = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v18 + 36))(v18) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptd = v68; + } + } +LABEL_44: + v20 = a3 == -1; + v57 = v20 & (a2 != 0); + if ( v57 ) + { + v20 = 0; + if ( a2[2] >= a2[3] ) + { + v37 = (*(int (**)(void))(*a2 + 36))(); + v20 = 0; + if ( v37 == -1 ) + { + a2 = 0; + v20 = v57; + } + } + } + if ( lpuexcptd == v20 ) + break; + v26 = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_65; + v39 = *(char **)(a1 + 8); + if ( (unsigned int)v39 < *(_DWORD *)(a1 + 12) ) + { + v26 = *v39; +LABEL_65: + lpuexcpt = v26; + goto LABEL_66; + } + v51 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcpt = v51; + if ( v51 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpt = -1; + } +LABEL_66: + v15 = *((_BYTE *)v78 + 16); + } +LABEL_46: + lpuexcpte = (struct _Unwind_Exception *)v91[0]; + v21 = *((_DWORD *)v91[0] - 3); +LABEL_47: + if ( !v21 ) + goto LABEL_53; + if ( v60 || v62 ) + goto LABEL_51; +LABEL_50: + std::string::push_back((int *)v91, (std::string *)(char)v67, v54); + lpuexcpte = (struct _Unwind_Exception *)v91[0]; +LABEL_51: + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v78 + 2), *((_DWORD *)v78 + 3), v91) ) + *a5 = 4; +LABEL_53: + v79 = a1; + std::string::_Rep::_M_dispose((volatile signed __int32 *)lpuexcpte - 3, (int)&v90); + return v79; +} +// 476B83: variable 'v54' is possibly undefined +// 476C95: variable 'v53' is possibly undefined +// 477065: variable 'v55' is possibly undefined + +//----- (004770D0) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + unsigned __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + unsigned __int64 (__stdcall *v7)(unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *); // eax + int v8; // esi + int result; // eax + int v10[8]; // [esp+3Ch] [ebp-20h] BYREF + + v7 = *(unsigned __int64 (__stdcall **)(unsigned __int64, _DWORD *, int, int, _DWORD *, _DWORD *))(*(_DWORD *)this + 48); + if ( v7 != std::num_get>::do_get ) + return ((int (__fastcall *)(void *, _DWORD, _DWORD, _DWORD, _DWORD *, int, int, _DWORD *, _DWORD *))v7)( + this, + HIDWORD(a2), + a2, + HIDWORD(a2), + a3, + a4, + a5, + a6, + a7); + v8 = *(_DWORD *)(a5 + 12); + *(_DWORD *)(a5 + 12) = v8 & 0xFFFFFFB5 | 8; + result = std::num_get>::_M_extract_int(a2, a3, a4, a5, a6, v10); + *(_DWORD *)(a5 + 12) = v8; + *a7 = v10[0]; + return result; +} +// 4770D0: using guessed type int var_20[8]; + +//----- (00477180) -------------------------------------------------------- +int __fastcall std::num_get>::get(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 8))(a1); +} + +//----- (00477190) -------------------------------------------------------- +int __fastcall std::num_get>::get(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 40))(a1); +} + +//----- (004771A0) -------------------------------------------------------- +int __fastcall std::num_get>::get(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 44))(a1); +} + +//----- (004771B0) -------------------------------------------------------- +int __fastcall std::num_get>::get(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 36))(a1); +} + +//----- (004771C0) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + unsigned __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 20); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int(a2, a3, a4, a5, a6, a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 477FF0: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (00477240) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + unsigned __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 12); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int(a2, a3, a4, a5, a6, a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 478000: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (004772C0) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + unsigned __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 24); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int(a2, a3, a4, a5, a6, a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 478010: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (00477340) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + unsigned __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _WORD *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 16); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int(a2, a3, a4, a5, a6, a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 478020: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (004773C0) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + unsigned __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 28); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int(a2, a3, a4, a5, a6, a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 478030: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (00477440) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + unsigned __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 32); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int(a2, a3, a4, a5, a6, a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 478040: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (004774C0) -------------------------------------------------------- +unsigned __int64 __stdcall std::num_get>::do_get( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6) +{ + int v6; // esi + unsigned __int64 result; // rax + int v8[8]; // [esp+2Ch] [ebp-20h] BYREF + + v6 = *(_DWORD *)(a4 + 12); + *(_DWORD *)(a4 + 12) = v6 & 0xFFFFFFB5 | 8; + result = std::num_get>::_M_extract_int(a1, a2, a3, a4, a5, v8); + *(_DWORD *)(a4 + 12) = v6; + *a6 = v8[0]; + return result; +} +// 4774C0: using guessed type int var_20[8]; + +//----- (00477530) -------------------------------------------------------- +unsigned __int64 __stdcall std::num_get>::do_get( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + int *a5, + _BYTE *a6) +{ + _BYTE *v6; // edi + struct _Unwind_Exception *v8; // eax + int v9; // ecx + struct _Unwind_Exception *v10; // edi + int v11; // eax + bool v12; // dl + int v13; // eax + struct _Unwind_Exception *v14; // ebp + unsigned int v15; // edi + unsigned int v16; // eax + bool v17; // cl + char v18; // si + char v19; // bl + char v20; // bl + _BYTE *v21; // eax + int v22; // eax + int v23; // eax + unsigned int v24; // eax + bool v25; // bl + struct _Unwind_Exception *v26; // edi + unsigned int v27; // ebp + int v28; // eax + unsigned int v29; // eax + bool v30; // [esp+2Bh] [ebp-31h] + bool v31; // [esp+2Ch] [ebp-30h] + char v32; // [esp+2Dh] [ebp-2Fh] + char v33; // [esp+2Eh] [ebp-2Eh] + char v34; // [esp+2Eh] [ebp-2Eh] + bool v35; // [esp+2Eh] [ebp-2Eh] + bool v36; // [esp+2Eh] [ebp-2Eh] + bool v37; // [esp+2Fh] [ebp-2Dh] + int v38[8]; // [esp+3Ch] [ebp-20h] BYREF + + if ( (*(_BYTE *)(a4 + 12) & 1) == 0 ) + { + v38[0] = -1; + a1 = std::num_get>::_M_extract_int(a1, a2, a3, a4, a5, v38); + if ( v38[0] > 1u ) + { + *a6 = 1; + *a5 = 4; + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) ) + *a5 |= 2u; + } + else + { + v6 = a6; + *a6 = v38[0]; + *v6 &= 1u; + } + return a1; + } + v8 = std::__use_cache>::operator()((int *)(a4 + 108)); + v9 = *((_DWORD *)v8 + 8); + v10 = v8; + v11 = *((_DWORD *)v8 + 6); + v12 = v9 == 0; + v31 = v11 == 0; + if ( !(v11 | v9) ) + goto LABEL_41; + v32 = 1; + v13 = HIDWORD(a1); + v30 = 1; + v14 = v10; + v15 = 0; + while ( 1 ) + { + v18 = v13 == -1; + v19 = ((_DWORD)a1 != 0) & v18; + if ( v19 ) + { + v18 = 0; + if ( *(_DWORD *)(a1 + 8) >= *(_DWORD *)(a1 + 12) ) + { + v35 = v12; + v23 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 36))(a1); + v12 = v35; + if ( v23 == -1 ) + { + LODWORD(a1) = 0; + v18 = v19; + } + } + } + v20 = a3 == -1; + v34 = v20 & (a2 != 0); + if ( v34 ) + { + v20 = 0; + if ( a2[2] >= a2[3] ) + { + v37 = v12; + v22 = (*(int (**)(void))(*a2 + 36))(); + v12 = v37; + if ( v22 == -1 ) + { + a2 = 0; + v20 = v34; + } + } + } + if ( v20 == v18 ) + { + v33 = 1; + v24 = v15; + v25 = v30; + v26 = v14; + v27 = v24; +LABEL_45: + if ( v25 && *((_DWORD *)v26 + 8) == v27 && v27 ) + { + *a6 = 0; + if ( v32 && *((_DWORD *)v26 + 6) == v27 ) + goto LABEL_42; + } + else + { + if ( !v32 || *((_DWORD *)v26 + 6) != v27 || !v27 ) + { + *a6 = 0; + if ( !v33 ) + goto LABEL_42; + *a5 = 6; + return a1; + } + *a6 = 1; + } + v28 = 2 * (v33 != 0); +LABEL_62: + *a5 = v28; + return a1; + } + LOBYTE(v21) = BYTE4(a1); + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v21 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v21 >= *(_DWORD *)(a1 + 12) ) + { + v36 = v12; + v21 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + v12 = v36; + if ( v21 == (_BYTE *)-1 ) + LODWORD(a1) = 0; + } + else + { + LOBYTE(v21) = *v21; + } + } + if ( !v12 ) + v30 = *(_BYTE *)(*((_DWORD *)v14 + 7) + v15) == (unsigned __int8)v21; + if ( !v30 ) + { + if ( v31 ) + { + if ( v32 ) + { + if ( *((_DWORD *)v14 + 6) == v15 && v15 ) + { + *a6 = 1; + v28 = 0; + goto LABEL_62; + } + goto LABEL_41; + } +LABEL_43: + *a6 = 0; + *a5 = 4; + return a1; + } +LABEL_8: + v32 = *(_BYTE *)(*((_DWORD *)v14 + 5) + v15) == (unsigned __int8)v21; + goto LABEL_9; + } + if ( !v31 ) + goto LABEL_8; +LABEL_9: + v33 = v12 & (v32 ^ 1); + if ( v33 ) + break; + if ( !(v30 | (unsigned __int8)v32) ) + goto LABEL_43; + ++v15; + v16 = *(_DWORD *)(a1 + 8); + if ( v16 >= *(_DWORD *)(a1 + 12) ) + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + else + *(_DWORD *)(a1 + 8) = v16 + 1; + HIDWORD(a1) = -1; + if ( !v30 ) + { + v12 = v32; +LABEL_29: + v31 = *((_DWORD *)v14 + 6) <= v15; + v32 |= v30; + v17 = v12 && v31; + goto LABEL_16; + } + v12 = *((_DWORD *)v14 + 8) <= v15; + if ( v32 ) + goto LABEL_29; + v17 = *((_DWORD *)v14 + 8) <= v15; + v31 = v30; +LABEL_16: + v13 = -1; + if ( v17 ) + { + v29 = v15; + v25 = v30; + v26 = v14; + v27 = v29; + goto LABEL_45; + } + } + if ( !v30 ) + goto LABEL_43; + if ( *((_DWORD *)v14 + 8) == v15 && v15 ) + { + *a6 = 0; + v28 = 0; + goto LABEL_62; + } +LABEL_41: + *a6 = 0; +LABEL_42: + *a5 = 4; + return a1; +} +// 477530: using guessed type unsigned int var_20[8]; + +//----- (00477990) -------------------------------------------------------- +int __stdcall std::num_get>::do_get( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + double *a6) +{ + char v6; // al + int v7; // ecx + int v8; // eax + int v10; // eax + char v11; // dl + bool v12; // zf + int v13; // eax + unsigned int v14; // [esp+4h] [ebp-84h] + char v15; // [esp+23h] [ebp-65h] + int v16; // [esp+24h] [ebp-64h] + char v17; // [esp+30h] [ebp-58h] + unsigned __int64 v18; // [esp+34h] [ebp-54h] + int v19; // [esp+78h] [ebp-10h] BYREF + int v20[3]; // [esp+7Ch] [ebp-Ch] BYREF + + v19 = (int)std::string::_S_construct(0, 0); + std::string::reserve(&v19, (std::string *)0x20, v14); + v18 = std::num_get>::_M_extract_float(a1, a2, a3, a4, a5, &v19); + v16 = v18; + v20[0] = std::locale::facet::_S_get_c_locale(); + std::__convert_to_v((unsigned __int8 *)v19, a6, a5); + v17 = HIDWORD(v18) == -1; + v15 = v17 & ((_DWORD)v18 != 0); + if ( v15 ) + { + v17 = 0; + if ( *(_DWORD *)(v18 + 8) >= *(_DWORD *)(v18 + 12) ) + { + v10 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v18 + 36))(v18); + v11 = v15; + v12 = v10 == -1; + if ( v10 != -1 ) + v11 = 0; + v13 = 0; + if ( !v12 ) + v13 = v18; + v17 = v11; + v16 = v13; + } + } + v6 = a3 == -1; + if ( a2 ) + { + if ( a3 == -1 ) + { + v6 = 0; + if ( a2[2] >= a2[3] ) + v6 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2) == -1; + } + } + if ( v6 == v17 ) + *a5 |= 2u; + v7 = v19; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v19 - 4), 0xFFFFFFFF) > 0 ) + return v16; +LABEL_10: + std::string::_Rep::_M_destroy((void *)(v7 - 12), (int)v20); + return v16; + } + v8 = *(_DWORD *)(v19 - 4); + *(_DWORD *)(v19 - 4) = v8 - 1; + if ( v8 <= 0 ) + goto LABEL_10; + return v16; +} +// 477A10: variable 'v14' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 477990: using guessed type int var_C[3]; + +//----- (00477BB0) -------------------------------------------------------- +int __stdcall std::num_get>::do_get( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + long double *a6) +{ + char v6; // al + char *v7; // ecx + int v8; // eax + int v10; // eax + char v11; // dl + bool v12; // zf + int v13; // eax + unsigned int v14; // [esp+4h] [ebp-84h] + char v15; // [esp+23h] [ebp-65h] + int v16; // [esp+24h] [ebp-64h] + char v17; // [esp+30h] [ebp-58h] + unsigned __int64 v18; // [esp+34h] [ebp-54h] + char *String; // [esp+78h] [ebp-10h] BYREF + int v20[3]; // [esp+7Ch] [ebp-Ch] BYREF + + String = (char *)std::string::_S_construct(0, 0); + std::string::reserve((int *)&String, (std::string *)0x20, v14); + v18 = std::num_get>::_M_extract_float(a1, a2, a3, a4, a5, (int *)&String); + v16 = v18; + v20[0] = std::locale::facet::_S_get_c_locale(); + std::__convert_to_v(String, a6, a5); + v17 = HIDWORD(v18) == -1; + v15 = v17 & ((_DWORD)v18 != 0); + if ( v15 ) + { + v17 = 0; + if ( *(_DWORD *)(v18 + 8) >= *(_DWORD *)(v18 + 12) ) + { + v10 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v18 + 36))(v18); + v11 = v15; + v12 = v10 == -1; + if ( v10 != -1 ) + v11 = 0; + v13 = 0; + if ( !v12 ) + v13 = v18; + v17 = v11; + v16 = v13; + } + } + v6 = a3 == -1; + if ( a2 ) + { + if ( a3 == -1 ) + { + v6 = 0; + if ( a2[2] >= a2[3] ) + v6 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2) == -1; + } + } + if ( v6 == v17 ) + *a5 |= 2u; + v7 = String; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)String - 1, 0xFFFFFFFF) > 0 ) + return v16; +LABEL_10: + std::string::_Rep::_M_destroy(v7 - 12, (int)v20); + return v16; + } + v8 = *((_DWORD *)String - 1); + *((_DWORD *)String - 1) = v8 - 1; + if ( v8 <= 0 ) + goto LABEL_10; + return v16; +} +// 477C30: variable 'v14' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 477BB0: using guessed type int var_C[3]; + +//----- (00477DD0) -------------------------------------------------------- +int __stdcall std::num_get>::do_get( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + float *a6) +{ + char v6; // al + int v7; // ecx + int v8; // eax + int v10; // eax + char v11; // dl + bool v12; // zf + int v13; // eax + unsigned int v14; // [esp+4h] [ebp-84h] + char v15; // [esp+23h] [ebp-65h] + int v16; // [esp+24h] [ebp-64h] + char v17; // [esp+30h] [ebp-58h] + unsigned __int64 v18; // [esp+34h] [ebp-54h] + int v19; // [esp+78h] [ebp-10h] BYREF + int v20[3]; // [esp+7Ch] [ebp-Ch] BYREF + + v19 = (int)std::string::_S_construct(0, 0); + std::string::reserve(&v19, (std::string *)0x20, v14); + v18 = std::num_get>::_M_extract_float(a1, a2, a3, a4, a5, &v19); + v16 = v18; + v20[0] = std::locale::facet::_S_get_c_locale(); + std::__convert_to_v((unsigned __int8 *)v19, a6, a5); + v17 = HIDWORD(v18) == -1; + v15 = v17 & ((_DWORD)v18 != 0); + if ( v15 ) + { + v17 = 0; + if ( *(_DWORD *)(v18 + 8) >= *(_DWORD *)(v18 + 12) ) + { + v10 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v18 + 36))(v18); + v11 = v15; + v12 = v10 == -1; + if ( v10 != -1 ) + v11 = 0; + v13 = 0; + if ( !v12 ) + v13 = v18; + v17 = v11; + v16 = v13; + } + } + v6 = a3 == -1; + if ( a2 ) + { + if ( a3 == -1 ) + { + v6 = 0; + if ( a2[2] >= a2[3] ) + v6 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2) == -1; + } + } + if ( v6 == v17 ) + *a5 |= 2u; + v7 = v19; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v19 - 4), 0xFFFFFFFF) > 0 ) + return v16; +LABEL_10: + std::string::_Rep::_M_destroy((void *)(v7 - 12), (int)v20); + return v16; + } + v8 = *(_DWORD *)(v19 - 4); + *(_DWORD *)(v19 - 4) = v8 - 1; + if ( v8 <= 0 ) + goto LABEL_10; + return v16; +} +// 477E50: variable 'v14' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 477DD0: using guessed type int var_C[3]; + +//----- (00478050) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + unsigned __int16 a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + int *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + __int16 *v11; // eax + __int16 v12; // ax + bool v13; // zf + _DWORD *v14; // eax + _DWORD *v15; // ebx + unsigned int v16; // eax + unsigned int v17; // edx + __int16 *v18; // eax + __int16 v19; // ax + bool v20; // zf + _DWORD *v21; // eax + int v22; // eax + int v23; // eax + _DWORD *v24; // ecx + unsigned int v25; // eax + unsigned int v26; // edx + __int16 *v27; // eax + __int16 v28; // ax + bool v29; // zf + _DWORD *v30; // eax + int *v31; // eax + bool v33; // al + unsigned __int16 *v34; // eax + _DWORD *v35; // eax + _WORD *v36; // eax + unsigned int v37; // edx + unsigned int v38; // edx + int v39; // eax + bool v40; // cc + int v41; // edx + int v42; // eax + _DWORD *v43; // ecx + unsigned int v44; // eax + unsigned int v45; // edx + __int16 *v46; // eax + __int16 v47; // ax + bool v48; // zf + _DWORD *v49; // eax + unsigned __int16 *v50; // eax + _DWORD *v51; // eax + __int16 *v52; // eax + __int16 v53; // ax + bool v54; // zf + _DWORD *v55; // eax + bool v56; // bl + unsigned __int16 *v57; // eax + _DWORD *v58; // eax + size_t v59; // edx + size_t v60; // ecx + __int16 *v61; // eax + __int16 v62; // ax + bool v63; // zf + _DWORD *v64; // eax + bool v65; // dl + __int16 *v66; // eax + __int16 v67; // ax + bool v68; // zf + _DWORD *v69; // eax + bool v70; // cl + int v71; // edx + unsigned __int16 *v72; // eax + _DWORD *v73; // eax + _DWORD *v74; // eax + __int16 *v75; // eax + __int16 v76; // ax + bool v77; // zf + _DWORD *v78; // eax + bool v79; // bl + __int16 *v80; // eax + __int16 v81; // ax + bool v82; // zf + _DWORD *v83; // eax + bool v84; // dl + unsigned __int16 *v85; // eax + _DWORD *v86; // edx + __int16 *v87; // eax + __int16 v88; // ax + bool v89; // zf + _DWORD *v90; // eax + bool v91; // bl + char v92; // bl + unsigned int v93; // [esp+8h] [ebp-B0h] + std::locale::_Impl *v94; // [esp+14h] [ebp-A4h] + unsigned int v95; // [esp+1Ch] [ebp-9Ch] + int v96; // [esp+20h] [ebp-98h] + unsigned int v97; // [esp+24h] [ebp-94h] + bool v98; // [esp+2Dh] [ebp-8Bh] + char v99; // [esp+2Eh] [ebp-8Ah] + int v100; // [esp+30h] [ebp-88h] + char v101; // [esp+30h] [ebp-88h] + _DWORD *v102; // [esp+34h] [ebp-84h] + char v103; // [esp+38h] [ebp-80h] + int v104; // [esp+38h] [ebp-80h] + size_t v105; // [esp+38h] [ebp-80h] + char v106; // [esp+3Dh] [ebp-7Bh] + char v107; // [esp+3Eh] [ebp-7Ah] + char v108; // [esp+3Eh] [ebp-7Ah] + char v109; // [esp+3Eh] [ebp-7Ah] + char v110; // [esp+3Eh] [ebp-7Ah] + char v111; // [esp+40h] [ebp-78h] + char v112; // [esp+40h] [ebp-78h] + unsigned int v113; // [esp+40h] [ebp-78h] + bool v114; // [esp+44h] [ebp-74h] + char v115; // [esp+48h] [ebp-70h] + char v116; // [esp+48h] [ebp-70h] + bool v117; // [esp+48h] [ebp-70h] + int *v118; // [esp+4Ch] [ebp-6Ch] + unsigned int v119; // [esp+4Ch] [ebp-6Ch] + int v120; // [esp+50h] [ebp-68h] + _DWORD *v121; // [esp+54h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+58h] [ebp-60h] + bool lpuexcpta; // [esp+58h] [ebp-60h] + unsigned __int16 lpuexcptb; // [esp+58h] [ebp-60h] + char lpuexcptc; // [esp+58h] [ebp-60h] + struct _Unwind_Exception *lpuexcptd; // [esp+58h] [ebp-60h] + char lpuexcpte; // [esp+58h] [ebp-60h] + void *Block; // [esp+98h] [ebp-20h] BYREF + size_t v129; // [esp+9Ch] [ebp-1Ch] + int v130[5]; // [esp+A0h] [ebp-18h] BYREF + + v121 = a1; + v102 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v118 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v120 = *v118; + if ( !*v118 ) + { + v74 = operator new(0xA8u); + v74[1] = 0; + *v74 = &off_51AF70; + v74[2] = 0; + v74[3] = 0; + *((_BYTE *)v74 + 16) = 0; + v74[5] = 0; + v74[6] = 0; + v74[7] = 0; + v74[8] = 0; + v74[9] = 0; + *((_BYTE *)v74 + 164) = 0; + v94 = (std::locale::_Impl *)v74; + std::__numpunct_cache::_M_cache((int)v74, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v94, lpuexcpt, v93); + v120 = *v118; + } + v119 = 8; + v100 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v100 != 64 ) + { + v7 = 10; + if ( v100 == 8 ) + v7 = 16; + v119 = v7; + } + lpuexcpta = a2 == 0xFFFF; + if ( lpuexcpta && a1 != 0 ) + { + v75 = (__int16 *)a1[2]; + if ( (unsigned int)v75 >= a1[3] ) + v76 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v76 = *v75; + v77 = v76 == -1; + v78 = 0; + if ( !v77 ) + v78 = a1; + v79 = lpuexcpta && a1 != 0; + v121 = v78; + if ( !v77 ) + v79 = 0; + v103 = v79; + } + else + { + v103 = a2 == 0xFFFF; + } + v114 = a4 == -1; + if ( v114 && a3 != 0 ) + { + v80 = (__int16 *)a3[2]; + if ( (unsigned int)v80 >= a3[3] ) + v81 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v81 = *v80; + v82 = v81 == -1; + v83 = 0; + if ( !v82 ) + v83 = a3; + v84 = v114 && a3 != 0; + v102 = v83; + if ( !v82 ) + v84 = 0; + v115 = v84; + } + else + { + v115 = a4 == -1; + } + if ( v115 != v103 ) + { + if ( v121 && a2 == 0xFFFF ) + { + v72 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v72 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v72; + v73 = 0; + if ( lpuexcptb != 0xFFFF ) + v73 = v121; + v121 = v73; + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v120 + 16); + v98 = *(_WORD *)(v120 + 112) == lpuexcptb; + if ( *(_WORD *)(v120 + 112) == lpuexcptb || *(_WORD *)(v120 + 114) == lpuexcptb ) + { + if ( (!v8 || *(_WORD *)(v120 + 38) != lpuexcptb) && *(_WORD *)(v120 + 36) != lpuexcptb ) + { + v9 = v121[2]; + v10 = v121[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v11 = (__int16 *)v121[2]; + v10 = v121[3]; + } + else + { + v11 = (__int16 *)(v9 + 2); + v121[2] = v11; + } + if ( (unsigned int)v11 >= v10 ) + v12 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + v12 = *v11; + v13 = v12 == -1; + v14 = 0; + if ( !v13 ) + v14 = v121; + v111 = v13; + v121 = v14; + if ( v114 && v102 != 0 ) + { + v87 = (__int16 *)v102[2]; + if ( (unsigned int)v87 >= v102[3] ) + v88 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v88 = *v87; + v89 = v88 == -1; + v90 = 0; + if ( !v89 ) + v90 = v102; + v91 = v114 && v102 != 0; + v102 = v90; + if ( !v89 ) + v91 = 0; + v116 = v91; + } + else + { + v116 = a4 == -1; + } + if ( v111 == v116 ) + { + v106 = 1; + v104 = 0; + v117 = 0; + goto LABEL_49; + } + if ( v121 ) + { + v85 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v85 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v85; + v86 = 0; + if ( lpuexcptb != 0xFFFF ) + v86 = v121; + v8 = *(_BYTE *)(v120 + 16); + v121 = v86; + } + else + { + lpuexcptb = -1; + v8 = *(_BYTE *)(v120 + 16); + } + } + } + else + { + v98 = 0; + } + v104 = 0; + v117 = 0; + while ( 1 ) + { + if ( v8 && *(_WORD *)(v120 + 38) == lpuexcptb || *(_WORD *)(v120 + 36) == lpuexcptb ) + { +LABEL_178: + v106 = 0; + goto LABEL_49; + } + if ( *(_WORD *)(v120 + 120) != lpuexcptb ) + break; + v33 = v119 == 10 || !v117; + if ( !v33 ) + goto LABEL_36; + v117 = v100 == 0 || v119 == 8; + if ( !v117 ) + { + ++v104; + v117 = v33; + goto LABEL_40; + } + v15 = v121; + v104 = 0; + v119 = 8; + v16 = v121[2]; + v17 = v121[3]; + if ( v16 < v17 ) + { +LABEL_41: + v18 = (__int16 *)(v16 + 2); + v15[2] = v18; + if ( v17 > (unsigned int)v18 ) + goto LABEL_42; + goto LABEL_85; + } +LABEL_84: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v18 = (__int16 *)v121[2]; + if ( v121[3] > (unsigned int)v18 ) + { +LABEL_42: + v19 = *v18; + goto LABEL_43; + } +LABEL_85: + v19 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); +LABEL_43: + v20 = v19 == -1; + v21 = 0; + if ( !v20 ) + v21 = v121; + v107 = v20; + v121 = v21; + if ( v114 && v102 != 0 ) + { + v52 = (__int16 *)v102[2]; + if ( (unsigned int)v52 >= v102[3] ) + v53 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v53 = *v52; + v54 = v53 == -1; + v55 = 0; + if ( !v54 ) + v55 = v102; + v56 = v114 && v102 != 0; + v102 = v55; + if ( !v54 ) + v56 = 0; + v112 = v56; + } + else + { + v112 = a4 == -1; + } + if ( v112 == v107 ) + { + v106 = 1; + goto LABEL_49; + } + lpuexcptb = -1; + if ( v121 ) + { + v34 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v34 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v34; + v35 = 0; + if ( lpuexcptb != 0xFFFF ) + v35 = v121; + v121 = v35; + } + if ( !v117 ) + { + v106 = 0; + goto LABEL_49; + } + v8 = *(_BYTE *)(v120 + 16); + } + if ( !v117 ) + goto LABEL_178; +LABEL_36: + if ( *(_WORD *)(v120 + 116) != lpuexcptb && *(_WORD *)(v120 + 118) != lpuexcptb ) + { + v106 = 0; + v117 = 1; + goto LABEL_49; + } + if ( v100 != 0 && v119 != 16 ) + { + v106 = 0; + v95 = v119; + v96 = v119; + v117 = 1; + goto LABEL_52; + } + v104 = 0; + v117 = 0; + v119 = 16; +LABEL_40: + v15 = v121; + v16 = v121[2]; + v17 = v121[3]; + if ( v16 < v17 ) + goto LABEL_41; + goto LABEL_84; + } + v98 = 0; + lpuexcptb = 0; + v106 = 1; + v104 = 0; + v117 = 0; +LABEL_49: + v22 = 22; + if ( v119 != 16 ) + v22 = v119; + v95 = v22; + v96 = v22; +LABEL_52: + v129 = 0; + Block = v130; + LOBYTE(v130[0]) = 0; + if ( *(_BYTE *)(v120 + 16) ) + std::string::reserve(&Block, 0x20u); + v97 = 0xFFFFFFFF / v119; + v99 = *(_BYTE *)(v120 + 164); + if ( !v99 ) + { + if ( !v106 ) + { + v101 = 0; + v113 = 0; + while ( v96 > 10 ) + { + if ( (unsigned __int16)(lpuexcptb - 48) <= 9u ) + goto LABEL_60; + if ( (unsigned __int16)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int16)(lpuexcptb - 65) > 5u ) + goto LABEL_102; + v23 = lpuexcptb - 55; + goto LABEL_61; + } + v23 = lpuexcptb - 87; + if ( v97 < v113 ) + { +LABEL_62: + v24 = v121; + v101 = 1; + v25 = v121[2]; + v26 = v121[3]; + if ( v25 < v26 ) + goto LABEL_63; + goto LABEL_118; + } +LABEL_117: + v101 |= ~v23 < v119 * v113; + v24 = v121; + v113 = v119 * v113 + v23; + v26 = v121[3]; + v25 = v121[2]; + ++v104; + if ( v25 < v26 ) + { +LABEL_63: + v27 = (__int16 *)(v25 + 2); + v24[2] = v27; + goto LABEL_64; + } +LABEL_118: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v27 = (__int16 *)v121[2]; + v26 = v121[3]; +LABEL_64: + if ( v26 <= (unsigned int)v27 ) + v28 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + v28 = *v27; + v29 = v28 == -1; + v30 = 0; + if ( !v29 ) + v30 = v121; + v108 = v29; + v121 = v30; + if ( v114 && v102 != 0 ) + { + v66 = (__int16 *)v102[2]; + if ( (unsigned int)v66 >= v102[3] ) + v67 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v67 = *v66; + v68 = v67 == -1; + v69 = 0; + if ( !v68 ) + v69 = v102; + v70 = v114 && v102 != 0; + v102 = v69; + if ( !v68 ) + v70 = 0; + lpuexcptc = v70; + } + else + { + lpuexcptc = a4 == -1; + } + if ( v108 == lpuexcptc ) + { + v99 = 1; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + goto LABEL_72; + } + if ( v121 ) + { + v57 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v57 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v57; + v58 = 0; + if ( lpuexcptb != 0xFFFF ) + v58 = v121; + v121 = v58; + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 0x2Fu || (unsigned __int16)(v96 + 48) <= lpuexcptb ) + goto LABEL_102; +LABEL_60: + v23 = lpuexcptb - 48; +LABEL_61: + if ( v97 < v113 ) + goto LABEL_62; + goto LABEL_117; + } + v92 = v106; + v101 = 0; + v106 = 0; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + v99 = v92; + v113 = 0; + goto LABEL_72; + } + if ( v106 ) + { + v113 = 0; + v101 = 0; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + v99 = v106; + v106 = 0; +LABEL_72: + if ( lpuexcptd ) + goto LABEL_103; +LABEL_73: + if ( v117 || v104 ) + goto LABEL_111; + goto LABEL_75; + } + v101 = 0; + v113 = 0; + while ( 1 ) + { + if ( *(_BYTE *)(v120 + 16) && *(_WORD *)(v120 + 38) == lpuexcptb ) + { + v31 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v129; + if ( !v104 ) + { + v99 = 0; + v106 = *(_BYTE *)(v120 + 16); + goto LABEL_72; + } + v110 = v104; + v59 = 15; + if ( Block != v130 ) + v59 = v130[0]; + v105 = v129 + 1; + if ( v129 + 1 > v59 ) + { + std::string::_M_mutate((int)&Block, v129, 0, 0, 1u); + v31 = (int *)Block; + } + v60 = v105; + v104 = 0; + *((_BYTE *)lpuexcptd + (_DWORD)v31) = v110; + v129 = v60; + *((_BYTE *)Block + v60) = 0; +LABEL_123: + v43 = v121; + v44 = v121[2]; + v45 = v121[3]; + if ( v44 < v45 ) + goto LABEL_124; + goto LABEL_134; + } + if ( lpuexcptb == *(_WORD *)(v120 + 36) ) + break; + v36 = (_WORD *)(v120 + 120); + v37 = v95; + while ( *v36 != lpuexcptb ) + { + ++v36; + if ( !--v37 ) + goto LABEL_102; + } + v39 = (int)v36 - v120 - 120; + v40 = v39 <= 30; + v41 = (v39 >> 1) - 6; + v42 = v39 >> 1; + if ( !v40 ) + v42 = v41; + if ( v97 < v113 ) + { + v101 = v99; + goto LABEL_123; + } + v101 |= ~v42 < v119 * v113; + v43 = v121; + v113 = v119 * v113 + v42; + v45 = v121[3]; + v44 = v121[2]; + ++v104; + if ( v44 < v45 ) + { +LABEL_124: + v46 = (__int16 *)(v44 + 2); + v43[2] = v46; + goto LABEL_125; + } +LABEL_134: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v46 = (__int16 *)v121[2]; + v45 = v121[3]; +LABEL_125: + if ( v45 <= (unsigned int)v46 ) + v47 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + v47 = *v46; + v48 = v47 == -1; + v49 = 0; + if ( !v48 ) + v49 = v121; + v109 = v48; + v121 = v49; + if ( v114 && v102 != 0 ) + { + v61 = (__int16 *)v102[2]; + if ( (unsigned int)v61 >= v102[3] ) + v62 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v62 = *v61; + v63 = v62 == -1; + v64 = 0; + if ( !v63 ) + v64 = v102; + v65 = v114 && v102 != 0; + v102 = v64; + if ( !v63 ) + v65 = 0; + lpuexcpte = v65; + } + else + { + lpuexcpte = a4 == -1; + } + if ( v109 == lpuexcpte ) + { + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + goto LABEL_72; + } + if ( v121 ) + { + v50 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v50 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v50; + v51 = 0; + if ( lpuexcptb != 0xFFFF ) + v51 = v121; + v121 = v51; + } + else + { + lpuexcptb = -1; + } + } +LABEL_102: + v99 = 0; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + if ( !v129 ) + goto LABEL_73; +LABEL_103: + v38 = 15; + if ( v31 != v130 ) + v38 = v130[0]; + if ( (unsigned int)lpuexcptd + 1 > v38 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v31 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v31) = v104; + v129 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v120 + 8), *(_DWORD *)(v120 + 12), (int)&Block) ) + *a6 = 4; + v31 = (int *)Block; + if ( !v117 && !(v129 | v104) ) + { +LABEL_75: + *a7 = 0; + *a6 = 4; + goto LABEL_76; + } +LABEL_111: + if ( v106 ) + goto LABEL_75; + if ( v101 ) + { + *a7 = -1; + *a6 = 4; + } + else + { + v71 = -v113; + if ( !v98 ) + v71 = v113; + *a7 = v71; + } +LABEL_76: + if ( v99 ) + *a6 |= 2u; + if ( v31 != v130 ) + operator delete(v31); + return v121; +} +// 478C30: variable 'v93' is possibly undefined +// 50C62C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (00479040) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + unsigned __int16 a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + int *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + __int16 *v11; // eax + __int16 v12; // ax + bool v13; // zf + _DWORD *v14; // eax + _DWORD *v15; // ebx + unsigned int v16; // eax + unsigned int v17; // edx + __int16 *v18; // eax + __int16 v19; // ax + bool v20; // zf + _DWORD *v21; // eax + int v22; // eax + int v23; // eax + _DWORD *v24; // ecx + unsigned int v25; // eax + unsigned int v26; // edx + __int16 *v27; // eax + __int16 v28; // ax + bool v29; // zf + _DWORD *v30; // eax + int *v31; // eax + bool v33; // al + unsigned __int16 *v34; // eax + _DWORD *v35; // eax + _WORD *v36; // eax + unsigned int v37; // edx + unsigned int v38; // edx + int v39; // eax + bool v40; // cc + int v41; // edx + int v42; // eax + _DWORD *v43; // ecx + unsigned int v44; // eax + unsigned int v45; // edx + __int16 *v46; // eax + __int16 v47; // ax + bool v48; // zf + _DWORD *v49; // eax + unsigned __int16 *v50; // eax + _DWORD *v51; // eax + __int16 *v52; // eax + __int16 v53; // ax + bool v54; // zf + _DWORD *v55; // eax + bool v56; // bl + unsigned __int16 *v57; // eax + _DWORD *v58; // eax + size_t v59; // edx + size_t v60; // edx + __int16 *v61; // eax + __int16 v62; // ax + bool v63; // zf + _DWORD *v64; // eax + bool v65; // bl + __int16 *v66; // eax + __int16 v67; // ax + bool v68; // zf + _DWORD *v69; // eax + bool v70; // bl + int v71; // edx + unsigned __int16 *v72; // eax + _DWORD *v73; // eax + _DWORD *v74; // eax + __int16 *v75; // eax + __int16 v76; // ax + bool v77; // zf + _DWORD *v78; // eax + bool v79; // cl + __int16 *v80; // eax + __int16 v81; // ax + bool v82; // zf + _DWORD *v83; // eax + bool v84; // cl + unsigned __int16 *v85; // eax + _DWORD *v86; // edx + __int16 *v87; // eax + __int16 v88; // ax + bool v89; // zf + _DWORD *v90; // eax + bool v91; // dl + char v92; // bl + unsigned int v93; // [esp+8h] [ebp-C0h] + std::locale::_Impl *v94; // [esp+1Ch] [ebp-ACh] + bool v95; // [esp+20h] [ebp-A8h] + unsigned int v96; // [esp+28h] [ebp-A0h] + unsigned int v97; // [esp+2Ch] [ebp-9Ch] + int v98; // [esp+30h] [ebp-98h] + unsigned int v99; // [esp+34h] [ebp-94h] + char v100; // [esp+3Eh] [ebp-8Ah] + int v101; // [esp+40h] [ebp-88h] + char v102; // [esp+40h] [ebp-88h] + _DWORD *v103; // [esp+44h] [ebp-84h] + char v104; // [esp+48h] [ebp-80h] + int v105; // [esp+48h] [ebp-80h] + size_t v106; // [esp+48h] [ebp-80h] + char v107; // [esp+4Dh] [ebp-7Bh] + char v108; // [esp+4Eh] [ebp-7Ah] + char v109; // [esp+4Eh] [ebp-7Ah] + char v110; // [esp+4Eh] [ebp-7Ah] + char v111; // [esp+4Eh] [ebp-7Ah] + char v112; // [esp+50h] [ebp-78h] + char v113; // [esp+50h] [ebp-78h] + unsigned int v114; // [esp+50h] [ebp-78h] + bool v115; // [esp+54h] [ebp-74h] + char v116; // [esp+58h] [ebp-70h] + char v117; // [esp+58h] [ebp-70h] + bool v118; // [esp+58h] [ebp-70h] + int *v119; // [esp+5Ch] [ebp-6Ch] + unsigned int v120; // [esp+5Ch] [ebp-6Ch] + int v121; // [esp+60h] [ebp-68h] + _DWORD *v122; // [esp+64h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+68h] [ebp-60h] + bool lpuexcpta; // [esp+68h] [ebp-60h] + unsigned __int16 lpuexcptb; // [esp+68h] [ebp-60h] + char lpuexcptc; // [esp+68h] [ebp-60h] + struct _Unwind_Exception *lpuexcptd; // [esp+68h] [ebp-60h] + char lpuexcpte; // [esp+68h] [ebp-60h] + void *Block; // [esp+A8h] [ebp-20h] BYREF + size_t v130; // [esp+ACh] [ebp-1Ch] + int v131[5]; // [esp+B0h] [ebp-18h] BYREF + + v122 = a1; + v103 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v119 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v121 = *v119; + if ( !*v119 ) + { + v74 = operator new(0xA8u); + v74[1] = 0; + *v74 = &off_51AF70; + v74[2] = 0; + v74[3] = 0; + *((_BYTE *)v74 + 16) = 0; + v74[5] = 0; + v74[6] = 0; + v74[7] = 0; + v74[8] = 0; + v74[9] = 0; + *((_BYTE *)v74 + 164) = 0; + v94 = (std::locale::_Impl *)v74; + std::__numpunct_cache::_M_cache((int)v74, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v94, lpuexcpt, v93); + v121 = *v119; + } + v120 = 8; + v101 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v101 != 64 ) + { + v7 = 10; + if ( v101 == 8 ) + v7 = 16; + v120 = v7; + } + lpuexcpta = a2 == 0xFFFF; + if ( lpuexcpta && a1 != 0 ) + { + v75 = (__int16 *)a1[2]; + if ( (unsigned int)v75 >= a1[3] ) + v76 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v76 = *v75; + v77 = v76 == -1; + v78 = 0; + if ( !v77 ) + v78 = a1; + v79 = lpuexcpta && a1 != 0; + v122 = v78; + if ( !v77 ) + v79 = 0; + v104 = v79; + } + else + { + v104 = a2 == 0xFFFF; + } + v115 = a4 == -1; + if ( v115 && a3 != 0 ) + { + v80 = (__int16 *)a3[2]; + if ( (unsigned int)v80 >= a3[3] ) + v81 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v81 = *v80; + v82 = v81 == -1; + v83 = 0; + if ( !v82 ) + v83 = a3; + v84 = v115 && a3 != 0; + v103 = v83; + if ( !v82 ) + v84 = 0; + v116 = v84; + } + else + { + v116 = a4 == -1; + } + if ( v116 != v104 ) + { + if ( v122 && a2 == 0xFFFF ) + { + v72 = (unsigned __int16 *)v122[2]; + if ( (unsigned int)v72 >= v122[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + lpuexcptb = *v72; + v73 = 0; + if ( lpuexcptb != 0xFFFF ) + v73 = v122; + v122 = v73; + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v121 + 16); + v95 = *(_WORD *)(v121 + 112) == lpuexcptb; + if ( *(_WORD *)(v121 + 112) == lpuexcptb || *(_WORD *)(v121 + 114) == lpuexcptb ) + { + if ( (!v8 || *(_WORD *)(v121 + 38) != lpuexcptb) && *(_WORD *)(v121 + 36) != lpuexcptb ) + { + v9 = v122[2]; + v10 = v122[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v11 = (__int16 *)v122[2]; + v10 = v122[3]; + } + else + { + v11 = (__int16 *)(v9 + 2); + v122[2] = v11; + } + if ( (unsigned int)v11 >= v10 ) + v12 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + v12 = *v11; + v13 = v12 == -1; + v14 = 0; + if ( !v13 ) + v14 = v122; + v112 = v13; + v122 = v14; + if ( v115 && v103 != 0 ) + { + v87 = (__int16 *)v103[2]; + if ( (unsigned int)v87 >= v103[3] ) + v88 = (*(int (__fastcall **)(_DWORD *))(*v103 + 36))(v103); + else + v88 = *v87; + v89 = v88 == -1; + v90 = 0; + if ( !v89 ) + v90 = v103; + v91 = v115 && v103 != 0; + v103 = v90; + if ( !v89 ) + v91 = 0; + v117 = v91; + } + else + { + v117 = a4 == -1; + } + if ( v112 == v117 ) + { + v107 = 1; + v105 = 0; + v118 = 0; + goto LABEL_49; + } + if ( v122 ) + { + v85 = (unsigned __int16 *)v122[2]; + if ( (unsigned int)v85 >= v122[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + lpuexcptb = *v85; + v86 = 0; + if ( lpuexcptb != 0xFFFF ) + v86 = v122; + v8 = *(_BYTE *)(v121 + 16); + v122 = v86; + } + else + { + lpuexcptb = -1; + v8 = *(_BYTE *)(v121 + 16); + } + } + } + else + { + v95 = 0; + } + v105 = 0; + v118 = 0; + while ( 1 ) + { + if ( v8 && *(_WORD *)(v121 + 38) == lpuexcptb || *(_WORD *)(v121 + 36) == lpuexcptb ) + { +LABEL_178: + v107 = 0; + goto LABEL_49; + } + if ( *(_WORD *)(v121 + 120) != lpuexcptb ) + break; + v33 = v120 == 10 || !v118; + if ( !v33 ) + goto LABEL_36; + v118 = v101 == 0 || v120 == 8; + if ( !v118 ) + { + ++v105; + v118 = v33; + goto LABEL_40; + } + v15 = v122; + v105 = 0; + v120 = 8; + v16 = v122[2]; + v17 = v122[3]; + if ( v16 < v17 ) + { +LABEL_41: + v18 = (__int16 *)(v16 + 2); + v15[2] = v18; + if ( (unsigned int)v18 < v17 ) + goto LABEL_42; + goto LABEL_85; + } +LABEL_84: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v18 = (__int16 *)v122[2]; + if ( (unsigned int)v18 < v122[3] ) + { +LABEL_42: + v19 = *v18; + goto LABEL_43; + } +LABEL_85: + v19 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); +LABEL_43: + v20 = v19 == -1; + v21 = 0; + if ( !v20 ) + v21 = v122; + v108 = v20; + v122 = v21; + if ( v115 && v103 != 0 ) + { + v52 = (__int16 *)v103[2]; + if ( (unsigned int)v52 >= v103[3] ) + v53 = (*(int (__fastcall **)(_DWORD *))(*v103 + 36))(v103); + else + v53 = *v52; + v54 = v53 == -1; + v55 = 0; + if ( !v54 ) + v55 = v103; + v56 = v115 && v103 != 0; + v103 = v55; + if ( !v54 ) + v56 = 0; + v113 = v56; + } + else + { + v113 = a4 == -1; + } + if ( v113 == v108 ) + { + v107 = 1; + goto LABEL_49; + } + lpuexcptb = -1; + if ( v122 ) + { + v34 = (unsigned __int16 *)v122[2]; + if ( (unsigned int)v34 >= v122[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + lpuexcptb = *v34; + v35 = 0; + if ( lpuexcptb != 0xFFFF ) + v35 = v122; + v122 = v35; + } + if ( !v118 ) + { + v107 = 0; + goto LABEL_49; + } + v8 = *(_BYTE *)(v121 + 16); + } + if ( !v118 ) + goto LABEL_178; +LABEL_36: + if ( *(_WORD *)(v121 + 116) != lpuexcptb && *(_WORD *)(v121 + 118) != lpuexcptb ) + { + v107 = 0; + v118 = 1; + goto LABEL_49; + } + if ( v101 != 0 && v120 != 16 ) + { + v107 = 0; + v96 = v120; + v98 = v120; + v118 = 1; + goto LABEL_52; + } + v105 = 0; + v118 = 0; + v120 = 16; +LABEL_40: + v15 = v122; + v16 = v122[2]; + v17 = v122[3]; + if ( v16 < v17 ) + goto LABEL_41; + goto LABEL_84; + } + v95 = 0; + lpuexcptb = 0; + v107 = 1; + v105 = 0; + v118 = 0; +LABEL_49: + v22 = 22; + if ( v120 != 16 ) + v22 = v120; + v96 = v22; + v98 = v22; +LABEL_52: + v130 = 0; + Block = v131; + LOBYTE(v131[0]) = 0; + if ( *(_BYTE *)(v121 + 16) ) + std::string::reserve(&Block, 0x20u); + v97 = v95 + 0x7FFFFFFF; + v99 = v97 / v120; + v100 = *(_BYTE *)(v121 + 164); + if ( !v100 ) + { + if ( !v107 ) + { + v102 = 0; + v114 = 0; + while ( v98 > 10 ) + { + if ( (unsigned __int16)(lpuexcptb - 48) <= 9u ) + goto LABEL_60; + if ( (unsigned __int16)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int16)(lpuexcptb - 65) > 5u ) + goto LABEL_102; + v23 = lpuexcptb - 55; + goto LABEL_61; + } + v23 = lpuexcptb - 87; + if ( v99 < v114 ) + { +LABEL_62: + v24 = v122; + v102 = 1; + v25 = v122[2]; + v26 = v122[3]; + if ( v25 < v26 ) + goto LABEL_63; + goto LABEL_118; + } +LABEL_117: + v102 |= v97 - v23 < v120 * v114; + v24 = v122; + v114 = v120 * v114 + v23; + v26 = v122[3]; + v25 = v122[2]; + ++v105; + if ( v25 < v26 ) + { +LABEL_63: + v27 = (__int16 *)(v25 + 2); + v24[2] = v27; + goto LABEL_64; + } +LABEL_118: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v27 = (__int16 *)v122[2]; + v26 = v122[3]; +LABEL_64: + if ( v26 <= (unsigned int)v27 ) + v28 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + v28 = *v27; + v29 = v28 == -1; + v30 = 0; + if ( !v29 ) + v30 = v122; + v109 = v29; + v122 = v30; + if ( v115 && v103 != 0 ) + { + v66 = (__int16 *)v103[2]; + if ( (unsigned int)v66 >= v103[3] ) + v67 = (*(int (__fastcall **)(_DWORD *))(*v103 + 36))(v103); + else + v67 = *v66; + v68 = v67 == -1; + v69 = 0; + if ( !v68 ) + v69 = v103; + v70 = v115 && v103 != 0; + v103 = v69; + if ( !v68 ) + v70 = 0; + lpuexcptc = v70; + } + else + { + lpuexcptc = a4 == -1; + } + if ( v109 == lpuexcptc ) + { + v100 = 1; + lpuexcptd = (struct _Unwind_Exception *)v130; + v31 = (int *)Block; + goto LABEL_72; + } + if ( v122 ) + { + v57 = (unsigned __int16 *)v122[2]; + if ( (unsigned int)v57 >= v122[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + lpuexcptb = *v57; + v58 = 0; + if ( lpuexcptb != 0xFFFF ) + v58 = v122; + v122 = v58; + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 0x2Fu || (unsigned __int16)(v98 + 48) <= lpuexcptb ) + goto LABEL_102; +LABEL_60: + v23 = lpuexcptb - 48; +LABEL_61: + if ( v99 < v114 ) + goto LABEL_62; + goto LABEL_117; + } + v92 = v107; + v102 = 0; + v107 = 0; + lpuexcptd = (struct _Unwind_Exception *)v130; + v31 = (int *)Block; + v100 = v92; + v114 = 0; + goto LABEL_72; + } + if ( v107 ) + { + v114 = 0; + v102 = 0; + lpuexcptd = (struct _Unwind_Exception *)v130; + v31 = (int *)Block; + v100 = v107; + v107 = 0; +LABEL_72: + if ( lpuexcptd ) + goto LABEL_103; +LABEL_73: + if ( v118 || v105 ) + goto LABEL_111; + goto LABEL_75; + } + v102 = 0; + v114 = 0; + while ( 1 ) + { + if ( *(_BYTE *)(v121 + 16) && *(_WORD *)(v121 + 38) == lpuexcptb ) + { + v31 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v130; + if ( !v105 ) + { + v100 = 0; + v107 = *(_BYTE *)(v121 + 16); + goto LABEL_72; + } + v111 = v105; + v59 = 15; + if ( Block != v131 ) + v59 = v131[0]; + v106 = v130 + 1; + if ( v130 + 1 > v59 ) + { + std::string::_M_mutate((int)&Block, v130, 0, 0, 1u); + v31 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v31) = v111; + v60 = v106; + v105 = 0; + v130 = v60; + *((_BYTE *)Block + v60) = 0; +LABEL_123: + v43 = v122; + v44 = v122[2]; + v45 = v122[3]; + if ( v44 < v45 ) + goto LABEL_124; + goto LABEL_134; + } + if ( lpuexcptb == *(_WORD *)(v121 + 36) ) + break; + v36 = (_WORD *)(v121 + 120); + v37 = v96; + while ( *v36 != lpuexcptb ) + { + ++v36; + if ( !--v37 ) + goto LABEL_102; + } + v39 = (int)v36 - v121 - 120; + v40 = v39 <= 30; + v41 = (v39 >> 1) - 6; + v42 = v39 >> 1; + if ( !v40 ) + v42 = v41; + if ( v99 < v114 ) + { + v102 = v100; + goto LABEL_123; + } + v102 |= v97 - v42 < v120 * v114; + v43 = v122; + v114 = v120 * v114 + v42; + v45 = v122[3]; + v44 = v122[2]; + ++v105; + if ( v44 < v45 ) + { +LABEL_124: + v46 = (__int16 *)(v44 + 2); + v43[2] = v46; + goto LABEL_125; + } +LABEL_134: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v46 = (__int16 *)v122[2]; + v45 = v122[3]; +LABEL_125: + if ( v45 <= (unsigned int)v46 ) + v47 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + v47 = *v46; + v48 = v47 == -1; + v49 = 0; + if ( !v48 ) + v49 = v122; + v110 = v48; + v122 = v49; + if ( v115 && v103 != 0 ) + { + v61 = (__int16 *)v103[2]; + if ( (unsigned int)v61 >= v103[3] ) + v62 = (*(int (__fastcall **)(_DWORD *))(*v103 + 36))(v103); + else + v62 = *v61; + v63 = v62 == -1; + v64 = 0; + if ( !v63 ) + v64 = v103; + v65 = v115 && v103 != 0; + v103 = v64; + if ( !v63 ) + v65 = 0; + lpuexcpte = v65; + } + else + { + lpuexcpte = a4 == -1; + } + if ( lpuexcpte == v110 ) + { + lpuexcptd = (struct _Unwind_Exception *)v130; + v31 = (int *)Block; + goto LABEL_72; + } + if ( v122 ) + { + v50 = (unsigned __int16 *)v122[2]; + if ( (unsigned int)v50 >= v122[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + lpuexcptb = *v50; + v51 = 0; + if ( lpuexcptb != 0xFFFF ) + v51 = v122; + v122 = v51; + } + else + { + lpuexcptb = -1; + } + } +LABEL_102: + v100 = 0; + lpuexcptd = (struct _Unwind_Exception *)v130; + v31 = (int *)Block; + if ( !v130 ) + goto LABEL_73; +LABEL_103: + v38 = 15; + if ( v31 != v131 ) + v38 = v131[0]; + if ( (unsigned int)lpuexcptd + 1 > v38 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v31 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v31) = v105; + v130 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v121 + 8), *(_DWORD *)(v121 + 12), (int)&Block) ) + *a6 = 4; + v31 = (int *)Block; + if ( !v118 && !(v130 | v105) ) + { +LABEL_75: + *a7 = 0; + *a6 = 4; + goto LABEL_76; + } +LABEL_111: + if ( v107 ) + goto LABEL_75; + if ( v102 ) + { + *a7 = v95 + 0x7FFFFFFF; + *a6 = 4; + } + else + { + v71 = -v114; + if ( !v95 ) + v71 = v114; + *a7 = v71; + } +LABEL_76: + if ( v100 ) + *a6 |= 2u; + if ( v31 != v131 ) + operator delete(v31); + return v122; +} +// 479C40: variable 'v93' is possibly undefined +// 50C62C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (0047A050) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + unsigned __int16 a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + int *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + __int16 *v11; // eax + __int16 v12; // ax + bool v13; // zf + _DWORD *v14; // eax + _DWORD *v15; // ebx + unsigned int v16; // eax + unsigned int v17; // edx + __int16 *v18; // eax + __int16 v19; // ax + bool v20; // zf + _DWORD *v21; // eax + int v22; // eax + int v23; // eax + _DWORD *v24; // ecx + unsigned int v25; // eax + unsigned int v26; // edx + __int16 *v27; // eax + __int16 v28; // ax + bool v29; // zf + _DWORD *v30; // eax + int *v31; // eax + bool v33; // al + unsigned __int16 *v34; // eax + _DWORD *v35; // eax + _WORD *v36; // eax + unsigned int v37; // edx + unsigned int v38; // edx + int v39; // eax + bool v40; // cc + int v41; // edx + int v42; // eax + _DWORD *v43; // ecx + unsigned int v44; // eax + unsigned int v45; // edx + __int16 *v46; // eax + __int16 v47; // ax + bool v48; // zf + _DWORD *v49; // eax + unsigned __int16 *v50; // eax + _DWORD *v51; // eax + __int16 *v52; // eax + __int16 v53; // ax + bool v54; // zf + _DWORD *v55; // eax + bool v56; // bl + unsigned __int16 *v57; // eax + _DWORD *v58; // eax + size_t v59; // edx + size_t v60; // ecx + __int16 *v61; // eax + __int16 v62; // ax + bool v63; // zf + _DWORD *v64; // eax + bool v65; // dl + __int16 *v66; // eax + __int16 v67; // ax + bool v68; // zf + _DWORD *v69; // eax + bool v70; // cl + int v71; // edx + unsigned __int16 *v72; // eax + _DWORD *v73; // eax + _DWORD *v74; // eax + __int16 *v75; // eax + __int16 v76; // ax + bool v77; // zf + _DWORD *v78; // eax + bool v79; // bl + __int16 *v80; // eax + __int16 v81; // ax + bool v82; // zf + _DWORD *v83; // eax + bool v84; // dl + unsigned __int16 *v85; // eax + _DWORD *v86; // edx + __int16 *v87; // eax + __int16 v88; // ax + bool v89; // zf + _DWORD *v90; // eax + bool v91; // bl + char v92; // bl + unsigned int v93; // [esp+8h] [ebp-B0h] + std::locale::_Impl *v94; // [esp+14h] [ebp-A4h] + unsigned int v95; // [esp+1Ch] [ebp-9Ch] + int v96; // [esp+20h] [ebp-98h] + unsigned int v97; // [esp+24h] [ebp-94h] + bool v98; // [esp+2Dh] [ebp-8Bh] + char v99; // [esp+2Eh] [ebp-8Ah] + int v100; // [esp+30h] [ebp-88h] + char v101; // [esp+30h] [ebp-88h] + _DWORD *v102; // [esp+34h] [ebp-84h] + char v103; // [esp+38h] [ebp-80h] + int v104; // [esp+38h] [ebp-80h] + size_t v105; // [esp+38h] [ebp-80h] + char v106; // [esp+3Dh] [ebp-7Bh] + char v107; // [esp+3Eh] [ebp-7Ah] + char v108; // [esp+3Eh] [ebp-7Ah] + char v109; // [esp+3Eh] [ebp-7Ah] + char v110; // [esp+3Eh] [ebp-7Ah] + char v111; // [esp+40h] [ebp-78h] + char v112; // [esp+40h] [ebp-78h] + unsigned int v113; // [esp+40h] [ebp-78h] + bool v114; // [esp+44h] [ebp-74h] + char v115; // [esp+48h] [ebp-70h] + char v116; // [esp+48h] [ebp-70h] + bool v117; // [esp+48h] [ebp-70h] + int *v118; // [esp+4Ch] [ebp-6Ch] + unsigned int v119; // [esp+4Ch] [ebp-6Ch] + int v120; // [esp+50h] [ebp-68h] + _DWORD *v121; // [esp+54h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+58h] [ebp-60h] + bool lpuexcpta; // [esp+58h] [ebp-60h] + unsigned __int16 lpuexcptb; // [esp+58h] [ebp-60h] + char lpuexcptc; // [esp+58h] [ebp-60h] + struct _Unwind_Exception *lpuexcptd; // [esp+58h] [ebp-60h] + char lpuexcpte; // [esp+58h] [ebp-60h] + void *Block; // [esp+98h] [ebp-20h] BYREF + size_t v129; // [esp+9Ch] [ebp-1Ch] + int v130[5]; // [esp+A0h] [ebp-18h] BYREF + + v121 = a1; + v102 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v118 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v120 = *v118; + if ( !*v118 ) + { + v74 = operator new(0xA8u); + v74[1] = 0; + *v74 = &off_51AF70; + v74[2] = 0; + v74[3] = 0; + *((_BYTE *)v74 + 16) = 0; + v74[5] = 0; + v74[6] = 0; + v74[7] = 0; + v74[8] = 0; + v74[9] = 0; + *((_BYTE *)v74 + 164) = 0; + v94 = (std::locale::_Impl *)v74; + std::__numpunct_cache::_M_cache((int)v74, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v94, lpuexcpt, v93); + v120 = *v118; + } + v119 = 8; + v100 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v100 != 64 ) + { + v7 = 10; + if ( v100 == 8 ) + v7 = 16; + v119 = v7; + } + lpuexcpta = a2 == 0xFFFF; + if ( lpuexcpta && a1 != 0 ) + { + v75 = (__int16 *)a1[2]; + if ( (unsigned int)v75 >= a1[3] ) + v76 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v76 = *v75; + v77 = v76 == -1; + v78 = 0; + if ( !v77 ) + v78 = a1; + v79 = lpuexcpta && a1 != 0; + v121 = v78; + if ( !v77 ) + v79 = 0; + v103 = v79; + } + else + { + v103 = a2 == 0xFFFF; + } + v114 = a4 == -1; + if ( v114 && a3 != 0 ) + { + v80 = (__int16 *)a3[2]; + if ( (unsigned int)v80 >= a3[3] ) + v81 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v81 = *v80; + v82 = v81 == -1; + v83 = 0; + if ( !v82 ) + v83 = a3; + v84 = v114 && a3 != 0; + v102 = v83; + if ( !v82 ) + v84 = 0; + v115 = v84; + } + else + { + v115 = a4 == -1; + } + if ( v115 != v103 ) + { + if ( v121 && a2 == 0xFFFF ) + { + v72 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v72 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v72; + v73 = 0; + if ( lpuexcptb != 0xFFFF ) + v73 = v121; + v121 = v73; + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v120 + 16); + v98 = *(_WORD *)(v120 + 112) == lpuexcptb; + if ( *(_WORD *)(v120 + 112) == lpuexcptb || *(_WORD *)(v120 + 114) == lpuexcptb ) + { + if ( (!v8 || *(_WORD *)(v120 + 38) != lpuexcptb) && *(_WORD *)(v120 + 36) != lpuexcptb ) + { + v9 = v121[2]; + v10 = v121[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v11 = (__int16 *)v121[2]; + v10 = v121[3]; + } + else + { + v11 = (__int16 *)(v9 + 2); + v121[2] = v11; + } + if ( (unsigned int)v11 >= v10 ) + v12 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + v12 = *v11; + v13 = v12 == -1; + v14 = 0; + if ( !v13 ) + v14 = v121; + v111 = v13; + v121 = v14; + if ( v114 && v102 != 0 ) + { + v87 = (__int16 *)v102[2]; + if ( (unsigned int)v87 >= v102[3] ) + v88 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v88 = *v87; + v89 = v88 == -1; + v90 = 0; + if ( !v89 ) + v90 = v102; + v91 = v114 && v102 != 0; + v102 = v90; + if ( !v89 ) + v91 = 0; + v116 = v91; + } + else + { + v116 = a4 == -1; + } + if ( v111 == v116 ) + { + v106 = 1; + v104 = 0; + v117 = 0; + goto LABEL_49; + } + if ( v121 ) + { + v85 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v85 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v85; + v86 = 0; + if ( lpuexcptb != 0xFFFF ) + v86 = v121; + v8 = *(_BYTE *)(v120 + 16); + v121 = v86; + } + else + { + lpuexcptb = -1; + v8 = *(_BYTE *)(v120 + 16); + } + } + } + else + { + v98 = 0; + } + v104 = 0; + v117 = 0; + while ( 1 ) + { + if ( v8 && *(_WORD *)(v120 + 38) == lpuexcptb || *(_WORD *)(v120 + 36) == lpuexcptb ) + { +LABEL_178: + v106 = 0; + goto LABEL_49; + } + if ( *(_WORD *)(v120 + 120) != lpuexcptb ) + break; + v33 = v119 == 10 || !v117; + if ( !v33 ) + goto LABEL_36; + v117 = v100 == 0 || v119 == 8; + if ( !v117 ) + { + ++v104; + v117 = v33; + goto LABEL_40; + } + v15 = v121; + v104 = 0; + v119 = 8; + v16 = v121[2]; + v17 = v121[3]; + if ( v16 < v17 ) + { +LABEL_41: + v18 = (__int16 *)(v16 + 2); + v15[2] = v18; + if ( v17 > (unsigned int)v18 ) + goto LABEL_42; + goto LABEL_85; + } +LABEL_84: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v18 = (__int16 *)v121[2]; + if ( v121[3] > (unsigned int)v18 ) + { +LABEL_42: + v19 = *v18; + goto LABEL_43; + } +LABEL_85: + v19 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); +LABEL_43: + v20 = v19 == -1; + v21 = 0; + if ( !v20 ) + v21 = v121; + v107 = v20; + v121 = v21; + if ( v114 && v102 != 0 ) + { + v52 = (__int16 *)v102[2]; + if ( (unsigned int)v52 >= v102[3] ) + v53 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v53 = *v52; + v54 = v53 == -1; + v55 = 0; + if ( !v54 ) + v55 = v102; + v56 = v114 && v102 != 0; + v102 = v55; + if ( !v54 ) + v56 = 0; + v112 = v56; + } + else + { + v112 = a4 == -1; + } + if ( v112 == v107 ) + { + v106 = 1; + goto LABEL_49; + } + lpuexcptb = -1; + if ( v121 ) + { + v34 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v34 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v34; + v35 = 0; + if ( lpuexcptb != 0xFFFF ) + v35 = v121; + v121 = v35; + } + if ( !v117 ) + { + v106 = 0; + goto LABEL_49; + } + v8 = *(_BYTE *)(v120 + 16); + } + if ( !v117 ) + goto LABEL_178; +LABEL_36: + if ( *(_WORD *)(v120 + 116) != lpuexcptb && *(_WORD *)(v120 + 118) != lpuexcptb ) + { + v106 = 0; + v117 = 1; + goto LABEL_49; + } + if ( v100 != 0 && v119 != 16 ) + { + v106 = 0; + v95 = v119; + v96 = v119; + v117 = 1; + goto LABEL_52; + } + v104 = 0; + v117 = 0; + v119 = 16; +LABEL_40: + v15 = v121; + v16 = v121[2]; + v17 = v121[3]; + if ( v16 < v17 ) + goto LABEL_41; + goto LABEL_84; + } + v98 = 0; + lpuexcptb = 0; + v106 = 1; + v104 = 0; + v117 = 0; +LABEL_49: + v22 = 22; + if ( v119 != 16 ) + v22 = v119; + v95 = v22; + v96 = v22; +LABEL_52: + v129 = 0; + Block = v130; + LOBYTE(v130[0]) = 0; + if ( *(_BYTE *)(v120 + 16) ) + std::string::reserve(&Block, 0x20u); + v97 = 0xFFFFFFFF / v119; + v99 = *(_BYTE *)(v120 + 164); + if ( !v99 ) + { + if ( !v106 ) + { + v101 = 0; + v113 = 0; + while ( v96 > 10 ) + { + if ( (unsigned __int16)(lpuexcptb - 48) <= 9u ) + goto LABEL_60; + if ( (unsigned __int16)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int16)(lpuexcptb - 65) > 5u ) + goto LABEL_102; + v23 = lpuexcptb - 55; + goto LABEL_61; + } + v23 = lpuexcptb - 87; + if ( v97 < v113 ) + { +LABEL_62: + v24 = v121; + v101 = 1; + v25 = v121[2]; + v26 = v121[3]; + if ( v25 < v26 ) + goto LABEL_63; + goto LABEL_118; + } +LABEL_117: + v101 |= ~v23 < v119 * v113; + v24 = v121; + v113 = v119 * v113 + v23; + v26 = v121[3]; + v25 = v121[2]; + ++v104; + if ( v25 < v26 ) + { +LABEL_63: + v27 = (__int16 *)(v25 + 2); + v24[2] = v27; + goto LABEL_64; + } +LABEL_118: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v27 = (__int16 *)v121[2]; + v26 = v121[3]; +LABEL_64: + if ( v26 <= (unsigned int)v27 ) + v28 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + v28 = *v27; + v29 = v28 == -1; + v30 = 0; + if ( !v29 ) + v30 = v121; + v108 = v29; + v121 = v30; + if ( v114 && v102 != 0 ) + { + v66 = (__int16 *)v102[2]; + if ( (unsigned int)v66 >= v102[3] ) + v67 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v67 = *v66; + v68 = v67 == -1; + v69 = 0; + if ( !v68 ) + v69 = v102; + v70 = v114 && v102 != 0; + v102 = v69; + if ( !v68 ) + v70 = 0; + lpuexcptc = v70; + } + else + { + lpuexcptc = a4 == -1; + } + if ( v108 == lpuexcptc ) + { + v99 = 1; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + goto LABEL_72; + } + if ( v121 ) + { + v57 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v57 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v57; + v58 = 0; + if ( lpuexcptb != 0xFFFF ) + v58 = v121; + v121 = v58; + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 0x2Fu || (unsigned __int16)(v96 + 48) <= lpuexcptb ) + goto LABEL_102; +LABEL_60: + v23 = lpuexcptb - 48; +LABEL_61: + if ( v97 < v113 ) + goto LABEL_62; + goto LABEL_117; + } + v92 = v106; + v101 = 0; + v106 = 0; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + v99 = v92; + v113 = 0; + goto LABEL_72; + } + if ( v106 ) + { + v113 = 0; + v101 = 0; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + v99 = v106; + v106 = 0; +LABEL_72: + if ( lpuexcptd ) + goto LABEL_103; +LABEL_73: + if ( v117 || v104 ) + goto LABEL_111; + goto LABEL_75; + } + v101 = 0; + v113 = 0; + while ( 1 ) + { + if ( *(_BYTE *)(v120 + 16) && *(_WORD *)(v120 + 38) == lpuexcptb ) + { + v31 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v129; + if ( !v104 ) + { + v99 = 0; + v106 = *(_BYTE *)(v120 + 16); + goto LABEL_72; + } + v110 = v104; + v59 = 15; + if ( Block != v130 ) + v59 = v130[0]; + v105 = v129 + 1; + if ( v129 + 1 > v59 ) + { + std::string::_M_mutate((int)&Block, v129, 0, 0, 1u); + v31 = (int *)Block; + } + v60 = v105; + v104 = 0; + *((_BYTE *)lpuexcptd + (_DWORD)v31) = v110; + v129 = v60; + *((_BYTE *)Block + v60) = 0; +LABEL_123: + v43 = v121; + v44 = v121[2]; + v45 = v121[3]; + if ( v44 < v45 ) + goto LABEL_124; + goto LABEL_134; + } + if ( lpuexcptb == *(_WORD *)(v120 + 36) ) + break; + v36 = (_WORD *)(v120 + 120); + v37 = v95; + while ( *v36 != lpuexcptb ) + { + ++v36; + if ( !--v37 ) + goto LABEL_102; + } + v39 = (int)v36 - v120 - 120; + v40 = v39 <= 30; + v41 = (v39 >> 1) - 6; + v42 = v39 >> 1; + if ( !v40 ) + v42 = v41; + if ( v97 < v113 ) + { + v101 = v99; + goto LABEL_123; + } + v101 |= ~v42 < v119 * v113; + v43 = v121; + v113 = v119 * v113 + v42; + v45 = v121[3]; + v44 = v121[2]; + ++v104; + if ( v44 < v45 ) + { +LABEL_124: + v46 = (__int16 *)(v44 + 2); + v43[2] = v46; + goto LABEL_125; + } +LABEL_134: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v46 = (__int16 *)v121[2]; + v45 = v121[3]; +LABEL_125: + if ( v45 <= (unsigned int)v46 ) + v47 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + v47 = *v46; + v48 = v47 == -1; + v49 = 0; + if ( !v48 ) + v49 = v121; + v109 = v48; + v121 = v49; + if ( v114 && v102 != 0 ) + { + v61 = (__int16 *)v102[2]; + if ( (unsigned int)v61 >= v102[3] ) + v62 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v62 = *v61; + v63 = v62 == -1; + v64 = 0; + if ( !v63 ) + v64 = v102; + v65 = v114 && v102 != 0; + v102 = v64; + if ( !v63 ) + v65 = 0; + lpuexcpte = v65; + } + else + { + lpuexcpte = a4 == -1; + } + if ( v109 == lpuexcpte ) + { + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + goto LABEL_72; + } + if ( v121 ) + { + v50 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v50 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v50; + v51 = 0; + if ( lpuexcptb != 0xFFFF ) + v51 = v121; + v121 = v51; + } + else + { + lpuexcptb = -1; + } + } +LABEL_102: + v99 = 0; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + if ( !v129 ) + goto LABEL_73; +LABEL_103: + v38 = 15; + if ( v31 != v130 ) + v38 = v130[0]; + if ( (unsigned int)lpuexcptd + 1 > v38 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v31 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v31) = v104; + v129 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v120 + 8), *(_DWORD *)(v120 + 12), (int)&Block) ) + *a6 = 4; + v31 = (int *)Block; + if ( !v117 && !(v129 | v104) ) + { +LABEL_75: + *a7 = 0; + *a6 = 4; + goto LABEL_76; + } +LABEL_111: + if ( v106 ) + goto LABEL_75; + if ( v101 ) + { + *a7 = -1; + *a6 = 4; + } + else + { + v71 = -v113; + if ( !v98 ) + v71 = v113; + *a7 = v71; + } +LABEL_76: + if ( v99 ) + *a6 |= 2u; + if ( v31 != v130 ) + operator delete(v31); + return v121; +} +// 47AC30: variable 'v93' is possibly undefined +// 50C62C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (0047B040) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + unsigned __int16 a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + _WORD *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + __int16 *v11; // eax + __int16 v12; // ax + bool v13; // zf + _DWORD *v14; // eax + _DWORD *v15; // ebx + unsigned int v16; // eax + unsigned int v17; // edx + __int16 *v18; // eax + __int16 v19; // ax + bool v20; // zf + _DWORD *v21; // eax + int v22; // eax + int v23; // eax + _DWORD *v24; // ecx + unsigned int v25; // eax + unsigned int v26; // edx + __int16 *v27; // eax + __int16 v28; // ax + bool v29; // zf + _DWORD *v30; // eax + int *v31; // eax + bool v33; // al + unsigned __int16 *v34; // eax + _DWORD *v35; // eax + _WORD *v36; // eax + int v37; // edx + unsigned int v38; // edx + int v39; // eax + bool v40; // cc + int v41; // edx + int v42; // eax + _DWORD *v43; // ecx + unsigned int v44; // eax + unsigned int v45; // edx + __int16 *v46; // eax + __int16 v47; // ax + bool v48; // zf + _DWORD *v49; // eax + unsigned __int16 *v50; // eax + _DWORD *v51; // eax + __int16 *v52; // eax + __int16 v53; // ax + bool v54; // zf + _DWORD *v55; // eax + bool v56; // bl + unsigned __int16 *v57; // eax + _DWORD *v58; // eax + size_t v59; // edx + size_t v60; // edx + __int16 *v61; // eax + __int16 v62; // ax + bool v63; // zf + _DWORD *v64; // eax + bool v65; // dl + __int16 *v66; // eax + __int16 v67; // ax + bool v68; // zf + _DWORD *v69; // eax + bool v70; // bl + int v71; // edx + unsigned __int16 *v72; // eax + _DWORD *v73; // eax + _DWORD *v74; // eax + __int16 *v75; // eax + __int16 v76; // ax + bool v77; // zf + _DWORD *v78; // eax + bool v79; // dl + __int16 *v80; // eax + __int16 v81; // ax + bool v82; // zf + _DWORD *v83; // eax + bool v84; // dl + unsigned __int16 *v85; // eax + _DWORD *v86; // edx + __int16 *v87; // eax + __int16 v88; // ax + bool v89; // zf + _DWORD *v90; // eax + bool v91; // dl + char v92; // bl + unsigned int v93; // [esp+8h] [ebp-B0h] + std::locale::_Impl *v94; // [esp+14h] [ebp-A4h] + int v95; // [esp+1Ch] [ebp-9Ch] + int v96; // [esp+20h] [ebp-98h] + int v97; // [esp+24h] [ebp-94h] + bool v98; // [esp+2Dh] [ebp-8Bh] + char v99; // [esp+2Eh] [ebp-8Ah] + int v100; // [esp+30h] [ebp-88h] + char v101; // [esp+30h] [ebp-88h] + _DWORD *v102; // [esp+34h] [ebp-84h] + char v103; // [esp+38h] [ebp-80h] + int v104; // [esp+38h] [ebp-80h] + size_t v105; // [esp+38h] [ebp-80h] + char v106; // [esp+3Dh] [ebp-7Bh] + char v107; // [esp+3Eh] [ebp-7Ah] + char v108; // [esp+3Eh] [ebp-7Ah] + char v109; // [esp+3Eh] [ebp-7Ah] + char v110; // [esp+3Eh] [ebp-7Ah] + char v111; // [esp+40h] [ebp-78h] + char v112; // [esp+40h] [ebp-78h] + unsigned __int16 v113; // [esp+40h] [ebp-78h] + bool v114; // [esp+44h] [ebp-74h] + char v115; // [esp+48h] [ebp-70h] + char v116; // [esp+48h] [ebp-70h] + bool v117; // [esp+48h] [ebp-70h] + int *v118; // [esp+4Ch] [ebp-6Ch] + int v119; // [esp+4Ch] [ebp-6Ch] + int v120; // [esp+50h] [ebp-68h] + _DWORD *v121; // [esp+54h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+58h] [ebp-60h] + bool lpuexcpta; // [esp+58h] [ebp-60h] + unsigned __int16 lpuexcptb; // [esp+58h] [ebp-60h] + char lpuexcptc; // [esp+58h] [ebp-60h] + struct _Unwind_Exception *lpuexcptd; // [esp+58h] [ebp-60h] + char lpuexcpte; // [esp+58h] [ebp-60h] + void *Block; // [esp+98h] [ebp-20h] BYREF + size_t v129; // [esp+9Ch] [ebp-1Ch] + int v130[5]; // [esp+A0h] [ebp-18h] BYREF + + v121 = a1; + v102 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v118 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v120 = *v118; + if ( !*v118 ) + { + v74 = operator new(0xA8u); + v74[1] = 0; + *v74 = &off_51AF70; + v74[2] = 0; + v74[3] = 0; + *((_BYTE *)v74 + 16) = 0; + v74[5] = 0; + v74[6] = 0; + v74[7] = 0; + v74[8] = 0; + v74[9] = 0; + *((_BYTE *)v74 + 164) = 0; + v94 = (std::locale::_Impl *)v74; + std::__numpunct_cache::_M_cache((int)v74, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v94, lpuexcpt, v93); + v120 = *v118; + } + v119 = 8; + v100 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v100 != 64 ) + { + v7 = 10; + if ( v100 == 8 ) + v7 = 16; + v119 = v7; + } + lpuexcpta = a2 == 0xFFFF; + if ( lpuexcpta && a1 != 0 ) + { + v75 = (__int16 *)a1[2]; + if ( (unsigned int)v75 >= a1[3] ) + v76 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v76 = *v75; + v77 = v76 == -1; + v78 = 0; + if ( !v77 ) + v78 = a1; + v79 = lpuexcpta && a1 != 0; + v121 = v78; + if ( !v77 ) + v79 = 0; + v103 = v79; + } + else + { + v103 = a2 == 0xFFFF; + } + v114 = a4 == -1; + if ( v114 && a3 != 0 ) + { + v80 = (__int16 *)a3[2]; + if ( (unsigned int)v80 >= a3[3] ) + v81 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v81 = *v80; + v82 = v81 == -1; + v83 = 0; + if ( !v82 ) + v83 = a3; + v84 = v114 && a3 != 0; + v102 = v83; + if ( !v82 ) + v84 = 0; + v115 = v84; + } + else + { + v115 = a4 == -1; + } + if ( v115 != v103 ) + { + if ( v121 && a2 == 0xFFFF ) + { + v72 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v72 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v72; + v73 = 0; + if ( lpuexcptb != 0xFFFF ) + v73 = v121; + v121 = v73; + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v120 + 16); + v98 = *(_WORD *)(v120 + 112) == lpuexcptb; + if ( *(_WORD *)(v120 + 112) == lpuexcptb || *(_WORD *)(v120 + 114) == lpuexcptb ) + { + if ( (!v8 || *(_WORD *)(v120 + 38) != lpuexcptb) && *(_WORD *)(v120 + 36) != lpuexcptb ) + { + v9 = v121[2]; + v10 = v121[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v11 = (__int16 *)v121[2]; + v10 = v121[3]; + } + else + { + v11 = (__int16 *)(v9 + 2); + v121[2] = v11; + } + if ( (unsigned int)v11 >= v10 ) + v12 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + v12 = *v11; + v13 = v12 == -1; + v14 = 0; + if ( !v13 ) + v14 = v121; + v111 = v13; + v121 = v14; + if ( v114 && v102 != 0 ) + { + v87 = (__int16 *)v102[2]; + if ( (unsigned int)v87 >= v102[3] ) + v88 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v88 = *v87; + v89 = v88 == -1; + v90 = 0; + if ( !v89 ) + v90 = v102; + v91 = v114 && v102 != 0; + v102 = v90; + if ( !v89 ) + v91 = 0; + v116 = v91; + } + else + { + v116 = a4 == -1; + } + if ( v111 == v116 ) + { + v106 = 1; + v104 = 0; + v117 = 0; + goto LABEL_49; + } + if ( v121 ) + { + v85 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v85 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v85; + v86 = 0; + if ( lpuexcptb != 0xFFFF ) + v86 = v121; + v8 = *(_BYTE *)(v120 + 16); + v121 = v86; + } + else + { + lpuexcptb = -1; + v8 = *(_BYTE *)(v120 + 16); + } + } + } + else + { + v98 = 0; + } + v104 = 0; + v117 = 0; + while ( 1 ) + { + if ( v8 && *(_WORD *)(v120 + 38) == lpuexcptb || *(_WORD *)(v120 + 36) == lpuexcptb ) + { +LABEL_178: + v106 = 0; + goto LABEL_49; + } + if ( *(_WORD *)(v120 + 120) != lpuexcptb ) + break; + v33 = v119 == 10 || !v117; + if ( !v33 ) + goto LABEL_36; + v117 = v100 == 0 || v119 == 8; + if ( !v117 ) + { + ++v104; + v117 = v33; + goto LABEL_40; + } + v15 = v121; + v104 = 0; + v119 = 8; + v16 = v121[2]; + v17 = v121[3]; + if ( v16 < v17 ) + { +LABEL_41: + v18 = (__int16 *)(v16 + 2); + v15[2] = v18; + if ( v17 > (unsigned int)v18 ) + goto LABEL_42; + goto LABEL_85; + } +LABEL_84: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v18 = (__int16 *)v121[2]; + if ( v121[3] > (unsigned int)v18 ) + { +LABEL_42: + v19 = *v18; + goto LABEL_43; + } +LABEL_85: + v19 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); +LABEL_43: + v20 = v19 == -1; + v21 = 0; + if ( !v20 ) + v21 = v121; + v107 = v20; + v121 = v21; + if ( v114 && v102 != 0 ) + { + v52 = (__int16 *)v102[2]; + if ( (unsigned int)v52 >= v102[3] ) + v53 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v53 = *v52; + v54 = v53 == -1; + v55 = 0; + if ( !v54 ) + v55 = v102; + v56 = v114 && v102 != 0; + v102 = v55; + if ( !v54 ) + v56 = 0; + v112 = v56; + } + else + { + v112 = a4 == -1; + } + if ( v112 == v107 ) + { + v106 = 1; + goto LABEL_49; + } + lpuexcptb = -1; + if ( v121 ) + { + v34 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v34 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v34; + v35 = 0; + if ( lpuexcptb != 0xFFFF ) + v35 = v121; + v121 = v35; + } + if ( !v117 ) + { + v106 = 0; + goto LABEL_49; + } + v8 = *(_BYTE *)(v120 + 16); + } + if ( !v117 ) + goto LABEL_178; +LABEL_36: + if ( *(_WORD *)(v120 + 116) != lpuexcptb && *(_WORD *)(v120 + 118) != lpuexcptb ) + { + v106 = 0; + v117 = 1; + goto LABEL_49; + } + if ( v100 != 0 && v119 != 16 ) + { + v106 = 0; + v95 = v119; + v96 = v119; + v117 = 1; + goto LABEL_52; + } + v104 = 0; + v117 = 0; + v119 = 16; +LABEL_40: + v15 = v121; + v16 = v121[2]; + v17 = v121[3]; + if ( v16 < v17 ) + goto LABEL_41; + goto LABEL_84; + } + v98 = 0; + lpuexcptb = 0; + v106 = 1; + v104 = 0; + v117 = 0; +LABEL_49: + v22 = 22; + if ( v119 != 16 ) + v22 = v119; + v95 = v22; + v96 = v22; +LABEL_52: + v129 = 0; + Block = v130; + LOBYTE(v130[0]) = 0; + if ( *(_BYTE *)(v120 + 16) ) + std::string::reserve(&Block, 0x20u); + v97 = 0xFFFF / v119; + v99 = *(_BYTE *)(v120 + 164); + if ( !v99 ) + { + if ( !v106 ) + { + v101 = 0; + v113 = 0; + while ( v96 > 10 ) + { + if ( (unsigned __int16)(lpuexcptb - 48) <= 9u ) + goto LABEL_60; + if ( (unsigned __int16)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int16)(lpuexcptb - 65) > 5u ) + goto LABEL_102; + v23 = lpuexcptb - 55; + goto LABEL_61; + } + v23 = lpuexcptb - 87; + if ( (unsigned __int16)v97 < v113 ) + { +LABEL_62: + v24 = v121; + v101 = 1; + v25 = v121[2]; + v26 = v121[3]; + if ( v25 < v26 ) + goto LABEL_63; + goto LABEL_118; + } +LABEL_117: + v101 |= (unsigned __int16)(v119 * v113) > 0xFFFF - v23; + v24 = v121; + v113 = v119 * v113 + v23; + v26 = v121[3]; + v25 = v121[2]; + ++v104; + if ( v25 < v26 ) + { +LABEL_63: + v27 = (__int16 *)(v25 + 2); + v24[2] = v27; + goto LABEL_64; + } +LABEL_118: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v27 = (__int16 *)v121[2]; + v26 = v121[3]; +LABEL_64: + if ( v26 <= (unsigned int)v27 ) + v28 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + v28 = *v27; + v29 = v28 == -1; + v30 = 0; + if ( !v29 ) + v30 = v121; + v108 = v29; + v121 = v30; + if ( v114 && v102 != 0 ) + { + v66 = (__int16 *)v102[2]; + if ( (unsigned int)v66 >= v102[3] ) + v67 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v67 = *v66; + v68 = v67 == -1; + v69 = 0; + if ( !v68 ) + v69 = v102; + v70 = v114 && v102 != 0; + v102 = v69; + if ( !v68 ) + v70 = 0; + lpuexcptc = v70; + } + else + { + lpuexcptc = a4 == -1; + } + if ( v108 == lpuexcptc ) + { + v99 = 1; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + goto LABEL_72; + } + if ( v121 ) + { + v57 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v57 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v57; + v58 = 0; + if ( lpuexcptb != 0xFFFF ) + v58 = v121; + v121 = v58; + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 0x2Fu || (unsigned __int16)(v96 + 48) <= lpuexcptb ) + goto LABEL_102; +LABEL_60: + v23 = lpuexcptb - 48; +LABEL_61: + if ( (unsigned __int16)v97 < v113 ) + goto LABEL_62; + goto LABEL_117; + } + v92 = v106; + v101 = 0; + v106 = 0; + v99 = v92; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + v113 = 0; + goto LABEL_72; + } + if ( v106 ) + { + v101 = 0; + v113 = 0; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + v99 = v106; + v106 = 0; +LABEL_72: + if ( lpuexcptd ) + goto LABEL_103; +LABEL_73: + if ( v117 || v104 ) + goto LABEL_111; + goto LABEL_75; + } + v101 = 0; + v113 = 0; + while ( 1 ) + { + if ( *(_BYTE *)(v120 + 16) && *(_WORD *)(v120 + 38) == lpuexcptb ) + { + v31 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v129; + if ( !v104 ) + { + v99 = 0; + v106 = *(_BYTE *)(v120 + 16); + goto LABEL_72; + } + v110 = v104; + v59 = 15; + if ( Block != v130 ) + v59 = v130[0]; + v105 = v129 + 1; + if ( v129 + 1 > v59 ) + { + std::string::_M_mutate((int)&Block, v129, 0, 0, 1u); + v31 = (int *)Block; + } + v60 = v105; + v104 = 0; + *((_BYTE *)lpuexcptd + (_DWORD)v31) = v110; + v129 = v60; + *((_BYTE *)Block + v60) = 0; +LABEL_123: + v43 = v121; + v44 = v121[2]; + v45 = v121[3]; + if ( v44 < v45 ) + goto LABEL_124; + goto LABEL_134; + } + if ( lpuexcptb == *(_WORD *)(v120 + 36) ) + break; + v36 = (_WORD *)(v120 + 120); + v37 = v95; + while ( *v36 != lpuexcptb ) + { + ++v36; + if ( !--v37 ) + goto LABEL_102; + } + v39 = (int)v36 - v120 - 120; + v40 = v39 <= 30; + v41 = (v39 >> 1) - 6; + v42 = v39 >> 1; + if ( !v40 ) + v42 = v41; + if ( (unsigned __int16)v97 < v113 ) + { + v101 = v99; + goto LABEL_123; + } + v101 |= (unsigned __int16)(v119 * v113) > 0xFFFF - v42; + v43 = v121; + v113 = v119 * v113 + v42; + v45 = v121[3]; + v44 = v121[2]; + ++v104; + if ( v44 < v45 ) + { +LABEL_124: + v46 = (__int16 *)(v44 + 2); + v43[2] = v46; + goto LABEL_125; + } +LABEL_134: + (*(void (__fastcall **)(_DWORD *))(*v121 + 40))(v121); + v46 = (__int16 *)v121[2]; + v45 = v121[3]; +LABEL_125: + if ( v45 <= (unsigned int)v46 ) + v47 = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + v47 = *v46; + v48 = v47 == -1; + v49 = 0; + if ( !v48 ) + v49 = v121; + v109 = v48; + v121 = v49; + if ( v114 && v102 != 0 ) + { + v61 = (__int16 *)v102[2]; + if ( (unsigned int)v61 >= v102[3] ) + v62 = (*(int (__fastcall **)(_DWORD *))(*v102 + 36))(v102); + else + v62 = *v61; + v63 = v62 == -1; + v64 = 0; + if ( !v63 ) + v64 = v102; + v65 = v114 && v102 != 0; + v102 = v64; + if ( !v63 ) + v65 = 0; + lpuexcpte = v65; + } + else + { + lpuexcpte = a4 == -1; + } + if ( v109 == lpuexcpte ) + { + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + goto LABEL_72; + } + if ( v121 ) + { + v50 = (unsigned __int16 *)v121[2]; + if ( (unsigned int)v50 >= v121[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v121 + 36))(v121); + else + lpuexcptb = *v50; + v51 = 0; + if ( lpuexcptb != 0xFFFF ) + v51 = v121; + v121 = v51; + } + else + { + lpuexcptb = -1; + } + } +LABEL_102: + v99 = 0; + lpuexcptd = (struct _Unwind_Exception *)v129; + v31 = (int *)Block; + if ( !v129 ) + goto LABEL_73; +LABEL_103: + v38 = 15; + if ( v31 != v130 ) + v38 = v130[0]; + if ( (unsigned int)lpuexcptd + 1 > v38 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v31 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v31) = v104; + v129 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v120 + 8), *(_DWORD *)(v120 + 12), (int)&Block) ) + *a6 = 4; + v31 = (int *)Block; + if ( !v117 && !(v129 | v104) ) + { +LABEL_75: + *a7 = 0; + *a6 = 4; + goto LABEL_76; + } +LABEL_111: + if ( v106 ) + goto LABEL_75; + if ( v101 ) + { + *a7 = -1; + *a6 = 4; + } + else + { + v71 = -v113; + if ( !v98 ) + LOWORD(v71) = v113; + *a7 = v71; + } +LABEL_76: + if ( v99 ) + *a6 |= 2u; + if ( v31 != v130 ) + operator delete(v31); + return v121; +} +// 47BC40: variable 'v93' is possibly undefined +// 50C62C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (0047C050) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + unsigned __int16 a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + int *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + __int16 *v11; // eax + __int16 v12; // ax + bool v13; // zf + _DWORD *v14; // eax + _DWORD *v15; // edi + unsigned int v16; // eax + unsigned int v17; // edx + __int16 *v18; // eax + __int16 v19; // ax + bool v20; // zf + _DWORD *v21; // eax + int v22; // eax + unsigned __int64 v23; // kr00_8 + int v24; // esi + _DWORD *v25; // ecx + unsigned int v26; // eax + unsigned int v27; // edx + __int16 *v28; // eax + __int16 v29; // ax + bool v30; // zf + _DWORD *v31; // eax + int *v32; // eax + bool v34; // al + unsigned __int16 *v35; // eax + _DWORD *v36; // eax + _WORD *v37; // eax + int v38; // edx + unsigned int v39; // edx + int v40; // ecx + int v41; // ebx + int v42; // eax + int v43; // esi + _DWORD *v44; // ebx + unsigned int v45; // eax + unsigned int v46; // edx + __int16 *v47; // eax + __int16 v48; // ax + bool v49; // zf + _DWORD *v50; // eax + unsigned __int16 *v51; // eax + _DWORD *v52; // eax + __int16 *v53; // eax + __int16 v54; // ax + bool v55; // zf + _DWORD *v56; // eax + bool v57; // si + unsigned __int16 *v58; // eax + _DWORD *v59; // eax + char v60; // bl + size_t v61; // edx + size_t v62; // ebx + __int16 *v63; // eax + __int16 v64; // ax + bool v65; // zf + _DWORD *v66; // eax + bool v67; // cl + __int16 *v68; // eax + __int16 v69; // ax + bool v70; // zf + _DWORD *v71; // eax + bool v72; // bl + unsigned __int16 *v73; // eax + _DWORD *v74; // eax + _DWORD *v75; // eax + __int16 *v76; // eax + __int16 v77; // ax + bool v78; // zf + _DWORD *v79; // eax + bool v80; // si + __int16 *v81; // eax + __int16 v82; // ax + bool v83; // zf + _DWORD *v84; // eax + bool v85; // si + unsigned __int16 *v86; // eax + _DWORD *v87; // edx + __int16 *v88; // eax + __int16 v89; // ax + bool v90; // zf + _DWORD *v91; // eax + bool v92; // bl + char v93; // bl + unsigned int v94; // [esp+8h] [ebp-D0h] + std::locale::_Impl *v95; // [esp+14h] [ebp-C4h] + int v96; // [esp+1Ch] [ebp-BCh] + unsigned __int64 v97; // [esp+20h] [ebp-B8h] + int v98; // [esp+28h] [ebp-B0h] + bool v99; // [esp+39h] [ebp-9Fh] + char v100; // [esp+3Ah] [ebp-9Eh] + _DWORD *v101; // [esp+3Ch] [ebp-9Ch] + int v102; // [esp+40h] [ebp-98h] + __int64 v103; // [esp+40h] [ebp-98h] + int v104; // [esp+48h] [ebp-90h] + size_t v105; // [esp+48h] [ebp-90h] + char v106; // [esp+4Ch] [ebp-8Ch] + char v107; // [esp+4Dh] [ebp-8Bh] + char v108; // [esp+4Dh] [ebp-8Bh] + char v109; // [esp+4Dh] [ebp-8Bh] + char v110; // [esp+4Eh] [ebp-8Ah] + char v111; // [esp+4Eh] [ebp-8Ah] + char v112; // [esp+4Eh] [ebp-8Ah] + char v113; // [esp+4Eh] [ebp-8Ah] + bool v114; // [esp+50h] [ebp-88h] + char v115; // [esp+54h] [ebp-84h] + char v116; // [esp+54h] [ebp-84h] + bool v117; // [esp+54h] [ebp-84h] + int *v118; // [esp+58h] [ebp-80h] + int v119; // [esp+58h] [ebp-80h] + unsigned __int64 v120; // [esp+58h] [ebp-80h] + int v121; // [esp+60h] [ebp-78h] + _DWORD *v122; // [esp+64h] [ebp-74h] + struct _Unwind_Exception *lpuexcpt; // [esp+68h] [ebp-70h] + bool lpuexcpta; // [esp+68h] [ebp-70h] + unsigned __int16 lpuexcptb; // [esp+68h] [ebp-70h] + char lpuexcptc; // [esp+68h] [ebp-70h] + struct _Unwind_Exception *lpuexcptd; // [esp+68h] [ebp-70h] + char lpuexcpte; // [esp+68h] [ebp-70h] + void *Block; // [esp+A8h] [ebp-30h] BYREF + size_t v130; // [esp+ACh] [ebp-2Ch] + int v131[10]; // [esp+B0h] [ebp-28h] BYREF + + v122 = a1; + v101 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v118 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v121 = *v118; + if ( !*v118 ) + { + v75 = operator new(0xA8u); + v75[1] = 0; + *v75 = &off_51AF70; + v75[2] = 0; + v75[3] = 0; + *((_BYTE *)v75 + 16) = 0; + v75[5] = 0; + v75[6] = 0; + v75[7] = 0; + v75[8] = 0; + v75[9] = 0; + *((_BYTE *)v75 + 164) = 0; + v95 = (std::locale::_Impl *)v75; + std::__numpunct_cache::_M_cache((int)v75, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v95, lpuexcpt, v94); + v121 = *v118; + } + v119 = 8; + v102 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v102 != 64 ) + { + v7 = 10; + if ( v102 == 8 ) + v7 = 16; + v119 = v7; + } + lpuexcpta = a2 == 0xFFFF; + if ( lpuexcpta && a1 != 0 ) + { + v76 = (__int16 *)a1[2]; + if ( (unsigned int)v76 >= a1[3] ) + v77 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v77 = *v76; + v78 = v77 == -1; + v79 = 0; + if ( !v78 ) + v79 = a1; + v80 = lpuexcpta && a1 != 0; + v122 = v79; + if ( !v78 ) + v80 = 0; + v107 = v80; + } + else + { + v107 = a2 == 0xFFFF; + } + v114 = a4 == -1; + if ( v114 && a3 != 0 ) + { + v81 = (__int16 *)a3[2]; + if ( (unsigned int)v81 >= a3[3] ) + v82 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v82 = *v81; + v83 = v82 == -1; + v84 = 0; + if ( !v83 ) + v84 = a3; + v85 = v114 && a3 != 0; + v101 = v84; + if ( !v83 ) + v85 = 0; + v115 = v85; + } + else + { + v115 = a4 == -1; + } + if ( v115 != v107 ) + { + if ( v122 && a2 == 0xFFFF ) + { + v73 = (unsigned __int16 *)v122[2]; + if ( (unsigned int)v73 >= v122[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + lpuexcptb = *v73; + v74 = 0; + if ( lpuexcptb != 0xFFFF ) + v74 = v122; + v122 = v74; + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v121 + 16); + v99 = *(_WORD *)(v121 + 112) == lpuexcptb; + if ( *(_WORD *)(v121 + 112) == lpuexcptb || *(_WORD *)(v121 + 114) == lpuexcptb ) + { + if ( (!v8 || *(_WORD *)(v121 + 38) != lpuexcptb) && *(_WORD *)(v121 + 36) != lpuexcptb ) + { + v9 = v122[2]; + v10 = v122[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v11 = (__int16 *)v122[2]; + v10 = v122[3]; + } + else + { + v11 = (__int16 *)(v9 + 2); + v122[2] = v11; + } + if ( (unsigned int)v11 >= v10 ) + v12 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + v12 = *v11; + v13 = v12 == -1; + v14 = 0; + if ( !v13 ) + v14 = v122; + v110 = v13; + v122 = v14; + if ( v114 && v101 != 0 ) + { + v88 = (__int16 *)v101[2]; + if ( (unsigned int)v88 >= v101[3] ) + v89 = (*(int (__fastcall **)(_DWORD *))(*v101 + 36))(v101); + else + v89 = *v88; + v90 = v89 == -1; + v91 = 0; + if ( !v90 ) + v91 = v101; + v92 = v114 && v101 != 0; + v101 = v91; + if ( !v90 ) + v92 = 0; + v116 = v92; + } + else + { + v116 = a4 == -1; + } + if ( v110 == v116 ) + { + v106 = 1; + v104 = 0; + v117 = 0; + goto LABEL_49; + } + if ( v122 ) + { + v86 = (unsigned __int16 *)v122[2]; + if ( (unsigned int)v86 >= v122[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + lpuexcptb = *v86; + v87 = 0; + if ( lpuexcptb != 0xFFFF ) + v87 = v122; + v8 = *(_BYTE *)(v121 + 16); + v122 = v87; + } + else + { + lpuexcptb = -1; + v8 = *(_BYTE *)(v121 + 16); + } + } + } + else + { + v99 = 0; + } + v117 = 0; + v104 = 0; + while ( 1 ) + { + if ( v8 && *(_WORD *)(v121 + 38) == lpuexcptb || *(_WORD *)(v121 + 36) == lpuexcptb ) + { +LABEL_182: + v106 = 0; + goto LABEL_49; + } + if ( *(_WORD *)(v121 + 120) != lpuexcptb ) + break; + v34 = v119 == 10 || !v117; + if ( !v34 ) + goto LABEL_36; + v117 = v102 == 0 || v119 == 8; + if ( !v117 ) + { + ++v104; + v117 = v34; + goto LABEL_40; + } + v15 = v122; + v119 = 8; + v104 = 0; + v16 = v122[2]; + v17 = v122[3]; + if ( v16 < v17 ) + { +LABEL_41: + v18 = (__int16 *)(v16 + 2); + v15[2] = v18; + if ( (unsigned int)v18 < v17 ) + goto LABEL_42; + goto LABEL_87; + } +LABEL_86: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v18 = (__int16 *)v122[2]; + if ( (unsigned int)v18 < v122[3] ) + { +LABEL_42: + v19 = *v18; + goto LABEL_43; + } +LABEL_87: + v19 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); +LABEL_43: + v20 = v19 == -1; + v21 = 0; + if ( !v20 ) + v21 = v122; + v108 = v20; + v122 = v21; + if ( v114 && v101 != 0 ) + { + v53 = (__int16 *)v101[2]; + if ( (unsigned int)v53 >= v101[3] ) + v54 = (*(int (__fastcall **)(_DWORD *))(*v101 + 36))(v101); + else + v54 = *v53; + v55 = v54 == -1; + v56 = 0; + if ( !v55 ) + v56 = v101; + v57 = v114 && v101 != 0; + v101 = v56; + if ( !v55 ) + v57 = 0; + v111 = v57; + } + else + { + v111 = a4 == -1; + } + if ( v111 == v108 ) + { + v106 = 1; + goto LABEL_49; + } + lpuexcptb = -1; + if ( v122 ) + { + v35 = (unsigned __int16 *)v122[2]; + if ( (unsigned int)v35 >= v122[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + lpuexcptb = *v35; + v36 = 0; + if ( lpuexcptb != 0xFFFF ) + v36 = v122; + v122 = v36; + } + if ( !v117 ) + { + v106 = 0; + goto LABEL_49; + } + v8 = *(_BYTE *)(v121 + 16); + } + if ( !v117 ) + goto LABEL_182; +LABEL_36: + if ( *(_WORD *)(v121 + 116) != lpuexcptb && *(_WORD *)(v121 + 118) != lpuexcptb ) + { + v106 = 0; + v117 = 1; + goto LABEL_49; + } + if ( v102 != 0 && v119 != 16 ) + { + v106 = 0; + v96 = v119; + v98 = v119; + v117 = 1; + goto LABEL_52; + } + v104 = 0; + v117 = 0; + v119 = 16; +LABEL_40: + v15 = v122; + v16 = v122[2]; + v17 = v122[3]; + if ( v16 < v17 ) + goto LABEL_41; + goto LABEL_86; + } + v99 = 0; + lpuexcptb = 0; + v106 = 1; + v104 = 0; + v117 = 0; +LABEL_49: + v22 = 22; + if ( v119 != 16 ) + v22 = v119; + v96 = v22; + v98 = v22; +LABEL_52: + v130 = 0; + Block = v131; + LOBYTE(v131[0]) = 0; + if ( *(_BYTE *)(v121 + 16) ) + std::string::reserve(&Block, 0x20u); + v97 = 0x8000000000000000LL; + if ( !v99 ) + v97 = 0x7FFFFFFFFFFFFFFFLL; + v103 = v119; + v23 = v97 / v119; + v100 = *(_BYTE *)(v121 + 164); + if ( !v100 ) + { + if ( !v106 ) + { + v109 = 0; + v120 = 0LL; + while ( v98 > 10 ) + { + if ( (unsigned __int16)(lpuexcptb - 48) <= 9u ) + goto LABEL_62; + if ( (unsigned __int16)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int16)(lpuexcptb - 65) > 5u ) + goto LABEL_104; + v24 = lpuexcptb - 55; + } + else + { + v24 = lpuexcptb - 87; + } +LABEL_63: + if ( v23 >= v120 ) + { + v109 |= v97 - v24 < v103 * v120; + v25 = v122; + v120 = v103 * v120 + v24; + v26 = v122[2]; + v27 = v122[3]; + ++v104; + if ( v26 < v27 ) + { +LABEL_65: + v28 = (__int16 *)(v26 + 2); + v25[2] = v28; + goto LABEL_66; + } + } + else + { + v25 = v122; + v109 = 1; + v26 = v122[2]; + v27 = v122[3]; + if ( v26 < v27 ) + goto LABEL_65; + } + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v28 = (__int16 *)v122[2]; + v27 = v122[3]; +LABEL_66: + if ( v27 <= (unsigned int)v28 ) + v29 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + v29 = *v28; + v30 = v29 == -1; + v31 = 0; + if ( !v30 ) + v31 = v122; + v112 = v30; + v122 = v31; + if ( v114 && v101 != 0 ) + { + v68 = (__int16 *)v101[2]; + if ( (unsigned int)v68 >= v101[3] ) + v69 = (*(int (__fastcall **)(_DWORD *))(*v101 + 36))(v101); + else + v69 = *v68; + v70 = v69 == -1; + v71 = 0; + if ( !v70 ) + v71 = v101; + v72 = v114 && v101 != 0; + v101 = v71; + if ( !v70 ) + v72 = 0; + lpuexcptc = v72; + } + else + { + lpuexcptc = a4 == -1; + } + if ( v112 == lpuexcptc ) + { + v100 = 1; + lpuexcptd = (struct _Unwind_Exception *)v130; + v32 = (int *)Block; + goto LABEL_74; + } + if ( v122 ) + { + v58 = (unsigned __int16 *)v122[2]; + if ( (unsigned int)v58 >= v122[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + lpuexcptb = *v58; + v59 = 0; + if ( lpuexcptb != 0xFFFF ) + v59 = v122; + v122 = v59; + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 0x2Fu || (unsigned __int16)(v98 + 48) <= lpuexcptb ) + goto LABEL_104; +LABEL_62: + v24 = lpuexcptb - 48; + goto LABEL_63; + } + v93 = v106; + v109 = 0; + v106 = 0; + lpuexcptd = (struct _Unwind_Exception *)v130; + v32 = (int *)Block; + v100 = v93; + v120 = 0LL; + goto LABEL_74; + } + if ( v106 ) + { + v120 = 0LL; + lpuexcptd = (struct _Unwind_Exception *)v130; + v32 = (int *)Block; + v100 = v106; + v109 = 0; + v106 = 0; +LABEL_74: + if ( lpuexcptd ) + goto LABEL_105; +LABEL_75: + if ( v117 || v104 ) + goto LABEL_113; + goto LABEL_77; + } + v109 = 0; + v120 = 0LL; + while ( 1 ) + { + if ( *(_BYTE *)(v121 + 16) && *(_WORD *)(v121 + 38) == lpuexcptb ) + { + v32 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v130; + if ( !v104 ) + { + v100 = 0; + v106 = *(_BYTE *)(v121 + 16); + goto LABEL_74; + } + v60 = v104; + v61 = 15; + if ( Block != v131 ) + v61 = v131[0]; + v105 = v130 + 1; + if ( v130 + 1 > v61 ) + { + std::string::_M_mutate((int)&Block, v130, 0, 0, 1u); + v32 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v32) = v60; + v62 = v105; + v104 = 0; + v130 = v62; + *((_BYTE *)Block + v62) = 0; +LABEL_127: + v44 = v122; + v45 = v122[2]; + v46 = v122[3]; + if ( v45 < v46 ) + goto LABEL_128; + goto LABEL_138; + } + if ( lpuexcptb == *(_WORD *)(v121 + 36) ) + break; + v37 = (_WORD *)(v121 + 120); + v38 = v96; + while ( *v37 != lpuexcptb ) + { + ++v37; + if ( !--v38 ) + goto LABEL_104; + } + v42 = (int)v37 - v121 - 120; + v43 = (v42 >> 1) - 6; + if ( v42 <= 30 ) + v43 = v42 >> 1; + if ( v23 < v120 ) + { + v109 = v100; + goto LABEL_127; + } + v44 = v122; + v109 |= v97 - v43 < v103 * v120; + v45 = v122[2]; + v46 = v122[3]; + v120 = v103 * v120 + v43; + ++v104; + if ( v45 < v46 ) + { +LABEL_128: + v47 = (__int16 *)(v45 + 2); + v44[2] = v47; + goto LABEL_129; + } +LABEL_138: + (*(void (__fastcall **)(_DWORD *))(*v122 + 40))(v122); + v47 = (__int16 *)v122[2]; + v46 = v122[3]; +LABEL_129: + if ( v46 <= (unsigned int)v47 ) + v48 = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + v48 = *v47; + v49 = v48 == -1; + v50 = 0; + if ( !v49 ) + v50 = v122; + v113 = v49; + v122 = v50; + if ( v114 && v101 != 0 ) + { + v63 = (__int16 *)v101[2]; + if ( (unsigned int)v63 >= v101[3] ) + v64 = (*(int (__fastcall **)(_DWORD *))(*v101 + 36))(v101); + else + v64 = *v63; + v65 = v64 == -1; + v66 = 0; + if ( !v65 ) + v66 = v101; + v67 = v114 && v101 != 0; + v101 = v66; + if ( !v65 ) + v67 = 0; + lpuexcpte = v67; + } + else + { + lpuexcpte = a4 == -1; + } + if ( lpuexcpte == v113 ) + { + lpuexcptd = (struct _Unwind_Exception *)v130; + v32 = (int *)Block; + goto LABEL_74; + } + if ( v122 ) + { + v51 = (unsigned __int16 *)v122[2]; + if ( (unsigned int)v51 >= v122[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v122 + 36))(v122); + else + lpuexcptb = *v51; + v52 = 0; + if ( lpuexcptb != 0xFFFF ) + v52 = v122; + v122 = v52; + } + else + { + lpuexcptb = -1; + } + } +LABEL_104: + v100 = 0; + lpuexcptd = (struct _Unwind_Exception *)v130; + v32 = (int *)Block; + if ( !v130 ) + goto LABEL_75; +LABEL_105: + v39 = 15; + if ( v32 != v131 ) + v39 = v131[0]; + if ( (unsigned int)lpuexcptd + 1 > v39 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v32 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v32) = v104; + v130 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v121 + 8), *(_DWORD *)(v121 + 12), (int)&Block) ) + *a6 = 4; + v32 = (int *)Block; + if ( !v117 && !(v130 | v104) ) + { +LABEL_77: + *a7 = 0; + a7[1] = 0; + *a6 = 4; + goto LABEL_78; + } +LABEL_113: + if ( v106 ) + goto LABEL_77; + if ( v109 ) + { + v40 = 0; + v41 = 0x80000000; + if ( !v99 ) + { + v40 = -1; + v41 = 0x7FFFFFFF; + } + *a7 = v40; + a7[1] = v41; + *a6 = 4; + } + else + { + if ( v99 ) + v120 = -(__int64)v120; + *(_QWORD *)a7 = v120; + } +LABEL_78: + if ( v100 ) + *a6 |= 2u; + if ( v32 != v131 ) + operator delete(v32); + return v122; +} +// 47CE72: variable 'v94' is possibly undefined +// 50C62C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (0047D2F0) -------------------------------------------------------- +_DWORD *__stdcall std::num_get>::_M_extract_int[abi:cxx11]( + _DWORD *a1, + unsigned __int16 a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + int v7; // eax + char v8; // al + unsigned int v9; // eax + unsigned int v10; // edx + __int16 *v11; // eax + __int16 v12; // ax + bool v13; // zf + _DWORD *v14; // eax + _DWORD *v15; // edi + unsigned int v16; // eax + unsigned int v17; // edx + __int16 *v18; // eax + __int16 v19; // ax + bool v20; // zf + _DWORD *v21; // eax + int v22; // eax + unsigned __int64 v23; // kr08_8 + int v24; // esi + _DWORD *v25; // ecx + unsigned int v26; // eax + unsigned int v27; // edx + __int16 *v28; // eax + __int16 v29; // ax + bool v30; // zf + _DWORD *v31; // eax + int *v32; // eax + bool v34; // al + unsigned __int16 *v35; // eax + _DWORD *v36; // eax + _WORD *v37; // eax + int v38; // edx + unsigned int v39; // edx + int v40; // eax + int v41; // esi + _DWORD *v42; // ebx + unsigned int v43; // eax + unsigned int v44; // edx + __int16 *v45; // eax + __int16 v46; // ax + bool v47; // zf + _DWORD *v48; // eax + unsigned __int16 *v49; // eax + _DWORD *v50; // eax + __int16 *v51; // eax + __int16 v52; // ax + bool v53; // zf + _DWORD *v54; // eax + bool v55; // bl + unsigned __int16 *v56; // eax + _DWORD *v57; // eax + size_t v58; // edx + size_t v59; // edi + __int16 *v60; // eax + __int16 v61; // ax + bool v62; // zf + _DWORD *v63; // eax + bool v64; // cl + __int16 *v65; // eax + __int16 v66; // ax + bool v67; // zf + _DWORD *v68; // eax + bool v69; // bl + unsigned __int16 *v70; // eax + _DWORD *v71; // eax + _DWORD *v72; // eax + __int16 *v73; // eax + __int16 v74; // ax + bool v75; // zf + _DWORD *v76; // eax + bool v77; // bl + __int16 *v78; // eax + __int16 v79; // ax + bool v80; // zf + _DWORD *v81; // eax + bool v82; // cl + unsigned __int16 *v83; // eax + _DWORD *v84; // edx + __int16 *v85; // eax + __int16 v86; // ax + bool v87; // zf + _DWORD *v88; // eax + bool v89; // si + char v90; // bl + unsigned int v91; // [esp+8h] [ebp-D0h] + std::locale::_Impl *v92; // [esp+18h] [ebp-C0h] + int v93; // [esp+20h] [ebp-B8h] + int v94; // [esp+24h] [ebp-B4h] + bool v95; // [esp+35h] [ebp-A3h] + char v96; // [esp+36h] [ebp-A2h] + int v97; // [esp+38h] [ebp-A0h] + __int64 v98; // [esp+38h] [ebp-A0h] + _DWORD *v99; // [esp+40h] [ebp-98h] + int v100; // [esp+44h] [ebp-94h] + size_t v101; // [esp+44h] [ebp-94h] + char v102; // [esp+48h] [ebp-90h] + char v103; // [esp+49h] [ebp-8Fh] + char v104; // [esp+49h] [ebp-8Fh] + char v105; // [esp+49h] [ebp-8Fh] + char v106; // [esp+4Ah] [ebp-8Eh] + char v107; // [esp+4Ah] [ebp-8Eh] + char v108; // [esp+4Ah] [ebp-8Eh] + char v109; // [esp+4Ah] [ebp-8Eh] + char v110; // [esp+4Ah] [ebp-8Eh] + bool v111; // [esp+4Ch] [ebp-8Ch] + int *v112; // [esp+50h] [ebp-88h] + int v113; // [esp+50h] [ebp-88h] + unsigned __int64 v114; // [esp+50h] [ebp-88h] + char v115; // [esp+58h] [ebp-80h] + char v116; // [esp+58h] [ebp-80h] + bool v117; // [esp+58h] [ebp-80h] + int v118; // [esp+5Ch] [ebp-7Ch] + struct _Unwind_Exception *lpuexcpt; // [esp+60h] [ebp-78h] + bool lpuexcpta; // [esp+60h] [ebp-78h] + unsigned __int16 lpuexcptb; // [esp+60h] [ebp-78h] + char lpuexcptc; // [esp+60h] [ebp-78h] + struct _Unwind_Exception *lpuexcptd; // [esp+60h] [ebp-78h] + char lpuexcpte; // [esp+60h] [ebp-78h] + _DWORD *v125; // [esp+68h] [ebp-70h] + void *Block; // [esp+A8h] [ebp-30h] BYREF + size_t v127; // [esp+ACh] [ebp-2Ch] + int v128[10]; // [esp+B0h] [ebp-28h] BYREF + + v125 = a1; + v99 = a3; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v112 = (int *)(*(_DWORD *)(*(_DWORD *)(a5 + 108) + 12) + 4 * (_DWORD)lpuexcpt); + v118 = *v112; + if ( !*v112 ) + { + v72 = operator new(0xA8u); + v72[1] = 0; + *v72 = &off_51AF70; + v72[2] = 0; + v72[3] = 0; + *((_BYTE *)v72 + 16) = 0; + v72[5] = 0; + v72[6] = 0; + v72[7] = 0; + v72[8] = 0; + v72[9] = 0; + *((_BYTE *)v72 + 164) = 0; + v92 = (std::locale::_Impl *)v72; + std::__numpunct_cache::_M_cache((int)v72, a5 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a5 + 108), v92, lpuexcpt, v91); + v118 = *v112; + } + v113 = 8; + v97 = *(_DWORD *)(a5 + 12) & 0x4A; + if ( v97 != 64 ) + { + v7 = 10; + if ( v97 == 8 ) + v7 = 16; + v113 = v7; + } + lpuexcpta = a2 == 0xFFFF; + if ( lpuexcpta && a1 != 0 ) + { + v73 = (__int16 *)a1[2]; + if ( (unsigned int)v73 >= a1[3] ) + v74 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v74 = *v73; + v75 = v74 == -1; + v76 = 0; + if ( !v75 ) + v76 = a1; + v77 = lpuexcpta && a1 != 0; + v125 = v76; + if ( !v75 ) + v77 = 0; + v103 = v77; + } + else + { + v103 = a2 == 0xFFFF; + } + v111 = a4 == -1; + if ( v111 && a3 != 0 ) + { + v78 = (__int16 *)a3[2]; + if ( (unsigned int)v78 >= a3[3] ) + v79 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v79 = *v78; + v80 = v79 == -1; + v81 = 0; + if ( !v80 ) + v81 = a3; + v82 = v111 && a3 != 0; + v99 = v81; + if ( !v80 ) + v82 = 0; + v115 = v82; + } + else + { + v115 = a4 == -1; + } + if ( v115 != v103 ) + { + if ( v125 && a2 == 0xFFFF ) + { + v70 = (unsigned __int16 *)v125[2]; + if ( (unsigned int)v70 >= v125[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v125 + 36))(v125); + else + lpuexcptb = *v70; + v71 = 0; + if ( lpuexcptb != 0xFFFF ) + v71 = v125; + v125 = v71; + } + else + { + lpuexcptb = a2; + } + v8 = *(_BYTE *)(v118 + 16); + v95 = *(_WORD *)(v118 + 112) == lpuexcptb; + if ( *(_WORD *)(v118 + 112) == lpuexcptb || *(_WORD *)(v118 + 114) == lpuexcptb ) + { + if ( (!v8 || *(_WORD *)(v118 + 38) != lpuexcptb) && *(_WORD *)(v118 + 36) != lpuexcptb ) + { + v9 = v125[2]; + v10 = v125[3]; + if ( v9 >= v10 ) + { + (*(void (__fastcall **)(_DWORD *))(*v125 + 40))(v125); + v11 = (__int16 *)v125[2]; + v10 = v125[3]; + } + else + { + v11 = (__int16 *)(v9 + 2); + v125[2] = v11; + } + if ( (unsigned int)v11 >= v10 ) + v12 = (*(int (__fastcall **)(_DWORD *))(*v125 + 36))(v125); + else + v12 = *v11; + v13 = v12 == -1; + v14 = 0; + if ( !v13 ) + v14 = v125; + v106 = v13; + v125 = v14; + if ( v111 && v99 != 0 ) + { + v85 = (__int16 *)v99[2]; + if ( (unsigned int)v85 >= v99[3] ) + v86 = (*(int (__fastcall **)(_DWORD *))(*v99 + 36))(v99); + else + v86 = *v85; + v87 = v86 == -1; + v88 = 0; + if ( !v87 ) + v88 = v99; + v89 = v111 && v99 != 0; + v99 = v88; + if ( !v87 ) + v89 = 0; + v116 = v89; + } + else + { + v116 = a4 == -1; + } + if ( v106 == v116 ) + { + v102 = 1; + v100 = 0; + v117 = 0; + goto LABEL_49; + } + if ( v125 ) + { + v83 = (unsigned __int16 *)v125[2]; + if ( (unsigned int)v83 >= v125[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v125 + 36))(v125); + else + lpuexcptb = *v83; + v84 = 0; + if ( lpuexcptb != 0xFFFF ) + v84 = v125; + v8 = *(_BYTE *)(v118 + 16); + v125 = v84; + } + else + { + lpuexcptb = -1; + v8 = *(_BYTE *)(v118 + 16); + } + } + } + else + { + v95 = 0; + } + v117 = 0; + v100 = 0; + while ( 1 ) + { + if ( v8 && *(_WORD *)(v118 + 38) == lpuexcptb || *(_WORD *)(v118 + 36) == lpuexcptb ) + { +LABEL_179: + v102 = 0; + goto LABEL_49; + } + if ( *(_WORD *)(v118 + 120) != lpuexcptb ) + break; + v34 = v113 == 10 || !v117; + if ( !v34 ) + goto LABEL_36; + v117 = v97 == 0 || v113 == 8; + if ( !v117 ) + { + ++v100; + v117 = v34; + goto LABEL_40; + } + v100 = 0; + v15 = v125; + v113 = 8; + v16 = v125[2]; + v17 = v125[3]; + if ( v16 < v17 ) + { +LABEL_41: + v18 = (__int16 *)(v16 + 2); + v15[2] = v18; + if ( v17 > (unsigned int)v18 ) + goto LABEL_42; + goto LABEL_85; + } +LABEL_84: + (*(void (__fastcall **)(_DWORD *))(*v125 + 40))(v125); + v18 = (__int16 *)v125[2]; + if ( v125[3] > (unsigned int)v18 ) + { +LABEL_42: + v19 = *v18; + goto LABEL_43; + } +LABEL_85: + v19 = (*(int (__fastcall **)(_DWORD *))(*v125 + 36))(v125); +LABEL_43: + v20 = v19 == -1; + v21 = 0; + if ( !v20 ) + v21 = v125; + v104 = v20; + v125 = v21; + if ( v111 && v99 != 0 ) + { + v51 = (__int16 *)v99[2]; + if ( (unsigned int)v51 >= v99[3] ) + v52 = (*(int (__fastcall **)(_DWORD *))(*v99 + 36))(v99); + else + v52 = *v51; + v53 = v52 == -1; + v54 = 0; + if ( !v53 ) + v54 = v99; + v55 = v111 && v99 != 0; + v99 = v54; + if ( !v53 ) + v55 = 0; + v107 = v55; + } + else + { + v107 = a4 == -1; + } + if ( v107 == v104 ) + { + v102 = 1; + goto LABEL_49; + } + lpuexcptb = -1; + if ( v125 ) + { + v35 = (unsigned __int16 *)v125[2]; + if ( (unsigned int)v35 >= v125[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v125 + 36))(v125); + else + lpuexcptb = *v35; + v36 = 0; + if ( lpuexcptb != 0xFFFF ) + v36 = v125; + v125 = v36; + } + if ( !v117 ) + { + v102 = 0; + goto LABEL_49; + } + v8 = *(_BYTE *)(v118 + 16); + } + if ( !v117 ) + goto LABEL_179; +LABEL_36: + if ( *(_WORD *)(v118 + 116) != lpuexcptb && *(_WORD *)(v118 + 118) != lpuexcptb ) + { + v102 = 0; + v117 = 1; + goto LABEL_49; + } + if ( v97 != 0 && v113 != 16 ) + { + v102 = 0; + v93 = v113; + v94 = v113; + v117 = 1; + goto LABEL_52; + } + v100 = 0; + v117 = 0; + v113 = 16; +LABEL_40: + v15 = v125; + v16 = v125[2]; + v17 = v125[3]; + if ( v16 < v17 ) + goto LABEL_41; + goto LABEL_84; + } + v117 = 0; + v95 = 0; + lpuexcptb = 0; + v102 = 1; + v100 = 0; +LABEL_49: + v22 = 22; + if ( v113 != 16 ) + v22 = v113; + v93 = v22; + v94 = v22; +LABEL_52: + v127 = 0; + Block = v128; + LOBYTE(v128[0]) = 0; + if ( *(_BYTE *)(v118 + 16) ) + std::string::reserve(&Block, 0x20u); + v98 = v113; + v23 = 0xFFFFFFFFFFFFFFFFLL / v113; + v96 = *(_BYTE *)(v118 + 164); + if ( !v96 ) + { + if ( !v102 ) + { + v105 = 0; + v114 = 0LL; + while ( v94 > 10 ) + { + if ( (unsigned __int16)(lpuexcptb - 48) <= 9u ) + goto LABEL_60; + v24 = lpuexcptb - 87; + if ( (unsigned __int16)(lpuexcptb - 97) > 5u ) + { + if ( (unsigned __int16)(lpuexcptb - 65) > 5u ) + goto LABEL_102; + v24 = lpuexcptb - 55; + } +LABEL_61: + if ( v23 >= v114 ) + { + v105 |= __PAIR64__(~(v24 >> 31), ~v24) < v98 * v114; + v25 = v125; + ++v100; + v26 = v125[2]; + v27 = v125[3]; + v114 = v98 * v114 + v24; + if ( v26 < v27 ) + { +LABEL_63: + v28 = (__int16 *)(v26 + 2); + v25[2] = v28; + goto LABEL_64; + } + } + else + { + v25 = v125; + v105 = 1; + v26 = v125[2]; + v27 = v125[3]; + if ( v26 < v27 ) + goto LABEL_63; + } + (*(void (__fastcall **)(_DWORD *))(*v125 + 40))(v125); + v28 = (__int16 *)v125[2]; + v27 = v125[3]; +LABEL_64: + if ( v27 <= (unsigned int)v28 ) + v29 = (*(int (__fastcall **)(_DWORD *))(*v125 + 36))(v125); + else + v29 = *v28; + v30 = v29 == -1; + v31 = 0; + if ( !v30 ) + v31 = v125; + v108 = v30; + v125 = v31; + if ( v111 && v99 != 0 ) + { + v65 = (__int16 *)v99[2]; + if ( (unsigned int)v65 >= v99[3] ) + v66 = (*(int (__fastcall **)(_DWORD *))(*v99 + 36))(v99); + else + v66 = *v65; + v67 = v66 == -1; + v68 = 0; + if ( !v67 ) + v68 = v99; + v69 = v111 && v99 != 0; + v99 = v68; + if ( !v67 ) + v69 = 0; + lpuexcptc = v69; + } + else + { + lpuexcptc = a4 == -1; + } + if ( v108 == lpuexcptc ) + { + v96 = 1; + lpuexcptd = (struct _Unwind_Exception *)v127; + v32 = (int *)Block; + goto LABEL_72; + } + if ( v125 ) + { + v56 = (unsigned __int16 *)v125[2]; + if ( (unsigned int)v56 >= v125[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v125 + 36))(v125); + else + lpuexcptb = *v56; + v57 = 0; + if ( lpuexcptb != 0xFFFF ) + v57 = v125; + v125 = v57; + } + else + { + lpuexcptb = -1; + } + } + if ( lpuexcptb <= 0x2Fu || (unsigned __int16)(v94 + 48) <= lpuexcptb ) + goto LABEL_102; +LABEL_60: + v24 = lpuexcptb - 48; + goto LABEL_61; + } + v90 = v102; + v105 = 0; + v102 = 0; + lpuexcptd = (struct _Unwind_Exception *)v127; + v32 = (int *)Block; + v96 = v90; + v114 = 0LL; + goto LABEL_72; + } + if ( v102 ) + { + v114 = 0LL; + lpuexcptd = (struct _Unwind_Exception *)v127; + v32 = (int *)Block; + v96 = v102; + v105 = 0; + v102 = 0; +LABEL_72: + if ( lpuexcptd ) + goto LABEL_103; +LABEL_73: + if ( v117 || v100 ) + goto LABEL_111; + goto LABEL_75; + } + v105 = 0; + v114 = 0LL; + while ( 1 ) + { + if ( *(_BYTE *)(v118 + 16) && *(_WORD *)(v118 + 38) == lpuexcptb ) + { + v32 = (int *)Block; + lpuexcptd = (struct _Unwind_Exception *)v127; + if ( !v100 ) + { + v96 = 0; + v102 = *(_BYTE *)(v118 + 16); + goto LABEL_72; + } + v58 = 15; + v110 = v100; + if ( Block != v128 ) + v58 = v128[0]; + v101 = v127 + 1; + if ( v127 + 1 > v58 ) + { + std::string::_M_mutate((int)&Block, v127, 0, 0, 1u); + v32 = (int *)Block; + } + v59 = v101; + v100 = 0; + *((_BYTE *)lpuexcptd + (_DWORD)v32) = v110; + v127 = v59; + *((_BYTE *)Block + v59) = 0; +LABEL_126: + v42 = v125; + v43 = v125[2]; + v44 = v125[3]; + if ( v43 < v44 ) + goto LABEL_127; + goto LABEL_137; + } + if ( lpuexcptb == *(_WORD *)(v118 + 36) ) + break; + v37 = (_WORD *)(v118 + 120); + v38 = v93; + while ( *v37 != lpuexcptb ) + { + ++v37; + if ( !--v38 ) + goto LABEL_102; + } + v40 = (int)v37 - v118 - 120; + v41 = (v40 >> 1) - 6; + if ( v40 <= 30 ) + v41 = v40 >> 1; + if ( v23 < v114 ) + { + v105 = v96; + goto LABEL_126; + } + v105 |= __PAIR64__(~(v41 >> 31), ~v41) < v98 * v114; + v114 = v98 * v114 + v41; + ++v100; + v42 = v125; + v43 = v125[2]; + v44 = v125[3]; + if ( v43 < v44 ) + { +LABEL_127: + v45 = (__int16 *)(v43 + 2); + v42[2] = v45; + goto LABEL_128; + } +LABEL_137: + (*(void (__fastcall **)(_DWORD *))(*v125 + 40))(v125); + v45 = (__int16 *)v125[2]; + v44 = v125[3]; +LABEL_128: + if ( v44 <= (unsigned int)v45 ) + v46 = (*(int (__fastcall **)(_DWORD *))(*v125 + 36))(v125); + else + v46 = *v45; + v47 = v46 == -1; + v48 = 0; + if ( !v47 ) + v48 = v125; + v109 = v47; + v125 = v48; + if ( v111 && v99 != 0 ) + { + v60 = (__int16 *)v99[2]; + if ( (unsigned int)v60 >= v99[3] ) + v61 = (*(int (__fastcall **)(_DWORD *))(*v99 + 36))(v99); + else + v61 = *v60; + v62 = v61 == -1; + v63 = 0; + if ( !v62 ) + v63 = v99; + v64 = v111 && v99 != 0; + v99 = v63; + if ( !v62 ) + v64 = 0; + lpuexcpte = v64; + } + else + { + lpuexcpte = a4 == -1; + } + if ( v109 == lpuexcpte ) + { + lpuexcptd = (struct _Unwind_Exception *)v127; + v32 = (int *)Block; + goto LABEL_72; + } + if ( v125 ) + { + v49 = (unsigned __int16 *)v125[2]; + if ( (unsigned int)v49 >= v125[3] ) + lpuexcptb = (*(int (__fastcall **)(_DWORD *))(*v125 + 36))(v125); + else + lpuexcptb = *v49; + v50 = 0; + if ( lpuexcptb != 0xFFFF ) + v50 = v125; + v125 = v50; + } + else + { + lpuexcptb = -1; + } + } +LABEL_102: + v96 = 0; + lpuexcptd = (struct _Unwind_Exception *)v127; + v32 = (int *)Block; + if ( !v127 ) + goto LABEL_73; +LABEL_103: + v39 = 15; + if ( v32 != v128 ) + v39 = v128[0]; + if ( (unsigned int)lpuexcptd + 1 > v39 ) + { + std::string::_M_mutate((int)&Block, (size_t)lpuexcptd, 0, 0, 1u); + v32 = (int *)Block; + } + *((_BYTE *)lpuexcptd + (_DWORD)v32) = v100; + v127 = (size_t)lpuexcptd + 1; + *((_BYTE *)lpuexcptd + (_DWORD)Block + 1) = 0; + if ( !(unsigned __int8)std::__verify_grouping(*(char **)(v118 + 8), *(_DWORD *)(v118 + 12), (int)&Block) ) + *a6 = 4; + v32 = (int *)Block; + if ( !v117 && !(v127 | v100) ) + { +LABEL_75: + *a7 = 0; + a7[1] = 0; + *a6 = 4; + goto LABEL_76; + } +LABEL_111: + if ( v102 ) + goto LABEL_75; + if ( v105 ) + { + *a7 = -1; + a7[1] = -1; + *a6 = 4; + } + else + { + if ( v95 ) + v114 = -(__int64)v114; + *(_QWORD *)a7 = v114; + } +LABEL_76: + if ( v96 ) + *a6 |= 2u; + if ( v32 != v128 ) + operator delete(v32); + return v125; +} +// 47E0CF: variable 'v91' is possibly undefined +// 50C62C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (0047E530) -------------------------------------------------------- +__int64 __stdcall std::num_get>::_M_extract_int( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + int *a6) +{ + int v6; // eax + char v7; // al + unsigned int v8; // eax + int v9; // eax + int v10; // eax + int v11; // eax + _DWORD *v12; // ecx + unsigned int v13; // eax + __int16 *v14; // eax + __int16 v15; // ax + char v16; // al + const char *v17; // eax + int v18; // edx + _DWORD *v19; // edx + int v20; // edx + _DWORD *v22; // ecx + unsigned int v23; // eax + __int16 *v24; // eax + __int16 v25; // ax + char v26; // al + bool v27; // al + char *v28; // eax + int v29; // edx + _WORD *v30; // eax + __int16 v31; // dx + _WORD *v32; // eax + _WORD *v33; // eax + __int16 v34; // dx + int v35; // eax + bool v36; // cc + int v37; // edx + int v38; // eax + _DWORD *v39; // ecx + unsigned int v40; // eax + __int16 *v41; // eax + __int16 v42; // ax + char v43; // al + _WORD *v44; // eax + char v45; // bl + const char *v46; // eax + _WORD *v47; // eax + __int16 v48; // dx + _WORD *v49; // eax + int v50; // edx + _WORD *v51; // eax + char v52; // bl + unsigned int v53; // [esp+4h] [ebp-94h] + bool v54; // [esp+1Bh] [ebp-7Dh] + int v55; // [esp+1Ch] [ebp-7Ch] + int v56; // [esp+20h] [ebp-78h] + unsigned int v57; // [esp+24h] [ebp-74h] + char v58; // [esp+28h] [ebp-70h] + char v59; // [esp+2Ah] [ebp-6Eh] + char v60; // [esp+2Bh] [ebp-6Dh] + char v61; // [esp+2Bh] [ebp-6Dh] + int v62; // [esp+2Ch] [ebp-6Ch] + char v63; // [esp+2Ch] [ebp-6Ch] + char v64; // [esp+2Ch] [ebp-6Ch] + int v65; // [esp+30h] [ebp-68h] + unsigned int v66; // [esp+34h] [ebp-64h] + char v67; // [esp+34h] [ebp-64h] + bool v68; // [esp+38h] [ebp-60h] + unsigned int v69; // [esp+3Ch] [ebp-5Ch] + unsigned __int16 lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + __int64 lpuexcptb; // [esp+40h] [ebp-58h] + char lpuexcptc; // [esp+40h] [ebp-58h] + std::string *lpuexcptd; // [esp+40h] [ebp-58h] + struct _Unwind_Exception *v75; // [esp+48h] [ebp-50h] + int v76; // [esp+8Bh] [ebp-Dh] BYREF + const char *v77[2]; // [esp+8Ch] [ebp-Ch] BYREF + + v75 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v62 = v6; + if ( v6 == 64 ) + { + v69 = 8; +LABEL_4: + v60 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v60 ) + { + v65 = 0; + v68 = 0; + v55 = v69; + v56 = v69; + lpuexcpt = 0; + v54 = 0; + goto LABEL_18; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v69 = 10; + goto LABEL_4; + } + v60 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v60 ) + { + v55 = 22; + lpuexcpt = 0; + v65 = 0; + v68 = 0; + v54 = 0; + v69 = 16; + v56 = 22; + goto LABEL_18; + } + v69 = 16; +LABEL_5: + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v51 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v51 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v51; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + v7 = *((_BYTE *)v75 + 16); + v54 = *((_WORD *)v75 + 56) == lpuexcpt; + if ( *((_WORD *)v75 + 56) != lpuexcpt && *((_WORD *)v75 + 57) != lpuexcpt + || v7 && *((_WORD *)v75 + 19) == lpuexcpt + || *((_WORD *)v75 + 18) == lpuexcpt ) + { + goto LABEL_49; + } + v8 = *(_DWORD *)(a1 + 8); + if ( v8 >= *(_DWORD *)(a1 + 12) ) + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + else + *(_DWORD *)(a1 + 8) = v8 + 2; + WORD2(a1) = -1; + v65 = 0; + v60 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v68 = 0; + if ( !v60 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v7 = *((_BYTE *)v75 + 16); +LABEL_49: + v65 = 0; + v68 = 0; + while ( 1 ) + { + if ( v7 && *((_WORD *)v75 + 19) == lpuexcpt || *((_WORD *)v75 + 18) == lpuexcpt ) + { +LABEL_116: + v60 = 0; + goto LABEL_15; + } + if ( *((_WORD *)v75 + 60) != lpuexcpt ) + break; + v27 = v69 == 10 || !v68; + if ( !v27 ) + goto LABEL_55; + v68 = v62 == 0 || v69 == 8; + if ( !v68 ) + { + ++v65; + v68 = v27; + goto LABEL_59; + } + v22 = (_DWORD *)a1; + v65 = 0; + v69 = 8; + v23 = *(_DWORD *)(a1 + 8); + if ( v23 < *(_DWORD *)(a1 + 12) ) + { +LABEL_60: + v22[2] = v23 + 2; + WORD2(a1) = -1; + goto LABEL_61; + } +LABEL_71: + (*(void (__fastcall **)(_DWORD *))(*v22 + 40))(v22); + v22 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + v67 = 1; + goto LABEL_65; + } +LABEL_61: + v24 = (__int16 *)v22[2]; + if ( (unsigned int)v24 >= v22[3] ) + v25 = (*(int (__fastcall **)(_DWORD *))(*v22 + 36))(v22); + else + v25 = *v24; + v67 = 0; + if ( v25 == -1 ) + { + LODWORD(a1) = 0; + v67 = 1; + } +LABEL_65: + v26 = a3 == -1; + v61 = v26 & (a2 != 0); + if ( v61 ) + { + v30 = (_WORD *)a2[2]; + v31 = (unsigned int)v30 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v30; + v26 = 0; + if ( v31 == -1 ) + { + a2 = 0; + v26 = v61; + } + } + if ( v26 == v67 ) + { + v60 = 1; + goto LABEL_15; + } + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v49 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v49 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v49; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + if ( !v68 ) + goto LABEL_116; + v7 = *((_BYTE *)v75 + 16); + } + if ( !v68 ) + goto LABEL_116; +LABEL_55: + if ( *((_WORD *)v75 + 58) != lpuexcpt && *((_WORD *)v75 + 59) != lpuexcpt ) + { + v60 = 0; + v68 = 1; + goto LABEL_15; + } + if ( v62 != 0 && v69 != 16 ) + { + v60 = 0; + v68 = 1; + v55 = v69; + v56 = v69; + goto LABEL_18; + } + v65 = 0; + v68 = 0; + v69 = 16; +LABEL_59: + v22 = (_DWORD *)a1; + v23 = *(_DWORD *)(a1 + 8); + if ( v23 < *(_DWORD *)(a1 + 12) ) + goto LABEL_60; + goto LABEL_71; + } +LABEL_15: + v9 = 22; + if ( v69 != 16 ) + v9 = v69; + v55 = v9; + v56 = v9; +LABEL_18: + v77[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v75 + 16) ) + std::string::reserve((int *)v77, (std::string *)0x20, v53); + v57 = 0xFFFFFFFF / v69; + v63 = *((_BYTE *)v75 + 164); + if ( v63 ) + { + if ( v60 ) + { + v17 = v77[0]; + v66 = 0; + v59 = 0; + v63 = v60; + v18 = *((_DWORD *)v77[0] - 3); + v60 = 0; +LABEL_37: + if ( v18 ) + goto LABEL_86; + goto LABEL_38; + } + v59 = 0; + v66 = 0; + while ( !*((_BYTE *)v75 + 16) || *((_WORD *)v75 + 19) != lpuexcpt ) + { + if ( lpuexcpt == *((_WORD *)v75 + 18) ) + goto LABEL_85; + v28 = (char *)v75 + 120; + v29 = v55; + while ( lpuexcpt != *(_WORD *)v28 ) + { + v28 += 2; + if ( !--v29 ) + goto LABEL_85; + } + v35 = v28 - ((char *)v75 + 120); + v36 = v35 <= 30; + v37 = (v35 >> 1) - 6; + v38 = v35 >> 1; + if ( !v36 ) + v38 = v37; + if ( v57 < v66 ) + { + v59 = v63; + goto LABEL_123; + } + v59 |= ~v38 < v69 * v66; + v39 = (_DWORD *)a1; + v66 = v69 * v66 + v38; + ++v65; + v40 = *(_DWORD *)(a1 + 8); + if ( v40 < *(_DWORD *)(a1 + 12) ) + { +LABEL_124: + v39[2] = v40 + 2; + WORD2(a1) = -1; + goto LABEL_125; + } +LABEL_133: + (*(void (__fastcall **)(_DWORD *))(*v39 + 40))(v39); + v39 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcptc = v63; + goto LABEL_129; + } +LABEL_125: + v41 = (__int16 *)v39[2]; + if ( (unsigned int)v41 >= v39[3] ) + v42 = (*(int (__fastcall **)(_DWORD *))(*v39 + 36))(v39); + else + v42 = *v41; + lpuexcptc = 0; + if ( v42 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v63; + } +LABEL_129: + v43 = a3 == -1; + v58 = v43 & (a2 != 0); + if ( v58 ) + { + v47 = (_WORD *)a2[2]; + v48 = (unsigned int)v47 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v47; + v43 = 0; + if ( v48 == -1 ) + { + a2 = 0; + v43 = v58; + } + } + if ( lpuexcptc == v43 ) + { + v17 = v77[0]; + v18 = *((_DWORD *)v77[0] - 3); + goto LABEL_37; + } + lpuexcpt = WORD2(a1); + if ( WORD2(a1) == 0xFFFF && (_DWORD)a1 ) + { + v44 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v44 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v44; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + } + v17 = v77[0]; + v18 = *((_DWORD *)v77[0] - 3); + if ( !v65 ) + { + v63 = 0; + v60 = *((_BYTE *)v75 + 16); + goto LABEL_37; + } + lpuexcptd = (std::string *)(v18 + 1); + if ( (unsigned int)(v18 + 1) > *((_DWORD *)v77[0] - 2) || *((int *)v77[0] - 1) > 0 ) + std::string::reserve((int *)v77, lpuexcptd, v53); + v45 = v65; + v65 = 0; + v77[0][*((_DWORD *)v77[0] - 3)] = v45; + v46 = v77[0]; + *((_DWORD *)v77[0] - 1) = 0; + *((_DWORD *)v46 - 3) = lpuexcptd; + *((_BYTE *)lpuexcptd + (_DWORD)v46) = 0; +LABEL_123: + v39 = (_DWORD *)a1; + v40 = *(_DWORD *)(a1 + 8); + if ( v40 < *(_DWORD *)(a1 + 12) ) + goto LABEL_124; + goto LABEL_133; + } + if ( v60 ) + { + v52 = v60; + v17 = v77[0]; + v59 = 0; + v60 = 0; + v63 = v52; + v18 = *((_DWORD *)v77[0] - 3); + v66 = 0; + goto LABEL_37; + } + v59 = 0; + v66 = 0; +LABEL_23: + v10 = lpuexcpt; + if ( v56 > 10 ) + { + if ( (unsigned __int16)(lpuexcpt - 48) <= 9u ) + { +LABEL_26: + v11 = lpuexcpt - 48; +LABEL_27: + if ( v57 >= v66 ) + goto LABEL_97; +LABEL_28: + v12 = (_DWORD *)a1; + v59 = 1; + v13 = *(_DWORD *)(a1 + 8); + if ( v13 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_98; +LABEL_29: + v12[2] = v13 + 2; + WORD2(a1) = -1; +LABEL_30: + v14 = (__int16 *)v12[2]; + if ( (unsigned int)v14 >= v12[3] ) + v15 = (*(int (__fastcall **)(_DWORD *))(*v12 + 36))(v12); + else + v15 = *v14; + lpuexcpta = 0; + if ( v15 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } + goto LABEL_34; + } + while ( (unsigned __int16)(lpuexcpt - 97) <= 5u ) + { + v11 = v10 - 87; + if ( v57 < v66 ) + goto LABEL_28; +LABEL_97: + v59 |= ~v11 < v69 * v66; + v12 = (_DWORD *)a1; + v66 = v69 * v66 + v11; + ++v65; + v13 = *(_DWORD *)(a1 + 8); + if ( v13 < *(_DWORD *)(a1 + 12) ) + goto LABEL_29; +LABEL_98: + (*(void (__fastcall **)(_DWORD *))(*v12 + 40))(v12); + v12 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_30; + lpuexcpta = 1; +LABEL_34: + v16 = a3 == -1; + v64 = v16 & (a2 != 0); + if ( v64 ) + { + v33 = (_WORD *)a2[2]; + v34 = (unsigned int)v33 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v33; + v16 = 0; + if ( v34 == -1 ) + { + a2 = 0; + v16 = v64; + } + } + if ( lpuexcpta == v16 ) + { + v17 = v77[0]; + v63 = 1; + v18 = *((_DWORD *)v77[0] - 3); + goto LABEL_37; + } + lpuexcpt = WORD2(a1); + if ( !(_DWORD)a1 || WORD2(a1) != 0xFFFF ) + goto LABEL_23; + v32 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v32 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v32; + if ( lpuexcpt != 0xFFFF ) + goto LABEL_23; + LODWORD(a1) = 0; + v10 = 0xFFFF; + if ( v56 <= 10 ) + goto LABEL_85; + } + if ( (unsigned __int16)(lpuexcpt - 65) <= 5u ) + { + v11 = v10 - 55; + goto LABEL_27; + } + } + else if ( lpuexcpt > 0x2Fu && (unsigned __int16)(v56 + 48) > lpuexcpt ) + { + goto LABEL_26; + } +LABEL_85: + v17 = v77[0]; + v63 = 0; + if ( *((_DWORD *)v77[0] - 3) ) + { +LABEL_86: + std::string::push_back((int *)v77, (std::string *)(char)v65, v53); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v75 + 2), *((_DWORD *)v75 + 3), v77) ) + *a5 = 4; + v17 = v77[0]; + if ( !v65 && !v68 && !*((_DWORD *)v77[0] - 3) ) + goto LABEL_40; + goto LABEL_91; + } +LABEL_38: + if ( !v65 && !v68 ) + goto LABEL_40; +LABEL_91: + if ( v60 ) + { +LABEL_40: + v19 = a5; + *a6 = 0; + *v19 = 4; + goto LABEL_41; + } + if ( v59 ) + { + *a6 = -1; + *a5 = 4; + } + else + { + v50 = -v66; + if ( !v54 ) + v50 = v66; + *a6 = v50; + } +LABEL_41: + if ( v63 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v17 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_156: + std::string::_Rep::_M_destroy((void *)(v17 - 12), (int)&v76); + return lpuexcptb; + } + v20 = *((_DWORD *)v17 - 1); + *((_DWORD *)v17 - 1) = v20 - 1; + if ( v20 <= 0 ) + goto LABEL_156; + return lpuexcptb; +} +// 47EED7: variable 'v53' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0047F170) -------------------------------------------------------- +__int64 __stdcall std::num_get>::_M_extract_int( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + int *a6) +{ + int v6; // eax + char v7; // al + int v8; // eax + int v9; // eax + int v10; // eax + _DWORD *v11; // ecx + unsigned int v12; // eax + __int16 *v13; // eax + __int16 v14; // ax + char v15; // al + const char *v16; // eax + int v17; // edx + _DWORD *v18; // ecx + int v19; // edx + _DWORD *v21; // ecx + unsigned int v22; // eax + __int16 *v23; // eax + __int16 v24; // ax + char v25; // al + bool v26; // al + char *v27; // eax + int v28; // edx + _WORD *v29; // eax + __int16 v30; // dx + _WORD *v31; // eax + _WORD *v32; // eax + __int16 v33; // dx + int v34; // eax + bool v35; // cc + int v36; // edx + int v37; // eax + _DWORD *v38; // ecx + unsigned int v39; // eax + __int16 *v40; // eax + __int16 v41; // ax + char v42; // al + _WORD *v43; // eax + char v44; // bl + const char *v45; // eax + _WORD *v46; // eax + __int16 v47; // dx + _WORD *v48; // eax + int v49; // edx + _WORD *v50; // eax + char v51; // bl + unsigned int v52; // [esp+4h] [ebp-94h] + bool v53; // [esp+14h] [ebp-84h] + int v54; // [esp+18h] [ebp-80h] + unsigned int v55; // [esp+1Ch] [ebp-7Ch] + int v56; // [esp+20h] [ebp-78h] + unsigned int v57; // [esp+24h] [ebp-74h] + char v58; // [esp+28h] [ebp-70h] + char v59; // [esp+2Ah] [ebp-6Eh] + char v60; // [esp+2Bh] [ebp-6Dh] + char v61; // [esp+2Bh] [ebp-6Dh] + int v62; // [esp+2Ch] [ebp-6Ch] + char v63; // [esp+2Ch] [ebp-6Ch] + char v64; // [esp+2Ch] [ebp-6Ch] + int v65; // [esp+30h] [ebp-68h] + unsigned int v66; // [esp+34h] [ebp-64h] + char v67; // [esp+34h] [ebp-64h] + bool v68; // [esp+38h] [ebp-60h] + unsigned int v69; // [esp+3Ch] [ebp-5Ch] + unsigned __int16 lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + __int64 lpuexcptb; // [esp+40h] [ebp-58h] + char lpuexcptc; // [esp+40h] [ebp-58h] + std::string *lpuexcptd; // [esp+40h] [ebp-58h] + struct _Unwind_Exception *v75; // [esp+48h] [ebp-50h] + int v76; // [esp+8Bh] [ebp-Dh] BYREF + const char *v77[2]; // [esp+8Ch] [ebp-Ch] BYREF + + v75 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v62 = v6; + if ( v6 == 64 ) + { + v69 = 8; +LABEL_4: + v60 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v60 ) + { + v65 = 0; + v68 = 0; + v54 = v69; + v56 = v69; + lpuexcpt = 0; + v53 = 0; + goto LABEL_16; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v69 = 10; + goto LABEL_4; + } + v60 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v60 ) + { + v54 = 22; + lpuexcpt = 0; + v65 = 0; + v68 = 0; + v53 = 0; + v69 = 16; + v56 = 22; + goto LABEL_16; + } + v69 = 16; +LABEL_5: + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v50 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v50 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v50; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + v7 = *((_BYTE *)v75 + 16); + v53 = *((_WORD *)v75 + 56) == lpuexcpt; + if ( *((_WORD *)v75 + 56) != lpuexcpt && *((_WORD *)v75 + 57) != lpuexcpt + || v7 && *((_WORD *)v75 + 19) == lpuexcpt + || *((_WORD *)v75 + 18) == lpuexcpt ) + { + goto LABEL_47; + } + std::wstreambuf::sbumpc((_DWORD *)a1); + WORD2(a1) = -1; + v65 = 0; + v60 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v68 = 0; + if ( !v60 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v7 = *((_BYTE *)v75 + 16); +LABEL_47: + v65 = 0; + v68 = 0; + while ( 1 ) + { + if ( v7 && *((_WORD *)v75 + 19) == lpuexcpt || *((_WORD *)v75 + 18) == lpuexcpt ) + { +LABEL_114: + v60 = 0; + goto LABEL_13; + } + if ( *((_WORD *)v75 + 60) != lpuexcpt ) + break; + v26 = v69 == 10 || !v68; + if ( !v26 ) + goto LABEL_53; + v68 = v62 == 0 || v69 == 8; + if ( !v68 ) + { + ++v65; + v68 = v26; + goto LABEL_57; + } + v21 = (_DWORD *)a1; + v65 = 0; + v69 = 8; + v22 = *(_DWORD *)(a1 + 8); + if ( v22 < *(_DWORD *)(a1 + 12) ) + { +LABEL_58: + v21[2] = v22 + 2; + WORD2(a1) = -1; + goto LABEL_59; + } +LABEL_69: + (*(void (__fastcall **)(_DWORD *))(*v21 + 40))(v21); + v21 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + v67 = 1; + goto LABEL_63; + } +LABEL_59: + v23 = (__int16 *)v21[2]; + if ( (unsigned int)v23 >= v21[3] ) + v24 = (*(int (__fastcall **)(_DWORD *))(*v21 + 36))(v21); + else + v24 = *v23; + v67 = 0; + if ( v24 == -1 ) + { + LODWORD(a1) = 0; + v67 = 1; + } +LABEL_63: + v25 = a3 == -1; + v61 = v25 & (a2 != 0); + if ( v61 ) + { + v29 = (_WORD *)a2[2]; + v30 = (unsigned int)v29 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v29; + v25 = 0; + if ( v30 == -1 ) + { + a2 = 0; + v25 = v61; + } + } + if ( v25 == v67 ) + { + v60 = 1; + goto LABEL_13; + } + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v48 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v48 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v48; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + if ( !v68 ) + goto LABEL_114; + v7 = *((_BYTE *)v75 + 16); + } + if ( !v68 ) + goto LABEL_114; +LABEL_53: + if ( *((_WORD *)v75 + 58) != lpuexcpt && *((_WORD *)v75 + 59) != lpuexcpt ) + { + v60 = 0; + v68 = 1; + goto LABEL_13; + } + if ( v69 != 16 && v62 != 0 ) + { + v60 = 0; + v68 = 1; + v54 = v69; + v56 = v69; + goto LABEL_16; + } + v65 = 0; + v68 = 0; + v69 = 16; +LABEL_57: + v21 = (_DWORD *)a1; + v22 = *(_DWORD *)(a1 + 8); + if ( v22 < *(_DWORD *)(a1 + 12) ) + goto LABEL_58; + goto LABEL_69; + } +LABEL_13: + v8 = 22; + if ( v69 != 16 ) + v8 = v69; + v54 = v8; + v56 = v8; +LABEL_16: + v77[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v75 + 16) ) + std::string::reserve((int *)v77, (std::string *)0x20, v52); + v55 = v53 + 0x7FFFFFFF; + v57 = v55 / v69; + v63 = *((_BYTE *)v75 + 164); + if ( v63 ) + { + if ( v60 ) + { + v16 = v77[0]; + v66 = 0; + v59 = 0; + v63 = v60; + v17 = *((_DWORD *)v77[0] - 3); + v60 = 0; +LABEL_35: + if ( v17 ) + goto LABEL_84; + goto LABEL_36; + } + v59 = 0; + v66 = 0; + while ( !*((_BYTE *)v75 + 16) || *((_WORD *)v75 + 19) != lpuexcpt ) + { + if ( lpuexcpt == *((_WORD *)v75 + 18) ) + goto LABEL_83; + v27 = (char *)v75 + 120; + v28 = v54; + while ( *(_WORD *)v27 != lpuexcpt ) + { + v27 += 2; + if ( !--v28 ) + goto LABEL_83; + } + v34 = v27 - ((char *)v75 + 120); + v35 = v34 <= 30; + v36 = (v34 >> 1) - 6; + v37 = v34 >> 1; + if ( !v35 ) + v37 = v36; + if ( v57 < v66 ) + { + v59 = v63; + goto LABEL_121; + } + v59 |= v55 - v37 < v69 * v66; + v38 = (_DWORD *)a1; + v66 = v69 * v66 + v37; + ++v65; + v39 = *(_DWORD *)(a1 + 8); + if ( v39 < *(_DWORD *)(a1 + 12) ) + { +LABEL_122: + v38[2] = v39 + 2; + WORD2(a1) = -1; + goto LABEL_123; + } +LABEL_131: + (*(void (__fastcall **)(_DWORD *))(*v38 + 40))(v38); + v38 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcptc = v63; + goto LABEL_127; + } +LABEL_123: + v40 = (__int16 *)v38[2]; + if ( (unsigned int)v40 >= v38[3] ) + v41 = (*(int (__fastcall **)(_DWORD *))(*v38 + 36))(v38); + else + v41 = *v40; + lpuexcptc = 0; + if ( v41 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v63; + } +LABEL_127: + v42 = a3 == -1; + v58 = v42 & (a2 != 0); + if ( v58 ) + { + v46 = (_WORD *)a2[2]; + v47 = (unsigned int)v46 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v46; + v42 = 0; + if ( v47 == -1 ) + { + a2 = 0; + v42 = v58; + } + } + if ( v42 == lpuexcptc ) + { + v16 = v77[0]; + v17 = *((_DWORD *)v77[0] - 3); + goto LABEL_35; + } + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v43 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v43 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v43; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + } + v16 = v77[0]; + v17 = *((_DWORD *)v77[0] - 3); + if ( !v65 ) + { + v63 = 0; + v60 = *((_BYTE *)v75 + 16); + goto LABEL_35; + } + lpuexcptd = (std::string *)(v17 + 1); + if ( (unsigned int)(v17 + 1) > *((_DWORD *)v77[0] - 2) || *((int *)v77[0] - 1) > 0 ) + std::string::reserve((int *)v77, lpuexcptd, v52); + v44 = v65; + v65 = 0; + v77[0][*((_DWORD *)v77[0] - 3)] = v44; + v45 = v77[0]; + *((_DWORD *)v77[0] - 1) = 0; + *((_DWORD *)v45 - 3) = lpuexcptd; + *((_BYTE *)lpuexcptd + (_DWORD)v45) = 0; +LABEL_121: + v38 = (_DWORD *)a1; + v39 = *(_DWORD *)(a1 + 8); + if ( v39 < *(_DWORD *)(a1 + 12) ) + goto LABEL_122; + goto LABEL_131; + } + if ( v60 ) + { + v51 = v60; + v16 = v77[0]; + v59 = 0; + v60 = 0; + v63 = v51; + v17 = *((_DWORD *)v77[0] - 3); + v66 = 0; + goto LABEL_35; + } + v59 = 0; + v66 = 0; +LABEL_21: + v9 = lpuexcpt; + if ( v56 > 10 ) + { + if ( (unsigned __int16)(lpuexcpt - 48) <= 9u ) + { +LABEL_24: + v10 = lpuexcpt - 48; +LABEL_25: + if ( v57 >= v66 ) + goto LABEL_95; +LABEL_26: + v11 = (_DWORD *)a1; + v59 = 1; + v12 = *(_DWORD *)(a1 + 8); + if ( v12 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_96; +LABEL_27: + v11[2] = v12 + 2; + WORD2(a1) = -1; +LABEL_28: + v13 = (__int16 *)v11[2]; + if ( (unsigned int)v13 >= v11[3] ) + v14 = (*(int (__fastcall **)(_DWORD *))(*v11 + 36))(v11); + else + v14 = *v13; + lpuexcpta = 0; + if ( v14 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } + goto LABEL_32; + } + while ( (unsigned __int16)(lpuexcpt - 97) <= 5u ) + { + v10 = v9 - 87; + if ( v57 < v66 ) + goto LABEL_26; +LABEL_95: + v59 |= v55 - v10 < v69 * v66; + v11 = (_DWORD *)a1; + v66 = v69 * v66 + v10; + ++v65; + v12 = *(_DWORD *)(a1 + 8); + if ( v12 < *(_DWORD *)(a1 + 12) ) + goto LABEL_27; +LABEL_96: + (*(void (__fastcall **)(_DWORD *))(*v11 + 40))(v11); + v11 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_28; + lpuexcpta = 1; +LABEL_32: + v15 = a3 == -1; + v64 = v15 & (a2 != 0); + if ( v64 ) + { + v32 = (_WORD *)a2[2]; + v33 = (unsigned int)v32 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v32; + v15 = 0; + if ( v33 == -1 ) + { + a2 = 0; + v15 = v64; + } + } + if ( v15 == lpuexcpta ) + { + v16 = v77[0]; + v63 = 1; + v17 = *((_DWORD *)v77[0] - 3); + goto LABEL_35; + } + lpuexcpt = WORD2(a1); + if ( WORD2(a1) != 0xFFFF || !(_DWORD)a1 ) + goto LABEL_21; + v31 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v31 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v31; + if ( lpuexcpt != 0xFFFF ) + goto LABEL_21; + LODWORD(a1) = 0; + v9 = 0xFFFF; + if ( v56 <= 10 ) + goto LABEL_83; + } + if ( (unsigned __int16)(lpuexcpt - 65) <= 5u ) + { + v10 = v9 - 55; + goto LABEL_25; + } + } + else if ( lpuexcpt > 0x2Fu && (unsigned __int16)(v56 + 48) > lpuexcpt ) + { + goto LABEL_24; + } +LABEL_83: + v16 = v77[0]; + v63 = 0; + if ( *((_DWORD *)v77[0] - 3) ) + { +LABEL_84: + std::string::push_back((int *)v77, (std::string *)(char)v65, v52); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v75 + 2), *((_DWORD *)v75 + 3), v77) ) + *a5 = 4; + v16 = v77[0]; + if ( !v65 && !v68 && !*((_DWORD *)v77[0] - 3) ) + goto LABEL_38; + goto LABEL_89; + } +LABEL_36: + if ( !v65 && !v68 ) + goto LABEL_38; +LABEL_89: + if ( v60 ) + { +LABEL_38: + v18 = a5; + *a6 = 0; + *v18 = 4; + goto LABEL_39; + } + if ( v59 ) + { + *a6 = v53 + 0x7FFFFFFF; + *a5 = 4; + } + else + { + v49 = -v66; + if ( !v53 ) + v49 = v66; + *a6 = v49; + } +LABEL_39: + if ( v63 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v16 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_154: + std::string::_Rep::_M_destroy((void *)(v16 - 12), (int)&v76); + return lpuexcptb; + } + v19 = *((_DWORD *)v16 - 1); + *((_DWORD *)v16 - 1) = v19 - 1; + if ( v19 <= 0 ) + goto LABEL_154; + return lpuexcptb; +} +// 47FB27: variable 'v52' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0047FDB0) -------------------------------------------------------- +__int64 __stdcall std::num_get>::_M_extract_int( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + int *a6) +{ + int v6; // eax + char v7; // al + int v8; // eax + int v9; // eax + int v10; // eax + _DWORD *v11; // ecx + unsigned int v12; // eax + __int16 *v13; // eax + __int16 v14; // ax + char v15; // al + const char *v16; // eax + int v17; // edx + _DWORD *v18; // ecx + int v19; // edx + _DWORD *v21; // ecx + unsigned int v22; // eax + __int16 *v23; // eax + __int16 v24; // ax + char v25; // al + bool v26; // al + char *v27; // eax + int v28; // edx + _WORD *v29; // eax + __int16 v30; // dx + _WORD *v31; // eax + _WORD *v32; // eax + __int16 v33; // dx + int v34; // eax + bool v35; // cc + int v36; // edx + int v37; // eax + _DWORD *v38; // ecx + unsigned int v39; // eax + __int16 *v40; // eax + __int16 v41; // ax + char v42; // al + _WORD *v43; // eax + char v44; // bl + const char *v45; // eax + _WORD *v46; // eax + __int16 v47; // dx + _WORD *v48; // eax + int v49; // edx + _WORD *v50; // eax + char v51; // bl + unsigned int v52; // [esp+4h] [ebp-94h] + bool v53; // [esp+1Bh] [ebp-7Dh] + int v54; // [esp+1Ch] [ebp-7Ch] + int v55; // [esp+20h] [ebp-78h] + unsigned int v56; // [esp+24h] [ebp-74h] + char v57; // [esp+28h] [ebp-70h] + char v58; // [esp+2Ah] [ebp-6Eh] + char v59; // [esp+2Bh] [ebp-6Dh] + char v60; // [esp+2Bh] [ebp-6Dh] + int v61; // [esp+2Ch] [ebp-6Ch] + char v62; // [esp+2Ch] [ebp-6Ch] + char v63; // [esp+2Ch] [ebp-6Ch] + int v64; // [esp+30h] [ebp-68h] + unsigned int v65; // [esp+34h] [ebp-64h] + char v66; // [esp+34h] [ebp-64h] + bool v67; // [esp+38h] [ebp-60h] + unsigned int v68; // [esp+3Ch] [ebp-5Ch] + unsigned __int16 lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + __int64 lpuexcptb; // [esp+40h] [ebp-58h] + char lpuexcptc; // [esp+40h] [ebp-58h] + std::string *lpuexcptd; // [esp+40h] [ebp-58h] + struct _Unwind_Exception *v74; // [esp+48h] [ebp-50h] + int v75; // [esp+8Bh] [ebp-Dh] BYREF + const char *v76[2]; // [esp+8Ch] [ebp-Ch] BYREF + + v74 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v61 = v6; + if ( v6 == 64 ) + { + v68 = 8; +LABEL_4: + v59 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v59 ) + { + v64 = 0; + v67 = 0; + v54 = v68; + v55 = v68; + lpuexcpt = 0; + v53 = 0; + goto LABEL_16; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v68 = 10; + goto LABEL_4; + } + v59 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v59 ) + { + v54 = 22; + lpuexcpt = 0; + v64 = 0; + v67 = 0; + v53 = 0; + v68 = 16; + v55 = 22; + goto LABEL_16; + } + v68 = 16; +LABEL_5: + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v50 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v50 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v50; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + v7 = *((_BYTE *)v74 + 16); + v53 = *((_WORD *)v74 + 56) == lpuexcpt; + if ( *((_WORD *)v74 + 56) != lpuexcpt && *((_WORD *)v74 + 57) != lpuexcpt + || v7 && *((_WORD *)v74 + 19) == lpuexcpt + || *((_WORD *)v74 + 18) == lpuexcpt ) + { + goto LABEL_47; + } + std::wstreambuf::sbumpc((_DWORD *)a1); + WORD2(a1) = -1; + v64 = 0; + v59 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v67 = 0; + if ( !v59 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v7 = *((_BYTE *)v74 + 16); +LABEL_47: + v64 = 0; + v67 = 0; + while ( 1 ) + { + if ( v7 && *((_WORD *)v74 + 19) == lpuexcpt || *((_WORD *)v74 + 18) == lpuexcpt ) + { +LABEL_114: + v59 = 0; + goto LABEL_13; + } + if ( *((_WORD *)v74 + 60) != lpuexcpt ) + break; + v26 = v68 == 10 || !v67; + if ( !v26 ) + goto LABEL_53; + v67 = v61 == 0 || v68 == 8; + if ( !v67 ) + { + ++v64; + v67 = v26; + goto LABEL_57; + } + v21 = (_DWORD *)a1; + v64 = 0; + v68 = 8; + v22 = *(_DWORD *)(a1 + 8); + if ( v22 < *(_DWORD *)(a1 + 12) ) + { +LABEL_58: + v21[2] = v22 + 2; + WORD2(a1) = -1; + goto LABEL_59; + } +LABEL_69: + (*(void (__fastcall **)(_DWORD *))(*v21 + 40))(v21); + v21 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + v66 = 1; + goto LABEL_63; + } +LABEL_59: + v23 = (__int16 *)v21[2]; + if ( (unsigned int)v23 >= v21[3] ) + v24 = (*(int (__fastcall **)(_DWORD *))(*v21 + 36))(v21); + else + v24 = *v23; + v66 = 0; + if ( v24 == -1 ) + { + LODWORD(a1) = 0; + v66 = 1; + } +LABEL_63: + v25 = a3 == -1; + v60 = v25 & (a2 != 0); + if ( v60 ) + { + v29 = (_WORD *)a2[2]; + v30 = (unsigned int)v29 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v29; + v25 = 0; + if ( v30 == -1 ) + { + a2 = 0; + v25 = v60; + } + } + if ( v66 == v25 ) + { + v59 = 1; + goto LABEL_13; + } + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v48 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v48 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v48; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + if ( !v67 ) + goto LABEL_114; + v7 = *((_BYTE *)v74 + 16); + } + if ( !v67 ) + goto LABEL_114; +LABEL_53: + if ( *((_WORD *)v74 + 58) != lpuexcpt && *((_WORD *)v74 + 59) != lpuexcpt ) + { + v59 = 0; + v67 = 1; + goto LABEL_13; + } + if ( v68 != 16 && v61 != 0 ) + { + v59 = 0; + v67 = 1; + v54 = v68; + v55 = v68; + goto LABEL_16; + } + v64 = 0; + v67 = 0; + v68 = 16; +LABEL_57: + v21 = (_DWORD *)a1; + v22 = *(_DWORD *)(a1 + 8); + if ( v22 < *(_DWORD *)(a1 + 12) ) + goto LABEL_58; + goto LABEL_69; + } +LABEL_13: + v8 = 22; + if ( v68 != 16 ) + v8 = v68; + v54 = v8; + v55 = v8; +LABEL_16: + v76[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v74 + 16) ) + std::string::reserve((int *)v76, (std::string *)0x20, v52); + v56 = 0xFFFFFFFF / v68; + v62 = *((_BYTE *)v74 + 164); + if ( v62 ) + { + if ( v59 ) + { + v16 = v76[0]; + v65 = 0; + v58 = 0; + v62 = v59; + v17 = *((_DWORD *)v76[0] - 3); + v59 = 0; +LABEL_35: + if ( v17 ) + goto LABEL_84; + goto LABEL_36; + } + v58 = 0; + v65 = 0; + while ( !*((_BYTE *)v74 + 16) || *((_WORD *)v74 + 19) != lpuexcpt ) + { + if ( lpuexcpt == *((_WORD *)v74 + 18) ) + goto LABEL_83; + v27 = (char *)v74 + 120; + v28 = v54; + while ( *(_WORD *)v27 != lpuexcpt ) + { + v27 += 2; + if ( !--v28 ) + goto LABEL_83; + } + v34 = v27 - ((char *)v74 + 120); + v35 = v34 <= 30; + v36 = (v34 >> 1) - 6; + v37 = v34 >> 1; + if ( !v35 ) + v37 = v36; + if ( v56 < v65 ) + { + v58 = v62; + goto LABEL_121; + } + v58 |= ~v37 < v68 * v65; + v38 = (_DWORD *)a1; + v65 = v68 * v65 + v37; + ++v64; + v39 = *(_DWORD *)(a1 + 8); + if ( v39 < *(_DWORD *)(a1 + 12) ) + { +LABEL_122: + v38[2] = v39 + 2; + WORD2(a1) = -1; + goto LABEL_123; + } +LABEL_131: + (*(void (__fastcall **)(_DWORD *))(*v38 + 40))(v38); + v38 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcptc = v62; + goto LABEL_127; + } +LABEL_123: + v40 = (__int16 *)v38[2]; + if ( (unsigned int)v40 >= v38[3] ) + v41 = (*(int (__fastcall **)(_DWORD *))(*v38 + 36))(v38); + else + v41 = *v40; + lpuexcptc = 0; + if ( v41 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v62; + } +LABEL_127: + v42 = a3 == -1; + v57 = v42 & (a2 != 0); + if ( v57 ) + { + v46 = (_WORD *)a2[2]; + v47 = (unsigned int)v46 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v46; + v42 = 0; + if ( v47 == -1 ) + { + a2 = 0; + v42 = v57; + } + } + if ( v42 == lpuexcptc ) + { + v16 = v76[0]; + v17 = *((_DWORD *)v76[0] - 3); + goto LABEL_35; + } + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v43 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v43 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v43; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + } + v16 = v76[0]; + v17 = *((_DWORD *)v76[0] - 3); + if ( !v64 ) + { + v62 = 0; + v59 = *((_BYTE *)v74 + 16); + goto LABEL_35; + } + lpuexcptd = (std::string *)(v17 + 1); + if ( (unsigned int)(v17 + 1) > *((_DWORD *)v76[0] - 2) || *((int *)v76[0] - 1) > 0 ) + std::string::reserve((int *)v76, lpuexcptd, v52); + v44 = v64; + v64 = 0; + v76[0][*((_DWORD *)v76[0] - 3)] = v44; + v45 = v76[0]; + *((_DWORD *)v76[0] - 1) = 0; + *((_DWORD *)v45 - 3) = lpuexcptd; + *((_BYTE *)lpuexcptd + (_DWORD)v45) = 0; +LABEL_121: + v38 = (_DWORD *)a1; + v39 = *(_DWORD *)(a1 + 8); + if ( v39 < *(_DWORD *)(a1 + 12) ) + goto LABEL_122; + goto LABEL_131; + } + if ( v59 ) + { + v51 = v59; + v16 = v76[0]; + v58 = 0; + v59 = 0; + v62 = v51; + v17 = *((_DWORD *)v76[0] - 3); + v65 = 0; + goto LABEL_35; + } + v58 = 0; + v65 = 0; +LABEL_21: + v9 = lpuexcpt; + if ( v55 > 10 ) + { + if ( (unsigned __int16)(lpuexcpt - 48) <= 9u ) + { +LABEL_24: + v10 = lpuexcpt - 48; +LABEL_25: + if ( v56 >= v65 ) + goto LABEL_95; +LABEL_26: + v11 = (_DWORD *)a1; + v58 = 1; + v12 = *(_DWORD *)(a1 + 8); + if ( v12 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_96; +LABEL_27: + v11[2] = v12 + 2; + WORD2(a1) = -1; +LABEL_28: + v13 = (__int16 *)v11[2]; + if ( (unsigned int)v13 >= v11[3] ) + v14 = (*(int (__fastcall **)(_DWORD *))(*v11 + 36))(v11); + else + v14 = *v13; + lpuexcpta = 0; + if ( v14 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } + goto LABEL_32; + } + while ( (unsigned __int16)(lpuexcpt - 97) <= 5u ) + { + v10 = v9 - 87; + if ( v56 < v65 ) + goto LABEL_26; +LABEL_95: + v58 |= ~v10 < v68 * v65; + v11 = (_DWORD *)a1; + v65 = v68 * v65 + v10; + ++v64; + v12 = *(_DWORD *)(a1 + 8); + if ( v12 < *(_DWORD *)(a1 + 12) ) + goto LABEL_27; +LABEL_96: + (*(void (__fastcall **)(_DWORD *))(*v11 + 40))(v11); + v11 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_28; + lpuexcpta = 1; +LABEL_32: + v15 = a3 == -1; + v63 = v15 & (a2 != 0); + if ( v63 ) + { + v32 = (_WORD *)a2[2]; + v33 = (unsigned int)v32 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v32; + v15 = 0; + if ( v33 == -1 ) + { + a2 = 0; + v15 = v63; + } + } + if ( v15 == lpuexcpta ) + { + v16 = v76[0]; + v62 = 1; + v17 = *((_DWORD *)v76[0] - 3); + goto LABEL_35; + } + lpuexcpt = WORD2(a1); + if ( WORD2(a1) != 0xFFFF || !(_DWORD)a1 ) + goto LABEL_21; + v31 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v31 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v31; + if ( lpuexcpt != 0xFFFF ) + goto LABEL_21; + LODWORD(a1) = 0; + v9 = 0xFFFF; + if ( v55 <= 10 ) + goto LABEL_83; + } + if ( (unsigned __int16)(lpuexcpt - 65) <= 5u ) + { + v10 = v9 - 55; + goto LABEL_25; + } + } + else if ( lpuexcpt > 0x2Fu && (unsigned __int16)(v55 + 48) > lpuexcpt ) + { + goto LABEL_24; + } +LABEL_83: + v16 = v76[0]; + v62 = 0; + if ( *((_DWORD *)v76[0] - 3) ) + { +LABEL_84: + std::string::push_back((int *)v76, (std::string *)(char)v64, v52); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v74 + 2), *((_DWORD *)v74 + 3), v76) ) + *a5 = 4; + v16 = v76[0]; + if ( !v64 && !v67 && !*((_DWORD *)v76[0] - 3) ) + goto LABEL_38; + goto LABEL_89; + } +LABEL_36: + if ( !v64 && !v67 ) + goto LABEL_38; +LABEL_89: + if ( v59 ) + { +LABEL_38: + v18 = a5; + *a6 = 0; + *v18 = 4; + goto LABEL_39; + } + if ( v58 ) + { + *a6 = -1; + *a5 = 4; + } + else + { + v49 = -v65; + if ( !v53 ) + v49 = v65; + *a6 = v49; + } +LABEL_39: + if ( v62 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v16 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_154: + std::string::_Rep::_M_destroy((void *)(v16 - 12), (int)&v75); + return lpuexcptb; + } + v19 = *((_DWORD *)v16 - 1); + *((_DWORD *)v16 - 1) = v19 - 1; + if ( v19 <= 0 ) + goto LABEL_154; + return lpuexcptb; +} +// 480747: variable 'v52' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004809C0) -------------------------------------------------------- +__int64 __stdcall std::num_get>::_M_extract_int( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + _WORD *a6) +{ + int v6; // eax + char v7; // al + unsigned int v8; // eax + int v9; // eax + int v10; // eax + int v11; // eax + _DWORD *v12; // ecx + unsigned int v13; // eax + __int16 *v14; // eax + __int16 v15; // ax + char v16; // al + const char *v17; // eax + int v18; // edx + _DWORD *v19; // edx + int v20; // edx + _DWORD *v22; // ecx + unsigned int v23; // eax + __int16 *v24; // eax + __int16 v25; // ax + char v26; // al + bool v27; // al + char *v28; // eax + int v29; // edx + _WORD *v30; // eax + __int16 v31; // dx + _WORD *v32; // eax + _WORD *v33; // eax + __int16 v34; // dx + int v35; // eax + bool v36; // cc + int v37; // edx + int v38; // eax + _DWORD *v39; // ecx + unsigned int v40; // eax + __int16 *v41; // eax + __int16 v42; // ax + char v43; // al + _WORD *v44; // eax + char v45; // bl + const char *v46; // eax + _WORD *v47; // eax + __int16 v48; // dx + _WORD *v49; // eax + int v50; // edx + _WORD *v51; // eax + char v52; // bl + unsigned int v53; // [esp+4h] [ebp-94h] + int v54; // [esp+1Ch] [ebp-7Ch] + bool v55; // [esp+21h] [ebp-77h] + char v56; // [esp+22h] [ebp-76h] + int v57; // [esp+24h] [ebp-74h] + int v58; // [esp+28h] [ebp-70h] + int v59; // [esp+2Ch] [ebp-6Ch] + char v60; // [esp+2Ch] [ebp-6Ch] + char v61; // [esp+2Ch] [ebp-6Ch] + int v62; // [esp+30h] [ebp-68h] + char v63; // [esp+34h] [ebp-64h] + char v64; // [esp+35h] [ebp-63h] + char v65; // [esp+35h] [ebp-63h] + unsigned __int16 v66; // [esp+36h] [ebp-62h] + char v67; // [esp+36h] [ebp-62h] + bool v68; // [esp+38h] [ebp-60h] + int v69; // [esp+3Ch] [ebp-5Ch] + unsigned __int16 lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + __int64 lpuexcptb; // [esp+40h] [ebp-58h] + char lpuexcptc; // [esp+40h] [ebp-58h] + std::string *lpuexcptd; // [esp+40h] [ebp-58h] + struct _Unwind_Exception *v75; // [esp+48h] [ebp-50h] + int v76; // [esp+8Bh] [ebp-Dh] BYREF + const char *v77[2]; // [esp+8Ch] [ebp-Ch] BYREF + + v75 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v59 = v6; + if ( v6 == 64 ) + { + v69 = 8; +LABEL_4: + v64 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v64 ) + { + v62 = 0; + v68 = 0; + v54 = v69; + v57 = v69; + lpuexcpt = 0; + v55 = 0; + goto LABEL_18; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v69 = 10; + goto LABEL_4; + } + v64 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v64 ) + { + v54 = 22; + lpuexcpt = 0; + v62 = 0; + v68 = 0; + v55 = 0; + v69 = 16; + v57 = 22; + goto LABEL_18; + } + v69 = 16; +LABEL_5: + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v51 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v51 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v51; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + v7 = *((_BYTE *)v75 + 16); + v55 = *((_WORD *)v75 + 56) == lpuexcpt; + if ( *((_WORD *)v75 + 56) != lpuexcpt && *((_WORD *)v75 + 57) != lpuexcpt + || v7 && *((_WORD *)v75 + 19) == lpuexcpt + || *((_WORD *)v75 + 18) == lpuexcpt ) + { + goto LABEL_49; + } + v8 = *(_DWORD *)(a1 + 8); + if ( v8 >= *(_DWORD *)(a1 + 12) ) + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + else + *(_DWORD *)(a1 + 8) = v8 + 2; + WORD2(a1) = -1; + v62 = 0; + v64 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v68 = 0; + if ( !v64 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v7 = *((_BYTE *)v75 + 16); +LABEL_49: + v62 = 0; + v68 = 0; + while ( 1 ) + { + if ( v7 && *((_WORD *)v75 + 19) == lpuexcpt || *((_WORD *)v75 + 18) == lpuexcpt ) + { +LABEL_116: + v64 = 0; + goto LABEL_15; + } + if ( *((_WORD *)v75 + 60) != lpuexcpt ) + break; + v27 = v69 == 10 || !v68; + if ( !v27 ) + goto LABEL_55; + v68 = v59 == 0 || v69 == 8; + if ( !v68 ) + { + ++v62; + v68 = v27; + goto LABEL_59; + } + v22 = (_DWORD *)a1; + v62 = 0; + v69 = 8; + v23 = *(_DWORD *)(a1 + 8); + if ( v23 < *(_DWORD *)(a1 + 12) ) + { +LABEL_60: + v22[2] = v23 + 2; + WORD2(a1) = -1; + goto LABEL_61; + } +LABEL_71: + (*(void (__fastcall **)(_DWORD *))(*v22 + 40))(v22); + v22 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + v67 = 1; + goto LABEL_65; + } +LABEL_61: + v24 = (__int16 *)v22[2]; + if ( (unsigned int)v24 >= v22[3] ) + v25 = (*(int (__fastcall **)(_DWORD *))(*v22 + 36))(v22); + else + v25 = *v24; + v67 = 0; + if ( v25 == -1 ) + { + LODWORD(a1) = 0; + v67 = 1; + } +LABEL_65: + v26 = a3 == -1; + v65 = v26 & (a2 != 0); + if ( v65 ) + { + v30 = (_WORD *)a2[2]; + v31 = (unsigned int)v30 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v30; + v26 = 0; + if ( v31 == -1 ) + { + a2 = 0; + v26 = v65; + } + } + if ( v26 == v67 ) + { + v64 = 1; + goto LABEL_15; + } + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v49 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v49 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v49; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + if ( !v68 ) + goto LABEL_116; + v7 = *((_BYTE *)v75 + 16); + } + if ( !v68 ) + goto LABEL_116; +LABEL_55: + if ( *((_WORD *)v75 + 58) != lpuexcpt && *((_WORD *)v75 + 59) != lpuexcpt ) + { + v64 = 0; + v68 = 1; + goto LABEL_15; + } + if ( v69 != 16 && v59 != 0 ) + { + v64 = 0; + v68 = 1; + v54 = v69; + v57 = v69; + goto LABEL_18; + } + v62 = 0; + v68 = 0; + v69 = 16; +LABEL_59: + v22 = (_DWORD *)a1; + v23 = *(_DWORD *)(a1 + 8); + if ( v23 < *(_DWORD *)(a1 + 12) ) + goto LABEL_60; + goto LABEL_71; + } +LABEL_15: + v9 = 22; + if ( v69 != 16 ) + v9 = v69; + v54 = v9; + v57 = v9; +LABEL_18: + v77[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v75 + 16) ) + std::string::reserve((int *)v77, (std::string *)0x20, v53); + v58 = 0xFFFF / v69; + v60 = *((_BYTE *)v75 + 164); + if ( v60 ) + { + if ( v64 ) + { + v17 = v77[0]; + v63 = 0; + v66 = 0; + v60 = v64; + v18 = *((_DWORD *)v77[0] - 3); + v64 = 0; +LABEL_37: + if ( v18 ) + goto LABEL_86; + goto LABEL_38; + } + v63 = 0; + v66 = 0; + while ( !*((_BYTE *)v75 + 16) || *((_WORD *)v75 + 19) != lpuexcpt ) + { + if ( lpuexcpt == *((_WORD *)v75 + 18) ) + goto LABEL_85; + v28 = (char *)v75 + 120; + v29 = v54; + while ( lpuexcpt != *(_WORD *)v28 ) + { + v28 += 2; + if ( !--v29 ) + goto LABEL_85; + } + v35 = v28 - ((char *)v75 + 120); + v36 = v35 <= 30; + v37 = (v35 >> 1) - 6; + v38 = v35 >> 1; + if ( !v36 ) + v38 = v37; + if ( (unsigned __int16)v58 < v66 ) + { + v63 = v60; + goto LABEL_123; + } + v63 |= (unsigned __int16)(v69 * v66) > 0xFFFF - v38; + v39 = (_DWORD *)a1; + v66 = v69 * v66 + v38; + ++v62; + v40 = *(_DWORD *)(a1 + 8); + if ( v40 < *(_DWORD *)(a1 + 12) ) + { +LABEL_124: + v39[2] = v40 + 2; + WORD2(a1) = -1; + goto LABEL_125; + } +LABEL_133: + (*(void (__fastcall **)(_DWORD *))(*v39 + 40))(v39); + v39 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcptc = v60; + goto LABEL_129; + } +LABEL_125: + v41 = (__int16 *)v39[2]; + if ( (unsigned int)v41 >= v39[3] ) + v42 = (*(int (__fastcall **)(_DWORD *))(*v39 + 36))(v39); + else + v42 = *v41; + lpuexcptc = 0; + if ( v42 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v60; + } +LABEL_129: + v43 = a3 == -1; + v56 = v43 & (a2 != 0); + if ( v56 ) + { + v47 = (_WORD *)a2[2]; + v48 = (unsigned int)v47 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v47; + v43 = 0; + if ( v48 == -1 ) + { + a2 = 0; + v43 = v56; + } + } + if ( lpuexcptc == v43 ) + { + v17 = v77[0]; + v18 = *((_DWORD *)v77[0] - 3); + goto LABEL_37; + } + lpuexcpt = WORD2(a1); + if ( WORD2(a1) == 0xFFFF && (_DWORD)a1 ) + { + v44 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v44 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v44; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + } + v17 = v77[0]; + v18 = *((_DWORD *)v77[0] - 3); + if ( !v62 ) + { + v60 = 0; + v64 = *((_BYTE *)v75 + 16); + goto LABEL_37; + } + lpuexcptd = (std::string *)(v18 + 1); + if ( (unsigned int)(v18 + 1) > *((_DWORD *)v77[0] - 2) || *((int *)v77[0] - 1) > 0 ) + std::string::reserve((int *)v77, lpuexcptd, v53); + v45 = v62; + v62 = 0; + v77[0][*((_DWORD *)v77[0] - 3)] = v45; + v46 = v77[0]; + *((_DWORD *)v77[0] - 1) = 0; + *((_DWORD *)v46 - 3) = lpuexcptd; + *((_BYTE *)lpuexcptd + (_DWORD)v46) = 0; +LABEL_123: + v39 = (_DWORD *)a1; + v40 = *(_DWORD *)(a1 + 8); + if ( v40 < *(_DWORD *)(a1 + 12) ) + goto LABEL_124; + goto LABEL_133; + } + if ( v64 ) + { + v52 = v64; + v17 = v77[0]; + v63 = 0; + v64 = 0; + v60 = v52; + v18 = *((_DWORD *)v77[0] - 3); + v66 = 0; + goto LABEL_37; + } + v63 = 0; + v66 = 0; +LABEL_23: + v10 = lpuexcpt; + if ( v57 > 10 ) + { + if ( (unsigned __int16)(lpuexcpt - 48) <= 9u ) + { +LABEL_26: + v11 = lpuexcpt - 48; +LABEL_27: + if ( (unsigned __int16)v58 >= v66 ) + goto LABEL_97; +LABEL_28: + v12 = (_DWORD *)a1; + v63 = 1; + v13 = *(_DWORD *)(a1 + 8); + if ( v13 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_98; +LABEL_29: + v12[2] = v13 + 2; + WORD2(a1) = -1; +LABEL_30: + v14 = (__int16 *)v12[2]; + if ( (unsigned int)v14 >= v12[3] ) + v15 = (*(int (__fastcall **)(_DWORD *))(*v12 + 36))(v12); + else + v15 = *v14; + lpuexcpta = 0; + if ( v15 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } + goto LABEL_34; + } + while ( (unsigned __int16)(lpuexcpt - 97) <= 5u ) + { + v11 = v10 - 87; + if ( (unsigned __int16)v58 < v66 ) + goto LABEL_28; +LABEL_97: + v63 |= (unsigned __int16)(v69 * v66) > 0xFFFF - v11; + v12 = (_DWORD *)a1; + v66 = v69 * v66 + v11; + ++v62; + v13 = *(_DWORD *)(a1 + 8); + if ( v13 < *(_DWORD *)(a1 + 12) ) + goto LABEL_29; +LABEL_98: + (*(void (__fastcall **)(_DWORD *))(*v12 + 40))(v12); + v12 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_30; + lpuexcpta = 1; +LABEL_34: + v16 = a3 == -1; + v61 = v16 & (a2 != 0); + if ( v61 ) + { + v33 = (_WORD *)a2[2]; + v34 = (unsigned int)v33 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v33; + v16 = 0; + if ( v34 == -1 ) + { + a2 = 0; + v16 = v61; + } + } + if ( lpuexcpta == v16 ) + { + v17 = v77[0]; + v60 = 1; + v18 = *((_DWORD *)v77[0] - 3); + goto LABEL_37; + } + lpuexcpt = WORD2(a1); + if ( !(_DWORD)a1 || WORD2(a1) != 0xFFFF ) + goto LABEL_23; + v32 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v32 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v32; + if ( lpuexcpt != 0xFFFF ) + goto LABEL_23; + LODWORD(a1) = 0; + v10 = 0xFFFF; + if ( v57 <= 10 ) + goto LABEL_85; + } + if ( (unsigned __int16)(lpuexcpt - 65) <= 5u ) + { + v11 = v10 - 55; + goto LABEL_27; + } + } + else if ( lpuexcpt > 0x2Fu && (unsigned __int16)(v57 + 48) > lpuexcpt ) + { + goto LABEL_26; + } +LABEL_85: + v17 = v77[0]; + v60 = 0; + if ( *((_DWORD *)v77[0] - 3) ) + { +LABEL_86: + std::string::push_back((int *)v77, (std::string *)(char)v62, v53); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v75 + 2), *((_DWORD *)v75 + 3), v77) ) + *a5 = 4; + v17 = v77[0]; + if ( !v62 && !v68 && !*((_DWORD *)v77[0] - 3) ) + goto LABEL_40; + goto LABEL_91; + } +LABEL_38: + if ( !v62 && !v68 ) + goto LABEL_40; +LABEL_91: + if ( v64 ) + { +LABEL_40: + v19 = a5; + *a6 = 0; + *v19 = 4; + goto LABEL_41; + } + if ( v63 ) + { + *a6 = -1; + *a5 = 4; + } + else + { + v50 = -v66; + if ( !v55 ) + LOWORD(v50) = v66; + *a6 = v50; + } +LABEL_41: + if ( v60 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v17 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_156: + std::string::_Rep::_M_destroy((void *)(v17 - 12), (int)&v76); + return lpuexcptb; + } + v20 = *((_DWORD *)v17 - 1); + *((_DWORD *)v17 - 1) = v20 - 1; + if ( v20 <= 0 ) + goto LABEL_156; + return lpuexcptb; +} +// 481367: variable 'v53' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00481600) -------------------------------------------------------- +__int64 __stdcall std::num_get>::_M_extract_int( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + _DWORD *a6) +{ + int v6; // eax + char v7; // al + int v8; // eax + unsigned __int64 v9; // kr00_8 + int v10; // esi + int v11; // esi + _DWORD *v12; // ecx + unsigned int v13; // eax + __int16 *v14; // eax + __int16 v15; // ax + char v16; // al + const char *v17; // eax + int v18; // edx + _DWORD *v19; // edi + _DWORD *v20; // esi + int v21; // edx + _DWORD *v23; // ecx + unsigned int v24; // eax + __int16 *v25; // eax + __int16 v26; // ax + char v27; // al + bool v28; // al + char *v29; // eax + int v30; // edx + int v31; // ecx + unsigned int v32; // ebx + int *v33; // edi + _DWORD *v34; // ebx + _WORD *v35; // eax + __int16 v36; // dx + _WORD *v37; // eax + _WORD *v38; // eax + __int16 v39; // dx + int v40; // eax + int v41; // esi + _DWORD *v42; // ecx + unsigned int v43; // eax + __int16 *v44; // eax + __int16 v45; // ax + char v46; // al + _WORD *v47; // eax + char v48; // bl + const char *v49; // eax + _WORD *v50; // eax + __int16 v51; // dx + _WORD *v52; // eax + _WORD *v53; // eax + char v54; // bl + unsigned int v55; // [esp+4h] [ebp-B4h] + unsigned int v56; // [esp+4h] [ebp-B4h] + int v57; // [esp+14h] [ebp-A4h] + unsigned __int64 v58; // [esp+18h] [ebp-A0h] + bool v59; // [esp+21h] [ebp-97h] + char v60; // [esp+22h] [ebp-96h] + int v61; // [esp+24h] [ebp-94h] + char v62; // [esp+32h] [ebp-86h] + char v63; // [esp+33h] [ebp-85h] + char v64; // [esp+33h] [ebp-85h] + int v65; // [esp+34h] [ebp-84h] + char v66; // [esp+34h] [ebp-84h] + char v67; // [esp+34h] [ebp-84h] + __int64 v68; // [esp+38h] [ebp-80h] + char v69; // [esp+38h] [ebp-80h] + int v70; // [esp+40h] [ebp-78h] + bool v71; // [esp+44h] [ebp-74h] + int v72; // [esp+48h] [ebp-70h] + unsigned __int64 v73; // [esp+48h] [ebp-70h] + unsigned __int16 lpuexcpt; // [esp+50h] [ebp-68h] + char lpuexcpta; // [esp+50h] [ebp-68h] + __int64 lpuexcptb; // [esp+50h] [ebp-68h] + char lpuexcptc; // [esp+50h] [ebp-68h] + std::string *lpuexcptd; // [esp+50h] [ebp-68h] + struct _Unwind_Exception *v79; // [esp+58h] [ebp-60h] + int v80; // [esp+9Bh] [ebp-1Dh] BYREF + const char *v81[7]; // [esp+9Ch] [ebp-1Ch] BYREF + + v79 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v65 = v6; + if ( v6 == 64 ) + { + v72 = 8; +LABEL_4: + v63 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v63 ) + { + v70 = 0; + v71 = 0; + v57 = v72; + v61 = v72; + lpuexcpt = 0; + v59 = 0; + goto LABEL_16; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v72 = 10; + goto LABEL_4; + } + v63 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v63 ) + { + v70 = 0; + v57 = 22; + lpuexcpt = 0; + v71 = 0; + v59 = 0; + v72 = 16; + v61 = 22; + goto LABEL_16; + } + v72 = 16; +LABEL_5: + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v53 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v53 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v53; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + v7 = *((_BYTE *)v79 + 16); + v59 = *((_WORD *)v79 + 56) == lpuexcpt; + if ( *((_WORD *)v79 + 56) != lpuexcpt && *((_WORD *)v79 + 57) != lpuexcpt + || v7 && *((_WORD *)v79 + 19) == lpuexcpt + || *((_WORD *)v79 + 18) == lpuexcpt ) + { + goto LABEL_49; + } + std::wstreambuf::sbumpc((_DWORD *)a1); + WORD2(a1) = -1; + v70 = 0; + v63 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v71 = 0; + if ( !v63 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v7 = *((_BYTE *)v79 + 16); +LABEL_49: + v70 = 0; + v71 = 0; + while ( 1 ) + { + if ( v7 && *((_WORD *)v79 + 19) == lpuexcpt || *((_WORD *)v79 + 18) == lpuexcpt ) + { +LABEL_118: + v63 = 0; + goto LABEL_13; + } + if ( *((_WORD *)v79 + 60) != lpuexcpt ) + break; + v28 = v72 == 10 || !v71; + if ( !v28 ) + goto LABEL_55; + v71 = v65 == 0 || v72 == 8; + if ( !v71 ) + { + ++v70; + v71 = v28; + goto LABEL_59; + } + v23 = (_DWORD *)a1; + v70 = 0; + v72 = 8; + v24 = *(_DWORD *)(a1 + 8); + if ( v24 < *(_DWORD *)(a1 + 12) ) + { +LABEL_60: + v23[2] = v24 + 2; + WORD2(a1) = -1; + goto LABEL_61; + } +LABEL_71: + (*(void (__fastcall **)(_DWORD *))(*v23 + 40))(v23); + v23 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + v69 = 1; + goto LABEL_65; + } +LABEL_61: + v25 = (__int16 *)v23[2]; + if ( (unsigned int)v25 >= v23[3] ) + v26 = (*(int (__fastcall **)(_DWORD *))(*v23 + 36))(v23); + else + v26 = *v25; + v69 = 0; + if ( v26 == -1 ) + { + LODWORD(a1) = 0; + v69 = 1; + } +LABEL_65: + v27 = a3 == -1; + v64 = v27 & (a2 != 0); + if ( v64 ) + { + v35 = (_WORD *)a2[2]; + v36 = (unsigned int)v35 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v35; + v27 = 0; + if ( v36 == -1 ) + { + a2 = 0; + v27 = v64; + } + } + if ( v27 == v69 ) + { + v63 = 1; + goto LABEL_13; + } + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v52 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v52 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v52; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + if ( !v71 ) + goto LABEL_118; + v7 = *((_BYTE *)v79 + 16); + } + if ( !v71 ) + goto LABEL_118; +LABEL_55: + if ( *((_WORD *)v79 + 58) != lpuexcpt && *((_WORD *)v79 + 59) != lpuexcpt ) + { + v63 = 0; + v71 = 1; + goto LABEL_13; + } + if ( v72 != 16 && v65 != 0 ) + { + v63 = 0; + v71 = 1; + v57 = v72; + v61 = v72; + goto LABEL_16; + } + v70 = 0; + v71 = 0; + v72 = 16; +LABEL_59: + v23 = (_DWORD *)a1; + v24 = *(_DWORD *)(a1 + 8); + if ( v24 < *(_DWORD *)(a1 + 12) ) + goto LABEL_60; + goto LABEL_71; + } +LABEL_13: + v8 = 22; + if ( v72 != 16 ) + v8 = v72; + v57 = v8; + v61 = v8; +LABEL_16: + v81[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v79 + 16) ) + std::string::reserve((int *)v81, (std::string *)0x20, v55); + v58 = 0x8000000000000000LL; + if ( !v59 ) + v58 = 0x7FFFFFFFFFFFFFFFLL; + v68 = v72; + v9 = v58 / v72; + v66 = *((_BYTE *)v79 + 164); + if ( v66 ) + { + if ( v63 ) + { + v17 = v81[0]; + v73 = 0LL; + v66 = v63; + v18 = *((_DWORD *)v81[0] - 3); + v62 = 0; + v63 = 0; +LABEL_37: + if ( v18 ) + goto LABEL_86; + goto LABEL_38; + } + v62 = 0; + v73 = 0LL; + while ( !*((_BYTE *)v79 + 16) || *((_WORD *)v79 + 19) != lpuexcpt ) + { + if ( lpuexcpt == *((_WORD *)v79 + 18) ) + goto LABEL_85; + v29 = (char *)v79 + 120; + v30 = v57; + while ( *(_WORD *)v29 != lpuexcpt ) + { + v29 += 2; + if ( !--v30 ) + goto LABEL_85; + } + v40 = v29 - ((char *)v79 + 120); + v41 = (v40 >> 1) - 6; + if ( v40 <= 30 ) + v41 = v40 >> 1; + if ( v9 < v73 ) + { + v62 = v66; + goto LABEL_125; + } + v62 |= v58 - v41 < v68 * v73; + v42 = (_DWORD *)a1; + v73 = v68 * v73 + v41; + ++v70; + v43 = *(_DWORD *)(a1 + 8); + if ( v43 < *(_DWORD *)(a1 + 12) ) + { +LABEL_126: + v42[2] = v43 + 2; + WORD2(a1) = -1; + goto LABEL_127; + } +LABEL_135: + (*(void (__fastcall **)(_DWORD *))(*v42 + 40))(v42); + v42 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcptc = v66; + goto LABEL_131; + } +LABEL_127: + v44 = (__int16 *)v42[2]; + if ( (unsigned int)v44 >= v42[3] ) + v45 = (*(int (__fastcall **)(_DWORD *))(*v42 + 36))(v42); + else + v45 = *v44; + lpuexcptc = 0; + if ( v45 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v66; + } +LABEL_131: + v46 = a3 == -1; + v60 = v46 & (a2 != 0); + if ( v60 ) + { + v50 = (_WORD *)a2[2]; + v51 = (unsigned int)v50 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v50; + v46 = 0; + if ( v51 == -1 ) + { + a2 = 0; + v46 = v60; + } + } + if ( v46 == lpuexcptc ) + { + v17 = v81[0]; + v18 = *((_DWORD *)v81[0] - 3); + goto LABEL_37; + } + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v47 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v47 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v47; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + } + v17 = v81[0]; + v18 = *((_DWORD *)v81[0] - 3); + if ( !v70 ) + { + v66 = 0; + v63 = *((_BYTE *)v79 + 16); + goto LABEL_37; + } + lpuexcptd = (std::string *)(v18 + 1); + if ( (unsigned int)(v18 + 1) > *((_DWORD *)v81[0] - 2) || *((int *)v81[0] - 1) > 0 ) + std::string::reserve((int *)v81, lpuexcptd, v56); + v48 = v70; + v70 = 0; + v81[0][*((_DWORD *)v81[0] - 3)] = v48; + v49 = v81[0]; + *((_DWORD *)v81[0] - 1) = 0; + *((_DWORD *)v49 - 3) = lpuexcptd; + *((_BYTE *)lpuexcptd + (_DWORD)v49) = 0; +LABEL_125: + v42 = (_DWORD *)a1; + v43 = *(_DWORD *)(a1 + 8); + if ( v43 < *(_DWORD *)(a1 + 12) ) + goto LABEL_126; + goto LABEL_135; + } + if ( v63 ) + { + v54 = v63; + v17 = v81[0]; + v62 = 0; + v63 = 0; + v66 = v54; + v18 = *((_DWORD *)v81[0] - 3); + v73 = 0LL; + goto LABEL_37; + } + v62 = 0; + v73 = 0LL; +LABEL_23: + v10 = lpuexcpt; + if ( v61 > 10 ) + { + if ( (unsigned __int16)(lpuexcpt - 48) <= 9u ) + { +LABEL_26: + v11 = lpuexcpt - 48; + goto LABEL_27; + } + while ( 1 ) + { + if ( (unsigned __int16)(lpuexcpt - 97) > 5u ) + { + if ( (unsigned __int16)(lpuexcpt - 65) > 5u ) + goto LABEL_85; + v11 = v10 - 55; + } + else + { + v11 = v10 - 87; + } +LABEL_27: + if ( v9 >= v73 ) + { + v62 |= v58 - v11 < v68 * v73; + v12 = (_DWORD *)a1; + v73 = v68 * v73 + v11; + ++v70; + v13 = *(_DWORD *)(a1 + 8); + if ( v13 < *(_DWORD *)(a1 + 12) ) + { +LABEL_29: + v12[2] = v13 + 2; + WORD2(a1) = -1; + goto LABEL_30; + } + } + else + { + v12 = (_DWORD *)a1; + v62 = 1; + v13 = *(_DWORD *)(a1 + 8); + if ( v13 < *(_DWORD *)(a1 + 12) ) + goto LABEL_29; + } + (*(void (__fastcall **)(_DWORD *))(*v12 + 40))(v12); + v12 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcpta = 1; + goto LABEL_34; + } +LABEL_30: + v14 = (__int16 *)v12[2]; + if ( (unsigned int)v14 >= v12[3] ) + v15 = (*(int (__fastcall **)(_DWORD *))(*v12 + 36))(v12); + else + v15 = *v14; + lpuexcpta = 0; + if ( v15 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } +LABEL_34: + v16 = a3 == -1; + v67 = v16 & (a2 != 0); + if ( v67 ) + { + v38 = (_WORD *)a2[2]; + v39 = (unsigned int)v38 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v38; + v16 = 0; + if ( v39 == -1 ) + { + a2 = 0; + v16 = v67; + } + } + if ( v16 == lpuexcpta ) + { + v17 = v81[0]; + v66 = 1; + v18 = *((_DWORD *)v81[0] - 3); + goto LABEL_37; + } + lpuexcpt = WORD2(a1); + if ( WORD2(a1) != 0xFFFF || !(_DWORD)a1 ) + goto LABEL_23; + v37 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v37 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v37; + if ( lpuexcpt != 0xFFFF ) + goto LABEL_23; + LODWORD(a1) = 0; + v10 = 0xFFFF; + if ( v61 <= 10 ) + goto LABEL_85; + } + } + if ( lpuexcpt > 0x2Fu && (unsigned __int16)(v61 + 48) > lpuexcpt ) + goto LABEL_26; +LABEL_85: + v17 = v81[0]; + v66 = 0; + if ( *((_DWORD *)v81[0] - 3) ) + { +LABEL_86: + std::string::push_back((int *)v81, (std::string *)(char)v70, v56); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v79 + 2), *((_DWORD *)v79 + 3), v81) ) + *a5 = 4; + v17 = v81[0]; + if ( !v70 && !v71 && !*((_DWORD *)v81[0] - 3) ) + goto LABEL_40; + goto LABEL_91; + } +LABEL_38: + if ( !v70 && !v71 ) + goto LABEL_40; +LABEL_91: + if ( v63 ) + { +LABEL_40: + v19 = a6; + v20 = a5; + *a6 = 0; + v19[1] = 0; + *v20 = 4; + goto LABEL_41; + } + if ( v62 ) + { + v31 = 0; + v32 = 0x80000000; + if ( !v59 ) + { + v31 = -1; + v32 = 0x7FFFFFFF; + } + v33 = a6; + a6[1] = v32; + v34 = a5; + *v33 = v31; + *v34 = 4; + } + else + { + if ( v59 ) + v73 = -(__int64)v73; + *(_QWORD *)a6 = v73; + } +LABEL_41: + if ( v66 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v17 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_158: + std::string::_Rep::_M_destroy((void *)(v17 - 12), (int)&v80); + return lpuexcptb; + } + v21 = *((_DWORD *)v17 - 1); + *((_DWORD *)v17 - 1) = v21 - 1; + if ( v21 <= 0 ) + goto LABEL_158; + return lpuexcptb; +} +// 482107: variable 'v55' is possibly undefined +// 481C47: variable 'v56' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004823E0) -------------------------------------------------------- +__int64 __stdcall std::num_get>::_M_extract_int( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + _DWORD *a6) +{ + int v6; // eax + char v7; // al + int v8; // eax + unsigned __int64 v9; // kr00_8 + int v10; // eax + int v11; // esi + _DWORD *v12; // ecx + unsigned int v13; // eax + __int16 *v14; // eax + __int16 v15; // ax + char v16; // al + const char *v17; // eax + int v18; // edx + _DWORD *v19; // ebx + _DWORD *v20; // edi + int v21; // edx + _DWORD *v23; // ecx + unsigned int v24; // eax + __int16 *v25; // eax + __int16 v26; // ax + char v27; // al + bool v28; // al + char *v29; // eax + int v30; // edx + _WORD *v31; // eax + __int16 v32; // dx + _WORD *v33; // eax + _WORD *v34; // eax + __int16 v35; // dx + int v36; // eax + int v37; // esi + _DWORD *v38; // ecx + unsigned int v39; // eax + __int16 *v40; // eax + __int16 v41; // ax + char v42; // al + _WORD *v43; // eax + char v44; // bl + const char *v45; // eax + _WORD *v46; // eax + __int16 v47; // dx + _WORD *v48; // eax + _DWORD *v49; // ebx + _DWORD *v50; // edi + _WORD *v51; // eax + char v52; // bl + unsigned int v53; // [esp+4h] [ebp-B4h] + unsigned int v54; // [esp+4h] [ebp-B4h] + bool v55; // [esp+1Fh] [ebp-99h] + int v56; // [esp+20h] [ebp-98h] + int v57; // [esp+24h] [ebp-94h] + char v58; // [esp+30h] [ebp-88h] + char v59; // [esp+32h] [ebp-86h] + char v60; // [esp+33h] [ebp-85h] + char v61; // [esp+33h] [ebp-85h] + int v62; // [esp+34h] [ebp-84h] + char v63; // [esp+34h] [ebp-84h] + char v64; // [esp+34h] [ebp-84h] + __int64 v65; // [esp+38h] [ebp-80h] + char v66; // [esp+38h] [ebp-80h] + int v67; // [esp+40h] [ebp-78h] + bool v68; // [esp+44h] [ebp-74h] + int v69; // [esp+48h] [ebp-70h] + unsigned __int64 v70; // [esp+48h] [ebp-70h] + unsigned __int16 lpuexcpt; // [esp+50h] [ebp-68h] + char lpuexcpta; // [esp+50h] [ebp-68h] + __int64 lpuexcptb; // [esp+50h] [ebp-68h] + char lpuexcptc; // [esp+50h] [ebp-68h] + std::string *lpuexcptd; // [esp+50h] [ebp-68h] + struct _Unwind_Exception *v76; // [esp+58h] [ebp-60h] + int v77; // [esp+9Bh] [ebp-1Dh] BYREF + const char *v78[7]; // [esp+9Ch] [ebp-1Ch] BYREF + + v76 = std::__use_cache>::operator()((int *)(a4 + 108)); + v6 = *(_DWORD *)(a4 + 12) & 0x4A; + v62 = v6; + if ( v6 == 64 ) + { + v69 = 8; +LABEL_4: + v60 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v60 ) + { + v67 = 0; + v68 = 0; + v56 = v69; + v57 = v69; + lpuexcpt = 0; + v55 = 0; + goto LABEL_16; + } + goto LABEL_5; + } + if ( v6 != 8 ) + { + v69 = 10; + goto LABEL_4; + } + v60 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v60 ) + { + v67 = 0; + v56 = 22; + lpuexcpt = 0; + v68 = 0; + v55 = 0; + v69 = 16; + v57 = 22; + goto LABEL_16; + } + v69 = 16; +LABEL_5: + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v51 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v51 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v51; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + v7 = *((_BYTE *)v76 + 16); + v55 = *((_WORD *)v76 + 56) == lpuexcpt; + if ( *((_WORD *)v76 + 56) != lpuexcpt && *((_WORD *)v76 + 57) != lpuexcpt + || v7 && *((_WORD *)v76 + 19) == lpuexcpt + || *((_WORD *)v76 + 18) == lpuexcpt ) + { + goto LABEL_47; + } + std::wstreambuf::sbumpc((_DWORD *)a1); + WORD2(a1) = -1; + v67 = 0; + v60 = std::istreambuf_iterator::equal(&a1, (int)&a2); + v68 = 0; + if ( !v60 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v7 = *((_BYTE *)v76 + 16); +LABEL_47: + v67 = 0; + v68 = 0; + while ( 1 ) + { + if ( v7 && *((_WORD *)v76 + 19) == lpuexcpt || *((_WORD *)v76 + 18) == lpuexcpt ) + { +LABEL_117: + v60 = 0; + goto LABEL_13; + } + if ( *((_WORD *)v76 + 60) != lpuexcpt ) + break; + v28 = v69 == 10 || !v68; + if ( !v28 ) + goto LABEL_53; + v68 = v62 == 0 || v69 == 8; + if ( !v68 ) + { + ++v67; + v68 = v28; + goto LABEL_57; + } + v23 = (_DWORD *)a1; + v67 = 0; + v69 = 8; + v24 = *(_DWORD *)(a1 + 8); + if ( v24 < *(_DWORD *)(a1 + 12) ) + { +LABEL_58: + v23[2] = v24 + 2; + WORD2(a1) = -1; + goto LABEL_59; + } +LABEL_69: + (*(void (__fastcall **)(_DWORD *))(*v23 + 40))(v23); + v23 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + v66 = 1; + goto LABEL_63; + } +LABEL_59: + v25 = (__int16 *)v23[2]; + if ( (unsigned int)v25 >= v23[3] ) + v26 = (*(int (__fastcall **)(_DWORD *))(*v23 + 36))(v23); + else + v26 = *v25; + v66 = 0; + if ( v26 == -1 ) + { + LODWORD(a1) = 0; + v66 = 1; + } +LABEL_63: + v27 = a3 == -1; + v61 = v27 & (a2 != 0); + if ( v61 ) + { + v31 = (_WORD *)a2[2]; + v32 = (unsigned int)v31 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v31; + v27 = 0; + if ( v32 == -1 ) + { + a2 = 0; + v27 = v61; + } + } + if ( v66 == v27 ) + { + v60 = 1; + goto LABEL_13; + } + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v48 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v48 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v48; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + if ( !v68 ) + goto LABEL_117; + v7 = *((_BYTE *)v76 + 16); + } + if ( !v68 ) + goto LABEL_117; +LABEL_53: + if ( *((_WORD *)v76 + 58) != lpuexcpt && *((_WORD *)v76 + 59) != lpuexcpt ) + { + v60 = 0; + v68 = 1; + goto LABEL_13; + } + if ( v69 != 16 && v62 != 0 ) + { + v60 = 0; + v68 = 1; + v56 = v69; + v57 = v69; + goto LABEL_16; + } + v67 = 0; + v68 = 0; + v69 = 16; +LABEL_57: + v23 = (_DWORD *)a1; + v24 = *(_DWORD *)(a1 + 8); + if ( v24 < *(_DWORD *)(a1 + 12) ) + goto LABEL_58; + goto LABEL_69; + } +LABEL_13: + v8 = 22; + if ( v69 != 16 ) + v8 = v69; + v56 = v8; + v57 = v8; +LABEL_16: + v78[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v76 + 16) ) + std::string::reserve((int *)v78, (std::string *)0x20, v53); + v65 = v69; + v9 = 0xFFFFFFFFFFFFFFFFLL / v69; + v63 = *((_BYTE *)v76 + 164); + if ( v63 ) + { + if ( v60 ) + { + v17 = v78[0]; + v70 = 0LL; + v63 = v60; + v18 = *((_DWORD *)v78[0] - 3); + v59 = 0; + v60 = 0; +LABEL_35: + if ( v18 ) + goto LABEL_84; + goto LABEL_36; + } + v59 = 0; + v70 = 0LL; + while ( !*((_BYTE *)v76 + 16) || *((_WORD *)v76 + 19) != lpuexcpt ) + { + if ( lpuexcpt == *((_WORD *)v76 + 18) ) + goto LABEL_83; + v29 = (char *)v76 + 120; + v30 = v56; + while ( *(_WORD *)v29 != lpuexcpt ) + { + v29 += 2; + if ( !--v30 ) + goto LABEL_83; + } + v36 = v29 - ((char *)v76 + 120); + v37 = (v36 >> 1) - 6; + if ( v36 <= 30 ) + v37 = v36 >> 1; + if ( v9 < v70 ) + { + v59 = v63; + goto LABEL_122; + } + v59 |= __PAIR64__(~(v37 >> 31), ~v37) < v65 * v70; + v38 = (_DWORD *)a1; + ++v67; + v70 = v65 * v70 + v37; + v39 = *(_DWORD *)(a1 + 8); + if ( v39 < *(_DWORD *)(a1 + 12) ) + { +LABEL_123: + v38[2] = v39 + 2; + WORD2(a1) = -1; + goto LABEL_124; + } +LABEL_132: + (*(void (__fastcall **)(_DWORD *))(*v38 + 40))(v38); + v38 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcptc = v63; + goto LABEL_128; + } +LABEL_124: + v40 = (__int16 *)v38[2]; + if ( (unsigned int)v40 >= v38[3] ) + v41 = (*(int (__fastcall **)(_DWORD *))(*v38 + 36))(v38); + else + v41 = *v40; + lpuexcptc = 0; + if ( v41 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v63; + } +LABEL_128: + v42 = a3 == -1; + v58 = v42 & (a2 != 0); + if ( v58 ) + { + v46 = (_WORD *)a2[2]; + v47 = (unsigned int)v46 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v46; + v42 = 0; + if ( v47 == -1 ) + { + a2 = 0; + v42 = v58; + } + } + if ( v42 == lpuexcptc ) + { + v17 = v78[0]; + v18 = *((_DWORD *)v78[0] - 3); + goto LABEL_35; + } + lpuexcpt = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v43 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v43 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v43; + if ( lpuexcpt == 0xFFFF ) + LODWORD(a1) = 0; + } + } + v17 = v78[0]; + v18 = *((_DWORD *)v78[0] - 3); + if ( !v67 ) + { + v63 = 0; + v60 = *((_BYTE *)v76 + 16); + goto LABEL_35; + } + lpuexcptd = (std::string *)(v18 + 1); + if ( (unsigned int)(v18 + 1) > *((_DWORD *)v78[0] - 2) || *((int *)v78[0] - 1) > 0 ) + std::string::reserve((int *)v78, lpuexcptd, v54); + v44 = v67; + v67 = 0; + v78[0][*((_DWORD *)v78[0] - 3)] = v44; + v45 = v78[0]; + *((_DWORD *)v78[0] - 1) = 0; + *((_DWORD *)v45 - 3) = lpuexcptd; + *((_BYTE *)lpuexcptd + (_DWORD)v45) = 0; +LABEL_122: + v38 = (_DWORD *)a1; + v39 = *(_DWORD *)(a1 + 8); + if ( v39 < *(_DWORD *)(a1 + 12) ) + goto LABEL_123; + goto LABEL_132; + } + if ( v60 ) + { + v52 = v60; + v17 = v78[0]; + v59 = 0; + v60 = 0; + v63 = v52; + v18 = *((_DWORD *)v78[0] - 3); + v70 = 0LL; + goto LABEL_35; + } + v59 = 0; + v70 = 0LL; +LABEL_21: + v10 = lpuexcpt; + if ( v57 > 10 ) + { + if ( (unsigned __int16)(lpuexcpt - 48) <= 9u ) + { +LABEL_24: + v11 = lpuexcpt - 48; + goto LABEL_25; + } + while ( 1 ) + { + v11 = v10 - 87; + if ( (unsigned __int16)(lpuexcpt - 97) > 5u ) + { + if ( (unsigned __int16)(lpuexcpt - 65) > 5u ) + goto LABEL_83; + v11 = v10 - 55; + } +LABEL_25: + if ( v9 >= v70 ) + { + v59 |= __PAIR64__(~(v11 >> 31), ~v11) < v65 * v70; + v12 = (_DWORD *)a1; + ++v67; + v70 = v65 * v70 + v11; + v13 = *(_DWORD *)(a1 + 8); + if ( v13 < *(_DWORD *)(a1 + 12) ) + { +LABEL_27: + v12[2] = v13 + 2; + WORD2(a1) = -1; + goto LABEL_28; + } + } + else + { + v12 = (_DWORD *)a1; + v59 = 1; + v13 = *(_DWORD *)(a1 + 8); + if ( v13 < *(_DWORD *)(a1 + 12) ) + goto LABEL_27; + } + (*(void (__fastcall **)(_DWORD *))(*v12 + 40))(v12); + v12 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcpta = 1; + goto LABEL_32; + } +LABEL_28: + v14 = (__int16 *)v12[2]; + if ( (unsigned int)v14 >= v12[3] ) + v15 = (*(int (__fastcall **)(_DWORD *))(*v12 + 36))(v12); + else + v15 = *v14; + lpuexcpta = 0; + if ( v15 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = 1; + } +LABEL_32: + v16 = a3 == -1; + v64 = v16 & (a2 != 0); + if ( v64 ) + { + v34 = (_WORD *)a2[2]; + v35 = (unsigned int)v34 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v34; + v16 = 0; + if ( v35 == -1 ) + { + a2 = 0; + v16 = v64; + } + } + if ( v16 == lpuexcpta ) + { + v17 = v78[0]; + v63 = 1; + v18 = *((_DWORD *)v78[0] - 3); + goto LABEL_35; + } + lpuexcpt = WORD2(a1); + if ( WORD2(a1) != 0xFFFF || !(_DWORD)a1 ) + goto LABEL_21; + v33 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v33 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v33; + if ( lpuexcpt != 0xFFFF ) + goto LABEL_21; + LODWORD(a1) = 0; + v10 = 0xFFFF; + if ( v57 <= 10 ) + goto LABEL_83; + } + } + if ( lpuexcpt > 0x2Fu && (unsigned __int16)(v57 + 48) > lpuexcpt ) + goto LABEL_24; +LABEL_83: + v17 = v78[0]; + v63 = 0; + if ( *((_DWORD *)v78[0] - 3) ) + { +LABEL_84: + std::string::push_back((int *)v78, (std::string *)(char)v67, v54); + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v76 + 2), *((_DWORD *)v76 + 3), v78) ) + *a5 = 4; + v17 = v78[0]; + if ( !v67 && !v68 && !*((_DWORD *)v78[0] - 3) ) + goto LABEL_38; + goto LABEL_89; + } +LABEL_36: + if ( !v67 && !v68 ) + goto LABEL_38; +LABEL_89: + if ( v60 ) + { +LABEL_38: + v19 = a6; + v20 = a5; + *a6 = 0; + v19[1] = 0; + *v20 = 4; + goto LABEL_39; + } + if ( v59 ) + { + v49 = a6; + v50 = a5; + *a6 = -1; + v49[1] = -1; + *v50 = 4; + } + else + { + if ( v55 ) + v70 = -(__int64)v70; + *(_QWORD *)a6 = v70; + } +LABEL_39: + if ( v63 ) + *a5 |= 2u; + lpuexcptb = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v17 - 1, 0xFFFFFFFF) > 0 ) + return lpuexcptb; +LABEL_155: + std::string::_Rep::_M_destroy((void *)(v17 - 12), (int)&v77); + return lpuexcptb; + } + v21 = *((_DWORD *)v17 - 1); + *((_DWORD *)v17 - 1) = v21 - 1; + if ( v21 <= 0 ) + goto LABEL_155; + return lpuexcptb; +} +// 482EA7: variable 'v53' is possibly undefined +// 4829F7: variable 'v54' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00483180) -------------------------------------------------------- +__int64 __stdcall std::num_get>::_M_extract_float( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + int *a6) +{ + char v6; // cl + int v7; // eax + _DWORD *v8; // ecx + unsigned int v9; // eax + __int16 *v10; // eax + __int16 v11; // ax + char v12; // al + int v13; // eax + int v14; // eax + char v16; // al + char *v17; // eax + bool v18; // zf + int v19; // eax + _DWORD *v20; // ecx + unsigned int v21; // eax + __int16 *v22; // eax + __int16 v23; // ax + char v24; // al + __int16 v25; // dx + _WORD *v26; // eax + unsigned int v27; // eax + __int16 v28; // ax + int v29; // eax + int v30; // eax + _DWORD *v31; // ecx + unsigned int v32; // eax + __int16 *v33; // eax + __int16 v34; // ax + char v35; // al + int v36; // eax + const char *v37; // eax + int v38; // eax + _WORD *v39; // eax + __int16 v40; // dx + char v41; // cl + const char *v42; // eax + std::string *v43; // ebx + int v44; // eax + _WORD *v45; // eax + __int16 v46; // dx + __int16 *v47; // eax + _WORD *v48; // eax + __int16 v49; // dx + _WORD *v50; // eax + __int16 v51; // dx + char v52; // al + char i; // dl + _DWORD *v54; // ecx + unsigned int v55; // eax + __int16 *v56; // eax + __int16 v57; // ax + char v58; // al + int v59; // eax + _WORD *v60; // eax + __int16 v61; // dx + _WORD *v62; // eax + bool v63; // al + unsigned int v64; // [esp+4h] [ebp-84h] + unsigned int v65; // [esp+4h] [ebp-84h] + unsigned int v66; // [esp+Ch] [ebp-7Ch] + int v67; // [esp+14h] [ebp-74h] + char v68; // [esp+14h] [ebp-74h] + int v69; // [esp+14h] [ebp-74h] + char v70; // [esp+1Bh] [ebp-6Dh] + char v71; // [esp+1Ch] [ebp-6Ch] + std::string *v72; // [esp+1Ch] [ebp-6Ch] + std::string *v73; // [esp+1Ch] [ebp-6Ch] + bool v74; // [esp+20h] [ebp-68h] + char v75; // [esp+20h] [ebp-68h] + std::string *v76; // [esp+20h] [ebp-68h] + char v77; // [esp+20h] [ebp-68h] + std::string *v78; // [esp+20h] [ebp-68h] + std::string *v79; // [esp+20h] [ebp-68h] + int v80; // [esp+24h] [ebp-64h] + int v81; // [esp+28h] [ebp-60h] + char v82; // [esp+28h] [ebp-60h] + char v83; // [esp+28h] [ebp-60h] + int v84; // [esp+28h] [ebp-60h] + char v85; // [esp+2Ch] [ebp-5Ch] + char v86; // [esp+2Ch] [ebp-5Ch] + char v87; // [esp+2Ch] [ebp-5Ch] + char v88; // [esp+2Ch] [ebp-5Ch] + std::string *v89; // [esp+2Ch] [ebp-5Ch] + struct _Unwind_Exception *v90; // [esp+30h] [ebp-58h] + __int64 v91; // [esp+30h] [ebp-58h] + __int16 lpuexcpt; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcpta; // [esp+38h] [ebp-50h] + char lpuexcptb; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcptc; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcptd; // [esp+38h] [ebp-50h] + char lpuexcpte; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcptf; // [esp+38h] [ebp-50h] + char lpuexcptg; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcpth; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *lpuexcpti; // [esp+38h] [ebp-50h] + char lpuexcptj; // [esp+38h] [ebp-50h] + int v103; // [esp+7Bh] [ebp-Dh] BYREF + const char *v104[2]; // [esp+7Ch] [ebp-Ch] BYREF + + v90 = std::__use_cache>::operator()((int *)(a4 + 108)); + v74 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( v74 ) + { + v80 = 0; + lpuexcpt = 0; + v85 = 0; + goto LABEL_3; + } + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v51 = *((_WORD *)v90 + 57); + if ( v51 == lpuexcpt ) + { + v52 = *((_BYTE *)v90 + 16); + } + else + { + v52 = *((_BYTE *)v90 + 16); + if ( *((_WORD *)v90 + 56) != lpuexcpt ) + { +LABEL_144: + v80 = 0; + for ( i = 0; ; i = 1 ) + { + if ( v52 && *((_WORD *)v90 + 19) == lpuexcpt + || *((_WORD *)v90 + 18) == lpuexcpt + || *((_WORD *)v90 + 60) != lpuexcpt ) + { + v85 = i; + goto LABEL_3; + } + if ( i ) + { + v54 = (_DWORD *)a1; + ++v80; + v55 = *(_DWORD *)(a1 + 8); + if ( v55 < *(_DWORD *)(a1 + 12) ) + goto LABEL_151; + } + else + { + v84 = *(_DWORD *)(*a6 - 12); + v89 = (std::string *)(v84 + 1); + if ( (unsigned int)(v84 + 1) > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, v89, v64); + ++v80; + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = 48; + v59 = *a6; + *(_DWORD *)(v59 - 12) = v89; + *(_DWORD *)(v59 - 4) = 0; + *(_BYTE *)(v59 + v84 + 1) = 0; + v54 = (_DWORD *)a1; + v55 = *(_DWORD *)(a1 + 8); + if ( v55 < *(_DWORD *)(a1 + 12) ) + { +LABEL_151: + v54[2] = v55 + 2; + WORD2(a1) = -1; + goto LABEL_152; + } + } + (*(void (__fastcall **)(_DWORD *))(*v54 + 40))(v54); + v54 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + v88 = 1; + goto LABEL_156; + } +LABEL_152: + v56 = (__int16 *)v54[2]; + if ( (unsigned int)v56 >= v54[3] ) + v57 = (*(int (__fastcall **)(_DWORD *))(*v54 + 36))(v54); + else + v57 = *v56; + v88 = 0; + if ( v57 == -1 ) + { + LODWORD(a1) = 0; + v88 = 1; + } +LABEL_156: + v58 = a3 == -1; + v83 = v58 & (a2 != 0); + if ( v83 ) + { + v60 = (_WORD *)a2[2]; + v61 = (unsigned int)v60 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v60; + v58 = 0; + if ( v61 == -1 ) + { + a2 = 0; + v58 = v83; + } + } + if ( v58 == v88 ) + { + v85 = 1; + v74 = 1; + goto LABEL_3; + } + lpuexcpt = WORD2(a1); + if ( WORD2(a1) == 0xFFFF && (_DWORD)a1 ) + { + v62 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v62 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v62; + if ( lpuexcpt == -1 ) + LODWORD(a1) = 0; + } + v52 = *((_BYTE *)v90 + 16); + } + } + } + if ( v52 && *((_WORD *)v90 + 19) == lpuexcpt || *((_WORD *)v90 + 18) == lpuexcpt ) + goto LABEL_144; + std::string::push_back(a6, (std::string *)(2 * (v51 != lpuexcpt) + 43), v64); + std::wstreambuf::sbumpc((_DWORD *)a1); + WORD2(a1) = -1; + v63 = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( !v63 ) + { + lpuexcpt = std::istreambuf_iterator::_M_get((int)&a1); + v52 = *((_BYTE *)v90 + 16); + goto LABEL_144; + } + v85 = 0; + v74 = v63; + v80 = 0; +LABEL_3: + v104[0] = (const char *)std::string::_S_construct(0, 0); + if ( *((_BYTE *)v90 + 16) ) + std::string::reserve((int *)v104, (std::string *)0x20, v65); + v70 = *((_BYTE *)v90 + 164); + if ( !v70 ) + { + if ( !v74 ) + { + v75 = 0; + v71 = 0; +LABEL_8: + if ( (unsigned __int16)(lpuexcpt - 48) <= 9u ) + { + v86 = lpuexcpt; + v81 = *(_DWORD *)(*a6 - 12); + lpuexcpta = (struct _Unwind_Exception *)(v81 + 1); + if ( (unsigned int)(v81 + 1) > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, lpuexcpta, v65); + v6 = v86; + v85 = 1; + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = v6; + v7 = *a6; + *(_DWORD *)(v7 - 4) = 0; + *(_DWORD *)(v7 - 12) = lpuexcpta; + *(_BYTE *)(v7 + v81 + 1) = 0; + goto LABEL_13; + } + while ( 1 ) + { + if ( *((_WORD *)v90 + 18) == lpuexcpt && !((unsigned __int8)v75 | (unsigned __int8)v71) ) + { + v71 = 1; + std::string::push_back(a6, (std::string *)0x2E, v65); + v75 = 0; +LABEL_13: + v8 = (_DWORD *)a1; + v9 = *(_DWORD *)(a1 + 8); + if ( v9 >= *(_DWORD *)(a1 + 12) ) + goto LABEL_78; +LABEL_14: + v8[2] = v9 + 2; + WORD2(a1) = -1; +LABEL_15: + v10 = (__int16 *)v8[2]; + if ( (unsigned int)v10 >= v8[3] ) + v11 = (*(int (__fastcall **)(_DWORD *))(*v8 + 36))(v8); + else + v11 = *v10; + lpuexcptb = 0; + if ( v11 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptb = 1; + } + goto LABEL_19; + } + if ( *((_WORD *)v90 + 74) != lpuexcpt && *((_WORD *)v90 + 80) != lpuexcpt ) + goto LABEL_21; + v85 &= v75 ^ 1; + if ( !v85 ) + goto LABEL_21; + std::string::push_back(a6, (std::string *)0x65, v65); + v27 = *(_DWORD *)(a1 + 8); + if ( v27 >= *(_DWORD *)(a1 + 12) ) + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + else + *(_DWORD *)(a1 + 8) = v27 + 2; + WORD2(a1) = -1; + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) ) + goto LABEL_200; + v28 = std::istreambuf_iterator::_M_get((int)&a1); + lpuexcpt = v28; + if ( *((_WORD *)v90 + 57) == v28 ) + { + v29 = 43; + } + else + { + if ( *((_WORD *)v90 + 56) != v28 ) + { + v75 = v85; + goto LABEL_8; + } + v29 = 45; + } + std::string::push_back(a6, (std::string *)v29, v65); + v8 = (_DWORD *)a1; + v75 = v85; + v9 = *(_DWORD *)(a1 + 8); + if ( v9 < *(_DWORD *)(a1 + 12) ) + goto LABEL_14; +LABEL_78: + (*(void (__fastcall **)(_DWORD *))(*v8 + 40))(v8); + v8 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_15; + lpuexcptb = 1; +LABEL_19: + v12 = a3 == -1; + v82 = v12 & (a2 != 0); + if ( v82 ) + { + v39 = (_WORD *)a2[2]; + v40 = (unsigned int)v39 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v39; + v12 = 0; + if ( v40 == -1 ) + { + a2 = 0; + v12 = v82; + } + } + if ( lpuexcptb == v12 ) + goto LABEL_21; + lpuexcpt = WORD2(a1); + if ( WORD2(a1) != 0xFFFF || !(_DWORD)a1 ) + goto LABEL_8; + v26 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v26 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v26; + if ( lpuexcpt != -1 ) + goto LABEL_8; + LODWORD(a1) = 0; + } + } +LABEL_203: + lpuexcptc = (struct _Unwind_Exception *)v104[0]; + if ( *((_DWORD *)v104[0] - 3) ) + goto LABEL_25; + goto LABEL_28; + } + if ( v74 ) + goto LABEL_203; + v75 = 0; + v71 = 0; + v16 = *((_BYTE *)v90 + 16); + while ( 1 ) + { + if ( v16 && *((_WORD *)v90 + 19) == lpuexcpt ) + { + v71 |= v75; + if ( v71 ) + { + lpuexcptc = (struct _Unwind_Exception *)v104[0]; + v36 = *((_DWORD *)v104[0] - 3); +LABEL_197: + if ( v36 ) + goto LABEL_26; + goto LABEL_28; + } + if ( !v80 ) + { + std::string::_M_mutate((char **)a6, 0, *(_DWORD *)(*a6 - 12), 0, v66); + lpuexcptc = (struct _Unwind_Exception *)v104[0]; + if ( *((_DWORD *)v104[0] - 3) ) + goto LABEL_25; + goto LABEL_28; + } + v78 = (std::string *)*((_DWORD *)v104[0] - 3); + lpuexcpti = (std::string *)((char *)v78 + 1); + if ( (unsigned int)v78 + 1 > *((_DWORD *)v104[0] - 2) || *((int *)v104[0] - 1) > 0 ) + std::string::reserve((int *)v104, lpuexcpti, v65); + v41 = v80; + v80 = 0; + v104[0][*((_DWORD *)v104[0] - 3)] = v41; + v42 = v104[0]; + *((_DWORD *)v104[0] - 3) = lpuexcpti; + v43 = v78; + *((_DWORD *)v42 - 1) = 0; + v75 = 0; + *((_BYTE *)v43 + (_DWORD)v42 + 1) = 0; +LABEL_84: + v31 = (_DWORD *)a1; + v32 = *(_DWORD *)(a1 + 8); + if ( v32 < *(_DWORD *)(a1 + 12) ) + goto LABEL_85; + goto LABEL_105; + } + v17 = (char *)v90 + 120; + if ( *((_WORD *)v90 + 18) != lpuexcpt ) + { + do + { + if ( *(_WORD *)v17 == lpuexcpt ) + { + v87 = ((v17 - ((char *)v90 + 120)) >> 1) + 48; + v67 = *(_DWORD *)(*a6 - 12); + lpuexcptf = (struct _Unwind_Exception *)(v67 + 1); + if ( (unsigned int)(v67 + 1) > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, lpuexcptf, v65); + ++v80; + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = v87; + v30 = *a6; + *(_DWORD *)(v30 - 12) = lpuexcptf; + *(_DWORD *)(v30 - 4) = 0; + *(_BYTE *)(v30 + v67 + 1) = 0; + v85 = v70; + goto LABEL_84; + } + v17 += 2; + } + while ( v17 != (char *)v90 + 140 ); + if ( *((_WORD *)v90 + 74) != lpuexcpt && *((_WORD *)v90 + 80) != lpuexcpt ) + break; + v18 = (((unsigned __int8)v75 ^ 1) & (unsigned __int8)v85) == 0; + v85 &= v75 ^ 1; + lpuexcptc = (struct _Unwind_Exception *)v104[0]; + v13 = *((_DWORD *)v104[0] - 3); + if ( v18 ) + goto LABEL_22; + if ( v13 && !v71 ) + std::string::push_back((int *)v104, (std::string *)(char)v80, v65); + v76 = *(std::string **)(*a6 - 12); + lpuexcptd = (std::string *)((char *)v76 + 1); + if ( (unsigned int)v76 + 1 > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, lpuexcptd, v65); + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = 101; + v19 = *a6; + *(_DWORD *)(v19 - 12) = lpuexcptd; + *(_DWORD *)(v19 - 4) = 0; + *((_BYTE *)v76 + v19 + 1) = 0; + v20 = (_DWORD *)a1; + v21 = *(_DWORD *)(a1 + 8); + if ( v21 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v20 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( (_DWORD)a1 ) + goto LABEL_49; + lpuexcpte = v85; + } + else + { + *(_DWORD *)(a1 + 8) = v21 + 2; + WORD2(a1) = -1; +LABEL_49: + v22 = (__int16 *)v20[2]; + if ( (unsigned int)v22 >= v20[3] ) + v23 = (*(int (__fastcall **)(_DWORD *))(*v20 + 36))(v20); + else + v23 = *v22; + lpuexcpte = 0; + if ( v23 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpte = v85; + } + } + v24 = a3 == -1; + v77 = v24 & (a2 != 0); + if ( v77 ) + { + v48 = (_WORD *)a2[2]; + v49 = (unsigned int)v48 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v48; + v24 = 0; + if ( v49 == -1 ) + { + a2 = 0; + v24 = v77; + } + } + if ( v24 == lpuexcpte ) + { +LABEL_200: + lpuexcptc = (struct _Unwind_Exception *)v104[0]; + if ( *((_DWORD *)v104[0] - 3) ) + goto LABEL_26; + goto LABEL_28; + } + lpuexcpt = WORD2(a1); + if ( WORD2(a1) == 0xFFFF && (_DWORD)a1 ) + { + v50 = *(_WORD **)(a1 + 8); + lpuexcpt = (unsigned int)v50 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v50; + if ( lpuexcpt == -1 ) + LODWORD(a1) = 0; + } + v25 = *((_WORD *)v90 + 57); + v16 = *((_BYTE *)v90 + 16); + if ( v25 != lpuexcpt && *((_WORD *)v90 + 56) != lpuexcpt ) + goto LABEL_59; + if ( v16 && *((_WORD *)v90 + 19) == lpuexcpt ) + { + v75 = *((_BYTE *)v90 + 16); + v85 = v75; + continue; + } + if ( *((_WORD *)v90 + 18) == lpuexcpt ) + { +LABEL_59: + v75 = v85; + continue; + } + lpuexcptj = 2 * (v25 != lpuexcpt) + 43; + v69 = *(_DWORD *)(*a6 - 12); + v79 = (std::string *)(v69 + 1); + if ( (unsigned int)(v69 + 1) > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, v79, v65); + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = lpuexcptj; + v44 = *a6; + *(_DWORD *)(v44 - 12) = v79; + *(_DWORD *)(v44 - 4) = 0; + *(_BYTE *)(v44 + v69 + 1) = 0; + v75 = v85; + goto LABEL_84; + } + v18 = ((unsigned __int8)v71 | (unsigned __int8)v75) == 0; + v75 |= v71; + lpuexcptc = (struct _Unwind_Exception *)v104[0]; + v36 = *((_DWORD *)v104[0] - 3); + if ( !v18 ) + goto LABEL_197; + if ( v36 ) + { + v72 = (std::string *)(v36 + 1); + if ( (unsigned int)(v36 + 1) > *((_DWORD *)v104[0] - 2) || *((int *)v104[0] - 1) > 0 ) + std::string::reserve((int *)v104, v72, v65); + v104[0][*((_DWORD *)v104[0] - 3)] = v80; + v37 = v104[0]; + *((_DWORD *)v104[0] - 1) = 0; + *((_DWORD *)v37 - 3) = v72; + *((_BYTE *)v72 + (_DWORD)v37) = 0; + } + v73 = *(std::string **)(*a6 - 12); + lpuexcpth = (std::string *)((char *)v73 + 1); + if ( (unsigned int)v73 + 1 > *(_DWORD *)(*a6 - 8) || *(int *)(*a6 - 4) > 0 ) + std::string::reserve(a6, lpuexcpth, v65); + *(_BYTE *)(*a6 + *(_DWORD *)(*a6 - 12)) = 46; + v38 = *a6; + *(_DWORD *)(v38 - 12) = lpuexcpth; + *(_DWORD *)(v38 - 4) = 0; + *((_BYTE *)v73 + v38 + 1) = 0; + v31 = (_DWORD *)a1; + v71 = v70; + v32 = *(_DWORD *)(a1 + 8); + if ( v32 < *(_DWORD *)(a1 + 12) ) + { +LABEL_85: + v31[2] = v32 + 2; + WORD2(a1) = -1; + goto LABEL_86; + } +LABEL_105: + (*(void (__fastcall **)(_DWORD *))(*v31 + 40))(v31); + v31 = (_DWORD *)a1; + WORD2(a1) = -1; + if ( !(_DWORD)a1 ) + { + lpuexcptg = v70; + goto LABEL_90; + } +LABEL_86: + v33 = (__int16 *)v31[2]; + if ( (unsigned int)v33 >= v31[3] ) + v34 = (*(int (__fastcall **)(_DWORD *))(*v31 + 36))(v31); + else + v34 = *v33; + lpuexcptg = 0; + if ( v34 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptg = v70; + } +LABEL_90: + v35 = a3 == -1; + v68 = v35 & (a2 != 0); + if ( v68 ) + { + v45 = (_WORD *)a2[2]; + v46 = (unsigned int)v45 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v45; + v35 = 0; + if ( v46 == -1 ) + { + a2 = 0; + v35 = v68; + } + } + if ( lpuexcptg == v35 ) + break; + lpuexcpt = WORD2(a1); + if ( WORD2(a1) == 0xFFFF && (_DWORD)a1 ) + { + v47 = *(__int16 **)(a1 + 8); + if ( (unsigned int)v47 >= *(_DWORD *)(a1 + 12) ) + lpuexcpt = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + else + lpuexcpt = *v47; + v16 = *((_BYTE *)v90 + 16); + if ( lpuexcpt == -1 ) + LODWORD(a1) = 0; + } + else + { + v16 = *((_BYTE *)v90 + 16); + } + } +LABEL_21: + lpuexcptc = (struct _Unwind_Exception *)v104[0]; + v13 = *((_DWORD *)v104[0] - 3); +LABEL_22: + if ( !v13 ) + goto LABEL_28; + if ( v71 || v75 ) + goto LABEL_26; +LABEL_25: + std::string::push_back((int *)v104, (std::string *)(char)v80, v65); + lpuexcptc = (struct _Unwind_Exception *)v104[0]; +LABEL_26: + if ( !(unsigned __int8)std::__verify_grouping(*((char **)v90 + 2), *((_DWORD *)v90 + 3), v104) ) + *a5 = 4; +LABEL_28: + v91 = a1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)lpuexcptc - 1, 0xFFFFFFFF) > 0 ) + return v91; +LABEL_141: + std::string::_Rep::_M_destroy((char *)lpuexcptc - 12, (int)&v103); + return v91; + } + v14 = *((_DWORD *)lpuexcptc - 1); + *((_DWORD *)lpuexcptc - 1) = v14 - 1; + if ( v14 <= 0 ) + goto LABEL_141; + return v91; +} +// 483BA4: variable 'v65' is possibly undefined +// 483CC5: variable 'v64' is possibly undefined +// 484066: variable 'v66' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004840E0) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int (__stdcall *v7)(__int64, _DWORD *, __int16, int, _DWORD *, _DWORD *); // eax + int v8; // edi + int result; // eax + int v10; // ecx + int v11[8]; // [esp+4Ch] [ebp-20h] BYREF + + v7 = *(int (__stdcall **)(__int64, _DWORD *, __int16, int, _DWORD *, _DWORD *))(*(_DWORD *)this + 48); + if ( v7 != std::num_get>::do_get ) + return ((int (__fastcall *)(void *, _DWORD *, _DWORD, _DWORD, _DWORD *, int, int, _DWORD *, int *))v7)( + this, + a6, + a2, + HIDWORD(a2), + a3, + a4, + a5, + a6, + a7); + v8 = *(_DWORD *)(a5 + 12); + *(_DWORD *)(a5 + 12) = v8 & 0xFFFFFFB5 | 8; + result = std::num_get>::_M_extract_int( + a2, + a3, + a4, + a5, + a6, + v11); + v10 = v11[0]; + *(_DWORD *)(a5 + 12) = v8; + *a7 = v10; + return result; +} +// 4840E0: using guessed type int var_20[8]; + +//----- (004841B0) -------------------------------------------------------- +int __fastcall std::num_get>::get(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 8))(a1); +} + +//----- (004841C0) -------------------------------------------------------- +int __fastcall std::num_get>::get(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 40))(a1); +} + +//----- (004841D0) -------------------------------------------------------- +int __fastcall std::num_get>::get(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 44))(a1); +} + +//----- (004841E0) -------------------------------------------------------- +int __fastcall std::num_get>::get(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 36))(a1); +} + +//----- (004841F0) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 20); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int(a2, a3, a4, a5, a6, a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 485100: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (00484270) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 12); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int(a2, a3, a4, a5, a6, a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 485110: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (004842F0) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 24); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int( + a2, + a3, + a4, + a5, + a6, + a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 485120: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (00484370) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _WORD *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 16); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int( + a2, + a3, + a4, + a5, + a6, + a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 485130: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (004843F0) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 28); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int(a2, a3, a4, a5, a6, a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 485140: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (00484470) -------------------------------------------------------- +int __thiscall std::num_get>::get( + void *this, + __int64 a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7) +{ + int (__stdcall *v7)(int, int, int, int, int, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, int, int, int, int, int))(*(_DWORD *)this + 32); + if ( v7 == std::num_get>::do_get ) + return std::num_get>::_M_extract_int( + a2, + a3, + a4, + a5, + a6, + a7); + else + return v7(a2, HIDWORD(a2), (int)a3, a4, a5, (int)a6, (int)a7); +} +// 485150: using guessed type int __stdcall std::num_get>::do_get(int, int, int, int, int, int, int); + +//----- (004844F0) -------------------------------------------------------- +int __stdcall std::num_get>::do_get( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + _DWORD *a6) +{ + int v6; // edi + int result; // eax + int v8[8]; // [esp+3Ch] [ebp-20h] BYREF + + v6 = *(_DWORD *)(a4 + 12); + *(_DWORD *)(a4 + 12) = v6 & 0xFFFFFFB5 | 8; + result = std::num_get>::_M_extract_int( + a1, + a2, + a3, + a4, + a5, + v8); + *(_DWORD *)(a4 + 12) = v6; + *a6 = v8[0]; + return result; +} +// 4844F0: using guessed type int var_20[8]; + +//----- (00484590) -------------------------------------------------------- +__int64 __stdcall std::num_get>::do_get( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + int *a5, + _BYTE *a6) +{ + _BYTE *v6; // edx + struct _Unwind_Exception *v8; // eax + int v9; // ecx + struct _Unwind_Exception *v10; // esi + int v11; // eax + bool v12; // dl + __int16 v13; // ax + unsigned int v14; // ebp + char v15; // di + unsigned int v16; // eax + bool v17; // cl + char v18; // si + char v19; // di + char v20; // al + char v21; // di + unsigned __int16 v22; // ax + __int16 *v23; // eax + __int16 v24; // cx + bool v25; // bl + struct _Unwind_Exception *v26; // esi + char v27; // dl + __int16 *v28; // eax + __int16 v29; // ax + unsigned __int16 *v30; // eax + int v31; // eax + __int16 v32; // ax + struct _Unwind_Exception *v33; // [esp+20h] [ebp-3Ch] + bool v34; // [esp+24h] [ebp-38h] + bool v35; // [esp+25h] [ebp-37h] + char v36; // [esp+26h] [ebp-36h] + bool v37; // [esp+27h] [ebp-35h] + bool v38; // [esp+27h] [ebp-35h] + bool v39; // [esp+27h] [ebp-35h] + __int64 v40; // [esp+28h] [ebp-34h] + int v41[8]; // [esp+3Ch] [ebp-20h] BYREF + + if ( (*(_BYTE *)(a4 + 12) & 1) == 0 ) + { + v41[0] = -1; + v40 = std::num_get>::_M_extract_int(a1, a2, a3, a4, a5, v41); + LODWORD(a1) = v40; + WORD2(a1) = WORD2(v40); + if ( v41[0] > 1u ) + { + *a6 = 1; + *a5 = 4; + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) ) + *a5 |= 2u; + } + else + { + v6 = a6; + *a6 = v41[0]; + *v6 &= 1u; + } + return a1; + } + v8 = std::__use_cache>::operator()((int *)(a4 + 108)); + v9 = *((_DWORD *)v8 + 8); + v10 = v8; + v11 = *((_DWORD *)v8 + 6); + v12 = v9 == 0; + v35 = v11 == 0; + if ( !(v11 | v9) ) + goto LABEL_55; + v33 = v10; + v13 = WORD2(a1); + v14 = 0; + v36 = 1; + v34 = 1; + while ( 1 ) + { + v18 = v13 == -1; + v19 = v18 & ((_DWORD)a1 != 0); + if ( v19 ) + { + v28 = *(__int16 **)(a1 + 8); + if ( (unsigned int)v28 >= *(_DWORD *)(a1 + 12) ) + { + v38 = v12; + v29 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 36))(a1); + v12 = v38; + } + else + { + v29 = *v28; + } + v18 = 0; + if ( v29 == -1 ) + { + LODWORD(a1) = 0; + v18 = v19; + } + } + v20 = a3 == -1; + v21 = v20 & (a2 != 0); + if ( v21 ) + { + v23 = (__int16 *)a2[2]; + if ( (unsigned int)v23 >= a2[3] ) + { + v37 = v12; + v32 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + v12 = v37; + v24 = v32; + } + else + { + v24 = *v23; + } + v20 = 0; + if ( v24 == -1 ) + break; + } + if ( v18 == v20 ) + goto LABEL_35; +LABEL_20: + v22 = WORD2(a1); + if ( WORD2(a1) == 0xFFFF && (_DWORD)a1 ) + { + v30 = *(unsigned __int16 **)(a1 + 8); + if ( (unsigned int)v30 >= *(_DWORD *)(a1 + 12) ) + { + v39 = v12; + v22 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + v12 = v39; + } + else + { + v22 = *v30; + } + if ( v22 == 0xFFFF ) + LODWORD(a1) = 0; + } + if ( !v12 ) + v34 = *(_WORD *)(*((_DWORD *)v33 + 7) + 2 * v14) == v22; + if ( !v34 ) + { + if ( v35 ) + { + if ( v36 ) + { + if ( *((_DWORD *)v33 + 6) == v14 && v14 ) + { + *a6 = 1; + v31 = 0; +LABEL_68: + *a5 = v31; + return a1; + } +LABEL_55: + *a6 = 0; + goto LABEL_56; + } +LABEL_57: + *a6 = 0; + *a5 = 4; + return a1; + } +LABEL_8: + v36 = *(_WORD *)(*((_DWORD *)v33 + 5) + 2 * v14) == v22; + goto LABEL_9; + } + if ( !v35 ) + goto LABEL_8; +LABEL_9: + v15 = v12 & (v36 ^ 1); + if ( v15 ) + { + if ( v34 ) + { + if ( *((_DWORD *)v33 + 8) == v14 && v14 ) + { + *a6 = 0; + v31 = 0; + goto LABEL_68; + } + goto LABEL_55; + } + goto LABEL_57; + } + if ( !(v34 | (unsigned __int8)v36) ) + goto LABEL_57; + ++v14; + v16 = *(_DWORD *)(a1 + 8); + if ( v16 >= *(_DWORD *)(a1 + 12) ) + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + else + *(_DWORD *)(a1 + 8) = v16 + 2; + WORD2(a1) = -1; + if ( !v34 ) + { + v12 = v36; +LABEL_30: + v35 = *((_DWORD *)v33 + 6) <= v14; + v36 |= v34; + v17 = v12 && v35; + goto LABEL_16; + } + v12 = *((_DWORD *)v33 + 8) <= v14; + if ( v36 ) + goto LABEL_30; + v17 = *((_DWORD *)v33 + 8) <= v14; + v35 = v34; +LABEL_16: + v13 = -1; + if ( v17 ) + { + v25 = v34; + v26 = v33; + v27 = v15; + goto LABEL_36; + } + } + a2 = 0; + if ( v18 != v21 ) + goto LABEL_20; +LABEL_35: + v25 = v34; + v26 = v33; + v27 = 1; +LABEL_36: + if ( v25 && *((_DWORD *)v26 + 8) == v14 && v14 ) + { + *a6 = 0; + if ( !v36 || *((_DWORD *)v26 + 6) != v14 ) + goto LABEL_71; +LABEL_56: + *a5 = 4; + return a1; + } + if ( v36 && *((_DWORD *)v26 + 6) == v14 && v14 ) + { + *a6 = 1; +LABEL_71: + v31 = 2 * (v27 != 0); + goto LABEL_68; + } + *a6 = 0; + if ( !v27 ) + goto LABEL_56; + *a5 = 6; + return a1; +} +// 484590: using guessed type unsigned int var_20[8]; + +//----- (00484A10) -------------------------------------------------------- +std::locale::facet *__stdcall std::num_get>::do_get( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + double *a6) +{ + __int64 v6; // rax + char v7; // dl + int v8; // ecx + int v9; // eax + __int16 *v11; // eax + __int16 v12; // ax + __int16 *v13; // eax + __int16 v14; // ax + unsigned __int8 v15; // dl + bool v16; // zf + std::locale::facet *v17; // eax + unsigned int v18; // [esp+4h] [ebp-94h] + std::locale::facet *v19; // [esp+30h] [ebp-68h] + std::locale::facet *v20; // [esp+38h] [ebp-60h] + __int16 lpuexcpta; // [esp+40h] [ebp-58h] + unsigned __int8 lpuexcpt; // [esp+40h] [ebp-58h] + int v23; // [esp+88h] [ebp-10h] BYREF + int v24[3]; // [esp+8Ch] [ebp-Ch] BYREF + + v23 = (int)std::string::_S_construct(0, 0); + std::string::reserve(&v23, (std::string *)0x20, v18); + v6 = std::num_get>::_M_extract_float(a1, a2, a3, a4, a5, &v23); + lpuexcpta = WORD2(v6); + v20 = (std::locale::facet *)v6; + v19 = (std::locale::facet *)v6; + v24[0] = std::locale::facet::_S_get_c_locale(); + std::__convert_to_v((unsigned __int8 *)v23, a6, a5); + lpuexcpt = lpuexcpta == -1; + if ( (lpuexcpt & (v19 != 0)) != 0 ) + { + v13 = (__int16 *)*((_DWORD *)v20 + 2); + if ( (unsigned int)v13 >= *((_DWORD *)v20 + 3) ) + v14 = (*(int (__fastcall **)(std::locale::facet *))(*(_DWORD *)v20 + 36))(v20); + else + v14 = *v13; + v15 = lpuexcpt & (v20 != 0); + v16 = v14 == -1; + if ( v14 != -1 ) + v15 = 0; + v17 = 0; + if ( !v16 ) + v17 = v20; + lpuexcpt = v15; + v19 = v17; + } + v7 = a3 == -1; + if ( a2 && a3 == -1 ) + { + v11 = (__int16 *)a2[2]; + if ( (unsigned int)v11 >= a2[3] ) + v12 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v12 = *v11; + v7 = v12 == -1; + } + if ( lpuexcpt == v7 ) + *a5 |= 2u; + v8 = v23; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v23 - 4), 0xFFFFFFFF) > 0 ) + return v19; +LABEL_10: + std::string::_Rep::_M_destroy((void *)(v8 - 12), (int)v24); + return v19; + } + v9 = *(_DWORD *)(v23 - 4); + *(_DWORD *)(v23 - 4) = v9 - 1; + if ( v9 <= 0 ) + goto LABEL_10; + return v19; +} +// 484A90: variable 'v18' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 484A10: using guessed type int var_C[3]; + +//----- (00484C60) -------------------------------------------------------- +std::locale::facet *__stdcall std::num_get>::do_get( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + long double *a6) +{ + __int64 v6; // rax + char v7; // dl + char *v8; // ecx + int v9; // eax + __int16 *v11; // eax + __int16 v12; // ax + __int16 *v13; // eax + __int16 v14; // ax + unsigned __int8 v15; // dl + bool v16; // zf + std::locale::facet *v17; // eax + unsigned int v18; // [esp+4h] [ebp-94h] + std::locale::facet *v19; // [esp+30h] [ebp-68h] + std::locale::facet *v20; // [esp+38h] [ebp-60h] + __int16 lpuexcpta; // [esp+40h] [ebp-58h] + unsigned __int8 lpuexcpt; // [esp+40h] [ebp-58h] + char *String; // [esp+88h] [ebp-10h] BYREF + int v24[3]; // [esp+8Ch] [ebp-Ch] BYREF + + String = (char *)std::string::_S_construct(0, 0); + std::string::reserve((int *)&String, (std::string *)0x20, v18); + v6 = std::num_get>::_M_extract_float(a1, a2, a3, a4, a5, (int *)&String); + lpuexcpta = WORD2(v6); + v20 = (std::locale::facet *)v6; + v19 = (std::locale::facet *)v6; + v24[0] = std::locale::facet::_S_get_c_locale(); + std::__convert_to_v(String, a6, a5); + lpuexcpt = lpuexcpta == -1; + if ( (lpuexcpt & (v19 != 0)) != 0 ) + { + v13 = (__int16 *)*((_DWORD *)v20 + 2); + if ( (unsigned int)v13 >= *((_DWORD *)v20 + 3) ) + v14 = (*(int (__fastcall **)(std::locale::facet *))(*(_DWORD *)v20 + 36))(v20); + else + v14 = *v13; + v15 = lpuexcpt & (v20 != 0); + v16 = v14 == -1; + if ( v14 != -1 ) + v15 = 0; + v17 = 0; + if ( !v16 ) + v17 = v20; + lpuexcpt = v15; + v19 = v17; + } + v7 = a3 == -1; + if ( a2 && a3 == -1 ) + { + v11 = (__int16 *)a2[2]; + if ( (unsigned int)v11 >= a2[3] ) + v12 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v12 = *v11; + v7 = v12 == -1; + } + if ( lpuexcpt == v7 ) + *a5 |= 2u; + v8 = String; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)String - 1, 0xFFFFFFFF) > 0 ) + return v19; +LABEL_10: + std::string::_Rep::_M_destroy(v8 - 12, (int)v24); + return v19; + } + v9 = *((_DWORD *)String - 1); + *((_DWORD *)String - 1) = v9 - 1; + if ( v9 <= 0 ) + goto LABEL_10; + return v19; +} +// 484CE0: variable 'v18' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 484C60: using guessed type int var_C[3]; + +//----- (00484EB0) -------------------------------------------------------- +std::locale::facet *__stdcall std::num_get>::do_get( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + float *a6) +{ + __int64 v6; // rax + char v7; // dl + int v8; // ecx + int v9; // eax + __int16 *v11; // eax + __int16 v12; // ax + __int16 *v13; // eax + __int16 v14; // ax + unsigned __int8 v15; // dl + bool v16; // zf + std::locale::facet *v17; // eax + unsigned int v18; // [esp+4h] [ebp-94h] + std::locale::facet *v19; // [esp+30h] [ebp-68h] + std::locale::facet *v20; // [esp+38h] [ebp-60h] + __int16 lpuexcpta; // [esp+40h] [ebp-58h] + unsigned __int8 lpuexcpt; // [esp+40h] [ebp-58h] + int v23; // [esp+88h] [ebp-10h] BYREF + int v24[3]; // [esp+8Ch] [ebp-Ch] BYREF + + v23 = (int)std::string::_S_construct(0, 0); + std::string::reserve(&v23, (std::string *)0x20, v18); + v6 = std::num_get>::_M_extract_float(a1, a2, a3, a4, a5, &v23); + lpuexcpta = WORD2(v6); + v20 = (std::locale::facet *)v6; + v19 = (std::locale::facet *)v6; + v24[0] = std::locale::facet::_S_get_c_locale(); + std::__convert_to_v((unsigned __int8 *)v23, a6, a5); + lpuexcpt = lpuexcpta == -1; + if ( (lpuexcpt & (v19 != 0)) != 0 ) + { + v13 = (__int16 *)*((_DWORD *)v20 + 2); + if ( (unsigned int)v13 >= *((_DWORD *)v20 + 3) ) + v14 = (*(int (__fastcall **)(std::locale::facet *))(*(_DWORD *)v20 + 36))(v20); + else + v14 = *v13; + v15 = lpuexcpt & (v20 != 0); + v16 = v14 == -1; + if ( v14 != -1 ) + v15 = 0; + v17 = 0; + if ( !v16 ) + v17 = v20; + lpuexcpt = v15; + v19 = v17; + } + v7 = a3 == -1; + if ( a2 && a3 == -1 ) + { + v11 = (__int16 *)a2[2]; + if ( (unsigned int)v11 >= a2[3] ) + v12 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v12 = *v11; + v7 = v12 == -1; + } + if ( lpuexcpt == v7 ) + *a5 |= 2u; + v8 = v23; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v23 - 4), 0xFFFFFFFF) > 0 ) + return v19; +LABEL_10: + std::string::_Rep::_M_destroy((void *)(v8 - 12), (int)v24); + return v19; + } + v9 = *(_DWORD *)(v23 - 4); + *(_DWORD *)(v23 - 4) = v9 - 1; + if ( v9 <= 0 ) + goto LABEL_10; + return v19; +} +// 484F30: variable 'v18' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 484EB0: using guessed type int var_C[3]; + +//----- (00485160) -------------------------------------------------------- +_BYTE *__stdcall std::num_put>::_M_group_int( + char *a1, + int a2, + char a3, + int a4, + _BYTE *a5, + _BYTE *a6, + _DWORD *a7) +{ + _BYTE *result; // eax + + result = (_BYTE *)(std::__add_grouping(a5, a3, a1, a2, a6, &a6[*a7]) - a5); + *a7 = result; + return result; +} + +//----- (004851B0) -------------------------------------------------------- +int __stdcall std::num_put>::_M_insert_int( + int a1, + int a2, + int *a3, + int a4, + int a5) +{ + struct _Unwind_Exception *v5; // esi + void *v6; // esp + void *v7; // esp + unsigned int v8; // eax + int v9; // eax + int v10; // ebx + char *v11; // edx + int v12; // esi + int v14; // eax + void *v15; // esp + void *v16; // esp + int v17; // eax + void *v18; // esp + void *v19; // esp + char *v20; // eax + _BYTE *v21; // eax + char v22; // al + int v23; // [esp-14h] [ebp-7Ch] + int v24; // [esp-Ch] [ebp-74h] + char v25[2]; // [esp+0h] [ebp-68h] BYREF + char v26[18]; // [esp+2h] [ebp-66h] BYREF + char v27[20]; // [esp+14h] [ebp-54h] BYREF + unsigned int v28; // [esp+28h] [ebp-40h] + int v29; // [esp+2Ch] [ebp-3Ch] + char *v30; // [esp+30h] [ebp-38h] + int v31; // [esp+34h] [ebp-34h] + unsigned int v32; // [esp+38h] [ebp-30h] + char *v33; // [esp+3Ch] [ebp-2Ch] + + v31 = a2; + v29 = a4; + v5 = std::__use_cache>::operator()(a3 + 27); + v33 = (char *)v5 + 38; + v32 = a3[3]; + v6 = alloca(32); + v7 = alloca(32); + v28 = v32 & 0x4A; + v8 = a5; + LOBYTE(v33) = v28 != 8 && v28 != 64; + if ( a5 <= 0 ) + { + v8 = -a5; + if ( v28 == 8 || v28 == 64 ) + v8 = a5; + } + v30 = v25; + v9 = (int)std::__int_to_char(v27, v8, (int)v5 + 38, v32, (char)v33); + v10 = v9; + v11 = &v30[-v9 + 20]; + if ( !*((_BYTE *)v5 + 16) ) + { + if ( (_BYTE)v33 ) + goto LABEL_6; +LABEL_16: + if ( (v32 & 0x200) != 0 && a5 ) + { + if ( v28 == 64 ) + { + v22 = *((_BYTE *)v5 + 42); + ++v10; + --v11; + } + else + { + v10 += 2; + v11 -= 2; + v11[1] = *((_BYTE *)v5 + ((v32 >> 14) & 1) + 40); + v22 = *((_BYTE *)v5 + 42); + } + *v11 = v22; + } + goto LABEL_8; + } + v17 = 16 * ((unsigned int)(2 * v9 + 29) >> 4); + v18 = alloca(v17); + v19 = alloca(v17); + v23 = *((_DWORD *)v5 + 3); + v20 = (char *)*((_DWORD *)v5 + 2); + v30 = v26; + v21 = std::__add_grouping(v26, *((_BYTE *)v5 + 37), v20, v23, v11, &v11[v10]); + v11 = v30; + v10 = v21 - v30; + if ( !(_BYTE)v33 ) + goto LABEL_16; +LABEL_6: + if ( a5 < 0 ) + { + ++v10; + *--v11 = *((_BYTE *)v5 + 38); + } + else if ( (v32 & 0x800) != 0 ) + { + ++v10; + *--v11 = *((_BYTE *)v5 + 39); + v12 = a3[2]; + if ( v12 <= v10 ) + goto LABEL_9; + goto LABEL_13; + } +LABEL_8: + v12 = a3[2]; + if ( v12 <= v10 ) + goto LABEL_9; +LABEL_13: + v14 = 16 * ((unsigned int)(v12 + 27) >> 4); + v15 = alloca(v14); + v16 = alloca(v14); + v24 = v10; + v10 = v12; + v33 = v25; + std::__pad>::_S_pad(a3, (void *)(char)v29, v25, v11, v12, v24); + v11 = v33; +LABEL_9: + a3[2] = 0; + if ( !(_BYTE)v31 ) + (*(int (__thiscall **)(int, char *, int))(*(_DWORD *)a1 + 48))(a1, v11, v10); + return a1; +} +// 4851B0: using guessed type char anonymous_0[20]; + +//----- (00485400) -------------------------------------------------------- +int __stdcall std::num_put>::_M_insert_int( + int a1, + int a2, + _DWORD *a3, + int a4, + int a5) +{ + unsigned int v5; // ecx + void *v6; // esp + void *v7; // esp + struct _Unwind_Exception *v8; // edx + int v9; // eax + char v10; // bl + struct _Unwind_Exception *v11; // eax + char v12; // si + int v14; // eax + void *v15; // esp + void *v16; // esp + int v17; // eax + _BYTE *v18; // eax + int v19; // esi + int v20; // eax + void *v21; // esp + void *v22; // esp + _DWORD *v23; // eax + char v24[2]; // [esp+0h] [ebp-88h] BYREF + _BYTE v25[6]; // [esp+2h] [ebp-86h] BYREF + unsigned int v26; // [esp+8h] [ebp-80h] + char v27[16]; // [esp+14h] [ebp-74h] BYREF + int v28; // [esp+24h] [ebp-64h] + unsigned int v29; // [esp+28h] [ebp-60h] + unsigned int v30; // [esp+2Ch] [ebp-5Ch] + int v31; // [esp+30h] [ebp-58h] + int v32; // [esp+34h] [ebp-54h] + std::locale::_Impl *v33; // [esp+38h] [ebp-50h] + int *v34; // [esp+3Ch] [ebp-4Ch] + int v35; // [esp+40h] [ebp-48h] + int v36; // [esp+44h] [ebp-44h] + struct _Unwind_Exception *lpuexcpt; // [esp+48h] [ebp-40h] + + v35 = a1; + v32 = a2; + v31 = a4; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v34 = (int *)(*(_DWORD *)(a3[27] + 12) + 4 * (_DWORD)lpuexcpt); + v36 = *v34; + if ( !v36 ) + { + v23 = operator new(0x68u); + v23[1] = 0; + *v23 = &off_51AF60; + v23[2] = 0; + v23[3] = 0; + *((_BYTE *)v23 + 16) = 0; + v23[5] = 0; + v23[6] = 0; + v23[7] = 0; + v23[8] = 0; + *((_WORD *)v23 + 18) = 0; + *((_BYTE *)v23 + 100) = 0; + v33 = (std::locale::_Impl *)v23; + std::__numpunct_cache::_M_cache((int)v23, (int)(a3 + 27)); + std::locale::_Impl::_M_install_cache(a3[27], v33, lpuexcpt, v26); + v36 = *v34; + } + v5 = a3[3]; + v28 = v36 + 38; + v30 = v5; + v6 = alloca(32); + v7 = alloca(32); + v33 = (std::locale::_Impl *)v24; + v29 = v5 & 0x4A; + LOBYTE(v34) = v29 != 8 && v29 != 64; + lpuexcpt = (struct _Unwind_Exception *)std::__int_to_char(v27, a5, v36 + 38, v5, (char)v34); + v8 = (struct _Unwind_Exception *)(v33 - lpuexcpt + 20); + if ( *(_BYTE *)(v36 + 16) ) + { + v14 = 16 * ((unsigned int)(2 * (_DWORD)lpuexcpt + 29) >> 4); + v15 = alloca(v14); + v16 = alloca(v14); + v17 = *(_DWORD *)(v36 + 12); + lpuexcpt = (struct _Unwind_Exception *)v25; + v18 = std::__add_grouping(v25, *(_BYTE *)(v36 + 37), *(char **)(v36 + 8), v17, v8, (_BYTE *)v33 + 20); + v8 = lpuexcpt; + lpuexcpt = (struct _Unwind_Exception *)(v18 - (_BYTE *)lpuexcpt); + if ( (_BYTE)v34 ) + goto LABEL_5; + } + else if ( (_BYTE)v34 ) + { + goto LABEL_5; + } + if ( (v30 & 0x200) != 0 && a5 ) + { + if ( v29 == 64 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v8 = (struct _Unwind_Exception *)((char *)v8 - 1); + } + else + { + v8 = (struct _Unwind_Exception *)((char *)v8 - 2); + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 2); + *((_BYTE *)v8 + 1) = *(_BYTE *)(v28 + ((v30 >> 14) & 1) + 2); + } + *(_BYTE *)v8 = *(_BYTE *)(v36 + 42); + } +LABEL_5: + v9 = a3[2]; + v36 = v9; + if ( v9 > (int)lpuexcpt ) + { + v19 = v9; + v20 = 16 * ((unsigned int)(v9 + 27) >> 4); + v21 = alloca(v20); + v22 = alloca(v20); + v34 = (int *)v24; + std::__pad>::_S_pad(a3, (void *)(char)v31, v24, (char *)v8, v19, (int)lpuexcpt); + v8 = (struct _Unwind_Exception *)v34; + lpuexcpt = (struct _Unwind_Exception *)v36; + } + v10 = v32; + a3[2] = 0; + LOBYTE(v36) = v10; + if ( !v10 ) + { + v11 = (struct _Unwind_Exception *)(*(int (__thiscall **)(int, struct _Unwind_Exception *, struct _Unwind_Exception *))(*(_DWORD *)v35 + 48))( + v35, + v8, + lpuexcpt); + v12 = v36; + if ( lpuexcpt != v11 ) + v12 = 1; + LOBYTE(v36) = v12; + } + lpuexcpt = (struct _Unwind_Exception *)(unsigned __int8)v36; + return v35; +} +// 50C688: using guessed type signed __int32 std::numpunct::id; +// 51AF60: using guessed type int (*off_51AF60)(); +// 485400: using guessed type char anonymous_1[16]; + +//----- (004857A0) -------------------------------------------------------- +int __stdcall std::num_put>::_M_insert_int( + int a1, + int a2, + int *a3, + int a4, + __int64 a5) +{ + struct _Unwind_Exception *v5; // edi + void *v6; // esp + void *v7; // esp + __int64 v8; // rax + int v9; // eax + char *v10; // esi + int v11; // ebx + char *v12; // edx + int v13; // esi + int v15; // eax + void *v16; // esp + void *v17; // esp + int v18; // eax + void *v19; // esp + void *v20; // esp + _BYTE *v21; // eax + char v22; // al + int v23; // [esp-2Ch] [ebp-94h] + char v24[2]; // [esp-20h] [ebp-88h] BYREF + char v25[38]; // [esp-1Eh] [ebp-86h] BYREF + char v26[24]; // [esp+8h] [ebp-60h] BYREF + unsigned int v27; // [esp+20h] [ebp-48h] + int v28; // [esp+24h] [ebp-44h] + int v29; // [esp+28h] [ebp-40h] + unsigned int v30; // [esp+2Ch] [ebp-3Ch] + int v31; // [esp+30h] [ebp-38h] + int v32; // [esp+34h] [ebp-34h] + __int64 v33; // [esp+38h] [ebp-30h] + + v31 = a1; + v29 = a2; + v28 = a4; + v33 = a5; + v5 = std::__use_cache>::operator()(a3 + 27); + v32 = (int)v5 + 38; + v30 = a3[3]; + v6 = alloca(64); + v7 = alloca(64); + v27 = v30 & 0x4A; + v8 = a5; + LOBYTE(v32) = v27 != 8 && v27 != 64; + if ( ((HIDWORD(a5) | ((unsigned __int64)(a5 - 1) >> 32)) & 0x80000000) != 0LL && (_BYTE)v32 ) + v8 = -a5; + v9 = (int)std::__int_to_char(v26, v8, HIDWORD(v8), (int)v5 + 38, v30, v32); + v10 = &v24[-v9]; + v11 = v9; + v12 = &v24[-v9 + 40]; + if ( !*((_BYTE *)v5 + 16) ) + { + if ( (_BYTE)v32 ) + goto LABEL_6; +LABEL_16: + if ( (v30 & 0x200) != 0 && v33 ) + { + if ( v27 == 64 ) + { + v22 = *((_BYTE *)v5 + 42); + ++v11; + --v12; + } + else + { + v11 += 2; + v12 -= 2; + v12[1] = *((_BYTE *)v5 + ((v30 >> 14) & 1) + 40); + v22 = *((_BYTE *)v5 + 42); + } + *v12 = v22; + } + goto LABEL_8; + } + v18 = 16 * ((unsigned int)(2 * v9 + 29) >> 4); + v19 = alloca(v18); + v20 = alloca(v18); + v21 = std::__add_grouping( + v25, + *((_BYTE *)v5 + 37), + *((char **)v5 + 2), + *((_DWORD *)v5 + 3), + v10 + 40, + &v12[v11]); + v12 = v25; + v11 = v21 - v25; + if ( !(_BYTE)v32 ) + goto LABEL_16; +LABEL_6: + if ( v33 < 0 ) + { + ++v11; + *--v12 = *((_BYTE *)v5 + 38); + } + else if ( (v30 & 0x800) != 0 ) + { + ++v11; + *--v12 = *((_BYTE *)v5 + 39); + v13 = a3[2]; + if ( v13 <= v11 ) + goto LABEL_9; + goto LABEL_13; + } +LABEL_8: + v13 = a3[2]; + if ( v13 <= v11 ) + goto LABEL_9; +LABEL_13: + v15 = 16 * ((unsigned int)(v13 + 27) >> 4); + v16 = alloca(v15); + v17 = alloca(v15); + v23 = v11; + v11 = v13; + std::__pad>::_S_pad(a3, (void *)(char)v28, v24, v12, v13, v23); + v12 = v24; +LABEL_9: + a3[2] = 0; + if ( !(_BYTE)v29 ) + (*(int (__thiscall **)(int, char *, int))(*(_DWORD *)v31 + 48))(v31, v12, v11); + return v31; +} +// 4857A0: using guessed type char anonymous_0[24]; + +//----- (00485A00) -------------------------------------------------------- +int __stdcall std::num_put>::_M_insert_int( + int a1, + int a2, + _DWORD *a3, + int a4, + int a5, + int a6) +{ + unsigned int v6; // ecx + void *v7; // esp + void *v8; // esp + int v9; // ebx + char *v10; // edx + int v11; // eax + char v12; // bl + struct _Unwind_Exception *v13; // eax + char v14; // si + int v16; // eax + void *v17; // esp + void *v18; // esp + int v19; // eax + _BYTE *v20; // eax + int v21; // ebx + int v22; // eax + void *v23; // esp + void *v24; // esp + _DWORD *v25; // eax + char v26[2]; // [esp-20h] [ebp-B8h] BYREF + _BYTE v27[38]; // [esp-1Eh] [ebp-B6h] BYREF + int v28[9]; // [esp+8h] [ebp-90h] BYREF + int v29; // [esp+2Ch] [ebp-6Ch] + unsigned int v30; // [esp+30h] [ebp-68h] + unsigned int v31; // [esp+34h] [ebp-64h] + int v32; // [esp+38h] [ebp-60h] + int v33; // [esp+3Ch] [ebp-5Ch] + std::locale::_Impl *v34; // [esp+40h] [ebp-58h] + int *v35; // [esp+44h] [ebp-54h] + unsigned __int64 v36; // [esp+48h] [ebp-50h] + int v37; // [esp+50h] [ebp-48h] + int v38; // [esp+54h] [ebp-44h] + struct _Unwind_Exception *lpuexcpt; // [esp+58h] [ebp-40h] + + v37 = a1; + v33 = a2; + v32 = a4; + v36 = __PAIR64__(a5, a6); + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v35 = (int *)(*(_DWORD *)(a3[27] + 12) + 4 * (_DWORD)lpuexcpt); + v38 = *v35; + if ( !v38 ) + { + v25 = operator new(0x68u); + v25[1] = 0; + *v25 = &off_51AF60; + v25[2] = 0; + v25[3] = 0; + *((_BYTE *)v25 + 16) = 0; + v25[5] = 0; + v25[6] = 0; + v25[7] = 0; + v25[8] = 0; + *((_WORD *)v25 + 18) = 0; + *((_BYTE *)v25 + 100) = 0; + v34 = (std::locale::_Impl *)v25; + std::__numpunct_cache::_M_cache((int)v25, (int)(a3 + 27)); + std::locale::_Impl::_M_install_cache(a3[27], v34, lpuexcpt, v28[0]); + v38 = *v35; + } + v6 = a3[3]; + v29 = v38 + 38; + v31 = v6; + v7 = alloca(64); + v8 = alloca(64); + v34 = (std::locale::_Impl *)v26; + v30 = v6 & 0x4A; + LOBYTE(v35) = v30 != 8 && v30 != 64; + lpuexcpt = (struct _Unwind_Exception *)std::__int_to_char( + v28, + HIDWORD(v36), + v36, + v38 + 38, + v6, + (char)v35); + v9 = v34 - lpuexcpt; + v10 = (char *)(v34 - lpuexcpt + 40); + if ( *(_BYTE *)(v38 + 16) ) + { + v16 = 16 * ((unsigned int)(2 * (_DWORD)lpuexcpt + 29) >> 4); + v17 = alloca(v16); + v18 = alloca(v16); + v19 = *(_DWORD *)(v38 + 12); + lpuexcpt = (struct _Unwind_Exception *)v27; + v20 = std::__add_grouping( + v27, + *(_BYTE *)(v38 + 37), + *(char **)(v38 + 8), + v19, + (_BYTE *)(v9 + 40), + (_BYTE *)v34 + 40); + v10 = (char *)lpuexcpt; + lpuexcpt = (struct _Unwind_Exception *)(v20 - (_BYTE *)lpuexcpt); + if ( (_BYTE)v35 ) + goto LABEL_5; + } + else if ( (_BYTE)v35 ) + { + goto LABEL_5; + } + if ( (v31 & 0x200) != 0 && v36 ) + { + if ( v30 == 64 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + --v10; + } + else + { + v10 -= 2; + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 2); + v10[1] = *(_BYTE *)(v29 + ((v31 >> 14) & 1) + 2); + } + *v10 = *(_BYTE *)(v38 + 42); + } +LABEL_5: + v11 = a3[2]; + v38 = v11; + if ( v11 > (int)lpuexcpt ) + { + v21 = v11; + v22 = 16 * ((unsigned int)(v11 + 27) >> 4); + v23 = alloca(v22); + v24 = alloca(v22); + HIDWORD(v36) = v26; + std::__pad>::_S_pad(a3, (void *)(char)v32, v26, v10, v21, (int)lpuexcpt); + v10 = (char *)HIDWORD(v36); + lpuexcpt = (struct _Unwind_Exception *)v38; + } + v12 = v33; + a3[2] = 0; + LOBYTE(v38) = v12; + if ( !v12 ) + { + v13 = (struct _Unwind_Exception *)(*(int (__thiscall **)(int, char *, struct _Unwind_Exception *))(*(_DWORD *)v37 + 48))( + v37, + v10, + lpuexcpt); + v14 = v38; + if ( lpuexcpt != v13 ) + v14 = 1; + LOBYTE(v38) = v14; + } + lpuexcpt = (struct _Unwind_Exception *)(unsigned __int8)v38; + return v37; +} +// 50C688: using guessed type signed __int32 std::numpunct::id; +// 51AF60: using guessed type int (*off_51AF60)(); +// 485A00: using guessed type unsigned int anonymous_0[9]; + +//----- (00485DC0) -------------------------------------------------------- +_BYTE *__stdcall std::num_put>::_M_group_float( + char *a1, + int a2, + char a3, + char *Src, + int a5, + _BYTE *a6, + _DWORD *a7) +{ + int v7; // ebp + _BYTE *v8; // ecx + int v9; // eax + _BYTE *v10; // edx + _BYTE *result; // eax + _BYTE *v12; // [esp+2Ch] [ebp-20h] + + if ( Src ) + { + v7 = Src - a6; + v8 = std::__add_grouping((_BYTE *)a5, a3, a1, a2, a6, Src); + v9 = 0; + v10 = &v8[-a5]; + if ( *a7 != Src - a6 ) + { + v12 = &v8[-a5]; + memcpy(v8, Src, *a7 - v7); + v10 = v12; + v9 = *a7 - v7; + } + result = &v10[v9]; + *a7 = result; + } + else + { + result = &std::__add_grouping((_BYTE *)a5, a3, a1, a2, a6, &a6[*a7])[-a5]; + *a7 = result; + } + return result; +} + +//----- (00485E90) -------------------------------------------------------- +int __thiscall std::num_put>::_M_insert_float( + void *this, + int a2, + int a3, + int *a4, + int a5, + char a6, + double a7) +{ + int v7; // ebx + void *v8; // esp + void *v9; // esp + int v10; // eax + _BYTE *v11; // eax + int v12; // ebx + _BYTE *v13; // esi + int v14; // eax + void *v15; // esp + char v16; // dl + void *v17; // esp + char *v18; // eax + void (__thiscall *v19)(_BYTE *, char *, char *, void *); // edx + char *v20; // eax + char *v21; // edx + struct _Unwind_Exception *v22; // ecx + int v23; // esi + int v25; // eax + void *v26; // esp + void *v27; // esp + int v28; // eax + void *v29; // esp + void *v30; // esp + char *v31; // ecx + int v32; // ebx + int v33; // eax + void *v34; // esp + void *v35; // esp + int v36; // eax + int v37; // eax + void *v38; // esp + void *v39; // esp + int v40; // [esp-2Ch] [ebp-B4h] + char v41; // [esp-20h] [ebp-A8h] BYREF + _BYTE v42[71]; // [esp-1Fh] [ebp-A7h] BYREF + char *v43; // [esp+28h] [ebp-60h] + int v44; // [esp+2Ch] [ebp-5Ch] + void *v45; // [esp+30h] [ebp-58h] + int v46; // [esp+34h] [ebp-54h] + size_t Size; // [esp+38h] [ebp-50h] + struct _Unwind_Exception *v48; // [esp+3Ch] [ebp-4Ch] + void *v49; // [esp+40h] [ebp-48h] + int v50; // [esp+44h] [ebp-44h] + int v51[2]; // [esp+48h] [ebp-40h] + size_t MaxCount; // [esp+58h] [ebp-30h] BYREF + int *c_locale; // [esp+5Ch] [ebp-2Ch] BYREF + char v54[40]; // [esp+60h] [ebp-28h] BYREF + + v45 = this; + v50 = a2; + *(double *)v51 = a7; + v46 = a3; + v44 = a5; + v49 = a4 + 27; + v48 = std::__use_cache>::operator()(a4 + 27); + v7 = a4[1]; + if ( v7 < 0 ) + v7 = 6; + std::__num_base::_S_format_float((std::__num_base *)a4, (const std::ios_base *)v54, (char *)a6); + v8 = alloca(64); + v9 = alloca(64); + if ( (a4[3] & 0x104) == 260 ) + { + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + v36 = std::__convert_from_v(&c_locale, &v41, 45, v54, v51[0], v51[1]); + MaxCount = v36; + if ( v36 > 44 ) + { + Size = v36 + 1; + v37 = 16 * ((unsigned int)(v36 + 28) >> 4); + v38 = alloca(v37); + v39 = alloca(v37); + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + MaxCount = std::__convert_from_v(&c_locale, &v41, Size, v54, v51[0], v51[1]); + } + } + else + { + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + v10 = std::__convert_from_v(&c_locale, &v41, 45, v54, v7, v51[0], v51[1]); + MaxCount = v10; + if ( v10 > 44 ) + { + Size = v10 + 1; + v25 = 16 * ((unsigned int)(v10 + 28) >> 4); + v26 = alloca(v25); + v27 = alloca(v25); + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + MaxCount = std::__convert_from_v(&c_locale, &v41, Size, v54, v7, v51[0], v51[1]); + } + } + v11 = std::use_facet>((int)v49); + v12 = MaxCount; + v13 = v11; + Size = MaxCount; + v14 = 16 * ((MaxCount + 27) >> 4); + v15 = alloca(v14); + v16 = v13[28]; + v17 = alloca(v14); + v49 = &v41; + v51[0] = (int)&v41; + v18 = &v42[MaxCount - 1]; + if ( v16 != 1 ) + { + if ( v16 ) + { + v19 = *(void (__thiscall **)(_BYTE *, char *, char *, void *))(*(_DWORD *)v13 + 28); + if ( (char *)v19 == (char *)std::ctype::do_widen ) + goto LABEL_9; + } + else + { + v43 = &v42[MaxCount - 1]; + std::ctype::_M_widen_init((int)v13); + v18 = v43; + v19 = *(void (__thiscall **)(_BYTE *, char *, char *, void *))(*(_DWORD *)v13 + 28); + if ( (char *)v19 == (char *)std::ctype::do_widen ) + { +LABEL_9: + v12 = MaxCount; + if ( v18 != &v41 ) + memcpy(v49, &v41, Size); + goto LABEL_11; + } + } + v19(v13, &v41, v18, v49); + v12 = MaxCount; + goto LABEL_11; + } + if ( v18 != &v41 ) + memcpy(v49, &v41, MaxCount); +LABEL_11: + if ( !v12 ) + { + if ( *((_BYTE *)v48 + 16) ) + { + v21 = 0; + goto LABEL_20; + } +LABEL_14: + v23 = a4[2]; + if ( v23 <= v12 ) + goto LABEL_15; + goto LABEL_23; + } + v20 = (char *)memchr(&v41, 46, v12); + v21 = v20; + if ( !v20 ) + { + if ( *((_BYTE *)v48 + 16) && (v12 <= 2 || v42[0] <= 57 && (unsigned __int8)(v42[1] - 48) <= 9u && v42[0] > 47) ) + goto LABEL_20; + goto LABEL_14; + } + v22 = v48; + v21 = (char *)v49 + v20 - &v41; + *v21 = *((_BYTE *)v48 + 36); + if ( !*((_BYTE *)v22 + 16) ) + goto LABEL_14; +LABEL_20: + v28 = 16 * ((unsigned int)(2 * v12 + 27) >> 4); + v29 = alloca(v28); + v30 = alloca(v28); + if ( ((v41 - 43) & 0xFD) != 0 ) + { + v31 = &v41; + v32 = 0; + } + else + { + v31 = v42; + MaxCount = v12 - 1; + v32 = 1; + v41 = *(_BYTE *)v49; + v51[0] = (int)v49 + 1; + } + std::num_put>::_M_group_float( + *((char **)v48 + 2), + *((_DWORD *)v48 + 3), + *((_BYTE *)v48 + 37), + v21, + (int)v31, + (_BYTE *)v51[0], + &MaxCount); + v12 = MaxCount + v32; + v51[0] = (int)&v41; + MaxCount = v12; + v23 = a4[2]; + if ( v23 <= v12 ) + goto LABEL_15; +LABEL_23: + v33 = 16 * ((unsigned int)(v23 + 27) >> 4); + v34 = alloca(v33); + v35 = alloca(v33); + v40 = v12; + v12 = v23; + std::__pad>::_S_pad(a4, (void *)(char)v44, &v41, (char *)v51[0], v23, v40); + MaxCount = v23; + v51[0] = (int)&v41; +LABEL_15: + a4[2] = 0; + if ( !(_BYTE)v46 ) + (*(int (__thiscall **)(int, int, int))(*(_DWORD *)v50 + 48))(v50, v51[0], v12); + return v50; +} + +//----- (004862F0) -------------------------------------------------------- +int __thiscall std::num_put>::_M_insert_float( + void *this, + int a2, + int a3, + int *a4, + int a5, + char a6, + long double a7) +{ + int v7; // ebx + void *v8; // esp + void *v9; // esp + int v10; // eax + _BYTE *v11; // eax + int v12; // ebx + _BYTE *v13; // esi + int v14; // eax + void *v15; // esp + char v16; // dl + void *v17; // esp + char *v18; // eax + void (__thiscall *v19)(_BYTE *, char *, char *, void *); // edx + char *v20; // eax + char *v21; // edx + struct _Unwind_Exception *v22; // ecx + int v23; // esi + int v25; // eax + void *v26; // esp + void *v27; // esp + int v28; // eax + void *v29; // esp + void *v30; // esp + char *v31; // ecx + int v32; // ebx + int v33; // eax + void *v34; // esp + void *v35; // esp + int v36; // eax + int v37; // eax + void *v38; // esp + void *v39; // esp + int v44; // [esp-3Ch] [ebp-C4h] + char v45; // [esp-30h] [ebp-B8h] BYREF + _BYTE v46[91]; // [esp-2Fh] [ebp-B7h] BYREF + char *v47; // [esp+2Ch] [ebp-5Ch] + int v48; // [esp+30h] [ebp-58h] + void *v49; // [esp+34h] [ebp-54h] + size_t Size; // [esp+38h] [ebp-50h] + int v51; // [esp+3Ch] [ebp-4Ch] + struct _Unwind_Exception *v52; // [esp+40h] [ebp-48h] + void *v53; // [esp+44h] [ebp-44h] + int v54; // [esp+48h] [ebp-40h] + int v55; // [esp+4Ch] [ebp-3Ch] + size_t MaxCount; // [esp+58h] [ebp-30h] BYREF + int *c_locale; // [esp+5Ch] [ebp-2Ch] BYREF + char v58[40]; // [esp+60h] [ebp-28h] BYREF + + v49 = this; + v54 = a2; + v51 = a3; + v48 = a5; + v55 = (int)(a4 + 27); + v52 = std::__use_cache>::operator()(a4 + 27); + v7 = a4[1]; + if ( v7 < 0 ) + v7 = 6; + std::__num_base::_S_format_float((std::__num_base *)a4, (const std::ios_base *)v58, (char *)a6); + v8 = alloca(80); + v9 = alloca(80); + if ( (a4[3] & 0x104) == 260 ) + { + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + v36 = std::__convert_from_v(&c_locale, &v45, 54, v58, *(_QWORD *)&a7, HIDWORD(a7)); + MaxCount = v36; + if ( v36 > 53 ) + { + v53 = (void *)(v36 + 1); + v37 = 16 * ((unsigned int)(v36 + 28) >> 4); + v38 = alloca(v37); + v39 = alloca(v37); + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + MaxCount = std::__convert_from_v(&c_locale, &v45, (int)v53, v58, *(_QWORD *)&a7, HIDWORD(a7)); + } + } + else + { + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + v10 = std::__convert_from_v(&c_locale, &v45, 54, v58, v7, *(_QWORD *)&a7, HIDWORD(a7)); + MaxCount = v10; + if ( v10 > 53 ) + { + v53 = (void *)(v10 + 1); + v25 = 16 * ((unsigned int)(v10 + 28) >> 4); + v26 = alloca(v25); + v27 = alloca(v25); + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + MaxCount = std::__convert_from_v(&c_locale, &v45, (int)v53, v58, v7, *(_QWORD *)&a7, HIDWORD(a7)); + } + } + v11 = std::use_facet>(v55); + v12 = MaxCount; + v13 = v11; + Size = MaxCount; + v14 = 16 * ((MaxCount + 27) >> 4); + v15 = alloca(v14); + v16 = v13[28]; + v17 = alloca(v14); + v53 = &v45; + v55 = (int)&v45; + v18 = &v46[MaxCount - 1]; + if ( v16 != 1 ) + { + if ( v16 ) + { + v19 = *(void (__thiscall **)(_BYTE *, char *, char *, void *))(*(_DWORD *)v13 + 28); + if ( (char *)v19 == (char *)std::ctype::do_widen ) + goto LABEL_9; + } + else + { + v47 = &v46[MaxCount - 1]; + std::ctype::_M_widen_init((int)v13); + v18 = v47; + v19 = *(void (__thiscall **)(_BYTE *, char *, char *, void *))(*(_DWORD *)v13 + 28); + if ( (char *)v19 == (char *)std::ctype::do_widen ) + { +LABEL_9: + v12 = MaxCount; + if ( v18 != &v45 ) + memcpy(v53, &v45, Size); + goto LABEL_11; + } + } + v19(v13, &v45, v18, v53); + v12 = MaxCount; + goto LABEL_11; + } + if ( v18 != &v45 ) + memcpy(v53, &v45, MaxCount); +LABEL_11: + if ( !v12 ) + { + if ( *((_BYTE *)v52 + 16) ) + { + v21 = 0; + goto LABEL_20; + } +LABEL_14: + v23 = a4[2]; + if ( v23 <= v12 ) + goto LABEL_15; + goto LABEL_23; + } + v20 = (char *)memchr(&v45, 46, v12); + v21 = v20; + if ( !v20 ) + { + if ( *((_BYTE *)v52 + 16) && (v12 <= 2 || v46[0] <= 57 && (unsigned __int8)(v46[1] - 48) <= 9u && v46[0] > 47) ) + goto LABEL_20; + goto LABEL_14; + } + v22 = v52; + v21 = (char *)v53 + v20 - &v45; + *v21 = *((_BYTE *)v52 + 36); + if ( !*((_BYTE *)v22 + 16) ) + goto LABEL_14; +LABEL_20: + v28 = 16 * ((unsigned int)(2 * v12 + 27) >> 4); + v29 = alloca(v28); + v30 = alloca(v28); + if ( ((v45 - 43) & 0xFD) != 0 ) + { + v31 = &v45; + v32 = 0; + } + else + { + v31 = v46; + MaxCount = v12 - 1; + v32 = 1; + v45 = *(_BYTE *)v53; + v55 = (int)v53 + 1; + } + std::num_put>::_M_group_float( + *((char **)v52 + 2), + *((_DWORD *)v52 + 3), + *((_BYTE *)v52 + 37), + v21, + (int)v31, + (_BYTE *)v55, + &MaxCount); + v12 = MaxCount + v32; + v55 = (int)&v45; + MaxCount = v12; + v23 = a4[2]; + if ( v23 <= v12 ) + goto LABEL_15; +LABEL_23: + v33 = 16 * ((unsigned int)(v23 + 27) >> 4); + v34 = alloca(v33); + v35 = alloca(v33); + v44 = v12; + v12 = v23; + std::__pad>::_S_pad(a4, (void *)(char)v48, &v45, (char *)v55, v23, v44); + MaxCount = v23; + v55 = (int)&v45; +LABEL_15: + a4[2] = 0; + if ( !(_BYTE)v51 ) + (*(int (__thiscall **)(int, int, int))(*(_DWORD *)v54 + 48))(v54, v55, v12); + return v54; +} + +//----- (00486750) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + _DWORD *a4, + char a5, + int a6) +{ + int (__stdcall *v6)(int, int, _DWORD *, char, int); // eax + int v7; // edi + int result; // eax + + v6 = *(int (__stdcall **)(int, int, _DWORD *, char, int))(*(_DWORD *)this + 36); + if ( v6 != std::num_put>::do_put ) + return ((int (__fastcall *)(void *, int, int, int, _DWORD *, _DWORD, int))v6)(this, a6, a2, a3, a4, a5, a6); + v7 = a4[3]; + a4[3] = v7 & 0xFFFFBDB5 | 0x208; + result = std::num_put>::_M_insert_int(a2, a3, a4, a5, a6); + a4[3] = v7; + return result; +} + +//----- (004867F0) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + int a4, + char a5, + unsigned __int8 a6) +{ + return (*(int (__thiscall **)(void *, int, int, int, _DWORD, _DWORD))(*(_DWORD *)this + 8))(this, a2, a3, a4, a5, a6); +} + +//----- (00486810) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + int *a4, + char a5, + double a6) +{ + int (__thiscall *v6)(void *, int, int, int *, char, double); // eax + + v6 = *(int (__thiscall **)(void *, int, int, int *, char, double))(*(_DWORD *)this + 28); + if ( v6 == std::num_put>::do_put ) + return std::num_put>::_M_insert_float(this, a2, a3, a4, a5, 0, a6); + else + return ((int (__fastcall *)(void *, int *, int, int, int *, _DWORD, _DWORD, _DWORD))v6)( + this, + a4, + a2, + a3, + a4, + a5, + LODWORD(a6), + HIDWORD(a6)); +} + +//----- (00486880) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + int *a4, + char a5, + long double a6) +{ + int (__thiscall *v6)(void *, int, int, int *, char, long double); // eax + + v6 = *(int (__thiscall **)(void *, int, int, int *, char, long double))(*(_DWORD *)this + 32); + if ( v6 == std::num_put>::do_put ) + return std::num_put>::_M_insert_float(this, a2, a3, a4, a5, 76, a6); + else + return ((int (__fastcall *)(void *, int *, int, int, int *, _DWORD, _DWORD, _DWORD, _DWORD))v6)( + this, + a4, + a2, + a3, + a4, + a5, + LODWORD(a6), + DWORD1(a6), + HIDWORD(a6)); +} + +//----- (004868F0) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + int *a4, + char a5, + int a6) +{ + int (__stdcall *v6)(int, int, int *, char, int); // eax + + v6 = *(int (__stdcall **)(int, int, int *, char, int))(*(_DWORD *)this + 12); + if ( v6 == std::num_put>::do_put ) + return std::num_put>::_M_insert_int(a2, a3, a4, a5, a6); + else + return v6(a2, a3, a4, a5, a6); +} + +//----- (00486950) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + _DWORD *a4, + char a5, + int a6) +{ + int (__stdcall *v6)(int, int, _DWORD *, char, int); // eax + + v6 = *(int (__stdcall **)(int, int, _DWORD *, char, int))(*(_DWORD *)this + 16); + if ( v6 == std::num_put>::do_put ) + return std::num_put>::_M_insert_int(a2, a3, a4, a5, a6); + else + return v6(a2, a3, a4, a5, a6); +} + +//----- (004869B0) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + int *a4, + char a5, + __int64 a6) +{ + int (__stdcall *v6)(int, int, int *, char, __int64); // eax + + v6 = *(int (__stdcall **)(int, int, int *, char, __int64))(*(_DWORD *)this + 20); + if ( v6 == std::num_put>::do_put ) + return std::num_put>::_M_insert_int(a2, a3, a4, a5, a6); + else + return ((int (__stdcall *)(int, int, int *, _DWORD, _DWORD, _DWORD))v6)(a2, a3, a4, a5, a6, HIDWORD(a6)); +} + +//----- (00486A20) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + _DWORD *a4, + char a5, + int a6, + int a7) +{ + int (__stdcall *v7)(int, int, _DWORD *, char, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, _DWORD *, char, int, int))(*(_DWORD *)this + 24); + if ( v7 == std::num_put>::do_put ) + return std::num_put>::_M_insert_int(a2, a3, a4, a5, a6, a7); + else + return v7(a2, a3, a4, a5, a6, a7); +} + +//----- (00486A90) -------------------------------------------------------- +int __stdcall std::num_put>::_M_pad( + char a1, + int a2, + _DWORD *a3, + char *a4, + char *a5, + int *a6) +{ + int result; // eax + + result = std::__pad>::_S_pad(a3, (void *)a1, a4, a5, a2, *a6); + *a6 = a2; + return result; +} + +//----- (00486AE0) -------------------------------------------------------- +int __stdcall std::num_put>::do_put(int a1, int a2, _DWORD *a3, char a4, int a5) +{ + int v5; // edi + int result; // eax + + v5 = a3[3]; + a3[3] = v5 & 0xFFFFBDB5 | 0x208; + result = std::num_put>::_M_insert_int(a1, a2, a3, a4, a5); + a3[3] = v5; + return result; +} + +//----- (00486B60) -------------------------------------------------------- +int *__stdcall std::num_put>::do_put(int *a1, int a2, int *a3, int a4, int a5) +{ + int v5; // edi + struct _Unwind_Exception *v7; // eax + int v8; // ecx + char v9; // dl + int v10; // ecx + int v11; // eax + size_t v12; // edx + int v13; // eax + void *v14; // esp + void *v15; // esp + char v16; // dl + int v17; // edi + int v18; // ecx + int v19; // eax + int v20; // edi + _BYTE v21[8]; // [esp+20h] [ebp-68h] BYREF + _BYTE *v22; // [esp+28h] [ebp-60h] + int v23; // [esp+2Ch] [ebp-5Ch] + char v24; // [esp+33h] [ebp-55h] + int v25; // [esp+34h] [ebp-54h] + int v26; // [esp+38h] [ebp-50h] + int v27; // [esp+3Ch] [ebp-4Ch] + + v5 = a3[3]; + v26 = a4; + if ( (v5 & 1) == 0 ) + return (int *)std::num_put>::_M_insert_int( + (int)a1, + a2, + a3, + (char)a4, + (unsigned __int8)a5); + v27 = a5; + v7 = std::__use_cache>::operator()(a3 + 27); + if ( (_BYTE)a5 ) + { + v8 = *((_DWORD *)v7 + 5); + v9 = a2; + v27 = *((_DWORD *)v7 + 6); + v25 = v8; + v10 = v27; + v11 = a3[2]; + if ( v27 < v11 ) + goto LABEL_5; +LABEL_10: + a3[2] = 0; + if ( !v9 ) + { + v19 = *a1; + LOBYTE(v26) = 0; + (*(int (__thiscall **)(int *, int, int))(v19 + 48))(a1, v25, v27); + } + return a1; + } + v18 = *((_DWORD *)v7 + 7); + v9 = a2; + v27 = *((_DWORD *)v7 + 8); + v25 = v18; + v10 = v27; + v11 = a3[2]; + if ( v27 >= v11 ) + goto LABEL_10; +LABEL_5: + v24 = v9; + v23 = v11 - v10; + v12 = v11 - v10; + v13 = 16 * ((unsigned int)(v11 - v10 + 27) >> 4); + v14 = alloca(v13); + v15 = alloca(v13); + v22 = v21; + memset(v21, (char)v26, v12); + v16 = v24; + a3[2] = 0; + if ( (v5 & 0xB0) == 32 ) + { + if ( !v16 ) + { + v20 = v27; + if ( v20 == (*(int (__thiscall **)(int *, int, int))(*a1 + 48))(a1, v25, v27) ) + (*(void (__thiscall **)(int *, _BYTE *, int))(*a1 + 48))(a1, v22, v23); + } + } + else if ( !v16 ) + { + v17 = v23; + if ( v17 == (*(int (__thiscall **)(int *, _BYTE *, int))(*a1 + 48))(a1, v22, v23) ) + (*(void (__thiscall **)(int *, int, int))(*a1 + 48))(a1, v25, v27); + } + return a1; +} + +//----- (00486D60) -------------------------------------------------------- +int __thiscall std::num_put>::do_put( + void *this, + int a2, + int a3, + int *a4, + char a5, + double a6) +{ + return std::num_put>::_M_insert_float(this, a2, a3, a4, a5, 0, a6); +} + +//----- (00486DB0) -------------------------------------------------------- +int __thiscall std::num_put>::do_put( + void *this, + int a2, + int a3, + int *a4, + char a5, + long double a6) +{ + return std::num_put>::_M_insert_float(this, a2, a3, a4, a5, 76, a6); +} + +//----- (00486E00) -------------------------------------------------------- +int __stdcall std::num_put>::do_put(int a1, int a2, int *a3, char a4, int a5) +{ + return std::num_put>::_M_insert_int(a1, a2, a3, a4, a5); +} + +//----- (00486E10) -------------------------------------------------------- +int __stdcall std::num_put>::do_put(int a1, int a2, _DWORD *a3, char a4, int a5) +{ + return std::num_put>::_M_insert_int(a1, a2, a3, a4, a5); +} + +//----- (00486E20) -------------------------------------------------------- +int __stdcall std::num_put>::do_put(int a1, int a2, int *a3, char a4, __int64 a5) +{ + return std::num_put>::_M_insert_int(a1, a2, a3, a4, a5); +} + +//----- (00486E30) -------------------------------------------------------- +int __stdcall std::num_put>::do_put( + int a1, + int a2, + _DWORD *a3, + char a4, + int a5, + int a6) +{ + return std::num_put>::_M_insert_int(a1, a2, a3, a4, a5, a6); +} + +//----- (00486E40) -------------------------------------------------------- +int __stdcall std::num_put>::_M_group_int( + char *a1, + int a2, + __int16 a3, + int a4, + _WORD *a5, + char *a6, + int *a7) +{ + int result; // eax + + result = std::__add_grouping(a5, a3, a1, a2, a6, &a6[2 * *a7]) - a5; + *a7 = result; + return result; +} + +//----- (00486E90) -------------------------------------------------------- +int __stdcall std::num_put>::_M_insert_int( + int a1, + int a2, + _DWORD *a3, + int a4, + int a5) +{ + void *v5; // esp + void *v6; // esp + unsigned int v7; // eax + int v8; // ecx + struct _Unwind_Exception *v9; // edx + int v10; // eax + char v11; // cl + struct _Unwind_Exception *v12; // eax + char v13; // bl + int v15; // ebx + int v16; // eax + void *v17; // esp + void *v18; // esp + int v19; // eax + void *v20; // esp + void *v21; // esp + int v22; // eax + char *v23; // eax + _DWORD *v24; // eax + __int16 v25; // [esp-20h] [ebp-A8h] BYREF + _WORD v26[18]; // [esp-1Ch] [ebp-A4h] BYREF + unsigned int v27; // [esp+8h] [ebp-80h] + unsigned int v28; // [esp+24h] [ebp-64h] + int v29; // [esp+28h] [ebp-60h] + int v30; // [esp+2Ch] [ebp-5Ch] + int v31; // [esp+30h] [ebp-58h] + unsigned int v32; // [esp+34h] [ebp-54h] + int v33; // [esp+38h] [ebp-50h] + std::locale::_Impl *v34; // [esp+3Ch] [ebp-4Ch] + int *v35; // [esp+40h] [ebp-48h] + int v36; // [esp+44h] [ebp-44h] + struct _Unwind_Exception *lpuexcpt; // [esp+48h] [ebp-40h] + + v33 = a1; + v30 = a2; + v29 = a4; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v35 = (int *)(*(_DWORD *)(a3[27] + 12) + 4 * (_DWORD)lpuexcpt); + v36 = *v35; + if ( !v36 ) + { + v24 = operator new(0xA8u); + v24[1] = 0; + *v24 = &off_51AF70; + v24[2] = 0; + v24[3] = 0; + *((_BYTE *)v24 + 16) = 0; + v24[5] = 0; + v24[6] = 0; + v24[7] = 0; + v24[8] = 0; + v24[9] = 0; + *((_BYTE *)v24 + 164) = 0; + v34 = (std::locale::_Impl *)v24; + std::__numpunct_cache::_M_cache((int)v24, (int)(a3 + 27)); + std::locale::_Impl::_M_install_cache(a3[27], v34, lpuexcpt, v27); + v36 = *v35; + } + v31 = v36 + 40; + v32 = a3[3]; + v5 = alloca(64); + v6 = alloca(64); + v28 = v32 & 0x4A; + v34 = (std::locale::_Impl *)&v25; + v7 = a5; + LOBYTE(v35) = v28 != 8 && v28 != 64; + if ( a5 <= 0 ) + { + v7 = -a5; + if ( v28 == 8 || v28 == 64 ) + v7 = a5; + } + v8 = std::__int_to_char((_WORD *)v34 + 20, v7, v31, v32, (char)v35); + lpuexcpt = (struct _Unwind_Exception *)v8; + v9 = (std::locale::_Impl *)((char *)v34 + 2 * (20 - v8)); + if ( !*(_BYTE *)(v36 + 16) ) + { + if ( (_BYTE)v35 ) + goto LABEL_8; +LABEL_20: + if ( (v32 & 0x200) != 0 && a5 ) + { + if ( v28 == 64 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v9 = (struct _Unwind_Exception *)((char *)v9 - 2); + } + else + { + v9 = (struct _Unwind_Exception *)((char *)v9 - 4); + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 2); + *((_WORD *)v9 + 1) = *(_WORD *)(v31 + 2 * ((v32 >> 14) & 1) + 4); + } + *(_WORD *)v9 = *(_WORD *)(v36 + 48); + } + goto LABEL_10; + } + v19 = 16 * ((unsigned int)(4 * v8 + 31) >> 4); + v20 = alloca(v19); + v21 = alloca(v19); + v22 = *(_DWORD *)(v36 + 12); + lpuexcpt = (struct _Unwind_Exception *)v26; + v23 = (char *)std::__add_grouping( + v26, + *(_WORD *)(v36 + 38), + *(char **)(v36 + 8), + v22, + (char *)v9, + (char *)v9 + 2 * v8); + v9 = lpuexcpt; + lpuexcpt = (struct _Unwind_Exception *)((v23 - (char *)lpuexcpt) >> 1); + if ( !(_BYTE)v35 ) + goto LABEL_20; +LABEL_8: + if ( a5 < 0 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v9 = (struct _Unwind_Exception *)((char *)v9 - 2); + *(_WORD *)v9 = *(_WORD *)(v36 + 40); + } + else if ( (v32 & 0x800) != 0 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v9 = (struct _Unwind_Exception *)((char *)v9 - 2); + *(_WORD *)v9 = *(_WORD *)(v36 + 42); + v10 = a3[2]; + v36 = v10; + if ( v10 <= (int)lpuexcpt ) + goto LABEL_11; + goto LABEL_17; + } +LABEL_10: + v10 = a3[2]; + v36 = v10; + if ( v10 <= (int)lpuexcpt ) + goto LABEL_11; +LABEL_17: + v15 = v10; + v16 = 16 * ((unsigned int)(2 * v10 + 27) >> 4); + v17 = alloca(v16); + v18 = alloca(v16); + v35 = (int *)&v25; + std::__pad>::_S_pad(a3, (void *)(unsigned __int16)v29, &v25, v9, v15, (int)lpuexcpt); + v9 = (struct _Unwind_Exception *)v35; + lpuexcpt = (struct _Unwind_Exception *)v36; +LABEL_11: + v11 = v30; + a3[2] = 0; + LOBYTE(v36) = v11; + if ( !v11 ) + { + v12 = (struct _Unwind_Exception *)(*(int (__thiscall **)(int, struct _Unwind_Exception *, struct _Unwind_Exception *))(*(_DWORD *)v33 + 48))( + v33, + v9, + lpuexcpt); + v13 = v36; + if ( v12 != lpuexcpt ) + v13 = 1; + LOBYTE(v36) = v13; + } + lpuexcpt = (struct _Unwind_Exception *)(unsigned __int8)v36; + return v33; +} +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (004872B0) -------------------------------------------------------- +int __stdcall std::num_put>::_M_insert_int( + int a1, + int a2, + _DWORD *a3, + int a4, + int a5) +{ + unsigned int v5; // ecx + void *v6; // esp + void *v7; // esp + struct _Unwind_Exception *v8; // edx + int v9; // eax + char v10; // si + struct _Unwind_Exception *v11; // eax + char v12; // dl + int v14; // eax + void *v15; // esp + void *v16; // esp + int v17; // eax + char *v18; // eax + int v19; // esi + int v20; // eax + void *v21; // esp + void *v22; // esp + _DWORD *v23; // eax + char *v24; // [esp-2Ch] [ebp-B4h] + __int16 v25; // [esp-20h] [ebp-A8h] BYREF + _WORD v26[18]; // [esp-1Ch] [ebp-A4h] BYREF + int v27[7]; // [esp+8h] [ebp-80h] BYREF + int v28; // [esp+24h] [ebp-64h] + unsigned int v29; // [esp+28h] [ebp-60h] + unsigned int v30; // [esp+2Ch] [ebp-5Ch] + int v31; // [esp+30h] [ebp-58h] + int v32; // [esp+34h] [ebp-54h] + std::locale::_Impl *v33; // [esp+38h] [ebp-50h] + int *v34; // [esp+3Ch] [ebp-4Ch] + int v35; // [esp+40h] [ebp-48h] + int v36; // [esp+44h] [ebp-44h] + struct _Unwind_Exception *lpuexcpt; // [esp+48h] [ebp-40h] + + v35 = a1; + v32 = a2; + v31 = a4; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v34 = (int *)(*(_DWORD *)(a3[27] + 12) + 4 * (_DWORD)lpuexcpt); + v36 = *v34; + if ( !v36 ) + { + v23 = operator new(0xA8u); + v23[1] = 0; + *v23 = &off_51AF70; + v23[2] = 0; + v23[3] = 0; + *((_BYTE *)v23 + 16) = 0; + v23[5] = 0; + v23[6] = 0; + v23[7] = 0; + v23[8] = 0; + v23[9] = 0; + *((_BYTE *)v23 + 164) = 0; + v33 = (std::locale::_Impl *)v23; + std::__numpunct_cache::_M_cache((int)v23, (int)(a3 + 27)); + std::locale::_Impl::_M_install_cache(a3[27], v33, lpuexcpt, v27[0]); + v36 = *v34; + } + v5 = a3[3]; + v28 = v36 + 40; + v30 = v5; + v6 = alloca(64); + v7 = alloca(64); + v33 = (std::locale::_Impl *)&v25; + v29 = v5 & 0x4A; + LOBYTE(v34) = v29 != 8 && v29 != 64; + lpuexcpt = (struct _Unwind_Exception *)std::__int_to_char(v27, a5, v36 + 40, v5, (char)v34); + v8 = (std::locale::_Impl *)((char *)v33 + 2 * (20 - (_DWORD)lpuexcpt)); + if ( *(_BYTE *)(v36 + 16) ) + { + v14 = 16 * ((unsigned int)(4 * (_DWORD)lpuexcpt + 31) >> 4); + v15 = alloca(v14); + v16 = alloca(v14); + v24 = (char *)v8 + 2 * (_DWORD)lpuexcpt; + v17 = *(_DWORD *)(v36 + 12); + lpuexcpt = (struct _Unwind_Exception *)v26; + v18 = (char *)std::__add_grouping(v26, *(_WORD *)(v36 + 38), *(char **)(v36 + 8), v17, (char *)v8, v24); + v8 = lpuexcpt; + lpuexcpt = (struct _Unwind_Exception *)((v18 - (char *)lpuexcpt) >> 1); + if ( (_BYTE)v34 ) + goto LABEL_5; + } + else if ( (_BYTE)v34 ) + { + goto LABEL_5; + } + if ( (v30 & 0x200) != 0 && a5 ) + { + if ( v29 == 64 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v8 = (struct _Unwind_Exception *)((char *)v8 - 2); + } + else + { + v8 = (struct _Unwind_Exception *)((char *)v8 - 4); + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 2); + *((_WORD *)v8 + 1) = *(_WORD *)(v28 + 2 * ((v30 >> 14) & 1) + 4); + } + *(_WORD *)v8 = *(_WORD *)(v36 + 48); + } +LABEL_5: + v9 = a3[2]; + v36 = v9; + if ( v9 > (int)lpuexcpt ) + { + v19 = v9; + v20 = 16 * ((unsigned int)(2 * v9 + 27) >> 4); + v21 = alloca(v20); + v22 = alloca(v20); + v34 = (int *)&v25; + std::__pad>::_S_pad( + a3, + (void *)(unsigned __int16)v31, + &v25, + v8, + v19, + (int)lpuexcpt); + v8 = (struct _Unwind_Exception *)v34; + lpuexcpt = (struct _Unwind_Exception *)v36; + } + v10 = v32; + a3[2] = 0; + LOBYTE(v36) = v10; + if ( !v10 ) + { + v11 = (struct _Unwind_Exception *)(*(int (__thiscall **)(int, struct _Unwind_Exception *, struct _Unwind_Exception *))(*(_DWORD *)v35 + 48))( + v35, + v8, + lpuexcpt); + v12 = v36; + if ( v11 != lpuexcpt ) + v12 = 1; + LOBYTE(v36) = v12; + } + lpuexcpt = (struct _Unwind_Exception *)(unsigned __int8)v36; + return v35; +} +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); +// 4872B0: using guessed type unsigned int anonymous_0[7]; + +//----- (00487660) -------------------------------------------------------- +int __stdcall std::num_put>::_M_insert_int( + int a1, + int a2, + _DWORD *a3, + int a4, + __int64 a5) +{ + void *v5; // esp + void *v6; // esp + __int64 v7; // rax + int v8; // ecx + struct _Unwind_Exception *v9; // edx + int v10; // eax + char v11; // bl + struct _Unwind_Exception *v12; // eax + char v13; // bl + int v15; // edi + int v16; // eax + void *v17; // esp + void *v18; // esp + int v19; // eax + void *v20; // esp + void *v21; // esp + int v22; // eax + char *v23; // eax + _DWORD *v24; // eax + __int16 v25; // [esp-40h] [ebp-E8h] BYREF + _WORD v26[34]; // [esp-3Ch] [ebp-E4h] BYREF + unsigned int v27; // [esp+8h] [ebp-A0h] + unsigned int v28; // [esp+2Ch] [ebp-7Ch] + int v29; // [esp+30h] [ebp-78h] + int v30; // [esp+34h] [ebp-74h] + int v31; // [esp+38h] [ebp-70h] + unsigned int v32; // [esp+3Ch] [ebp-6Ch] + int v33; // [esp+40h] [ebp-68h] + std::locale::_Impl *v34; // [esp+44h] [ebp-64h] + __int64 v35; // [esp+48h] [ebp-60h] + int *v36; // [esp+50h] [ebp-58h] + int v37; // [esp+54h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+58h] [ebp-50h] + + v33 = a1; + v30 = a2; + v29 = a4; + v35 = a5; + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v36 = (int *)(*(_DWORD *)(a3[27] + 12) + 4 * (_DWORD)lpuexcpt); + v37 = *v36; + if ( !v37 ) + { + v24 = operator new(0xA8u); + v24[1] = 0; + *v24 = &off_51AF70; + v24[2] = 0; + v24[3] = 0; + *((_BYTE *)v24 + 16) = 0; + v24[5] = 0; + v24[6] = 0; + v24[7] = 0; + v24[8] = 0; + v24[9] = 0; + *((_BYTE *)v24 + 164) = 0; + v34 = (std::locale::_Impl *)v24; + std::__numpunct_cache::_M_cache((int)v24, (int)(a3 + 27)); + std::locale::_Impl::_M_install_cache(a3[27], v34, lpuexcpt, v27); + v37 = *v36; + } + v31 = v37 + 40; + v32 = a3[3]; + v5 = alloca(96); + v6 = alloca(96); + v28 = v32 & 0x4A; + v34 = (std::locale::_Impl *)&v25; + v7 = v35; + LOBYTE(v36) = v28 != 8 && v28 != 64; + if ( (HIDWORD(v35) | (((_DWORD)v35 != 0) + HIDWORD(v35) - 1)) < 0 && (_BYTE)v36 ) + v7 = -v35; + v8 = std::__int_to_char((_WORD *)v34 + 40, v7, HIDWORD(v7), v31, v32, (char)v36); + lpuexcpt = (struct _Unwind_Exception *)v8; + v9 = (std::locale::_Impl *)((char *)v34 + 2 * (40 - v8)); + if ( !*(_BYTE *)(v37 + 16) ) + { + if ( (_BYTE)v36 ) + goto LABEL_8; +LABEL_20: + if ( (v32 & 0x200) != 0 && v35 ) + { + if ( v28 == 64 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v9 = (struct _Unwind_Exception *)((char *)v9 - 2); + } + else + { + v9 = (struct _Unwind_Exception *)((char *)v9 - 4); + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 2); + *((_WORD *)v9 + 1) = *(_WORD *)(v31 + 2 * ((v32 >> 14) & 1) + 4); + } + *(_WORD *)v9 = *(_WORD *)(v37 + 48); + } + goto LABEL_10; + } + v19 = 16 * ((unsigned int)(4 * v8 + 31) >> 4); + v20 = alloca(v19); + v21 = alloca(v19); + v22 = *(_DWORD *)(v37 + 12); + lpuexcpt = (struct _Unwind_Exception *)v26; + v23 = (char *)std::__add_grouping( + v26, + *(_WORD *)(v37 + 38), + *(char **)(v37 + 8), + v22, + (char *)v9, + (char *)v9 + 2 * v8); + v9 = lpuexcpt; + lpuexcpt = (struct _Unwind_Exception *)((v23 - (char *)lpuexcpt) >> 1); + if ( !(_BYTE)v36 ) + goto LABEL_20; +LABEL_8: + if ( v35 < 0 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v9 = (struct _Unwind_Exception *)((char *)v9 - 2); + *(_WORD *)v9 = *(_WORD *)(v37 + 40); + } + else if ( (v32 & 0x800) != 0 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v9 = (struct _Unwind_Exception *)((char *)v9 - 2); + *(_WORD *)v9 = *(_WORD *)(v37 + 42); + v10 = a3[2]; + v37 = v10; + if ( v10 <= (int)lpuexcpt ) + goto LABEL_11; + goto LABEL_17; + } +LABEL_10: + v10 = a3[2]; + v37 = v10; + if ( v10 <= (int)lpuexcpt ) + goto LABEL_11; +LABEL_17: + v15 = v10; + v16 = 16 * ((unsigned int)(2 * v10 + 27) >> 4); + v17 = alloca(v16); + v18 = alloca(v16); + v36 = (int *)&v25; + std::__pad>::_S_pad(a3, (void *)(unsigned __int16)v29, &v25, v9, v15, (int)lpuexcpt); + v9 = (struct _Unwind_Exception *)v36; + lpuexcpt = (struct _Unwind_Exception *)v37; +LABEL_11: + v11 = v30; + a3[2] = 0; + LOBYTE(v37) = v11; + if ( !v11 ) + { + v12 = (struct _Unwind_Exception *)(*(int (__thiscall **)(int, struct _Unwind_Exception *, struct _Unwind_Exception *))(*(_DWORD *)v33 + 48))( + v33, + v9, + lpuexcpt); + v13 = v37; + if ( v12 != lpuexcpt ) + v13 = 1; + LOBYTE(v37) = v13; + } + lpuexcpt = (struct _Unwind_Exception *)(unsigned __int8)v37; + return v33; +} +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (00487AB0) -------------------------------------------------------- +int __stdcall std::num_put>::_M_insert_int( + int a1, + int a2, + _DWORD *a3, + int a4, + int a5, + int a6) +{ + unsigned int v6; // ecx + void *v7; // esp + void *v8; // esp + struct _Unwind_Exception *v9; // edx + int v10; // eax + char v11; // si + struct _Unwind_Exception *v12; // eax + char v13; // dl + int v15; // eax + void *v16; // esp + void *v17; // esp + int v18; // eax + char *v19; // eax + int v20; // esi + int v21; // eax + void *v22; // esp + void *v23; // esp + _DWORD *v24; // eax + char *v25; // [esp-4Ch] [ebp-E4h] + __int16 v26; // [esp-40h] [ebp-D8h] BYREF + _WORD v27[34]; // [esp-3Ch] [ebp-D4h] BYREF + unsigned int v28; // [esp+8h] [ebp-90h] + __int16 v29[14]; // [esp+10h] [ebp-88h] BYREF + int v30; // [esp+2Ch] [ebp-6Ch] + unsigned int v31; // [esp+30h] [ebp-68h] + unsigned int v32; // [esp+34h] [ebp-64h] + int v33; // [esp+38h] [ebp-60h] + int v34; // [esp+3Ch] [ebp-5Ch] + std::locale::_Impl *v35; // [esp+40h] [ebp-58h] + int *v36; // [esp+44h] [ebp-54h] + unsigned __int64 v37; // [esp+48h] [ebp-50h] + int v38; // [esp+50h] [ebp-48h] + int v39; // [esp+54h] [ebp-44h] + struct _Unwind_Exception *lpuexcpt; // [esp+58h] [ebp-40h] + + v38 = a1; + v34 = a2; + v33 = a4; + v37 = __PAIR64__(a5, a6); + lpuexcpt = (struct _Unwind_Exception *)std::locale::id::_M_id(&std::numpunct::id); + v36 = (int *)(*(_DWORD *)(a3[27] + 12) + 4 * (_DWORD)lpuexcpt); + v39 = *v36; + if ( !v39 ) + { + v24 = operator new(0xA8u); + v24[1] = 0; + *v24 = &off_51AF70; + v24[2] = 0; + v24[3] = 0; + *((_BYTE *)v24 + 16) = 0; + v24[5] = 0; + v24[6] = 0; + v24[7] = 0; + v24[8] = 0; + v24[9] = 0; + *((_BYTE *)v24 + 164) = 0; + v35 = (std::locale::_Impl *)v24; + std::__numpunct_cache::_M_cache((int)v24, (int)(a3 + 27)); + std::locale::_Impl::_M_install_cache(a3[27], v35, lpuexcpt, v28); + v39 = *v36; + } + v6 = a3[3]; + v30 = v39 + 40; + v32 = v6; + v7 = alloca(96); + v8 = alloca(96); + v35 = (std::locale::_Impl *)&v26; + v31 = v6 & 0x4A; + LOBYTE(v36) = v31 != 8 && v31 != 64; + lpuexcpt = (struct _Unwind_Exception *)std::__int_to_char( + v29, + HIDWORD(v37), + v37, + v39 + 40, + v6, + (char)v36); + v9 = (std::locale::_Impl *)((char *)v35 + 2 * (40 - (_DWORD)lpuexcpt)); + if ( *(_BYTE *)(v39 + 16) ) + { + v15 = 16 * ((unsigned int)(4 * (_DWORD)lpuexcpt + 31) >> 4); + v16 = alloca(v15); + v17 = alloca(v15); + v25 = (char *)v9 + 2 * (_DWORD)lpuexcpt; + v18 = *(_DWORD *)(v39 + 12); + lpuexcpt = (struct _Unwind_Exception *)v27; + v19 = (char *)std::__add_grouping(v27, *(_WORD *)(v39 + 38), *(char **)(v39 + 8), v18, (char *)v9, v25); + v9 = lpuexcpt; + lpuexcpt = (struct _Unwind_Exception *)((v19 - (char *)lpuexcpt) >> 1); + if ( (_BYTE)v36 ) + goto LABEL_5; + } + else if ( (_BYTE)v36 ) + { + goto LABEL_5; + } + if ( (v32 & 0x200) != 0 && v37 ) + { + if ( v31 == 64 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v9 = (struct _Unwind_Exception *)((char *)v9 - 2); + } + else + { + v9 = (struct _Unwind_Exception *)((char *)v9 - 4); + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 2); + *((_WORD *)v9 + 1) = *(_WORD *)(v30 + 2 * ((v32 >> 14) & 1) + 4); + } + *(_WORD *)v9 = *(_WORD *)(v39 + 48); + } +LABEL_5: + v10 = a3[2]; + v39 = v10; + if ( v10 > (int)lpuexcpt ) + { + v20 = v10; + v21 = 16 * ((unsigned int)(2 * v10 + 27) >> 4); + v22 = alloca(v21); + v23 = alloca(v21); + HIDWORD(v37) = &v26; + std::__pad>::_S_pad( + a3, + (void *)(unsigned __int16)v33, + &v26, + v9, + v20, + (int)lpuexcpt); + v9 = (struct _Unwind_Exception *)HIDWORD(v37); + lpuexcpt = (struct _Unwind_Exception *)v39; + } + v11 = v34; + a3[2] = 0; + LOBYTE(v39) = v11; + if ( !v11 ) + { + v12 = (struct _Unwind_Exception *)(*(int (__thiscall **)(int, struct _Unwind_Exception *, struct _Unwind_Exception *))(*(_DWORD *)v38 + 48))( + v38, + v9, + lpuexcpt); + v13 = v39; + if ( v12 != lpuexcpt ) + v13 = 1; + LOBYTE(v39) = v13; + } + lpuexcpt = (struct _Unwind_Exception *)(unsigned __int8)v39; + return v38; +} +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); +// 487AB0: using guessed type __int16 anonymous_1[14]; + +//----- (00487E80) -------------------------------------------------------- +int __stdcall std::num_put>::_M_group_float( + char *a1, + int a2, + __int16 a3, + char *Src, + _WORD *a5, + char *a6, + _DWORD *a7) +{ + int v7; // ebx + _WORD *v8; // edx + int v9; // ebp + int v10; // eax + int result; // eax + + if ( Src ) + { + v7 = (Src - a6) >> 1; + v8 = std::__add_grouping(a5, a3, a1, a2, a6, Src); + v9 = v8 - a5; + v10 = 0; + if ( *a7 != v7 ) + { + memcpy(v8, Src, 2 * (*a7 - v7)); + v10 = *a7 - v7; + } + result = v9 + v10; + *a7 = result; + } + else + { + result = std::__add_grouping(a5, a3, a1, a2, a6, &a6[2 * *a7]) - a5; + *a7 = result; + } + return result; +} + +//----- (00487F50) -------------------------------------------------------- +int *__thiscall std::num_put>::_M_insert_float( + void *this, + int *a2, + int a3, + std::__num_base *a4, + int a5, + void *a6, + double a7) +{ + int v7; // eax + int v8; // edx + void *v9; // esp + void *v10; // esp + int v11; // eax + void *v12; // ecx + int v13; // eax + void *v14; // esp + void *v15; // esp + char *v16; // edx + char v17; // cl + int v18; // eax + char v19; // dl + int v20; // eax + int v21; // eax + char v22; // bl + int v24; // eax + void *v25; // esp + void *v26; // esp + size_t v27; // esi + int v28; // eax + void *v29; // esp + void *v30; // esp + __int16 *v31; // ecx + int v32; // ecx + int v33; // eax + void *v34; // esp + void *v35; // esp + int v36; // eax + int v37; // eax + void *v38; // esp + void *v39; // esp + char v40; // al + _DWORD *v41; // eax + int v42; // esi + int v43; // [esp-34h] [ebp-ECh] + int v44; // [esp-30h] [ebp-E8h] + int v45; // [esp-2Ch] [ebp-E4h] + int v46; // [esp-28h] [ebp-E0h] + _DWORD v47[11]; // [esp-20h] [ebp-D8h] BYREF + _WORD *v48; // [esp+Ch] [ebp-ACh] + __int16 v49; // [esp+20h] [ebp-98h] BYREF + __int16 v50; // [esp+22h] [ebp-96h] BYREF + std::locale::_Impl *v51; // [esp+2Ch] [ebp-8Ch] + int v52; // [esp+30h] [ebp-88h] + int v53; // [esp+34h] [ebp-84h] + void *v54; // [esp+38h] [ebp-80h] + std::locale::facet *v55; // [esp+3Ch] [ebp-7Ch] + int v56; // [esp+40h] [ebp-78h] + int *v57; // [esp+44h] [ebp-74h] + int v58; // [esp+48h] [ebp-70h] + int v59; // [esp+4Ch] [ebp-6Ch] + size_t MaxCount[2]; // [esp+50h] [ebp-68h] + void *Buf; // [esp+58h] [ebp-60h] + int v62; // [esp+98h] [ebp-20h] BYREF + int *c_locale; // [esp+9Ch] [ebp-1Ch] BYREF + char v64[24]; // [esp+A0h] [ebp-18h] BYREF + + v54 = this; + v57 = a2; + *(double *)MaxCount = a7; + v56 = a3; + v53 = a5; + Buf = a6; + v59 = (int)a4 + 108; + v55 = (std::locale::facet *)std::locale::id::_M_id(&std::numpunct::id); + v52 = *(_DWORD *)(*((_DWORD *)a4 + 27) + 12) + 4 * (_DWORD)v55; + v58 = *(_DWORD *)v52; + if ( !v58 ) + { + v41 = operator new(0xA8u); + v42 = v59; + v41[1] = 0; + *v41 = &off_51AF70; + v41[2] = 0; + v41[3] = 0; + *((_BYTE *)v41 + 16) = 0; + v41[5] = 0; + v41[6] = 0; + v41[7] = 0; + v41[8] = 0; + v41[9] = 0; + *((_BYTE *)v41 + 164) = 0; + v51 = (std::locale::_Impl *)v41; + std::__numpunct_cache::_M_cache((int)v41, v42); + std::locale::_Impl::_M_install_cache(*((_DWORD *)a4 + 27), v51, v55, v47[10]); + v58 = *(_DWORD *)v52; + } + v7 = 6; + if ( *((int *)a4 + 1) >= 0 ) + v7 = *((_DWORD *)a4 + 1); + v55 = (std::locale::facet *)v7; + std::__num_base::_S_format_float(a4, (const std::ios_base *)v64, (char *)(char)Buf); + v8 = *((_DWORD *)a4 + 3) & 0x104; + v9 = alloca(64); + v10 = alloca(64); + Buf = v47; + if ( v8 == 260 ) + { + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + v36 = std::__convert_from_v(&c_locale, (char *)Buf, 45, v64, MaxCount[0], MaxCount[1]); + v62 = v36; + if ( v36 > 44 ) + { + v55 = (std::locale::facet *)(v36 + 1); + v37 = 16 * ((unsigned int)(v36 + 28) >> 4); + v38 = alloca(v37); + v39 = alloca(v37); + Buf = v47; + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + v62 = std::__convert_from_v(&c_locale, (char *)Buf, (int)v55, v64, MaxCount[0], MaxCount[1]); + } + } + else + { + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + v11 = std::__convert_from_v(&c_locale, (char *)Buf, 45, v64, v55, MaxCount[0], MaxCount[1]); + v62 = v11; + if ( v11 > 44 ) + { + v52 = v11 + 1; + v24 = 16 * ((unsigned int)(v11 + 28) >> 4); + v25 = alloca(v24); + v26 = alloca(v24); + Buf = v47; + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + v62 = std::__convert_from_v(&c_locale, (char *)Buf, v52, v64, v55, MaxCount[0], MaxCount[1]); + } + } + v12 = std::use_facet>(v59); + v13 = 16 * ((unsigned int)(2 * v62 + 27) >> 4); + v14 = alloca(v13); + v15 = alloca(v13); + v55 = (std::locale::facet *)v47; + v59 = (int)v47; + (*(void (__thiscall **)(void *, void *, char *, _DWORD *, int, int, int, int))(*(_DWORD *)v12 + 44))( + v12, + Buf, + (char *)Buf + v62, + v47, + v43, + v44, + v45, + v46); + MaxCount[0] = v62; + if ( !v62 ) + { + if ( *(_BYTE *)(v58 + 16) ) + { + v16 = 0; + goto LABEL_19; + } +LABEL_11: + v18 = *((_DWORD *)a4 + 2); + Buf = (void *)v18; + if ( v18 <= (int)MaxCount[0] ) + goto LABEL_12; + goto LABEL_22; + } + v16 = (char *)memchr(Buf, 46, MaxCount[0]); + v17 = *(_BYTE *)(v58 + 16); + if ( !v16 ) + { + if ( v17 ) + { + if ( (int)MaxCount[0] <= 2 ) + goto LABEL_19; + v40 = *((_BYTE *)Buf + 1); + if ( v40 <= 57 ) + { + LOBYTE(v52) = *((_BYTE *)Buf + 2); + if ( (unsigned __int8)(v52 - 48) <= 9u && v40 > 47 ) + goto LABEL_19; + } + } + goto LABEL_11; + } + v16 = (char *)v55 + 2 * (v16 - (_BYTE *)Buf); + *(_WORD *)v16 = *(_WORD *)(v58 + 36); + if ( !v17 ) + goto LABEL_11; +LABEL_19: + v27 = MaxCount[0]; + v28 = 16 * ((4 * MaxCount[0] + 27) >> 4); + v29 = alloca(v28); + v30 = alloca(v28); + v52 = (int)&v49; + if ( ((*(_BYTE *)Buf - 43) & 0xFD) != 0 ) + { + MaxCount[0] = 0; + v31 = (__int16 *)v52; + } + else + { + MaxCount[0] = 1; + v49 = *(_WORD *)v55; + v62 = v27 - 1; + v31 = &v50; + v59 = (int)v55 + 2; + } + std::num_put>::_M_group_float( + *(char **)(v58 + 8), + *(_DWORD *)(v58 + 12), + *(_WORD *)(v58 + 38), + v16, + v31, + (char *)v59, + &v62); + MaxCount[0] += v62; + v62 = MaxCount[0]; + v59 = v52; + v18 = *((_DWORD *)a4 + 2); + Buf = (void *)v18; + if ( v18 > (int)MaxCount[0] ) + { +LABEL_22: + v32 = v18; + v33 = 16 * ((unsigned int)(2 * v18 + 27) >> 4); + v34 = alloca(v33); + v35 = alloca(v33); + v48 = (_WORD *)v59; + v59 = (int)&v49; + std::__pad>::_S_pad( + a4, + (void *)(unsigned __int16)v53, + &v49, + v48, + v32, + MaxCount[0]); + v62 = (int)Buf; + MaxCount[0] = (size_t)Buf; + } +LABEL_12: + v19 = v56; + *((_DWORD *)a4 + 2) = 0; + LOBYTE(Buf) = v19; + if ( !v19 ) + { + v20 = *v57; + v47[8] = v59; + v47[9] = MaxCount[0]; + v21 = (*(int (__thiscall **)(int *, int, size_t))(v20 + 48))(v57, v59, MaxCount[0]); + v22 = (char)Buf; + if ( v21 != MaxCount[0] ) + v22 = 1; + LOBYTE(Buf) = v22; + } + MaxCount[0] = (unsigned __int8)Buf; + return v57; +} +// 4880D2: variable 'v43' is possibly undefined +// 4880D2: variable 'v44' is possibly undefined +// 4880D2: variable 'v45' is possibly undefined +// 4880D2: variable 'v46' is possibly undefined +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (00488570) -------------------------------------------------------- +// bad sp value at call has been detected, the output may be wrong! +int __thiscall std::num_put>::_M_insert_float( + void *this, + int a2, + int a3, + int *a4, + int a5, + char a6, + long double a7) +{ + int v7; // esi + void *v8; // esp + void *v9; // esp + int v10; // eax + int *v11; // ecx + int v12; // eax + void *v13; // esp + void *v14; // esp + int v15; // eax + int v16; // esi + char *v17; // edx + char v18; // cl + int v19; // ebx + int v21; // eax + void *v22; // esp + void *v23; // esp + int v24; // eax + void *v25; // esp + void *v26; // esp + __int16 *v27; // ebx + int v28; // esi + int v29; // eax + void *v30; // esp + void *v31; // esp + int v32; // eax + int v33; // eax + void *v34; // esp + void *v35; // esp + int v36; // [esp-44h] [ebp-BCh] + int v37; // [esp-40h] [ebp-B8h] + int v41; // [esp-3Ch] [ebp-B4h] + int v43; // [esp-38h] [ebp-B0h] + int v44; // [esp-34h] [ebp-ACh] + __int16 v45; // [esp-30h] [ebp-A8h] BYREF + char v46; // [esp-2Eh] [ebp-A6h] BYREF + const std::ios_base *v47; // [esp+4h] [ebp-74h] + char *v48; // [esp+8h] [ebp-70h] + int v49; // [esp+14h] [ebp-64h] + __int16 v50; // [esp+20h] [ebp-58h] BYREF + __int16 v51; // [esp+22h] [ebp-56h] BYREF + int v52; // [esp+24h] [ebp-54h] + void *v53; // [esp+28h] [ebp-50h] + int v54; // [esp+2Ch] [ebp-4Ch] + int v55; // [esp+30h] [ebp-48h] + int v56; // [esp+34h] [ebp-44h] + struct _Unwind_Exception *v57; // [esp+38h] [ebp-40h] + int v58; // [esp+3Ch] [ebp-3Ch] + size_t MaxCount; // [esp+48h] [ebp-30h] BYREF + int *c_locale; // [esp+4Ch] [ebp-2Ch] BYREF + char v61[40]; // [esp+50h] [ebp-28h] BYREF + + v53 = this; + v56 = a2; + v54 = a3; + v52 = a5; + v58 = (int)(a4 + 27); + v57 = std::__use_cache>::operator()(a4 + 27); + v7 = a4[1]; + v48 = (char *)a6; + v47 = (const std::ios_base *)v61; + if ( v7 < 0 ) + v7 = 6; + std::__num_base::_S_format_float((std::__num_base *)a4, v47, v48); + v55 = a4[3]; + v8 = alloca(80); + v9 = alloca(80); + if ( (v55 & 0x104) == 260 ) + { + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + v32 = std::__convert_from_v(&c_locale, (char *)&v45, 54, v61, *(_QWORD *)&a7, HIDWORD(a7)); + MaxCount = v32; + if ( v32 > 53 ) + { + v55 = v32 + 1; + v33 = 16 * ((unsigned int)(v32 + 28) >> 4); + v34 = alloca(v33); + v35 = alloca(v33); + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + MaxCount = std::__convert_from_v(&c_locale, (char *)&v45, v55, v61, *(_QWORD *)&a7, HIDWORD(a7)); + } + } + else + { + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + v10 = std::__convert_from_v(&c_locale, (char *)&v45, 54, v61, v7, *(_QWORD *)&a7, HIDWORD(a7)); + MaxCount = v10; + if ( v10 > 53 ) + { + v55 = v10 + 1; + v21 = 16 * ((unsigned int)(v10 + 28) >> 4); + v22 = alloca(v21); + v23 = alloca(v21); + c_locale = (int *)std::locale::facet::_S_get_c_locale(); + MaxCount = std::__convert_from_v(&c_locale, (char *)&v45, v55, v61, v7, *(_QWORD *)&a7, HIDWORD(a7)); + } + } + v11 = (int *)std::use_facet>(v58); + v12 = 16 * ((2 * MaxCount + 27) >> 4); + v13 = alloca(v12); + v14 = alloca(v12); + v15 = *v11; + v58 = (int)&v45; + (*(void (__thiscall **)(int *, __int16 *, char *, __int16 *, int, int, int, int, int))(v15 + 44))( + v11, + &v45, + (char *)&v45 + MaxCount, + &v45, + v36, + v37, + v41, + v43, + v44); + v16 = MaxCount; + if ( !MaxCount ) + { + if ( *((_BYTE *)v57 + 16) ) + { + v17 = 0; + goto LABEL_15; + } +LABEL_9: + v19 = a4[2]; + if ( v16 >= v19 ) + goto LABEL_10; + goto LABEL_18; + } + v17 = (char *)memchr(&v45, 46, MaxCount); + v18 = *((_BYTE *)v57 + 16); + if ( !v17 ) + { + if ( v18 && (v16 <= 2 || SHIBYTE(v45) <= 57 && (unsigned __int8)(v46 - 48) <= 9u && SHIBYTE(v45) > 47) ) + goto LABEL_15; + goto LABEL_9; + } + v17 = (char *)(&v45 + v17 - (char *)&v45); + *(_WORD *)v17 = *((_WORD *)v57 + 18); + if ( !v18 ) + goto LABEL_9; +LABEL_15: + v24 = 16 * ((unsigned int)(4 * v16 + 27) >> 4); + v25 = alloca(v24); + v26 = alloca(v24); + if ( (((_BYTE)v45 - 43) & 0xFD) != 0 ) + { + v27 = &v50; + v28 = 0; + } + else + { + v27 = &v51; + v58 = (int)&v46; + v50 = v45; + MaxCount = v16 - 1; + v28 = 1; + } + v55 = (int)&v50; + std::num_put>::_M_group_float( + *((char **)v57 + 2), + *((_DWORD *)v57 + 3), + *((_WORD *)v57 + 19), + v17, + v27, + (char *)v58, + &MaxCount); + v16 = MaxCount + v28; + MaxCount = v16; + v58 = v55; + v19 = a4[2]; + if ( v16 >= v19 ) + goto LABEL_10; +LABEL_18: + v29 = 16 * ((unsigned int)(2 * v19 + 27) >> 4); + v30 = alloca(v29); + v31 = alloca(v29); + v49 = v16; + v16 = v19; + std::__pad>::_S_pad(a4, (void *)(unsigned __int16)v52, &v50, (_WORD *)v58, v19, v49); + MaxCount = v19; + v58 = (int)&v50; +LABEL_10: + a4[2] = 0; + if ( !(_BYTE)v54 ) + (*(int (__thiscall **)(int, int, int))(*(_DWORD *)v56 + 48))(v56, v58, v16); + return v56; +} +// 488698: bad sp value at call +// 488678: variable 'v36' is possibly undefined +// 488678: variable 'v37' is possibly undefined +// 488678: variable 'v41' is possibly undefined +// 488678: variable 'v43' is possibly undefined +// 488678: variable 'v44' is possibly undefined + +//----- (00488950) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + _DWORD *a4, + unsigned __int16 a5, + int a6) +{ + int (__stdcall *v6)(int, int, _DWORD *, __int16, int); // eax + int v7; // edi + int result; // eax + + v6 = *(int (__stdcall **)(int, int, _DWORD *, __int16, int))(*(_DWORD *)this + 36); + if ( v6 != std::num_put>::do_put ) + return ((int (__fastcall *)(void *, int, int, int, _DWORD *, _DWORD, int))v6)(this, a6, a2, a3, a4, a5, a6); + v7 = a4[3]; + a4[3] = v7 & 0xFFFFBDB5 | 0x208; + result = std::num_put>::_M_insert_int(a2, a3, a4, a5, a6); + a4[3] = v7; + return result; +} + +//----- (004889F0) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + int a4, + unsigned __int16 a5, + unsigned __int8 a6) +{ + return (*(int (__thiscall **)(void *, int, int, int, _DWORD, _DWORD))(*(_DWORD *)this + 8))(this, a2, a3, a4, a5, a6); +} + +//----- (00488A10) -------------------------------------------------------- +int *__thiscall std::num_put>::put( + void *this, + int *a2, + int a3, + std::__num_base *a4, + unsigned __int16 a5, + double a6) +{ + int *(__thiscall *v6)(void *, int *, int, std::__num_base *, __int16, double); // eax + + v6 = *(int *(__thiscall **)(void *, int *, int, std::__num_base *, __int16, double))(*(_DWORD *)this + 28); + if ( v6 == std::num_put>::do_put ) + return std::num_put>::_M_insert_float(this, a2, a3, a4, a5, 0, a6); + else + return (int *)((int (__fastcall *)(void *, std::__num_base *, int *, int, std::__num_base *, _DWORD, _DWORD, _DWORD))v6)( + this, + a4, + a2, + a3, + a4, + a5, + LODWORD(a6), + HIDWORD(a6)); +} + +//----- (00488A80) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + int *a4, + unsigned __int16 a5, + long double a6) +{ + int (__thiscall *v6)(void *, int, int, int *, __int16, long double); // eax + + v6 = *(int (__thiscall **)(void *, int, int, int *, __int16, long double))(*(_DWORD *)this + 32); + if ( v6 == std::num_put>::do_put ) + return std::num_put>::_M_insert_float( + this, + a2, + a3, + a4, + a5, + 76, + a6); + else + return ((int (__fastcall *)(void *, int *, int, int, int *, _DWORD, _DWORD, _DWORD, _DWORD))v6)( + this, + a4, + a2, + a3, + a4, + a5, + LODWORD(a6), + DWORD1(a6), + HIDWORD(a6)); +} + +//----- (00488AF0) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + _DWORD *a4, + unsigned __int16 a5, + int a6) +{ + int (__stdcall *v6)(int, int, _DWORD *, unsigned __int16, int); // eax + + v6 = *(int (__stdcall **)(int, int, _DWORD *, unsigned __int16, int))(*(_DWORD *)this + 12); + if ( v6 == std::num_put>::do_put ) + return std::num_put>::_M_insert_int(a2, a3, a4, a5, a6); + else + return v6(a2, a3, a4, a5, a6); +} + +//----- (00488B50) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + _DWORD *a4, + unsigned __int16 a5, + int a6) +{ + int (__stdcall *v6)(int, int, _DWORD *, unsigned __int16, int); // eax + + v6 = *(int (__stdcall **)(int, int, _DWORD *, unsigned __int16, int))(*(_DWORD *)this + 16); + if ( v6 == std::num_put>::do_put ) + return std::num_put>::_M_insert_int(a2, a3, a4, a5, a6); + else + return v6(a2, a3, a4, a5, a6); +} + +//----- (00488BB0) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + _DWORD *a4, + unsigned __int16 a5, + __int64 a6) +{ + int (__stdcall *v6)(int, int, _DWORD *, unsigned __int16, __int64); // eax + + v6 = *(int (__stdcall **)(int, int, _DWORD *, unsigned __int16, __int64))(*(_DWORD *)this + 20); + if ( v6 == std::num_put>::do_put ) + return std::num_put>::_M_insert_int(a2, a3, a4, a5, a6); + else + return ((int (__stdcall *)(int, int, _DWORD *, _DWORD, _DWORD, _DWORD))v6)(a2, a3, a4, a5, a6, HIDWORD(a6)); +} + +//----- (00488C20) -------------------------------------------------------- +int __thiscall std::num_put>::put( + void *this, + int a2, + int a3, + _DWORD *a4, + unsigned __int16 a5, + int a6, + int a7) +{ + int (__stdcall *v7)(int, int, _DWORD *, unsigned __int16, int, int); // eax + + v7 = *(int (__stdcall **)(int, int, _DWORD *, unsigned __int16, int, int))(*(_DWORD *)this + 24); + if ( v7 == std::num_put>::do_put ) + return std::num_put>::_M_insert_int( + a2, + a3, + a4, + a5, + a6, + a7); + else + return v7(a2, a3, a4, a5, a6, a7); +} + +//----- (00488C90) -------------------------------------------------------- +_WORD *__stdcall std::num_put>::_M_pad( + __int16 a1, + int a2, + _DWORD *a3, + _WORD *Size, + _WORD *a5, + int *a6) +{ + _WORD *result; // eax + + result = std::__pad>::_S_pad(a3, (void *)(unsigned __int16)a1, Size, a5, a2, *a6); + *a6 = a2; + return result; +} + +//----- (00488CE0) -------------------------------------------------------- +int __stdcall std::num_put>::do_put( + int a1, + int a2, + _DWORD *a3, + __int16 a4, + int a5) +{ + int v5; // edi + int result; // eax + + v5 = a3[3]; + a3[3] = v5 & 0xFFFFBDB5 | 0x208; + result = std::num_put>::_M_insert_int( + a1, + a2, + a3, + (unsigned __int16)a4, + a5); + a3[3] = v5; + return result; +} + +//----- (00488D60) -------------------------------------------------------- +int __stdcall std::num_put>::do_put( + int a1, + int a2, + _DWORD *a3, + unsigned __int16 a4, + int a5) +{ + int v5; // edi + struct _Unwind_Exception *v7; // eax + int v8; // ecx + int v9; // eax + int v10; // edx + int v11; // eax + int v12; // edx + int v13; // eax + void *v14; // esp + unsigned __int16 v15; // di + void *v16; // esp + unsigned __int16 *v17; // eax + int v18; // edi + int v19; // edi + int v20; // eax + char v21; // cl + int v22; // edi + int v23; // edi + int v24; // eax + char v25; // dl + int v26; // [esp+20h] [ebp-68h] BYREF + int *v27; // [esp+24h] [ebp-64h] + int v28; // [esp+28h] [ebp-60h] + int v29; // [esp+2Ch] [ebp-5Ch] + unsigned __int16 v30; // [esp+32h] [ebp-56h] + int v31; // [esp+34h] [ebp-54h] + int v32; // [esp+38h] [ebp-50h] + int v33; // [esp+3Ch] [ebp-4Ch] + + v5 = a3[3]; + v30 = a4; + v31 = v5; + if ( (v5 & 1) == 0 ) + return std::num_put>::_M_insert_int( + a1, + a2, + a3, + a4, + (unsigned __int8)a5); + v33 = a5; + v7 = std::__use_cache>::operator()(a3 + 27); + if ( (_BYTE)a5 ) + { + v8 = *((_DWORD *)v7 + 5); + v9 = *((_DWORD *)v7 + 6); + } + else + { + v8 = *((_DWORD *)v7 + 7); + v9 = *((_DWORD *)v7 + 8); + } + v29 = v8; + v32 = v9; + v10 = v9; + LOBYTE(v33) = a2; + v11 = a3[2]; + if ( v32 >= v11 ) + { + a3[2] = 0; + if ( !(_BYTE)a2 ) + LOBYTE(v33) = v32 != (*(int (__thiscall **)(int, int, int))(*(_DWORD *)a1 + 48))(a1, v29, v32); + return a1; + } + v12 = v11 - v10; + v28 = v12; + v13 = 16 * ((unsigned int)(2 * v12 + 27) >> 4); + v14 = alloca(v13); + v15 = v30; + v16 = alloca(v13); + v17 = (unsigned __int16 *)&v26; + v27 = &v26; + do + { + *v17++ = v15; + --v12; + } + while ( v12 ); + a3[2] = 0; + if ( (v31 & 0xB0) == 32 ) + { + if ( !(_BYTE)a2 ) + { + v22 = v32; + if ( v22 == (*(int (__thiscall **)(int, int, int))(*(_DWORD *)a1 + 48))(a1, v29, v32) ) + { + v23 = v28; + v24 = (*(int (__thiscall **)(int, int *, int))(*(_DWORD *)a1 + 48))(a1, v27, v28); + v25 = v33; + if ( v23 != v24 ) + v25 = 1; + LOBYTE(v33) = v25; + return a1; + } +LABEL_23: + LOBYTE(v33) = 1; + } + } + else if ( !(_BYTE)a2 ) + { + v18 = v28; + if ( v18 == (*(int (__thiscall **)(int, int *, int))(*(_DWORD *)a1 + 48))(a1, v27, v28) ) + { + v19 = v32; + v20 = (*(int (__thiscall **)(int, int, int))(*(_DWORD *)a1 + 48))(a1, v29, v32); + v21 = v33; + if ( v19 != v20 ) + v21 = 1; + LOBYTE(v33) = v21; + return a1; + } + goto LABEL_23; + } + return a1; +} + +//----- (00488F90) -------------------------------------------------------- +int *__thiscall std::num_put>::do_put( + void *this, + int *a2, + int a3, + std::__num_base *a4, + __int16 a5, + double a6) +{ + return std::num_put>::_M_insert_float( + this, + a2, + a3, + a4, + (unsigned __int16)a5, + 0, + a6); +} + +//----- (00488FE0) -------------------------------------------------------- +int __thiscall std::num_put>::do_put( + void *this, + int a2, + int a3, + int *a4, + __int16 a5, + long double a6) +{ + return std::num_put>::_M_insert_float( + this, + a2, + a3, + a4, + (unsigned __int16)a5, + 76, + a6); +} + +//----- (00489030) -------------------------------------------------------- +int __stdcall std::num_put>::do_put( + int a1, + int a2, + _DWORD *a3, + unsigned __int16 a4, + int a5) +{ + return std::num_put>::_M_insert_int(a1, a2, a3, a4, a5); +} + +//----- (00489040) -------------------------------------------------------- +int __stdcall std::num_put>::do_put( + int a1, + int a2, + _DWORD *a3, + unsigned __int16 a4, + int a5) +{ + return std::num_put>::_M_insert_int(a1, a2, a3, a4, a5); +} + +//----- (00489050) -------------------------------------------------------- +int __stdcall std::num_put>::do_put( + int a1, + int a2, + _DWORD *a3, + unsigned __int16 a4, + __int64 a5) +{ + return std::num_put>::_M_insert_int(a1, a2, a3, a4, a5); +} + +//----- (00489060) -------------------------------------------------------- +int __stdcall std::num_put>::do_put( + int a1, + int a2, + _DWORD *a3, + unsigned __int16 a4, + int a5, + int a6) +{ + return std::num_put>::_M_insert_int( + a1, + a2, + a3, + a4, + a5, + a6); +} + +//----- (00489070) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::find( + _DWORD *this, + int a2) +{ + _DWORD *v2; // esi + _DWORD *v3; // ebx + _DWORD *i; // edi + char v5; // al + _DWORD *v6; // edx + + v2 = this + 1; + v3 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v6 ) + { + v5 = std::operator<((int)(i + 4), a2); + v6 = (_DWORD *)i[3]; + if ( !v5 ) + v6 = (_DWORD *)i[2]; + if ( !v5 ) + v3 = i; + } + if ( v2 != v3 && (unsigned __int8)std::operator<(a2, (int)(v3 + 4)) ) + return v2; + return v3; +} + +//----- (004890D0) -------------------------------------------------------- +const char *std::bad_cast::what() +{ + return "std::bad_cast"; +} + +//----- (004890E0) -------------------------------------------------------- +int __fastcall std::ios_base::failure::what(int a1) +{ + return *(_DWORD *)(a1 + 4); +} + +//----- (00489100) -------------------------------------------------------- +int __stdcall std::messages::_M_convert_to_char(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00489110) -------------------------------------------------------- +_DWORD *__thiscall std::messages::_M_convert_from_char(_DWORD *this, int a2, int a3) +{ + *this = std::string::_S_construct(0, 0); + return this; +} + +//----- (00489140) -------------------------------------------------------- +void *__thiscall std::messages::get(void *this, int a2, int a3, int a4, int a5, int a6) +{ + (*(void (__thiscall **)(void *, int, int, int, int, int))(*(_DWORD *)a2 + 12))(this, a2, a3, a4, a5, a6); + return this; +} + +//----- (00489180) -------------------------------------------------------- +int __thiscall std::messages::open(void *this, int a2, int a3) +{ + int (__stdcall *v3)(int, int); // eax + + v3 = *(int (__stdcall **)(int, int))(*(_DWORD *)this + 8); + if ( v3 == std::messages::do_open ) + return 0; + else + return v3(a2, a3); +} + +//----- (004891A0) -------------------------------------------------------- +int __thiscall std::messages::open(void *this, int a2, int a3, int a4) +{ + int (__stdcall *v4)(int, int); // edx + + v4 = *(int (__stdcall **)(int, int))(*(_DWORD *)this + 8); + if ( v4 == std::messages::do_open ) + return 0; + else + return v4(a2, a3); +} + +//----- (004891E0) -------------------------------------------------------- +int (__stdcall *__thiscall std::messages::close(void *this, int a2))(int) +{ + int (__stdcall *result)(int); // eax + + result = *(int (__stdcall **)(int))(*(_DWORD *)this + 16); + if ( result != std::messages::do_close ) + return (int (__stdcall *)(int))result(a2); + return result; +} +// 489230: using guessed type int __stdcall std::messages::do_close(int); + +//----- (00489200) -------------------------------------------------------- +_DWORD *__thiscall std::messages::do_get(_DWORD *this, int a2, int a3, int a4, int a5, std::string *a6) +{ + const std::string *v8; // [esp+4h] [ebp-18h] + + std::string::string(this, a6, v8); + return this; +} +// 48920D: variable 'v8' is possibly undefined + +//----- (00489220) -------------------------------------------------------- +int __stdcall std::messages::do_open(int a1, int a2) +{ + return 0; +} + +//----- (00489240) -------------------------------------------------------- +int __stdcall std::messages::_M_convert_to_char(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (00489250) -------------------------------------------------------- +_DWORD *__thiscall std::messages::_M_convert_from_char(_DWORD *this, int a2, int a3) +{ + *this = std::wstring::_S_construct(0, 0); + return this; +} + +//----- (00489280) -------------------------------------------------------- +void *__thiscall std::messages::get(void *this, int a2, int a3, int a4, int a5, int a6) +{ + (*(void (__thiscall **)(void *, int, int, int, int, int))(*(_DWORD *)a2 + 12))(this, a2, a3, a4, a5, a6); + return this; +} + +//----- (004892C0) -------------------------------------------------------- +int __thiscall std::messages::open(void *this, int a2, int a3) +{ + int (__stdcall *v3)(int, int); // eax + + v3 = *(int (__stdcall **)(int, int))(*(_DWORD *)this + 8); + if ( v3 == std::messages::do_open ) + return 0; + else + return v3(a2, a3); +} + +//----- (004892E0) -------------------------------------------------------- +int __thiscall std::messages::open(void *this, int a2, int a3, int a4) +{ + int (__stdcall *v4)(int, int); // edx + + v4 = *(int (__stdcall **)(int, int))(*(_DWORD *)this + 8); + if ( v4 == std::messages::do_open ) + return 0; + else + return v4(a2, a3); +} + +//----- (00489320) -------------------------------------------------------- +int (__stdcall *__thiscall std::messages::close(void *this, int a2))(int) +{ + int (__stdcall *result)(int); // eax + + result = *(int (__stdcall **)(int))(*(_DWORD *)this + 16); + if ( result != std::messages::do_close ) + return (int (__stdcall *)(int))result(a2); + return result; +} +// 489370: using guessed type int __stdcall std::messages::do_close(int); + +//----- (00489340) -------------------------------------------------------- +_DWORD *__thiscall std::messages::do_get(_DWORD *this, int a2, int a3, int a4, int a5, _DWORD *a6) +{ + std::wstring::basic_string(this, a6); + return this; +} + +//----- (00489360) -------------------------------------------------------- +int __stdcall std::messages::do_open(int a1, int a2) +{ + return 0; +} + +//----- (00489380) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_grouping(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 8), (int)v4); + return this; +} +// 489380: using guessed type int var_D[3]; + +//----- (004893B0) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_truename(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 20), (int)v4); + return this; +} +// 4893B0: using guessed type int var_D[3]; + +//----- (004893E0) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_falsename(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 28), (int)v4); + return this; +} +// 4893E0: using guessed type int var_D[3]; + +//----- (00489410) -------------------------------------------------------- +int __fastcall std::numpunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::numpunct::do_decimal_point ) + return *(unsigned __int8 *)(a1[2] + 36); + else + return v1(); +} + +//----- (00489430) -------------------------------------------------------- +int __fastcall std::numpunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::numpunct::do_thousands_sep ) + return *(unsigned __int8 *)(a1[2] + 37); + else + return v1(); +} + +//----- (00489450) -------------------------------------------------------- +int __fastcall std::numpunct::do_decimal_point(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 36); +} + +//----- (00489460) -------------------------------------------------------- +int __fastcall std::numpunct::do_thousands_sep(int a1) +{ + return *(unsigned __int8 *)(*(_DWORD *)(a1 + 8) + 37); +} + +//----- (00489470) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::numpunct::do_grouping ) + std::string::string(this, *(char **)(a2[2] + 8), (int)v5); + else + v3(a2); + return this; +} +// 489470: using guessed type int var_D[3]; + +//----- (004894D0) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::truename(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::numpunct::do_truename ) + std::string::string(this, *(char **)(a2[2] + 20), (int)v5); + else + v3(a2); + return this; +} +// 4894D0: using guessed type int var_D[3]; + +//----- (00489530) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::falsename(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::numpunct::do_falsename ) + std::string::string(this, *(char **)(a2[2] + 28), (int)v5); + else + v3(a2); + return this; +} +// 489530: using guessed type int var_D[3]; + +//----- (00489590) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_grouping(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::string::string(this, *(char **)(*(_DWORD *)(a2 + 8) + 8), (int)v4); + return this; +} +// 489590: using guessed type int var_D[3]; + +//----- (004895C0) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_truename(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::wstring::basic_string(this, *(wchar_t **)(*(_DWORD *)(a2 + 8) + 20), (int)v4); + return this; +} +// 4895C0: using guessed type int var_D[3]; + +//----- (004895F0) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::do_falsename(_DWORD *this, int a2) +{ + int v4[3]; // [esp+1Fh] [ebp-Dh] BYREF + + std::wstring::basic_string(this, *(wchar_t **)(*(_DWORD *)(a2 + 8) + 28), (int)v4); + return this; +} +// 4895F0: using guessed type int var_D[3]; + +//----- (00489620) -------------------------------------------------------- +int __fastcall std::numpunct::decimal_point(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 8); + if ( (char *)v1 == (char *)std::numpunct::do_decimal_point ) + return *(unsigned __int16 *)(a1[2] + 36); + else + return v1(); +} + +//----- (00489640) -------------------------------------------------------- +int __fastcall std::numpunct::thousands_sep(_DWORD *a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*a1 + 12); + if ( (char *)v1 == (char *)std::numpunct::do_thousands_sep ) + return *(unsigned __int16 *)(a1[2] + 38); + else + return v1(); +} + +//----- (00489660) -------------------------------------------------------- +int __fastcall std::numpunct::do_decimal_point(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 36); +} + +//----- (00489670) -------------------------------------------------------- +int __fastcall std::numpunct::do_thousands_sep(int a1) +{ + return *(unsigned __int16 *)(*(_DWORD *)(a1 + 8) + 38); +} + +//----- (00489680) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::grouping(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 16); + if ( (char *)v3 == (char *)std::numpunct::do_grouping ) + std::string::string(this, *(char **)(a2[2] + 8), (int)v5); + else + v3(a2); + return this; +} +// 489680: using guessed type int var_D[3]; + +//----- (004896E0) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::truename(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 20); + if ( (char *)v3 == (char *)std::numpunct::do_truename ) + std::wstring::basic_string(this, *(wchar_t **)(a2[2] + 20), (int)v5); + else + v3(a2); + return this; +} +// 4896E0: using guessed type int var_D[3]; + +//----- (00489740) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::falsename(_DWORD *this, _DWORD *a2) +{ + void (__stdcall *v3)(_DWORD *); // edx + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *(void (__stdcall **)(_DWORD *))(*a2 + 24); + if ( (char *)v3 == (char *)std::numpunct::do_falsename ) + std::wstring::basic_string(this, *(wchar_t **)(a2[2] + 28), (int)v5); + else + v3(a2); + return this; +} +// 489740: using guessed type int var_D[3]; + +//----- (004897A0) -------------------------------------------------------- +int __fastcall std::time_get>::date_order(int a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*(_DWORD *)a1 + 8); + if ( v1 == std::time_get>::do_date_order ) + return 0; + else + return v1(); +} + +//----- (004897C0) -------------------------------------------------------- +int __stdcall std::time_get>::do_get_date( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6) +{ + _DWORD *v6; // eax + int v7; // esi + unsigned __int64 v8; // rax + char v10; // [esp+28h] [ebp-24h] + char v11; // [esp+28h] [ebp-24h] + + v6 = std::use_facet>(a4 + 108); + v8 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + a6, + (char *)*(_DWORD *)(v6[2] + 8)); + v7 = v8; + BYTE4(v8) = HIDWORD(v8) == -1; + v10 = BYTE4(v8) & ((_DWORD)v8 != 0); + if ( v10 ) + { + BYTE4(v8) = 0; + if ( *(_DWORD *)(v8 + 8) >= *(_DWORD *)(v8 + 12) ) + { + LODWORD(v8) = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v8 + 36))(v8); + BYTE4(v8) = 0; + if ( (_DWORD)v8 == -1 ) + BYTE4(v8) = v10; + if ( (_DWORD)v8 == -1 ) + v7 = 0; + } + } + LOBYTE(v8) = a3 == -1; + if ( a2 ) + { + if ( a3 == -1 ) + { + LOBYTE(v8) = 0; + if ( a2[2] >= a2[3] ) + { + v11 = BYTE4(v8); + LODWORD(v8) = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + BYTE4(v8) = v11; + LOBYTE(v8) = (_DWORD)v8 == -1; + } + } + } + if ( BYTE4(v8) == (_BYTE)v8 ) + *a5 |= 2u; + return v7; +} + +//----- (004898D0) -------------------------------------------------------- +int __stdcall std::time_get>::do_get_time( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6) +{ + _DWORD *v6; // eax + int v7; // esi + unsigned __int64 v8; // rax + char v10; // [esp+28h] [ebp-24h] + char v11; // [esp+28h] [ebp-24h] + + v6 = std::use_facet>(a4 + 108); + v8 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + a6, + (char *)*(_DWORD *)(v6[2] + 16)); + v7 = v8; + BYTE4(v8) = HIDWORD(v8) == -1; + v10 = BYTE4(v8) & ((_DWORD)v8 != 0); + if ( v10 ) + { + BYTE4(v8) = 0; + if ( *(_DWORD *)(v8 + 8) >= *(_DWORD *)(v8 + 12) ) + { + LODWORD(v8) = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v8 + 36))(v8); + BYTE4(v8) = 0; + if ( (_DWORD)v8 == -1 ) + BYTE4(v8) = v10; + if ( (_DWORD)v8 == -1 ) + v7 = 0; + } + } + LOBYTE(v8) = a3 == -1; + if ( a2 ) + { + if ( a3 == -1 ) + { + LOBYTE(v8) = 0; + if ( a2[2] >= a2[3] ) + { + v11 = BYTE4(v8); + LODWORD(v8) = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + BYTE4(v8) = v11; + LOBYTE(v8) = (_DWORD)v8 == -1; + } + } + } + if ( BYTE4(v8) == (_BYTE)v8 ) + *a5 |= 2u; + return v7; +} + +//----- (004899E0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_year( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + int a7) +{ + int v7; // edx + _DWORD *v8; // ebx + int v9; // eax + char v10; // si + char v11; // al + int v13; // eax + bool v14; // zf + _DWORD *v15; // eax + _DWORD *v16; // [esp+34h] [ebp-38h] + char v17; // [esp+38h] [ebp-34h] + int v18; // [esp+48h] [ebp-24h] BYREF + int v19[8]; // [esp+4Ch] [ebp-20h] BYREF + + v19[0] = 0; + v8 = std::time_get>::_M_extract_num(a1, a2, a3, a4, &v18, 0, 9999, 4u, a5, v19); + v16 = v8; + if ( v19[0] ) + { + *a6 |= 4u; + } + else + { + v9 = v18 - 1900; + if ( v18 < 0 ) + v9 = v18 + 100; + *(_DWORD *)(a7 + 20) = v9; + } + v10 = v7 == -1; + v17 = (v8 != 0) & v10; + if ( v17 ) + { + v10 = 0; + if ( v8[2] >= v8[3] ) + { + v13 = (*(int (__fastcall **)(_DWORD *))(*v8 + 36))(v8); + v14 = v13 == -1; + if ( v13 == -1 ) + v10 = v17; + v15 = 0; + if ( !v14 ) + v15 = v8; + v16 = v15; + } + } + v11 = a4 == -1; + if ( a3 ) + { + if ( a4 == -1 ) + { + v11 = 0; + if ( a3[2] >= a3[3] ) + v11 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + } + } + if ( v10 == v11 ) + *a6 |= 2u; + return v16; +} +// 489A73: variable 'v7' is possibly undefined +// 4899E0: using guessed type int var_20[8]; + +//----- (00489B30) -------------------------------------------------------- +int __fastcall std::time_get>::get_weekday(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 20))(a1); +} + +//----- (00489B40) -------------------------------------------------------- +int std::time_get>::do_date_order() +{ + return 0; +} + +//----- (00489B50) -------------------------------------------------------- +int __fastcall std::time_get>::get_monthname(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 24))(a1); +} + +//----- (00489B60) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::_M_extract_num( + _DWORD *a1, + int a2, + _DWORD *a3, + int a4, + int *a5, + signed int a6, + int a7, + unsigned int a8, + int a9, + _DWORD *a10) +{ + unsigned int v10; // ebp + int v12; // eax + int v13; // edi + char v14; // al + unsigned __int8 v15; // al + unsigned int v16; // eax + bool v17; // dl + char v18; // bl + int v19; // ebx + char v20; // dl + int (__stdcall *v21)(unsigned __int8, int); // eax + int v23; // eax + char *v24; // eax + int v25; // eax + int v26; // eax + unsigned int v28; // [esp+20h] [ebp-2Ch] + _BYTE *v29; // [esp+24h] [ebp-28h] + bool v31; // [esp+2Fh] [ebp-1Dh] + + v10 = 10; + v29 = std::use_facet>(a9 + 108); + if ( a8 != 2 ) + { + v12 = 1; + if ( a8 == 4 ) + v12 = 1000; + v10 = v12; + } + v28 = 0; + v13 = 0; + while ( 1 ) + { + v17 = a2 == -1; + v18 = v17 && a1 != 0; + if ( v18 ) + { + if ( a1[2] >= a1[3] ) + { + v25 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v17 = a2 == -1; + if ( v25 != -1 ) + v18 = 0; + if ( v25 == -1 ) + a1 = 0; + } + else + { + v18 = 0; + } + } + else + { + v18 = a2 == -1; + } + if ( a3 && a4 == -1 ) + { + if ( a3[2] >= a3[3] ) + { + v31 = v17; + v23 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v17 = v31; + if ( v23 == -1 ) + { + a3 = 0; + v18 ^= 1u; + } + } + } + else + { + v18 ^= a4 == -1; + } + if ( v28 >= a8 || !v18 ) + break; + if ( a1 && v17 ) + { + v24 = (char *)a1[2]; + if ( (unsigned int)v24 >= a1[3] ) + { + v26 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + if ( v26 == -1 ) + { + v20 = -1; + v19 = 255; + a1 = 0; + } + else + { + v19 = (unsigned __int8)v26; + v20 = v26; + } + } + else + { + v19 = (unsigned __int8)*v24; + v20 = *v24; + } + } + else + { + v19 = (unsigned __int8)a2; + v20 = a2; + } + v14 = v29[v19 + 285]; + if ( !v14 ) + { + v21 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v29 + 32); + if ( v21 != std::ctype::do_narrow ) + v20 = v21(v20, 42); + if ( v20 == 42 ) + goto LABEL_27; + v29[v19 + 285] = v20; + v14 = v20; + } + v15 = v14 - 48; + if ( v15 > 9u ) + goto LABEL_27; + v13 = (char)v15 + 10 * v13; + if ( (int)(v13 * v10) > a7 || (int)(v10 + v13 * v10) <= a6 ) + goto LABEL_27; + v16 = a1[2]; + v10 /= 0xAu; + if ( v16 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v16 + 1; + ++v28; + a2 = -1; + } + if ( v28 == a8 ) + { +LABEL_30: + *a5 = v13; + return a1; + } +LABEL_27: + if ( a8 == 4 && v28 == 2 ) + { + v13 -= 100; + goto LABEL_30; + } + *a10 |= 4u; + return a1; +} + +//----- (00489E20) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_weekday( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + int a6) +{ + _DWORD *v6; // eax + int v7; // edx + int v8; // eax + int v9; // edx + _DWORD *v10; // ecx + _DWORD *v11; // ebp + char v12; // dl + char v13; // al + int v15; // eax + int v16; // eax + char v17; // [esp+34h] [ebp-68h] + char v18; // [esp+34h] [ebp-68h] + _DWORD *v19; // [esp+38h] [ebp-64h] + unsigned int v20; // [esp+40h] [ebp-5Ch] BYREF + int v21; // [esp+44h] [ebp-58h] BYREF + int v22[21]; // [esp+48h] [ebp-54h] BYREF + + v21 = 0; + v6 = (_DWORD *)*((_DWORD *)std::use_facet>(a4 + 108) + 2); + v22[0] = v6[18]; + v22[1] = v6[19]; + v22[2] = v6[20]; + v22[3] = v6[21]; + v22[4] = v6[22]; + v22[5] = v6[23]; + v22[6] = v6[24]; + v22[7] = v6[11]; + v22[8] = v6[12]; + v22[9] = v6[13]; + v22[10] = v6[14]; + v22[11] = v6[15]; + v7 = v6[16]; + v8 = v6[17]; + v22[12] = v7; + v22[13] = v8; + v10 = (_DWORD *)std::time_get>::_M_extract_wday_or_month( + a1, + a2, + a3, + &v20, + (int)v22, + 7u, + a4, + &v21); + v11 = v10; + if ( v21 ) + *a5 |= 4u; + else + *(_DWORD *)(a6 + 24) = v20; + v12 = v9 == -1; + v17 = v12 & (v10 != 0); + if ( v17 ) + { + v12 = 0; + if ( v10[2] >= v10[3] ) + { + v11 = 0; + v19 = v10; + v16 = (*(int (**)(void))(*v10 + 36))(); + v12 = 0; + if ( v16 != -1 ) + v11 = v19; + if ( v16 == -1 ) + v12 = v17; + } + } + v13 = a3 == -1; + if ( a2 ) + { + if ( a3 == -1 ) + { + v13 = 0; + if ( a2[2] >= a2[3] ) + { + v18 = v12; + v15 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + v12 = v18; + v13 = v15 == -1; + } + } + } + if ( v12 == v13 ) + *a5 |= 2u; + return v11; +} +// 489F2F: variable 'v9' is possibly undefined + +//----- (00489FE0) -------------------------------------------------------- +unsigned __int64 __stdcall std::time_get>::_M_extract_name( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int **a4, + int a5, + int a6, + int a7, + _DWORD *a8) +{ + _DWORD *v8; // edi + int v9; // ebx + int *v10; // edx + int v11; // eax + void *v12; // esp + void *v13; // esp + char v14; // bl + int v16; // edi + unsigned int v17; // ebx + int *v18; // esi + int v19; // edx + int v20; // eax + char v21; // al + int v22; // ecx + int *v23; // esi + int *v24; // edx + int v25; // esi + size_t v26; // eax + unsigned int v27; // ebx + unsigned int i; // esi + size_t v29; // eax + int *v30; // esi + unsigned int v31; // edi + unsigned int v32; // eax + char v33; // di + unsigned int j; // edi + char v35; // si + _BYTE *v36; // eax + int v37; // eax + const char *v38; // edi + unsigned int v39; // ebx + size_t v40; // eax + unsigned int v41; // esi + int *v42; // edi + char v43; // bl + int v44; // ecx + char v45; // bl + int v46; // eax + _BYTE *v47; // eax + char v48; // dl + int v49; // eax + int v50; // eax + int v51; // eax + int v52; // eax + int v53; // eax + int v54; // eax + int v55; // eax + bool v56; // zf + _DWORD *v57; // eax + int v58; // eax + int v59; // eax + int v60; // eax + int v61; // eax + bool v62; // zf + _DWORD *v63; // eax + int v64; // eax + int v65; // eax + int v66; // [esp+10h] [ebp-38h] BYREF + _DWORD *v67; // [esp+18h] [ebp-30h] + int *v68; // [esp+1Ch] [ebp-2Ch] + int *v69; // [esp+20h] [ebp-28h] + int *v70; // [esp+24h] [ebp-24h] + int *v71; // [esp+28h] [ebp-20h] + unsigned int v72; // [esp+2Ch] [ebp-1Ch] + + v8 = a2; + v9 = a3; + v67 = a2; + v10 = (int *)std::use_facet>(a7 + 108); + v11 = 16 * ((unsigned int)(4 * a6 + 27) >> 4); + v12 = alloca(v11); + v13 = alloca(v11); + LOBYTE(v72) = HIDWORD(a1) == -1; + LOBYTE(v71) = v72 & ((_DWORD)a1 != 0); + if ( (_BYTE)v71 ) + { + LOBYTE(v72) = 0; + if ( *(_DWORD *)(a1 + 8) >= *(_DWORD *)(a1 + 12) ) + { + v53 = *(_DWORD *)a1; + v70 = v10; + v54 = (*(int (**)(void))(v53 + 36))(); + v10 = v70; + if ( v54 == -1 ) + { + LODWORD(a1) = 0; + LOBYTE(v72) = (_BYTE)v71; + } + } + } + LOBYTE(v70) = v9 == -1; + v14 = (unsigned __int8)v70 & (v8 != 0); + if ( v14 ) + { + if ( v8[2] >= v8[3] ) + { + v60 = *v8; + v71 = v10; + v61 = (*(int (__fastcall **)(_DWORD *))(v60 + 36))(v8); + v10 = v71; + v62 = v61 == -1; + if ( v61 != -1 ) + v14 = 0; + v63 = 0; + if ( !v62 ) + v63 = v8; + v67 = v63; + } + else + { + v14 = 0; + } + } + else + { + v14 = (char)v70; + } + if ( v14 == (_BYTE)v72 ) + goto LABEL_5; + v69 = v10; + LOBYTE(v72) = std::istreambuf_iterator::_M_get((int)&a1); + if ( !a6 ) + goto LABEL_5; + v71 = &v66; + v16 = 0; + v17 = 0; + v18 = v69; + v19 = a5; + do + { + while ( 1 ) + { + v22 = **(char **)(v19 + 4 * v16); + if ( (_BYTE)v22 == (_BYTE)v72 ) + break; + v20 = *v18; + a5 = v19; + v21 = (*(int (__thiscall **)(int *, int))(v20 + 8))(v18, v22); + v19 = a5; + if ( (_BYTE)v72 == v21 ) + break; + if ( a6 == ++v16 ) + goto LABEL_13; + } + v71[v17++] = v16++; + } + while ( a6 != v16 ); +LABEL_13: + v72 = 0; + v23 = v71; + if ( v17 <= 1 ) + goto LABEL_35; + v24 = v71; + do + { + v25 = *v24; + v68 = v24; + v26 = strlen(*(const char **)(a5 + 4 * v25)); + v71 = (int *)v17; + v69 = (int *)v25; + v27 = v26; + for ( i = 1; i < (unsigned int)v71; ++i ) + { + v29 = strlen(*(const char **)(a5 + 4 * v68[i])); + if ( v27 > v29 ) + v27 = v29; + } + v24 = v68; + v30 = v69; + v31 = v27; + v17 = (unsigned int)v71; + v32 = *(_DWORD *)(a1 + 8); + if ( v32 >= *(_DWORD *)(a1 + 12) ) + { + v52 = *(_DWORD *)a1; + v71 = v68; + (*(void (__fastcall **)(_DWORD))(v52 + 40))(a1); + v24 = v71; + } + else + { + *(_DWORD *)(a1 + 8) = v32 + 1; + } + ++v72; + HIDWORD(a1) = -1; + if ( v72 >= v31 ) + goto LABEL_5; + LOBYTE(v71) = 1; + if ( (_DWORD)a1 ) + { + LOBYTE(v71) = 0; + if ( *(_DWORD *)(a1 + 8) >= *(_DWORD *)(a1 + 12) ) + { + v58 = *(_DWORD *)a1; + v69 = v24; + v59 = (*(int (**)(void))(v58 + 36))(); + v24 = v69; + if ( v59 == -1 ) + { + LODWORD(a1) = 0; + LOBYTE(v71) = 1; + } + } + } + v33 = (unsigned __int8)v70 & (v67 != 0); + if ( v33 ) + { + if ( v67[2] >= v67[3] ) + { + v69 = v24; + v55 = (*(int (__fastcall **)(_DWORD *))(*v67 + 36))(v67); + v24 = v69; + v56 = v55 == -1; + if ( v55 != -1 ) + v33 = 0; + v57 = 0; + if ( !v56 ) + v57 = v67; + v67 = v57; + } + else + { + v33 = 0; + } + } + else + { + v33 = (char)v70; + } + if ( (_BYTE)v71 == v33 ) + goto LABEL_5; + for ( j = 0; ; v30 = (int *)v24[j] ) + { + v35 = *(_BYTE *)(*(_DWORD *)(a5 + 4 * (_DWORD)v30) + v72); + LOBYTE(v36) = BYTE4(a1); + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v36 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v36 >= *(_DWORD *)(a1 + 12) ) + { + v51 = *(_DWORD *)a1; + v71 = v24; + v36 = (_BYTE *)(*(int (**)(void))(v51 + 36))(); + v24 = v71; + if ( v36 == (_BYTE *)-1 ) + LODWORD(a1) = 0; + } + else + { + LOBYTE(v36) = *v36; + } + } + if ( v35 == (_BYTE)v36 ) + break; + v24[j] = v24[--v17]; + if ( v17 <= j ) + goto LABEL_33; +LABEL_29: + ; + } + if ( v17 > ++j ) + goto LABEL_29; +LABEL_33: + ; + } + while ( v17 > 1 ); + v23 = v24; +LABEL_35: + if ( v17 == 1 ) + { + std::streambuf::sbumpc((_DWORD *)a1); + v37 = *v23; + HIDWORD(a1) = -1; + v38 = *(const char **)(a5 + 4 * v37); + v69 = (int *)v37; + v39 = v72 + 1; + v40 = strlen(v38); + v71 = (int *)v40; + if ( v72 + 1 < v40 ) + { + v72 = (unsigned int)v38; + v41 = v39; + v42 = v67; + while ( 1 ) + { + v48 = 1; + if ( (_DWORD)a1 ) + { + v48 = 0; + if ( *(_DWORD *)(a1 + 8) >= *(_DWORD *)(a1 + 12) ) + { + v49 = *(_DWORD *)a1; + LOBYTE(v68) = 0; + v50 = (*(int (**)(void))(v49 + 36))(); + v48 = (char)v68; + if ( v50 == -1 ) + { + LODWORD(a1) = 0; + v48 = 1; + } + } + } + v43 = (unsigned __int8)v70 & (v42 != 0); + if ( v43 ) + { + if ( v42[2] >= (unsigned int)v42[3] ) + { + v64 = *v42; + LOBYTE(v68) = v48; + v65 = (*(int (__fastcall **)(int *))(v64 + 36))(v42); + v48 = (char)v68; + if ( v65 != -1 ) + v43 = 0; + if ( v65 == -1 ) + v42 = 0; + } + else + { + v43 = 0; + } + } + else + { + v43 = (char)v70; + } + if ( v43 == v48 ) + goto LABEL_5; + v44 = a1; + v45 = *(_BYTE *)(v72 + v41); + LOBYTE(v46) = BYTE4(a1); + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v47 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v47 < *(_DWORD *)(a1 + 12) ) + { + if ( v45 != *v47 ) + goto LABEL_5; + goto LABEL_44; + } + v46 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 36))(a1); + if ( v46 == -1 ) + LODWORD(a1) = 0; + } + if ( v45 != (_BYTE)v46 ) + goto LABEL_5; + v44 = a1; + v47 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v47 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + goto LABEL_45; + } +LABEL_44: + *(_DWORD *)(v44 + 8) = v47 + 1; +LABEL_45: + HIDWORD(a1) = -1; + if ( (int *)++v41 == v71 ) + goto LABEL_81; + } + } + if ( v39 == v40 ) + { +LABEL_81: + *a4 = v69; + return a1; + } + } +LABEL_5: + *a8 |= 4u; + return a1; +} + +//----- (0048A4B0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_monthname( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + int a6) +{ + _DWORD *v6; // eax + int v7; // edx + int v8; // edx + int v9; // edx + _DWORD *v10; // ecx + _DWORD *v11; // ebp + char v12; // dl + char v13; // al + int v15; // eax + int v16; // eax + char v17; // [esp+34h] [ebp-98h] + char v18; // [esp+34h] [ebp-98h] + _DWORD *v19; // [esp+38h] [ebp-94h] + unsigned int v20; // [esp+48h] [ebp-84h] BYREF + int v21; // [esp+4Ch] [ebp-80h] BYREF + int v22[31]; // [esp+50h] [ebp-7Ch] BYREF + + v6 = (_DWORD *)*((_DWORD *)std::use_facet>(a4 + 108) + 2); + v22[0] = v6[37]; + v22[1] = v6[38]; + v22[2] = v6[39]; + v22[3] = v6[40]; + v22[4] = v6[41]; + v22[5] = v6[42]; + v22[6] = v6[43]; + v22[7] = v6[44]; + v22[8] = v6[45]; + v22[9] = v6[46]; + v22[10] = v6[47]; + v22[11] = v6[48]; + v22[12] = v6[25]; + v22[13] = v6[26]; + v22[14] = v6[27]; + v22[15] = v6[28]; + v7 = v6[29]; + v21 = 0; + v22[16] = v7; + v22[17] = v6[30]; + v22[18] = v6[31]; + v22[19] = v6[32]; + v22[20] = v6[33]; + v22[21] = v6[34]; + v8 = v6[35]; + v22[23] = v6[36]; + v22[22] = v8; + v10 = (_DWORD *)std::time_get>::_M_extract_wday_or_month( + a1, + a2, + a3, + &v20, + (int)v22, + 0xCu, + a4, + &v21); + v11 = v10; + if ( v21 ) + *a5 |= 4u; + else + *(_DWORD *)(a6 + 16) = v20; + v12 = v9 == -1; + v17 = v12 & (v10 != 0); + if ( v17 ) + { + v12 = 0; + if ( v10[2] >= v10[3] ) + { + v11 = 0; + v19 = v10; + v16 = (*(int (**)(void))(*v10 + 36))(); + v12 = 0; + if ( v16 != -1 ) + v11 = v19; + if ( v16 == -1 ) + v12 = v17; + } + } + v13 = a3 == -1; + if ( a2 ) + { + if ( a3 == -1 ) + { + v13 = 0; + if ( a2[2] >= a2[3] ) + { + v18 = v12; + v15 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + v12 = v18; + v13 = v15 == -1; + } + } + } + if ( v12 == v13 ) + *a5 |= 2u; + return v11; +} +// 48A65C: variable 'v9' is possibly undefined + +//----- (0048A710) -------------------------------------------------------- +unsigned __int64 __stdcall std::time_get>::_M_extract_via_format( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6, + char *a7) +{ + int v7; // ebx + _DWORD *v8; // eax + size_t v9; // ebx + _BYTE *v10; // esi + size_t v11; // eax + _DWORD *v12; // ecx + int v13; // eax + char v14; // dl + char v15; // di + size_t v16; // edi + char *v17; // ebp + int v18; // edx + char v19; // al + char v20; // cl + int (__stdcall *v21)(unsigned __int8, int); // eax + _BYTE *v22; // eax + char v23; // bl + int v24; // eax + int v25; // ebp + char v26; // al + char v27; // dl + int (__stdcall *v28)(unsigned __int8, int); // eax + char v29; // al + int v31; // eax + int v32; // ebx + char v33; // dl + int (__stdcall *v34)(unsigned __int8, int); // eax + unsigned __int64 v35; // rax + int *v36; // eax + _DWORD *v37; // eax + int v38; // eax + unsigned __int64 v39; // rax + _DWORD *v40; // eax + char v41; // al + char *v42; // eax + unsigned __int64 v43; // rax + _DWORD *v44; // eax + int v45; // eax + unsigned __int64 v46; // rax + unsigned __int64 v47; // rax + unsigned __int64 v48; // rax + unsigned __int64 v49; // rax + unsigned __int64 v50; // rax + char v51; // al + char v52; // bp + char v53; // al + char v54; // bp + char v55; // al + unsigned __int64 v56; // rax + unsigned __int64 v57; // rax + _DWORD *v58; // eax + int (__stdcall *v59)(unsigned __int8); // edx + int v60; // ecx + int (__stdcall *v61)(unsigned __int8); // edx + int v62; // edx + int Stra; // [esp+0h] [ebp-9Ch] + int Str; // [esp+0h] [ebp-9Ch] + size_t v65; // [esp+30h] [ebp-6Ch] + _DWORD *v66; // [esp+38h] [ebp-64h] + char v67; // [esp+3Ch] [ebp-60h] + int v68; // [esp+3Ch] [ebp-60h] + int v69; // [esp+48h] [ebp-54h] BYREF + int *v70; // [esp+4Ch] [ebp-50h] BYREF + unsigned int v71; // [esp+50h] [ebp-4Ch] BYREF + int v72; // [esp+54h] [ebp-48h] + int v73; // [esp+58h] [ebp-44h] + int v74; // [esp+5Ch] [ebp-40h] + int v75; // [esp+60h] [ebp-3Ch] + int v76; // [esp+64h] [ebp-38h] + int v77; // [esp+68h] [ebp-34h] + int v78; // [esp+6Ch] [ebp-30h] + int v79; // [esp+70h] [ebp-2Ch] + int v80; // [esp+74h] [ebp-28h] + int v81; // [esp+78h] [ebp-24h] + int v82; // [esp+7Ch] [ebp-20h] + + v7 = a4 + 108; + v8 = std::use_facet>(a4 + 108); + Stra = v7; + v9 = 0; + v66 = v8; + v10 = std::use_facet>(Stra); + v11 = strlen(a7); + v69 = 0; + v12 = (_DWORD *)a1; + v65 = v11; + v13 = HIDWORD(a1); + while ( 1 ) + { + v14 = v13 == -1; + v15 = v14 & (v12 != 0); + if ( v15 ) + { + v14 = 0; + if ( v12[2] >= v12[3] ) + { + v31 = (*(int (__thiscall **)(_DWORD *, int))(*v12 + 36))(v12, Str); + v14 = 0; + if ( v31 == -1 ) + { + LODWORD(a1) = 0; + v14 = v15; + } + } + } + if ( a2 && a3 == -1 ) + { + if ( a2[2] >= a2[3] ) + { + v67 = v14; + v24 = (*(int (**)(void))(*a2 + 36))(); + v14 = v67; + if ( v24 == -1 ) + { + a2 = 0; + v14 = v67 ^ 1; + } + } + } + else + { + v14 ^= a3 == -1; + } + if ( v9 >= v65 || !v14 ) + break; + if ( v69 ) + goto LABEL_32; + v16 = v9 + 1; + v17 = &a7[v9]; + v18 = (unsigned __int8)a7[v9]; + v19 = v10[v18 + 285]; + v20 = a7[v9]; + if ( v19 ) + { +LABEL_14: + if ( v19 != 37 ) + goto LABEL_15; + v25 = (unsigned __int8)a7[v16]; + v26 = v10[v25 + 285]; + v27 = a7[v16]; + if ( !v26 ) + { + v28 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v10 + 32); + if ( v28 != std::ctype::do_narrow ) + v27 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v28)(v10, v27, 0); + if ( !v27 ) + { +LABEL_43: + v69 |= 4u; + v13 = HIDWORD(a1); + goto LABEL_44; + } + v10[v25 + 285] = v27; + v26 = v27; + } + v70 = 0; + if ( (v26 == 69 || v26 == 79) + && (v16 = v9 + 2, v32 = (unsigned __int8)a7[v9 + 2], v26 = v10[v32 + 285], v33 = v32, !v26) ) + { + v34 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v10 + 32); + if ( v34 != std::ctype::do_narrow ) + v33 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v34)(v10, (char)v32, 0); + if ( !v33 ) + goto LABEL_43; + v10[v32 + 285] = v33; + v29 = v33 - 65; + if ( (unsigned __int8)(v33 - 65) > 0x38u ) + goto LABEL_43; + } + else + { + v29 = v26 - 65; + } + switch ( v29 ) + { + case 0: + v44 = (_DWORD *)v66[2]; + v71 = v44[11]; + v72 = v44[12]; + v73 = v44[13]; + v74 = v44[14]; + v75 = v44[15]; + v76 = v44[16]; + v45 = v44[17]; + goto LABEL_63; + case 1: + v40 = (_DWORD *)v66[2]; + v71 = v40[25]; + v72 = v40[26]; + v73 = v40[27]; + v74 = v40[28]; + v75 = v40[29]; + v76 = v40[30]; + v77 = v40[31]; + v78 = v40[32]; + v79 = v40[33]; + v80 = v40[34]; + v81 = v40[35]; + v38 = v40[36]; + goto LABEL_52; + case 2: + case 24: + case 56: + LODWORD(v35) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + (int *)&v70, + 0, + 9999, + 4u, + a4, + &v69); + a1 = v35; + if ( v69 ) + goto LABEL_55; + v36 = v70 - 475; + if ( (int)v70 < 0 ) + v36 = v70 + 25; + a6[5] = v36; + v13 = HIDWORD(a1); + break; + case 3: + std::ctype::widen(v10, "%m/%d/%y", "%H:%M", &v71); + v43 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + &v69, + a6, + (char *)&v71); + goto LABEL_61; + case 7: + LODWORD(v46) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + (int *)&v70, + 0, + 23, + 2u, + a4, + &v69); + goto LABEL_67; + case 8: + LODWORD(v46) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + (int *)&v70, + 1, + 12, + 2u, + a4, + &v69); +LABEL_67: + a1 = v46; + if ( v69 ) + goto LABEL_55; + a6[2] = v70; + v13 = HIDWORD(a1); + break; + case 12: + LODWORD(v47) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + (int *)&v70, + 0, + 59, + 2u, + a4, + &v69); + a1 = v47; + if ( v69 ) + goto LABEL_55; + a6[1] = v70; + v13 = HIDWORD(a1); + break; + case 17: + std::ctype::widen(v10, "%H:%M", "%H:%M:%S", &v71); + v43 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + &v69, + a6, + (char *)&v71); + goto LABEL_61; + case 18: + LODWORD(v39) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + (int *)&v70, + 0, + 60, + 2u, + a4, + &v69); + a1 = v39; + if ( v69 ) + goto LABEL_55; + *a6 = v70; + v13 = HIDWORD(a1); + break; + case 19: + std::ctype::widen(v10, "%H:%M:%S", byte_511F66, &v71); + v43 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + &v69, + a6, + (char *)&v71); + goto LABEL_61; + case 23: + v42 = *(char **)(v66[2] + 16); + goto LABEL_60; + case 25: + if ( (*(_BYTE *)(*((_DWORD *)v10 + 6) + 2 * (unsigned __int8)std::istreambuf_iterator::_M_get((int)&a1)) & 1) == 0 ) + goto LABEL_43; + a1 = std::time_get>::_M_extract_name( + a1, + a2, + a3, + (int **)&v71, + (int)std::__timepunct_cache::_S_timezones, + 14, + a4, + &v69); + if ( !std::istreambuf_iterator::equal(&a1, (int)&a2) && !(v71 | v69) ) + { + v52 = std::istreambuf_iterator::_M_get((int)&a1); + if ( v10[28] ) + { + v53 = v10[74]; + } + else + { + std::ctype::_M_widen_init((int)v10); + v59 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v10 + 24); + v53 = 45; + if ( v59 != std::ctype::do_widen ) + { + v53 = ((int (__thiscall *)(_BYTE *, int))v59)(v10, 45); + Str = v60; + } + } + if ( v52 == v53 ) + goto LABEL_94; + v54 = std::istreambuf_iterator::_M_get((int)&a1); + if ( v10[28] ) + { + v55 = v10[72]; + } + else + { + std::ctype::_M_widen_init((int)v10); + v61 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v10 + 24); + v55 = 43; + if ( v61 != std::ctype::do_widen ) + { + v55 = ((int (__thiscall *)(_BYTE *, int))v61)(v10, 43); + Str = v62; + } + } + if ( v54 == v55 ) + { +LABEL_94: + LODWORD(v56) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + (int *)&v71, + 0, + 23, + 2u, + a4, + &v69); + a1 = v56; + LODWORD(v57) = std::time_get>::_M_extract_num( + (_DWORD *)v56, + SHIDWORD(v56), + a2, + a3, + (int *)&v71, + 0, + 59, + 2u, + a4, + &v69); + a1 = v57; + } + } + goto LABEL_55; + case 32: + v58 = (_DWORD *)v66[2]; + v71 = v58[18]; + v72 = v58[19]; + v73 = v58[20]; + v74 = v58[21]; + v75 = v58[22]; + v76 = v58[23]; + v45 = v58[24]; +LABEL_63: + v77 = v45; + a1 = std::time_get>::_M_extract_name( + a1, + a2, + a3, + &v70, + (int)&v71, + 7, + a4, + &v69); + if ( v69 ) + goto LABEL_55; + a6[6] = v70; + v13 = HIDWORD(a1); + break; + case 33: + case 39: + v37 = (_DWORD *)v66[2]; + v71 = v37[37]; + v72 = v37[38]; + v73 = v37[39]; + v74 = v37[40]; + v75 = v37[41]; + v76 = v37[42]; + v77 = v37[43]; + v78 = v37[44]; + v79 = v37[45]; + v80 = v37[46]; + v81 = v37[47]; + v38 = v37[48]; +LABEL_52: + v82 = v38; + a1 = std::time_get>::_M_extract_name( + a1, + a2, + a3, + &v70, + (int)&v71, + 12, + a4, + &v69); + if ( v69 ) + goto LABEL_55; + a6[4] = v70; + v13 = HIDWORD(a1); + break; + case 34: + v42 = *(char **)(v66[2] + 24); + goto LABEL_60; + case 35: + LODWORD(v48) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + (int *)&v70, + 1, + 31, + 2u, + a4, + &v69); + a1 = v48; + if ( v69 ) + goto LABEL_55; + a6[3] = v70; + v13 = HIDWORD(a1); + break; + case 36: + if ( (*(_BYTE *)(*((_DWORD *)v10 + 6) + 2 * (unsigned __int8)std::istreambuf_iterator::_M_get((int)&a1)) & 0x20) != 0 ) + { + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + LODWORD(v49) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + -1, + a2, + a3, + (int *)&v70, + 1, + 9, + 1u, + a4, + &v69); + } + else + { + LODWORD(v49) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + (int *)&v70, + 10, + 31, + 2u, + a4, + &v69); + } + a1 = v49; + v13 = HIDWORD(v49); + if ( !v69 ) + a6[3] = v70; + break; + case 44: + LODWORD(v50) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + SHIDWORD(a1), + a2, + a3, + (int *)&v70, + 1, + 12, + 2u, + a4, + &v69); + a1 = v50; + if ( v69 ) + { +LABEL_55: + v13 = HIDWORD(a1); + } + else + { + a6[4] = (char *)v70 - 1; + v13 = HIDWORD(a1); + } + break; + case 45: + v51 = std::istreambuf_iterator::_M_get((int)&a1); + if ( (unsigned __int8)std::ctype::narrow(v10, v51, 0) != 10 ) + goto LABEL_43; + goto LABEL_58; + case 51: + v41 = std::istreambuf_iterator::_M_get((int)&a1); + if ( (unsigned __int8)std::ctype::narrow(v10, v41, 0) != 9 ) + goto LABEL_43; +LABEL_58: + std::streambuf::sbumpc((_DWORD *)a1); + v13 = -1; + HIDWORD(a1) = -1; + break; + case 55: + v42 = *(char **)(v66[2] + 8); +LABEL_60: + v43 = std::time_get>::_M_extract_via_format(a1, a2, a3, a4, &v69, a6, v42); +LABEL_61: + a1 = v43; + v13 = HIDWORD(v43); + break; + default: + goto LABEL_43; + } +LABEL_44: + v12 = (_DWORD *)a1; + v9 = v16 + 1; + } + else + { + v21 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v10 + 32); + if ( v21 != std::ctype::do_narrow ) + { + v68 = (unsigned __int8)a7[v9]; + v20 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v21)(v10, (char)v18, 0); + v18 = v68; + } + if ( v20 ) + { + v10[v18 + 285] = v20; + v19 = v20; + goto LABEL_14; + } +LABEL_15: + LOBYTE(v22) = BYTE4(a1); + v23 = *v17; + v12 = (_DWORD *)a1; + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v22 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v22 >= *(_DWORD *)(a1 + 12) ) + { + v22 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v22 == (_BYTE *)-1 ) + { + LODWORD(a1) = 0; + v12 = 0; + LOBYTE(v22) = -1; + } + else + { + v12 = (_DWORD *)a1; + } + } + else + { + LOBYTE(v22) = *v22; + } + } + if ( v23 == (_BYTE)v22 ) + { + std::streambuf::sbumpc(v12); + v9 = v16; + v13 = -1; + HIDWORD(a1) = -1; + v12 = (_DWORD *)a1; + } + else + { + v69 |= 4u; + v13 = HIDWORD(a1); + v9 = v16; + } + } + } + if ( v69 || v9 != v65 ) +LABEL_32: + *a5 |= 4u; + return a1; +} +// 48A924: variable 'Str' is possibly undefined +// 48AA96: variable 'v35' is possibly undefined +// 48AC57: variable 'v39' is possibly undefined +// 48AF13: variable 'v46' is possibly undefined +// 48AFE1: variable 'v47' is possibly undefined +// 48B0E6: variable 'v48' is possibly undefined +// 48B1A7: variable 'v49' is possibly undefined +// 48B23A: variable 'v50' is possibly undefined +// 48B45B: variable 'v56' is possibly undefined +// 48B471: variable 'v57' is possibly undefined +// 48B5C1: variable 'v60' is possibly undefined +// 48B5EF: variable 'v62' is possibly undefined +// 50C560: using guessed type void *std::__timepunct_cache::_S_timezones[2]; +// 511F66: using guessed type _BYTE byte_511F66[2]; + +//----- (0048B600) -------------------------------------------------------- +int __stdcall std::time_get>::_M_extract_wday_or_month( + unsigned __int64 a1, + _DWORD *a2, + int a3, + unsigned int *a4, + int a5, + unsigned int a6, + int a7, + _DWORD *a8) +{ + _DWORD *v8; // esi + int v9; // ebx + int v10; // eax + void *v11; // esp + void *v12; // esp + unsigned __int8 v13; // dl + char v14; // bl + int v15; // eax + unsigned int v16; // edi + unsigned int v17; // esi + int *v18; // ecx + char v19; // dl + char v20; // bl + char v21; // bl + _BYTE *v22; // eax + unsigned int v23; // edx + unsigned int *v24; // ecx + unsigned int v25; // eax + int v26; // eax + int v27; // eax + unsigned int v29; // eax + unsigned int v30; // ebx + int v31; // edx + int *v32; // esi + int v33; // eax + char v34; // al + int v35; // ecx + int v36; // eax + void *v37; // esp + int v38; // esi + void *v39; // esp + int v40; // ecx + unsigned int *v41; // edi + int *v42; // ebx + unsigned int v43; // eax + unsigned __int8 v44; // di + int v45; // eax + int v46; // eax + int v47; // eax + int v48; // eax + bool v49; // zf + _DWORD *v50; // eax + int v51; // eax + int v52; // eax + bool v53; // zf + _DWORD *v54; // eax + int v55; // [esp+10h] [ebp-38h] BYREF + unsigned int *v56; // [esp+14h] [ebp-34h] + _DWORD *v57; // [esp+18h] [ebp-30h] + bool v58; // [esp+1Eh] [ebp-2Ah] + char v59; // [esp+1Fh] [ebp-29h] + int *v60; // [esp+20h] [ebp-28h] + unsigned int *v61; // [esp+24h] [ebp-24h] + unsigned int *v62; // [esp+28h] [ebp-20h] + unsigned int *v63; // [esp+2Ch] [ebp-1Ch] + + v8 = a2; + v9 = a3; + v57 = a2; + v60 = (int *)std::use_facet>(a7 + 108); + v10 = 16 * ((8 * a6 + 27) >> 4); + v11 = alloca(v10); + v12 = alloca(v10); + v13 = HIDWORD(a1) == -1; + v62 = (unsigned int *)&v55; + if ( (v13 & ((_DWORD)a1 != 0)) != 0 ) + { + v44 = v13 & ((_DWORD)a1 != 0); + v13 = 0; + if ( *(_DWORD *)(a1 + 8) >= *(_DWORD *)(a1 + 12) ) + { + v45 = *(_DWORD *)a1; + LOBYTE(v63) = 0; + v46 = (*(int (**)(void))(v45 + 36))(); + v13 = (unsigned __int8)v63; + if ( v46 == -1 ) + { + LODWORD(a1) = 0; + v13 = v44; + } + } + } + v58 = v9 == -1; + v14 = v58 && v8 != 0; + if ( v14 ) + { + if ( v8[2] >= v8[3] ) + { + v51 = *v8; + LOBYTE(v63) = v13; + v52 = (*(int (__fastcall **)(_DWORD *))(v51 + 36))(v8); + v13 = (unsigned __int8)v63; + v53 = v52 == -1; + if ( v52 != -1 ) + v14 = 0; + v54 = 0; + if ( !v53 ) + v54 = v8; + v57 = v54; + } + else + { + v14 = 0; + } + } + else + { + v14 = v58; + } + if ( v13 == v14 ) + { + v56 = 0; + v15 = HIDWORD(a1); + v16 = 0; + v17 = 0; + v18 = (int *)a1; + } + else + { + v30 = 0; + v16 = 0; + LOBYTE(v63) = std::istreambuf_iterator::_M_get((int)&a1); + v17 = 2 * a6; + if ( 2 * a6 ) + { + v61 = (unsigned int *)(2 * a6); + v31 = a5; + v32 = v60; + do + { + while ( 1 ) + { + v35 = **(char **)(v31 + 4 * v30); + if ( (_BYTE)v35 == (_BYTE)v63 ) + break; + v33 = *v32; + a5 = v31; + v34 = (*(int (__thiscall **)(int *, int))(v33 + 8))(v32, v35); + v31 = a5; + if ( (_BYTE)v63 == v34 ) + break; + if ( (unsigned int *)++v30 == v61 ) + goto LABEL_47; + } + v62[v16++] = v30++; + } + while ( (unsigned int *)v30 != v61 ); +LABEL_47: + v18 = (int *)a1; + if ( v16 ) + { + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + v36 = 16 * ((4 * v16 + 27) >> 4); + v37 = alloca(v36); + v38 = a5; + v39 = alloca(v36); + v40 = (int)&v62[v16]; + v61 = (unsigned int *)v16; + v41 = v62; + v63 = (unsigned int *)v40; + v56 = (unsigned int *)&v55; + v42 = &v55; + do + { + v43 = *v41; + ++v42; + ++v41; + *(v42 - 1) = strlen(*(const char **)(v38 + 4 * v43)); + } + while ( v41 != v63 ); + v16 = (unsigned int)v61; + v18 = (int *)a1; + v15 = -1; + v17 = 1; + } + else + { + v56 = 0; + v15 = HIDWORD(a1); + v17 = 0; + } + } + else + { + v15 = HIDWORD(a1); + v18 = (int *)a1; + v56 = 0; + } + } + v19 = v15 == -1; + v20 = v19 & (v18 != 0); + if ( v20 ) + goto LABEL_23; +LABEL_7: + v21 = v58 && v57 != 0; + if ( !v21 ) + { + v21 = v58; + goto LABEL_9; + } + if ( v57[2] >= v57[3] ) + { + v47 = *v57; + LOBYTE(v63) = v19; + v48 = (*(int (__fastcall **)(_DWORD *))(v47 + 36))(v57); + v19 = (char)v63; + v49 = v48 == -1; + if ( v48 != -1 ) + v21 = 0; + v50 = 0; + if ( !v49 ) + v50 = v57; + v57 = v50; +LABEL_9: + if ( v21 == v19 ) + goto LABEL_29; +LABEL_10: + LOBYTE(v22) = BYTE4(a1); + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v22 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v22 >= *(_DWORD *)(a1 + 12) ) + { + v22 = (_BYTE *)(*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v22 == (_BYTE *)-1 ) + { + LODWORD(a1) = 0; + v59 = -1; + goto LABEL_12; + } + } + else + { + LOBYTE(v22) = *v22; + } + } + v59 = (char)v22; +LABEL_12: + if ( !v16 ) + goto LABEL_31; + v23 = 0; + v60 = 0; + v63 = v56; + while ( 1 ) + { + while ( 1 ) + { + v24 = &v63[v23]; + if ( *v24 > v17 ) + break; + v60 = (int *)((char *)v60 + 1); + ++v23; +LABEL_15: + if ( v16 <= v23 ) + goto LABEL_19; + } + v61 = &v62[v23]; + if ( *(_BYTE *)(*(_DWORD *)(a5 + 4 * *v61) + v17) == v59 ) + { + ++v23; + goto LABEL_15; + } + *v61 = v62[--v16]; + *v24 = v63[v16]; + if ( v16 <= v23 ) + { +LABEL_19: + if ( v60 == (int *)v16 ) + goto LABEL_29; + v18 = (int *)a1; + v25 = *(_DWORD *)(a1 + 8); + if ( v25 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v18 = (int *)a1; + } + else + { + *(_DWORD *)(a1 + 8) = v25 + 1; + } + ++v17; + HIDWORD(a1) = -1; + v19 = 1; + v20 = v18 != 0; + if ( v18 ) + { +LABEL_23: + v19 = 0; + if ( v18[2] >= (unsigned int)v18[3] ) + { + v26 = *v18; + LOBYTE(v63) = 0; + v27 = (*(int (__fastcall **)(int *))(v26 + 36))(v18); + v19 = (char)v63; + if ( v27 == -1 ) + { + LODWORD(a1) = 0; + v19 = v20; + } + } + } + goto LABEL_7; + } + } + } + if ( v19 ) + goto LABEL_10; +LABEL_29: + if ( v16 == 1 ) + { + if ( *v56 != v17 ) + { +LABEL_31: + *a8 |= 4u; + return a1; + } + } + else if ( v16 != 2 || *v56 != v17 && v56[1] != v17 ) + { + goto LABEL_31; + } + v29 = *v62; + if ( *v62 >= a6 ) + v29 = *v62 - a6; + *a4 = v29; + return a1; +} + +//----- (0048BA30) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::get( + _DWORD *a1, + unsigned int a2, + _DWORD *a3, + int a4, + int a5, + _DWORD *a6, + _DWORD *a7, + unsigned __int8 *a8, + unsigned __int8 *a9) +{ + unsigned __int8 *v9; // edi + _DWORD *v11; // ebp + int v12; // edx + char v13; // dl + char v14; // bl + char v15; // dl + char v16; // bl + unsigned int v17; // eax + char v18; // dl + char v19; // bl + char v20; // bl + signed __int8 v21; // dl + int (__stdcall *v22)(unsigned __int8, int); // eax + unsigned __int8 v23; // dl + int (__stdcall *v24)(unsigned __int8, int); // eax + int v25; // edi + int (__stdcall *v26)(unsigned __int8, int); // eax + _BYTE *v27; // eax + char v28; // dl + _BYTE *v29; // edi + char v30; // bl + unsigned __int64 v31; // rax + char v32; // al + unsigned __int8 *i; // edi + int j; // ebp + bool v36; // al + bool v37; // di + char v38; // dl + char v39; // bl + int v40; // eax + unsigned __int8 *v41; // eax + int (__stdcall *v42)(unsigned __int8); // eax + char *v43; // eax + int v44; // eax + int v45; // eax + bool v46; // zf + _DWORD *v47; // eax + char *v48; // eax + int v49; // eax + int v50; // eax + bool v51; // zf + _DWORD *v52; // eax + int v53; // eax + int v54; // eax + bool v55; // [esp+3Fh] [ebp-4Dh] + bool v57; // [esp+44h] [ebp-48h] + char v58; // [esp+44h] [ebp-48h] + _DWORD *v59; // [esp+44h] [ebp-48h] + char v60; // [esp+44h] [ebp-48h] + bool v62; // [esp+48h] [ebp-44h] + char v63; // [esp+48h] [ebp-44h] + int v64; // [esp+4Ch] [ebp-40h] + unsigned __int8 *v65; // [esp+4Ch] [ebp-40h] + char v66; // [esp+4Ch] [ebp-40h] + int v67; // [esp+50h] [ebp-3Ch] + unsigned __int8 v68; // [esp+50h] [ebp-3Ch] + char v69; // [esp+6Ch] [ebp-20h] BYREF + char v70; // [esp+6Dh] [ebp-1Fh] + char v71; // [esp+6Eh] [ebp-1Eh] + char v72; // [esp+6Fh] [ebp-1Dh] + unsigned __int8 *v73; // [esp+ACh] [ebp+20h] + + v9 = a8; + v11 = std::use_facet>(a5 + 108); + *a6 = 0; + if ( a8 == a9 ) + return a1; + v55 = a4 == -1; + while ( 1 ) + { + v57 = a2 == -1; + if ( !v57 || a1 == 0 ) + { + v18 = a2 == -1; + goto LABEL_19; + } + if ( a1[2] >= a1[3] ) + { + v49 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v18 = v57 && a1 != 0; + if ( v49 != -1 ) + v18 = 0; + if ( v49 == -1 ) + a1 = 0; +LABEL_19: + v19 = v55 && a3 != 0; + if ( !v19 ) + goto LABEL_20; + goto LABEL_85; + } + v18 = 0; + v19 = v55 && a3 != 0; + if ( !v19 ) + { +LABEL_20: + v19 = a4 == -1; + goto LABEL_21; + } +LABEL_85: + if ( a3[2] >= a3[3] ) + { + v66 = v18; + v50 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v18 = v66; + v51 = v50 == -1; + if ( v50 != -1 ) + v19 = 0; + v52 = 0; + if ( !v51 ) + v52 = a3; + a3 = v52; +LABEL_21: + if ( v18 == v19 ) + goto LABEL_87; + goto LABEL_22; + } + if ( !v18 ) + { +LABEL_87: + *a6 = 6; + return a1; + } +LABEL_22: + v20 = *((_BYTE *)v11 + *v9 + 285); + v64 = *v9; + v21 = *v9; + if ( !v20 ) + { + v22 = *(int (__stdcall **)(unsigned __int8, int))(*v11 + 32); + if ( v22 != std::ctype::do_narrow ) + v21 = ((int (__thiscall *)(_DWORD *, _DWORD, _DWORD))v22)(v11, v21, 0); + if ( !v21 ) + goto LABEL_3; + v20 = v21; + *((_BYTE *)v11 + v64 + 285) = v21; + } + if ( v20 == 37 ) + { + v65 = v9 + 1; + if ( a9 == v9 + 1 ) + break; + v67 = v9[1]; + v23 = v9[1]; + v58 = *((_BYTE *)v11 + v67 + 285); + if ( !v58 ) + { + v24 = *(int (__stdcall **)(unsigned __int8, int))(*v11 + 32); + if ( v24 != std::ctype::do_narrow ) + v23 = ((int (__thiscall *)(_DWORD *, _DWORD, _DWORD))v24)(v11, (char)v67, 0); + if ( !v23 ) + goto LABEL_89; + v58 = v23; + *((_BYTE *)v11 + v67 + 285) = v23; + } + if ( v58 == 69 || v58 == 79 ) + { + v65 = v9 + 2; + if ( a9 == v9 + 2 ) + break; + v25 = v9[2]; + v23 = v25; + if ( *((_BYTE *)v11 + v25 + 285) ) + { + v23 = *((_BYTE *)v11 + v25 + 285); + } + else + { + v26 = *(int (__stdcall **)(unsigned __int8, int))(*v11 + 32); + if ( v26 != std::ctype::do_narrow ) + v23 = ((int (__thiscall *)(_DWORD *, _DWORD, _DWORD))v26)(v11, (char)v25, 0); + if ( v23 ) + *((_BYTE *)v11 + v25 + 285) = v23; + } +LABEL_42: + v68 = v23; + v27 = std::use_facet>(a5 + 108); + v28 = v68; + v29 = v27; + *a6 = 0; + if ( v27[28] ) + { + v20 = v27[66]; + } + else + { + std::ctype::_M_widen_init((int)v27); + v28 = v68; + v42 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v29 + 24); + if ( v42 != std::ctype::do_widen ) + { + v20 = ((int (__fastcall *)(_BYTE *, _DWORD, int))v42)(v29, v68, 37); + v28 = v68; + } + } + v69 = v20; + if ( v58 ) + { + v71 = v28; + v72 = 0; + v70 = v58; + } + else + { + v70 = v28; + v71 = 0; + } + v31 = std::time_get>::_M_extract_via_format( + __PAIR64__(a2, (unsigned int)a1), + a3, + a4, + a5, + a6, + a7, + &v69); + a1 = (_DWORD *)v31; + v30 = HIDWORD(v31) == -1; + a2 = HIDWORD(v31); + BYTE4(v31) = v30 & ((_DWORD)v31 != 0); + if ( BYTE4(v31) ) + { + v30 = 0; + if ( *(_DWORD *)(v31 + 8) >= *(_DWORD *)(v31 + 12) ) + { + v60 = BYTE4(v31); + if ( (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v31 + 36))(v31) == -1 ) + { + v30 = v60; + a1 = 0; + } + } + } + if ( a3 && a4 == -1 ) + { + v32 = 0; + if ( a3[2] >= a3[3] ) + v32 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3) == -1; + } + else + { + v32 = a4 == -1; + } + if ( v30 == v32 ) + *a6 |= 2u; + v9 = v65 + 1; + if ( a9 == v65 + 1 ) + return a1; + goto LABEL_16; + } + v23 = v58; +LABEL_89: + v58 = 0; + goto LABEL_42; + } +LABEL_3: + v12 = v11[6]; + if ( (*(_BYTE *)(v12 + 2 * *v9) & 0x20) != 0 ) + { + for ( i = v9 + 1; a9 != i; ++i ) + { + if ( (*(_BYTE *)(v12 + 2 * *i) & 0x20) == 0 ) + break; + } + v73 = i; + v59 = v11; + for ( j = a2; ; j = -1 ) + { + v36 = j == -1; + v37 = v36; + if ( v36 && a1 != 0 ) + { + if ( a1[2] >= a1[3] ) + { + v62 = v36 && a1 != 0; + v44 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v38 = v62; + if ( v44 != -1 ) + v38 = 0; + if ( v44 == -1 ) + a1 = 0; + } + else + { + v38 = 0; + } + } + else + { + v38 = j == -1; + } + v39 = v55 && a3 != 0; + if ( !v39 ) + break; + if ( a3[2] >= a3[3] ) + { + v63 = v38; + v45 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v38 = v63; + v46 = v45 == -1; + if ( v45 != -1 ) + v39 = 0; + v47 = 0; + if ( !v46 ) + v47 = a3; + a3 = v47; +LABEL_63: + if ( v38 == v39 ) + goto LABEL_76; + goto LABEL_64; + } + if ( !v38 ) + { +LABEL_76: + a2 = j; + v9 = v73; + v11 = v59; + goto LABEL_15; + } +LABEL_64: + if ( a1 && v37 ) + { + v41 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v41 < a1[3] ) + { + if ( (*(_BYTE *)(v59[6] + 2 * *v41) & 0x20) == 0 ) + { + a2 = -1; + v9 = v73; + v11 = v59; + goto LABEL_15; + } +LABEL_69: + a1[2] = v41 + 1; + continue; + } + v40 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + if ( v40 == -1 ) + a1 = 0; + } + else + { + LOBYTE(v40) = j; + } + if ( (*(_BYTE *)(v59[6] + 2 * (unsigned __int8)v40) & 0x20) == 0 ) + goto LABEL_76; + v41 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v41 < a1[3] ) + goto LABEL_69; + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + } + v39 = a4 == -1; + goto LABEL_63; + } + if ( a1 && a2 == -1 ) + { + v43 = (char *)a1[2]; + if ( (unsigned int)v43 >= a1[3] ) + { + v53 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v13 = v53; + if ( v53 == -1 ) + v13 = -1; + if ( v53 == -1 ) + a1 = 0; + } + else + { + v13 = *v43; + } + } + else + { + v13 = a2; + } + v14 = (*(int (__thiscall **)(_DWORD *, _DWORD))(*v11 + 16))(v11, v13); + if ( (*(unsigned __int8 (__thiscall **)(_DWORD *, _DWORD))(*v11 + 16))(v11, (char)*v9) != v14 ) + { + if ( a1 && a2 == -1 ) + { + v48 = (char *)a1[2]; + if ( (unsigned int)v48 >= a1[3] ) + { + v54 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v15 = v54; + if ( v54 == -1 ) + v15 = -1; + if ( v54 == -1 ) + a1 = 0; + } + else + { + v15 = *v48; + } + } + else + { + v15 = a2; + } + v16 = (*(int (__thiscall **)(_DWORD *, _DWORD))(*v11 + 8))(v11, v15); + if ( (*(unsigned __int8 (__thiscall **)(_DWORD *, _DWORD))(*v11 + 8))(v11, (char)*v9) != v16 ) + break; + } + v17 = a1[2]; + if ( v17 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v17 + 1; + a2 = -1; + ++v9; +LABEL_15: + if ( a9 == v9 ) + return a1; +LABEL_16: + if ( *a6 ) + return a1; + } + *a6 = 4; + return a1; +} +// 48C059: conditional instruction was optimized away because eax.4==FFFFFFFF + +//----- (0048C200) -------------------------------------------------------- +int __stdcall std::time_get>::get( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6, + char a7, + char a8) +{ + _BYTE *v8; // ebp + char v9; // dl + int v10; // esi + unsigned __int64 v11; // rax + char v12; // bp + int (__stdcall *v14)(unsigned __int8); // eax + char v15; // [esp+20h] [ebp-3Ch] + char v16; // [esp+3Ch] [ebp-20h] BYREF + char v17; // [esp+3Dh] [ebp-1Fh] + char v18; // [esp+3Eh] [ebp-1Eh] + char v19; // [esp+3Fh] [ebp-1Dh] + + v8 = std::use_facet>(a4 + 108); + *a5 = 0; + if ( v8[28] ) + { + v9 = v8[66]; + } + else + { + std::ctype::_M_widen_init((int)v8); + v9 = 37; + v14 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v8 + 24); + if ( v14 != std::ctype::do_widen ) + v9 = ((int (__fastcall *)(_BYTE *, int, int))v14)(v8, 37, 37); + } + v16 = v9; + if ( a8 ) + { + v19 = 0; + v17 = a8; + v18 = a7; + } + else + { + v18 = 0; + v17 = a7; + } + v11 = std::time_get>::_M_extract_via_format(a1, a2, a3, a4, a5, a6, &v16); + v10 = v11; + BYTE4(v11) = HIDWORD(v11) == -1; + v12 = BYTE4(v11) & ((_DWORD)v11 != 0); + if ( v12 ) + { + BYTE4(v11) = 0; + if ( *(_DWORD *)(v11 + 8) >= *(_DWORD *)(v11 + 12) ) + { + LODWORD(v11) = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v11 + 36))(v11); + BYTE4(v11) = 0; + if ( (_DWORD)v11 == -1 ) + { + BYTE4(v11) = v12; + v10 = 0; + } + } + } + LOBYTE(v11) = a3 == -1; + if ( a2 ) + { + if ( a3 == -1 ) + { + LOBYTE(v11) = 0; + if ( a2[2] >= a2[3] ) + { + v15 = BYTE4(v11); + LODWORD(v11) = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + BYTE4(v11) = v15; + LOBYTE(v11) = (_DWORD)v11 == -1; + } + } + } + if ( (_BYTE)v11 == BYTE4(v11) ) + *a5 |= 2u; + return v10; +} +// 48C3A9: conditional instruction was optimized away because eax.4==FFFFFFFF + +//----- (0048C3C0) -------------------------------------------------------- +int __stdcall std::time_get>::do_get( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6, + char a7, + char a8) +{ + _BYTE *v8; // ebp + char v9; // dl + int v10; // esi + unsigned __int64 v11; // rax + char v12; // bp + int (__stdcall *v14)(unsigned __int8); // eax + char v15; // [esp+20h] [ebp-3Ch] + char v16; // [esp+3Ch] [ebp-20h] BYREF + char v17; // [esp+3Dh] [ebp-1Fh] + char v18; // [esp+3Eh] [ebp-1Eh] + char v19; // [esp+3Fh] [ebp-1Dh] + + v8 = std::use_facet>(a4 + 108); + *a5 = 0; + if ( v8[28] ) + { + v9 = v8[66]; + } + else + { + std::ctype::_M_widen_init((int)v8); + v9 = 37; + v14 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v8 + 24); + if ( v14 != std::ctype::do_widen ) + v9 = ((int (__fastcall *)(_BYTE *, int, int))v14)(v8, 37, 37); + } + v16 = v9; + if ( a8 ) + { + v19 = 0; + v17 = a8; + v18 = a7; + } + else + { + v18 = 0; + v17 = a7; + } + v11 = std::time_get>::_M_extract_via_format(a1, a2, a3, a4, a5, a6, &v16); + v10 = v11; + BYTE4(v11) = HIDWORD(v11) == -1; + v12 = BYTE4(v11) & ((_DWORD)v11 != 0); + if ( v12 ) + { + BYTE4(v11) = 0; + if ( *(_DWORD *)(v11 + 8) >= *(_DWORD *)(v11 + 12) ) + { + LODWORD(v11) = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v11 + 36))(v11); + BYTE4(v11) = 0; + if ( (_DWORD)v11 == -1 ) + { + BYTE4(v11) = v12; + v10 = 0; + } + } + } + LOBYTE(v11) = a3 == -1; + if ( a2 ) + { + if ( a3 == -1 ) + { + LOBYTE(v11) = 0; + if ( a2[2] >= a2[3] ) + { + v15 = BYTE4(v11); + LODWORD(v11) = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + BYTE4(v11) = v15; + LOBYTE(v11) = (_DWORD)v11 == -1; + } + } + } + if ( BYTE4(v11) == (_BYTE)v11 ) + *a5 |= 2u; + return v10; +} +// 48C569: conditional instruction was optimized away because eax.4==FFFFFFFF + +//----- (0048C580) -------------------------------------------------------- +int __fastcall std::time_get>::get_date(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 16))(a1); +} + +//----- (0048C590) -------------------------------------------------------- +int __fastcall std::time_get>::get_time(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 12))(a1); +} + +//----- (0048C5A0) -------------------------------------------------------- +int __fastcall std::time_get>::get_year(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 28))(a1); +} + +//----- (0048C5B0) -------------------------------------------------------- +int __fastcall std::time_get>::date_order(int a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*(_DWORD *)a1 + 8); + if ( v1 == std::time_get>::do_date_order ) + return 0; + else + return v1(); +} + +//----- (0048C5D0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_date( + __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6) +{ + _DWORD *v6; // eax + __int64 v7; // rax + _DWORD *v8; // ecx + _DWORD *v9; // ebp + _BOOL2 v10; // bx + bool v11; // cl + __int16 *v13; // eax + __int16 v14; // ax + bool v15; // si + __int16 *v16; // eax + __int16 v17; // ax + _DWORD *v18; // [esp+30h] [ebp-2Ch] + + v6 = std::use_facet>(a4 + 108); + v7 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + a6, + (wchar_t *)*(_DWORD *)(v6[2] + 8)); + v8 = (_DWORD *)v7; + v9 = (_DWORD *)v7; + v10 = WORD2(v7) == 0xFFFF; + if ( v10 && (_DWORD)v7 != 0 ) + { + v15 = v10 && (_DWORD)v7 != 0; + v16 = *(__int16 **)(v7 + 8); + if ( (unsigned int)v16 >= v8[3] ) + { + v18 = v8; + v17 = (*(int (**)(void))(*v8 + 36))(); + v8 = v18; + } + else + { + v17 = *v16; + } + LOBYTE(v10) = 0; + v9 = 0; + if ( v17 == -1 ) + LOBYTE(v10) = v15; + if ( v17 != -1 ) + v9 = v8; + } + v11 = (_WORD)a3 == 0xFFFF; + if ( a2 && (_WORD)a3 == 0xFFFF ) + { + v13 = (__int16 *)a2[2]; + if ( (unsigned int)v13 >= a2[3] ) + v14 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v14 = *v13; + v11 = v14 == -1; + } + if ( v10 == v11 ) + *a5 |= 2u; + return v9; +} + +//----- (0048C700) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_time( + __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6) +{ + _DWORD *v6; // eax + __int64 v7; // rax + _DWORD *v8; // ecx + _DWORD *v9; // ebp + _BOOL2 v10; // bx + bool v11; // cl + __int16 *v13; // eax + __int16 v14; // ax + bool v15; // si + __int16 *v16; // eax + __int16 v17; // ax + _DWORD *v18; // [esp+30h] [ebp-2Ch] + + v6 = std::use_facet>(a4 + 108); + v7 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + a5, + a6, + (wchar_t *)*(_DWORD *)(v6[2] + 16)); + v8 = (_DWORD *)v7; + v9 = (_DWORD *)v7; + v10 = WORD2(v7) == 0xFFFF; + if ( v10 && (_DWORD)v7 != 0 ) + { + v15 = v10 && (_DWORD)v7 != 0; + v16 = *(__int16 **)(v7 + 8); + if ( (unsigned int)v16 >= v8[3] ) + { + v18 = v8; + v17 = (*(int (**)(void))(*v8 + 36))(); + v8 = v18; + } + else + { + v17 = *v16; + } + LOBYTE(v10) = 0; + v9 = 0; + if ( v17 == -1 ) + LOBYTE(v10) = v15; + if ( v17 != -1 ) + v9 = v8; + } + v11 = (_WORD)a3 == 0xFFFF; + if ( a2 && (_WORD)a3 == 0xFFFF ) + { + v13 = (__int16 *)a2[2]; + if ( (unsigned int)v13 >= a2[3] ) + v14 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v14 = *v13; + v11 = v14 == -1; + } + if ( v10 == v11 ) + *a5 |= 2u; + return v9; +} + +//----- (0048C830) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_year( + _DWORD *a1, + unsigned __int16 a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + int a7) +{ + __int16 v7; // dx + _DWORD *v8; // ecx + _DWORD *v9; // ebp + int v10; // ebx + char v11; // bl + char v12; // cl + __int16 *v14; // eax + __int16 v15; // ax + __int16 *v16; // eax + __int16 v17; // ax + bool v18; // zf + _DWORD *v19; // eax + char v20; // [esp+40h] [ebp-3Ch] + _DWORD *v21; // [esp+44h] [ebp-38h] + int v22; // [esp+58h] [ebp-24h] BYREF + int v23[8]; // [esp+5Ch] [ebp-20h] BYREF + + v23[0] = 0; + v8 = std::time_get>::_M_extract_num( + a1, + a2, + a3, + a4, + &v22, + 0, + 9999, + 4u, + a5, + v23); + v9 = v8; + if ( v23[0] ) + { + *a6 |= 4u; + } + else + { + v10 = v22 + 100; + if ( v22 >= 0 ) + v10 = v22 - 1900; + *(_DWORD *)(a7 + 20) = v10; + } + v11 = v7 == -1; + v20 = v11 & (v8 != 0); + if ( v20 ) + { + v16 = (__int16 *)v8[2]; + if ( (unsigned int)v16 >= v8[3] ) + { + v21 = v8; + v17 = (*(int (**)(void))(*v8 + 36))(); + v8 = v21; + } + else + { + v17 = *v16; + } + v18 = v17 == -1; + v11 = 0; + if ( v17 == -1 ) + v11 = v20; + v19 = 0; + if ( !v18 ) + v19 = v8; + v9 = v19; + } + v12 = a4 == -1; + if ( a3 && a4 == -1 ) + { + v14 = (__int16 *)a3[2]; + if ( (unsigned int)v14 >= a3[3] ) + v15 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v15 = *v14; + v12 = v15 == -1; + } + if ( v12 == v11 ) + *a6 |= 2u; + return v9; +} +// 48C8ED: variable 'v7' is possibly undefined +// 48C830: using guessed type int var_20[8]; + +//----- (0048C9A0) -------------------------------------------------------- +int __fastcall std::time_get>::get_weekday(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 20))(a1); +} + +//----- (0048C9B0) -------------------------------------------------------- +int std::time_get>::do_date_order() +{ + return 0; +} + +//----- (0048C9C0) -------------------------------------------------------- +int __fastcall std::time_get>::get_monthname(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 24))(a1); +} + +//----- (0048C9D0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::_M_extract_num( + _DWORD *a1, + unsigned __int16 a2, + _DWORD *a3, + __int16 a4, + int *a5, + signed int a6, + int a7, + unsigned int a8, + int a9, + _DWORD *a10) +{ + unsigned int v10; // ebp + int v12; // eax + int v13; // edi + char v14; // dl + char v15; // bl + int v16; // edx + unsigned __int8 v17; // al + unsigned int v18; // eax + __int16 *v19; // eax + __int16 v20; // ax + __int16 *v21; // eax + __int16 v22; // ax + bool v23; // zf + _DWORD *v24; // eax + unsigned __int16 *v26; // eax + bool v27; // [esp+1Bh] [ebp-31h] + unsigned int v28; // [esp+1Ch] [ebp-30h] + void *v30; // [esp+24h] [ebp-28h] + char v32; // [esp+2Eh] [ebp-1Eh] + char v33; // [esp+2Fh] [ebp-1Dh] + + v10 = 10; + v30 = std::use_facet>(a9 + 108); + if ( a8 != 2 ) + { + v12 = 1; + if ( a8 == 4 ) + v12 = 1000; + v10 = v12; + } + v28 = 0; + v32 = a4 == -1; + v13 = 0; + while ( 1 ) + { + v27 = a2 == 0xFFFF; + v14 = v27 && a1 != 0; + if ( v14 ) + break; + v14 = a2 == 0xFFFF; + v15 = v32 & (a3 != 0); + if ( v15 ) + goto LABEL_26; +LABEL_7: + if ( v14 == v32 ) + goto LABEL_33; +LABEL_8: + if ( v28 >= a8 ) + goto LABEL_33; + if ( a1 && a2 == 0xFFFF ) + { + v26 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v26 >= a1[3] ) + v16 = (*(unsigned __int16 (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v16 = *v26; + if ( (_WORD)v16 == 0xFFFF ) + a1 = 0; + } + else + { + v16 = a2; + } + v17 = (*(int (__thiscall **)(void *, int, int))(*(_DWORD *)v30 + 48))(v30, v16, 42) - 48; + if ( v17 > 9u ) + goto LABEL_34; + v13 = (char)v17 + 10 * v13; + if ( (int)(v13 * v10) > a7 || (int)(v10 + v13 * v10) <= a6 ) + goto LABEL_34; + v18 = a1[2]; + v10 /= 0xAu; + if ( v18 >= a1[3] ) + (*(void (__fastcall **)(_DWORD *))(*a1 + 40))(a1); + else + a1[2] = v18 + 2; + ++v28; + a2 = -1; + } + v19 = (__int16 *)a1[2]; + if ( (unsigned int)v19 >= a1[3] ) + { + v20 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + v14 = v27 && a1 != 0; + } + else + { + v20 = *v19; + } + if ( v20 == -1 ) + a1 = 0; + if ( v20 != -1 ) + v14 = 0; + v15 = v32 & (a3 != 0); + if ( !v15 ) + goto LABEL_7; +LABEL_26: + v21 = (__int16 *)a3[2]; + if ( (unsigned int)v21 >= a3[3] ) + { + v33 = v14; + v22 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + v14 = v33; + } + else + { + v22 = *v21; + } + v23 = v22 == -1; + v24 = 0; + if ( !v23 ) + v24 = a3; + a3 = v24; + if ( !v23 ) + v15 = 0; + if ( v14 != v15 ) + goto LABEL_8; +LABEL_33: + if ( v28 == a8 ) + { +LABEL_37: + *a5 = v13; + return a1; + } +LABEL_34: + if ( a8 == 4 && v28 == 2 ) + { + v13 -= 100; + goto LABEL_37; + } + *a10 |= 4u; + return a1; +} + +//----- (0048CC50) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_weekday( + _DWORD *a1, + int a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + int a7) +{ + _DWORD *v7; // eax + int v8; // ecx + int v9; // eax + __int16 v10; // dx + _DWORD *v11; // ecx + _DWORD *v12; // ebp + char v13; // bl + char v14; // si + char v15; // cl + __int16 *v17; // eax + __int16 v18; // ax + __int16 *v19; // eax + __int16 v20; // ax + _DWORD *v21; // [esp+40h] [ebp-6Ch] + unsigned int v22; // [esp+50h] [ebp-5Ch] BYREF + int v23; // [esp+54h] [ebp-58h] BYREF + int v24[21]; // [esp+58h] [ebp-54h] BYREF + + v23 = 0; + v7 = (_DWORD *)*((_DWORD *)std::use_facet>(a5 + 108) + 2); + v24[0] = v7[18]; + v24[1] = v7[19]; + v24[2] = v7[20]; + v24[3] = v7[21]; + v24[4] = v7[22]; + v24[5] = v7[23]; + v24[6] = v7[24]; + v24[7] = v7[11]; + v24[8] = v7[12]; + v24[9] = v7[13]; + v24[10] = v7[14]; + v24[11] = v7[15]; + v8 = v7[16]; + v9 = v7[17]; + v24[12] = v8; + v24[13] = v9; + v11 = std::time_get>::_M_extract_wday_or_month( + a1, + a2, + a3, + a4, + &v22, + (int)v24, + 7u, + a5, + &v23); + v12 = v11; + if ( v23 ) + *a6 |= 4u; + else + *(_DWORD *)(a7 + 24) = v22; + v13 = v10 == -1; + v14 = v13 & (v11 != 0); + if ( v14 ) + { + v19 = (__int16 *)v11[2]; + if ( (unsigned int)v19 >= v11[3] ) + { + v21 = v11; + v20 = (*(int (**)(void))(*v11 + 36))(); + v11 = v21; + } + else + { + v20 = *v19; + } + v13 = 0; + v12 = 0; + if ( v20 == -1 ) + v13 = v14; + if ( v20 != -1 ) + v12 = v11; + } + v15 = a4 == -1; + if ( a3 && a4 == -1 ) + { + v17 = (__int16 *)a3[2]; + if ( (unsigned int)v17 >= a3[3] ) + v18 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v18 = *v17; + v15 = v18 == -1; + } + if ( v13 == v15 ) + *a6 |= 2u; + return v12; +} +// 48CD7D: variable 'v10' is possibly undefined + +//----- (0048CE40) -------------------------------------------------------- +int *__stdcall std::time_get>::_M_extract_name( + int *a1, + int a2, + _DWORD *a3, + int a4, + int **a5, + int a6, + int a7, + int a8, + _DWORD *a9) +{ + void *v9; // edi + int v10; // eax + void *v11; // esp + void *v12; // esp + int *v13; // edx + char v14; // bl + int v15; // eax + int v17; // ebx + int v18; // edx + size_t v19; // esi + __int16 v20; // ax + int v21; // ecx + int *v22; // edx + int *v23; // ebx + int *v24; // edi + size_t v25; // eax + unsigned int v26; // ebx + unsigned int v27; // esi + size_t v28; // eax + unsigned int v29; // edi + unsigned int v30; // eax + __int16 *v31; // eax + __int16 v32; // ax + bool v33; // zf + int v34; // eax + char v35; // di + char v36; // dl + int *v37; // ecx + size_t v38; // edi + int i; // eax + __int16 v40; // ax + __int16 *v41; // eax + unsigned int v42; // eax + int *v43; // ebx + const wchar_t *v44; // edi + unsigned int v45; // ebx + int *v46; // esi + unsigned int v47; // eax + __int16 *v48; // eax + __int16 v49; // ax + char v50; // di + char v51; // dl + wchar_t v52; // di + __int16 v53; // ax + _WORD *v54; // eax + __int16 *v55; // eax + __int16 v56; // ax + bool v57; // zf + _DWORD *v58; // eax + int v59; // eax + __int16 *v60; // eax + __int16 v61; // ax + bool v62; // zf + int *v63; // eax + char v64; // cl + __int16 *v65; // eax + __int16 v66; // ax + bool v67; // zf + _DWORD *v68; // eax + _WORD *v69; // eax + int v70; // eax + int v71; // eax + int v72; // eax + __int16 v73; // ax + __int16 *v74; // eax + __int16 v75; // ax + bool v76; // zf + _DWORD *v77; // eax + int v78; // [esp+10h] [ebp-38h] BYREF + _DWORD *v79; // [esp+14h] [ebp-34h] + bool v80; // [esp+1Bh] [ebp-2Dh] + int v81; // [esp+1Ch] [ebp-2Ch] + int *v82; // [esp+20h] [ebp-28h] + int *v83; // [esp+24h] [ebp-24h] + const wchar_t *v84; // [esp+28h] [ebp-20h] + size_t v85; // [esp+2Ch] [ebp-1Ch] + + v81 = a4; + v78 = a2; + LOWORD(v84) = a2; + v82 = a1; + v79 = a3; + v9 = std::use_facet>(a8 + 108); + v10 = 16 * ((unsigned int)(4 * a7 + 27) >> 4); + v11 = alloca(v10); + v12 = alloca(v10); + v13 = &v78; + LOBYTE(v85) = (_WORD)a2 == 0xFFFF; + LOBYTE(v83) = v85 & (a1 != 0); + if ( (_BYTE)v83 ) + { + v60 = (__int16 *)a1[2]; + if ( (unsigned int)v60 >= a1[3] ) + { + v72 = *a1; + v82 = &v78; + v61 = (*(int (__fastcall **)(int *))(v72 + 36))(a1); + v13 = v82; + } + else + { + v61 = *v60; + } + v62 = v61 == -1; + v63 = 0; + v64 = (char)v83; + if ( !v62 ) + v63 = a1; + v82 = v63; + if ( !v62 ) + v64 = 0; + LOBYTE(v83) = v64; + } + else + { + LOBYTE(v83) = v85; + } + v80 = (_WORD)v81 == 0xFFFF; + v14 = v80 && a3 != 0; + if ( v14 ) + { + v65 = (__int16 *)a3[2]; + if ( (unsigned int)v65 >= a3[3] ) + { + v71 = *a3; + v81 = (int)v13; + v66 = (*(int (__fastcall **)(_DWORD *))(v71 + 36))(a3); + v13 = (int *)v81; + } + else + { + v66 = *v65; + } + v67 = v66 == -1; + v68 = 0; + if ( !v67 ) + v68 = a3; + v79 = v68; + if ( !v67 ) + v14 = 0; + } + else + { + v14 = v80; + } + if ( v14 == (_BYTE)v83 ) + goto LABEL_6; + if ( v82 && (_BYTE)v85 ) + { + v69 = (_WORD *)v82[2]; + if ( (unsigned int)v69 >= v82[3] ) + { + v83 = v13; + v73 = (*(int (__fastcall **)(int *))(*v82 + 36))(v82); + v13 = v83; + LOWORD(v85) = v73; + } + else + { + LOWORD(v85) = *v69; + } + v70 = 0; + if ( (_WORD)v85 != 0xFFFF ) + v70 = (int)v82; + v82 = (int *)v70; + } + else + { + LOWORD(v85) = (_WORD)v84; + } + if ( !a7 ) + goto LABEL_6; + v83 = v13; + v17 = 0; + v18 = a6; + v19 = 0; + do + { + while ( 1 ) + { + v21 = **(unsigned __int16 **)(v18 + 4 * v17); + if ( (_WORD)v21 == (_WORD)v85 ) + break; + a6 = v18; + v20 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v9 + 24))(v9, v21); + v18 = a6; + if ( v20 == (_WORD)v85 ) + break; + if ( a7 == ++v17 ) + goto LABEL_17; + } + v83[v19++] = v17++; + } + while ( a7 != v17 ); +LABEL_17: + v22 = v83; + v83 = 0; + if ( v19 <= 1 ) + goto LABEL_44; + v23 = v22; + do + { + v24 = v23; + v81 = *v23; + v25 = wcslen(*(const wchar_t **)(a6 + 4 * v81)); + v85 = v19; + v26 = 1; + v27 = v25; + do + { + v28 = wcslen(*(const wchar_t **)(a6 + 4 * v24[v26])); + if ( v27 > v28 ) + v27 = v28; + ++v26; + } + while ( v26 < v85 ); + v23 = v24; + v29 = v27; + v19 = v85; + v30 = v82[2]; + if ( v30 >= v82[3] ) + (*(void (__fastcall **)(int *))(*v82 + 40))(v82); + else + v82[2] = v30 + 2; + v83 = (int *)((char *)v83 + 1); + if ( (unsigned int)v83 >= v29 ) + goto LABEL_73; + v31 = (__int16 *)v82[2]; + if ( (unsigned int)v31 >= v82[3] ) + v32 = (*(int (__fastcall **)(int *))(*v82 + 36))(v82); + else + v32 = *v31; + v33 = v32 == -1; + v34 = 0; + if ( !v33 ) + v34 = (int)v82; + v82 = (int *)v34; + v35 = v33; + v36 = v80 && v79 != 0; + if ( v36 ) + { + v55 = (__int16 *)v79[2]; + if ( (unsigned int)v55 >= v79[3] ) + { + LOBYTE(v85) = v80 && v79 != 0; + v56 = (*(int (__fastcall **)(_DWORD *))(*v79 + 36))(v79); + v36 = v85; + } + else + { + v56 = *v55; + } + v57 = v56 == -1; + v58 = 0; + if ( !v57 ) + v58 = v79; + v79 = v58; + if ( !v57 ) + v36 = 0; + if ( v35 == v36 ) + goto LABEL_73; + } + else if ( v33 == v80 ) + { + goto LABEL_73; + } + v37 = v82; + v38 = 0; + v84 = (const wchar_t *)(2 * (_DWORD)v83); + for ( i = v81; ; i = v23[v38] ) + { + LOWORD(v85) = *(const wchar_t *)((char *)v84 + *(_DWORD *)(a6 + 4 * i)); + v40 = -1; + if ( v37 ) + { + v41 = (__int16 *)v37[2]; + if ( (unsigned int)v41 >= v37[3] ) + { + v59 = *v37; + v82 = v37; + v40 = (*(int (**)(void))(v59 + 36))(); + v37 = v82; + } + else + { + v40 = *v41; + } + if ( v40 == -1 ) + v37 = 0; + } + if ( (_WORD)v85 == v40 ) + break; + v23[v38] = v23[--v19]; + if ( v19 <= v38 ) + goto LABEL_42; +LABEL_34: + ; + } + if ( v19 > ++v38 ) + goto LABEL_34; +LABEL_42: + v82 = v37; + } + while ( v19 > 1 ); + LOWORD(v84) = -1; + v22 = v23; +LABEL_44: + if ( v19 == 1 ) + { + v42 = v82[2]; + if ( v42 >= v82[3] ) + { + v85 = (size_t)v22; + (*(void (__fastcall **)(int *))(*v82 + 40))(v82); + v22 = (int *)v85; + } + else + { + v82[2] = v42 + 2; + } + v43 = v83; + v44 = *(const wchar_t **)(a6 + 4 * *v22); + v83 = (int *)*v22; + v45 = (unsigned int)v43 + 1; + v85 = wcslen(v44); + if ( v45 < v85 ) + { + v84 = v44; + v46 = v82; + do + { + v48 = (__int16 *)v46[2]; + if ( (unsigned int)v48 >= v46[3] ) + v49 = (*(int (__fastcall **)(int *))(*v46 + 36))(v46); + else + v49 = *v48; + v50 = v49 == -1; + if ( v49 == -1 ) + v46 = 0; + v51 = v80 && v79 != 0; + if ( v51 ) + { + v74 = (__int16 *)v79[2]; + if ( (unsigned int)v74 >= v79[3] ) + { + LOBYTE(v82) = v80 && v79 != 0; + v75 = (*(int (__fastcall **)(_DWORD *))(*v79 + 36))(v79); + v51 = (char)v82; + } + else + { + v75 = *v74; + } + v76 = v75 == -1; + v77 = 0; + if ( !v76 ) + v77 = v79; + v79 = v77; + if ( !v76 ) + v51 = 0; + } + else + { + v51 = v80; + } + if ( v51 == v50 ) + goto LABEL_108; + v52 = v84[v45]; + v53 = -1; + if ( v46 ) + { + v54 = (_WORD *)v46[2]; + v53 = (unsigned int)v54 >= v46[3] ? (*(int (__fastcall **)(int *))(*v46 + 36))(v46) : *v54; + if ( v53 == -1 ) + v46 = 0; + } + if ( v52 != v53 ) + { +LABEL_108: + v82 = v46; + LOWORD(v84) = -1; + goto LABEL_6; + } + v47 = v46[2]; + if ( v47 >= v46[3] ) + (*(void (__fastcall **)(int *))(*v46 + 40))(v46); + else + v46[2] = v47 + 2; + ++v45; + } + while ( v45 < v85 ); + v82 = v46; + } + if ( v85 == v45 ) + { + *a5 = v83; + LOWORD(v84) = -1; + goto LABEL_7; + } +LABEL_73: + LOWORD(v84) = -1; + } +LABEL_6: + *a9 |= 4u; +LABEL_7: + HIWORD(v15) = HIWORD(v78); + LOWORD(v15) = (_WORD)v84; + v78 = v15; + return v82; +} + +//----- (0048D390) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get_monthname( + _DWORD *a1, + int a2, + _DWORD *a3, + __int16 a4, + int a5, + _DWORD *a6, + int a7) +{ + _DWORD *v7; // eax + int v8; // ecx + int v9; // ecx + __int16 v10; // dx + _DWORD *v11; // ecx + _DWORD *v12; // ebp + char v13; // bl + char v14; // si + char v15; // cl + __int16 *v17; // eax + __int16 v18; // ax + __int16 *v19; // eax + __int16 v20; // ax + _DWORD *v21; // [esp+40h] [ebp-9Ch] + unsigned int v22; // [esp+58h] [ebp-84h] BYREF + int v23; // [esp+5Ch] [ebp-80h] BYREF + int v24[31]; // [esp+60h] [ebp-7Ch] BYREF + + v7 = (_DWORD *)*((_DWORD *)std::use_facet>(a5 + 108) + 2); + v24[0] = v7[37]; + v24[1] = v7[38]; + v24[2] = v7[39]; + v24[3] = v7[40]; + v24[4] = v7[41]; + v24[5] = v7[42]; + v24[6] = v7[43]; + v24[7] = v7[44]; + v24[8] = v7[45]; + v24[9] = v7[46]; + v24[10] = v7[47]; + v24[11] = v7[48]; + v24[12] = v7[25]; + v24[13] = v7[26]; + v24[14] = v7[27]; + v24[15] = v7[28]; + v8 = v7[29]; + v23 = 0; + v24[16] = v8; + v24[17] = v7[30]; + v24[18] = v7[31]; + v24[19] = v7[32]; + v24[20] = v7[33]; + v24[21] = v7[34]; + v9 = v7[35]; + v24[23] = v7[36]; + v24[22] = v9; + v11 = std::time_get>::_M_extract_wday_or_month( + a1, + a2, + a3, + a4, + &v22, + (int)v24, + 0xCu, + a5, + &v23); + v12 = v11; + if ( v23 ) + *a6 |= 4u; + else + *(_DWORD *)(a7 + 16) = v22; + v13 = v10 == -1; + v14 = v13 & (v11 != 0); + if ( v14 ) + { + v19 = (__int16 *)v11[2]; + if ( (unsigned int)v19 >= v11[3] ) + { + v21 = v11; + v20 = (*(int (**)(void))(*v11 + 36))(); + v11 = v21; + } + else + { + v20 = *v19; + } + v13 = 0; + v12 = 0; + if ( v20 == -1 ) + v13 = v14; + if ( v20 != -1 ) + v12 = v11; + } + v15 = a4 == -1; + if ( a3 && a4 == -1 ) + { + v17 = (__int16 *)a3[2]; + if ( (unsigned int)v17 >= a3[3] ) + v18 = (*(int (__fastcall **)(_DWORD *))(*a3 + 36))(a3); + else + v18 = *v17; + v15 = v18 == -1; + } + if ( v13 == v15 ) + *a6 |= 2u; + return v12; +} +// 48D55A: variable 'v10' is possibly undefined + +//----- (0048D620) -------------------------------------------------------- +__int64 __stdcall std::time_get>::_M_extract_via_format( + __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6, + wchar_t *a7) +{ + int v7; // ebx + _DWORD *v8; // eax + size_t v9; // ebx + void *v10; // esi + size_t v11; // eax + _DWORD *v12; // ecx + __int16 v13; // ax + char v14; // dl + char v15; // di + char v16; // al + char v17; // di + size_t v18; // edi + size_t v19; // ebp + char v20; // al + unsigned __int8 v21; // al + __int16 v22; // ax + wchar_t v23; // bx + _WORD *v25; // eax + __int16 v26; // ax + __int16 *v27; // eax + __int16 v28; // cx + __int16 *v29; // eax + __int16 v30; // dx + int *v31; // edx + _DWORD *v32; // eax + __int16 v33; // dx + _DWORD *v34; // eax + __int16 v35; // dx + __int64 v36; // rax + unsigned __int16 v37; // ax + __int16 v38; // dx + __int16 v39; // di + __int16 v40; // di + unsigned __int16 v41; // dx + __int16 v42; // dx + __int64 v43; // rax + __int16 v44; // dx + __int16 v45; // dx + __int16 v46; // dx + __int16 v47; // dx + __int64 v48; // rax + _DWORD *v49; // eax + __int16 v50; // dx + _DWORD *v51; // eax + __int16 v52; // dx + __int64 v53; // rax + unsigned __int16 v54; // ax + __int16 v55; // dx + __int16 v56; // dx + unsigned __int16 v57; // ax + unsigned __int16 v58; // ax + __int64 v59; // rax + __int16 v60; // dx + __int64 v61; // rax + __int16 v62; // ax + int String; // [esp+20h] [ebp-15Ch] + size_t v64; // [esp+5Ch] [ebp-120h] + wchar_t *v65; // [esp+60h] [ebp-11Ch] + char v66; // [esp+60h] [ebp-11Ch] + _DWORD *v67; // [esp+6Ch] [ebp-110h] + int v68; // [esp+128h] [ebp-54h] BYREF + int *v69; // [esp+12Ch] [ebp-50h] BYREF + wchar_t v70[2]; // [esp+130h] [ebp-4Ch] BYREF + int v71; // [esp+134h] [ebp-48h] + int v72; // [esp+138h] [ebp-44h] + int v73; // [esp+13Ch] [ebp-40h] + int v74; // [esp+140h] [ebp-3Ch] + int v75; // [esp+144h] [ebp-38h] + int v76; // [esp+148h] [ebp-34h] + int v77; // [esp+14Ch] [ebp-30h] + int v78; // [esp+150h] [ebp-2Ch] + int v79; // [esp+154h] [ebp-28h] + int v80; // [esp+158h] [ebp-24h] + int v81; // [esp+15Ch] [ebp-20h] + + v7 = a4 + 108; + v8 = std::use_facet>(a4 + 108); + String = v7; + v9 = 0; + v67 = v8; + v10 = std::use_facet>(String); + v11 = wcslen(a7); + v12 = (_DWORD *)a1; + v68 = 0; + v64 = v11; + v13 = WORD2(a1); + while ( 1 ) + { + v14 = v13 == -1; + v15 = v14 & (v12 != 0); + if ( v15 ) + { + v25 = (_WORD *)v12[2]; + v26 = (unsigned int)v25 >= v12[3] ? (*(int (__fastcall **)(_DWORD *))(*v12 + 36))(v12) : *v25; + v14 = 0; + if ( v26 == -1 ) + { + LODWORD(a1) = 0; + v14 = v15; + } + } + v16 = (_WORD)a3 == 0xFFFF; + v17 = v16 & (a2 != 0); + if ( v17 ) + { + v27 = (__int16 *)a2[2]; + if ( (unsigned int)v27 >= a2[3] ) + { + v66 = v14; + v62 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + v14 = v66; + v28 = v62; + } + else + { + v28 = *v27; + } + v16 = 0; + if ( v28 == -1 ) + { + a2 = 0; + v16 = v17; + } + } + if ( v14 == v16 || v9 >= v64 ) + break; + if ( v68 ) + goto LABEL_21; + v18 = v9; + v19 = v9 + 1; + v65 = &a7[v9]; + if ( (*(unsigned __int8 (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v10 + 48))(v10, *v65, 0) == 37 ) + { + v20 = (*(int (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v10 + 48))(v10, a7[v18 + 1], 0); + v69 = 0; + if ( v20 == 69 || v20 == 79 ) + { + v19 = v9 + 2; + v21 = (*(int (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v10 + 48))(v10, a7[v18 + 2], 0) - 65; + if ( v21 > 0x38u ) + { +LABEL_17: + v68 |= 4u; +LABEL_18: + v13 = WORD2(a1); + goto LABEL_19; + } + } + else + { + v21 = v20 - 65; + } + switch ( v21 ) + { + case 0u: + v49 = (_DWORD *)v67[2]; + *(_DWORD *)v70 = v49[11]; + v71 = v49[12]; + v72 = v49[13]; + v73 = v49[14]; + v74 = v49[15]; + v75 = v49[16]; + v76 = v49[17]; + LODWORD(a1) = std::time_get>::_M_extract_name( + (int *)a1, + SHIDWORD(a1), + a2, + a3, + &v69, + (int)v70, + 7, + a4, + &v68); + v13 = v50; + WORD2(a1) = v50; + if ( !v68 ) + goto LABEL_45; + break; + case 1u: + v51 = (_DWORD *)v67[2]; + *(_DWORD *)v70 = v51[25]; + v71 = v51[26]; + v72 = v51[27]; + v73 = v51[28]; + v74 = v51[29]; + v75 = v51[30]; + v76 = v51[31]; + v77 = v51[32]; + v78 = v51[33]; + v79 = v51[34]; + v80 = v51[35]; + v81 = v51[36]; + LODWORD(a1) = std::time_get>::_M_extract_name( + (int *)a1, + SHIDWORD(a1), + a2, + a3, + &v69, + (int)v70, + 12, + a4, + &v68); + v13 = v52; + WORD2(a1) = v52; + if ( !v68 ) + goto LABEL_43; + break; + case 2u: + case 0x18u: + case 0x38u: + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + WORD2(a1), + a2, + a3, + (int *)&v69, + 0, + 9999, + 4u, + a4, + &v68); + v13 = v30; + WORD2(a1) = v30; + if ( !v68 ) + { + v31 = v69 - 475; + if ( (int)v69 < 0 ) + v31 = v69 + 25; + a6[5] = v31; + } + break; + case 3u: + (*(void (__thiscall **)(void *, const char *, const char *, wchar_t *))(*(_DWORD *)v10 + 44))( + v10, + "%m/%d/%y", + "%H:%M", + v70); + v53 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + &v68, + a6, + v70); + LODWORD(a1) = v53; + v13 = WORD2(v53); + WORD2(a1) = WORD2(v53); + break; + case 7u: + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + WORD2(a1), + a2, + a3, + (int *)&v69, + 0, + 23, + 2u, + a4, + &v68); + v13 = v45; + WORD2(a1) = v45; + if ( !v68 ) + goto LABEL_57; + break; + case 8u: + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + WORD2(a1), + a2, + a3, + (int *)&v69, + 1, + 12, + 2u, + a4, + &v68); + v13 = v46; + WORD2(a1) = v46; + if ( !v68 ) +LABEL_57: + a6[2] = v69; + break; + case 0xCu: + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + WORD2(a1), + a2, + a3, + (int *)&v69, + 0, + 59, + 2u, + a4, + &v68); + v13 = v47; + WORD2(a1) = v47; + if ( !v68 ) + a6[1] = v69; + break; + case 0x11u: + (*(void (__thiscall **)(void *, const char *, const char *, wchar_t *))(*(_DWORD *)v10 + 44))( + v10, + "%H:%M", + "%H:%M:%S", + v70); + v48 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + &v68, + a6, + v70); + LODWORD(a1) = v48; + v13 = WORD2(v48); + WORD2(a1) = WORD2(v48); + break; + case 0x12u: + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + WORD2(a1), + a2, + a3, + (int *)&v69, + 0, + 60, + 2u, + a4, + &v68); + v13 = v60; + WORD2(a1) = v60; + if ( !v68 ) + *a6 = v69; + break; + case 0x13u: + (*(void (__thiscall **)(void *, const char *, void *, wchar_t *))(*(_DWORD *)v10 + 44))( + v10, + "%H:%M:%S", + &unk_5125A2, + v70); + v61 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + &v68, + a6, + v70); + LODWORD(a1) = v61; + v13 = WORD2(v61); + WORD2(a1) = WORD2(v61); + break; + case 0x17u: + v36 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + &v68, + a6, + (wchar_t *)*(_DWORD *)(v67[2] + 16)); + LODWORD(a1) = v36; + v13 = WORD2(v36); + WORD2(a1) = WORD2(v36); + break; + case 0x19u: + v37 = std::istreambuf_iterator::_M_get((int)&a1); + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v10 + 8))(v10, 1, v37) ) + goto LABEL_17; + LODWORD(a1) = std::time_get>::_M_extract_name( + (int *)a1, + SHIDWORD(a1), + a2, + a3, + (int **)v70, + (int)std::__timepunct_cache::_S_timezones, + 14, + a4, + &v68); + WORD2(a1) = v38; + if ( !std::istreambuf_iterator::equal(&a1, (int)&a2) && !(*(_DWORD *)v70 | v68) ) + { + v39 = std::istreambuf_iterator::_M_get((int)&a1); + if ( v39 == (*(unsigned __int16 (__thiscall **)(void *, int))(*(_DWORD *)v10 + 40))(v10, 45) + || (v40 = std::istreambuf_iterator::_M_get((int)&a1), + v40 == (*(unsigned __int16 (__thiscall **)(void *, int))(*(_DWORD *)v10 + 40))(v10, 43)) ) + { + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + WORD2(a1), + a2, + a3, + (int *)v70, + 0, + 23, + 2u, + a4, + &v68); + WORD2(a1) = v41; + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + v41, + a2, + a3, + (int *)v70, + 0, + 59, + 2u, + a4, + &v68); + WORD2(a1) = v42; + } + } + goto LABEL_18; + case 0x20u: + v34 = (_DWORD *)v67[2]; + *(_DWORD *)v70 = v34[18]; + v71 = v34[19]; + v72 = v34[20]; + v73 = v34[21]; + v74 = v34[22]; + v75 = v34[23]; + v76 = v34[24]; + LODWORD(a1) = std::time_get>::_M_extract_name( + (int *)a1, + SHIDWORD(a1), + a2, + a3, + &v69, + (int)v70, + 7, + a4, + &v68); + v13 = v35; + WORD2(a1) = v35; + if ( !v68 ) +LABEL_45: + a6[6] = v69; + break; + case 0x21u: + case 0x27u: + v32 = (_DWORD *)v67[2]; + *(_DWORD *)v70 = v32[37]; + v71 = v32[38]; + v72 = v32[39]; + v73 = v32[40]; + v74 = v32[41]; + v75 = v32[42]; + v76 = v32[43]; + v77 = v32[44]; + v78 = v32[45]; + v79 = v32[46]; + v80 = v32[47]; + v81 = v32[48]; + LODWORD(a1) = std::time_get>::_M_extract_name( + (int *)a1, + SHIDWORD(a1), + a2, + a3, + &v69, + (int)v70, + 12, + a4, + &v68); + v13 = v33; + WORD2(a1) = v33; + if ( !v68 ) +LABEL_43: + a6[4] = v69; + break; + case 0x22u: + v43 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + &v68, + a6, + (wchar_t *)*(_DWORD *)(v67[2] + 24)); + LODWORD(a1) = v43; + v13 = WORD2(v43); + WORD2(a1) = WORD2(v43); + break; + case 0x23u: + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + WORD2(a1), + a2, + a3, + (int *)&v69, + 1, + 31, + 2u, + a4, + &v68); + v13 = v44; + WORD2(a1) = v44; + if ( !v68 ) + goto LABEL_55; + break; + case 0x24u: + v54 = std::istreambuf_iterator::_M_get((int)&a1); + if ( (*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v10 + 8))(v10, 32, v54) ) + { + std::wstreambuf::sbumpc((_DWORD *)a1); + WORD2(a1) = -1; + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + 0xFFFFu, + a2, + a3, + (int *)&v69, + 1, + 9, + 1u, + a4, + &v68); + } + else + { + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + WORD2(a1), + a2, + a3, + (int *)&v69, + 10, + 31, + 2u, + a4, + &v68); + } + WORD2(a1) = v55; + v13 = v55; + if ( !v68 ) +LABEL_55: + a6[3] = v69; + break; + case 0x2Cu: + LODWORD(a1) = std::time_get>::_M_extract_num( + (_DWORD *)a1, + WORD2(a1), + a2, + a3, + (int *)&v69, + 1, + 12, + 2u, + a4, + &v68); + v13 = v56; + WORD2(a1) = v56; + if ( !v68 ) + a6[4] = (char *)v69 - 1; + break; + case 0x2Du: + v57 = std::istreambuf_iterator::_M_get((int)&a1); + if ( (*(unsigned __int8 (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v10 + 48))(v10, v57, 0) != 10 ) + goto LABEL_17; + goto LABEL_75; + case 0x33u: + v58 = std::istreambuf_iterator::_M_get((int)&a1); + if ( (*(unsigned __int8 (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v10 + 48))(v10, v58, 0) != 9 ) + goto LABEL_17; +LABEL_75: + std::wstreambuf::sbumpc((_DWORD *)a1); + v13 = -1; + WORD2(a1) = -1; + break; + case 0x37u: + v59 = std::time_get>::_M_extract_via_format( + a1, + a2, + a3, + a4, + &v68, + a6, + (wchar_t *)*(_DWORD *)(v67[2] + 8)); + LODWORD(a1) = v59; + v13 = WORD2(v59); + WORD2(a1) = WORD2(v59); + break; + default: + goto LABEL_17; + } +LABEL_19: + v12 = (_DWORD *)a1; + v9 = v19 + 1; + } + else + { + v12 = (_DWORD *)a1; + v22 = WORD2(a1); + v23 = *v65; + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v29 = *(__int16 **)(a1 + 8); + if ( (unsigned int)v29 >= *(_DWORD *)(a1 + 12) ) + v22 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 36))(a1); + else + v22 = *v29; + if ( v22 == -1 ) + { + LODWORD(a1) = 0; + v12 = 0; + } + else + { + v12 = (_DWORD *)a1; + } + } + if ( v23 == v22 ) + { + std::wstreambuf::sbumpc(v12); + v9 = v19; + v12 = (_DWORD *)a1; + WORD2(a1) = -1; + v13 = -1; + } + else + { + v68 |= 4u; + v13 = WORD2(a1); + v9 = v19; + } + } + } + if ( v9 != v64 || v68 ) +LABEL_21: + *a5 |= 4u; + return a1; +} +// 48D966: variable 'v30' is possibly undefined +// 48DACA: variable 'v33' is possibly undefined +// 48DBCC: variable 'v35' is possibly undefined +// 48DD3C: variable 'v38' is possibly undefined +// 48DE56: variable 'v41' is possibly undefined +// 48DECC: variable 'v42' is possibly undefined +// 48DFFC: variable 'v44' is possibly undefined +// 48E0B6: variable 'v45' is possibly undefined +// 48E170: variable 'v46' is possibly undefined +// 48E219: variable 'v47' is possibly undefined +// 48E3C5: variable 'v50' is possibly undefined +// 48E4F7: variable 'v52' is possibly undefined +// 48E677: variable 'v55' is possibly undefined +// 48E727: variable 'v56' is possibly undefined +// 48E8E8: variable 'v60' is possibly undefined +// 50C5A0: using guessed type wchar_t *std::__timepunct_cache::_S_timezones[14]; + +//----- (0048EAC0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::_M_extract_wday_or_month( + _DWORD *a1, + int a2, + _DWORD *a3, + __int16 a4, + unsigned int *a5, + int a6, + unsigned int a7, + int a8, + _DWORD *a9) +{ + int v9; // eax + void *v10; // esp + void *v11; // esp + char v12; // dl + char v13; // di + char v14; // bl + unsigned int v15; // edi + unsigned int *v16; // esi + char v17; // dl + char v18; // bl + unsigned int v19; // edx + unsigned int *v20; // ecx + unsigned int v21; // ebx + unsigned int v22; // eax + __int16 *v23; // eax + __int16 v24; // ax + bool v25; // zf + _DWORD *v26; // eax + __int16 *v28; // eax + __int16 v29; // ax + bool v30; // zf + _DWORD *v31; // eax + __int16 *v32; // eax + _DWORD *v33; // eax + unsigned int v34; // eax + __int16 v35; // si + int v36; // edx + unsigned int v37; // ebx + int v38; // edi + __int16 v39; // ax + int v40; // ecx + unsigned int v41; // eax + int v42; // eax + void *v43; // esp + void *v44; // esp + int v45; // ebx + __int16 *v46; // eax + __int16 v47; // ax + bool v48; // zf + _DWORD *v49; // eax + _WORD *v50; // eax + __int16 v51; // ax + __int16 *v52; // eax + _DWORD *v53; // eax + int v54; // eax + _DWORD v55[2]; // [esp+10h] [ebp-48h] BYREF + _DWORD *v56; // [esp+18h] [ebp-40h] + char v57; // [esp+1Fh] [ebp-39h] + _DWORD *v58; // [esp+20h] [ebp-38h] + unsigned int v59; // [esp+24h] [ebp-34h] + __int16 v60; // [esp+28h] [ebp-30h] + __int16 v61; // [esp+2Ah] [ebp-2Eh] + int v62; // [esp+2Ch] [ebp-2Ch] + unsigned int *v63; // [esp+30h] [ebp-28h] + unsigned int *v64; // [esp+34h] [ebp-24h] + unsigned int v65; // [esp+38h] [ebp-20h] + unsigned int v66; // [esp+3Ch] [ebp-1Ch] + + v58 = a1; + v55[1] = a2; + v60 = a2; + v56 = a3; + v63 = (unsigned int *)std::use_facet>(a8 + 108); + v9 = 16 * ((8 * a7 + 27) >> 4); + v10 = alloca(v9); + v11 = alloca(v9); + v12 = (_WORD)a2 == 0xFFFF; + v64 = v55; + v13 = v12 & (a1 != 0); + if ( v13 ) + { + v50 = (_WORD *)v58[2]; + v51 = (unsigned int)v50 >= v58[3] ? (*(int (__fastcall **)(_DWORD *))(*v58 + 36))(v58) : *v50; + v12 = 0; + if ( v51 == -1 ) + { + v12 = v13; + v58 = 0; + v13 = 0; + } + } + v57 = a4 == -1; + v14 = v57 & (a3 != 0); + if ( v14 ) + { + v46 = (__int16 *)a3[2]; + if ( (unsigned int)v46 >= a3[3] ) + { + v54 = *a3; + LOBYTE(v66) = v12; + v47 = (*(int (__fastcall **)(_DWORD *))(v54 + 36))(a3); + v12 = v66; + } + else + { + v47 = *v46; + } + v48 = v47 == -1; + v49 = 0; + if ( !v48 ) + v49 = a3; + v56 = v49; + if ( !v48 ) + v14 = 0; + } + else + { + v14 = v57; + } + if ( v12 == v14 ) + { + v65 = 0; + v15 = 0; + v16 = 0; + goto LABEL_6; + } + v35 = v60; + if ( v13 ) + { + v52 = (__int16 *)v58[2]; + if ( (unsigned int)v52 >= v58[3] ) + v35 = (*(int (__fastcall **)(_DWORD *))(*v58 + 36))(v58); + else + v35 = *v52; + v53 = 0; + if ( v35 != -1 ) + v53 = v58; + v58 = v53; + } + v15 = 2 * a7; + if ( !(2 * a7) ) + { + v65 = 0; + v16 = 0; + goto LABEL_6; + } + v66 = 2 * a7; + v36 = a6; + v37 = 0; + v65 = 0; + v38 = (int)v63; + do + { + while ( 1 ) + { + v40 = **(unsigned __int16 **)(v36 + 4 * v37); + if ( (_WORD)v40 == v35 ) + break; + a6 = v36; + v39 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v38 + 24))(v38, v40); + v36 = a6; + if ( v39 == v35 ) + break; + if ( ++v37 == v66 ) + goto LABEL_62; + } + v41 = v65; + v64[v65] = v37++; + v65 = v41 + 1; + } + while ( v37 != v66 ); +LABEL_62: + v15 = 0; + v16 = 0; + if ( v65 ) + { + std::wstreambuf::sbumpc(v58); + v42 = 16 * ((4 * v65 + 27) >> 4); + v43 = alloca(v42); + v44 = alloca(v42); + v63 = v55; + v66 = (unsigned int)v55; + v45 = (int)v64; + do + { + *(_DWORD *)(v66 + 4 * v15) = wcslen(*(const wchar_t **)(a6 + 4 * *(_DWORD *)(v45 + 4 * v15))); + ++v15; + } + while ( v65 != v15 ); + v65 = 1; + v16 = v63; + v60 = -1; + } +LABEL_6: + while ( 2 ) + { + LOBYTE(v66) = v60 == -1; + v17 = v66 & (v58 != 0); + if ( v17 ) + { + v28 = (__int16 *)v58[2]; + if ( (unsigned int)v28 >= v58[3] ) + { + LOBYTE(v63) = v66 & (v58 != 0); + v29 = (*(int (__fastcall **)(_DWORD *))(*v58 + 36))(v58); + v17 = (char)v63; + } + else + { + v29 = *v28; + } + v30 = v29 == -1; + v31 = 0; + if ( !v30 ) + v31 = v58; + v58 = v31; + if ( !v30 ) + v17 = 0; + } + else + { + v17 = v66; + } + v18 = v57 & (v56 != 0); + if ( v18 ) + { + v23 = (__int16 *)v56[2]; + if ( (unsigned int)v23 >= v56[3] ) + { + LOBYTE(v63) = v17; + v24 = (*(int (__fastcall **)(_DWORD *))(*v56 + 36))(v56); + v17 = (char)v63; + } + else + { + v24 = *v23; + } + v25 = v24 == -1; + v26 = 0; + if ( !v25 ) + v26 = v56; + v56 = v26; + if ( !v25 ) + v18 = 0; + if ( v17 == v18 ) + break; + } + else if ( v17 == v57 ) + { + break; + } + if ( v58 && (_BYTE)v66 ) + { + v32 = (__int16 *)v58[2]; + if ( (unsigned int)v32 >= v58[3] ) + v61 = (*(int (__fastcall **)(_DWORD *))(*v58 + 36))(v58); + else + v61 = *v32; + v33 = 0; + if ( v61 != -1 ) + v33 = v58; + v58 = v33; + } + else + { + v61 = v60; + } + if ( !v15 ) + { +LABEL_34: + *a9 |= 4u; + return v58; + } + v66 = (unsigned int)v16; + v19 = 0; + v62 = 0; + v59 = 2 * v65; + do + { + while ( 1 ) + { + v20 = (unsigned int *)(v66 + 4 * v19); + if ( *v20 > v65 ) + break; + ++v62; + ++v19; +LABEL_16: + if ( v19 >= v15 ) + goto LABEL_20; + } + v21 = v64[v19]; + v63 = &v64[v19]; + if ( *(_WORD *)(*(_DWORD *)(a6 + 4 * v21) + v59) == v61 ) + { + ++v19; + goto LABEL_16; + } + *v63 = v64[--v15]; + *v20 = *(_DWORD *)(v66 + 4 * v15); + } + while ( v19 < v15 ); +LABEL_20: + v16 = (unsigned int *)v66; + if ( v15 != v62 ) + { + v22 = v58[2]; + if ( v22 >= v58[3] ) + (*(void (__fastcall **)(_DWORD *))(*v58 + 40))(v58); + else + v58[2] = v22 + 2; + ++v65; + v60 = -1; + continue; + } + break; + } + if ( v15 != 1 ) + { + if ( v15 == 2 && (*v16 == v65 || v16[1] == v65) ) + goto LABEL_52; + goto LABEL_34; + } + if ( *v16 != v65 ) + goto LABEL_34; +LABEL_52: + v34 = *v64; + if ( *v64 >= a7 ) + v34 = *v64 - a7; + *a5 = v34; + return v58; +} + +//----- (0048EF60) -------------------------------------------------------- +_DWORD *__thiscall std::time_get>::get( + void *this, + _DWORD *a2, + int a3, + _DWORD *a4, + int a5, + _DWORD *a6, + _DWORD *a7, + _DWORD *a8, + unsigned __int16 *a9, + unsigned __int16 *a10) +{ + unsigned __int16 *v10; // ebp + void *v12; // edi + int v13; // edx + __int16 v14; // bx + int v15; // edx + __int16 v16; // bx + unsigned int v17; // eax + char v18; // bl + char v19; // dl + char v20; // al + __int16 v21; // bx + void *v22; // eax + int v23; // edx + _DWORD *v24; // ebx + __int64 v25; // rax + char v26; // bp + char v28; // bl + char v29; // dl + int v30; // edx + unsigned int v31; // eax + __int16 *v32; // eax + __int16 v33; // ax + __int16 *v34; // eax + __int16 v35; // ax + bool v36; // zf + _DWORD *v37; // eax + unsigned __int16 *v38; // eax + unsigned __int16 *v39; // eax + void *v40; // eax + __int16 *v41; // eax + __int16 v42; // ax + bool v43; // zf + _DWORD *v44; // eax + __int16 *v45; // eax + __int16 v46; // ax + unsigned __int16 *v47; // eax + unsigned __int16 *v48; // eax + __int64 v49; // [esp+30h] [ebp-7Ch] + int v50; // [esp+30h] [ebp-7Ch] + __int16 v51; // [esp+56h] [ebp-56h] + unsigned __int16 v52; // [esp+5Ah] [ebp-52h] + unsigned __int16 *v54; // [esp+60h] [ebp-4Ch] + char v55; // [esp+60h] [ebp-4Ch] + unsigned __int16 *v56; // [esp+68h] [ebp-44h] + char v57; // [esp+70h] [ebp-3Ch] + __int16 v58; // [esp+76h] [ebp-36h] + wchar_t v60; // [esp+88h] [ebp-24h] BYREF + __int16 v61; // [esp+8Ah] [ebp-22h] + __int16 v62; // [esp+8Ch] [ebp-20h] + __int16 v63; // [esp+8Eh] [ebp-1Eh] + + v10 = a9; + v52 = a3; + HIWORD(v56) = a5; + v12 = std::use_facet>((int)(a6 + 27)); + *a7 = 0; + if ( a9 != a10 ) + { + BYTE1(v56) = (_WORD)a5 == 0xFFFF; + while ( 1 ) + { + v18 = v52 == 0xFFFF && a2 != 0; + if ( v18 ) + { + v45 = (__int16 *)a2[2]; + if ( (unsigned int)v45 >= a2[3] ) + v46 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v46 = *v45; + if ( v46 == -1 ) + a2 = 0; + if ( v46 != -1 ) + v18 = 0; + } + else + { + v18 = v52 == 0xFFFF; + } + v19 = BYTE1(v56) & (a4 != 0); + if ( v19 ) + { + v41 = (__int16 *)a4[2]; + if ( (unsigned int)v41 >= a4[3] ) + { + v42 = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4); + v19 = BYTE1(v56) & (a4 != 0); + } + else + { + v42 = *v41; + } + v43 = v42 == -1; + v44 = 0; + if ( !v43 ) + v44 = a4; + a4 = v44; + if ( !v43 ) + v19 = 0; + if ( v19 == v18 ) + { +LABEL_81: + *a7 = 6; + return a2; + } + } + else if ( BYTE1(v56) == v18 ) + { + goto LABEL_81; + } + if ( (*(unsigned __int8 (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v12 + 48))(v12, *v10, 0) == 37 ) + { + v54 = v10 + 1; + if ( a10 == v10 + 1 ) + goto LABEL_114; + v20 = (*(int (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v12 + 48))(v12, v10[1], 0); + v21 = v20; + if ( v20 == 69 || v20 == 79 ) + { + if ( a10 == v10 + 2 ) + goto LABEL_114; + (*(void (__thiscall **)(void *, _DWORD))(*(_DWORD *)v12 + 48))(v12, v10[2]); + HIWORD(v39) = (unsigned int)(v10 + 2) >> 16; + LOWORD(v39) = v51; + v54 = v39; + HIWORD(v39) = HIWORD(v56); + LOWORD(v39) = HIWORD(a3); + v56 = v39; + HIWORD(v10) = HIWORD(v39); + v40 = std::use_facet>((int)this); + *a6 = 0; + v60 = (*(int (__thiscall **)(void *, int, int))(*(_DWORD *)v40 + 40))(v40, 37, v50); + HIWORD(v23) = v58; + if ( (_BYTE)v21 ) + { + v61 = v21; + v62 = (char)v51; + v63 = 0; +LABEL_27: + LOWORD(v10) = HIWORD(v56); + LODWORD(v49) = a2; + LOWORD(v23) = v52; + HIDWORD(v49) = v23; + v25 = std::time_get>::_M_extract_via_format( + v49, + a4, + (int)v10, + (int)a6, + a7, + a8, + &v60); + v24 = (_DWORD *)v25; + a2 = (_DWORD *)v25; + v52 = WORD2(v25); + BYTE4(v25) = WORD2(v25) == 0xFFFF; + v26 = BYTE4(v25) & ((_DWORD)v25 != 0); + if ( v26 ) + { + LODWORD(v25) = *(_DWORD *)(v25 + 8); + if ( (unsigned int)v25 >= v24[3] ) + LOWORD(v25) = (*(int (__fastcall **)(_DWORD *))(*v24 + 36))(v24); + else + LOWORD(v25) = *(_WORD *)v25; + BYTE4(v25) = 0; + a2 = 0; + if ( (_WORD)v25 == 0xFFFF ) + BYTE4(v25) = v26; + if ( (_WORD)v25 != 0xFFFF ) + a2 = v24; + } + if ( a4 && BYTE1(v56) ) + { + LODWORD(v25) = a4[2]; + if ( (unsigned int)v25 >= a4[3] ) + { + v57 = BYTE4(v25); + LOWORD(v25) = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4); + BYTE4(v25) = v57; + } + else + { + LOWORD(v25) = *(_WORD *)v25; + } + LOBYTE(v25) = (_WORD)v25 == 0xFFFF; + } + else + { + LOBYTE(v25) = BYTE1(v56); + } + if ( (_BYTE)v25 == BYTE4(v25) ) + *a7 |= 2u; + v10 = v54 + 1; + if ( a10 == v54 + 1 ) + return a2; + goto LABEL_16; + } + v21 = (char)v51; + } + else + { + HIWORD(v10) = HIWORD(a5); + v22 = std::use_facet>((int)(a6 + 27)); + *a7 = 0; + v60 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v22 + 40))(v22, 37); + HIWORD(v23) = HIWORD(a3); + } + v61 = v21; + v62 = 0; + goto LABEL_27; + } + if ( (*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v12 + 8))(v12, 32, *v10) ) + break; + if ( a2 && v52 == 0xFFFF ) + { + v47 = (unsigned __int16 *)a2[2]; + if ( (unsigned int)v47 >= a2[3] ) + v13 = (*(unsigned __int16 (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v13 = *v47; + if ( (_WORD)v13 == 0xFFFF ) + a2 = 0; + } + else + { + v13 = v52; + } + v14 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v12 + 32))(v12, v13); + if ( (*(unsigned __int16 (__thiscall **)(void *, _DWORD))(*(_DWORD *)v12 + 32))(v12, *v10) != v14 ) + { + if ( a2 && v52 == 0xFFFF ) + { + v48 = (unsigned __int16 *)a2[2]; + if ( (unsigned int)v48 >= a2[3] ) + v15 = (*(unsigned __int16 (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v15 = *v48; + if ( (_WORD)v15 == 0xFFFF ) + a2 = 0; + } + else + { + v15 = v52; + } + v16 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v12 + 24))(v12, v15); + if ( (*(unsigned __int16 (__thiscall **)(void *, _DWORD))(*(_DWORD *)v12 + 24))(v12, *v10) != v16 ) + { +LABEL_114: + *a7 = 4; + return a2; + } + } + v17 = a2[2]; + if ( v17 >= a2[3] ) + (*(void (__fastcall **)(_DWORD *))(*a2 + 40))(a2); + else + a2[2] = v17 + 2; + ++v10; + v52 = -1; +LABEL_15: + if ( a10 == v10 ) + return a2; +LABEL_16: + if ( *a7 ) + return a2; + } + for ( ++v10; a10 != v10; ++v10 ) + { + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v12 + 8))(v12, 32, *v10) ) + break; + } + while ( 1 ) + { + v28 = v52 == 0xFFFF && a2 != 0; + if ( v28 ) + { + v32 = (__int16 *)a2[2]; + if ( (unsigned int)v32 >= a2[3] ) + v33 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v33 = *v32; + if ( v33 == -1 ) + a2 = 0; + if ( v33 != -1 ) + v28 = 0; + v29 = BYTE1(v56) & (a4 != 0); + if ( !v29 ) + { +LABEL_41: + if ( BYTE1(v56) == v28 ) + goto LABEL_15; + goto LABEL_42; + } + } + else + { + v28 = v52 == 0xFFFF; + v29 = BYTE1(v56) & (a4 != 0); + if ( !v29 ) + goto LABEL_41; + } + v34 = (__int16 *)a4[2]; + if ( (unsigned int)v34 >= a4[3] ) + { + v55 = v29; + v35 = (*(int (__fastcall **)(_DWORD *))(*a4 + 36))(a4); + v29 = v55; + } + else + { + v35 = *v34; + } + v36 = v35 == -1; + v37 = 0; + if ( !v36 ) + v37 = a4; + a4 = v37; + if ( !v36 ) + v29 = 0; + if ( v29 == v28 ) + goto LABEL_15; +LABEL_42: + if ( a2 && v52 == 0xFFFF ) + { + v38 = (unsigned __int16 *)a2[2]; + if ( (unsigned int)v38 >= a2[3] ) + v30 = (*(unsigned __int16 (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v30 = *v38; + if ( (_WORD)v30 == 0xFFFF ) + a2 = 0; + } + else + { + v30 = v52; + } + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, int))(*(_DWORD *)v12 + 8))(v12, 32, v30) ) + goto LABEL_15; + v31 = a2[2]; + if ( v31 >= a2[3] ) + (*(void (__fastcall **)(_DWORD *))(*a2 + 40))(a2); + else + a2[2] = v31 + 2; + v52 = -1; + } + } + return a2; +} +// 48F445: variable 'v51' is possibly undefined +// 48F487: variable 'v50' is possibly undefined +// 48F494: variable 'v58' is possibly undefined + +//----- (0048F6B0) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::get( + __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6, + char a7, + char a8) +{ + void *v8; // eax + __int64 v9; // rax + _DWORD *v10; // ecx + _DWORD *v11; // ebp + _BOOL2 v12; // bx + bool v13; // si + bool v14; // cl + __int16 *v16; // eax + __int16 v17; // ax + __int16 *v18; // eax + __int16 v19; // ax + int v20; // [esp+34h] [ebp-3Ch] + wchar_t v21; // [esp+4Ch] [ebp-24h] BYREF + __int16 v22; // [esp+4Eh] [ebp-22h] + __int16 v23; // [esp+50h] [ebp-20h] + __int16 v24; // [esp+52h] [ebp-1Eh] + + v8 = std::use_facet>(a4 + 108); + *a5 = 0; + v21 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v8 + 40))(v8, 37); + if ( a8 ) + { + v23 = a7; + v22 = a8; + v24 = 0; + } + else + { + v22 = a7; + v23 = 0; + } + v9 = std::time_get>::_M_extract_via_format(a1, a2, a3, a4, a5, a6, &v21); + v10 = (_DWORD *)v9; + v11 = (_DWORD *)v9; + v12 = WORD2(v9) == 0xFFFF; + v13 = v12 && (_DWORD)v9 != 0; + if ( v13 ) + { + v18 = *(__int16 **)(v9 + 8); + if ( (unsigned int)v18 >= v10[3] ) + { + v20 = (int)v10; + v19 = (*(int (**)(void))(*v10 + 36))(); + v10 = (_DWORD *)v20; + } + else + { + v19 = *v18; + } + LOBYTE(v12) = 0; + v11 = 0; + if ( v19 == -1 ) + LOBYTE(v12) = v13; + if ( v19 != -1 ) + v11 = v10; + } + v14 = (_WORD)a3 == 0xFFFF; + if ( a2 && (_WORD)a3 == 0xFFFF ) + { + v16 = (__int16 *)a2[2]; + if ( (unsigned int)v16 >= a2[3] ) + v17 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v17 = *v16; + v14 = v17 == -1; + } + if ( v12 == v14 ) + *a5 |= 2u; + return v11; +} + +//----- (0048F870) -------------------------------------------------------- +_DWORD *__stdcall std::time_get>::do_get( + __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + _DWORD *a6, + char a7, + char a8) +{ + void *v8; // eax + __int64 v9; // rax + _DWORD *v10; // ecx + _DWORD *v11; // ebp + _BOOL2 v12; // bx + bool v13; // si + bool v14; // cl + __int16 *v16; // eax + __int16 v17; // ax + __int16 *v18; // eax + __int16 v19; // ax + int v20; // [esp+34h] [ebp-3Ch] + wchar_t v21; // [esp+4Ch] [ebp-24h] BYREF + __int16 v22; // [esp+4Eh] [ebp-22h] + __int16 v23; // [esp+50h] [ebp-20h] + __int16 v24; // [esp+52h] [ebp-1Eh] + + v8 = std::use_facet>(a4 + 108); + *a5 = 0; + v21 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v8 + 40))(v8, 37); + if ( a8 ) + { + v23 = a7; + v22 = a8; + v24 = 0; + } + else + { + v22 = a7; + v23 = 0; + } + v9 = std::time_get>::_M_extract_via_format(a1, a2, a3, a4, a5, a6, &v21); + v10 = (_DWORD *)v9; + v11 = (_DWORD *)v9; + v12 = WORD2(v9) == 0xFFFF; + v13 = v12 && (_DWORD)v9 != 0; + if ( v13 ) + { + v18 = *(__int16 **)(v9 + 8); + if ( (unsigned int)v18 >= v10[3] ) + { + v20 = (int)v10; + v19 = (*(int (**)(void))(*v10 + 36))(); + v10 = (_DWORD *)v20; + } + else + { + v19 = *v18; + } + LOBYTE(v12) = 0; + v11 = 0; + if ( v19 == -1 ) + LOBYTE(v12) = v13; + if ( v19 != -1 ) + v11 = v10; + } + v14 = (_WORD)a3 == 0xFFFF; + if ( a2 && (_WORD)a3 == 0xFFFF ) + { + v16 = (__int16 *)a2[2]; + if ( (unsigned int)v16 >= a2[3] ) + v17 = (*(int (__fastcall **)(_DWORD *))(*a2 + 36))(a2); + else + v17 = *v16; + v14 = v17 == -1; + } + if ( v12 == v14 ) + *a5 |= 2u; + return v11; +} + +//----- (0048FA30) -------------------------------------------------------- +int __fastcall std::time_get>::get_date(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 16))(a1); +} + +//----- (0048FA40) -------------------------------------------------------- +int __fastcall std::time_get>::get_time(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 12))(a1); +} + +//----- (0048FA50) -------------------------------------------------------- +int __fastcall std::time_get>::get_year(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 28))(a1); +} + +//----- (0048FA60) -------------------------------------------------------- +_DWORD *__thiscall std::time_put>::put( + void *this, + _DWORD *a2, + int a3, + int a4, + char a5, + int a6, + unsigned __int8 *a7, + unsigned __int8 *a8) +{ + int v8; // ebp + unsigned __int8 *v9; // ebx + _BYTE *v10; // eax + _BYTE *v11; // esi + int v12; // edx + unsigned __int8 *v13; // edi + unsigned __int8 v14; // al + unsigned __int8 v15; // cl + int (__stdcall *v16)(unsigned __int8, int); // eax + int v17; // edx + signed __int8 v18; // al + unsigned __int8 v19; // cl + int (__stdcall *v20)(unsigned __int8, int); // eax + int v21; // ecx + int v22; // ebx + int v23; // edx + int v24; // ebx + __int64 v25; // rax + int v27; // edx + _BYTE *v28; // eax + int v29; // ecx + char v30; // dl + int (__stdcall *v31)(unsigned __int8, int); // eax + char v32; // al + int v33; // [esp+18h] [ebp-44h] + char v34; // [esp+27h] [ebp-35h] + int v37; // [esp+34h] [ebp-28h] + int v38; // [esp+34h] [ebp-28h] + int v39; // [esp+34h] [ebp-28h] + + v8 = a3; + v9 = a7; + v34 = a3; + v10 = std::use_facet>(a4 + 108); + if ( a7 != a8 ) + { + v11 = v10; + while ( 1 ) + { + v12 = *v9; + v13 = v9 + 1; + v14 = v11[v12 + 285]; + v15 = *v9; + if ( !v14 ) + { + v16 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v11 + 32); + if ( v16 != std::ctype::do_narrow ) + { + v38 = *v9; + v15 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v16)(v11, (char)v12, 0); + v12 = v38; + } + if ( !v15 ) + goto LABEL_3; + v11[v12 + 285] = v15; + v14 = v15; + } + if ( v14 == 37 ) + { + if ( a8 == v13 ) + return a2; + v17 = v9[1]; + v18 = v11[v17 + 285]; + v19 = v9[1]; + if ( !v18 ) + { + v20 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v11 + 32); + if ( v20 != std::ctype::do_narrow ) + { + v39 = v9[1]; + v19 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v20)(v11, (char)v17, 0); + v17 = v39; + } + if ( !v19 ) + { + v21 = 0; + v22 = 0; + goto LABEL_21; + } + v11[v17 + 285] = v19; + v18 = v19; + } + if ( v18 == 69 || v18 == 79 ) + { + v13 = v9 + 2; + if ( a8 == v9 + 2 ) + return a2; + v29 = v9[2]; + v22 = v18; + v37 = v29; + v30 = v29; + v21 = (char)v11[v29 + 285]; + if ( !(_BYTE)v21 ) + { + v21 = v30; + v31 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v11 + 32); + if ( v31 != std::ctype::do_narrow ) + { + v32 = ((int (__thiscall *)(_BYTE *, _DWORD, _DWORD))v31)(v11, v30, 0); + v21 = v32; + v30 = v32; + } + if ( v30 ) + v11[v37 + 285] = v30; + } + } + else + { + v21 = v18; + v22 = 0; + } +LABEL_21: + v23 = v8; + LOBYTE(v23) = v34; + v33 = v22; + v24 = v23; + v25 = ((__int64 (__thiscall *)(void *, _DWORD *, int, int, _DWORD, int, int, int))*(_DWORD *)(*(_DWORD *)this + 8))( + this, + a2, + v23, + a4, + a5, + a6, + v21, + v33); + LOBYTE(v24) = BYTE4(v25); + v8 = v24; + v9 = v13 + 1; + a2 = (_DWORD *)v25; + v34 = BYTE4(v25); + if ( a8 == v13 + 1 ) + return a2; + } + else + { +LABEL_3: + if ( v34 ) + { + ++v9; + } + else + { + v27 = *v9; + v28 = (_BYTE *)a2[5]; + if ( (unsigned int)v28 >= a2[6] ) + { + ++v9; + v34 = (*(int (__thiscall **)(_DWORD *, int))(*a2 + 52))(a2, v27) == -1; + } + else + { + *v28 = v27; + ++a2[5]; + ++v9; + } + } + if ( a8 == v9 ) + return a2; + } + } + } + return a2; +} + +//----- (0048FCF0) -------------------------------------------------------- +int __thiscall std::time_put>::put( + void *this, + int a2, + int a3, + int a4, + char a5, + int a6, + char a7, + char a8) +{ + return (*(int (__thiscall **)(void *, int, int, int, _DWORD, int, _DWORD, _DWORD))(*(_DWORD *)this + 8))( + this, + a2, + a3, + a4, + a5, + a6, + a7, + a8); +} + +//----- (0048FD10) -------------------------------------------------------- +int __stdcall std::time_put>::do_put( + int a1, + char a2, + int a3, + int a4, + struct tm *a5, + char a6, + char a7) +{ + _BYTE *v7; // ebx + const char **v8; // eax + const char **v9; // edx + char v10; // cl + size_t v11; // eax + int (__stdcall *v13)(unsigned __int8); // eax + const char **v14; // [esp+1Ch] [ebp-B0h] + char Format; // [esp+2Ch] [ebp-A0h] BYREF + char v16; // [esp+2Dh] [ebp-9Fh] + char v17; // [esp+2Eh] [ebp-9Eh] + char v18; // [esp+2Fh] [ebp-9Dh] + char Buffer[156]; // [esp+30h] [ebp-9Ch] BYREF + + v7 = std::use_facet>(a3 + 108); + v8 = (const char **)std::use_facet>(a3 + 108); + v9 = v8; + if ( v7[28] ) + { + v10 = v7[66]; + } + else + { + v14 = v8; + std::ctype::_M_widen_init((int)v7); + v9 = v14; + v10 = 37; + v13 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v7 + 24); + if ( v13 != std::ctype::do_widen ) + { + v10 = ((int (__fastcall *)(_BYTE *, const char **, int))v13)(v7, v14, 37); + v9 = v14; + } + } + Format = v10; + if ( a7 ) + { + v16 = a7; + v18 = 0; + v17 = a6; + } + else + { + v17 = 0; + v16 = a6; + } + std::__timepunct::_M_put(v9, Buffer, 0x80u, &Format, a5); + v11 = strlen(Buffer); + if ( !a2 ) + (*(int (__thiscall **)(int, char *, size_t))(*(_DWORD *)a1 + 48))(a1, Buffer, v11); + return a1; +} + +//----- (0048FE60) -------------------------------------------------------- +_DWORD *__thiscall std::time_put>::put( + void *this, + _DWORD *a2, + int a3, + int a4, + unsigned __int16 a5, + int a6, + unsigned __int16 *a7, + unsigned __int16 *a8) +{ + int v8; // ebp + unsigned __int16 *v9; // ebx + void *v10; // eax + void *v11; // esi + unsigned __int16 *v12; // edi + char v13; // al + int v14; // edx + int v15; // eax + int v16; // ecx + int v17; // ebp + __int64 v18; // rax + int v19; // ecx + int v21; // edx + _WORD *v22; // eax + char v23; // cl + char v26; // [esp+46h] [ebp-26h] + char v27; // [esp+47h] [ebp-25h] + + v8 = a3; + v9 = a7; + v26 = a3; + v10 = std::use_facet>(a4 + 108); + if ( a7 != a8 ) + { + v11 = v10; + do + { + while ( 1 ) + { + v12 = v9 + 1; + if ( (*(unsigned __int8 (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v11 + 48))(v11, *v9, 0) != 37 ) + break; + if ( a8 == v12 ) + return a2; + v13 = (*(int (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v11 + 48))(v11, v9[1], 0); + v14 = v13; + if ( v13 == 69 || (v15 = 0, (_BYTE)v14 == 79) ) + { + v27 = v14; + v12 = v9 + 2; + if ( a8 == v9 + 2 ) + return a2; + v23 = (*(int (__thiscall **)(void *, _DWORD, _DWORD))(*(_DWORD *)v11 + 48))(v11, v9[2], 0); + v15 = v27; + v14 = v23; + } + v16 = v8; + LOBYTE(v16) = v26; + v17 = v16; + v18 = ((__int64 (__thiscall *)(void *, _DWORD *, int, int, _DWORD, int, int, int))*(_DWORD *)(*(_DWORD *)this + 8))( + this, + a2, + v16, + a4, + a5, + a6, + v14, + v15); + v19 = v17; + v9 = v12 + 1; + LOBYTE(v19) = BYTE4(v18); + v8 = v19; + a2 = (_DWORD *)v18; + v26 = BYTE4(v18); + if ( a8 == v12 + 1 ) + return a2; + } + if ( v26 ) + { + ++v9; + } + else + { + v21 = *v9; + v22 = (_WORD *)a2[5]; + if ( (unsigned int)v22 >= a2[6] ) + { + LOWORD(v21) = (*(int (__thiscall **)(_DWORD *, int))(*a2 + 52))(a2, v21); + } + else + { + *v22 = v21; + a2[5] = v22 + 1; + } + ++v9; + v26 = (_WORD)v21 == 0xFFFF; + } + } + while ( a8 != v9 ); + } + return a2; +} + +//----- (00490020) -------------------------------------------------------- +int __thiscall std::time_put>::put( + void *this, + int a2, + int a3, + int a4, + unsigned __int16 a5, + int a6, + char a7, + char a8) +{ + return (*(int (__thiscall **)(void *, int, int, int, _DWORD, int, _DWORD, _DWORD))(*(_DWORD *)this + 8))( + this, + a2, + a3, + a4, + a5, + a6, + a7, + a8); +} + +//----- (00490040) -------------------------------------------------------- +int __stdcall std::time_put>::do_put( + int a1, + char a2, + int a3, + int a4, + struct tm *a5, + char a6, + char a7) +{ + const char **v7; // ebx + size_t v8; // eax + void *v10; // [esp+1Ch] [ebp-134h] + wchar_t Format; // [esp+2Ch] [ebp-124h] BYREF + __int16 v12; // [esp+2Eh] [ebp-122h] + __int16 v13; // [esp+30h] [ebp-120h] + __int16 v14; // [esp+32h] [ebp-11Eh] + wchar_t Buffer[142]; // [esp+34h] [ebp-11Ch] BYREF + + v10 = std::use_facet>(a3 + 108); + v7 = (const char **)std::use_facet>(a3 + 108); + Format = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v10 + 40))(v10, 37); + if ( a7 ) + { + v13 = a6; + v12 = a7; + v14 = 0; + } + else + { + v12 = a6; + v13 = 0; + } + std::__timepunct::_M_put(v7, Buffer, 0x80u, &Format, a5); + v8 = wcslen(Buffer); + if ( !a2 ) + (*(int (__thiscall **)(int, wchar_t *, size_t))(*(_DWORD *)a1 + 48))(a1, Buffer, v8); + return a1; +} + +//----- (00490160) -------------------------------------------------------- +const char *std::bad_alloc::what() +{ + return "std::bad_alloc"; +} + +//----- (00490170) -------------------------------------------------------- +int __fastcall std::ios::exceptions(int a1) +{ + return *(_DWORD *)(a1 + 16); +} + +//----- (00490180) -------------------------------------------------------- +int __fastcall std::ios::bad(int a1) +{ + return *(_DWORD *)(a1 + 20) & 1; +} + +//----- (00490190) -------------------------------------------------------- +int __fastcall std::ios::eof(int a1) +{ + return (*(_DWORD *)(a1 + 20) >> 1) & 1; +} + +//----- (004901A0) -------------------------------------------------------- +int __fastcall std::ios::tie(int a1) +{ + return *(_DWORD *)(a1 + 112); +} + +//----- (004901B0) -------------------------------------------------------- +bool __fastcall std::ios::fail(int a1) +{ + return (*(_BYTE *)(a1 + 20) & 5) != 0; +} + +//----- (004901C0) -------------------------------------------------------- +int __fastcall std::ios::fill(int a1) +{ + int result; // eax + _BYTE *v3; // esi + int (__stdcall *v4)(unsigned __int8); // edx + + if ( *(_BYTE *)(a1 + 117) ) + return *(unsigned __int8 *)(a1 + 116); + v3 = *(_BYTE **)(a1 + 124); + if ( !v3 ) + std::__throw_bad_cast(); + if ( v3[28] ) + { + result = (unsigned __int8)v3[61]; + } + else + { + std::ctype::_M_widen_init(*(_DWORD *)(a1 + 124)); + v4 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v3 + 24); + result = 32; + if ( v4 != std::ctype::do_widen ) + result = ((int (__thiscall *)(_BYTE *, int))v4)(v3, 32); + } + *(_BYTE *)(a1 + 116) = result; + *(_BYTE *)(a1 + 117) = 1; + return result; +} + +//----- (00490230) -------------------------------------------------------- +bool __fastcall std::ios::good(int a1) +{ + return *(_DWORD *)(a1 + 20) == 0; +} + +//----- (00490240) -------------------------------------------------------- +int __fastcall std::ios::rdbuf(int a1) +{ + return *(_DWORD *)(a1 + 120); +} + +//----- (00490250) -------------------------------------------------------- +int __thiscall std::ios::widen(int *this, int a2) +{ + _BYTE *v2; // ebx + int result; // eax + int (__stdcall *v4)(unsigned __int8); // edx + + v2 = (_BYTE *)this[31]; + if ( !v2 ) + std::__throw_bad_cast(); + if ( v2[28] ) + return (unsigned __int8)v2[(unsigned __int8)a2 + 29]; + std::ctype::_M_widen_init(this[31]); + v4 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v2 + 24); + result = a2; + if ( v4 != std::ctype::do_widen ) + return ((int (__thiscall *)(_BYTE *, _DWORD))v4)(v2, (char)a2); + return result; +} + +//----- (004902B0) -------------------------------------------------------- +int __thiscall std::ios::narrow(_DWORD *this, int a2, int a3) +{ + int v3; // ebx + int result; // eax + int v5; // ecx + int (__stdcall *v6)(unsigned __int8, int); // eax + + v3 = this[31]; + if ( !v3 ) + std::__throw_bad_cast(); + result = *(unsigned __int8 *)(v3 + (unsigned __int8)a2 + 285); + if ( !(_BYTE)result ) + { + v5 = a2; + v6 = *(int (__stdcall **)(unsigned __int8, int))(*(_DWORD *)v3 + 32); + if ( v6 != std::ctype::do_narrow ) + v5 = ((int (__thiscall *)(int, _DWORD, _DWORD))v6)(v3, (char)a2, (char)a3); + result = a3; + if ( (_BYTE)a3 != (_BYTE)v5 ) + { + *(_BYTE *)(v3 + (unsigned __int8)a2 + 285) = v5; + return v5; + } + } + return result; +} + +//----- (00490320) -------------------------------------------------------- +int __fastcall std::ios::rdstate(int a1) +{ + return *(_DWORD *)(a1 + 20); +} + +//----- (00490330) -------------------------------------------------------- +int __fastcall std::ios::operator void *(int a1) +{ + int result; // eax + + result = 0; + if ( (*(_BYTE *)(a1 + 20) & 5) == 0 ) + return a1; + return result; +} + +//----- (00490340) -------------------------------------------------------- +bool __fastcall std::ios::operator bool(int a1) +{ + return (*(_BYTE *)(a1 + 20) & 5) == 0; +} + +//----- (00490350) -------------------------------------------------------- +bool __fastcall std::ios::operator!(int a1) +{ + return (*(_BYTE *)(a1 + 20) & 5) != 0; +} + +//----- (00490360) -------------------------------------------------------- +int __fastcall std::wios::exceptions(int a1) +{ + return *(_DWORD *)(a1 + 16); +} + +//----- (00490370) -------------------------------------------------------- +int __fastcall std::wios::bad(int a1) +{ + return *(_DWORD *)(a1 + 20) & 1; +} + +//----- (00490380) -------------------------------------------------------- +int __fastcall std::wios::eof(int a1) +{ + return (*(_DWORD *)(a1 + 20) >> 1) & 1; +} + +//----- (00490390) -------------------------------------------------------- +int __fastcall std::wios::tie(int a1) +{ + return *(_DWORD *)(a1 + 112); +} + +//----- (004903A0) -------------------------------------------------------- +bool __fastcall std::wios::fail(int a1) +{ + return (*(_BYTE *)(a1 + 20) & 5) != 0; +} + +//----- (004903B0) -------------------------------------------------------- +int __fastcall std::wios::fill(int a1) +{ + int result; // eax + int v3; // ecx + + if ( *(_BYTE *)(a1 + 118) ) + return *(unsigned __int16 *)(a1 + 116); + v3 = *(_DWORD *)(a1 + 124); + if ( !v3 ) + std::__throw_bad_cast(); + result = (*(int (__thiscall **)(int, int))(*(_DWORD *)v3 + 40))(v3, 32); + *(_BYTE *)(a1 + 118) = 1; + *(_WORD *)(a1 + 116) = result; + return result; +} + +//----- (004903F0) -------------------------------------------------------- +bool __fastcall std::wios::good(int a1) +{ + return *(_DWORD *)(a1 + 20) == 0; +} + +//----- (00490400) -------------------------------------------------------- +int __fastcall std::wios::rdbuf(int a1) +{ + return *(_DWORD *)(a1 + 120); +} + +//----- (00490410) -------------------------------------------------------- +int __thiscall std::wios::widen(_DWORD *this, char a2) +{ + int v2; // ecx + + v2 = this[31]; + if ( !v2 ) + std::__throw_bad_cast(); + return (*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)v2 + 40))(v2, a2); +} + +//----- (00490440) -------------------------------------------------------- +int __thiscall std::wios::narrow(_DWORD *this, unsigned __int16 a2, char a3) +{ + int v3; // ecx + + v3 = this[31]; + if ( !v3 ) + std::__throw_bad_cast(); + return (*(int (__thiscall **)(int, _DWORD, _DWORD))(*(_DWORD *)v3 + 48))(v3, a2, a3); +} + +//----- (00490480) -------------------------------------------------------- +int __fastcall std::wios::rdstate(int a1) +{ + return *(_DWORD *)(a1 + 20); +} + +//----- (00490490) -------------------------------------------------------- +int __fastcall std::wios::operator void *(int a1) +{ + int result; // eax + + result = 0; + if ( (*(_BYTE *)(a1 + 20) & 5) == 0 ) + return a1; + return result; +} + +//----- (004904A0) -------------------------------------------------------- +bool __fastcall std::wios::operator bool(int a1) +{ + return (*(_BYTE *)(a1 + 20) & 5) == 0; +} + +//----- (004904B0) -------------------------------------------------------- +bool __fastcall std::wios::operator!(int a1) +{ + return (*(_BYTE *)(a1 + 20) & 5) != 0; +} + +//----- (004904C0) -------------------------------------------------------- +const char *_ZGTtNKSt9exception4whatEv() +{ + return "std::exception"; +} + +//----- (004904D0) -------------------------------------------------------- +unsigned __int64 __stdcall std::money_get>::_M_extract( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + int *a6) +{ + char v6; // al + int v7; // eax + int v8; // eax + _DWORD *v9; // ecx + int v10; // eax + _BYTE *v11; // eax + int v12; // eax + int v13; // eax + _DWORD *v14; // ecx + int v15; // eax + unsigned int v16; // eax + char v17; // al + char v18; // al + _BYTE *v19; // eax + char v20; // al + char v21; // bl + int v22; // eax + int v23; // eax + _DWORD *v24; // ecx + int v25; // eax + int v26; // eax + _BYTE *v27; // eax + int v28; // eax + int v29; // eax + _DWORD *v30; // ecx + char v31; // al + int v32; // eax + unsigned __int8 *v33; // eax + int v34; // edx + char *v35; // eax + char v36; // al + int v38; // edx + std::string *v39; // eax + unsigned int first_not_of; // eax + unsigned int v41; // edx + int v42; // eax + _WORD *v43; // eax + int *v44; // eax + unsigned int v45; // [esp+4h] [ebp-94h] + unsigned int v46; // [esp+4h] [ebp-94h] + std::string *v47; // [esp+4h] [ebp-94h] + unsigned int v48; // [esp+8h] [ebp-90h] + char *v49; // [esp+8h] [ebp-90h] + unsigned int v50; // [esp+Ch] [ebp-8Ch] + char v51; // [esp+10h] [ebp-88h] + std::locale::_Impl *v52; // [esp+14h] [ebp-84h] + char v53; // [esp+18h] [ebp-80h] + _DWORD *v54; // [esp+1Ch] [ebp-7Ch] + unsigned int v55; // [esp+20h] [ebp-78h] + int v56; // [esp+28h] [ebp-70h] + bool v57; // [esp+2Ch] [ebp-6Ch] + char v58; // [esp+2Dh] [ebp-6Bh] + char v59; // [esp+2Eh] [ebp-6Ah] + char v60; // [esp+2Fh] [ebp-69h] + char v61; // [esp+30h] [ebp-68h] + int v62; // [esp+30h] [ebp-68h] + unsigned int v63; // [esp+30h] [ebp-68h] + char v64; // [esp+30h] [ebp-68h] + char v65; // [esp+30h] [ebp-68h] + int v66; // [esp+34h] [ebp-64h] + int v67; // [esp+34h] [ebp-64h] + char v68; // [esp+34h] [ebp-64h] + char v69; // [esp+34h] [ebp-64h] + char v70; // [esp+34h] [ebp-64h] + int v71; // [esp+34h] [ebp-64h] + unsigned int v72; // [esp+34h] [ebp-64h] + int *Buf; // [esp+38h] [ebp-60h] + unsigned int Bufa; // [esp+38h] [ebp-60h] + std::locale::facet *v75; // [esp+3Ch] [ebp-5Ch] + std::locale::facet *v76; // [esp+3Ch] [ebp-5Ch] + int lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + std::string *lpuexcptb; // [esp+40h] [ebp-58h] + char lpuexcptc; // [esp+40h] [ebp-58h] + char lpuexcptd; // [esp+40h] [ebp-58h] + std::string *lpuexcpte; // [esp+40h] [ebp-58h] + char lpuexcptf; // [esp+40h] [ebp-58h] + char lpuexcptg; // [esp+40h] [ebp-58h] + char lpuexcpth; // [esp+40h] [ebp-58h] + unsigned __int64 lpuexcpti; // [esp+40h] [ebp-58h] + int v87; // [esp+48h] [ebp-50h] + char v88[5]; // [esp+83h] [ebp-15h] BYREF + int v89; // [esp+88h] [ebp-10h] BYREF + int v90[2]; // [esp+8Ch] [ebp-Ch] + + lpuexcpt = a4 + 108; + v54 = std::use_facet>(a4 + 108); + v75 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + Buf = (int *)(*(_DWORD *)(*(_DWORD *)(a4 + 108) + 12) + 4 * (_DWORD)v75); + v87 = *Buf; + if ( !*Buf ) + { + v43 = operator new(0x44u); + *(_DWORD *)v43 = &off_51B084; + v43[8] = 0; + *((_DWORD *)v43 + 1) = 0; + *((_DWORD *)v43 + 2) = 0; + *((_DWORD *)v43 + 3) = 0; + *((_BYTE *)v43 + 18) = 0; + *((_DWORD *)v43 + 5) = 0; + *((_DWORD *)v43 + 6) = 0; + *((_DWORD *)v43 + 7) = 0; + *((_DWORD *)v43 + 8) = 0; + *((_DWORD *)v43 + 9) = 0; + *((_DWORD *)v43 + 10) = 0; + *((_DWORD *)v43 + 11) = 0; + *((_DWORD *)v43 + 12) = 0; + *((_DWORD *)v43 + 13) = 0; + *((_BYTE *)v43 + 67) = 0; + v52 = (std::locale::_Impl *)v43; + std::__moneypunct_cache::_M_cache((int)v43, lpuexcpt); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a4 + 108), v52, v75, v48); + v87 = *Buf; + } + if ( *(_DWORD *)(v87 + 32) ) + v57 = *(_DWORD *)(v87 + 40) != 0; + else + v57 = 0; + *(_DWORD *)&v88[1] = std::string::_S_construct(0, 0); + if ( *(_BYTE *)(v87 + 16) ) + std::string::reserve((int *)&v88[1], (std::string *)0x20, v45); + v49 = v88; + v89 = (int)std::string::_S_construct(0, 0); + std::string::reserve(&v89, (std::string *)0x20, v46); + v60 = 0; + v56 = 0; + v76 = 0; + v90[0] = *(_DWORD *)(v87 + 52); + v53 = 0; + v55 = 0; + v58 = 0; + while ( 2 ) + { + switch ( *((_BYTE *)v90 + v56) ) + { + case 0: + LOBYTE(v66) = 1; + goto LABEL_10; + case 1: + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) + || (*(_BYTE *)(v54[6] + 2 * (unsigned __int8)std::istreambuf_iterator::_M_get((int)&a1)) & 0x20) == 0 ) + { + LOBYTE(v66) = 0; + if ( v56 == 3 ) + { +LABEL_11: + v6 = v66 & (v55 > 1); + goto LABEL_12; + } + } + else + { + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + LOBYTE(v66) = 1; +LABEL_10: + if ( v56 == 3 ) + goto LABEL_11; + } + v29 = HIDWORD(a1); + v30 = (_DWORD *)a1; + while ( 1 ) + { + lpuexcpth = v29 == -1; + v65 = lpuexcpth & (v30 != 0); + if ( v65 ) + { + lpuexcpth = 0; + if ( v30[2] >= v30[3] ) + { + lpuexcpth = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v30 + 36))(v30) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpth = v65; + } + } + } + v31 = a3 == -1; + v64 = v31 & (a2 != 0); + if ( v64 ) + { + v31 = 0; + if ( a2[2] >= a2[3] ) + { + v38 = (*(int (**)(void))(*a2 + 36))(); + v31 = 0; + if ( v38 == -1 ) + { + a2 = 0; + v31 = v64; + } + } + } + if ( lpuexcpth == v31 ) + goto LABEL_113; + LOBYTE(v32) = BYTE4(a1); + v30 = (_DWORD *)a1; + if ( (_DWORD)a1 && HIDWORD(a1) == -1 ) + { + v33 = *(unsigned __int8 **)(a1 + 8); + if ( (unsigned int)v33 < *(_DWORD *)(a1 + 12) ) + { + if ( (*(_BYTE *)(v54[6] + 2 * *v33) & 0x20) == 0 ) + goto LABEL_113; +LABEL_88: + v30[2] = v33 + 1; + goto LABEL_89; + } + v32 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v32 == -1 ) + LODWORD(a1) = 0; + } + if ( (*(_BYTE *)(v54[6] + 2 * (unsigned __int8)v32) & 0x20) == 0 ) + goto LABEL_113; + v30 = (_DWORD *)a1; + v33 = *(unsigned __int8 **)(a1 + 8); + if ( (unsigned int)v33 < *(_DWORD *)(a1 + 12) ) + goto LABEL_88; + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v30 = (_DWORD *)a1; +LABEL_89: + HIDWORD(a1) = -1; + v29 = -1; + } + case 2: + if ( (*(_BYTE *)(a4 + 13) & 2) != 0 ) + goto LABEL_65; + lpuexcptf = v56 == 0 || v55 > 1; + if ( lpuexcptf ) + goto LABEL_65; + if ( v56 == 1 ) + { + if ( v57 || LOBYTE(v90[0]) == 3 || BYTE2(v90[0]) == 1 ) + { +LABEL_65: + v24 = (_DWORD *)a1; + v72 = 0; + v63 = *(_DWORD *)(v87 + 24); + v25 = HIDWORD(a1); + while ( 2 ) + { + lpuexcptg = v25 == -1; + v59 = lpuexcptg & (v24 != 0); + if ( v59 ) + { + lpuexcptg = 0; + if ( v24[2] >= v24[3] ) + { + lpuexcptg = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v24 + 36))(v24) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptg = v59; + } + } + } + if ( a2 && a3 == -1 ) + { + if ( a2[2] >= a2[3] ) + { + v28 = (*(int (**)(void))(*a2 + 36))(); + lpuexcptg ^= v28 == -1; + if ( v28 == -1 ) + a2 = 0; + } + } + else + { + lpuexcptg ^= a3 == -1; + } + lpuexcptf = (v72 < v63) & lpuexcptg; + if ( !lpuexcptf ) + { + if ( v72 == v63 ) + { +LABEL_160: + LOBYTE(v66) = 1; + goto LABEL_114; + } +LABEL_143: + if ( !v72 ) + { + v66 = (*(_BYTE *)(a4 + 13) & 2) == 0; + lpuexcptf = (*(_BYTE *)(a4 + 13) & 2) != 0; + goto LABEL_114; + } +LABEL_107: + *a5 |= 4u; + goto LABEL_108; + } + LOBYTE(v26) = BYTE4(a1); + v24 = (_DWORD *)a1; + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v27 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v27 >= *(_DWORD *)(a1 + 12) ) + { + v26 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v26 == -1 ) + LODWORD(a1) = 0; + goto LABEL_69; + } + if ( *v27 != *(_BYTE *)(*(_DWORD *)(v87 + 20) + v72) ) + goto LABEL_143; +LABEL_71: + v24[2] = v27 + 1; + } + else + { +LABEL_69: + if ( *(_BYTE *)(*(_DWORD *)(v87 + 20) + v72) != (_BYTE)v26 ) + goto LABEL_143; + v24 = (_DWORD *)a1; + v27 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v27 < *(_DWORD *)(a1 + 12) ) + goto LABEL_71; + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v24 = (_DWORD *)a1; + } + ++v72; + v25 = -1; + HIDWORD(a1) = -1; + continue; + } + } + v23 = 2; +LABEL_116: + v56 = v23; + continue; + } + LOBYTE(v66) = 1; + if ( v56 == 2 ) + { + if ( HIBYTE(v90[0]) == 4 ) + goto LABEL_65; + v23 = 3; + if ( HIBYTE(v90[0]) == 3 && v57 ) + goto LABEL_65; + goto LABEL_116; + } +LABEL_114: + v23 = v56 + 1; + if ( v56 + 1 <= 3 && !lpuexcptf ) + goto LABEL_116; + v6 = v66 & (v55 > 1); +LABEL_12: + if ( !v6 ) + { + if ( (_BYTE)v66 ) + { + if ( *(_DWORD *)(v89 - 12) > 1u ) + goto LABEL_161; + goto LABEL_149; + } + goto LABEL_107; + } + if ( v58 ) + v7 = *(_DWORD *)(v87 + 36); + else + v7 = *(_DWORD *)(v87 + 28); + v67 = v7; + v8 = HIDWORD(a1); + v9 = (_DWORD *)a1; + Bufa = 1; + while ( 2 ) + { + lpuexcpta = v8 == -1; + v61 = lpuexcpta & (v9 != 0); + if ( v61 ) + { + lpuexcpta = 0; + if ( v9[2] >= v9[3] ) + { + lpuexcpta = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v9 + 36))(v9) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = v61; + } + } + } + if ( a2 && a3 == -1 ) + { + if ( a2[2] >= a2[3] ) + { + v12 = (*(int (**)(void))(*a2 + 36))(); + lpuexcpta ^= v12 == -1; + if ( v12 == -1 ) + a2 = 0; + } + } + else + { + lpuexcpta ^= a3 == -1; + } + if ( Bufa < v55 && lpuexcpta ) + { + LOBYTE(v10) = BYTE4(a1); + v9 = (_DWORD *)a1; + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_21; + v11 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v11 < *(_DWORD *)(a1 + 12) ) + { + if ( *v11 != *(_BYTE *)(v67 + Bufa) ) + goto LABEL_107; + goto LABEL_23; + } + v10 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v10 == -1 ) + LODWORD(a1) = 0; +LABEL_21: + if ( *(_BYTE *)(v67 + Bufa) != (_BYTE)v10 ) + goto LABEL_107; + v9 = (_DWORD *)a1; + v11 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v11 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v9 = (_DWORD *)a1; + } + else + { +LABEL_23: + v9[2] = v11 + 1; + } + ++Bufa; + v8 = -1; + HIDWORD(a1) = -1; + continue; + } + break; + } + if ( Bufa != v55 ) + goto LABEL_107; + if ( *(_DWORD *)(v89 - 12) <= 1u ) + goto LABEL_149; +LABEL_161: + first_not_of = std::string::find_first_not_of(&v89, (std::string *)0x30, 0, (unsigned int)v49); + if ( first_not_of ) + { + v41 = *(_DWORD *)(v89 - 12); + if ( first_not_of == -1 ) + first_not_of = v41 - 1; + if ( first_not_of > v41 ) + first_not_of = *(_DWORD *)(v89 - 12); + std::string::_M_mutate((char **)&v89, 0, first_not_of, 0, v50); + } +LABEL_149: + if ( v58 ) + { + v44 = (int *)v89; + if ( *(int *)(v89 - 4) >= 0 ) + { + std::string::_M_leak_hard((char **)&v89); + v44 = (int *)v89; + } + if ( *(_BYTE *)v44 != 48 ) + { + if ( *(v44 - 1) >= 0 ) + std::string::_M_leak_hard((char **)&v89); + std::string::_M_replace_aux((char **)&v89, 0, 0, 1u, 45, v51); + *(_DWORD *)(v89 - 4) = -1; + } + } + if ( *(_DWORD *)(*(_DWORD *)&v88[1] - 12) ) + { + v39 = (std::string *)(char)v76; + if ( v60 ) + v39 = (std::string *)v53; + std::string::push_back((int *)&v88[1], v39, (char)v47); + if ( !(unsigned __int8)std::__verify_grouping( + *(char **)(v87 + 8), + *(_DWORD *)(v87 + 12), + (const char **)&v88[1]) ) + *a5 |= 4u; + } + if ( v60 && *(std::locale::facet **)(v87 + 44) != v76 ) + goto LABEL_107; + std::string::swap(a6, (std::string *)&v89, v47); +LABEL_108: + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) ) + *a5 |= 2u; + lpuexcpti = a1; + std::string::_Rep::_M_dispose((volatile signed __int32 *)(v89 - 12), (int)v88); + std::string::_Rep::_M_dispose((volatile signed __int32 *)(*(_DWORD *)&v88[1] - 12), (int)&v89); + return lpuexcpti; + case 3: + if ( *(_DWORD *)(v87 + 32) ) + { + lpuexcptf = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( !lpuexcptf && **(_BYTE **)(v87 + 28) == (unsigned __int8)std::istreambuf_iterator::_M_get((int)&a1) ) + { + v55 = *(_DWORD *)(v87 + 32); + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + LOBYTE(v66) = 1; + goto LABEL_114; + } + if ( !*(_DWORD *)(v87 + 40) ) + { + if ( !*(_DWORD *)(v87 + 32) ) + goto LABEL_57; + goto LABEL_125; + } + } + else if ( !*(_DWORD *)(v87 + 40) ) + { + goto LABEL_57; + } + lpuexcptf = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( !lpuexcptf && **(_BYTE **)(v87 + 36) == (unsigned __int8)std::istreambuf_iterator::_M_get((int)&a1) ) + { + v55 = *(_DWORD *)(v87 + 40); + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + LOBYTE(v66) = 1; + v58 = 1; + goto LABEL_114; + } + if ( !*(_DWORD *)(v87 + 32) || *(_DWORD *)(v87 + 40) ) + { +LABEL_57: + lpuexcptf = v57; + LOBYTE(v66) = !v57; + goto LABEL_114; + } +LABEL_125: + lpuexcptf = 0; + LOBYTE(v66) = 1; + v58 = 1; + goto LABEL_114; + case 4: + v13 = HIDWORD(a1); + v14 = (_DWORD *)a1; + while ( 2 ) + { + lpuexcptc = v13 == -1; + v69 = lpuexcptc & (v14 != 0); + if ( v69 ) + { + lpuexcptc = 0; + if ( v14[2] >= v14[3] ) + { + lpuexcptc = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v14 + 36))(v14) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v69; + } + } + } + v17 = a3 == -1; + v70 = v17 & (a2 != 0); + if ( v70 ) + { + v17 = 0; + if ( a2[2] >= a2[3] ) + { + v34 = (*(int (**)(void))(*a2 + 36))(); + v17 = 0; + if ( v34 == -1 ) + { + a2 = 0; + v17 = v70; + } + } + } + if ( lpuexcptc == v17 ) + goto LABEL_105; + v18 = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_43; + v35 = *(char **)(a1 + 8); + if ( (unsigned int)v35 >= *(_DWORD *)(a1 + 12) ) + { + v42 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcptd = v42; + if ( v42 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptd = -1; + } + } + else + { + v18 = *v35; +LABEL_43: + lpuexcptd = v18; + } + v19 = memchr((const void *)(v87 + 57), lpuexcptd, 0xAu); + if ( v19 ) + { + v68 = v19[(_DWORD)std::money_base::_S_atoms - 56 - v87]; + v62 = *(_DWORD *)(v89 - 12); + lpuexcptb = (std::string *)(v62 + 1); + if ( (unsigned int)(v62 + 1) > *(_DWORD *)(v89 - 8) || *(int *)(v89 - 4) > 0 ) + std::string::reserve(&v89, lpuexcptb, (unsigned int)v47); + v76 = (std::locale::facet *)((char *)v76 + 1); + *(_BYTE *)(v89 + *(_DWORD *)(v89 - 12)) = v68; + v15 = v89; + *(_DWORD *)(v89 - 12) = lpuexcptb; + *(_DWORD *)(v15 - 4) = 0; + *(_BYTE *)(v15 + v62 + 1) = 0; +LABEL_36: + v14 = (_DWORD *)a1; + v16 = *(_DWORD *)(a1 + 8); + if ( v16 < *(_DWORD *)(a1 + 12) ) + { +LABEL_37: + v14[2] = v16 + 1; +LABEL_38: + HIDWORD(a1) = -1; + v13 = -1; + continue; + } +LABEL_54: + (*(void (__fastcall **)(_DWORD *))(*v14 + 40))(v14); + v14 = (_DWORD *)a1; + goto LABEL_38; + } + break; + } + LOBYTE(v66) = v60 | (*(_BYTE *)(v87 + 17) != (unsigned __int8)lpuexcptd); + if ( (_BYTE)v66 ) + { + v20 = *(_BYTE *)(v87 + 16); + if ( v20 ) + { + if ( *(_BYTE *)(v87 + 18) != lpuexcptd ) + goto LABEL_172; + if ( v60 ) + { + v20 = v60; +LABEL_172: + LOBYTE(v66) = v20; + if ( !*(_DWORD *)(v89 - 12) ) + goto LABEL_107; + goto LABEL_113; + } + if ( v76 ) + { + v71 = *(_DWORD *)(*(_DWORD *)&v88[1] - 12); + lpuexcpte = (std::string *)(v71 + 1); + if ( (unsigned int)(v71 + 1) > *(_DWORD *)(*(_DWORD *)&v88[1] - 8) || *(int *)(*(_DWORD *)&v88[1] - 4) > 0 ) + std::string::reserve((int *)&v88[1], lpuexcpte, (unsigned int)v47); + v21 = (char)v76; + v76 = 0; + *(_BYTE *)(*(_DWORD *)&v88[1] + *(_DWORD *)(*(_DWORD *)&v88[1] - 12)) = v21; + v22 = *(_DWORD *)&v88[1]; + *(_DWORD *)(*(_DWORD *)&v88[1] - 4) = 0; + *(_DWORD *)(v22 - 12) = lpuexcpte; + *(_BYTE *)(v22 + v71 + 1) = 0; + v14 = (_DWORD *)a1; + v16 = *(_DWORD *)(a1 + 8); + if ( v16 < *(_DWORD *)(a1 + 12) ) + goto LABEL_37; + goto LABEL_54; + } + LOBYTE(v66) = 0; + } + } + else + { + if ( *(int *)(v87 + 44) > 0 ) + { + v36 = (char)v76; + v60 = 1; + v76 = 0; + v53 = v36; + goto LABEL_36; + } + v60 = 0; +LABEL_105: + LOBYTE(v66) = 1; + } + if ( !*(_DWORD *)(v89 - 12) ) + goto LABEL_107; +LABEL_113: + lpuexcptf = v66 ^ 1; + goto LABEL_114; + default: + lpuexcptf = 0; + goto LABEL_160; + } + } +} +// 491295: variable 'v48' is possibly undefined +// 49059D: variable 'v45' is possibly undefined +// 4905DB: variable 'v46' is possibly undefined +// 490793: variable 'v47' is possibly undefined +// 4910CA: variable 'v49' is possibly undefined +// 49110B: variable 'v50' is possibly undefined +// 49133F: variable 'v51' is possibly undefined +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 50C48C: using guessed type signed __int32 std::moneypunct::id; +// 51B084: using guessed type int (*off_51B084)(); + +//----- (004914C0) -------------------------------------------------------- +unsigned __int64 __stdcall std::money_get>::_M_extract( + unsigned __int64 a1, + _DWORD *a2, + int a3, + int a4, + _DWORD *a5, + int *a6) +{ + char v6; // al + int v7; // eax + int v8; // eax + _DWORD *v9; // ecx + int v10; // eax + _BYTE *v11; // eax + int v12; // eax + int v13; // eax + _DWORD *v14; // ecx + int v15; // eax + unsigned int v16; // eax + char v17; // al + char v18; // al + _BYTE *v19; // eax + char v20; // al + char v21; // bl + int v22; // eax + int v23; // eax + _DWORD *v24; // ecx + int v25; // eax + int v26; // eax + _BYTE *v27; // eax + int v28; // eax + int v29; // eax + _DWORD *v30; // ecx + char v31; // al + int v32; // eax + unsigned __int8 *v33; // eax + int v34; // edx + char *v35; // eax + char v36; // al + int v38; // edx + std::string *v39; // eax + unsigned int first_not_of; // eax + unsigned int v41; // edx + int v42; // eax + _WORD *v43; // eax + int *v44; // eax + unsigned int v45; // [esp+4h] [ebp-94h] + unsigned int v46; // [esp+4h] [ebp-94h] + std::string *v47; // [esp+4h] [ebp-94h] + unsigned int v48; // [esp+8h] [ebp-90h] + char *v49; // [esp+8h] [ebp-90h] + unsigned int v50; // [esp+Ch] [ebp-8Ch] + char v51; // [esp+10h] [ebp-88h] + std::locale::_Impl *v52; // [esp+14h] [ebp-84h] + char v53; // [esp+18h] [ebp-80h] + _DWORD *v54; // [esp+1Ch] [ebp-7Ch] + unsigned int v55; // [esp+20h] [ebp-78h] + int v56; // [esp+28h] [ebp-70h] + bool v57; // [esp+2Ch] [ebp-6Ch] + char v58; // [esp+2Dh] [ebp-6Bh] + char v59; // [esp+2Eh] [ebp-6Ah] + char v60; // [esp+2Fh] [ebp-69h] + char v61; // [esp+30h] [ebp-68h] + int v62; // [esp+30h] [ebp-68h] + unsigned int v63; // [esp+30h] [ebp-68h] + char v64; // [esp+30h] [ebp-68h] + char v65; // [esp+30h] [ebp-68h] + int v66; // [esp+34h] [ebp-64h] + int v67; // [esp+34h] [ebp-64h] + char v68; // [esp+34h] [ebp-64h] + char v69; // [esp+34h] [ebp-64h] + char v70; // [esp+34h] [ebp-64h] + int v71; // [esp+34h] [ebp-64h] + unsigned int v72; // [esp+34h] [ebp-64h] + int *Buf; // [esp+38h] [ebp-60h] + unsigned int Bufa; // [esp+38h] [ebp-60h] + std::locale::facet *v75; // [esp+3Ch] [ebp-5Ch] + std::locale::facet *v76; // [esp+3Ch] [ebp-5Ch] + int lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + std::string *lpuexcptb; // [esp+40h] [ebp-58h] + char lpuexcptc; // [esp+40h] [ebp-58h] + char lpuexcptd; // [esp+40h] [ebp-58h] + std::string *lpuexcpte; // [esp+40h] [ebp-58h] + char lpuexcptf; // [esp+40h] [ebp-58h] + char lpuexcptg; // [esp+40h] [ebp-58h] + char lpuexcpth; // [esp+40h] [ebp-58h] + unsigned __int64 lpuexcpti; // [esp+40h] [ebp-58h] + int v87; // [esp+48h] [ebp-50h] + char v88[5]; // [esp+83h] [ebp-15h] BYREF + int v89; // [esp+88h] [ebp-10h] BYREF + int v90[2]; // [esp+8Ch] [ebp-Ch] + + lpuexcpt = a4 + 108; + v54 = std::use_facet>(a4 + 108); + v75 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + Buf = (int *)(*(_DWORD *)(*(_DWORD *)(a4 + 108) + 12) + 4 * (_DWORD)v75); + v87 = *Buf; + if ( !*Buf ) + { + v43 = operator new(0x44u); + *(_DWORD *)v43 = &off_51B094; + v43[8] = 0; + *((_DWORD *)v43 + 1) = 0; + *((_DWORD *)v43 + 2) = 0; + *((_DWORD *)v43 + 3) = 0; + *((_BYTE *)v43 + 18) = 0; + *((_DWORD *)v43 + 5) = 0; + *((_DWORD *)v43 + 6) = 0; + *((_DWORD *)v43 + 7) = 0; + *((_DWORD *)v43 + 8) = 0; + *((_DWORD *)v43 + 9) = 0; + *((_DWORD *)v43 + 10) = 0; + *((_DWORD *)v43 + 11) = 0; + *((_DWORD *)v43 + 12) = 0; + *((_DWORD *)v43 + 13) = 0; + *((_BYTE *)v43 + 67) = 0; + v52 = (std::locale::_Impl *)v43; + std::__moneypunct_cache::_M_cache((int)v43, lpuexcpt); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a4 + 108), v52, v75, v48); + v87 = *Buf; + } + if ( *(_DWORD *)(v87 + 32) ) + v57 = *(_DWORD *)(v87 + 40) != 0; + else + v57 = 0; + *(_DWORD *)&v88[1] = std::string::_S_construct(0, 0); + if ( *(_BYTE *)(v87 + 16) ) + std::string::reserve((int *)&v88[1], (std::string *)0x20, v45); + v49 = v88; + v89 = (int)std::string::_S_construct(0, 0); + std::string::reserve(&v89, (std::string *)0x20, v46); + v60 = 0; + v56 = 0; + v76 = 0; + v90[0] = *(_DWORD *)(v87 + 52); + v53 = 0; + v55 = 0; + v58 = 0; + while ( 2 ) + { + switch ( *((_BYTE *)v90 + v56) ) + { + case 0: + LOBYTE(v66) = 1; + goto LABEL_10; + case 1: + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) + || (*(_BYTE *)(v54[6] + 2 * (unsigned __int8)std::istreambuf_iterator::_M_get((int)&a1)) & 0x20) == 0 ) + { + LOBYTE(v66) = 0; + if ( v56 == 3 ) + { +LABEL_11: + v6 = v66 & (v55 > 1); + goto LABEL_12; + } + } + else + { + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + LOBYTE(v66) = 1; +LABEL_10: + if ( v56 == 3 ) + goto LABEL_11; + } + v29 = HIDWORD(a1); + v30 = (_DWORD *)a1; + while ( 1 ) + { + lpuexcpth = v29 == -1; + v65 = lpuexcpth & (v30 != 0); + if ( v65 ) + { + lpuexcpth = 0; + if ( v30[2] >= v30[3] ) + { + lpuexcpth = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v30 + 36))(v30) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpth = v65; + } + } + } + v31 = a3 == -1; + v64 = v31 & (a2 != 0); + if ( v64 ) + { + v31 = 0; + if ( a2[2] >= a2[3] ) + { + v38 = (*(int (**)(void))(*a2 + 36))(); + v31 = 0; + if ( v38 == -1 ) + { + a2 = 0; + v31 = v64; + } + } + } + if ( lpuexcpth == v31 ) + goto LABEL_113; + LOBYTE(v32) = BYTE4(a1); + v30 = (_DWORD *)a1; + if ( (_DWORD)a1 && HIDWORD(a1) == -1 ) + { + v33 = *(unsigned __int8 **)(a1 + 8); + if ( (unsigned int)v33 < *(_DWORD *)(a1 + 12) ) + { + if ( (*(_BYTE *)(v54[6] + 2 * *v33) & 0x20) == 0 ) + goto LABEL_113; +LABEL_88: + v30[2] = v33 + 1; + goto LABEL_89; + } + v32 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v32 == -1 ) + LODWORD(a1) = 0; + } + if ( (*(_BYTE *)(v54[6] + 2 * (unsigned __int8)v32) & 0x20) == 0 ) + goto LABEL_113; + v30 = (_DWORD *)a1; + v33 = *(unsigned __int8 **)(a1 + 8); + if ( (unsigned int)v33 < *(_DWORD *)(a1 + 12) ) + goto LABEL_88; + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v30 = (_DWORD *)a1; +LABEL_89: + HIDWORD(a1) = -1; + v29 = -1; + } + case 2: + if ( (*(_BYTE *)(a4 + 13) & 2) != 0 ) + goto LABEL_65; + lpuexcptf = v56 == 0 || v55 > 1; + if ( lpuexcptf ) + goto LABEL_65; + if ( v56 == 1 ) + { + if ( v57 || LOBYTE(v90[0]) == 3 || BYTE2(v90[0]) == 1 ) + { +LABEL_65: + v24 = (_DWORD *)a1; + v72 = 0; + v63 = *(_DWORD *)(v87 + 24); + v25 = HIDWORD(a1); + while ( 2 ) + { + lpuexcptg = v25 == -1; + v59 = lpuexcptg & (v24 != 0); + if ( v59 ) + { + lpuexcptg = 0; + if ( v24[2] >= v24[3] ) + { + lpuexcptg = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v24 + 36))(v24) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptg = v59; + } + } + } + if ( a2 && a3 == -1 ) + { + if ( a2[2] >= a2[3] ) + { + v28 = (*(int (**)(void))(*a2 + 36))(); + lpuexcptg ^= v28 == -1; + if ( v28 == -1 ) + a2 = 0; + } + } + else + { + lpuexcptg ^= a3 == -1; + } + lpuexcptf = (v72 < v63) & lpuexcptg; + if ( !lpuexcptf ) + { + if ( v72 == v63 ) + { +LABEL_160: + LOBYTE(v66) = 1; + goto LABEL_114; + } +LABEL_143: + if ( !v72 ) + { + v66 = (*(_BYTE *)(a4 + 13) & 2) == 0; + lpuexcptf = (*(_BYTE *)(a4 + 13) & 2) != 0; + goto LABEL_114; + } +LABEL_107: + *a5 |= 4u; + goto LABEL_108; + } + LOBYTE(v26) = BYTE4(a1); + v24 = (_DWORD *)a1; + if ( a1 > 0xFFFFFFFF00000000LL ) + { + v27 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v27 >= *(_DWORD *)(a1 + 12) ) + { + v26 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v26 == -1 ) + LODWORD(a1) = 0; + goto LABEL_69; + } + if ( *v27 != *(_BYTE *)(*(_DWORD *)(v87 + 20) + v72) ) + goto LABEL_143; +LABEL_71: + v24[2] = v27 + 1; + } + else + { +LABEL_69: + if ( *(_BYTE *)(*(_DWORD *)(v87 + 20) + v72) != (_BYTE)v26 ) + goto LABEL_143; + v24 = (_DWORD *)a1; + v27 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v27 < *(_DWORD *)(a1 + 12) ) + goto LABEL_71; + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v24 = (_DWORD *)a1; + } + ++v72; + v25 = -1; + HIDWORD(a1) = -1; + continue; + } + } + v23 = 2; +LABEL_116: + v56 = v23; + continue; + } + LOBYTE(v66) = 1; + if ( v56 == 2 ) + { + if ( HIBYTE(v90[0]) == 4 ) + goto LABEL_65; + v23 = 3; + if ( HIBYTE(v90[0]) == 3 && v57 ) + goto LABEL_65; + goto LABEL_116; + } +LABEL_114: + v23 = v56 + 1; + if ( v56 + 1 <= 3 && !lpuexcptf ) + goto LABEL_116; + v6 = v66 & (v55 > 1); +LABEL_12: + if ( !v6 ) + { + if ( (_BYTE)v66 ) + { + if ( *(_DWORD *)(v89 - 12) > 1u ) + goto LABEL_161; + goto LABEL_149; + } + goto LABEL_107; + } + if ( v58 ) + v7 = *(_DWORD *)(v87 + 36); + else + v7 = *(_DWORD *)(v87 + 28); + v67 = v7; + v8 = HIDWORD(a1); + v9 = (_DWORD *)a1; + Bufa = 1; + while ( 2 ) + { + lpuexcpta = v8 == -1; + v61 = lpuexcpta & (v9 != 0); + if ( v61 ) + { + lpuexcpta = 0; + if ( v9[2] >= v9[3] ) + { + lpuexcpta = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v9 + 36))(v9) == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = v61; + } + } + } + if ( a2 && a3 == -1 ) + { + if ( a2[2] >= a2[3] ) + { + v12 = (*(int (**)(void))(*a2 + 36))(); + lpuexcpta ^= v12 == -1; + if ( v12 == -1 ) + a2 = 0; + } + } + else + { + lpuexcpta ^= a3 == -1; + } + if ( Bufa < v55 && lpuexcpta ) + { + LOBYTE(v10) = BYTE4(a1); + v9 = (_DWORD *)a1; + if ( !(_DWORD)a1 || HIDWORD(a1) != -1 ) + goto LABEL_21; + v11 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v11 < *(_DWORD *)(a1 + 12) ) + { + if ( *v11 != *(_BYTE *)(v67 + Bufa) ) + goto LABEL_107; + goto LABEL_23; + } + v10 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + if ( v10 == -1 ) + LODWORD(a1) = 0; +LABEL_21: + if ( *(_BYTE *)(v67 + Bufa) != (_BYTE)v10 ) + goto LABEL_107; + v9 = (_DWORD *)a1; + v11 = *(_BYTE **)(a1 + 8); + if ( (unsigned int)v11 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v9 = (_DWORD *)a1; + } + else + { +LABEL_23: + v9[2] = v11 + 1; + } + ++Bufa; + v8 = -1; + HIDWORD(a1) = -1; + continue; + } + break; + } + if ( Bufa != v55 ) + goto LABEL_107; + if ( *(_DWORD *)(v89 - 12) <= 1u ) + goto LABEL_149; +LABEL_161: + first_not_of = std::string::find_first_not_of(&v89, (std::string *)0x30, 0, (unsigned int)v49); + if ( first_not_of ) + { + v41 = *(_DWORD *)(v89 - 12); + if ( first_not_of == -1 ) + first_not_of = v41 - 1; + if ( first_not_of > v41 ) + first_not_of = *(_DWORD *)(v89 - 12); + std::string::_M_mutate((char **)&v89, 0, first_not_of, 0, v50); + } +LABEL_149: + if ( v58 ) + { + v44 = (int *)v89; + if ( *(int *)(v89 - 4) >= 0 ) + { + std::string::_M_leak_hard((char **)&v89); + v44 = (int *)v89; + } + if ( *(_BYTE *)v44 != 48 ) + { + if ( *(v44 - 1) >= 0 ) + std::string::_M_leak_hard((char **)&v89); + std::string::_M_replace_aux((char **)&v89, 0, 0, 1u, 45, v51); + *(_DWORD *)(v89 - 4) = -1; + } + } + if ( *(_DWORD *)(*(_DWORD *)&v88[1] - 12) ) + { + v39 = (std::string *)(char)v76; + if ( v60 ) + v39 = (std::string *)v53; + std::string::push_back((int *)&v88[1], v39, (char)v47); + if ( !(unsigned __int8)std::__verify_grouping( + *(char **)(v87 + 8), + *(_DWORD *)(v87 + 12), + (const char **)&v88[1]) ) + *a5 |= 4u; + } + if ( v60 && *(std::locale::facet **)(v87 + 44) != v76 ) + goto LABEL_107; + std::string::swap(a6, (std::string *)&v89, v47); +LABEL_108: + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) ) + *a5 |= 2u; + lpuexcpti = a1; + std::string::_Rep::_M_dispose((volatile signed __int32 *)(v89 - 12), (int)v88); + std::string::_Rep::_M_dispose((volatile signed __int32 *)(*(_DWORD *)&v88[1] - 12), (int)&v89); + return lpuexcpti; + case 3: + if ( *(_DWORD *)(v87 + 32) ) + { + lpuexcptf = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( !lpuexcptf && **(_BYTE **)(v87 + 28) == (unsigned __int8)std::istreambuf_iterator::_M_get((int)&a1) ) + { + v55 = *(_DWORD *)(v87 + 32); + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + LOBYTE(v66) = 1; + goto LABEL_114; + } + if ( !*(_DWORD *)(v87 + 40) ) + { + if ( !*(_DWORD *)(v87 + 32) ) + goto LABEL_57; + goto LABEL_125; + } + } + else if ( !*(_DWORD *)(v87 + 40) ) + { + goto LABEL_57; + } + lpuexcptf = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( !lpuexcptf && **(_BYTE **)(v87 + 36) == (unsigned __int8)std::istreambuf_iterator::_M_get((int)&a1) ) + { + v55 = *(_DWORD *)(v87 + 40); + std::streambuf::sbumpc((_DWORD *)a1); + HIDWORD(a1) = -1; + LOBYTE(v66) = 1; + v58 = 1; + goto LABEL_114; + } + if ( !*(_DWORD *)(v87 + 32) || *(_DWORD *)(v87 + 40) ) + { +LABEL_57: + lpuexcptf = v57; + LOBYTE(v66) = !v57; + goto LABEL_114; + } +LABEL_125: + lpuexcptf = 0; + LOBYTE(v66) = 1; + v58 = 1; + goto LABEL_114; + case 4: + v13 = HIDWORD(a1); + v14 = (_DWORD *)a1; + while ( 2 ) + { + lpuexcptc = v13 == -1; + v69 = lpuexcptc & (v14 != 0); + if ( v69 ) + { + lpuexcptc = 0; + if ( v14[2] >= v14[3] ) + { + lpuexcptc = 0; + if ( (*(int (__fastcall **)(_DWORD *))(*v14 + 36))(v14) == -1 ) + { + LODWORD(a1) = 0; + lpuexcptc = v69; + } + } + } + v17 = a3 == -1; + v70 = v17 & (a2 != 0); + if ( v70 ) + { + v17 = 0; + if ( a2[2] >= a2[3] ) + { + v34 = (*(int (**)(void))(*a2 + 36))(); + v17 = 0; + if ( v34 == -1 ) + { + a2 = 0; + v17 = v70; + } + } + } + if ( lpuexcptc == v17 ) + goto LABEL_105; + v18 = BYTE4(a1); + if ( a1 <= 0xFFFFFFFF00000000LL ) + goto LABEL_43; + v35 = *(char **)(a1 + 8); + if ( (unsigned int)v35 >= *(_DWORD *)(a1 + 12) ) + { + v42 = (*(int (**)(void))(*(_DWORD *)a1 + 36))(); + lpuexcptd = v42; + if ( v42 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptd = -1; + } + } + else + { + v18 = *v35; +LABEL_43: + lpuexcptd = v18; + } + v19 = memchr((const void *)(v87 + 57), lpuexcptd, 0xAu); + if ( v19 ) + { + v68 = v19[(_DWORD)std::money_base::_S_atoms - 56 - v87]; + v62 = *(_DWORD *)(v89 - 12); + lpuexcptb = (std::string *)(v62 + 1); + if ( (unsigned int)(v62 + 1) > *(_DWORD *)(v89 - 8) || *(int *)(v89 - 4) > 0 ) + std::string::reserve(&v89, lpuexcptb, (unsigned int)v47); + v76 = (std::locale::facet *)((char *)v76 + 1); + *(_BYTE *)(v89 + *(_DWORD *)(v89 - 12)) = v68; + v15 = v89; + *(_DWORD *)(v89 - 12) = lpuexcptb; + *(_DWORD *)(v15 - 4) = 0; + *(_BYTE *)(v15 + v62 + 1) = 0; +LABEL_36: + v14 = (_DWORD *)a1; + v16 = *(_DWORD *)(a1 + 8); + if ( v16 < *(_DWORD *)(a1 + 12) ) + { +LABEL_37: + v14[2] = v16 + 1; +LABEL_38: + HIDWORD(a1) = -1; + v13 = -1; + continue; + } +LABEL_54: + (*(void (__fastcall **)(_DWORD *))(*v14 + 40))(v14); + v14 = (_DWORD *)a1; + goto LABEL_38; + } + break; + } + LOBYTE(v66) = v60 | (*(_BYTE *)(v87 + 17) != (unsigned __int8)lpuexcptd); + if ( (_BYTE)v66 ) + { + v20 = *(_BYTE *)(v87 + 16); + if ( v20 ) + { + if ( *(_BYTE *)(v87 + 18) != lpuexcptd ) + goto LABEL_172; + if ( v60 ) + { + v20 = v60; +LABEL_172: + LOBYTE(v66) = v20; + if ( !*(_DWORD *)(v89 - 12) ) + goto LABEL_107; + goto LABEL_113; + } + if ( v76 ) + { + v71 = *(_DWORD *)(*(_DWORD *)&v88[1] - 12); + lpuexcpte = (std::string *)(v71 + 1); + if ( (unsigned int)(v71 + 1) > *(_DWORD *)(*(_DWORD *)&v88[1] - 8) || *(int *)(*(_DWORD *)&v88[1] - 4) > 0 ) + std::string::reserve((int *)&v88[1], lpuexcpte, (unsigned int)v47); + v21 = (char)v76; + v76 = 0; + *(_BYTE *)(*(_DWORD *)&v88[1] + *(_DWORD *)(*(_DWORD *)&v88[1] - 12)) = v21; + v22 = *(_DWORD *)&v88[1]; + *(_DWORD *)(*(_DWORD *)&v88[1] - 4) = 0; + *(_DWORD *)(v22 - 12) = lpuexcpte; + *(_BYTE *)(v22 + v71 + 1) = 0; + v14 = (_DWORD *)a1; + v16 = *(_DWORD *)(a1 + 8); + if ( v16 < *(_DWORD *)(a1 + 12) ) + goto LABEL_37; + goto LABEL_54; + } + LOBYTE(v66) = 0; + } + } + else + { + if ( *(int *)(v87 + 44) > 0 ) + { + v36 = (char)v76; + v60 = 1; + v76 = 0; + v53 = v36; + goto LABEL_36; + } + v60 = 0; +LABEL_105: + LOBYTE(v66) = 1; + } + if ( !*(_DWORD *)(v89 - 12) ) + goto LABEL_107; +LABEL_113: + lpuexcptf = v66 ^ 1; + goto LABEL_114; + default: + lpuexcptf = 0; + goto LABEL_160; + } + } +} +// 492285: variable 'v48' is possibly undefined +// 49158D: variable 'v45' is possibly undefined +// 4915CB: variable 'v46' is possibly undefined +// 491783: variable 'v47' is possibly undefined +// 4920BA: variable 'v49' is possibly undefined +// 4920FB: variable 'v50' is possibly undefined +// 49232F: variable 'v51' is possibly undefined +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 50C490: using guessed type signed __int32 std::moneypunct::id; +// 51B094: using guessed type int (*off_51B094)(); + +//----- (004924B0) -------------------------------------------------------- +int __thiscall std::money_get>::get( + void *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6) +{ + return (*(int (__thiscall **)(void *, int, int, int, int, _DWORD))(*(_DWORD *)this + 12))(this, a2, a3, a4, a5, a6); +} + +//----- (004924C0) -------------------------------------------------------- +int __thiscall std::money_get>::get( + void *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6) +{ + return (*(int (__thiscall **)(void *, int, int, int, int, _DWORD))(*(_DWORD *)this + 8))(this, a2, a3, a4, a5, a6); +} + +//----- (004924D0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +unsigned __int64 __stdcall std::money_get>::do_get( + unsigned __int64 a1, + _DWORD *a2, + int a3, + char a4, + int a5, + _DWORD *a6, + int *a7) +{ + unsigned __int64 v7; // rax + size_t v8; // eax + char v9; // al + void (__thiscall *v10)(_BYTE *, char *, char *, void *); // eax + int v11; // eax + char v13; // [esp+4h] [ebp-84h] + char *v14; // [esp+28h] [ebp-60h] + void *v15; // [esp+2Ch] [ebp-5Ch] + size_t Size; // [esp+30h] [ebp-58h] + _BYTE *v17; // [esp+34h] [ebp-54h] + char *Src; // [esp+38h] [ebp-50h] + int v19; // [esp+7Bh] [ebp-Dh] BYREF + int v20[3]; // [esp+7Ch] [ebp-Ch] BYREF + unsigned __int64 v21; // [esp+90h] [ebp+8h] + + v17 = std::use_facet>(a5 + 108); + v20[0] = (int)std::string::_S_construct(0, 0); + if ( a4 ) + v7 = std::money_get>::_M_extract(a1, a2, a3, a5, a6, v20); + else + v7 = std::money_get>::_M_extract(a1, a2, a3, a5, a6, v20); + v21 = v7; + Src = (char *)v20[0]; + v8 = *(_DWORD *)(v20[0] - 12); + Size = v8; + if ( v8 ) + { + std::string::resize(a7, v8, 0, v13); + v15 = (void *)*a7; + if ( *(int *)(*a7 - 4) >= 0 ) + { + std::string::_M_leak_hard((char **)a7); + v15 = (void *)*a7; + } + Src = (char *)v20[0]; + v14 = (char *)(Size + v20[0]); + v9 = v17[28]; + if ( v9 == 1 ) + { + if ( v14 != (char *)v20[0] ) + goto LABEL_11; + } + else + { + if ( !v9 ) + std::ctype::_M_widen_init((int)v17); + v10 = *(void (__thiscall **)(_BYTE *, char *, char *, void *))(*(_DWORD *)v17 + 28); + if ( (char *)v10 == (char *)std::ctype::do_widen ) + { + if ( v14 != Src ) + { +LABEL_11: + memcpy(v15, Src, Size); + Src = (char *)v20[0]; + goto LABEL_12; + } + } + else + { + v10(v17, Src, v14, v15); + } + Src = (char *)v20[0]; + } + } +LABEL_12: + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)Src - 1, 0xFFFFFFFF) > 0 ) + return v21; +LABEL_17: + std::string::_Rep::_M_destroy(Src - 12, (int)&v19); + return v21; + } + v11 = *((_DWORD *)Src - 1); + *((_DWORD *)Src - 1) = v11 - 1; + if ( v11 <= 0 ) + goto LABEL_17; + return v21; +} +// 49272F: positive sp value 4 has been found +// 4925B9: variable 'v13' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 4924D0: using guessed type _DWORD *arg_8; + +//----- (00492750) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +unsigned __int64 __stdcall std::money_get>::do_get( + unsigned __int64 a1, + _DWORD *a2, + int a3, + char a4, + int a5, + _DWORD *a6, + long double *a7) +{ + unsigned __int64 v7; // rax + char *v8; // ecx + int v9; // eax + char *String; // [esp+68h] [ebp-10h] BYREF + int v12[3]; // [esp+6Ch] [ebp-Ch] BYREF + unsigned __int64 v13; // [esp+80h] [ebp+8h] + + String = (char *)std::string::_S_construct(0, 0); + if ( a4 ) + v7 = std::money_get>::_M_extract(a1, a2, a3, a5, a6, (int *)&String); + else + v7 = std::money_get>::_M_extract(a1, a2, a3, a5, a6, (int *)&String); + v13 = v7; + v12[0] = std::locale::facet::_S_get_c_locale(); + std::__convert_to_v(String, a7, a6); + v8 = String; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)String - 1, 0xFFFFFFFF) > 0 ) + return v13; +LABEL_8: + std::string::_Rep::_M_destroy(v8 - 12, (int)v12); + return v13; + } + v9 = *((_DWORD *)String - 1); + *((_DWORD *)String - 1) = v9 - 1; + if ( v9 <= 0 ) + goto LABEL_8; + return v13; +} +// 4928A8: positive sp value 4 has been found +// 50B0F0: using guessed type int _CRT_MT; +// 492750: using guessed type int var_C[3]; + +//----- (004928C0) -------------------------------------------------------- +__int64 __stdcall std::money_get>::_M_extract( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + int *a6) +{ + char v6; // al + int v7; // eax + __int16 v8; // ax + _DWORD *v9; // ecx + char v10; // al + __int16 v11; // ax + unsigned int v12; // eax + _WORD *v13; // eax + __int16 v14; // ax + __int16 v15; // ax + _DWORD *v16; // ecx + char v17; // al + unsigned __int16 v18; // dx + _WORD *v19; // eax + char v20; // al + char v21; // cl + int v22; // eax + unsigned int v23; // eax + int v24; // eax + _DWORD *v25; // ecx + __int16 i; // ax + bool v27; // al + __int16 v28; // ax + unsigned int v29; // eax + _WORD *v30; // eax + __int16 v31; // ax + __int16 v32; // ax + _DWORD *v33; // ecx + char v34; // al + unsigned __int16 v35; // ax + unsigned int v36; // eax + _WORD *v37; // eax + __int16 v38; // ax + int v39; // eax + __int16 *v40; // eax + __int16 v41; // dx + int v42; // eax + int v43; // edx + int v44; // eax + int v45; // edx + _WORD *v47; // eax + __int16 v48; // ax + _WORD *v49; // eax + char v50; // al + _WORD *v51; // eax + __int16 v52; // dx + _WORD *v53; // eax + unsigned __int16 v54; // ax + __int16 *v55; // eax + __int16 v56; // dx + std::string *v57; // eax + _WORD *v58; // eax + _WORD *v59; // eax + __int16 v60; // dx + __int16 *v61; // eax + unsigned int first_not_of; // eax + unsigned int v63; // edx + _DWORD *v64; // eax + int *v65; // eax + unsigned int v66; // [esp+4h] [ebp-94h] + unsigned int v67; // [esp+4h] [ebp-94h] + std::string *v68; // [esp+4h] [ebp-94h] + unsigned int v69; // [esp+8h] [ebp-90h] + unsigned int v70; // [esp+Ch] [ebp-8Ch] + std::locale::_Impl *v71; // [esp+10h] [ebp-88h] + char v72; // [esp+14h] [ebp-84h] + void *v73; // [esp+18h] [ebp-80h] + unsigned int v74; // [esp+1Ch] [ebp-7Ch] + int v75; // [esp+24h] [ebp-74h] + bool v76; // [esp+29h] [ebp-6Fh] + char v77; // [esp+2Ah] [ebp-6Eh] + char v78; // [esp+2Bh] [ebp-6Dh] + bool v79; // [esp+2Ch] [ebp-6Ch] + bool v80; // [esp+2Ch] [ebp-6Ch] + char v81; // [esp+30h] [ebp-68h] + char v82; // [esp+30h] [ebp-68h] + unsigned int v83; // [esp+30h] [ebp-68h] + char v84; // [esp+30h] [ebp-68h] + char v85; // [esp+30h] [ebp-68h] + int v86; // [esp+30h] [ebp-68h] + int v87; // [esp+34h] [ebp-64h] + int v88; // [esp+34h] [ebp-64h] + char v89; // [esp+34h] [ebp-64h] + char v90; // [esp+34h] [ebp-64h] + int v91; // [esp+34h] [ebp-64h] + unsigned int v92; // [esp+34h] [ebp-64h] + char v93; // [esp+34h] [ebp-64h] + int *v94; // [esp+38h] [ebp-60h] + unsigned int v95; // [esp+38h] [ebp-60h] + std::locale::facet *v96; // [esp+3Ch] [ebp-5Ch] + std::locale::facet *v97; // [esp+3Ch] [ebp-5Ch] + int lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + char lpuexcptb; // [esp+40h] [ebp-58h] + std::string *lpuexcptc; // [esp+40h] [ebp-58h] + char lpuexcptd; // [esp+40h] [ebp-58h] + bool lpuexcpte; // [esp+40h] [ebp-58h] + char lpuexcptf; // [esp+40h] [ebp-58h] + std::string *lpuexcptg; // [esp+40h] [ebp-58h] + __int64 lpuexcpth; // [esp+40h] [ebp-58h] + int v107; // [esp+48h] [ebp-50h] + char v108[5]; // [esp+83h] [ebp-15h] BYREF + int v109; // [esp+88h] [ebp-10h] BYREF + int v110[2]; // [esp+8Ch] [ebp-Ch] + + lpuexcpt = a4 + 108; + v73 = std::use_facet>(a4 + 108); + v96 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v94 = (int *)(*(_DWORD *)(*(_DWORD *)(a4 + 108) + 12) + 4 * (_DWORD)v96); + v107 = *v94; + if ( !*v94 ) + { + v64 = operator new(0x54u); + v64[1] = 0; + *v64 = &off_51B0A4; + v64[2] = 0; + v64[3] = 0; + *((_BYTE *)v64 + 16) = 0; + *(_DWORD *)((char *)v64 + 18) = 0; + v64[6] = 0; + v64[7] = 0; + v64[8] = 0; + v64[9] = 0; + v64[10] = 0; + v64[11] = 0; + v64[12] = 0; + v64[13] = 0; + v64[14] = 0; + *((_BYTE *)v64 + 82) = 0; + v71 = (std::locale::_Impl *)v64; + std::__moneypunct_cache::_M_cache((int)v64, lpuexcpt); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a4 + 108), v71, v96, v69); + v107 = *v94; + } + if ( *(_DWORD *)(v107 + 36) ) + v76 = *(_DWORD *)(v107 + 44) != 0; + else + v76 = 0; + *(_DWORD *)&v108[1] = std::string::_S_construct(0, 0); + if ( *(_BYTE *)(v107 + 16) ) + std::string::reserve((int *)&v108[1], (std::string *)0x20, v66); + v109 = (int)std::string::_S_construct(0, 0); + std::string::reserve(&v109, (std::string *)0x20, v67); + v78 = 0; + v75 = 0; + v77 = 0; + v110[0] = *(_DWORD *)(v107 + 56); + v97 = 0; + v72 = 0; + v74 = 0; + while ( 2 ) + { + switch ( *((_BYTE *)v110 + v75) ) + { + case 0: + LOBYTE(v87) = 1; + goto LABEL_10; + case 1: + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) + || (v54 = std::istreambuf_iterator::_M_get((int)&a1), + LOBYTE(v87) = (*(int (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v73 + 8))(v73, 32, v54), + !(_BYTE)v87) ) + { + LOBYTE(v87) = 0; + if ( v75 == 3 ) + goto LABEL_11; + } + else + { + std::wstreambuf::sbumpc((_DWORD *)a1); + WORD2(a1) = -1; +LABEL_10: + if ( v75 == 3 ) + { +LABEL_11: + v6 = v87 & (v74 > 1); + goto LABEL_12; + } + } + v32 = WORD2(a1); + v33 = (_DWORD *)a1; + while ( 1 ) + { + lpuexcptf = v32 == -1; + v85 = lpuexcptf & (v33 != 0); + if ( v85 ) + { + v37 = (_WORD *)v33[2]; + v38 = (unsigned int)v37 >= v33[3] ? (*(int (__fastcall **)(_DWORD *))(*v33 + 36))(v33) : *v37; + lpuexcptf = 0; + if ( v38 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptf = v85; + } + } + v34 = a3 == -1; + v84 = v34 & (a2 != 0); + if ( v84 ) + { + v51 = (_WORD *)a2[2]; + v52 = (unsigned int)v51 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v51; + v34 = 0; + if ( v52 == -1 ) + { + a2 = 0; + v34 = v84; + } + } + if ( lpuexcptf == v34 ) + break; + v35 = WORD2(a1); + if ( WORD2(a1) == 0xFFFF && (_DWORD)a1 ) + { + v53 = *(_WORD **)(a1 + 8); + v35 = (unsigned int)v53 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v53; + if ( v35 == 0xFFFF ) + LODWORD(a1) = 0; + } + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v73 + 8))(v73, 32, v35) ) + break; + v33 = (_DWORD *)a1; + v36 = *(_DWORD *)(a1 + 8); + if ( v36 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v33 = (_DWORD *)a1; + } + else + { + *(_DWORD *)(a1 + 8) = v36 + 2; + } + WORD2(a1) = -1; + v32 = -1; + } +LABEL_120: + lpuexcptd = v87 ^ 1; + goto LABEL_121; + case 2: + if ( (*(_BYTE *)(a4 + 13) & 2) != 0 ) + goto LABEL_61; + lpuexcptd = v75 == 0 || v74 > 1; + if ( lpuexcptd ) + goto LABEL_61; + if ( v75 != 1 ) + { + LOBYTE(v87) = 1; + if ( v75 != 2 ) + goto LABEL_121; + if ( HIBYTE(v110[0]) == 4 ) + goto LABEL_61; + v24 = 3; + if ( HIBYTE(v110[0]) == 3 && v76 ) + goto LABEL_61; +LABEL_123: + v75 = v24; + continue; + } + if ( !v76 && LOBYTE(v110[0]) != 3 && BYTE2(v110[0]) != 1 ) + { + v24 = 2; + goto LABEL_123; + } +LABEL_61: + v25 = (_DWORD *)a1; + v92 = 0; + v83 = *(_DWORD *)(v107 + 28); + for ( i = WORD2(a1); ; i = -1 ) + { + lpuexcpte = i == -1; + v80 = lpuexcpte && v25 != 0; + if ( v80 ) + { + v30 = (_WORD *)v25[2]; + v31 = (unsigned int)v30 >= v25[3] ? (*(int (__fastcall **)(_DWORD *))(*v25 + 36))(v25) : *v30; + lpuexcpte = 0; + if ( v31 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpte = v80; + } + } + v27 = a3 == -1; + v79 = v27 && a2 != 0; + if ( v79 ) + { + v59 = (_WORD *)a2[2]; + v60 = (unsigned int)v59 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v59; + v27 = 0; + if ( v60 == -1 ) + { + a2 = 0; + v27 = v79; + } + } + lpuexcptd = (v92 < v83) & (lpuexcpte ^ v27); + if ( !lpuexcptd ) + break; + v28 = WORD2(a1); + if ( (_DWORD)a1 + && WORD2(a1) == 0xFFFF + && ((v61 = *(__int16 **)(a1 + 8), (unsigned int)v61 >= *(_DWORD *)(a1 + 12)) + ? (v28 = (*(int (**)(void))(*(_DWORD *)a1 + 36))()) + : (v28 = *v61), + v28 == -1) ) + { + LODWORD(a1) = 0; + if ( *(_WORD *)(*(_DWORD *)(v107 + 24) + 2 * v92) != 0xFFFF ) + goto LABEL_171; + } + else if ( *(_WORD *)(*(_DWORD *)(v107 + 24) + 2 * v92) != v28 ) + { + goto LABEL_171; + } + v25 = (_DWORD *)a1; + v29 = *(_DWORD *)(a1 + 8); + if ( v29 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v25 = (_DWORD *)a1; + } + else + { + *(_DWORD *)(a1 + 8) = v29 + 2; + } + ++v92; + WORD2(a1) = -1; + } + if ( v92 == v83 ) + { +LABEL_181: + LOBYTE(v87) = 1; + } + else + { +LABEL_171: + if ( v92 ) + goto LABEL_102; + v87 = (*(_BYTE *)(a4 + 13) & 2) == 0; + lpuexcptd = (*(_BYTE *)(a4 + 13) & 2) != 0; + } +LABEL_121: + v24 = v75 + 1; + if ( v75 + 1 <= 3 && !lpuexcptd ) + goto LABEL_123; + v6 = v87 & (v74 > 1); +LABEL_12: + if ( !v6 ) + { + if ( (_BYTE)v87 ) + { + if ( *(_DWORD *)(v109 - 12) > 1u ) + goto LABEL_182; + goto LABEL_150; + } + goto LABEL_102; + } + if ( v77 ) + v7 = *(_DWORD *)(v107 + 40); + else + v7 = *(_DWORD *)(v107 + 32); + v88 = v7; + v8 = WORD2(a1); + v9 = (_DWORD *)a1; + v95 = 1; + while ( 2 ) + { + lpuexcpta = v8 == -1; + v82 = lpuexcpta & (v9 != 0); + if ( v82 ) + { + v13 = (_WORD *)v9[2]; + v14 = (unsigned int)v13 >= v9[3] ? (*(int (__fastcall **)(_DWORD *))(*v9 + 36))(v9) : *v13; + lpuexcpta = 0; + if ( v14 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = v82; + } + } + v10 = a3 == -1; + v81 = v10 & (a2 != 0); + if ( !v81 + || ((v55 = (__int16 *)a2[2], (unsigned int)v55 >= a2[3]) + ? (v56 = (*(int (**)(void))(*a2 + 36))()) + : (v56 = *v55), + v10 = 0, + v56 != -1) ) + { + if ( v95 >= v74 ) + break; + goto LABEL_18; + } + v10 = v81; + a2 = 0; + if ( v95 < v74 ) + { +LABEL_18: + if ( lpuexcpta == v10 ) + break; + v11 = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v58 = *(_WORD **)(a1 + 8); + v11 = (unsigned int)v58 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v58; + if ( v11 == -1 ) + LODWORD(a1) = 0; + } + if ( *(_WORD *)(v88 + 2 * v95) != v11 ) + goto LABEL_102; + v9 = (_DWORD *)a1; + v12 = *(_DWORD *)(a1 + 8); + if ( v12 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v9 = (_DWORD *)a1; + } + else + { + *(_DWORD *)(a1 + 8) = v12 + 2; + } + ++v95; + WORD2(a1) = -1; + v8 = -1; + continue; + } + break; + } + if ( v95 != v74 ) + goto LABEL_102; + if ( *(_DWORD *)(v109 - 12) <= 1u ) + goto LABEL_150; +LABEL_182: + first_not_of = std::string::find_first_not_of(&v109, (std::string *)0x30, 0, (unsigned int)v108); + if ( first_not_of ) + { + v63 = *(_DWORD *)(v109 - 12); + if ( first_not_of == -1 ) + first_not_of = v63 - 1; + if ( first_not_of > v63 ) + first_not_of = *(_DWORD *)(v109 - 12); + std::string::_M_mutate((char **)&v109, 0, first_not_of, 0, v70); + } +LABEL_150: + if ( v77 ) + { + v65 = (int *)v109; + if ( *(int *)(v109 - 4) >= 0 ) + { + std::string::_M_leak_hard((char **)&v109); + v65 = (int *)v109; + } + if ( *(_BYTE *)v65 != 48 ) + { + if ( *(v65 - 1) >= 0 ) + std::string::_M_leak_hard((char **)&v109); + std::string::_M_replace_aux((char **)&v109, 0, 0, 1u, 45, (char)v71); + *(_DWORD *)(v109 - 4) = -1; + } + } + if ( *(_DWORD *)(*(_DWORD *)&v108[1] - 12) ) + { + v57 = (std::string *)(char)v97; + if ( v78 ) + v57 = (std::string *)v72; + std::string::push_back((int *)&v108[1], v57, (char)v68); + if ( !(unsigned __int8)std::__verify_grouping( + *(char **)(v107 + 8), + *(_DWORD *)(v107 + 12), + (const char **)&v108[1]) ) + *a5 |= 4u; + } + if ( v78 && *(std::locale::facet **)(v107 + 48) != v97 ) + { +LABEL_102: + *a5 |= 4u; + goto LABEL_103; + } + std::string::swap(a6, (std::string *)&v109, v68); +LABEL_103: + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) ) + *a5 |= 2u; + lpuexcpth = a1; + v42 = v109; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v109 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_179; + } + else + { + v43 = *(_DWORD *)(v109 - 4); + *(_DWORD *)(v109 - 4) = v43 - 1; + if ( v43 > 0 ) + goto LABEL_107; +LABEL_179: + std::string::_Rep::_M_destroy((void *)(v42 - 12), (int)v108); + } +LABEL_107: + v44 = *(_DWORD *)&v108[1]; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v108[1] - 4), 0xFFFFFFFF) > 0 ) + return lpuexcpth; +LABEL_177: + std::string::_Rep::_M_destroy((void *)(v44 - 12), (int)&v109); + return lpuexcpth; + } + v45 = *(_DWORD *)(*(_DWORD *)&v108[1] - 4); + *(_DWORD *)(*(_DWORD *)&v108[1] - 4) = v45 - 1; + if ( v45 <= 0 ) + goto LABEL_177; + return lpuexcpth; + case 3: + if ( *(_DWORD *)(v107 + 36) ) + { + lpuexcptd = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( !lpuexcptd + && **(_WORD **)(v107 + 32) == (unsigned __int16)std::istreambuf_iterator::_M_get((int)&a1) ) + { + v74 = *(_DWORD *)(v107 + 36); + std::wstreambuf::sbumpc((_DWORD *)a1); + WORD2(a1) = -1; + goto LABEL_181; + } + if ( !*(_DWORD *)(v107 + 44) ) + { + if ( !*(_DWORD *)(v107 + 36) ) + goto LABEL_53; +LABEL_137: + lpuexcptd = 0; + LOBYTE(v87) = 1; + v77 = 1; + goto LABEL_121; + } + } + else if ( !*(_DWORD *)(v107 + 44) ) + { + goto LABEL_53; + } + lpuexcptd = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( lpuexcptd + || **(_WORD **)(v107 + 40) != (unsigned __int16)std::istreambuf_iterator::_M_get((int)&a1) ) + { + if ( !*(_DWORD *)(v107 + 36) || *(_DWORD *)(v107 + 44) ) + { +LABEL_53: + lpuexcptd = v76; + LOBYTE(v87) = !v76; + goto LABEL_121; + } + goto LABEL_137; + } + v74 = *(_DWORD *)(v107 + 44); + std::wstreambuf::sbumpc((_DWORD *)a1); + LOBYTE(v87) = 1; + WORD2(a1) = -1; + v77 = 1; + goto LABEL_121; + case 4: + v15 = WORD2(a1); + v16 = (_DWORD *)a1; + while ( 2 ) + { + lpuexcptb = v15 == -1; + v89 = lpuexcptb & (v16 != 0); + if ( v89 ) + { + v47 = (_WORD *)v16[2]; + v48 = (unsigned int)v47 >= v16[3] ? (*(int (__fastcall **)(_DWORD *))(*v16 + 36))(v16) : *v47; + lpuexcptb = 0; + if ( v48 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptb = v89; + } + } + v17 = a3 == -1; + v90 = v17 & (a2 != 0); + if ( v90 + && ((v40 = (__int16 *)a2[2], (unsigned int)v40 >= a2[3]) + ? (v41 = (*(int (**)(void))(*a2 + 36))()) + : (v41 = *v40), + v17 = 0, + v41 == -1) ) + { + a2 = 0; + if ( lpuexcptb == v90 ) + goto LABEL_100; + } + else if ( lpuexcptb == v17 ) + { + goto LABEL_100; + } + v18 = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v49 = *(_WORD **)(a1 + 8); + v18 = (unsigned int)v49 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v49; + if ( v18 == 0xFFFF ) + LODWORD(a1) = 0; + } + v19 = (_WORD *)(v107 + 62); + do + { + if ( v18 == *v19 ) + { + v93 = std::money_base::_S_atoms[((int)v19 - v107 - 60) >> 1]; + v86 = *(_DWORD *)(v109 - 12); + lpuexcptg = (std::string *)(v86 + 1); + if ( (unsigned int)(v86 + 1) > *(_DWORD *)(v109 - 8) || *(int *)(v109 - 4) > 0 ) + std::string::reserve(&v109, lpuexcptg, (unsigned int)v68); + v97 = (std::locale::facet *)((char *)v97 + 1); + *(_BYTE *)(v109 + *(_DWORD *)(v109 - 12)) = v93; + v39 = v109; + *(_DWORD *)(v109 - 12) = lpuexcptg; + *(_DWORD *)(v39 - 4) = 0; + *(_BYTE *)(v39 + v86 + 1) = 0; + v16 = (_DWORD *)a1; + v23 = *(_DWORD *)(a1 + 8); + if ( v23 < *(_DWORD *)(a1 + 12) ) + goto LABEL_49; + goto LABEL_95; + } + ++v19; + } + while ( v19 != (_WORD *)(v107 + 82) ); + v20 = v78 | (*(_WORD *)(v107 + 18) != v18); + if ( !v20 ) + { + if ( *(int *)(v107 + 48) > 0 ) + { + v50 = (char)v97; + v78 = 1; + v97 = 0; + v72 = v50; + goto LABEL_48; + } + v78 = 0; +LABEL_100: + LOBYTE(v87) = 1; +LABEL_101: + if ( !*(_DWORD *)(v109 - 12) ) + goto LABEL_102; + goto LABEL_120; + } + LOBYTE(v87) = *(_BYTE *)(v107 + 16); + if ( (_BYTE)v87 ) + { + if ( *(_WORD *)(v107 + 20) != v18 ) + goto LABEL_101; + if ( !v78 ) + { + if ( v97 ) + { + v91 = *(_DWORD *)(*(_DWORD *)&v108[1] - 12); + lpuexcptc = (std::string *)(v91 + 1); + if ( (unsigned int)(v91 + 1) > *(_DWORD *)(*(_DWORD *)&v108[1] - 8) + || *(int *)(*(_DWORD *)&v108[1] - 4) > 0 ) + { + std::string::reserve((int *)&v108[1], lpuexcptc, (unsigned int)v68); + } + v21 = (char)v97; + v97 = 0; + *(_BYTE *)(*(_DWORD *)&v108[1] + *(_DWORD *)(*(_DWORD *)&v108[1] - 12)) = v21; + v22 = *(_DWORD *)&v108[1]; + *(_DWORD *)(*(_DWORD *)&v108[1] - 12) = lpuexcptc; + *(_DWORD *)(v22 - 4) = 0; + *(_BYTE *)(v22 + v91 + 1) = 0; +LABEL_48: + v16 = (_DWORD *)a1; + v23 = *(_DWORD *)(a1 + 8); + if ( v23 < *(_DWORD *)(a1 + 12) ) + { +LABEL_49: + v16[2] = v23 + 2; +LABEL_50: + WORD2(a1) = -1; + v15 = -1; + continue; + } +LABEL_95: + (*(void (__fastcall **)(_DWORD *))(*v16 + 40))(v16); + v16 = (_DWORD *)a1; + goto LABEL_50; + } + LOBYTE(v87) = 0; + goto LABEL_101; + } + v20 = v78; + } + break; + } + LOBYTE(v87) = v20; + if ( !*(_DWORD *)(v109 - 12) ) + goto LABEL_102; + goto LABEL_120; + default: + lpuexcptd = 0; + LOBYTE(v87) = 1; + goto LABEL_121; + } + } +} +// 49366C: variable 'v69' is possibly undefined +// 49298D: variable 'v66' is possibly undefined +// 4929CB: variable 'v67' is possibly undefined +// 492C32: variable 'v68' is possibly undefined +// 4934FB: variable 'v70' is possibly undefined +// 493738: variable 'v71' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 50C494: using guessed type signed __int32 std::moneypunct::id; +// 51B0A4: using guessed type int (*off_51B0A4)(); + +//----- (00493910) -------------------------------------------------------- +__int64 __stdcall std::money_get>::_M_extract( + __int64 a1, + _DWORD *a2, + __int16 a3, + int a4, + _DWORD *a5, + int *a6) +{ + char v6; // al + int v7; // eax + __int16 v8; // ax + _DWORD *v9; // ecx + char v10; // al + __int16 v11; // ax + unsigned int v12; // eax + _WORD *v13; // eax + __int16 v14; // ax + __int16 v15; // ax + _DWORD *v16; // ecx + char v17; // al + unsigned __int16 v18; // dx + _WORD *v19; // eax + char v20; // al + char v21; // cl + int v22; // eax + unsigned int v23; // eax + int v24; // eax + _DWORD *v25; // ecx + __int16 i; // ax + bool v27; // al + __int16 v28; // ax + unsigned int v29; // eax + _WORD *v30; // eax + __int16 v31; // ax + __int16 v32; // ax + _DWORD *v33; // ecx + char v34; // al + unsigned __int16 v35; // ax + unsigned int v36; // eax + _WORD *v37; // eax + __int16 v38; // ax + int v39; // eax + __int16 *v40; // eax + __int16 v41; // dx + int v42; // eax + int v43; // edx + int v44; // eax + int v45; // edx + _WORD *v47; // eax + __int16 v48; // ax + _WORD *v49; // eax + char v50; // al + _WORD *v51; // eax + __int16 v52; // dx + _WORD *v53; // eax + unsigned __int16 v54; // ax + __int16 *v55; // eax + __int16 v56; // dx + std::string *v57; // eax + _WORD *v58; // eax + _WORD *v59; // eax + __int16 v60; // dx + __int16 *v61; // eax + unsigned int first_not_of; // eax + unsigned int v63; // edx + _DWORD *v64; // eax + int *v65; // eax + unsigned int v66; // [esp+4h] [ebp-94h] + unsigned int v67; // [esp+4h] [ebp-94h] + std::string *v68; // [esp+4h] [ebp-94h] + unsigned int v69; // [esp+8h] [ebp-90h] + unsigned int v70; // [esp+Ch] [ebp-8Ch] + std::locale::_Impl *v71; // [esp+10h] [ebp-88h] + char v72; // [esp+14h] [ebp-84h] + void *v73; // [esp+18h] [ebp-80h] + unsigned int v74; // [esp+1Ch] [ebp-7Ch] + int v75; // [esp+24h] [ebp-74h] + bool v76; // [esp+29h] [ebp-6Fh] + char v77; // [esp+2Ah] [ebp-6Eh] + char v78; // [esp+2Bh] [ebp-6Dh] + bool v79; // [esp+2Ch] [ebp-6Ch] + bool v80; // [esp+2Ch] [ebp-6Ch] + char v81; // [esp+30h] [ebp-68h] + char v82; // [esp+30h] [ebp-68h] + unsigned int v83; // [esp+30h] [ebp-68h] + char v84; // [esp+30h] [ebp-68h] + char v85; // [esp+30h] [ebp-68h] + int v86; // [esp+30h] [ebp-68h] + int v87; // [esp+34h] [ebp-64h] + int v88; // [esp+34h] [ebp-64h] + char v89; // [esp+34h] [ebp-64h] + char v90; // [esp+34h] [ebp-64h] + int v91; // [esp+34h] [ebp-64h] + unsigned int v92; // [esp+34h] [ebp-64h] + char v93; // [esp+34h] [ebp-64h] + int *v94; // [esp+38h] [ebp-60h] + unsigned int v95; // [esp+38h] [ebp-60h] + std::locale::facet *v96; // [esp+3Ch] [ebp-5Ch] + std::locale::facet *v97; // [esp+3Ch] [ebp-5Ch] + int lpuexcpt; // [esp+40h] [ebp-58h] + char lpuexcpta; // [esp+40h] [ebp-58h] + char lpuexcptb; // [esp+40h] [ebp-58h] + std::string *lpuexcptc; // [esp+40h] [ebp-58h] + char lpuexcptd; // [esp+40h] [ebp-58h] + bool lpuexcpte; // [esp+40h] [ebp-58h] + char lpuexcptf; // [esp+40h] [ebp-58h] + std::string *lpuexcptg; // [esp+40h] [ebp-58h] + __int64 lpuexcpth; // [esp+40h] [ebp-58h] + int v107; // [esp+48h] [ebp-50h] + char v108[5]; // [esp+83h] [ebp-15h] BYREF + int v109; // [esp+88h] [ebp-10h] BYREF + int v110[2]; // [esp+8Ch] [ebp-Ch] + + lpuexcpt = a4 + 108; + v73 = std::use_facet>(a4 + 108); + v96 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v94 = (int *)(*(_DWORD *)(*(_DWORD *)(a4 + 108) + 12) + 4 * (_DWORD)v96); + v107 = *v94; + if ( !*v94 ) + { + v64 = operator new(0x54u); + v64[1] = 0; + *v64 = &off_51B0B4; + v64[2] = 0; + v64[3] = 0; + *((_BYTE *)v64 + 16) = 0; + *(_DWORD *)((char *)v64 + 18) = 0; + v64[6] = 0; + v64[7] = 0; + v64[8] = 0; + v64[9] = 0; + v64[10] = 0; + v64[11] = 0; + v64[12] = 0; + v64[13] = 0; + v64[14] = 0; + *((_BYTE *)v64 + 82) = 0; + v71 = (std::locale::_Impl *)v64; + std::__moneypunct_cache::_M_cache((int)v64, lpuexcpt); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a4 + 108), v71, v96, v69); + v107 = *v94; + } + if ( *(_DWORD *)(v107 + 36) ) + v76 = *(_DWORD *)(v107 + 44) != 0; + else + v76 = 0; + *(_DWORD *)&v108[1] = std::string::_S_construct(0, 0); + if ( *(_BYTE *)(v107 + 16) ) + std::string::reserve((int *)&v108[1], (std::string *)0x20, v66); + v109 = (int)std::string::_S_construct(0, 0); + std::string::reserve(&v109, (std::string *)0x20, v67); + v78 = 0; + v75 = 0; + v77 = 0; + v110[0] = *(_DWORD *)(v107 + 56); + v97 = 0; + v72 = 0; + v74 = 0; + while ( 2 ) + { + switch ( *((_BYTE *)v110 + v75) ) + { + case 0: + LOBYTE(v87) = 1; + goto LABEL_10; + case 1: + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) + || (v54 = std::istreambuf_iterator::_M_get((int)&a1), + LOBYTE(v87) = (*(int (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v73 + 8))(v73, 32, v54), + !(_BYTE)v87) ) + { + LOBYTE(v87) = 0; + if ( v75 == 3 ) + goto LABEL_11; + } + else + { + std::wstreambuf::sbumpc((_DWORD *)a1); + WORD2(a1) = -1; +LABEL_10: + if ( v75 == 3 ) + { +LABEL_11: + v6 = v87 & (v74 > 1); + goto LABEL_12; + } + } + v32 = WORD2(a1); + v33 = (_DWORD *)a1; + while ( 1 ) + { + lpuexcptf = v32 == -1; + v85 = lpuexcptf & (v33 != 0); + if ( v85 ) + { + v37 = (_WORD *)v33[2]; + v38 = (unsigned int)v37 >= v33[3] ? (*(int (__fastcall **)(_DWORD *))(*v33 + 36))(v33) : *v37; + lpuexcptf = 0; + if ( v38 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptf = v85; + } + } + v34 = a3 == -1; + v84 = v34 & (a2 != 0); + if ( v84 ) + { + v51 = (_WORD *)a2[2]; + v52 = (unsigned int)v51 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v51; + v34 = 0; + if ( v52 == -1 ) + { + a2 = 0; + v34 = v84; + } + } + if ( lpuexcptf == v34 ) + break; + v35 = WORD2(a1); + if ( WORD2(a1) == 0xFFFF && (_DWORD)a1 ) + { + v53 = *(_WORD **)(a1 + 8); + v35 = (unsigned int)v53 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v53; + if ( v35 == 0xFFFF ) + LODWORD(a1) = 0; + } + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v73 + 8))(v73, 32, v35) ) + break; + v33 = (_DWORD *)a1; + v36 = *(_DWORD *)(a1 + 8); + if ( v36 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v33 = (_DWORD *)a1; + } + else + { + *(_DWORD *)(a1 + 8) = v36 + 2; + } + WORD2(a1) = -1; + v32 = -1; + } +LABEL_120: + lpuexcptd = v87 ^ 1; + goto LABEL_121; + case 2: + if ( (*(_BYTE *)(a4 + 13) & 2) != 0 ) + goto LABEL_61; + lpuexcptd = v75 == 0 || v74 > 1; + if ( lpuexcptd ) + goto LABEL_61; + if ( v75 != 1 ) + { + LOBYTE(v87) = 1; + if ( v75 != 2 ) + goto LABEL_121; + if ( HIBYTE(v110[0]) == 4 ) + goto LABEL_61; + v24 = 3; + if ( HIBYTE(v110[0]) == 3 && v76 ) + goto LABEL_61; +LABEL_123: + v75 = v24; + continue; + } + if ( !v76 && LOBYTE(v110[0]) != 3 && BYTE2(v110[0]) != 1 ) + { + v24 = 2; + goto LABEL_123; + } +LABEL_61: + v25 = (_DWORD *)a1; + v92 = 0; + v83 = *(_DWORD *)(v107 + 28); + for ( i = WORD2(a1); ; i = -1 ) + { + lpuexcpte = i == -1; + v80 = lpuexcpte && v25 != 0; + if ( v80 ) + { + v30 = (_WORD *)v25[2]; + v31 = (unsigned int)v30 >= v25[3] ? (*(int (__fastcall **)(_DWORD *))(*v25 + 36))(v25) : *v30; + lpuexcpte = 0; + if ( v31 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpte = v80; + } + } + v27 = a3 == -1; + v79 = v27 && a2 != 0; + if ( v79 ) + { + v59 = (_WORD *)a2[2]; + v60 = (unsigned int)v59 >= a2[3] ? (*(int (**)(void))(*a2 + 36))() : *v59; + v27 = 0; + if ( v60 == -1 ) + { + a2 = 0; + v27 = v79; + } + } + lpuexcptd = (v92 < v83) & (lpuexcpte ^ v27); + if ( !lpuexcptd ) + break; + v28 = WORD2(a1); + if ( (_DWORD)a1 + && WORD2(a1) == 0xFFFF + && ((v61 = *(__int16 **)(a1 + 8), (unsigned int)v61 >= *(_DWORD *)(a1 + 12)) + ? (v28 = (*(int (**)(void))(*(_DWORD *)a1 + 36))()) + : (v28 = *v61), + v28 == -1) ) + { + LODWORD(a1) = 0; + if ( *(_WORD *)(*(_DWORD *)(v107 + 24) + 2 * v92) != 0xFFFF ) + goto LABEL_171; + } + else if ( *(_WORD *)(*(_DWORD *)(v107 + 24) + 2 * v92) != v28 ) + { + goto LABEL_171; + } + v25 = (_DWORD *)a1; + v29 = *(_DWORD *)(a1 + 8); + if ( v29 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v25 = (_DWORD *)a1; + } + else + { + *(_DWORD *)(a1 + 8) = v29 + 2; + } + ++v92; + WORD2(a1) = -1; + } + if ( v92 == v83 ) + { +LABEL_181: + LOBYTE(v87) = 1; + } + else + { +LABEL_171: + if ( v92 ) + goto LABEL_102; + v87 = (*(_BYTE *)(a4 + 13) & 2) == 0; + lpuexcptd = (*(_BYTE *)(a4 + 13) & 2) != 0; + } +LABEL_121: + v24 = v75 + 1; + if ( v75 + 1 <= 3 && !lpuexcptd ) + goto LABEL_123; + v6 = v87 & (v74 > 1); +LABEL_12: + if ( !v6 ) + { + if ( (_BYTE)v87 ) + { + if ( *(_DWORD *)(v109 - 12) > 1u ) + goto LABEL_182; + goto LABEL_150; + } + goto LABEL_102; + } + if ( v77 ) + v7 = *(_DWORD *)(v107 + 40); + else + v7 = *(_DWORD *)(v107 + 32); + v88 = v7; + v8 = WORD2(a1); + v9 = (_DWORD *)a1; + v95 = 1; + while ( 2 ) + { + lpuexcpta = v8 == -1; + v82 = lpuexcpta & (v9 != 0); + if ( v82 ) + { + v13 = (_WORD *)v9[2]; + v14 = (unsigned int)v13 >= v9[3] ? (*(int (__fastcall **)(_DWORD *))(*v9 + 36))(v9) : *v13; + lpuexcpta = 0; + if ( v14 == -1 ) + { + LODWORD(a1) = 0; + lpuexcpta = v82; + } + } + v10 = a3 == -1; + v81 = v10 & (a2 != 0); + if ( !v81 + || ((v55 = (__int16 *)a2[2], (unsigned int)v55 >= a2[3]) + ? (v56 = (*(int (**)(void))(*a2 + 36))()) + : (v56 = *v55), + v10 = 0, + v56 != -1) ) + { + if ( v95 >= v74 ) + break; + goto LABEL_18; + } + v10 = v81; + a2 = 0; + if ( v95 < v74 ) + { +LABEL_18: + if ( lpuexcpta == v10 ) + break; + v11 = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v58 = *(_WORD **)(a1 + 8); + v11 = (unsigned int)v58 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v58; + if ( v11 == -1 ) + LODWORD(a1) = 0; + } + if ( *(_WORD *)(v88 + 2 * v95) != v11 ) + goto LABEL_102; + v9 = (_DWORD *)a1; + v12 = *(_DWORD *)(a1 + 8); + if ( v12 >= *(_DWORD *)(a1 + 12) ) + { + (*(void (__fastcall **)(_DWORD))(*(_DWORD *)a1 + 40))(a1); + v9 = (_DWORD *)a1; + } + else + { + *(_DWORD *)(a1 + 8) = v12 + 2; + } + ++v95; + WORD2(a1) = -1; + v8 = -1; + continue; + } + break; + } + if ( v95 != v74 ) + goto LABEL_102; + if ( *(_DWORD *)(v109 - 12) <= 1u ) + goto LABEL_150; +LABEL_182: + first_not_of = std::string::find_first_not_of(&v109, (std::string *)0x30, 0, (unsigned int)v108); + if ( first_not_of ) + { + v63 = *(_DWORD *)(v109 - 12); + if ( first_not_of == -1 ) + first_not_of = v63 - 1; + if ( first_not_of > v63 ) + first_not_of = *(_DWORD *)(v109 - 12); + std::string::_M_mutate((char **)&v109, 0, first_not_of, 0, v70); + } +LABEL_150: + if ( v77 ) + { + v65 = (int *)v109; + if ( *(int *)(v109 - 4) >= 0 ) + { + std::string::_M_leak_hard((char **)&v109); + v65 = (int *)v109; + } + if ( *(_BYTE *)v65 != 48 ) + { + if ( *(v65 - 1) >= 0 ) + std::string::_M_leak_hard((char **)&v109); + std::string::_M_replace_aux((char **)&v109, 0, 0, 1u, 45, (char)v71); + *(_DWORD *)(v109 - 4) = -1; + } + } + if ( *(_DWORD *)(*(_DWORD *)&v108[1] - 12) ) + { + v57 = (std::string *)(char)v97; + if ( v78 ) + v57 = (std::string *)v72; + std::string::push_back((int *)&v108[1], v57, (char)v68); + if ( !(unsigned __int8)std::__verify_grouping( + *(char **)(v107 + 8), + *(_DWORD *)(v107 + 12), + (const char **)&v108[1]) ) + *a5 |= 4u; + } + if ( v78 && *(std::locale::facet **)(v107 + 48) != v97 ) + { +LABEL_102: + *a5 |= 4u; + goto LABEL_103; + } + std::string::swap(a6, (std::string *)&v109, v68); +LABEL_103: + if ( std::istreambuf_iterator::equal(&a1, (int)&a2) ) + *a5 |= 2u; + lpuexcpth = a1; + v42 = v109; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v109 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_179; + } + else + { + v43 = *(_DWORD *)(v109 - 4); + *(_DWORD *)(v109 - 4) = v43 - 1; + if ( v43 > 0 ) + goto LABEL_107; +LABEL_179: + std::string::_Rep::_M_destroy((void *)(v42 - 12), (int)v108); + } +LABEL_107: + v44 = *(_DWORD *)&v108[1]; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v108[1] - 4), 0xFFFFFFFF) > 0 ) + return lpuexcpth; +LABEL_177: + std::string::_Rep::_M_destroy((void *)(v44 - 12), (int)&v109); + return lpuexcpth; + } + v45 = *(_DWORD *)(*(_DWORD *)&v108[1] - 4); + *(_DWORD *)(*(_DWORD *)&v108[1] - 4) = v45 - 1; + if ( v45 <= 0 ) + goto LABEL_177; + return lpuexcpth; + case 3: + if ( *(_DWORD *)(v107 + 36) ) + { + lpuexcptd = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( !lpuexcptd + && **(_WORD **)(v107 + 32) == (unsigned __int16)std::istreambuf_iterator::_M_get((int)&a1) ) + { + v74 = *(_DWORD *)(v107 + 36); + std::wstreambuf::sbumpc((_DWORD *)a1); + WORD2(a1) = -1; + goto LABEL_181; + } + if ( !*(_DWORD *)(v107 + 44) ) + { + if ( !*(_DWORD *)(v107 + 36) ) + goto LABEL_53; +LABEL_137: + lpuexcptd = 0; + LOBYTE(v87) = 1; + v77 = 1; + goto LABEL_121; + } + } + else if ( !*(_DWORD *)(v107 + 44) ) + { + goto LABEL_53; + } + lpuexcptd = std::istreambuf_iterator::equal(&a1, (int)&a2); + if ( lpuexcptd + || **(_WORD **)(v107 + 40) != (unsigned __int16)std::istreambuf_iterator::_M_get((int)&a1) ) + { + if ( !*(_DWORD *)(v107 + 36) || *(_DWORD *)(v107 + 44) ) + { +LABEL_53: + lpuexcptd = v76; + LOBYTE(v87) = !v76; + goto LABEL_121; + } + goto LABEL_137; + } + v74 = *(_DWORD *)(v107 + 44); + std::wstreambuf::sbumpc((_DWORD *)a1); + LOBYTE(v87) = 1; + WORD2(a1) = -1; + v77 = 1; + goto LABEL_121; + case 4: + v15 = WORD2(a1); + v16 = (_DWORD *)a1; + while ( 2 ) + { + lpuexcptb = v15 == -1; + v89 = lpuexcptb & (v16 != 0); + if ( v89 ) + { + v47 = (_WORD *)v16[2]; + v48 = (unsigned int)v47 >= v16[3] ? (*(int (__fastcall **)(_DWORD *))(*v16 + 36))(v16) : *v47; + lpuexcptb = 0; + if ( v48 == -1 ) + { + LODWORD(a1) = 0; + lpuexcptb = v89; + } + } + v17 = a3 == -1; + v90 = v17 & (a2 != 0); + if ( v90 + && ((v40 = (__int16 *)a2[2], (unsigned int)v40 >= a2[3]) + ? (v41 = (*(int (**)(void))(*a2 + 36))()) + : (v41 = *v40), + v17 = 0, + v41 == -1) ) + { + a2 = 0; + if ( lpuexcptb == v90 ) + goto LABEL_100; + } + else if ( lpuexcptb == v17 ) + { + goto LABEL_100; + } + v18 = WORD2(a1); + if ( (_DWORD)a1 && WORD2(a1) == 0xFFFF ) + { + v49 = *(_WORD **)(a1 + 8); + v18 = (unsigned int)v49 >= *(_DWORD *)(a1 + 12) ? (*(int (**)(void))(*(_DWORD *)a1 + 36))() : *v49; + if ( v18 == 0xFFFF ) + LODWORD(a1) = 0; + } + v19 = (_WORD *)(v107 + 62); + do + { + if ( v18 == *v19 ) + { + v93 = std::money_base::_S_atoms[((int)v19 - v107 - 60) >> 1]; + v86 = *(_DWORD *)(v109 - 12); + lpuexcptg = (std::string *)(v86 + 1); + if ( (unsigned int)(v86 + 1) > *(_DWORD *)(v109 - 8) || *(int *)(v109 - 4) > 0 ) + std::string::reserve(&v109, lpuexcptg, (unsigned int)v68); + v97 = (std::locale::facet *)((char *)v97 + 1); + *(_BYTE *)(v109 + *(_DWORD *)(v109 - 12)) = v93; + v39 = v109; + *(_DWORD *)(v109 - 12) = lpuexcptg; + *(_DWORD *)(v39 - 4) = 0; + *(_BYTE *)(v39 + v86 + 1) = 0; + v16 = (_DWORD *)a1; + v23 = *(_DWORD *)(a1 + 8); + if ( v23 < *(_DWORD *)(a1 + 12) ) + goto LABEL_49; + goto LABEL_95; + } + ++v19; + } + while ( v19 != (_WORD *)(v107 + 82) ); + v20 = v78 | (*(_WORD *)(v107 + 18) != v18); + if ( !v20 ) + { + if ( *(int *)(v107 + 48) > 0 ) + { + v50 = (char)v97; + v78 = 1; + v97 = 0; + v72 = v50; + goto LABEL_48; + } + v78 = 0; +LABEL_100: + LOBYTE(v87) = 1; +LABEL_101: + if ( !*(_DWORD *)(v109 - 12) ) + goto LABEL_102; + goto LABEL_120; + } + LOBYTE(v87) = *(_BYTE *)(v107 + 16); + if ( (_BYTE)v87 ) + { + if ( *(_WORD *)(v107 + 20) != v18 ) + goto LABEL_101; + if ( !v78 ) + { + if ( v97 ) + { + v91 = *(_DWORD *)(*(_DWORD *)&v108[1] - 12); + lpuexcptc = (std::string *)(v91 + 1); + if ( (unsigned int)(v91 + 1) > *(_DWORD *)(*(_DWORD *)&v108[1] - 8) + || *(int *)(*(_DWORD *)&v108[1] - 4) > 0 ) + { + std::string::reserve((int *)&v108[1], lpuexcptc, (unsigned int)v68); + } + v21 = (char)v97; + v97 = 0; + *(_BYTE *)(*(_DWORD *)&v108[1] + *(_DWORD *)(*(_DWORD *)&v108[1] - 12)) = v21; + v22 = *(_DWORD *)&v108[1]; + *(_DWORD *)(*(_DWORD *)&v108[1] - 12) = lpuexcptc; + *(_DWORD *)(v22 - 4) = 0; + *(_BYTE *)(v22 + v91 + 1) = 0; +LABEL_48: + v16 = (_DWORD *)a1; + v23 = *(_DWORD *)(a1 + 8); + if ( v23 < *(_DWORD *)(a1 + 12) ) + { +LABEL_49: + v16[2] = v23 + 2; +LABEL_50: + WORD2(a1) = -1; + v15 = -1; + continue; + } +LABEL_95: + (*(void (__fastcall **)(_DWORD *))(*v16 + 40))(v16); + v16 = (_DWORD *)a1; + goto LABEL_50; + } + LOBYTE(v87) = 0; + goto LABEL_101; + } + v20 = v78; + } + break; + } + LOBYTE(v87) = v20; + if ( !*(_DWORD *)(v109 - 12) ) + goto LABEL_102; + goto LABEL_120; + default: + lpuexcptd = 0; + LOBYTE(v87) = 1; + goto LABEL_121; + } + } +} +// 4946BC: variable 'v69' is possibly undefined +// 4939DD: variable 'v66' is possibly undefined +// 493A1B: variable 'v67' is possibly undefined +// 493C82: variable 'v68' is possibly undefined +// 49454B: variable 'v70' is possibly undefined +// 494788: variable 'v71' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 50C498: using guessed type signed __int32 std::moneypunct::id; +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (00494960) -------------------------------------------------------- +int __thiscall std::money_get>::get( + void *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6) +{ + return (*(int (__thiscall **)(void *, int, int, int, int, _DWORD))(*(_DWORD *)this + 12))(this, a2, a3, a4, a5, a6); +} + +//----- (00494970) -------------------------------------------------------- +int __thiscall std::money_get>::get( + void *this, + int a2, + int a3, + int a4, + int a5, + unsigned __int8 a6) +{ + return (*(int (__thiscall **)(void *, int, int, int, int, _DWORD))(*(_DWORD *)this + 8))(this, a2, a3, a4, a5, a6); +} + +//----- (00494980) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +struct _Unwind_Exception *__stdcall std::money_get>::do_get( + __int64 a1, + _DWORD *a2, + __int16 a3, + char a4, + int a5, + _DWORD *a6, + int *a7) +{ + struct _Unwind_Exception *v7; // eax + int v8; // ecx + unsigned int v9; // eax + int v10; // eax + int v11; // eax + void *v13; // [esp+20h] [ebp-68h] + unsigned int v14; // [esp+28h] [ebp-60h] + struct _Unwind_Exception *lpuexcpt; // [esp+30h] [ebp-58h] + int v16; // [esp+7Bh] [ebp-Dh] BYREF + int v17[2]; // [esp+7Ch] [ebp-Ch] BYREF + + v13 = std::use_facet>(a5 + 108); + v17[0] = (int)std::string::_S_construct(0, 0); + if ( a4 ) + v7 = (struct _Unwind_Exception *)std::money_get>::_M_extract( + a1, + a2, + a3, + a5, + a6, + v17); + else + v7 = (struct _Unwind_Exception *)std::money_get>::_M_extract( + a1, + a2, + a3, + a5, + a6, + v17); + v8 = v17[0]; + lpuexcpt = v7; + v9 = *(_DWORD *)(v17[0] - 12); + v14 = v9; + if ( v9 ) + { + std::wstring::resize(a7, v9, 0); + v10 = *a7; + if ( *(int *)(*a7 - 4) >= 0 ) + { + std::wstring::_M_leak_hard((int **)a7); + v10 = *a7; + } + (*(void (__thiscall **)(void *, int, unsigned int, int))(*(_DWORD *)v13 + 44))(v13, v17[0], v17[0] + v14, v10); + v8 = v17[0]; + } + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v8 - 4), 0xFFFFFFFF) > 0 ) + return lpuexcpt; +LABEL_12: + std::string::_Rep::_M_destroy((void *)(v8 - 12), (int)&v16); + return lpuexcpt; + } + v11 = *(_DWORD *)(v8 - 4); + *(_DWORD *)(v8 - 4) = v11 - 1; + if ( v11 <= 0 ) + goto LABEL_12; + return lpuexcpt; +} +// 494B97: positive sp value 4 has been found +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00494BB0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +struct _Unwind_Exception *__stdcall std::money_get>::do_get( + __int64 a1, + _DWORD *a2, + __int16 a3, + char a4, + int a5, + _DWORD *a6, + long double *a7) +{ + struct _Unwind_Exception *v7; // eax + char *v8; // ecx + int v9; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+30h] [ebp-58h] + char *String; // [esp+78h] [ebp-10h] BYREF + int c_locale; // [esp+7Ch] [ebp-Ch] BYREF + + String = (char *)std::string::_S_construct(0, 0); + if ( a4 ) + v7 = (struct _Unwind_Exception *)std::money_get>::_M_extract( + a1, + a2, + a3, + a5, + a6, + (int *)&String); + else + v7 = (struct _Unwind_Exception *)std::money_get>::_M_extract( + a1, + a2, + a3, + a5, + a6, + (int *)&String); + lpuexcpt = v7; + c_locale = std::locale::facet::_S_get_c_locale(); + std::__convert_to_v(String, a7, a6); + v8 = String; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)String - 1, 0xFFFFFFFF) > 0 ) + return lpuexcpt; +LABEL_8: + std::string::_Rep::_M_destroy(v8 - 12, (int)&c_locale); + return lpuexcpt; + } + v9 = *((_DWORD *)String - 1); + *((_DWORD *)String - 1) = v9 - 1; + if ( v9 <= 0 ) + goto LABEL_8; + return lpuexcpt; +} +// 494D40: positive sp value 4 has been found +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00494D60) -------------------------------------------------------- +int __thiscall std::money_put>::put( + void *this, + __int64 a2, + unsigned __int8 a3, + int a4, + char a5, + struct _Unwind_Exception **a6) +{ + __int64 (__stdcall *v6)(__int64, char, int, char, struct _Unwind_Exception **); // edx + + v6 = *(__int64 (__stdcall **)(__int64, char, int, char, struct _Unwind_Exception **))(*(_DWORD *)this + 12); + if ( v6 != std::money_put>::do_put ) + return ((int (__stdcall *)(_DWORD, _DWORD, _DWORD, int, _DWORD, struct _Unwind_Exception **))v6)( + a2, + HIDWORD(a2), + a3, + a4, + a5, + a6); + if ( a3 ) + return std::money_put>::_M_insert(a2, a4, a5, a6); + return std::money_put>::_M_insert(a2, a4, a5, a6); +} + +//----- (00494E00) -------------------------------------------------------- +int __thiscall std::money_put>::put( + void *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + char a6) +{ + return (*(int (__thiscall **)(void *, int, int, _DWORD, int, _DWORD))(*(_DWORD *)this + 8))(this, a2, a3, a4, a5, a6); +} + +//----- (00494E20) -------------------------------------------------------- +__int64 __stdcall std::money_put>::do_put( + __int64 a1, + char a2, + int a3, + char a4, + struct _Unwind_Exception **a5) +{ + if ( a2 ) + return std::money_put>::_M_insert(a1, a3, a4, a5); + else + return std::money_put>::_M_insert(a1, a3, a4, a5); +} + +//----- (00494E90) -------------------------------------------------------- +__int64 __thiscall std::money_put>::do_put( + void *this, + __int64 a2, + int a3, + int a4, + int a5, + long double a6) +{ + void *v6; // esp + void *v7; // esp + int v8; // eax + int v9; // eax + void *v10; // esp + void *v11; // esp + char v12; // al + void (__thiscall *v13)(_BYTE *, void *, char *, char *); // eax + __int64 v14; // rax + int *v15; // ecx + int v16; // eax + const std::locale *v18[22]; // [esp-30h] [ebp-C8h] BYREF + char *v19; // [esp+28h] [ebp-70h] + int v20; // [esp+2Ch] [ebp-6Ch] + int v21; // [esp+30h] [ebp-68h] + void *v22; // [esp+34h] [ebp-64h] + char *v23; // [esp+38h] [ebp-60h] + _BYTE *v24; // [esp+3Ch] [ebp-5Ch] + __int64 Size; // [esp+40h] [ebp-58h] + void *Src; // [esp+48h] [ebp-50h] + char v27[5]; // [esp+87h] [ebp-11h] BYREF + int *v28[3]; // [esp+8Ch] [ebp-Ch] BYREF + + v22 = this; + v21 = a3; + v20 = a5; + std::locale::locale((volatile signed __int32 **)&v27[1], (volatile signed __int32 **)(a4 + 108), v18[13]); + v24 = std::use_facet>((int)&v27[1]); + v6 = alloca(80); + v7 = alloca(80); + LODWORD(Size) = v18; + Src = v18; + v28[0] = (int *)std::locale::facet::_S_get_c_locale(); + v8 = std::__convert_from_v(v28, (char *)Size, 64, "%.*Lf", 0, a6); + LODWORD(Size) = v8; + if ( v8 > 63 ) + { + LODWORD(Size) = v8 + 1; + v9 = 16 * ((unsigned int)(v8 + 28) >> 4); + v10 = alloca(v9); + v11 = alloca(v9); + v23 = (char *)v18; + Src = v18; + v28[0] = (int *)std::locale::facet::_S_get_c_locale(); + LODWORD(Size) = std::__convert_from_v(v28, v23, Size, "%.*Lf", 0, a6); + } + std::string::string((char **)v28, Size, 0, (int)v27); + v23 = (char *)v28[0]; + if ( *(v28[0] - 1) >= 0 ) + { + std::string::_M_leak_hard((char **)v28); + v23 = (char *)v28[0]; + } + v19 = (char *)Src + Size; + v12 = v24[28]; + if ( v12 == 1 ) + goto LABEL_8; + if ( v12 ) + { + v13 = *(void (__thiscall **)(_BYTE *, void *, char *, char *))(*(_DWORD *)v24 + 28); + if ( (char *)v13 == (char *)std::ctype::do_widen ) + goto LABEL_8; +LABEL_19: + v13(v24, Src, v19, v23); + goto LABEL_10; + } + std::ctype::_M_widen_init((int)v24); + v13 = *(void (__thiscall **)(_BYTE *, void *, char *, char *))(*(_DWORD *)v24 + 28); + if ( (char *)v13 != (char *)std::ctype::do_widen ) + goto LABEL_19; +LABEL_8: + if ( v19 != Src ) + memcpy(v23, Src, Size); +LABEL_10: + if ( (_BYTE)v21 ) + v14 = std::money_put>::_M_insert( + a2, + a4, + v20, + (struct _Unwind_Exception **)v28); + else + v14 = std::money_put>::_M_insert( + a2, + a4, + v20, + (struct _Unwind_Exception **)v28); + Size = v14; + v15 = v28[0]; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd(v28[0] - 1, 0xFFFFFFFF) > 0 ) + goto LABEL_14; +LABEL_17: + std::string::_Rep::_M_destroy(v15 - 3, (int)v27); + goto LABEL_14; + } + v16 = *(v28[0] - 1); + *(v28[0] - 1) = v16 - 1; + if ( v16 <= 0 ) + goto LABEL_17; +LABEL_14: + std::locale::~locale((_DWORD **)&v27[1]); + return Size; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004951A0) -------------------------------------------------------- +__int64 __stdcall std::money_put>::_M_insert( + __int64 a1, + int a2, + char a3, + struct _Unwind_Exception **a4) +{ + int v4; // ecx + char *v5; // edx + struct _Unwind_Exception *v6; // eax + unsigned __int8 *v7; // ecx + int v9; // eax + bool v10; // sf + size_t v11; // eax + _BYTE *v12; // eax + int v13; // eax + size_t v14; // edx + size_t v15; // eax + bool v16; // dl + char v17; // al + unsigned int v18; // ecx + size_t v19; // edx + int v20; // eax + char v21; // dl + int v22; // ebx + _DWORD *v23; // eax + unsigned int v24; // [esp+4h] [ebp-B4h] + char v25; // [esp+4h] [ebp-B4h] + unsigned int v26; // [esp+4h] [ebp-B4h] + const std::string *v27; // [esp+4h] [ebp-B4h] + unsigned int v28; // [esp+8h] [ebp-B0h] + unsigned int *v29; // [esp+8h] [ebp-B0h] + char *v30; // [esp+8h] [ebp-B0h] + unsigned int v31; // [esp+8h] [ebp-B0h] + unsigned int v32; // [esp+Ch] [ebp-ACh] + char v33; // [esp+10h] [ebp-A8h] + char v34; // [esp+28h] [ebp-90h] + char *v35; // [esp+2Ch] [ebp-8Ch] + std::locale::_Impl *v36; // [esp+30h] [ebp-88h] + int v37; // [esp+34h] [ebp-84h] + size_t v38; // [esp+34h] [ebp-84h] + _BYTE *v39; // [esp+38h] [ebp-80h] + bool v40; // [esp+38h] [ebp-80h] + signed int v41; // [esp+3Ch] [ebp-7Ch] + int v42; // [esp+3Ch] [ebp-7Ch] + int *v43; // [esp+40h] [ebp-78h] + char *v44; // [esp+40h] [ebp-78h] + std::locale::facet *v45; // [esp+4Ch] [ebp-6Ch] + std::locale::facet *v46; // [esp+4Ch] [ebp-6Ch] + _DWORD *v47; // [esp+50h] [ebp-68h] + size_t v48; // [esp+50h] [ebp-68h] + size_t v49; // [esp+50h] [ebp-68h] + __int64 v50; // [esp+54h] [ebp-64h] + int v51; // [esp+5Ch] [ebp-5Ch] + struct _Unwind_Exception *lpuexcpt; // [esp+60h] [ebp-58h] + struct _Unwind_Exception *lpuexcpta; // [esp+60h] [ebp-58h] + char *lpuexcptb; // [esp+60h] [ebp-58h] + char lpuexcptc; // [esp+60h] [ebp-58h] + char v56[5]; // [esp+A3h] [ebp-15h] BYREF + unsigned int v57; // [esp+A8h] [ebp-10h] BYREF + int v58; // [esp+ACh] [ebp-Ch] BYREF + char v59; // [esp+B0h] [ebp-8h] BYREF + + v50 = a1; + v47 = std::use_facet>(a2 + 108); + v45 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v43 = (int *)(*(_DWORD *)(*(_DWORD *)(a2 + 108) + 12) + 4 * (_DWORD)v45); + v51 = *v43; + if ( !*v43 ) + { + v23 = operator new(0x44u); + *v23 = &off_51B084; + v23[1] = 0; + v23[2] = 0; + v23[3] = 0; + *((_WORD *)v23 + 8) = 0; + *((_BYTE *)v23 + 18) = 0; + v23[5] = 0; + v23[6] = 0; + v23[7] = 0; + v23[8] = 0; + v23[9] = 0; + v23[10] = 0; + v23[11] = 0; + v23[12] = 0; + v23[13] = 0; + *((_BYTE *)v23 + 67) = 0; + v36 = (std::locale::_Impl *)v23; + std::__moneypunct_cache::_M_cache((int)v23, a2 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a2 + 108), v36, v45, v28); + v51 = *v43; + } + v4 = *((_DWORD *)*a4 - 3); + lpuexcpt = *a4; + if ( *(_BYTE *)*a4 == *(_BYTE *)(v51 + 56) ) + { + v58 = *(_DWORD *)(v51 + 52); + if ( !v4 ) + goto LABEL_10; + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v44 = *(char **)(v51 + 36); + v46 = *(std::locale::facet **)(v51 + 40); + } + else + { + v5 = *(char **)(v51 + 28); + v58 = *(_DWORD *)(v51 + 48); + v44 = v5; + v46 = *(std::locale::facet **)(v51 + 32); + } + v6 = lpuexcpt; + v7 = (unsigned __int8 *)lpuexcpt + v4; + if ( v7 > (unsigned __int8 *)lpuexcpt ) + { + do + { + if ( (*(_BYTE *)(v47[6] + 2 * *(unsigned __int8 *)v6) & 8) == 0 ) + break; + v6 = (struct _Unwind_Exception *)((char *)v6 + 1); + } + while ( v7 != (unsigned __int8 *)v6 ); + v48 = v6 - lpuexcpt; + if ( v6 != lpuexcpt ) + { + v29 = &v57; + *(_DWORD *)&v56[1] = std::string::_S_construct(0, 0); + std::string::reserve((int *)&v56[1], (std::string *)(2 * v48), v24); + v9 = *(_DWORD *)(v51 + 44); + v41 = v48 - v9; + if ( (int)(v48 - v9) > 0 ) + { + v10 = v9 < 0; + v11 = v48 - v9; + if ( v10 ) + v11 = v48; + v41 = v11; + if ( *(_DWORD *)(v51 + 12) ) + { + std::string::_M_replace_aux((char **)&v56[1], 0, *(_DWORD *)(*(_DWORD *)&v56[1] - 12), 2 * v11, 0, v33); + v37 = *(_DWORD *)(v51 + 12); + v35 = *(char **)(v51 + 8); + v34 = *(_BYTE *)(v51 + 18); + v12 = *(_BYTE **)&v56[1]; + if ( *(int *)(*(_DWORD *)&v56[1] - 4) >= 0 ) + { + std::string::_M_leak_hard((char **)&v56[1]); + v12 = *(_BYTE **)&v56[1]; + } + v39 = std::__add_grouping(v12, v34, v35, v37, lpuexcpt, (_BYTE *)lpuexcpt + v41); + v13 = *(_DWORD *)&v56[1]; + if ( *(int *)(*(_DWORD *)&v56[1] - 4) >= 0 ) + { + std::string::_M_leak_hard((char **)&v56[1]); + v13 = *(_DWORD *)&v56[1]; + } + v14 = (size_t)&v39[-v13]; + v15 = *(_DWORD *)(v13 - 12); + if ( v14 > v15 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + v14, + v15); + std::string::_M_mutate((char **)&v56[1], v14, v15 - v14, 0, v32); + v9 = *(_DWORD *)(v51 + 44); + } + else + { + std::string::assign((char **)&v56[1], lpuexcpt, v11, (unsigned int)&v57); + v9 = *(_DWORD *)(v51 + 44); + } + } + if ( v9 > 0 ) + { + std::string::push_back((int *)&v56[1], (std::string *)*(char *)(v51 + 17), v25); + if ( v41 < 0 ) + { + std::string::append((int *)&v56[1], -v41, *(_BYTE *)(v51 + 57), (char)v29); + std::string::append((unsigned int *)&v56[1], lpuexcpt, v48, v31); + } + else + { + std::string::append( + (unsigned int *)&v56[1], + (struct _Unwind_Exception *)((char *)lpuexcpt + v41), + *(_DWORD *)(v51 + 44), + (unsigned int)v29); + } + } + v42 = *(_DWORD *)(a2 + 12) & 0xB0; + lpuexcpta = (std::locale::facet *)((char *)v46 + *(_DWORD *)(*(_DWORD *)&v56[1] - 12)); + if ( (*(_DWORD *)(a2 + 12) & 0x200) != 0 ) + lpuexcpta = (std::locale::facet *)((char *)v46 + *(_DWORD *)(*(_DWORD *)&v56[1] - 12) + *(_DWORD *)(v51 + 24)); + v30 = v56; + v57 = (unsigned int)std::string::_S_construct(0, 0); + std::string::reserve((int *)&v57, (std::string *)(2 * (_DWORD)lpuexcpta), v26); + v49 = *(_DWORD *)(a2 + 8); + v16 = v49 > (unsigned int)lpuexcpta && v42 == 16; + v38 = v49 - (_DWORD)lpuexcpta; + lpuexcptb = (char *)&v58; + v40 = v16; + do + { + switch ( *lpuexcptb ) + { + case 0: + if ( v40 ) + { + v17 = a3; + goto LABEL_33; + } + break; + case 1: + v17 = a3; + if ( v40 ) +LABEL_33: + std::string::append((int *)&v57, v38, v17, (char)v30); + else + std::string::push_back((int *)&v57, (std::string *)a3, (char)v27); + break; + case 2: + if ( (*(_BYTE *)(a2 + 13) & 2) != 0 ) + std::string::append(&v57, *(std::string **)(v51 + 20), *(_DWORD *)(v51 + 24), (unsigned int)v30); + break; + case 3: + if ( v46 ) + std::string::push_back((int *)&v57, (std::string *)*v44, (char)v27); + break; + case 4: + std::string::append((int *)&v57, (std::string *)&v56[1], v27); + break; + default: + break; + } + ++lpuexcptb; + } + while ( lpuexcptb != &v59 ); + if ( (unsigned int)v46 > 1 ) + { + std::string::append(&v57, (std::string *)(v44 + 1), (size_t)v46 - 1, (unsigned int)v30); + v18 = v57; + v19 = *(_DWORD *)(v57 - 12); + if ( v49 > v19 ) + goto LABEL_40; + } + else + { + v18 = v57; + v19 = *(_DWORD *)(v57 - 12); + if ( v49 > v19 ) + { +LABEL_40: + if ( v42 == 32 ) + std::string::append((int *)&v57, v49 - v19, a3, (char)v30); + else + std::string::_M_replace_aux((char **)&v57, 0, 0, v49 - v19, a3, v33); + v18 = v57; + goto LABEL_43; + } + } + v49 = v19; +LABEL_43: + lpuexcptc = BYTE4(a1); + if ( !BYTE4(a1) ) + { + v20 = (*(int (__thiscall **)(_DWORD, unsigned int, size_t))(*(_DWORD *)a1 + 48))(a1, v18, v49); + v21 = 0; + v18 = v57; + if ( v20 != v49 ) + v21 = 1; + lpuexcptc = v21; + } + v22 = HIDWORD(a1); + LOBYTE(v22) = lpuexcptc; + HIDWORD(v50) = v22; + std::string::_Rep::_M_dispose((volatile signed __int32 *)(v18 - 12), (int)v56); + std::string::_Rep::_M_dispose((volatile signed __int32 *)(*(_DWORD *)&v56[1] - 12), (int)&v57); + } + } +LABEL_10: + *(_DWORD *)(a2 + 8) = 0; + return v50; +} +// 495835: variable 'v28' is possibly undefined +// 495312: variable 'v24' is possibly undefined +// 495372: variable 'v33' is possibly undefined +// 495422: variable 'v32' is possibly undefined +// 495498: variable 'v26' is possibly undefined +// 49550E: variable 'v27' is possibly undefined +// 495543: variable 'v30' is possibly undefined +// 4956C4: variable 'v25' is possibly undefined +// 4956EC: variable 'v29' is possibly undefined +// 4958AC: variable 'v31' is possibly undefined +// 50C48C: using guessed type signed __int32 std::moneypunct::id; +// 51B084: using guessed type int (*off_51B084)(); + +//----- (004959B0) -------------------------------------------------------- +__int64 __stdcall std::money_put>::_M_insert( + __int64 a1, + int a2, + char a3, + struct _Unwind_Exception **a4) +{ + int v4; // ecx + char *v5; // edx + struct _Unwind_Exception *v6; // eax + unsigned __int8 *v7; // ecx + int v9; // eax + bool v10; // sf + size_t v11; // eax + _BYTE *v12; // eax + int v13; // eax + size_t v14; // edx + size_t v15; // eax + bool v16; // dl + char v17; // al + unsigned int v18; // ecx + size_t v19; // edx + int v20; // eax + char v21; // dl + int v22; // ebx + _DWORD *v23; // eax + unsigned int v24; // [esp+4h] [ebp-B4h] + char v25; // [esp+4h] [ebp-B4h] + unsigned int v26; // [esp+4h] [ebp-B4h] + const std::string *v27; // [esp+4h] [ebp-B4h] + unsigned int v28; // [esp+8h] [ebp-B0h] + unsigned int *v29; // [esp+8h] [ebp-B0h] + char *v30; // [esp+8h] [ebp-B0h] + unsigned int v31; // [esp+8h] [ebp-B0h] + unsigned int v32; // [esp+Ch] [ebp-ACh] + char v33; // [esp+10h] [ebp-A8h] + char v34; // [esp+28h] [ebp-90h] + char *v35; // [esp+2Ch] [ebp-8Ch] + std::locale::_Impl *v36; // [esp+30h] [ebp-88h] + int v37; // [esp+34h] [ebp-84h] + size_t v38; // [esp+34h] [ebp-84h] + _BYTE *v39; // [esp+38h] [ebp-80h] + bool v40; // [esp+38h] [ebp-80h] + signed int v41; // [esp+3Ch] [ebp-7Ch] + int v42; // [esp+3Ch] [ebp-7Ch] + int *v43; // [esp+40h] [ebp-78h] + char *v44; // [esp+40h] [ebp-78h] + std::locale::facet *v45; // [esp+4Ch] [ebp-6Ch] + std::locale::facet *v46; // [esp+4Ch] [ebp-6Ch] + _DWORD *v47; // [esp+50h] [ebp-68h] + size_t v48; // [esp+50h] [ebp-68h] + size_t v49; // [esp+50h] [ebp-68h] + __int64 v50; // [esp+54h] [ebp-64h] + int v51; // [esp+5Ch] [ebp-5Ch] + struct _Unwind_Exception *lpuexcpt; // [esp+60h] [ebp-58h] + struct _Unwind_Exception *lpuexcpta; // [esp+60h] [ebp-58h] + char *lpuexcptb; // [esp+60h] [ebp-58h] + char lpuexcptc; // [esp+60h] [ebp-58h] + char v56[5]; // [esp+A3h] [ebp-15h] BYREF + unsigned int v57; // [esp+A8h] [ebp-10h] BYREF + int v58; // [esp+ACh] [ebp-Ch] BYREF + char v59; // [esp+B0h] [ebp-8h] BYREF + + v50 = a1; + v47 = std::use_facet>(a2 + 108); + v45 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v43 = (int *)(*(_DWORD *)(*(_DWORD *)(a2 + 108) + 12) + 4 * (_DWORD)v45); + v51 = *v43; + if ( !*v43 ) + { + v23 = operator new(0x44u); + *v23 = &off_51B094; + v23[1] = 0; + v23[2] = 0; + v23[3] = 0; + *((_WORD *)v23 + 8) = 0; + *((_BYTE *)v23 + 18) = 0; + v23[5] = 0; + v23[6] = 0; + v23[7] = 0; + v23[8] = 0; + v23[9] = 0; + v23[10] = 0; + v23[11] = 0; + v23[12] = 0; + v23[13] = 0; + *((_BYTE *)v23 + 67) = 0; + v36 = (std::locale::_Impl *)v23; + std::__moneypunct_cache::_M_cache((int)v23, a2 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a2 + 108), v36, v45, v28); + v51 = *v43; + } + v4 = *((_DWORD *)*a4 - 3); + lpuexcpt = *a4; + if ( *(_BYTE *)*a4 == *(_BYTE *)(v51 + 56) ) + { + v58 = *(_DWORD *)(v51 + 52); + if ( !v4 ) + goto LABEL_10; + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); + v44 = *(char **)(v51 + 36); + v46 = *(std::locale::facet **)(v51 + 40); + } + else + { + v5 = *(char **)(v51 + 28); + v58 = *(_DWORD *)(v51 + 48); + v44 = v5; + v46 = *(std::locale::facet **)(v51 + 32); + } + v6 = lpuexcpt; + v7 = (unsigned __int8 *)lpuexcpt + v4; + if ( v7 > (unsigned __int8 *)lpuexcpt ) + { + do + { + if ( (*(_BYTE *)(v47[6] + 2 * *(unsigned __int8 *)v6) & 8) == 0 ) + break; + v6 = (struct _Unwind_Exception *)((char *)v6 + 1); + } + while ( v7 != (unsigned __int8 *)v6 ); + v48 = v6 - lpuexcpt; + if ( v6 != lpuexcpt ) + { + v29 = &v57; + *(_DWORD *)&v56[1] = std::string::_S_construct(0, 0); + std::string::reserve((int *)&v56[1], (std::string *)(2 * v48), v24); + v9 = *(_DWORD *)(v51 + 44); + v41 = v48 - v9; + if ( (int)(v48 - v9) > 0 ) + { + v10 = v9 < 0; + v11 = v48 - v9; + if ( v10 ) + v11 = v48; + v41 = v11; + if ( *(_DWORD *)(v51 + 12) ) + { + std::string::_M_replace_aux((char **)&v56[1], 0, *(_DWORD *)(*(_DWORD *)&v56[1] - 12), 2 * v11, 0, v33); + v37 = *(_DWORD *)(v51 + 12); + v35 = *(char **)(v51 + 8); + v34 = *(_BYTE *)(v51 + 18); + v12 = *(_BYTE **)&v56[1]; + if ( *(int *)(*(_DWORD *)&v56[1] - 4) >= 0 ) + { + std::string::_M_leak_hard((char **)&v56[1]); + v12 = *(_BYTE **)&v56[1]; + } + v39 = std::__add_grouping(v12, v34, v35, v37, lpuexcpt, (_BYTE *)lpuexcpt + v41); + v13 = *(_DWORD *)&v56[1]; + if ( *(int *)(*(_DWORD *)&v56[1] - 4) >= 0 ) + { + std::string::_M_leak_hard((char **)&v56[1]); + v13 = *(_DWORD *)&v56[1]; + } + v14 = (size_t)&v39[-v13]; + v15 = *(_DWORD *)(v13 - 12); + if ( v14 > v15 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + v14, + v15); + std::string::_M_mutate((char **)&v56[1], v14, v15 - v14, 0, v32); + v9 = *(_DWORD *)(v51 + 44); + } + else + { + std::string::assign((char **)&v56[1], lpuexcpt, v11, (unsigned int)&v57); + v9 = *(_DWORD *)(v51 + 44); + } + } + if ( v9 > 0 ) + { + std::string::push_back((int *)&v56[1], (std::string *)*(char *)(v51 + 17), v25); + if ( v41 < 0 ) + { + std::string::append((int *)&v56[1], -v41, *(_BYTE *)(v51 + 57), (char)v29); + std::string::append((unsigned int *)&v56[1], lpuexcpt, v48, v31); + } + else + { + std::string::append( + (unsigned int *)&v56[1], + (struct _Unwind_Exception *)((char *)lpuexcpt + v41), + *(_DWORD *)(v51 + 44), + (unsigned int)v29); + } + } + v42 = *(_DWORD *)(a2 + 12) & 0xB0; + lpuexcpta = (std::locale::facet *)((char *)v46 + *(_DWORD *)(*(_DWORD *)&v56[1] - 12)); + if ( (*(_DWORD *)(a2 + 12) & 0x200) != 0 ) + lpuexcpta = (std::locale::facet *)((char *)v46 + *(_DWORD *)(*(_DWORD *)&v56[1] - 12) + *(_DWORD *)(v51 + 24)); + v30 = v56; + v57 = (unsigned int)std::string::_S_construct(0, 0); + std::string::reserve((int *)&v57, (std::string *)(2 * (_DWORD)lpuexcpta), v26); + v49 = *(_DWORD *)(a2 + 8); + v16 = v49 > (unsigned int)lpuexcpta && v42 == 16; + v38 = v49 - (_DWORD)lpuexcpta; + lpuexcptb = (char *)&v58; + v40 = v16; + do + { + switch ( *lpuexcptb ) + { + case 0: + if ( v40 ) + { + v17 = a3; + goto LABEL_33; + } + break; + case 1: + v17 = a3; + if ( v40 ) +LABEL_33: + std::string::append((int *)&v57, v38, v17, (char)v30); + else + std::string::push_back((int *)&v57, (std::string *)a3, (char)v27); + break; + case 2: + if ( (*(_BYTE *)(a2 + 13) & 2) != 0 ) + std::string::append(&v57, *(std::string **)(v51 + 20), *(_DWORD *)(v51 + 24), (unsigned int)v30); + break; + case 3: + if ( v46 ) + std::string::push_back((int *)&v57, (std::string *)*v44, (char)v27); + break; + case 4: + std::string::append((int *)&v57, (std::string *)&v56[1], v27); + break; + default: + break; + } + ++lpuexcptb; + } + while ( lpuexcptb != &v59 ); + if ( (unsigned int)v46 > 1 ) + { + std::string::append(&v57, (std::string *)(v44 + 1), (size_t)v46 - 1, (unsigned int)v30); + v18 = v57; + v19 = *(_DWORD *)(v57 - 12); + if ( v49 > v19 ) + goto LABEL_40; + } + else + { + v18 = v57; + v19 = *(_DWORD *)(v57 - 12); + if ( v49 > v19 ) + { +LABEL_40: + if ( v42 == 32 ) + std::string::append((int *)&v57, v49 - v19, a3, (char)v30); + else + std::string::_M_replace_aux((char **)&v57, 0, 0, v49 - v19, a3, v33); + v18 = v57; + goto LABEL_43; + } + } + v49 = v19; +LABEL_43: + lpuexcptc = BYTE4(a1); + if ( !BYTE4(a1) ) + { + v20 = (*(int (__thiscall **)(_DWORD, unsigned int, size_t))(*(_DWORD *)a1 + 48))(a1, v18, v49); + v21 = 0; + v18 = v57; + if ( v20 != v49 ) + v21 = 1; + lpuexcptc = v21; + } + v22 = HIDWORD(a1); + LOBYTE(v22) = lpuexcptc; + HIDWORD(v50) = v22; + std::string::_Rep::_M_dispose((volatile signed __int32 *)(v18 - 12), (int)v56); + std::string::_Rep::_M_dispose((volatile signed __int32 *)(*(_DWORD *)&v56[1] - 12), (int)&v57); + } + } +LABEL_10: + *(_DWORD *)(a2 + 8) = 0; + return v50; +} +// 496045: variable 'v28' is possibly undefined +// 495B22: variable 'v24' is possibly undefined +// 495B82: variable 'v33' is possibly undefined +// 495C32: variable 'v32' is possibly undefined +// 495CA8: variable 'v26' is possibly undefined +// 495D1E: variable 'v27' is possibly undefined +// 495D53: variable 'v30' is possibly undefined +// 495ED4: variable 'v25' is possibly undefined +// 495EFC: variable 'v29' is possibly undefined +// 4960BC: variable 'v31' is possibly undefined +// 50C490: using guessed type signed __int32 std::moneypunct::id; +// 51B094: using guessed type int (*off_51B094)(); + +//----- (004961C0) -------------------------------------------------------- +int __thiscall std::money_put>::put( + void *this, + __int64 a2, + unsigned __int8 a3, + int a4, + __int16 a5, + char **a6) +{ + __int64 (__stdcall *v6)(__int64, char, int, __int16, char **); // edx + + v6 = *(__int64 (__stdcall **)(__int64, char, int, __int16, char **))(*(_DWORD *)this + 12); + if ( v6 != std::money_put>::do_put ) + return ((int (__stdcall *)(_DWORD, _DWORD, _DWORD, int, _DWORD, char **))v6)( + a2, + HIDWORD(a2), + a3, + a4, + (unsigned __int16)a5, + a6); + if ( a3 ) + return std::money_put>::_M_insert(a2, a4, a5, a6); + return std::money_put>::_M_insert(a2, a4, a5, a6); +} + +//----- (00496260) -------------------------------------------------------- +int __thiscall std::money_put>::put( + void *this, + int a2, + int a3, + unsigned __int8 a4, + int a5, + unsigned __int16 a6) +{ + return (*(int (__thiscall **)(void *, int, int, _DWORD, int, _DWORD))(*(_DWORD *)this + 8))(this, a2, a3, a4, a5, a6); +} + +//----- (00496280) -------------------------------------------------------- +__int64 __stdcall std::money_put>::do_put( + __int64 a1, + char a2, + int a3, + __int16 a4, + char **a5) +{ + if ( a2 ) + return std::money_put>::_M_insert(a1, a3, a4, a5); + else + return std::money_put>::_M_insert(a1, a3, a4, a5); +} + +//----- (004962F0) -------------------------------------------------------- +__int64 __thiscall std::money_put>::do_put( + void *this, + __int64 a2, + int a3, + int a4, + int a5, + long double a6) +{ + void *v6; // esp + void *v7; // esp + int v8; // eax + int v9; // eax + void *v10; // esp + void *v11; // esp + int *v12; // eax + __int64 v13; // rax + int *v14; // ecx + int v15; // eax + int v17; // [esp-44h] [ebp-DCh] + int v18; // [esp-40h] [ebp-D8h] + int v19; // [esp-3Ch] [ebp-D4h] + int v20; // [esp-38h] [ebp-D0h] + int v21; // [esp-34h] [ebp-CCh] + char *v22[23]; // [esp-30h] [ebp-C8h] BYREF + char *v23; // [esp+2Ch] [ebp-6Ch] + int v24; // [esp+30h] [ebp-68h] + int v25; // [esp+34h] [ebp-64h] + void *v26; // [esp+38h] [ebp-60h] + void *v27; // [esp+3Ch] [ebp-5Ch] + __int64 lpuexcpt; // [esp+40h] [ebp-58h] + char **v29; // [esp+48h] [ebp-50h] + char v30[5]; // [esp+87h] [ebp-11h] BYREF + int *v31[2]; // [esp+8Ch] [ebp-Ch] BYREF + + v26 = this; + v25 = a3; + v24 = a5; + std::locale::locale( + (volatile signed __int32 **)&v30[1], + (volatile signed __int32 **)(a4 + 108), + (const std::locale *)v22[13]); + v27 = std::use_facet>((int)&v30[1]); + v6 = alloca(80); + v7 = alloca(80); + LODWORD(lpuexcpt) = v22; + v29 = v22; + v31[0] = (int *)std::locale::facet::_S_get_c_locale(); + v8 = std::__convert_from_v(v31, (char *)lpuexcpt, 64, "%.*Lf", 0, a6); + LODWORD(lpuexcpt) = v8; + if ( v8 > 63 ) + { + LODWORD(lpuexcpt) = v8 + 1; + v9 = 16 * ((unsigned int)(v8 + 28) >> 4); + v10 = alloca(v9); + v11 = alloca(v9); + v23 = (char *)v22; + v29 = v22; + v31[0] = (int *)std::locale::facet::_S_get_c_locale(); + LODWORD(lpuexcpt) = std::__convert_from_v(v31, v23, lpuexcpt, "%.*Lf", 0, a6); + } + std::wstring::basic_string(v31, lpuexcpt, 0, (int)v30); + v12 = v31[0]; + if ( *(v31[0] - 1) >= 0 ) + { + std::wstring::_M_leak_hard(v31); + v12 = v31[0]; + } + (*(void (__thiscall **)(void *, char **, char *, int *, int, int, int, int, int, char *, char *, char *, char *, char *, char *, char *, char *, char *, char *))(*(_DWORD *)v27 + 44))( + v27, + v29, + (char *)v29 + lpuexcpt, + v12, + v17, + v18, + v19, + v20, + v21, + v22[0], + v22[1], + v22[2], + v22[3], + v22[4], + v22[5], + v22[6], + v22[7], + v22[8], + v22[9]); + if ( (_BYTE)v25 ) + v13 = std::money_put>::_M_insert(a2, a4, v24, (char **)v31); + else + v13 = std::money_put>::_M_insert(a2, a4, v24, (char **)v31); + lpuexcpt = v13; + v14 = v31[0]; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd(v31[0] - 1, 0xFFFFFFFF) > 0 ) + goto LABEL_9; +LABEL_12: + std::wstring::_Rep::_M_destroy(v14 - 3, (int)v30); + goto LABEL_9; + } + v15 = *(v31[0] - 1); + *(v31[0] - 1) = v15 - 1; + if ( v15 <= 0 ) + goto LABEL_12; +LABEL_9: + std::locale::~locale((_DWORD **)&v30[1]); + return lpuexcpt; +} +// 49646D: variable 'v17' is possibly undefined +// 49646D: variable 'v18' is possibly undefined +// 49646D: variable 'v19' is possibly undefined +// 49646D: variable 'v20' is possibly undefined +// 49646D: variable 'v21' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004965C0) -------------------------------------------------------- +__int64 __stdcall std::money_put>::_M_insert( + __int64 a1, + int a2, + __int16 a3, + char **a4) +{ + int v4; // eax + char *v6; // edx + int v7; // eax + bool v8; // sf + unsigned int v9; // eax + unsigned int v10; // ebx + _WORD *v11; // edx + _WORD *v12; // eax + int v13; // edx + int v14; // eax + unsigned int v15; // edx + unsigned int v16; // eax + bool v17; // dl + __int16 v18; // ax + int v19; // ecx + unsigned int v20; // edx + int v21; // eax + char v22; // bl + int v23; // edx + _DWORD *v24; // eax + unsigned int v25; // [esp+8h] [ebp-B0h] + __int16 v26; // [esp+28h] [ebp-90h] + char *v27; // [esp+2Ch] [ebp-8Ch] + std::locale::_Impl *v28; // [esp+30h] [ebp-88h] + int v29; // [esp+34h] [ebp-84h] + unsigned int v30; // [esp+34h] [ebp-84h] + _WORD *v31; // [esp+38h] [ebp-80h] + bool v32; // [esp+38h] [ebp-80h] + int v33; // [esp+3Ch] [ebp-7Ch] + int *v34; // [esp+48h] [ebp-70h] + int v35; // [esp+48h] [ebp-70h] + int v36; // [esp+48h] [ebp-70h] + int v37; // [esp+48h] [ebp-70h] + std::locale::facet *v38; // [esp+4Ch] [ebp-6Ch] + std::locale::facet *v39; // [esp+4Ch] [ebp-6Ch] + void *v40; // [esp+50h] [ebp-68h] + unsigned int v41; // [esp+50h] [ebp-68h] + unsigned int v42; // [esp+50h] [ebp-68h] + __int64 v43; // [esp+54h] [ebp-64h] + int v44; // [esp+5Ch] [ebp-5Ch] + char *lpuexcpt; // [esp+60h] [ebp-58h] + struct _Unwind_Exception *lpuexcpta; // [esp+60h] [ebp-58h] + char *lpuexcptb; // [esp+60h] [ebp-58h] + char lpuexcptc; // [esp+60h] [ebp-58h] + char v49[5]; // [esp+A3h] [ebp-15h] BYREF + int v50; // [esp+A8h] [ebp-10h] BYREF + int v51; // [esp+ACh] [ebp-Ch] BYREF + char v52; // [esp+B0h] [ebp-8h] BYREF + + v43 = a1; + v40 = std::use_facet>(a2 + 108); + v38 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v34 = (int *)(*(_DWORD *)(*(_DWORD *)(a2 + 108) + 12) + 4 * (_DWORD)v38); + v44 = *v34; + if ( !*v34 ) + { + v24 = operator new(0x54u); + v24[1] = 0; + *v24 = &off_51B0A4; + v24[2] = 0; + v24[3] = 0; + *((_BYTE *)v24 + 16) = 0; + *(_DWORD *)((char *)v24 + 18) = 0; + v24[6] = 0; + v24[7] = 0; + v24[8] = 0; + v24[9] = 0; + v24[10] = 0; + v24[11] = 0; + v24[12] = 0; + v24[13] = 0; + v24[14] = 0; + *((_BYTE *)v24 + 82) = 0; + v28 = (std::locale::_Impl *)v24; + std::__moneypunct_cache::_M_cache((int)v24, a2 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a2 + 108), v28, v38, v25); + v44 = *v34; + } + lpuexcpt = *a4; + v4 = *((_DWORD *)*a4 - 3); + if ( *(_WORD *)*a4 == *(_WORD *)(v44 + 60) ) + { + v51 = *(_DWORD *)(v44 + 56); + v33 = *(_DWORD *)(v44 + 40); + v39 = *(std::locale::facet **)(v44 + 44); + v6 = lpuexcpt + 2; + if ( !v4 ) + v6 = lpuexcpt; + lpuexcpt = v6; + } + else + { + v51 = *(_DWORD *)(v44 + 52); + v33 = *(_DWORD *)(v44 + 32); + v39 = *(std::locale::facet **)(v44 + 36); + } + v35 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v40 + 20))(v40, 8) - (_DWORD)lpuexcpt; + v41 = v35 >> 1; + if ( v35 >> 1 ) + { + *(_DWORD *)&v49[1] = std::wstring::_S_construct(0, 0); + std::wstring::reserve((int *)&v49[1], v35); + v7 = *(_DWORD *)(v44 + 48); + v36 = v41 - v7; + if ( (int)(v41 - v7) > 0 ) + { + v8 = v7 < 0; + v9 = v41 - v7; + if ( v8 ) + v9 = v41; + v36 = v9; + v10 = v9; + if ( *(_DWORD *)(v44 + 12) ) + { + std::wstring::_M_replace_aux((int **)&v49[1], 0, *(_DWORD *)(*(_DWORD *)&v49[1] - 12), 2 * v9, 0); + v11 = *(_WORD **)&v49[1]; + v29 = *(_DWORD *)(v44 + 12); + v27 = *(char **)(v44 + 8); + v26 = *(_WORD *)(v44 + 20); + if ( *(int *)(*(_DWORD *)&v49[1] - 4) >= 0 ) + { + std::wstring::_M_leak_hard((int **)&v49[1]); + v11 = *(_WORD **)&v49[1]; + } + v12 = std::__add_grouping(v11, v26, v27, v29, lpuexcpt, &lpuexcpt[2 * v10]); + v13 = *(_DWORD *)&v49[1]; + v31 = v12; + if ( *(int *)(*(_DWORD *)&v49[1] - 4) >= 0 ) + { + std::wstring::_M_leak_hard((int **)&v49[1]); + v13 = *(_DWORD *)&v49[1]; + } + v14 = (int)v31 - v13; + v15 = *(_DWORD *)(v13 - 12); + v16 = v14 >> 1; + if ( v16 > v15 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + v16, + v15); + std::wstring::_M_mutate((int **)&v49[1], v16, v15 - v16, 0); + v7 = *(_DWORD *)(v44 + 48); + } + else + { + std::wstring::assign((int **)&v49[1], lpuexcpt, v9); + v7 = *(_DWORD *)(v44 + 48); + } + } + if ( v7 > 0 ) + { + std::wstring::push_back((int *)&v49[1], *(_WORD *)(v44 + 18)); + if ( v36 < 0 ) + { + std::wstring::append((int *)&v49[1], -v36, *(_WORD *)(v44 + 62)); + std::wstring::append((unsigned int *)&v49[1], lpuexcpt, v41); + } + else + { + std::wstring::append((unsigned int *)&v49[1], &lpuexcpt[2 * v36], *(_DWORD *)(v44 + 48)); + } + } + v37 = *(_DWORD *)(a2 + 12) & 0xB0; + lpuexcpta = (std::locale::facet *)((char *)v39 + *(_DWORD *)(*(_DWORD *)&v49[1] - 12)); + if ( (*(_DWORD *)(a2 + 12) & 0x200) != 0 ) + lpuexcpta = (std::locale::facet *)((char *)v39 + *(_DWORD *)(*(_DWORD *)&v49[1] - 12) + *(_DWORD *)(v44 + 28)); + v50 = (int)std::wstring::_S_construct(0, 0); + std::wstring::reserve(&v50, 2 * (_DWORD)lpuexcpta); + v42 = *(_DWORD *)(a2 + 8); + v17 = v42 > (unsigned int)lpuexcpta && v37 == 16; + v30 = v42 - (_DWORD)lpuexcpta; + lpuexcptb = (char *)&v51; + v32 = v17; + do + { + switch ( *lpuexcptb ) + { + case 0: + if ( v32 ) + { + v18 = a3; + goto LABEL_30; + } + break; + case 1: + v18 = a3; + if ( v32 ) +LABEL_30: + std::wstring::append(&v50, v30, v18); + else + std::wstring::push_back(&v50, a3); + break; + case 2: + if ( (*(_BYTE *)(a2 + 13) & 2) != 0 ) + std::wstring::append((unsigned int *)&v50, *(char **)(v44 + 24), *(_DWORD *)(v44 + 28)); + break; + case 3: + if ( v39 ) + std::wstring::push_back(&v50, *(_WORD *)v33); + break; + case 4: + std::wstring::append(&v50, &v49[1]); + break; + default: + break; + } + ++lpuexcptb; + } + while ( lpuexcptb != &v52 ); + if ( (unsigned int)v39 > 1 ) + { + std::wstring::append((unsigned int *)&v50, (char *)(v33 + 2), (unsigned int)v39 - 1); + v19 = v50; + v20 = *(_DWORD *)(v50 - 12); + if ( v42 > v20 ) + goto LABEL_37; + } + else + { + v19 = v50; + v20 = *(_DWORD *)(v50 - 12); + if ( v42 > v20 ) + { +LABEL_37: + if ( v37 == 32 ) + std::wstring::append(&v50, v42 - v20, a3); + else + std::wstring::_M_replace_aux((int **)&v50, 0, 0, v42 - v20, a3); + v19 = v50; + goto LABEL_40; + } + } + v42 = v20; +LABEL_40: + lpuexcptc = BYTE4(a1); + if ( !BYTE4(a1) ) + { + v21 = (*(int (__thiscall **)(_DWORD, int, unsigned int))(*(_DWORD *)a1 + 48))(a1, v19, v42); + v22 = 0; + v19 = v50; + if ( v21 != v42 ) + v22 = 1; + lpuexcptc = v22; + } + v23 = HIDWORD(a1); + LOBYTE(v23) = lpuexcptc; + HIDWORD(v43) = v23; + std::wstring::_Rep::_M_dispose((volatile signed __int32 *)(v19 - 12), (int)v49); + std::wstring::_Rep::_M_dispose((volatile signed __int32 *)(*(_DWORD *)&v49[1] - 12), (int)&v50); + } + *(_DWORD *)(a2 + 8) = 0; + return v43; +} +// 496C5E: variable 'v25' is possibly undefined +// 50C494: using guessed type signed __int32 std::moneypunct::id; +// 51B0A4: using guessed type int (*off_51B0A4)(); + +//----- (00496DF0) -------------------------------------------------------- +__int64 __stdcall std::money_put>::_M_insert( + __int64 a1, + int a2, + __int16 a3, + char **a4) +{ + int v4; // eax + char *v6; // edx + int v7; // eax + bool v8; // sf + unsigned int v9; // eax + unsigned int v10; // ebx + _WORD *v11; // edx + _WORD *v12; // eax + int v13; // edx + int v14; // eax + unsigned int v15; // edx + unsigned int v16; // eax + bool v17; // dl + __int16 v18; // ax + int v19; // ecx + unsigned int v20; // edx + int v21; // eax + char v22; // bl + int v23; // edx + _DWORD *v24; // eax + unsigned int v25; // [esp+8h] [ebp-B0h] + __int16 v26; // [esp+28h] [ebp-90h] + char *v27; // [esp+2Ch] [ebp-8Ch] + std::locale::_Impl *v28; // [esp+30h] [ebp-88h] + int v29; // [esp+34h] [ebp-84h] + unsigned int v30; // [esp+34h] [ebp-84h] + _WORD *v31; // [esp+38h] [ebp-80h] + bool v32; // [esp+38h] [ebp-80h] + int v33; // [esp+3Ch] [ebp-7Ch] + int *v34; // [esp+48h] [ebp-70h] + int v35; // [esp+48h] [ebp-70h] + int v36; // [esp+48h] [ebp-70h] + int v37; // [esp+48h] [ebp-70h] + std::locale::facet *v38; // [esp+4Ch] [ebp-6Ch] + std::locale::facet *v39; // [esp+4Ch] [ebp-6Ch] + void *v40; // [esp+50h] [ebp-68h] + unsigned int v41; // [esp+50h] [ebp-68h] + unsigned int v42; // [esp+50h] [ebp-68h] + __int64 v43; // [esp+54h] [ebp-64h] + int v44; // [esp+5Ch] [ebp-5Ch] + char *lpuexcpt; // [esp+60h] [ebp-58h] + struct _Unwind_Exception *lpuexcpta; // [esp+60h] [ebp-58h] + char *lpuexcptb; // [esp+60h] [ebp-58h] + char lpuexcptc; // [esp+60h] [ebp-58h] + char v49[5]; // [esp+A3h] [ebp-15h] BYREF + int v50; // [esp+A8h] [ebp-10h] BYREF + int v51; // [esp+ACh] [ebp-Ch] BYREF + char v52; // [esp+B0h] [ebp-8h] BYREF + + v43 = a1; + v40 = std::use_facet>(a2 + 108); + v38 = (std::locale::facet *)std::locale::id::_M_id(&std::moneypunct::id); + v34 = (int *)(*(_DWORD *)(*(_DWORD *)(a2 + 108) + 12) + 4 * (_DWORD)v38); + v44 = *v34; + if ( !*v34 ) + { + v24 = operator new(0x54u); + v24[1] = 0; + *v24 = &off_51B0B4; + v24[2] = 0; + v24[3] = 0; + *((_BYTE *)v24 + 16) = 0; + *(_DWORD *)((char *)v24 + 18) = 0; + v24[6] = 0; + v24[7] = 0; + v24[8] = 0; + v24[9] = 0; + v24[10] = 0; + v24[11] = 0; + v24[12] = 0; + v24[13] = 0; + v24[14] = 0; + *((_BYTE *)v24 + 82) = 0; + v28 = (std::locale::_Impl *)v24; + std::__moneypunct_cache::_M_cache((int)v24, a2 + 108); + std::locale::_Impl::_M_install_cache(*(_DWORD *)(a2 + 108), v28, v38, v25); + v44 = *v34; + } + lpuexcpt = *a4; + v4 = *((_DWORD *)*a4 - 3); + if ( *(_WORD *)*a4 == *(_WORD *)(v44 + 60) ) + { + v51 = *(_DWORD *)(v44 + 56); + v33 = *(_DWORD *)(v44 + 40); + v39 = *(std::locale::facet **)(v44 + 44); + v6 = lpuexcpt + 2; + if ( !v4 ) + v6 = lpuexcpt; + lpuexcpt = v6; + } + else + { + v51 = *(_DWORD *)(v44 + 52); + v33 = *(_DWORD *)(v44 + 32); + v39 = *(std::locale::facet **)(v44 + 36); + } + v35 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v40 + 20))(v40, 8) - (_DWORD)lpuexcpt; + v41 = v35 >> 1; + if ( v35 >> 1 ) + { + *(_DWORD *)&v49[1] = std::wstring::_S_construct(0, 0); + std::wstring::reserve((int *)&v49[1], v35); + v7 = *(_DWORD *)(v44 + 48); + v36 = v41 - v7; + if ( (int)(v41 - v7) > 0 ) + { + v8 = v7 < 0; + v9 = v41 - v7; + if ( v8 ) + v9 = v41; + v36 = v9; + v10 = v9; + if ( *(_DWORD *)(v44 + 12) ) + { + std::wstring::_M_replace_aux((int **)&v49[1], 0, *(_DWORD *)(*(_DWORD *)&v49[1] - 12), 2 * v9, 0); + v11 = *(_WORD **)&v49[1]; + v29 = *(_DWORD *)(v44 + 12); + v27 = *(char **)(v44 + 8); + v26 = *(_WORD *)(v44 + 20); + if ( *(int *)(*(_DWORD *)&v49[1] - 4) >= 0 ) + { + std::wstring::_M_leak_hard((int **)&v49[1]); + v11 = *(_WORD **)&v49[1]; + } + v12 = std::__add_grouping(v11, v26, v27, v29, lpuexcpt, &lpuexcpt[2 * v10]); + v13 = *(_DWORD *)&v49[1]; + v31 = v12; + if ( *(int *)(*(_DWORD *)&v49[1] - 4) >= 0 ) + { + std::wstring::_M_leak_hard((int **)&v49[1]); + v13 = *(_DWORD *)&v49[1]; + } + v14 = (int)v31 - v13; + v15 = *(_DWORD *)(v13 - 12); + v16 = v14 >> 1; + if ( v16 > v15 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + v16, + v15); + std::wstring::_M_mutate((int **)&v49[1], v16, v15 - v16, 0); + v7 = *(_DWORD *)(v44 + 48); + } + else + { + std::wstring::assign((int **)&v49[1], lpuexcpt, v9); + v7 = *(_DWORD *)(v44 + 48); + } + } + if ( v7 > 0 ) + { + std::wstring::push_back((int *)&v49[1], *(_WORD *)(v44 + 18)); + if ( v36 < 0 ) + { + std::wstring::append((int *)&v49[1], -v36, *(_WORD *)(v44 + 62)); + std::wstring::append((unsigned int *)&v49[1], lpuexcpt, v41); + } + else + { + std::wstring::append((unsigned int *)&v49[1], &lpuexcpt[2 * v36], *(_DWORD *)(v44 + 48)); + } + } + v37 = *(_DWORD *)(a2 + 12) & 0xB0; + lpuexcpta = (std::locale::facet *)((char *)v39 + *(_DWORD *)(*(_DWORD *)&v49[1] - 12)); + if ( (*(_DWORD *)(a2 + 12) & 0x200) != 0 ) + lpuexcpta = (std::locale::facet *)((char *)v39 + *(_DWORD *)(*(_DWORD *)&v49[1] - 12) + *(_DWORD *)(v44 + 28)); + v50 = (int)std::wstring::_S_construct(0, 0); + std::wstring::reserve(&v50, 2 * (_DWORD)lpuexcpta); + v42 = *(_DWORD *)(a2 + 8); + v17 = v42 > (unsigned int)lpuexcpta && v37 == 16; + v30 = v42 - (_DWORD)lpuexcpta; + lpuexcptb = (char *)&v51; + v32 = v17; + do + { + switch ( *lpuexcptb ) + { + case 0: + if ( v32 ) + { + v18 = a3; + goto LABEL_30; + } + break; + case 1: + v18 = a3; + if ( v32 ) +LABEL_30: + std::wstring::append(&v50, v30, v18); + else + std::wstring::push_back(&v50, a3); + break; + case 2: + if ( (*(_BYTE *)(a2 + 13) & 2) != 0 ) + std::wstring::append((unsigned int *)&v50, *(char **)(v44 + 24), *(_DWORD *)(v44 + 28)); + break; + case 3: + if ( v39 ) + std::wstring::push_back(&v50, *(_WORD *)v33); + break; + case 4: + std::wstring::append(&v50, &v49[1]); + break; + default: + break; + } + ++lpuexcptb; + } + while ( lpuexcptb != &v52 ); + if ( (unsigned int)v39 > 1 ) + { + std::wstring::append((unsigned int *)&v50, (char *)(v33 + 2), (unsigned int)v39 - 1); + v19 = v50; + v20 = *(_DWORD *)(v50 - 12); + if ( v42 > v20 ) + goto LABEL_37; + } + else + { + v19 = v50; + v20 = *(_DWORD *)(v50 - 12); + if ( v42 > v20 ) + { +LABEL_37: + if ( v37 == 32 ) + std::wstring::append(&v50, v42 - v20, a3); + else + std::wstring::_M_replace_aux((int **)&v50, 0, 0, v42 - v20, a3); + v19 = v50; + goto LABEL_40; + } + } + v42 = v20; +LABEL_40: + lpuexcptc = BYTE4(a1); + if ( !BYTE4(a1) ) + { + v21 = (*(int (__thiscall **)(_DWORD, int, unsigned int))(*(_DWORD *)a1 + 48))(a1, v19, v42); + v22 = 0; + v19 = v50; + if ( v21 != v42 ) + v22 = 1; + lpuexcptc = v22; + } + v23 = HIDWORD(a1); + LOBYTE(v23) = lpuexcptc; + HIDWORD(v43) = v23; + std::wstring::_Rep::_M_dispose((volatile signed __int32 *)(v19 - 12), (int)v49); + std::wstring::_Rep::_M_dispose((volatile signed __int32 *)(*(_DWORD *)&v49[1] - 12), (int)&v50); + } + *(_DWORD *)(a2 + 8) = 0; + return v43; +} +// 49748E: variable 'v25' is possibly undefined +// 50C498: using guessed type signed __int32 std::moneypunct::id; +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (00497620) -------------------------------------------------------- +bool __userpurge std::type_info::__do_catch@( + std::type_info *a1@, + std::type_info *this, + const type_info *a3, + void **a4, + unsigned int a5) +{ + bool result; // al + const char *Str1; // ecx + + result = 1; + if ( a1 != this ) + { + Str1 = (const char *)*((_DWORD *)a1 + 1); + result = 0; + if ( *Str1 != 42 ) + return strcmp(Str1, (const char *)((**((_BYTE **)this + 1) == 42) + *((_DWORD *)this + 1))) == 0; + } + return result; +} + +//----- (00497660) -------------------------------------------------------- +int __stdcall std::type_info::__do_upcast(std::type_info *this, const __cxxabiv1::__class_type_info *a2, void **a3) +{ + return 0; +} + +//----- (00497670) -------------------------------------------------------- +int std::type_info::__is_function_p() +{ + return 0; +} + +//----- (00497680) -------------------------------------------------------- +bool __thiscall std::type_info::operator==(_DWORD *this, int a2) +{ + bool result; // al + const char *Str1; // ecx + + result = 1; + if ( (_DWORD *)a2 != this ) + { + Str1 = (const char *)this[1]; + result = 0; + if ( *Str1 != 42 ) + return strcmp(Str1, (const char *)((**(_BYTE **)(a2 + 4) == 42) + *(_DWORD *)(a2 + 4))) == 0; + } + return result; +} + +//----- (004976C0) -------------------------------------------------------- +int __cdecl std::wstring::_S_compare(int a1, int a2) +{ + return a1 - a2; +} + +//----- (004976D0) -------------------------------------------------------- +int __thiscall std::wstring::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004976E0) -------------------------------------------------------- +int __thiscall std::wstring::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004976F0) -------------------------------------------------------- +int *__fastcall std::wstring::_M_leak_hard(int **a1) +{ + int *result; // eax + + if ( *(*a1 - 1) > 0 ) + std::wstring::_M_mutate(a1, 0, 0, 0); + result = *a1; + *(*a1 - 1) = -1; + return result; +} + +//----- (00497730) -------------------------------------------------------- +_DWORD *__cdecl std::wstring::_S_construct(unsigned int a1, __int16 a2) +{ + _DWORD *v2; // eax + _WORD *v3; // ecx + unsigned int v4; // edx + + v2 = std::wstring::_Rep::_S_create(a1, 0); + if ( a1 ) + { + v3 = v2 + 3; + v4 = a1; + if ( a1 == 1 ) + { + *((_WORD *)v2 + 6) = a2; + } + else + { + do + { + *v3++ = a2; + --v4; + } + while ( v4 ); + } + } + v2[2] = 0; + *v2 = a1; + *((_WORD *)v2 + a1 + 6) = 0; + return v2 + 3; +} + +//----- (004977A0) -------------------------------------------------------- +_DWORD *__cdecl std::wstring::_S_construct<__gnu_cxx::__normal_iterator>(_WORD *Src, int a2) +{ + size_t Size; // esi + int v3; // ebp + int *v4; // eax + int *v5; // ebx + _DWORD *v6; // edx + _DWORD *v8; // [esp+1Ch] [ebp-20h] + + Size = a2 - (_DWORD)Src; + v3 = (a2 - (int)Src) >> 1; + v4 = std::wstring::_Rep::_S_create(v3, 0); + v5 = v4; + v6 = v4 + 3; + if ( v3 == 1 ) + { + *((_WORD *)v4 + 6) = *Src; + } + else if ( v3 ) + { + v8 = v4 + 3; + memcpy(v4 + 3, Src, Size); + v6 = v8; + } + v5[2] = 0; + *v5 = v3; + *(_WORD *)((char *)v5 + Size + 12) = 0; + return v6; +} + +//----- (00497830) -------------------------------------------------------- +_DWORD *__cdecl std::wstring::_S_construct(_WORD *Src, int a2) +{ + size_t Size; // esi + int v3; // ebp + int *v4; // eax + int *v5; // ebx + _DWORD *v6; // edx + _DWORD *v8; // [esp+1Ch] [ebp-20h] + + if ( a2 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a2 - (_DWORD)Src; + v3 = (a2 - (int)Src) >> 1; + v4 = std::wstring::_Rep::_S_create(v3, 0); + v5 = v4; + v6 = v4 + 3; + if ( v3 == 1 ) + { + *((_WORD *)v4 + 6) = *Src; + } + else if ( v3 ) + { + v8 = v4 + 3; + memcpy(v4 + 3, Src, Size); + v6 = v8; + } + v5[2] = 0; + *v5 = v3; + *(_WORD *)((char *)v5 + Size + 12) = 0; + return v6; +} + +//----- (004978D0) -------------------------------------------------------- +_DWORD *__cdecl std::wstring::_S_construct(_WORD *Src, int a2) +{ + size_t Size; // esi + int v3; // ebp + int *v4; // eax + int *v5; // ebx + _DWORD *v6; // edx + _DWORD *v8; // [esp+1Ch] [ebp-20h] + + if ( a2 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a2 - (_DWORD)Src; + v3 = (a2 - (int)Src) >> 1; + v4 = std::wstring::_Rep::_S_create(v3, 0); + v5 = v4; + v6 = v4 + 3; + if ( v3 == 1 ) + { + *((_WORD *)v4 + 6) = *Src; + } + else if ( v3 ) + { + v8 = v4 + 3; + memcpy(v4 + 3, Src, Size); + v6 = v8; + } + v5[2] = 0; + *v5 = v3; + *(_WORD *)((char *)v5 + Size + 12) = 0; + return v6; +} + +//----- (00497970) -------------------------------------------------------- +void *std::wstring::_S_empty_rep() +{ + return &std::wstring::_Rep::_S_empty_rep_storage; +} + +//----- (00497980) -------------------------------------------------------- +int __cdecl std::wstring::_S_copy_chars(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + int v4; // ecx + + result = Size - (_DWORD)Src; + v4 = (int)(Size - (_DWORD)Src) >> 1; + if ( v4 == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( v4 ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004979C0) -------------------------------------------------------- +int __cdecl std::wstring::_S_copy_chars(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + int v4; // ecx + + result = Size - (_DWORD)Src; + v4 = (int)(Size - (_DWORD)Src) >> 1; + if ( v4 == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( v4 ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (00497A00) -------------------------------------------------------- +int __cdecl std::wstring::_S_copy_chars(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + int v4; // ecx + + result = Size - (_DWORD)Src; + v4 = (int)(Size - (_DWORD)Src) >> 1; + if ( v4 == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( v4 ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (00497A40) -------------------------------------------------------- +int __cdecl std::wstring::_S_copy_chars(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + int v4; // ecx + + result = Size - (_DWORD)Src; + v4 = (int)(Size - (_DWORD)Src) >> 1; + if ( v4 == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( v4 ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (00497A80) -------------------------------------------------------- +void __fastcall std::wstring::shrink_to_fit(int *a1) +{ + if ( *(_DWORD *)(*a1 - 12) < *(_DWORD *)(*a1 - 8) ) + std::wstring::reserve(a1, 0); +} + +//----- (00497B10) -------------------------------------------------------- +int **__thiscall std::wstring::_M_replace_aux(int **this, int a2, int a3, unsigned int a4, __int16 a5) +{ + unsigned int v6; // ebx + _WORD *v7; // eax + + v6 = a4; + if ( a4 > a3 + 536870910 - *(*this - 3) ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + std::wstring::_M_mutate(this, a2, a3, a4); + if ( !a4 ) + return this; + v7 = (_WORD *)*this + a2; + if ( a4 != 1 ) + { + do + { + *v7++ = a5; + --v6; + } + while ( v6 ); + return this; + } + *v7 = a5; + return this; +} + +//----- (00497BA0) -------------------------------------------------------- +int **__thiscall std::wstring::_M_replace_safe(int **this, int a2, int a3, _WORD *Src, int a5) +{ + std::wstring::_M_mutate(this, a2, a3, a5); + if ( !a5 ) + return this; + if ( a5 != 1 ) + { + memcpy((char *)*this + 2 * a2, Src, 2 * a5); + return this; + } + *((_WORD *)*this + a2) = *Src; + return this; +} + +//----- (00497C20) -------------------------------------------------------- +_DWORD *__cdecl std::wstring::_S_construct_aux_2(unsigned int a1, __int16 a2) +{ + _DWORD *v2; // eax + _WORD *v3; // ecx + unsigned int v4; // edx + + v2 = std::wstring::_Rep::_S_create(a1, 0); + if ( a1 ) + { + v3 = v2 + 3; + v4 = a1; + if ( a1 == 1 ) + { + *((_WORD *)v2 + 6) = a2; + } + else + { + do + { + *v3++ = a2; + --v4; + } + while ( v4 ); + } + } + v2[2] = 0; + *v2 = a1; + *((_WORD *)v2 + a1 + 6) = 0; + return v2 + 3; +} + +//----- (00497C90) -------------------------------------------------------- +char *__thiscall std::wstring::at(int **this, unsigned int a2) +{ + int *v2; // eax + int *v5; // eax + + v2 = *this; + if ( a2 >= *(*this - 3) ) + std::__throw_out_of_range_fmt( + "basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", + a2, + *(*this - 3)); + if ( *(v2 - 1) < 0 ) + return (char *)v2 + 2 * a2; + if ( *(v2 - 1) > 0 ) + std::wstring::_M_mutate(this, 0, 0, 0); + v5 = *this; + *(v5 - 1) = -1; + return (char *)v5 + 2 * a2; +} + +//----- (00497D10) -------------------------------------------------------- +char *__fastcall std::wstring::end(int **a1) +{ + int *v1; // eax + int *v4; // eax + int v5; // edx + + v1 = *a1; + if ( *(*a1 - 1) < 0 ) + return (char *)v1 + 2 * *(v1 - 3); + if ( *(v1 - 1) > 0 ) + std::wstring::_M_mutate(a1, 0, 0, 0); + v4 = *a1; + v5 = *(*a1 - 3); + *(v4 - 1) = -1; + return (char *)v4 + 2 * v5; +} + +//----- (00497D60) -------------------------------------------------------- +void __thiscall std::wstring::_Rep::_M_destroy(void *Block, int a2) +{ + operator delete(Block); +} + +//----- (00497D80) -------------------------------------------------------- +void __thiscall std::wstring::_Rep::_M_dispose(volatile signed __int32 *Block, int a2) +{ + int v2; // eax + + if ( !_CRT_MT ) + { + v2 = *((_DWORD *)Block + 2); + *((_DWORD *)Block + 2) = v2 - 1; + if ( v2 > 0 ) + return; +LABEL_5: + operator delete((void *)Block); + return; + } + if ( _InterlockedExchangeAdd(Block + 2, 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00497DC0) -------------------------------------------------------- +int __fastcall std::wstring::_Rep::_M_refcopy(int a1) +{ + if ( _CRT_MT ) + _InterlockedAdd((volatile signed __int32 *)(a1 + 8), 1u); + else + ++*(_DWORD *)(a1 + 8); + return a1 + 12; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00497DF0) -------------------------------------------------------- +int __fastcall std::wstring::_Rep::_M_refdata(int a1) +{ + return a1 + 12; +} + +//----- (00497E00) -------------------------------------------------------- +void *std::wstring::_Rep::_S_empty_rep() +{ + return &std::wstring::_Rep::_S_empty_rep_storage; +} + +//----- (00497E10) -------------------------------------------------------- +void __fastcall std::wstring::_Rep::_M_set_leaked(int a1) +{ + *(_DWORD *)(a1 + 8) = -1; +} + +//----- (00497E20) -------------------------------------------------------- +void __fastcall std::wstring::_Rep::_M_set_sharable(int a1) +{ + *(_DWORD *)(a1 + 8) = 0; +} + +//----- (00497E30) -------------------------------------------------------- +int __thiscall std::wstring::_Rep::_M_set_length_and_sharable(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[2] = 0; + *this = a2; + *((_WORD *)this + a2 + 6) = 0; + return result; +} + +//----- (00497E50) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::_Rep::_M_grab(int this, int a2, int a3) +{ + _DWORD *result; // eax + + if ( *(int *)(this + 8) < 0 ) + return std::wstring::_Rep::_M_clone((int *)this, a2, 0); + if ( _CRT_MT ) + { + _InterlockedAdd((volatile signed __int32 *)(this + 8), 1u); + return (_DWORD *)(this + 12); + } + else + { + result = (_DWORD *)(this + 12); + ++*(_DWORD *)(this + 8); + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00497EA0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::_Rep::_M_clone(int *this, int a2, int a3) +{ + _DWORD *v4; // eax + int v5; // edx + _DWORD *v6; // ebx + int v7; // eax + + v4 = std::wstring::_Rep::_S_create(a3 + *this, this[1]); + v5 = 0; + v6 = v4; + v7 = *this; + if ( *this ) + { + if ( v7 == 1 ) + { + *((_WORD *)v6 + 6) = *((_WORD *)this + 6); + v5 = 2; + } + else + { + memcpy(v6 + 3, this + 3, 2 * v7); + v7 = *this; + v5 = 2 * *this; + } + } + *v6 = v7; + v6[2] = 0; + *(_WORD *)((char *)v6 + v5 + 12) = 0; + return v6 + 3; +} + +//----- (00497F20) -------------------------------------------------------- +_DWORD *__cdecl std::wstring::_Rep::_S_create(unsigned int a1, unsigned int a2) +{ + unsigned int v2; // ebx + signed int v3; // eax + unsigned int v4; // ecx + _DWORD *result; // eax + + v2 = a1; + if ( a1 > 0x1FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::_S_create"); + if ( a1 <= a2 ) + { + v3 = 2 * a1 + 14; + } + else + { + if ( a1 < 2 * a2 ) + v2 = 2 * a2; + v3 = 2 * v2 + 14; + v4 = 2 * v2 + 30; + if ( v4 <= 0x1000 || v2 <= a2 ) + { + if ( v3 < 0 ) + std::__throw_bad_alloc(); + } + else + { + v2 += (4096 - (v4 & 0xFFF)) >> 1; + if ( v2 > 0x1FFFFFFE ) + v2 = 536870910; + v3 = 2 * v2 + 14; + } + } + result = operator new(v3); + result[1] = v2; + result[2] = 0; + return result; +} + +//----- (00497FC0) -------------------------------------------------------- +char *__fastcall std::wstring::back(int **a1) +{ + int *v1; // eax + int v2; // esi + int *v5; // eax + + v1 = *a1; + v2 = *(*a1 - 3) - 1; + if ( *(*a1 - 1) < 0 ) + return (char *)v1 + 2 * v2; + if ( *(v1 - 1) > 0 ) + std::wstring::_M_mutate(a1, 0, 0, 0); + v5 = *a1; + *(v5 - 1) = -1; + return (char *)v5 + 2 * v2; +} + +//----- (00498020) -------------------------------------------------------- +int **__thiscall std::wstring::rend(int **this, int **a2) +{ + int *v3; // eax + int *v5; // eax + + v3 = *a2; + if ( *(*a2 - 1) >= 0 ) + { + if ( *(v3 - 1) > 0 ) + std::wstring::_M_mutate(a2, 0, 0, 0); + v5 = *a2; + *(v5 - 1) = -1; + *this = v5; + return this; + } + else + { + *this = v3; + return this; + } +} + +//----- (00498080) -------------------------------------------------------- +int __thiscall std::wstring::swap(int *this, int *a2) +{ + int result; // eax + int v3; // edx + + result = *this; + if ( *(int *)(*this - 4) < 0 ) + *(_DWORD *)(result - 4) = 0; + v3 = *a2; + if ( *(int *)(*a2 - 4) < 0 ) + *(_DWORD *)(v3 - 4) = 0; + *this = v3; + *a2 = result; + return result; +} + +//----- (004980B0) -------------------------------------------------------- +int *__fastcall std::wstring::begin(int **a1) +{ + int *result; // eax + + result = *a1; + if ( *(*a1 - 1) >= 0 ) + { + if ( *(result - 1) > 0 ) + std::wstring::_M_mutate(a1, 0, 0, 0); + result = *a1; + *(*a1 - 1) = -1; + } + return result; +} + +//----- (00498100) -------------------------------------------------------- +int __fastcall std::wstring::clear(int **a1) +{ + return std::wstring::_M_mutate(a1, 0, *(*a1 - 3), 0); +} + +//----- (00498130) -------------------------------------------------------- +char *__thiscall std::wstring::erase(int **this, int a2) +{ + int v3; // esi + int *v4; // eax + + v3 = a2 - (_DWORD)*this; + std::wstring::_M_mutate(this, v3 >> 1, 1, 0); + v4 = *this; + *(v4 - 1) = -1; + return (char *)v4 + v3; +} + +//----- (00498170) -------------------------------------------------------- +char *__thiscall std::wstring::erase(int **this, char *a2, int a3) +{ + char *result; // eax + int v5; // ebx + int *v6; // eax + + result = a2; + if ( (a3 - (int)a2) >> 1 ) + { + v5 = a2 - (char *)*this; + std::wstring::_M_mutate(this, v5 >> 1, (a3 - (int)a2) >> 1, 0); + v6 = *this; + *(v6 - 1) = -1; + return (char *)v6 + v5; + } + return result; +} + +//----- (004981D0) -------------------------------------------------------- +int **__thiscall std::wstring::erase(int **this, unsigned int a2, unsigned int a3) +{ + unsigned int v4; // ecx + int v5; // eax + + v4 = *(*this - 3); + v5 = v4 - a2; + if ( v4 - a2 > a3 ) + v5 = a3; + if ( a2 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + a2, + v4); + std::wstring::_M_mutate(this, a2, v5, 0); + return this; +} + +//----- (00498230) -------------------------------------------------------- +int *__fastcall std::wstring::front(int **a1) +{ + int *result; // eax + + result = *a1; + if ( *(*a1 - 1) >= 0 ) + { + if ( *(result - 1) > 0 ) + std::wstring::_M_mutate(a1, 0, 0, 0); + result = *a1; + *(*a1 - 1) = -1; + } + return result; +} + +//----- (00498280) -------------------------------------------------------- +unsigned int *__thiscall std::wstring::append(unsigned int *this, wchar_t *String) +{ + unsigned int v3; // eax + + v3 = wcslen(String); + return std::wstring::append(this, (char *)String, v3); +} + +//----- (004982B0) -------------------------------------------------------- +unsigned int *__thiscall std::wstring::append(unsigned int *this, char *a2, unsigned int a3) +{ + char *Src; // edi + unsigned int v5; // eax + int v6; // ebp + unsigned int v7; // ebp + _WORD *v8; // edx + char *v10; // edi + bool v11; // cc + + Src = a2; + if ( a3 ) + { + v5 = *this; + v6 = *(_DWORD *)(*this - 12); + if ( a3 > 536870910 - v6 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v7 = a3 + v6; + if ( v7 > *(_DWORD *)(v5 - 8) || (v11 = *(_DWORD *)(v5 - 4) <= 0, v5 = *this, !v11) ) + { + if ( v5 <= (unsigned int)a2 && (unsigned int)a2 <= v5 + 2 * *(_DWORD *)(v5 - 12) ) + { + v10 = &a2[-v5]; + std::wstring::reserve((int *)this, v7); + v5 = *this; + Src = &v10[*this]; + v8 = (_WORD *)(*this + 2 * *(_DWORD *)(*this - 12)); + if ( a3 != 1 ) + goto LABEL_8; + goto LABEL_12; + } + std::wstring::reserve((int *)this, v7); + v5 = *this; + } + v8 = (_WORD *)(v5 + 2 * *(_DWORD *)(v5 - 12)); + if ( a3 != 1 ) + { +LABEL_8: + memcpy(v8, Src, 2 * a3); + v5 = *this; +LABEL_9: + *(_DWORD *)(v5 - 4) = 0; + *(_DWORD *)(v5 - 12) = v7; + *(_WORD *)(v5 + 2 * v7) = 0; + return this; + } +LABEL_12: + *v8 = *(_WORD *)Src; + goto LABEL_9; + } + return this; +} + +//----- (00498390) -------------------------------------------------------- +int *__thiscall std::wstring::append(int *this, _DWORD *a2) +{ + int v3; // esi + unsigned int v4; // edi + int v5; // eax + _WORD *Src; // ecx + _WORD *v7; // edx + + v3 = *(_DWORD *)(*a2 - 12); + if ( v3 ) + { + v4 = v3 + *(_DWORD *)(*this - 12); + if ( v4 > *(_DWORD *)(*this - 8) || *(int *)(*this - 4) > 0 ) + { + std::wstring::reserve(this, v3 + *(_DWORD *)(*this - 12)); + v5 = *this; + Src = (_WORD *)*a2; + v7 = (_WORD *)(*this + 2 * *(_DWORD *)(*this - 12)); + if ( v3 == 1 ) + { +LABEL_9: + *v7 = *Src; + goto LABEL_5; + } + } + else + { + v5 = *this; + Src = (_WORD *)*a2; + v7 = (_WORD *)(*this + 2 * *(_DWORD *)(*this - 12)); + if ( v3 == 1 ) + goto LABEL_9; + } + memcpy(v7, Src, 2 * v3); + v5 = *this; +LABEL_5: + *(_DWORD *)(v5 - 4) = 0; + *(_DWORD *)(v5 - 12) = v4; + *(_WORD *)(v5 + 2 * v4) = 0; + } + return this; +} + +//----- (00498420) -------------------------------------------------------- +int *__thiscall std::wstring::append(int *this, _DWORD *a2, unsigned int a3, unsigned int a4) +{ + unsigned int v4; // ebx + unsigned int v5; // ebx + unsigned int v7; // edx + _WORD *Src; // edi + int v9; // eax + _WORD *v10; // ecx + unsigned int v12; // [esp+1Ch] [ebp-20h] + unsigned int v13; // [esp+1Ch] [ebp-20h] + + v4 = *(_DWORD *)(*a2 - 12); + if ( a3 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::append", + a3, + *(_DWORD *)(*a2 - 12)); + v5 = v4 - a3; + if ( v5 > a4 ) + v5 = a4; + if ( v5 ) + { + v7 = v5 + *(_DWORD *)(*this - 12); + if ( v7 > *(_DWORD *)(*this - 8) || *(int *)(*this - 4) > 0 ) + { + v12 = v5 + *(_DWORD *)(*this - 12); + std::wstring::reserve(this, v12); + v7 = v12; + } + Src = (_WORD *)(*a2 + 2 * a3); + v9 = *this; + v10 = (_WORD *)(*this + 2 * *(_DWORD *)(*this - 12)); + if ( v5 == 1 ) + { + *v10 = *Src; + } + else + { + v13 = v7; + memcpy(v10, Src, 2 * v5); + v9 = *this; + v7 = v13; + } + *(_DWORD *)(v9 - 4) = 0; + *(_DWORD *)(v9 - 12) = v7; + *(_WORD *)(v9 + 2 * v7) = 0; + } + return this; +} + +//----- (00498500) -------------------------------------------------------- +int *__thiscall std::wstring::append(int *this, unsigned int a2, __int16 a3) +{ + unsigned int v4; // ebx + __int16 v5; // dx + int v6; // ecx + int v7; // edi + unsigned int v8; // edi + int v9; // ecx + __int16 *v10; // eax + + v4 = a2; + v5 = a3; + if ( a2 ) + { + v6 = *this; + v7 = *(_DWORD *)(v6 - 12); + if ( a2 > 536870910 - v7 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v8 = a2 + v7; + if ( v8 > *(_DWORD *)(v6 - 8) || *(int *)(v6 - 4) > 0 ) + { + std::wstring::reserve(this, v8); + v5 = a3; + } + v9 = *this; + v10 = (__int16 *)(*this + 2 * *(_DWORD *)(*this - 12)); + if ( a2 == 1 ) + { + *v10 = v5; + *(_DWORD *)(v9 - 4) = 0; + *(_DWORD *)(v9 - 12) = v8; + *(_WORD *)(v9 + 2 * v8) = 0; + } + else + { + do + { + *v10++ = a3; + --v4; + } + while ( v4 ); + *(_DWORD *)(v9 - 4) = 0; + *(_DWORD *)(v9 - 12) = v8; + *(_WORD *)(v9 + 2 * v8) = 0; + } + } + return this; +} + +//----- (004985C0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::assign(_DWORD *this, int *a2) +{ + _DWORD *result; // eax + int v3; // edx + int v4; // ecx + + result = this; + v3 = *this; + if ( *(int *)(*this - 4) < 0 ) + *(_DWORD *)(v3 - 4) = 0; + v4 = *a2; + if ( *(int *)(*a2 - 4) < 0 ) + *(_DWORD *)(v4 - 4) = 0; + *result = v4; + *a2 = v3; + return result; +} + +//----- (00498600) -------------------------------------------------------- +int **__thiscall std::wstring::assign(int **this, wchar_t *String) +{ + unsigned int v3; // eax + + v3 = wcslen(String); + return std::wstring::assign(this, (char *)String, v3); +} + +//----- (00498630) -------------------------------------------------------- +int **__thiscall std::wstring::assign(int **this, char *Src, unsigned int a3) +{ + int *v3; // eax + int v4; // edx + bool v6; // cc + int *v7; // eax + int *v8; // eax + unsigned int v10; // edx + + v3 = *this; + v4 = *(*this - 3); + if ( a3 > 0x1FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::assign"); + if ( v3 <= (int *)Src && (char *)v3 + 2 * v4 >= Src ) + { + v6 = *(v3 - 1) <= 0; + v7 = *this; + if ( !v6 ) + { + v4 = *(v7 - 3); + goto LABEL_6; + } + v10 = (Src - (char *)v7) >> 1; + if ( a3 <= v10 ) + { + if ( a3 != 1 ) + { + if ( a3 ) + { + memcpy(v7, Src, 2 * a3); + v7 = *this; + } + goto LABEL_15; + } + } + else + { + if ( !v10 ) + { +LABEL_15: + *(v7 - 1) = 0; + *(v7 - 3) = a3; + *((_WORD *)v7 + a3) = 0; + return this; + } + if ( a3 != 1 ) + { + if ( a3 ) + { + memmove(v7, Src, 2 * a3); + v7 = *this; + } + goto LABEL_15; + } + } + *(_WORD *)v7 = *(_WORD *)Src; + goto LABEL_15; + } +LABEL_6: + std::wstring::_M_mutate(this, 0, v4, a3); + if ( !a3 ) + return this; + v8 = *this; + if ( a3 != 1 ) + { + memcpy(v8, Src, 2 * a3); + return this; + } + *(_WORD *)v8 = *(_WORD *)Src; + return this; +} + +//----- (00498750) -------------------------------------------------------- +int *__thiscall std::wstring::assign(int *this, _DWORD *a2) +{ + _DWORD *v3; // esi + int v4; // eax + int v5; // edx + char v7[13]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = (_DWORD *)*a2; + if ( *this != *a2 ) + { + if ( (int)*(v3 - 1) < 0 ) + { + v3 = std::wstring::_Rep::_M_clone(v3 - 3, (int)v7, 0); + v4 = *this; + if ( !_CRT_MT ) + goto LABEL_6; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(v3 - 1, 1u); + else + ++*(v3 - 1); + v4 = *this; + if ( !_CRT_MT ) + { +LABEL_6: + v5 = *(_DWORD *)(v4 - 4); + *(_DWORD *)(v4 - 4) = v5 - 1; + if ( v5 > 0 ) + { +LABEL_7: + *this = (int)v3; + return this; + } +LABEL_11: + operator delete((void *)(v4 - 12)); + *this = (int)v3; + return this; + } + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v4 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_7; + goto LABEL_11; + } + return this; +} +// 50B0F0: using guessed type int _CRT_MT; +// 498750: using guessed type char var_D[13]; + +//----- (00498800) -------------------------------------------------------- +int **__thiscall std::wstring::assign(int **this, _DWORD *a2, unsigned int a3, unsigned int a4) +{ + unsigned int v4; // eax + + v4 = *(_DWORD *)(*a2 - 12) - a3; + if ( v4 > a4 ) + v4 = a4; + if ( a3 > *(_DWORD *)(*a2 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::assign", + a3, + *(_DWORD *)(*a2 - 12)); + return std::wstring::assign(this, (char *)(*a2 + 2 * a3), v4); +} + +//----- (00498870) -------------------------------------------------------- +int **__thiscall std::wstring::assign(int **this, unsigned int a2, __int16 a3) +{ + unsigned int v3; // ebx + int *v5; // eax + + v3 = a2; + if ( a2 > 0x1FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + std::wstring::_M_mutate(this, 0, *(*this - 3), a2); + if ( !a2 ) + return this; + v5 = *this; + if ( a2 != 1 ) + { + do + { + *(_WORD *)v5 = a3; + v5 = (int *)((char *)v5 + 2); + --v3; + } + while ( v3 ); + return this; + } + *(_WORD *)v5 = a3; + return this; +} + +//----- (004988F0) -------------------------------------------------------- +int **__thiscall std::wstring::insert(int **this, int a2, int *a3, unsigned int a4) +{ + return std::wstring::insert(this, (a2 - (int)*this) >> 1, a3, a4); +} + +//----- (00498910) -------------------------------------------------------- +int __thiscall std::wstring::insert(int **this, int a2, unsigned int a3, unsigned __int16 a4) +{ + unsigned int v5; // esi + int v6; // ebx + int result; // eax + _WORD *v8; // ebx + + v5 = a3; + v6 = a2 - (_DWORD)*this; + if ( a3 > 536870910 - *(*this - 3) ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + result = std::wstring::_M_mutate(this, v6 >> 1, 0, a3); + if ( a3 ) + { + v8 = (_WORD *)((char *)*this + v6); + if ( a3 == 1 ) + { + result = a4; + *v8 = a4; + } + else + { + do + { + *v8++ = a4; + --v5; + } + while ( v5 ); + } + } + return result; +} + +//----- (004989A0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::insert(int **this, int a2, __int16 a3) +{ + int v3; // ebx + int *v5; // edx + _WORD *result; // eax + + v3 = a2 - (_DWORD)*this; + if ( *(*this - 3) == 536870910 ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + std::wstring::_M_mutate(this, (a2 - (int)*this) >> 1, 0, 1); + v5 = *this; + result = (_WORD *)((char *)*this + v3); + *result = a3; + *(v5 - 1) = -1; + return result; +} + +//----- (00498A00) -------------------------------------------------------- +int **__thiscall std::wstring::insert(int **this, int a2, wchar_t *String) +{ + unsigned int v4; // eax + + v4 = wcslen(String); + return std::wstring::insert(this, a2, (char *)String, v4); +} + +//----- (00498A40) -------------------------------------------------------- +int **__thiscall std::wstring::insert(int **this, unsigned int a2, char *Src, unsigned int a4) +{ + int *v5; // edx + unsigned int v6; // ecx + _WORD *v7; // eax + int v9; // ebp + unsigned int v10; // edx + _WORD *v11; // eax + _WORD *v12; // edi + _WORD *v13; // ecx + size_t Size; // ecx + int v15; // edx + int v16; // esi + _WORD *v17; // ebp + _WORD *v18; // ecx + size_t v19; // [esp+18h] [ebp-24h] + int v20; // [esp+1Ch] [ebp-20h] + + v5 = *this; + v6 = *(*this - 3); + if ( a2 > v6 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::insert", + a2, + v6); + if ( a4 > 536870910 - v6 ) + std::__throw_length_error((std::length_error *)"basic_string::insert"); + if ( v5 <= (int *)Src && Src <= (char *)v5 + 2 * v6 && *(v5 - 1) <= 0 ) + { + v9 = Src - (char *)*this; + std::wstring::_M_mutate(this, a2, 0, a4); + v10 = 2 * a2; + v11 = (_WORD *)((char *)*this + v9); + v12 = (_WORD *)*this + a2; + v13 = &v11[a4]; + if ( v13 > v12 ) + { + if ( v11 < v12 ) + { + Size = v10 - v9; + v15 = (int)(v10 - v9) >> 1; + if ( v15 == 1 ) + { + *v12 = *v11; + } + else if ( v15 ) + { + v20 = v15; + v19 = Size; + memcpy(v12, v11, Size); + v15 = v20; + Size = v19; + } + v16 = a4 - v15; + v17 = &v12[a4]; + v18 = (_WORD *)((char *)v12 + Size); + if ( a4 - v15 == 1 ) + { + *v18 = *v17; + } + else if ( v16 ) + { + memcpy(v18, v17, 2 * v16); + } + } + else if ( a4 == 1 ) + { + *v12 = *v13; + } + else if ( a4 ) + { + memcpy(v12, &v11[a4], 2 * a4); + } + } + else if ( a4 == 1 ) + { + *v12 = *v11; + } + else if ( a4 ) + { + memcpy(v12, v11, 2 * a4); + } + return this; + } + std::wstring::_M_mutate(this, a2, 0, a4); + if ( !a4 ) + return this; + v7 = (_WORD *)*this + a2; + if ( a4 != 1 ) + { + memcpy(v7, Src, 2 * a4); + return this; + } + *v7 = *(_WORD *)Src; + return this; +} + +//----- (00498C20) -------------------------------------------------------- +int **__thiscall std::wstring::insert(int **this, int a2, char **a3) +{ + return std::wstring::insert(this, a2, *a3, *((_DWORD *)*a3 - 3)); +} + +//----- (00498C50) -------------------------------------------------------- +int **__thiscall std::wstring::insert(int **this, int a2, _DWORD *a3, unsigned int a4, unsigned int a5) +{ + unsigned int v5; // eax + + v5 = *(_DWORD *)(*a3 - 12) - a4; + if ( v5 > a5 ) + v5 = a5; + if ( a4 > *(_DWORD *)(*a3 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::insert", + a4, + *(_DWORD *)(*a3 - 12)); + return std::wstring::insert(this, a2, (char *)(*a3 + 2 * a4), v5); +} + +//----- (00498CC0) -------------------------------------------------------- +int **__thiscall std::wstring::insert(int **this, unsigned int a2, unsigned int a3, __int16 a4) +{ + if ( a2 > *(*this - 3) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::insert", + a2, + *(*this - 3)); + return std::wstring::_M_replace_aux(this, a2, 0, a3, a4); +} + +//----- (00498D20) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::rbegin(_DWORD *this, int **a2) +{ + int *v3; // eax + + v3 = *a2; + if ( *(*a2 - 1) >= 0 ) + { + if ( *(v3 - 1) > 0 ) + std::wstring::_M_mutate(a2, 0, 0, 0); + v3 = *a2; + *(*a2 - 1) = -1; + } + *this = (char *)v3 + 2 * *(v3 - 3); + return this; +} + +//----- (00498D90) -------------------------------------------------------- +int *__thiscall std::wstring::resize(int *this, unsigned int a2) +{ + int *result; // eax + unsigned int v3; // edx + + result = (int *)a2; + v3 = *(_DWORD *)(*this - 12); + if ( a2 > 0x1FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::resize"); + if ( a2 > v3 ) + return std::wstring::append(this, a2 - v3, 0); + if ( a2 < v3 ) + return (int *)std::wstring::_M_mutate((int **)this, a2, v3 - a2, 0); + return result; +} + +//----- (00498E00) -------------------------------------------------------- +int *__thiscall std::wstring::resize(int *this, unsigned int a2, __int16 a3) +{ + int *result; // eax + unsigned int v4; // edx + + result = (int *)a2; + v4 = *(_DWORD *)(*this - 12); + if ( a2 > 0x1FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::resize"); + if ( a2 > v4 ) + return std::wstring::append(this, a2 - v4, a3); + if ( a2 < v4 ) + return (int *)std::wstring::_M_mutate((int **)this, a2, v4 - a2, 0); + return result; +} + +//----- (00498E80) -------------------------------------------------------- +int __cdecl std::wstring::_M_copy(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + + result = Size; + if ( Size == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( Size ) + { + return (int)memcpy(a1, Src, 2 * Size); + } + return result; +} + +//----- (00498EC0) -------------------------------------------------------- +int __thiscall std::wstring::_M_data(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (00498ED0) -------------------------------------------------------- +int *__fastcall std::wstring::_M_leak(int **a1) +{ + int *result; // eax + + result = *a1; + if ( *(*a1 - 1) >= 0 ) + { + if ( *(result - 1) > 0 ) + std::wstring::_M_mutate(a1, 0, 0, 0); + result = *a1; + *(*a1 - 1) = -1; + } + return result; +} + +//----- (00498F20) -------------------------------------------------------- +int __cdecl std::wstring::_M_move(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + + result = Size; + if ( Size == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( Size ) + { + return (int)memmove(a1, Src, 2 * Size); + } + return result; +} + +//----- (00498F60) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, _WORD *a4, int a5) +{ + return std::wstring::replace(this, (a2 - (int)*this) >> 1, (a3 - a2) >> 1, a4, (a5 - (int)a4) >> 1); +} + +//----- (00498F90) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, wchar_t *String) +{ + unsigned int v5; // eax + + v5 = wcslen(String); + return std::wstring::replace(this, (a2 - (int)*this) >> 1, (a3 - a2) >> 1, String, v5); +} + +//----- (00498FE0) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, _WORD *a4, int a5) +{ + return std::wstring::replace(this, (a2 - (int)*this) >> 1, (a3 - a2) >> 1, a4, (a5 - (int)a4) >> 1); +} + +//----- (00499010) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, _WORD *a4, unsigned int a5) +{ + return std::wstring::replace(this, (a2 - (int)*this) >> 1, (a3 - a2) >> 1, a4, a5); +} + +//----- (00499030) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, _WORD **a4) +{ + return std::wstring::replace(this, (a2 - (int)*this) >> 1, (a3 - a2) >> 1, *a4, *((_DWORD *)*a4 - 3)); +} + +//----- (00499070) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, _WORD *a4, int a5) +{ + return std::wstring::replace(this, (a2 - (int)*this) >> 1, (a3 - a2) >> 1, a4, (a5 - (int)a4) >> 1); +} + +//----- (004990A0) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, _WORD *a4, int a5) +{ + return std::wstring::replace(this, (a2 - (int)*this) >> 1, (a3 - a2) >> 1, a4, (a5 - (int)a4) >> 1); +} + +//----- (004990D0) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, _WORD *a4, int a5) +{ + return std::wstring::replace(this, (a2 - (int)*this) >> 1, (a3 - a2) >> 1, a4, (2 * a5) >> 1); +} + +//----- (00499100) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, unsigned int a4, __int16 a5) +{ + unsigned int v6; // esi + int v7; // ebx + _WORD *v8; // ebx + + v6 = a4; + v7 = a2 - (_DWORD)*this; + if ( a4 > ((a3 - a2) >> 1) + 536870910 - *(*this - 3) ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + std::wstring::_M_mutate(this, (a2 - (int)*this) >> 1, (a3 - a2) >> 1, a4); + if ( !a4 ) + return this; + v8 = (_WORD *)((char *)*this + v7); + if ( a4 != 1 ) + { + do + { + *v8++ = a5; + --v6; + } + while ( v6 ); + return this; + } + *v8 = a5; + return this; +} + +//----- (004991A0) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, wchar_t *String) +{ + unsigned int v5; // eax + + v5 = wcslen(String); + return std::wstring::replace(this, a2, a3, String, v5); +} + +//----- (004991E0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +int **__thiscall std::wstring::replace(int **this, unsigned int a2, unsigned int a3, _WORD *Src, unsigned int a5) +{ + int *v5; // edx + unsigned int v6; // eax + int v7; // ecx + int *v9; // edx + _WORD *v10; // eax + int v11; // eax + unsigned int Size; // [esp+18h] [ebp-60h] + int v13; // [esp+1Ch] [ebp-5Ch] + _DWORD *v14; // [esp+1Ch] [ebp-5Ch] + unsigned int v15; // [esp+20h] [ebp-58h] + int v16; // [esp+24h] [ebp-54h] + + v5 = *this; + v6 = *(*this - 3); + if ( a2 > v6 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + *(*this - 3)); + v7 = v6 - a2; + if ( v6 - a2 > a3 ) + v7 = a3; + v16 = v7; + if ( v7 - v6 + 536870910 < a5 ) + std::__throw_length_error((std::length_error *)"basic_string::replace"); + if ( v5 > (int *)Src || Src > (_WORD *)v5 + v6 || *(v5 - 1) > 0 ) + { + std::wstring::_M_mutate(this, a2, v7, a5); + if ( a5 ) + { + if ( a5 == 1 ) + *((_WORD *)*this + a2) = *Src; + else + memcpy((char *)*this + 2 * a2, Src, 2 * a5); + } + return this; + } + v9 = *this; + Size = 2 * a5; + v15 = 2 * a2; + if ( &Src[a5] <= (_WORD *)*this + a2 ) + { + v13 = ((char *)Src - (char *)v9) >> 1; +LABEL_15: + std::wstring::_M_mutate(this, a2, v7, a5); + v10 = (_WORD *)((char *)*this + v15); + if ( a5 == 1 ) + { + *v10 = *((_WORD *)*this + v13); + } + else if ( a5 ) + { + memcpy(v10, (char *)*this + 2 * v13, Size); + } + return this; + } + if ( Src >= (_WORD *)v9 + a2 + v7 ) + { + v13 = a5 + (((char *)Src - (char *)v9) >> 1) - v7; + goto LABEL_15; + } + v14 = std::wstring::_S_construct(Src, (int)&Src[a5]); + std::wstring::_M_mutate(this, a2, v16, a5); + if ( a5 ) + { + if ( a5 == 1 ) + *((_WORD *)*this + a2) = *(_WORD *)v14; + else + memcpy((char *)*this + v15, v14, Size); + } + if ( _CRT_MT ) + { + v11 = _InterlockedExchangeAdd(v14 - 1, 0xFFFFFFFF); + } + else + { + v11 = *(v14 - 1); + *(v14 - 1) = v11 - 1; + } + if ( v11 <= 0 ) + operator delete(v14 - 3); + return this; +} +// 4994BA: positive sp value 4 has been found +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004994D0) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, _WORD **a4) +{ + return std::wstring::replace(this, a2, a3, *a4, *((_DWORD *)*a4 - 3)); +} + +//----- (00499510) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, int a2, int a3, _DWORD *a4, unsigned int a5, unsigned int a6) +{ + unsigned int v6; // eax + + v6 = *(_DWORD *)(*a4 - 12) - a5; + if ( v6 > a6 ) + v6 = a6; + if ( a5 > *(_DWORD *)(*a4 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a5, + *(_DWORD *)(*a4 - 12)); + return std::wstring::replace(this, a2, a3, (_WORD *)(*a4 + 2 * a5), v6); +} + +//----- (00499580) -------------------------------------------------------- +int **__thiscall std::wstring::replace(int **this, unsigned int a2, unsigned int a3, unsigned int a4, __int16 a5) +{ + unsigned int v5; // eax + + v5 = *(*this - 3) - a2; + if ( v5 > a3 ) + v5 = a3; + if ( a2 > *(*this - 3) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + *(*this - 3)); + return std::wstring::_M_replace_aux(this, a2, v5, a4, a5); +} + +//----- (004995F0) -------------------------------------------------------- +void __thiscall std::wstring::reserve(int *this, unsigned int a2) +{ + int v3; // ecx + unsigned int v4; // eax + unsigned int v5; // edx + int *v6; // ecx + _DWORD *v7; // esi + int v8; // eax + int v9; // edx + char v10[13]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = *this; + v4 = a2; + if ( a2 == *(_DWORD *)(v3 - 8) ) + { + if ( *(int *)(v3 - 4) <= 0 ) + return; + v3 = *this; + } + v5 = *(_DWORD *)(v3 - 12); + v6 = (int *)(v3 - 12); + if ( a2 < v5 ) + v4 = v5; + v7 = std::wstring::_Rep::_M_clone(v6, (int)v10, v4 - v5); + v8 = *this; + if ( _CRT_MT ) + { + v9 = _InterlockedExchangeAdd((volatile signed __int32 *)(v8 - 4), 0xFFFFFFFF); + } + else + { + v9 = *(_DWORD *)(v8 - 4); + *(_DWORD *)(v8 - 4) = v9 - 1; + } + if ( v9 <= 0 ) + operator delete((void *)(v8 - 12)); + *this = (int)v7; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4995F0: using guessed type char var_D[13]; + +//----- (00499680) -------------------------------------------------------- +int __fastcall std::wstring::pop_back(int **a1) +{ + unsigned int v1; // eax + + v1 = *(*a1 - 3); + if ( v1 - 1 > v1 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + 0xFFFFFFFF, + 0); + return std::wstring::_M_mutate(a1, v1 - 1, 1, 0); +} + +//----- (004996E0) -------------------------------------------------------- +int __cdecl std::wstring::_M_assign(_WORD *a1, int a2, __int16 a3) +{ + int result; // eax + _WORD *v4; // edx + + result = a2; + v4 = a1; + if ( a2 == 1 ) + { + *a1 = a3; + } + else if ( a2 ) + { + do + { + *v4++ = a3; + --result; + } + while ( result ); + } + return result; +} + +//----- (00499720) -------------------------------------------------------- +int __thiscall std::wstring::_M_mutate(int **this, int a2, int a3, int a4) +{ + int *v5; // eax + int v6; // edi + unsigned int v7; // ecx + unsigned int v8; // ebx + int v9; // edi + _DWORD *v10; // eax + _DWORD *v11; // ecx + char *v12; // ebp + int *v13; // eax + _WORD *v14; // ecx + int v15; // edx + int result; // eax + void *v17; // [esp+18h] [ebp-34h] + _WORD *Src; // [esp+18h] [ebp-34h] + _DWORD *v19; // [esp+1Ch] [ebp-30h] + + v5 = *this; + v6 = *(*this - 3); + v7 = *(*this - 2); + v8 = v6 + a4 - a3; + v17 = (void *)(a2 + a3); + v9 = v6 - (a2 + a3); + if ( v8 > v7 ) + { +LABEL_4: + v10 = std::wstring::_Rep::_S_create(v8, v7); + v11 = v10; + if ( a2 ) + { + v13 = *this; + v12 = (char *)(v11 + 3); + if ( a2 == 1 ) + { + *((_WORD *)v11 + 6) = *(_WORD *)v13; + } + else + { + v19 = v11; + memcpy(v12, v13, 2 * a2); + v13 = *this; + v11 = v19; + } + } + else + { + v12 = (char *)(v10 + 3); + v13 = *this; + } + if ( v9 ) + { + Src = (_WORD *)v13 + (_DWORD)v17; + v14 = (_WORD *)v11 + a2 + a4 + 6; + if ( v9 == 1 ) + { + *v14 = *Src; + } + else + { + memcpy(v14, Src, 2 * v9); + v13 = *this; + } + } + if ( _CRT_MT ) + { + v15 = _InterlockedExchangeAdd(v13 - 1, 0xFFFFFFFF); + } + else + { + v15 = *(v13 - 1); + *(v13 - 1) = v15 - 1; + } + if ( v15 <= 0 ) + operator delete(v13 - 3); + *this = (int *)v12; + goto LABEL_14; + } + if ( *(v5 - 1) > 0 ) + { + v7 = *(*this - 2); + goto LABEL_4; + } + v12 = (char *)*this; + if ( v9 && a4 != a3 ) + { + if ( v9 == 1 ) + { + *(_WORD *)&v12[2 * a2 + 2 * a4] = *(_WORD *)&v12[2 * (_DWORD)v17]; + } + else + { + memmove(&v12[2 * a2 + 2 * a4], &v12[2 * (_DWORD)v17], 2 * v9); + v12 = (char *)*this; + } + } +LABEL_14: + result = 0; + *((_DWORD *)v12 - 1) = 0; + *((_DWORD *)v12 - 3) = v8; + *(_WORD *)&v12[2 * v8] = 0; + return result; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004998E0) -------------------------------------------------------- +int __thiscall std::wstring::push_back(int *this, __int16 a2) +{ + int v3; // edx + int v4; // ebx + int result; // eax + + v3 = *(_DWORD *)(*this - 12); + v4 = v3 + 1; + if ( (unsigned int)(v3 + 1) > *(_DWORD *)(*this - 8) || *(int *)(*this - 4) > 0 ) + std::wstring::reserve(this, v3 + 1); + result = *this; + *(_WORD *)(result + 2 * *(_DWORD *)(*this - 12)) = a2; + *(_DWORD *)(result - 4) = 0; + *(_DWORD *)(result - 12) = v4; + *(_WORD *)(result + 2 * v4) = 0; + return result; +} + +//----- (00499930) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2) +{ + char *v2; // eax + _WORD *result; // eax + + *this = *a2; + v2 = (char *)operator new(0xEu); + *((_DWORD *)v2 + 1) = 0; + result = v2 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a2 = result; + return result; +} + +//----- (00499970) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, int a3) +{ + char *v3; // eax + _WORD *result; // eax + + *this = *a2; + v3 = (char *)operator new(0xEu); + *((_DWORD *)v3 + 1) = 0; + result = v3 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a2 = result; + return result; +} + +//----- (004999B0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, wchar_t *String, int a3) +{ + int v3; // eax + _DWORD *result; // eax + + v3 = -2; + if ( String ) + v3 = (int)&String[wcslen(String)]; + result = std::wstring::_S_construct(String, v3); + *this = result; + return result; +} + +//----- (00499A00) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + _DWORD *result; // eax + + result = std::wstring::_S_construct(a2, (int)&a2[a3]); + *this = result; + return result; +} + +//----- (00499A40) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int a2) +{ + char *v3; // eax + _WORD *result; // eax + + v3 = (char *)operator new(0xEu); + *((_DWORD *)v3 + 1) = 0; + result = v3 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *this = result; + return result; +} + +//----- (00499A80) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + char v4[13]; // [esp+1Fh] [ebp-Dh] BYREF + + result = (_DWORD *)*a2; + if ( *(int *)(*a2 - 4) < 0 ) + { + result = std::wstring::_Rep::_M_clone(result - 3, (int)v4, 0); + *this = result; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(result - 1, 1u); + else + ++*(result - 1); + *this = result; + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; +// 499A80: using guessed type char var_D[13]; + +//----- (00499AF0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, int a3) +{ + _DWORD *result; // eax + + result = (_DWORD *)*a2; + if ( *(int *)(*a2 - 4) < 0 ) + { + result = std::wstring::_Rep::_M_clone(result - 3, a3, 0); + *this = result; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(result - 1, 1u); + else + ++*(result - 1); + *this = result; + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (00499B60) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v5; // edx + _DWORD *result; // eax + + v5 = *(_DWORD *)(*a2 - 12); + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + *(_DWORD *)(*a2 - 12)); + result = std::wstring::_S_construct((_WORD *)(*a2 + 2 * a3), *a2 + 2 * v5); + *this = result; + return result; +} + +//----- (00499BC0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, int *a2, unsigned int a3, unsigned int a4) +{ + int v5; // ecx + unsigned int v6; // eax + int v7; // eax + _DWORD *result; // eax + + v5 = *a2; + v6 = *(_DWORD *)(*a2 - 12) - a3; + if ( v6 > a4 ) + v6 = a4; + v7 = v5 + 2 * (a3 + v6); + if ( a3 > *(_DWORD *)(*a2 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + *(_DWORD *)(*a2 - 12)); + result = std::wstring::_S_construct((_WORD *)(v5 + 2 * a3), v7); + *this = result; + return result; +} + +//----- (00499C30) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, int *a2, unsigned int a3, unsigned int a4, int a5) +{ + int v6; // ecx + unsigned int v7; // eax + int v8; // eax + _DWORD *result; // eax + + v6 = *a2; + v7 = *(_DWORD *)(*a2 - 12) - a3; + if ( v7 > a4 ) + v7 = a4; + v8 = v6 + 2 * (a3 + v7); + if ( a3 > *(_DWORD *)(*a2 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + *(_DWORD *)(*a2 - 12)); + result = std::wstring::_S_construct((_WORD *)(v6 + 2 * a3), v8); + *this = result; + return result; +} + +//----- (00499CA0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + _DWORD *result; // eax + + result = std::wstring::_S_construct(a2, (int)&a2[a3]); + *this = result; + return result; +} + +//----- (00499CE0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, unsigned int a2, __int16 a3, int a4) +{ + _DWORD *result; // eax + + result = std::wstring::_S_construct(a2, a3); + *this = result; + return result; +} + +//----- (00499D10) -------------------------------------------------------- +_WORD *__fastcall std::wstring::basic_string(_DWORD *a1) +{ + char *v2; // eax + _WORD *result; // eax + + v2 = (char *)operator new(0xEu); + *((_DWORD *)v2 + 1) = 0; + result = v2 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a1 = result; + return result; +} + +//----- (00499D50) -------------------------------------------------------- +int __thiscall std::wstring::basic_string<__gnu_cxx::__normal_iterator>( + _DWORD *this, + _WORD *Src, + int a3, + int a4) +{ + size_t Size; // esi + int v6; // ebp + _DWORD *v7; // ebx + void *v8; // ecx + int result; // eax + + Size = a3 - (_DWORD)Src; + v6 = (a3 - (int)Src) >> 1; + v7 = std::wstring::_Rep::_S_create(v6, 0); + v8 = v7 + 3; + if ( v6 == 1 ) + { + *((_WORD *)v7 + 6) = *Src; + } + else if ( v6 ) + { + memcpy(v8, Src, Size); + v8 = v7 + 3; + } + result = 0; + v7[2] = 0; + *v7 = v6; + *(_WORD *)((char *)v7 + Size + 12) = 0; + *this = v8; + return result; +} + +//----- (00499DE0) -------------------------------------------------------- +int __thiscall std::wstring::basic_string(_DWORD *this, _WORD *Src, int a3, int a4) +{ + size_t Size; // esi + int v6; // ebp + int *v7; // eax + int *v8; // ebx + _DWORD *v9; // ecx + int result; // eax + _DWORD *v11; // [esp+1Ch] [ebp-20h] + + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a3 - (_DWORD)Src; + v6 = (a3 - (int)Src) >> 1; + v7 = std::wstring::_Rep::_S_create(v6, 0); + v8 = v7; + v9 = v7 + 3; + if ( v6 == 1 ) + { + *((_WORD *)v7 + 6) = *Src; + } + else if ( v6 ) + { + v11 = v7 + 3; + memcpy(v7 + 3, Src, Size); + v9 = v11; + } + result = 0; + v8[2] = 0; + *v8 = v6; + *(_WORD *)((char *)v8 + Size + 12) = 0; + *this = v9; + return result; +} + +//----- (00499E90) -------------------------------------------------------- +int __thiscall std::wstring::basic_string(_DWORD *this, _WORD *Src, int a3, int a4) +{ + size_t Size; // esi + int v6; // ebp + int *v7; // eax + int *v8; // ebx + _DWORD *v9; // ecx + int result; // eax + _DWORD *v11; // [esp+1Ch] [ebp-20h] + + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a3 - (_DWORD)Src; + v6 = (a3 - (int)Src) >> 1; + v7 = std::wstring::_Rep::_S_create(v6, 0); + v8 = v7; + v9 = v7 + 3; + if ( v6 == 1 ) + { + *((_WORD *)v7 + 6) = *Src; + } + else if ( v6 ) + { + v11 = v7 + 3; + memcpy(v7 + 3, Src, Size); + v9 = v11; + } + result = 0; + v8[2] = 0; + *v8 = v6; + *(_WORD *)((char *)v8 + Size + 12) = 0; + *this = v9; + return result; +} + +//----- (00499F40) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2) +{ + char *v2; // eax + _WORD *result; // eax + + *this = *a2; + v2 = (char *)operator new(0xEu); + *((_DWORD *)v2 + 1) = 0; + result = v2 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a2 = result; + return result; +} + +//----- (00499F80) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, int a3) +{ + char *v3; // eax + _WORD *result; // eax + + *this = *a2; + v3 = (char *)operator new(0xEu); + *((_DWORD *)v3 + 1) = 0; + result = v3 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a2 = result; + return result; +} + +//----- (00499FC0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, wchar_t *String, int a3) +{ + int v3; // eax + _DWORD *result; // eax + + v3 = -2; + if ( String ) + v3 = (int)&String[wcslen(String)]; + result = std::wstring::_S_construct(String, v3); + *this = result; + return result; +} + +//----- (0049A010) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + _DWORD *result; // eax + + result = std::wstring::_S_construct(a2, (int)&a2[a3]); + *this = result; + return result; +} + +//----- (0049A050) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int a2) +{ + char *v3; // eax + _WORD *result; // eax + + v3 = (char *)operator new(0xEu); + *((_DWORD *)v3 + 1) = 0; + result = v3 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *this = result; + return result; +} + +//----- (0049A090) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + char v4[13]; // [esp+1Fh] [ebp-Dh] BYREF + + result = (_DWORD *)*a2; + if ( *(int *)(*a2 - 4) < 0 ) + { + result = std::wstring::_Rep::_M_clone(result - 3, (int)v4, 0); + *this = result; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(result - 1, 1u); + else + ++*(result - 1); + *this = result; + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; +// 49A090: using guessed type char var_D[13]; + +//----- (0049A100) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, int a3) +{ + _DWORD *result; // eax + + result = (_DWORD *)*a2; + if ( *(int *)(*a2 - 4) < 0 ) + { + result = std::wstring::_Rep::_M_clone(result - 3, a3, 0); + *this = result; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(result - 1, 1u); + else + ++*(result - 1); + *this = result; + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0049A170) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v5; // edx + _DWORD *result; // eax + + v5 = *(_DWORD *)(*a2 - 12); + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + *(_DWORD *)(*a2 - 12)); + result = std::wstring::_S_construct((_WORD *)(*a2 + 2 * a3), *a2 + 2 * v5); + *this = result; + return result; +} + +//----- (0049A1D0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, int *a2, unsigned int a3, unsigned int a4) +{ + int v5; // ecx + unsigned int v6; // eax + int v7; // eax + _DWORD *result; // eax + + v5 = *a2; + v6 = *(_DWORD *)(*a2 - 12) - a3; + if ( v6 > a4 ) + v6 = a4; + v7 = v5 + 2 * (a3 + v6); + if ( a3 > *(_DWORD *)(*a2 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + *(_DWORD *)(*a2 - 12)); + result = std::wstring::_S_construct((_WORD *)(v5 + 2 * a3), v7); + *this = result; + return result; +} + +//----- (0049A240) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, int *a2, unsigned int a3, unsigned int a4, int a5) +{ + int v6; // ecx + unsigned int v7; // eax + int v8; // eax + _DWORD *result; // eax + + v6 = *a2; + v7 = *(_DWORD *)(*a2 - 12) - a3; + if ( v7 > a4 ) + v7 = a4; + v8 = v6 + 2 * (a3 + v7); + if ( a3 > *(_DWORD *)(*a2 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + *(_DWORD *)(*a2 - 12)); + result = std::wstring::_S_construct((_WORD *)(v6 + 2 * a3), v8); + *this = result; + return result; +} + +//----- (0049A2B0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + _DWORD *result; // eax + + result = std::wstring::_S_construct(a2, (int)&a2[a3]); + *this = result; + return result; +} + +//----- (0049A2F0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, unsigned int a2, __int16 a3, int a4) +{ + _DWORD *result; // eax + + result = std::wstring::_S_construct(a2, a3); + *this = result; + return result; +} + +//----- (0049A320) -------------------------------------------------------- +_WORD *__fastcall std::wstring::basic_string(_DWORD *a1) +{ + char *v2; // eax + _WORD *result; // eax + + v2 = (char *)operator new(0xEu); + *((_DWORD *)v2 + 1) = 0; + result = v2 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a1 = result; + return result; +} + +//----- (0049A360) -------------------------------------------------------- +int __thiscall std::wstring::basic_string<__gnu_cxx::__normal_iterator>( + _DWORD *this, + _WORD *Src, + int a3, + int a4) +{ + size_t Size; // esi + int v6; // ebp + _DWORD *v7; // ebx + void *v8; // ecx + int result; // eax + + Size = a3 - (_DWORD)Src; + v6 = (a3 - (int)Src) >> 1; + v7 = std::wstring::_Rep::_S_create(v6, 0); + v8 = v7 + 3; + if ( v6 == 1 ) + { + *((_WORD *)v7 + 6) = *Src; + } + else if ( v6 ) + { + memcpy(v8, Src, Size); + v8 = v7 + 3; + } + result = 0; + v7[2] = 0; + *v7 = v6; + *(_WORD *)((char *)v7 + Size + 12) = 0; + *this = v8; + return result; +} + +//----- (0049A3F0) -------------------------------------------------------- +int __thiscall std::wstring::basic_string(_DWORD *this, _WORD *Src, int a3, int a4) +{ + size_t Size; // esi + int v6; // ebp + int *v7; // eax + int *v8; // ebx + _DWORD *v9; // ecx + int result; // eax + _DWORD *v11; // [esp+1Ch] [ebp-20h] + + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a3 - (_DWORD)Src; + v6 = (a3 - (int)Src) >> 1; + v7 = std::wstring::_Rep::_S_create(v6, 0); + v8 = v7; + v9 = v7 + 3; + if ( v6 == 1 ) + { + *((_WORD *)v7 + 6) = *Src; + } + else if ( v6 ) + { + v11 = v7 + 3; + memcpy(v7 + 3, Src, Size); + v9 = v11; + } + result = 0; + v8[2] = 0; + *v8 = v6; + *(_WORD *)((char *)v8 + Size + 12) = 0; + *this = v9; + return result; +} + +//----- (0049A4A0) -------------------------------------------------------- +int __thiscall std::wstring::basic_string(_DWORD *this, _WORD *Src, int a3, int a4) +{ + size_t Size; // esi + int v6; // ebp + int *v7; // eax + int *v8; // ebx + _DWORD *v9; // ecx + int result; // eax + _DWORD *v11; // [esp+1Ch] [ebp-20h] + + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a3 - (_DWORD)Src; + v6 = (a3 - (int)Src) >> 1; + v7 = std::wstring::_Rep::_S_create(v6, 0); + v8 = v7; + v9 = v7 + 3; + if ( v6 == 1 ) + { + *((_WORD *)v7 + 6) = *Src; + } + else if ( v6 ) + { + v11 = v7 + 3; + memcpy(v7 + 3, Src, Size); + v9 = v11; + } + result = 0; + v8[2] = 0; + *v8 = v6; + *(_WORD *)((char *)v8 + Size + 12) = 0; + *this = v9; + return result; +} + +//----- (0049A550) -------------------------------------------------------- +void __fastcall std::wstring::~wstring(int *a1) +{ + int v1; // eax + int v2; // edx + + v1 = *a1; + if ( !_CRT_MT ) + { + v2 = *(_DWORD *)(v1 - 4); + *(_DWORD *)(v1 - 4) = v2 - 1; + if ( v2 > 0 ) + return; +LABEL_5: + operator delete((void *)(v1 - 12)); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v1 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0049A590) -------------------------------------------------------- +void __fastcall std::wstring::~wstring(int *a1) +{ + int v1; // eax + int v2; // edx + + v1 = *a1; + if ( !_CRT_MT ) + { + v2 = *(_DWORD *)(v1 - 4); + *(_DWORD *)(v1 - 4) = v2 - 1; + if ( v2 > 0 ) + return; +LABEL_5: + operator delete((void *)(v1 - 12)); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v1 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (0049A5D0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::operator=(_DWORD *this, int *a2) +{ + _DWORD *result; // eax + int v3; // edx + int v4; // ecx + + result = this; + v3 = *this; + if ( *(int *)(*this - 4) < 0 ) + *(_DWORD *)(v3 - 4) = 0; + v4 = *a2; + if ( *(int *)(*a2 - 4) < 0 ) + *(_DWORD *)(v4 - 4) = 0; + *result = v4; + *a2 = v3; + return result; +} + +//----- (0049A610) -------------------------------------------------------- +int **__thiscall std::wstring::operator=(int **this, wchar_t *String) +{ + unsigned int v3; // eax + + v3 = wcslen(String); + return std::wstring::assign(this, (char *)String, v3); +} + +//----- (0049A640) -------------------------------------------------------- +int *__thiscall std::wstring::operator=(int *this, _DWORD *a2) +{ + _DWORD *v3; // esi + int v4; // eax + int v5; // edx + char v7[13]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = (_DWORD *)*a2; + if ( *this != *a2 ) + { + if ( (int)*(v3 - 1) < 0 ) + { + v3 = std::wstring::_Rep::_M_clone(v3 - 3, (int)v7, 0); + v4 = *this; + if ( !_CRT_MT ) + goto LABEL_6; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(v3 - 1, 1u); + else + ++*(v3 - 1); + v4 = *this; + if ( !_CRT_MT ) + { +LABEL_6: + v5 = *(_DWORD *)(v4 - 4); + *(_DWORD *)(v4 - 4) = v5 - 1; + if ( v5 > 0 ) + { +LABEL_7: + *this = (int)v3; + return this; + } +LABEL_11: + operator delete((void *)(v4 - 12)); + *this = (int)v3; + return this; + } + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v4 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_7; + goto LABEL_11; + } + return this; +} +// 50B0F0: using guessed type int _CRT_MT; +// 49A640: using guessed type char var_D[13]; + +//----- (0049A6F0) -------------------------------------------------------- +int **__thiscall std::wstring::operator=(int **this, char *a2, int a3) +{ + std::wstring::assign(this, a2, a3); + return this; +} + +//----- (0049A720) -------------------------------------------------------- +int **__thiscall std::wstring::operator=(int **this, __int16 a2) +{ + std::wstring::_M_mutate(this, 0, *(*this - 3), 1); + *(_WORD *)*this = a2; + return this; +} + +//----- (0049A760) -------------------------------------------------------- +char *__thiscall std::wstring::operator[](int **this, int a2) +{ + int *v2; // eax + int *v5; // eax + + v2 = *this; + if ( *(*this - 1) < 0 ) + return (char *)v2 + 2 * a2; + if ( *(v2 - 1) > 0 ) + std::wstring::_M_mutate(this, 0, 0, 0); + v5 = *this; + *(v5 - 1) = -1; + return (char *)v5 + 2 * a2; +} + +//----- (0049A7C0) -------------------------------------------------------- +unsigned int *__thiscall std::wstring::operator+=(unsigned int *this, wchar_t *String) +{ + unsigned int v3; // eax + + v3 = wcslen(String); + return std::wstring::append(this, (char *)String, v3); +} + +//----- (0049A810) -------------------------------------------------------- +int *__thiscall std::wstring::operator+=(int *this, __int16 a2) +{ + int v3; // edx + int v4; // esi + int v5; // eax + + v3 = *(_DWORD *)(*this - 12); + v4 = v3 + 1; + if ( (unsigned int)(v3 + 1) > *(_DWORD *)(*this - 8) || *(int *)(*this - 4) > 0 ) + std::wstring::reserve(this, v3 + 1); + v5 = *this; + *(_WORD *)(v5 + 2 * *(_DWORD *)(*this - 12)) = a2; + *(_DWORD *)(v5 - 4) = 0; + *(_DWORD *)(v5 - 12) = v4; + *(_WORD *)(v5 + 2 * v4) = 0; + return this; +} + +//----- (0049A870) -------------------------------------------------------- +void __userpurge std::iostream::swap(_DWORD *a1@, std::iostream *this, std::iostream *a3) +{ + std::ios_base **v4; // esi + std::ios_base *v5; // ebx + std::ios_base *v6; // edx + char v7; // cl + char v8; // cl + int v9; // edx + std::ios_base *v10; // [esp+4h] [ebp-68h] + + v4 = (std::ios_base **)((char *)a1 + *(_DWORD *)(*a1 - 12)); + v5 = (std::iostream *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + std::ios_base::_M_swap(v4, v5, v10); + std::ios::_M_cache_locale(v4, (int)(v4 + 27)); + std::ios::_M_cache_locale(v5, (int)v5 + 108); + v6 = v4[28]; + v4[28] = (std::ios_base *)*((_DWORD *)v5 + 28); + *((_DWORD *)v5 + 28) = v6; + v7 = *((_BYTE *)v4 + 116); + *((_BYTE *)v4 + 116) = *((_BYTE *)v5 + 116); + LOBYTE(v6) = *((_BYTE *)v5 + 117); + *((_BYTE *)v5 + 116) = v7; + v8 = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 117) = (_BYTE)v6; + v9 = a1[1]; + *((_BYTE *)v5 + 117) = v8; + a1[1] = *((_DWORD *)this + 1); + *((_DWORD *)this + 1) = v9; +} +// 49A8AD: variable 'v10' is possibly undefined + +//----- (0049A930) -------------------------------------------------------- +void __thiscall std::iostream::iostream(_DWORD *this, int *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // ecx + int v5; // eax + std::ios_base *v6; // [esp+4h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v8; // [esp+14h] [ebp-44h] + + v8 = this + 3; + std::ios_base::ios_base(this + 3); + *((_WORD *)this + 64) = 0; + v2 = a2[1]; + *this = &unk_515900; + this[1] = v2; + this[31] = 0; + v3 = *a2; + this[33] = 0; + this[34] = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[3] = &unk_515914; + this[35] = 0; + this[36] = 0; + lpuexcpt = v4; + std::ios_base::_M_move((int)v8, v4, v6); + std::ios::_M_cache_locale(v8, (int)(this + 30)); + this[33] = 0; + v5 = *((_DWORD *)lpuexcpt + 28); + *((_DWORD *)lpuexcpt + 28) = 0; + this[31] = v5; + *((_WORD *)this + 64) = *((_WORD *)lpuexcpt + 58); + a2[1] = 0; + *this = &off_51A7B4; + this[3] = off_51A7DC; + this[2] = off_51A7C8; +} +// 49A9D2: variable 'v6' is possibly undefined +// 51A7B4: using guessed type void (__cdecl *off_51A7B4)(std::iostream *__hidden this); +// 51A7C8: using guessed type void (__cdecl *off_51A7C8[2])(std::iostream *__hidden this); +// 51A7DC: using guessed type void (__cdecl *off_51A7DC[2])(std::iostream *__hidden this); + +//----- (0049AA80) -------------------------------------------------------- +void __thiscall std::iostream::iostream(_DWORD *this, int a2) +{ + _DWORD *v2; // [esp+14h] [ebp-44h] + + v2 = this + 3; + std::ios_base::ios_base(this + 3); + this[31] = 0; + *((_WORD *)this + 64) = 0; + this[33] = 0; + this[34] = 0; + this[35] = 0; + this[36] = 0; + *this = &unk_515900; + this[3] = &unk_515914; + this[1] = 0; + std::ios::init((int)v2, a2); + this[2] = &unk_515928; + this[3] = &unk_51593C; + std::ios::init((int)v2, a2); + *this = &off_51A7B4; + this[3] = off_51A7DC; + this[2] = off_51A7C8; +} +// 51A7B4: using guessed type void (__cdecl *off_51A7B4)(std::iostream *__hidden this); +// 51A7C8: using guessed type void (__cdecl *off_51A7C8[2])(std::iostream *__hidden this); +// 51A7DC: using guessed type void (__cdecl *off_51A7DC[2])(std::iostream *__hidden this); + +//----- (0049ABC0) -------------------------------------------------------- +void __fastcall std::iostream::iostream(int a1) +{ + int v1; // [esp+14h] [ebp-44h] + + v1 = a1 + 12; + std::ios_base::ios_base((_DWORD *)(a1 + 12)); + *(_DWORD *)(a1 + 124) = 0; + *(_WORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + *(_DWORD *)(a1 + 136) = 0; + *(_DWORD *)(a1 + 140) = 0; + *(_DWORD *)(a1 + 144) = 0; + *(_DWORD *)a1 = &unk_515900; + *(_DWORD *)(a1 + 12) = &unk_515914; + *(_DWORD *)(a1 + 4) = 0; + std::ios::init(v1, 0); + *(_DWORD *)(a1 + 8) = &unk_515928; + *(_DWORD *)(a1 + 12) = &unk_51593C; + std::ios::init(v1, 0); + *(_DWORD *)a1 = &off_51A7B4; + *(_DWORD *)(a1 + 12) = off_51A7DC; + *(_DWORD *)(a1 + 8) = off_51A7C8; +} +// 51A7B4: using guessed type void (__cdecl *off_51A7B4)(std::iostream *__hidden this); +// 51A7C8: using guessed type void (__cdecl *off_51A7C8[2])(std::iostream *__hidden this); +// 51A7DC: using guessed type void (__cdecl *off_51A7DC[2])(std::iostream *__hidden this); + +//----- (0049AD00) -------------------------------------------------------- +int __thiscall std::iostream::iostream(int *this, int *a2, _DWORD *a3) +{ + int v4; // eax + char *v5; // edi + int v6; // edx + __int16 v7; // ax + int v8; // eax + int v9; // edx + int v10; // eax + int v11; // edx + int result; // eax + std::ios_base *v13; // [esp+4h] [ebp-38h] + std::ios_base *v14; // [esp+1Ch] [ebp-20h] + + v4 = a2[1]; + *this = v4; + *(int *)((char *)this + *(_DWORD *)(v4 - 12)) = a2[2]; + this[1] = a3[1]; + v5 = (char *)this + *(_DWORD *)(v4 - 12); + v14 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v5, v14, v13); + std::ios::_M_cache_locale(v5, (int)(v5 + 108)); + *((_DWORD *)v5 + 30) = 0; + v6 = *((_DWORD *)v14 + 28); + *((_DWORD *)v14 + 28) = 0; + v7 = *((_WORD *)v14 + 58); + *((_DWORD *)v5 + 28) = v6; + *((_WORD *)v5 + 58) = v7; + v8 = a2[3]; + a3[1] = 0; + v9 = a2[4]; + this[2] = v8; + *(int *)((char *)this + *(_DWORD *)(v8 - 12) + 8) = v9; + v10 = *a2; + v11 = a2[5]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + result = a2[6]; + this[2] = result; + return result; +} +// 49AD3B: variable 'v13' is possibly undefined + +//----- (0049ADB0) -------------------------------------------------------- +void __thiscall std::iostream::iostream(int *this, int *a2, int a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + _DWORD *v8; // ecx + int v9; // eax + int v10; // edx + + v4 = a2[1]; + v5 = a2[2]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v4 - 12), a3); + v7 = a2[3]; + this[2] = v7; + v8 = (int *)((char *)this + *(_DWORD *)(v7 - 12) + 8); + *v8 = a2[4]; + std::ios::init((int)v8, a3); + v9 = *a2; + v10 = a2[5]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v9 - 12)) = v10; + this[2] = a2[6]; +} + +//----- (0049AEB0) -------------------------------------------------------- +void __thiscall std::iostream::iostream(_DWORD *ecx0, std::iostream *this) +{ + int v3; // eax + int v4; // ecx + int v5; // edx + int v6; // eax + _DWORD *v7; // ecx + int v8; // eax + int v9; // edx + + v3 = *((_DWORD *)this + 1); + v4 = *((_DWORD *)this + 2); + v5 = *(_DWORD *)(v3 - 12); + *ecx0 = v3; + *(_DWORD *)((char *)ecx0 + v5) = v4; + ecx0[1] = 0; + std::ios::init((int)ecx0 + *(_DWORD *)(v3 - 12), 0); + v6 = *((_DWORD *)this + 3); + ecx0[2] = v6; + v7 = (_DWORD *)((char *)ecx0 + *(_DWORD *)(v6 - 12) + 8); + *v7 = *((_DWORD *)this + 4); + std::ios::init((int)v7, 0); + v8 = *(_DWORD *)this; + v9 = *((_DWORD *)this + 5); + *ecx0 = *(_DWORD *)this; + *(_DWORD *)((char *)ecx0 + *(_DWORD *)(v8 - 12)) = v9; + ecx0[2] = *((_DWORD *)this + 6); +} + +//----- (0049AFB0) -------------------------------------------------------- +void __fastcall std::iostream::~iostream(_DWORD *a1) +{ + _DWORD *v2; // ecx + + v2 = a1 + 3; + *(v2 - 1) = &unk_515928; + *(v2 - 3) = &unk_515900; + *(v2 - 2) = 0; + *v2 = &off_51B7D0; + std::ios_base::~ios_base((int)v2); + operator delete(a1); +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (0049AFF0) -------------------------------------------------------- +void __fastcall std::iostream::~iostream(int a1) +{ + _DWORD *v1; // ecx + + *(_DWORD *)(a1 + 8) = &unk_515928; + v1 = (_DWORD *)(a1 + 12); + *(v1 - 3) = &unk_515900; + *(v1 - 2) = 0; + *v1 = &off_51B7D0; + std::ios_base::~ios_base((int)v1); +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (0049B020) -------------------------------------------------------- +void __thiscall std::iostream::~iostream(_DWORD *ecx0, std::iostream *this) +{ + int v2; // edx + int v3; // edx + int v4; // edx + + v2 = *(_DWORD *)this; + *ecx0 = *(_DWORD *)this; + *(_DWORD *)((char *)ecx0 + *(_DWORD *)(v2 - 12)) = *((_DWORD *)this + 5); + ecx0[2] = *((_DWORD *)this + 6); + v3 = *((_DWORD *)this + 3); + ecx0[2] = v3; + *(_DWORD *)((char *)ecx0 + *(_DWORD *)(v3 - 12) + 8) = *((_DWORD *)this + 4); + v4 = *((_DWORD *)this + 1); + *ecx0 = v4; + *(_DWORD *)((char *)ecx0 + *(_DWORD *)(v4 - 12)) = *((_DWORD *)this + 2); + ecx0[1] = 0; +} + +//----- (0049B070) -------------------------------------------------------- +_DWORD *__thiscall std::iostream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // edx + char v6; // cl + char v7; // cl + int v8; // edx + std::ios_base *v10; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v10); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + v8 = this[1]; + *((_BYTE *)v4 + 117) = v7; + this[1] = a2[1]; + a2[1] = v8; + return this; +} +// 49B0AD: variable 'v10' is possibly undefined + +//----- (0049B130) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 48))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49B17A: variable 'v5' is possibly undefined +// 49B130: using guessed type int var_1C[7]; + +//----- (0049B2F0) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 8))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49B33A: variable 'v5' is possibly undefined +// 49B2F0: using guessed type int var_1C[7]; + +//----- (0049B4B0) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 40))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49B4FA: variable 'v5' is possibly undefined +// 49B4B0: using guessed type int var_1C[7]; + +//----- (0049B670) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 44))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49B6BA: variable 'v5' is possibly undefined +// 49B670: using guessed type int var_1C[7]; + +//----- (0049B830) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 36))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49B87A: variable 'v5' is possibly undefined +// 49B830: using guessed type int var_1C[7]; + +//----- (0049B9F0) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 20))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49BA3A: variable 'v5' is possibly undefined +// 49B9F0: using guessed type int var_1C[7]; + +//----- (0049BBB0) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 12))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49BBFA: variable 'v5' is possibly undefined +// 49BBB0: using guessed type int var_1C[7]; + +//----- (0049BD70) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 24))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49BDBA: variable 'v5' is possibly undefined +// 49BD70: using guessed type int var_1C[7]; + +//----- (0049BF30) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 16))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49BF7A: variable 'v5' is possibly undefined +// 49BF30: using guessed type int var_1C[7]; + +//----- (0049C0F0) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 28))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49C13A: variable 'v5' is possibly undefined +// 49C0F0: using guessed type int var_1C[7]; + +//----- (0049C2B0) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::_M_extract(std::istream::sentry *this, int a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+6Bh] [ebp-1Dh] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8[0] = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 32))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + v8, + a2); + if ( v8[0] ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8[0]); + } + return this; +} +// 49C2FA: variable 'v5' is possibly undefined +// 49C2B0: using guessed type int var_1C[7]; + +//----- (0049C470) -------------------------------------------------------- +std::istream::sentry *__userpurge std::istream::get@( + std::istream::sentry *a1@, + std::istream *this, + char *a3, + int a4) +{ + int v4; // eax + _BYTE *v5; // esi + unsigned __int8 v7; // al + int (__stdcall *v9)(unsigned __int8); // edx + char v10; // [esp+Ch] [ebp-10h] + + v4 = *(_DWORD *)(*(_DWORD *)a1 - 12); + v5 = *(_BYTE **)((char *)a1 + v4 + 124); + if ( !v5 ) + std::__throw_bad_cast(); + if ( v5[28] ) + { + v7 = v5[39]; + } + else + { + std::ctype::_M_widen_init(*(_DWORD *)((char *)a1 + v4 + 124)); + v9 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v5 + 24); + v7 = 10; + if ( v9 != std::ctype::do_widen ) + v7 = ((int (__thiscall *)(_BYTE *, int))v9)(v5, 10); + } + return std::istream::get(a1, this, a3, v7, v10); +} +// 49C4A3: variable 'v10' is possibly undefined + +//----- (0049C4F0) -------------------------------------------------------- +std::istream::sentry *__userpurge std::istream::get@( + std::istream::sentry *a1@, + std::istream *this, + char *a3, + unsigned __int8 a4, + char a5) +{ + int v6; // edx + unsigned __int8 *v7; // eax + int v8; // eax + unsigned __int8 *v9; // eax + unsigned int v10; // edx + unsigned int v11; // eax + bool v12; // [esp+8h] [ebp-80h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-64h] + char v15[25]; // [esp+6Fh] [ebp-19h] BYREF + + *((_DWORD *)a1 + 1) = 0; + std::istream::sentry::sentry(v15, a1, (std::istream *)1, v12); + if ( !v15[0] ) + { + if ( (int)a3 > 0 ) + *(_BYTE *)this = 0; + goto LABEL_4; + } + lpuexcpt = *(struct _Unwind_Exception **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v7 = (unsigned __int8 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v7 < *((_DWORD *)lpuexcpt + 3) ) + { + v8 = *v7; + if ( (int)a3 <= *((_DWORD *)a1 + 1) + 1 ) + goto LABEL_7; + goto LABEL_13; + } + v8 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + v6 = *((_DWORD *)a1 + 1); + if ( (int)a3 <= v6 + 1 ) + { +LABEL_6: + if ( v8 != -1 ) + goto LABEL_7; + } + else if ( v8 != -1 ) + { +LABEL_13: + if ( a4 != v8 ) + { + while ( 1 ) + { + this = (std::istream *)((char *)this + 1); + *((_BYTE *)this - 1) = v8; + v10 = *((_DWORD *)lpuexcpt + 3); + ++*((_DWORD *)a1 + 1); + v11 = *((_DWORD *)lpuexcpt + 2); + if ( v11 < v10 ) + { + v9 = (unsigned __int8 *)(v11 + 1); + *((_DWORD *)lpuexcpt + 2) = v9; + } + else + { + if ( (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 40))(lpuexcpt) == -1 ) + goto LABEL_21; + v9 = (unsigned __int8 *)*((_DWORD *)lpuexcpt + 2); + v10 = *((_DWORD *)lpuexcpt + 3); + } + if ( (unsigned int)v9 >= v10 ) + { + v8 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + v6 = *((_DWORD *)a1 + 1); + if ( v6 + 1 >= (int)a3 ) + goto LABEL_6; + if ( v8 == -1 ) + { +LABEL_21: + if ( (int)a3 > 0 ) + { + v6 = 2; + *(_BYTE *)this = 0; + if ( *((_DWORD *)a1 + 1) ) + goto LABEL_10; + goto LABEL_23; + } + if ( !*((_DWORD *)a1 + 1) ) + { + v6 = 2; +LABEL_23: + v6 |= 4u; + goto LABEL_10; + } +LABEL_33: + v6 = 2; + goto LABEL_10; + } + } + else + { + v8 = *v9; + v6 = *((_DWORD *)a1 + 1); + if ( v6 + 1 >= (int)a3 ) + break; + } + if ( v8 == a4 ) + { + if ( (int)a3 > 0 ) + { + *(_BYTE *)this = 0; + v6 = *((_DWORD *)a1 + 1); + } + if ( !v6 ) + goto LABEL_23; + return a1; + } + } + } +LABEL_7: + if ( (int)a3 > 0 ) + { + *(_BYTE *)this = 0; + if ( *((_DWORD *)a1 + 1) ) + return a1; + goto LABEL_9; + } +LABEL_4: + if ( *((_DWORD *)a1 + 1) ) + return a1; +LABEL_9: + v6 = 4; + goto LABEL_10; + } + if ( (int)a3 <= 0 ) + { + if ( v6 ) + goto LABEL_33; + } + else + { + *(_BYTE *)this = 0; + if ( *((_DWORD *)a1 + 1) ) + goto LABEL_33; + } + v6 = 6; +LABEL_10: + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | v6); + return a1; +} +// 49C547: variable 'v12' is possibly undefined +// 49C4F0: using guessed type char var_19[25]; + +//----- (0049C850) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::get(std::istream::sentry *this, _DWORD *a2) +{ + int v2; // eax + _BYTE *v3; // esi + unsigned __int8 v5; // al + int (__stdcall *v7)(unsigned __int8); // edx + + v2 = *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *(_BYTE **)((char *)this + v2 + 124); + if ( !v3 ) + std::__throw_bad_cast(); + if ( v3[28] ) + { + v5 = v3[39]; + } + else + { + std::ctype::_M_widen_init(*(_DWORD *)((char *)this + v2 + 124)); + v7 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v3 + 24); + v5 = 10; + if ( v7 != std::ctype::do_widen ) + v5 = ((int (__thiscall *)(_BYTE *, int))v7)(v3, 10); + } + return std::istream::get(this, a2, v5); +} + +//----- (0049C8D0) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::get(std::istream::sentry *this, _DWORD *a2, unsigned __int8 a3) +{ + int v3; // eax + unsigned __int8 *v5; // eax + int v6; // edx + int v7; // eax + unsigned int v8; // edx + unsigned int v9; // eax + unsigned __int8 *v10; // eax + int v11; // edx + _BYTE *v12; // edx + bool v13; // [esp+8h] [ebp-70h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v16[25]; // [esp+5Fh] [ebp-19h] BYREF + + *((_DWORD *)this + 1) = 0; + std::istream::sentry::sentry(v16, this, (std::istream *)1, v13); + if ( v16[0] ) + { + lpuexcpt = *(struct _Unwind_Exception **)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 120); + v5 = (unsigned __int8 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v5 >= *((_DWORD *)lpuexcpt + 3) ) + { + v6 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + v7 = (unsigned __int8)v6; + if ( v6 == -1 ) + { +LABEL_20: + v3 = *((_DWORD *)this + 1) == 0 ? 6 : 2; + goto LABEL_4; + } + } + else + { + v6 = *v5; + v7 = v6; + } + if ( v6 != a3 ) + { + do + { + v12 = (_BYTE *)a2[5]; + if ( (unsigned int)v12 < a2[6] ) + { + *v12 = v7; + ++a2[5]; + } + else if ( (*(int (__thiscall **)(_DWORD *, int))(*a2 + 52))(a2, v7) == -1 ) + { + break; + } + ++*((_DWORD *)this + 1); + v8 = *((_DWORD *)lpuexcpt + 3); + v9 = *((_DWORD *)lpuexcpt + 2); + if ( v9 >= v8 ) + { + if ( (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 40))(lpuexcpt) == -1 ) + goto LABEL_20; + v10 = (unsigned __int8 *)*((_DWORD *)lpuexcpt + 2); + v8 = *((_DWORD *)lpuexcpt + 3); + } + else + { + v10 = (unsigned __int8 *)(v9 + 1); + *((_DWORD *)lpuexcpt + 2) = v10; + } + if ( (unsigned int)v10 >= v8 ) + { + v11 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + v7 = (unsigned __int8)v11; + if ( v11 == -1 ) + goto LABEL_20; + } + else + { + v7 = *v10; + v11 = (unsigned __int8)v7; + } + } + while ( a3 != v11 ); + } + } + if ( !*((_DWORD *)this + 1) ) + { + v3 = 4; +LABEL_4: + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v3); + } + return this; +} +// 49C927: variable 'v13' is possibly undefined +// 49C8D0: using guessed type char var_19[25]; + +//----- (0049CB60) -------------------------------------------------------- +std::istream::sentry *__userpurge std::istream::get@(std::istream::sentry *a1@, std::istream *this, char *a3) +{ + int v3; // eax + _DWORD *v5; // ecx + char *v6; // eax + char v7; // dl + int v8; // eax + bool v9; // [esp+8h] [ebp-70h] + char v11[25]; // [esp+5Fh] [ebp-19h] BYREF + + *((_DWORD *)a1 + 1) = 0; + std::istream::sentry::sentry(v11, a1, (std::istream *)1, v9); + if ( v11[0] ) + { + v5 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v6 = (char *)v5[2]; + if ( (unsigned int)v6 >= v5[3] ) + { + v8 = (*(int (__fastcall **)(_DWORD *))(*v5 + 40))(v5); + if ( v8 == -1 ) + { + v3 = *((_DWORD *)a1 + 1) == 0 ? 6 : 2; + goto LABEL_4; + } + v7 = v8; + } + else + { + v7 = *v6; + v5[2] = v6 + 1; + } + *((_DWORD *)a1 + 1) = 1; + *(_BYTE *)this = v7; + if ( *((_DWORD *)a1 + 1) ) + return a1; +LABEL_3: + v3 = 4; +LABEL_4: + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | v3); + return a1; + } + if ( !*((_DWORD *)a1 + 1) ) + goto LABEL_3; + return a1; +} +// 49CBB1: variable 'v9' is possibly undefined +// 49CB60: using guessed type char var_19[25]; + +//----- (0049CD30) -------------------------------------------------------- +int __fastcall std::istream::get(std::istream::sentry *a1) +{ + _DWORD *v1; // ecx + unsigned __int8 *v2; // eax + struct _Unwind_Exception *v3; // edi + int v5; // eax + bool v6; // [esp+8h] [ebp-70h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v9[25]; // [esp+5Fh] [ebp-19h] BYREF + + *((_DWORD *)a1 + 1) = 0; + std::istream::sentry::sentry(v9, a1, (std::istream *)1, v6); + if ( !v9[0] ) + { + if ( *((_DWORD *)a1 + 1) ) + return -1; + v5 = 4; +LABEL_8: + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | v5); + return -1; + } + v1 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v2 = (unsigned __int8 *)v1[2]; + if ( (unsigned int)v2 >= v1[3] ) + { + lpuexcpt = (struct _Unwind_Exception *)(*(int (__fastcall **)(_DWORD *))(*v1 + 40))(v1); + if ( lpuexcpt != (struct _Unwind_Exception *)-1 ) + goto LABEL_4; + v5 = *((_DWORD *)a1 + 1) == 0 ? 6 : 2; + goto LABEL_8; + } + v3 = (struct _Unwind_Exception *)*v2; + v1[2] = v2 + 1; + lpuexcpt = v3; +LABEL_4: + *((_DWORD *)a1 + 1) = 1; + return (int)lpuexcpt; +} +// 49CD81: variable 'v6' is possibly undefined +// 49CD30: using guessed type char var_19[25]; + +//----- (0049CEF0) -------------------------------------------------------- +struct _Unwind_Exception *__fastcall std::istream::peek(std::istream::sentry *a1) +{ + _DWORD *v1; // ecx + unsigned __int8 *v2; // eax + bool v4; // [esp+8h] [ebp-70h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v7[25]; // [esp+5Fh] [ebp-19h] BYREF + + *((_DWORD *)a1 + 1) = 0; + std::istream::sentry::sentry(v7, a1, (std::istream *)1, v4); + if ( !v7[0] ) + return (struct _Unwind_Exception *)-1; + v1 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v2 = (unsigned __int8 *)v1[2]; + if ( (unsigned int)v2 < v1[3] ) + return (struct _Unwind_Exception *)*v2; + lpuexcpt = (struct _Unwind_Exception *)(*(int (__fastcall **)(_DWORD *))(*v1 + 36))(v1); + if ( lpuexcpt == (struct _Unwind_Exception *)-1 ) + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 2); + return lpuexcpt; +} +// 49CF41: variable 'v4' is possibly undefined +// 49CEF0: using guessed type char var_19[25]; + +//----- (0049D090) -------------------------------------------------------- +std::istream::sentry *__userpurge std::istream::read@( + std::istream::sentry *a1@, + std::istream *this, + char *a3, + int a4) +{ + int v4; // ecx + char *v5; // eax + bool v7; // [esp+8h] [ebp-70h] + char v9[25]; // [esp+5Fh] [ebp-19h] BYREF + + *((_DWORD *)a1 + 1) = 0; + std::istream::sentry::sentry(v9, a1, (std::istream *)1, v7); + if ( v9[0] ) + { + v4 = *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v5 = (char *)(*(int (__thiscall **)(int, std::istream *, char *))(*(_DWORD *)v4 + 32))(v4, this, a3); + *((_DWORD *)a1 + 1) = v5; + if ( a3 != v5 ) + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 6); + } + return a1; +} +// 49D0E1: variable 'v7' is possibly undefined +// 49D090: using guessed type char var_19[25]; + +//----- (0049D220) -------------------------------------------------------- +void __userpurge std::istream::swap(_DWORD *a1@, std::istream *this, std::istream *a3) +{ + std::ios_base **v4; // esi + std::ios_base *v5; // ebx + std::ios_base *v6; // edx + char v7; // cl + char v8; // cl + int v9; // edx + std::ios_base *v10; // [esp+4h] [ebp-68h] + + v4 = (std::ios_base **)((char *)a1 + *(_DWORD *)(*a1 - 12)); + v5 = (std::istream *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + std::ios_base::_M_swap(v4, v5, v10); + std::ios::_M_cache_locale(v4, (int)(v4 + 27)); + std::ios::_M_cache_locale(v5, (int)v5 + 108); + v6 = v4[28]; + v4[28] = (std::ios_base *)*((_DWORD *)v5 + 28); + *((_DWORD *)v5 + 28) = v6; + v7 = *((_BYTE *)v4 + 116); + *((_BYTE *)v4 + 116) = *((_BYTE *)v5 + 116); + LOBYTE(v6) = *((_BYTE *)v5 + 117); + *((_BYTE *)v5 + 116) = v7; + v8 = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 117) = (_BYTE)v6; + v9 = a1[1]; + *((_BYTE *)v5 + 117) = v8; + a1[1] = *((_DWORD *)this + 1); + *((_DWORD *)this + 1) = v9; +} +// 49D25D: variable 'v10' is possibly undefined + +//----- (0049D2E0) -------------------------------------------------------- +int __fastcall std::istream::sync(std::istream::sentry *a1) +{ + int v1; // ecx + bool v3; // [esp+8h] [ebp-70h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v6[25]; // [esp+5Fh] [ebp-19h] BYREF + + std::istream::sentry::sentry(v6, a1, (std::istream *)1, v3); + if ( !v6[0] ) + return -1; + v1 = *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + if ( !v1 ) + return -1; + lpuexcpt = (struct _Unwind_Exception *)(*(int (__fastcall **)(int))(*(_DWORD *)v1 + 24))(v1); + if ( lpuexcpt != (struct _Unwind_Exception *)-1 ) + return 0; + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 1); + return (int)lpuexcpt; +} +// 49D32A: variable 'v3' is possibly undefined +// 49D2E0: using guessed type char var_19[25]; + +//----- (0049D470) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::seekg(std::istream::sentry *this, int a2, int a3, int a4, int a5) +{ + char *v5; // edi + _DWORD *v6; // eax + int v7; // edi + void (__thiscall *v8)(int *, _DWORD *, int, int, int, int, int); // eax + _DWORD *v10; // [esp+0h] [ebp-B8h] + bool v11; // [esp+8h] [ebp-B0h] + char v13; // [esp+7Fh] [ebp-39h] BYREF + int v14[14]; // [esp+80h] [ebp-38h] BYREF + + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((_BYTE *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) & 0xFFFFFFFD); + std::istream::sentry::sentry(&v13, this, (std::istream *)1, v11); + if ( v13 ) + { + v5 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + if ( (v5[20] & 5) == 0 ) + { + v6 = (_DWORD *)*((_DWORD *)v5 + 30); + v7 = *v6; + v14[6] = a4; + v10 = v6; + v8 = *(void (__thiscall **)(int *, _DWORD *, int, int, int, int, int))(v7 + 20); + v14[4] = a2; + v14[5] = a3; + v14[7] = a5; + v8(v14, v10, a2, a3, a4, a5, 8); + if ( (v14[0] & v14[1]) == -1 ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | 4); + } + } + return this; +} +// 49D4FF: variable 'v11' is possibly undefined + +//----- (0049D6B0) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::seekg(std::istream::sentry *this, int a2, int a3, int a4) +{ + char *v4; // edi + bool v6; // [esp+8h] [ebp-90h] + char v8; // [esp+6Fh] [ebp-29h] BYREF + int v9[10]; // [esp+70h] [ebp-28h] BYREF + + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((_BYTE *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) & 0xFFFFFFFD); + std::istream::sentry::sentry(&v8, this, (std::istream *)1, v6); + if ( v8 ) + { + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + if ( (v4[20] & 5) == 0 ) + { + (*(void (__thiscall **)(int *, _DWORD, int, int, int, int))(**((_DWORD **)v4 + 30) + 16))( + v9, + *((_DWORD *)v4 + 30), + a2, + a3, + a4, + 8); + if ( (v9[0] & v9[1]) == -1 ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | 4); + } + } + return this; +} +// 49D724: variable 'v6' is possibly undefined + +//----- (0049D880) -------------------------------------------------------- +_DWORD *__thiscall std::istream::tellg(_DWORD *ecx0, std::istream *this) +{ + char *v2; // esi + bool v4; // [esp+8h] [ebp-90h] + char v6; // [esp+6Fh] [ebp-29h] BYREF + int v7[10]; // [esp+70h] [ebp-28h] BYREF + + *ecx0 = -1; + ecx0[1] = -1; + ecx0[2] = 0; + std::istream::sentry::sentry(&v6, this, (std::istream *)1, v4); + if ( v6 ) + { + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + if ( (v2[20] & 5) == 0 ) + { + (*(void (__thiscall **)(int *, _DWORD, _DWORD, _DWORD, int, int))(**((_DWORD **)v2 + 30) + 16))( + v7, + *((_DWORD *)v2 + 30), + 0, + 0, + 1, + 8); + *ecx0 = v7[0]; + ecx0[1] = v7[1]; + ecx0[2] = v7[2]; + } + } + return ecx0; +} +// 49D8E4: variable 'v4' is possibly undefined + +//----- (0049DA30) -------------------------------------------------------- +std::istream::sentry *__fastcall std::istream::unget(std::istream::sentry *a1) +{ + int v2; // eax + _DWORD *v3; // ecx + _DWORD *v4; // eax + unsigned int v5; // eax + bool v7; // [esp+8h] [ebp-70h] + char v9[25]; // [esp+5Fh] [ebp-19h] BYREF + + v2 = *(_DWORD *)a1; + *((_DWORD *)a1 + 1) = 0; + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(v2 - 12)), + *(_DWORD *)((_BYTE *)a1 + *(_DWORD *)(v2 - 12) + 20) & 0xFFFFFFFD); + std::istream::sentry::sentry(v9, a1, (std::istream *)1, v7); + if ( v9[0] ) + { + v3 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v4 = (_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)); + if ( v3 ) + { + v5 = v3[2]; + if ( v3[1] < v5 ) + { + v3[2] = v5 - 1; + return a1; + } + if ( (*(int (__thiscall **)(_DWORD *, int))(*v3 + 44))(v3, -1) != -1 ) + return a1; + v4 = (_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)); + } + std::ios::clear(v4, v4[5] | 1); + } + return a1; +} +// 49DA9C: variable 'v7' is possibly undefined +// 49DA30: using guessed type char var_19[25]; + +//----- (0049DBE0) -------------------------------------------------------- +std::istream::sentry *__userpurge std::istream::ignore@( + std::istream::sentry *a1@, + std::istream *this, + int a3) +{ + unsigned __int8 *v4; // eax + int v5; // edx + int i; // eax + unsigned int v7; // ebx + unsigned int v8; // edx + int v9; // ecx + unsigned __int8 *v10; // edx + unsigned __int8 *v11; // edx + bool v12; // [esp+8h] [ebp-80h] + _DWORD *v13; // [esp+1Ch] [ebp-6Ch] + char v14; // [esp+23h] [ebp-65h] + char lpuexcpt; // [esp+24h] [ebp-64h] + std::istream::sentry *v16; // [esp+28h] [ebp-60h] + char v17[25]; // [esp+6Fh] [ebp-19h] BYREF + + v16 = a1; + if ( this == (std::istream *)1 ) + return std::istream::ignore(a1); + *((_DWORD *)a1 + 1) = 0; + std::istream::sentry::sentry(v17, a1, (std::istream *)1, v12); + if ( (int)this > 0 ) + { + lpuexcpt = v17[0]; + if ( v17[0] ) + { + v13 = *(_DWORD **)((char *)v16 + *(_DWORD *)(*(_DWORD *)v16 - 12) + 120); + v4 = (unsigned __int8 *)v13[2]; + if ( (unsigned int)v4 >= v13[3] ) + v5 = (*(int (__fastcall **)(_DWORD *))(*v13 + 36))(v13); + else + v5 = *v4; + v14 = 0; + for ( i = *((_DWORD *)v16 + 1); ; i = 0x80000000 ) + { + while ( 2 ) + { + if ( (int)this > i ) + { + while ( 1 ) + { + if ( v5 == -1 ) + goto LABEL_23; + v7 = v13[3]; + v8 = v13[2]; + v9 = (int)this - i; + if ( (int)this - i > (int)(v7 - v8) ) + v9 = v13[3] - v8; + if ( v9 <= 1 ) + break; + v10 = (unsigned __int8 *)(v9 + v8); + i += v9; + v13[2] = v10; + *((_DWORD *)v16 + 1) = i; + if ( v7 <= (unsigned int)v10 ) + goto LABEL_26; + v5 = *v10; + if ( (int)this <= i ) + goto LABEL_16; + } + *((_DWORD *)v16 + 1) = i + 1; + if ( v8 >= v7 ) + { + if ( (*(int (__fastcall **)(_DWORD *))(*v13 + 40))(v13) == -1 ) + { +LABEL_23: + if ( v14 ) + *((_DWORD *)v16 + 1) = 0x7FFFFFFF; + goto LABEL_25; + } + v11 = (unsigned __int8 *)v13[2]; + v7 = v13[3]; + } + else + { + v11 = (unsigned __int8 *)(v8 + 1); + v13[2] = v11; + } + if ( v7 > (unsigned int)v11 ) + { + v5 = *v11; + i = *((_DWORD *)v16 + 1); + continue; + } +LABEL_26: + v5 = (*(int (__fastcall **)(_DWORD *))(*v13 + 36))(v13); + i = *((_DWORD *)v16 + 1); + continue; + } + break; + } +LABEL_16: + if ( this != (std::istream *)0x7FFFFFFF ) + break; + if ( v5 == -1 ) + goto LABEL_23; + *((_DWORD *)v16 + 1) = 0x80000000; + v14 = lpuexcpt; + } + if ( v14 ) + *((_DWORD *)v16 + 1) = 0x7FFFFFFF; + if ( v5 == -1 ) +LABEL_25: + std::ios::clear( + (std::istream::sentry *)((char *)v16 + *(_DWORD *)(*(_DWORD *)v16 - 12)), + *(_DWORD *)((char *)v16 + *(_DWORD *)(*(_DWORD *)v16 - 12) + 20) | 2); + } + } + return v16; +} +// 49DC37: variable 'v12' is possibly undefined +// 49DBE0: using guessed type char var_19[25]; + +//----- (0049DEE0) -------------------------------------------------------- +std::istream::sentry *__userpurge std::istream::ignore@( + std::istream::sentry *a1@, + std::istream *this, + int a3, + int a4) +{ + unsigned __int8 *v5; // eax + int v6; // eax + unsigned __int8 *v7; // ebx + signed int v8; // edi + _BYTE *v9; // eax + _DWORD *v10; // edx + signed int v11; // ecx + unsigned __int8 *v12; // ebx + unsigned int v13; // eax + unsigned __int8 *v14; // eax + int v15; // [esp+4h] [ebp-94h] + bool v16; // [esp+8h] [ebp-90h] + unsigned int v17; // [esp+24h] [ebp-74h] + _DWORD *v18; // [esp+2Ch] [ebp-6Ch] + char v19; // [esp+32h] [ebp-66h] + char v20; // [esp+33h] [ebp-65h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + std::istream::sentry *v22; // [esp+38h] [ebp-60h] + char v23[25]; // [esp+7Fh] [ebp-19h] BYREF + + v22 = a1; + if ( a3 == -1 ) + return std::istream::ignore(a1, this, v15); + *((_DWORD *)a1 + 1) = 0; + std::istream::sentry::sentry(v23, a1, (std::istream *)1, v16); + if ( (int)this > 0 ) + { + v20 = v23[0]; + if ( v23[0] ) + { + v18 = *(_DWORD **)((char *)v22 + *(_DWORD *)(*(_DWORD *)v22 - 12) + 120); + v5 = (unsigned __int8 *)v18[2]; + if ( (unsigned int)v5 >= v18[3] ) + v6 = (*(int (__fastcall **)(_DWORD *))(*v18 + 36))(v18); + else + v6 = *v5; + v19 = 0; +LABEL_9: + for ( lpuexcpt = (struct _Unwind_Exception *)*((_DWORD *)v22 + 1); + (int)this <= (int)lpuexcpt; + lpuexcpt = (struct _Unwind_Exception *)0x80000000 ) + { +LABEL_19: + if ( this != (std::istream *)0x7FFFFFFF ) + { + if ( v19 ) + goto LABEL_25; + goto LABEL_26; + } + if ( v6 == -1 ) + { +LABEL_33: + if ( v19 ) + *((_DWORD *)v22 + 1) = 0x7FFFFFFF; + goto LABEL_35; + } + if ( v6 == a3 ) + { + if ( !v19 ) + { +LABEL_29: + if ( lpuexcpt != (struct _Unwind_Exception *)0x7FFFFFFF ) +LABEL_30: + *((_DWORD *)v22 + 1) = (char *)lpuexcpt + 1; + v13 = v18[2]; + if ( v13 >= v18[3] ) + (*(void (__fastcall **)(_DWORD *))(*v18 + 40))(v18); + else + v18[2] = v13 + 1; + return v22; + } +LABEL_25: + *((_DWORD *)v22 + 1) = 0x7FFFFFFF; +LABEL_26: + if ( v6 == -1 ) + { +LABEL_35: + std::ios::clear( + (std::istream::sentry *)((char *)v22 + *(_DWORD *)(*(_DWORD *)v22 - 12)), + *(_DWORD *)((char *)v22 + *(_DWORD *)(*(_DWORD *)v22 - 12) + 20) | 2); + return v22; + } + if ( v6 != a3 ) + return v22; +LABEL_28: + lpuexcpt = (struct _Unwind_Exception *)*((_DWORD *)v22 + 1); + goto LABEL_29; + } + *((_DWORD *)v22 + 1) = 0x80000000; + v19 = v20; + } + while ( 1 ) + { + if ( v6 == -1 ) + goto LABEL_33; + if ( v6 == a3 ) + break; + v7 = (unsigned __int8 *)v18[2]; + v17 = v18[3]; + v8 = v17 - (_DWORD)v7; + if ( this - lpuexcpt <= (int)(v17 - (_DWORD)v7) ) + v8 = this - lpuexcpt; + if ( v8 <= 1 ) + { + *((_DWORD *)v22 + 1) = (char *)lpuexcpt + 1; + if ( v17 > (unsigned int)v7 ) + { + v10 = v18; + v14 = v7 + 1; + v18[2] = v7 + 1; + goto LABEL_38; + } + if ( (*(int (__fastcall **)(_DWORD *))(*v18 + 40))(v18) != -1 ) + { + v14 = (unsigned __int8 *)v18[2]; + v17 = v18[3]; +LABEL_38: + if ( v17 > (unsigned int)v14 ) + { + v6 = *v14; + lpuexcpt = (struct _Unwind_Exception *)*((_DWORD *)v22 + 1); + goto LABEL_9; + } +LABEL_40: + v6 = (*(int (__fastcall **)(_DWORD *, _DWORD *))(*v18 + 36))(v18, v10); + lpuexcpt = (struct _Unwind_Exception *)*((_DWORD *)v22 + 1); + goto LABEL_9; + } + goto LABEL_33; + } + v9 = memchr(v7, (char)a3, v8); + v10 = v18; + v11 = v9 - v7; + if ( !v9 ) + v11 = v8; + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + v11); + v12 = &v7[v11]; + v18[2] = v12; + *((_DWORD *)v22 + 1) = lpuexcpt; + if ( v17 <= (unsigned int)v12 ) + goto LABEL_40; + v6 = *v12; + if ( (int)this <= (int)lpuexcpt ) + goto LABEL_19; + } + if ( this == (std::istream *)0x7FFFFFFF ) + { + if ( !v19 ) + goto LABEL_30; + goto LABEL_25; + } + if ( v19 ) + goto LABEL_25; + goto LABEL_28; + } + } + return v22; +} +// 49DF3A: variable 'v16' is possibly undefined +// 49DF80: variable 'v15' is possibly undefined +// 49E197: variable 'v10' is possibly undefined +// 49DEE0: using guessed type char var_19[25]; + +//----- (0049E2F0) -------------------------------------------------------- +std::istream::sentry *__fastcall std::istream::ignore(std::istream::sentry *a1) +{ + _DWORD *v2; // ecx + unsigned int v3; // eax + bool v4; // [esp+8h] [ebp-70h] + char v6[25]; // [esp+5Fh] [ebp-19h] BYREF + + *((_DWORD *)a1 + 1) = 0; + std::istream::sentry::sentry(v6, a1, (std::istream *)1, v4); + if ( v6[0] ) + { + v2 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v3 = v2[2]; + if ( v3 >= v2[3] ) + { + if ( (*(int (__fastcall **)(_DWORD *))(*v2 + 40))(v2) == -1 ) + { + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 2); + return a1; + } + } + else + { + v2[2] = v3 + 1; + } + *((_DWORD *)a1 + 1) = 1; + } + return a1; +} +// 49E341: variable 'v4' is possibly undefined +// 49E2F0: using guessed type char var_19[25]; + +//----- (0049E480) -------------------------------------------------------- +void __userpurge std::istream::sentry::sentry(_BYTE *a1@, std::istream::sentry *this, std::istream *a3, bool a4) +{ + char *v4; // ecx + int v5; // eax + _BYTE *v6; // eax + unsigned int v7; // eax + unsigned int v8; // edx + unsigned __int8 *v9; // eax + int v10; // [esp+10h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + + *a1 = 0; + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v5 = *((_DWORD *)v4 + 5); + if ( v5 ) + goto LABEL_6; + if ( *((_DWORD *)v4 + 28) ) + { + std::ostream::flush(*((_DWORD **)v4 + 28)); + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + if ( (_BYTE)a3 || (v4[13] & 0x10) == 0 ) + goto LABEL_5; + } + else if ( (_BYTE)a3 || (v4[13] & 0x10) == 0 ) + { + goto LABEL_9; + } + lpuexcpt = (struct _Unwind_Exception *)*((_DWORD *)v4 + 30); + v6 = (_BYTE *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v6 >= *((_DWORD *)lpuexcpt + 3) ) + { + v6 = (_BYTE *)(*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v10 = *((_DWORD *)v4 + 31); + if ( v10 ) + { + if ( v6 == (_BYTE *)-1 ) + { +LABEL_20: + v5 = *((_DWORD *)v4 + 5) | 2; + goto LABEL_6; + } + goto LABEL_12; + } +LABEL_27: + std::__throw_bad_cast(); + } + LOBYTE(v6) = *v6; + v10 = *((_DWORD *)v4 + 31); + if ( !v10 ) + goto LABEL_27; +LABEL_12: + while ( (*(_BYTE *)(*(_DWORD *)(v10 + 24) + 2 * (unsigned __int8)v6) & 0x20) != 0 ) + { + while ( 1 ) + { + v7 = *((_DWORD *)lpuexcpt + 2); + v8 = *((_DWORD *)lpuexcpt + 3); + if ( v7 >= v8 ) + { + if ( (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 40))(lpuexcpt) == -1 ) + goto LABEL_19; + v9 = (unsigned __int8 *)*((_DWORD *)lpuexcpt + 2); + v8 = *((_DWORD *)lpuexcpt + 3); + } + else + { + v9 = (unsigned __int8 *)(v7 + 1); + *((_DWORD *)lpuexcpt + 2) = v9; + } + if ( (unsigned int)v9 >= v8 ) + break; + if ( (*(_BYTE *)(*(_DWORD *)(v10 + 24) + 2 * *v9) & 0x20) == 0 ) + goto LABEL_17; + } + v6 = (_BYTE *)(*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + if ( v6 == (_BYTE *)-1 ) + { +LABEL_19: + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + goto LABEL_20; + } + } +LABEL_17: + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); +LABEL_5: + v5 = *((_DWORD *)v4 + 5); + if ( v5 ) + { +LABEL_6: + std::ios::clear(v4, v5 | 4); + return; + } +LABEL_9: + *a1 = 1; +} + +//----- (0049E710) -------------------------------------------------------- +void __userpurge std::istream::sentry::sentry(_BYTE *a1@, std::istream::sentry *this, std::istream *a3, bool a4) +{ + char *v4; // ecx + int v5; // eax + _BYTE *v6; // eax + unsigned int v7; // eax + unsigned int v8; // edx + unsigned __int8 *v9; // eax + int v10; // [esp+10h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + + *a1 = 0; + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v5 = *((_DWORD *)v4 + 5); + if ( v5 ) + goto LABEL_6; + if ( *((_DWORD *)v4 + 28) ) + { + std::ostream::flush(*((_DWORD **)v4 + 28)); + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + if ( (_BYTE)a3 || (v4[13] & 0x10) == 0 ) + goto LABEL_5; + } + else if ( (_BYTE)a3 || (v4[13] & 0x10) == 0 ) + { + goto LABEL_9; + } + lpuexcpt = (struct _Unwind_Exception *)*((_DWORD *)v4 + 30); + v6 = (_BYTE *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v6 >= *((_DWORD *)lpuexcpt + 3) ) + { + v6 = (_BYTE *)(*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v10 = *((_DWORD *)v4 + 31); + if ( v10 ) + { + if ( v6 == (_BYTE *)-1 ) + { +LABEL_20: + v5 = *((_DWORD *)v4 + 5) | 2; + goto LABEL_6; + } + goto LABEL_12; + } +LABEL_27: + std::__throw_bad_cast(); + } + LOBYTE(v6) = *v6; + v10 = *((_DWORD *)v4 + 31); + if ( !v10 ) + goto LABEL_27; +LABEL_12: + while ( (*(_BYTE *)(*(_DWORD *)(v10 + 24) + 2 * (unsigned __int8)v6) & 0x20) != 0 ) + { + while ( 1 ) + { + v7 = *((_DWORD *)lpuexcpt + 2); + v8 = *((_DWORD *)lpuexcpt + 3); + if ( v7 >= v8 ) + { + if ( (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 40))(lpuexcpt) == -1 ) + goto LABEL_19; + v9 = (unsigned __int8 *)*((_DWORD *)lpuexcpt + 2); + v8 = *((_DWORD *)lpuexcpt + 3); + } + else + { + v9 = (unsigned __int8 *)(v7 + 1); + *((_DWORD *)lpuexcpt + 2) = v9; + } + if ( (unsigned int)v9 >= v8 ) + break; + if ( (*(_BYTE *)(*(_DWORD *)(v10 + 24) + 2 * *v9) & 0x20) == 0 ) + goto LABEL_17; + } + v6 = (_BYTE *)(*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + if ( v6 == (_BYTE *)-1 ) + { +LABEL_19: + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + goto LABEL_20; + } + } +LABEL_17: + v4 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); +LABEL_5: + v5 = *((_DWORD *)v4 + 5); + if ( v5 ) + { +LABEL_6: + std::ios::clear(v4, v5 | 4); + return; + } +LABEL_9: + *a1 = 1; +} + +//----- (0049E9A0) -------------------------------------------------------- +std::istream::sentry *__userpurge std::istream::getline@( + std::istream::sentry *a1@, + std::istream *this, + char *a3, + int a4) +{ + int v4; // eax + _BYTE *v5; // esi + char v7; // al + int (__stdcall *v9)(unsigned __int8); // edx + char v10; // [esp+Ch] [ebp-10h] + + v4 = *(_DWORD *)(*(_DWORD *)a1 - 12); + v5 = *(_BYTE **)((char *)a1 + v4 + 124); + if ( !v5 ) + std::__throw_bad_cast(); + if ( v5[28] ) + { + v7 = v5[39]; + } + else + { + std::ctype::_M_widen_init(*(_DWORD *)((char *)a1 + v4 + 124)); + v9 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v5 + 24); + v7 = 10; + if ( v9 != std::ctype::do_widen ) + v7 = ((int (__thiscall *)(_BYTE *, int))v9)(v5, 10); + } + return std::istream::getline(a1, this, a3, v7, v10); +} +// 49E9D3: variable 'v10' is possibly undefined + +//----- (0049EA20) -------------------------------------------------------- +std::istream::sentry *__userpurge std::istream::getline@( + std::istream::sentry *a1@, + std::istream *this, + char *a3, + char a4, + char a5) +{ + int v5; // edx + size_t v6; // edx + _DWORD *v8; // eax + char *v9; // esi + size_t v10; // eax + int v11; // ecx + unsigned __int8 *v12; // eax + unsigned __int8 *v13; // edx + char *v14; // eax + signed int v15; // edx + unsigned int v16; // edx + unsigned int v17; // eax + unsigned __int8 *v18; // eax + size_t v19; // ebx + bool v20; // [esp+8h] [ebp-90h] + std::istream *v21; // [esp+1Ch] [ebp-7Ch] + _DWORD *v22; // [esp+28h] [ebp-70h] + unsigned int v23; // [esp+2Ch] [ebp-6Ch] + char *Buf; // [esp+34h] [ebp-64h] + size_t MaxCount; // [esp+38h] [ebp-60h] + char v27[25]; // [esp+7Fh] [ebp-19h] BYREF + + *((_DWORD *)a1 + 1) = 0; + std::istream::sentry::sentry(v27, a1, (std::istream *)1, v20); + if ( v27[0] ) + { + v8 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v9 = (char *)v8[2]; + v22 = v8; + Buf = v9; + v23 = v8[3]; + if ( (unsigned int)v9 < v23 ) + { + v10 = *((_DWORD *)a1 + 1); + v11 = (unsigned __int8)*v9; + v6 = v10 + 1; + if ( (int)a3 > (int)(v10 + 1) ) + goto LABEL_11; +LABEL_31: + if ( (unsigned __int8)a4 != v11 ) + { + if ( (int)a3 <= 0 ) + { + v5 = 4; + v10 = *((_DWORD *)a1 + 1); + goto LABEL_38; + } + v5 = 4; + *(_BYTE *)this = 0; +LABEL_5: + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | v5); + return a1; + } + Buf = (char *)v22[2]; + v23 = v22[3]; + goto LABEL_43; + } + v11 = (*(int (__fastcall **)(_DWORD *))(*v8 + 36))(v8); + v10 = *((_DWORD *)a1 + 1); + v19 = v10; + v6 = v10 + 1; + if ( (int)a3 <= (int)(v10 + 1) ) + { +LABEL_50: + if ( v11 != -1 ) + goto LABEL_31; + if ( (int)a3 <= 0 ) + { + v10 = v19; + v5 = 2; + goto LABEL_38; + } + } + else + { + if ( v11 != -1 ) + { + Buf = (char *)v22[2]; + v23 = v22[3]; +LABEL_11: + if ( (unsigned __int8)a4 == v11 ) + { +LABEL_43: + *((_DWORD *)a1 + 1) = v6; + if ( (unsigned int)Buf < v23 ) + { + v22[2] = Buf + 1; + if ( (int)a3 > 0 ) + { + *(_BYTE *)this = 0; + if ( !*((_DWORD *)a1 + 1) ) + goto LABEL_4; + return a1; + } + goto LABEL_7; + } + (*(void (__fastcall **)(_DWORD *))(*v22 + 40))(v22); + if ( (int)a3 > 0 ) + { + *(_BYTE *)this = 0; + if ( !*((_DWORD *)a1 + 1) ) + goto LABEL_4; + return a1; + } +LABEL_6: + v6 = *((_DWORD *)a1 + 1); +LABEL_7: + if ( !v6 ) + goto LABEL_4; + return a1; + } + while ( 1 ) + { + v14 = &a3[-v10 - 1]; + v15 = v23 - (_DWORD)Buf; + if ( (int)v14 <= (int)(v23 - (_DWORD)Buf) ) + v15 = (signed int)v14; + MaxCount = v15; + if ( v15 > 1 ) + { + v12 = (unsigned __int8 *)memchr(Buf, a4, v15); + v13 = v12; + if ( !v12 || (MaxCount = v12 - (unsigned __int8 *)Buf, v12 != (unsigned __int8 *)Buf) ) + { + memcpy(this, Buf, MaxCount); + v13 = (unsigned __int8 *)(v22[2] + MaxCount); + v23 = v22[3]; + } + this = (std::istream *)((char *)this + MaxCount); + v22[2] = v13; + v10 = *((_DWORD *)a1 + 1) + MaxCount; + *((_DWORD *)a1 + 1) = v10; + if ( (unsigned int)v13 < v23 ) + { + v11 = *v13; + goto LABEL_17; + } + v11 = (*(int (__fastcall **)(_DWORD *))(*v22 + 36))(v22); + } + else + { + v21 = (std::istream *)((char *)this + 1); + *(_BYTE *)this = v11; + v16 = v22[3]; + ++*((_DWORD *)a1 + 1); + v17 = v22[2]; + if ( v17 >= v16 ) + { + if ( (*(int (__fastcall **)(_DWORD *))(*v22 + 40))(v22) == -1 ) + goto LABEL_35; + v18 = (unsigned __int8 *)v22[2]; + v16 = v22[3]; + } + else + { + v18 = (unsigned __int8 *)(v17 + 1); + v22[2] = v18; + } + if ( (unsigned int)v18 < v16 ) + { + v11 = *v18; + this = (std::istream *)((char *)this + 1); + v10 = *((_DWORD *)a1 + 1); +LABEL_17: + v6 = v10 + 1; + if ( (int)a3 <= (int)(v10 + 1) ) + goto LABEL_31; + goto LABEL_18; + } + v11 = (*(int (__fastcall **)(_DWORD *))(*v22 + 36))(v22); + this = (std::istream *)((char *)this + 1); + } + v19 = *((_DWORD *)a1 + 1); + v10 = v19; + v6 = v19 + 1; + if ( (int)(v19 + 1) >= (int)a3 ) + goto LABEL_50; + if ( v11 == -1 ) + { + v21 = this; +LABEL_35: + if ( (int)a3 > 0 ) + *(_BYTE *)v21 = 0; + v5 = 2; + v10 = *((_DWORD *)a1 + 1); +LABEL_38: + if ( !v10 ) + v5 |= 4u; + goto LABEL_5; + } +LABEL_18: + Buf = (char *)v22[2]; + v23 = v22[3]; + if ( (unsigned __int8)a4 == v11 ) + goto LABEL_43; + } + } + if ( (int)a3 <= 0 ) + { + v5 = 2; + goto LABEL_38; + } + } + v5 = 2; + *(_BYTE *)this = 0; + if ( !*((_DWORD *)a1 + 1) ) + v5 = 6; + goto LABEL_5; + } + if ( (int)a3 <= 0 ) + goto LABEL_6; + *(_BYTE *)this = 0; + if ( !*((_DWORD *)a1 + 1) ) + { +LABEL_4: + v5 = 4; + goto LABEL_5; + } + return a1; +} +// 49EA7F: variable 'v20' is possibly undefined +// 49EA20: using guessed type char var_19[25]; + +//----- (0049EF50) -------------------------------------------------------- +std::istream::sentry *__userpurge std::istream::putback@( + std::istream::sentry *a1@, + std::istream *this, + char a3) +{ + int v4; // eax + _DWORD *v5; // ecx + _DWORD *v6; // eax + unsigned int v7; // eax + bool v9; // [esp+8h] [ebp-70h] + char v11[25]; // [esp+5Fh] [ebp-19h] BYREF + + v4 = *(_DWORD *)a1; + *((_DWORD *)a1 + 1) = 0; + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(v4 - 12)), + *(_DWORD *)((_BYTE *)a1 + *(_DWORD *)(v4 - 12) + 20) & 0xFFFFFFFD); + std::istream::sentry::sentry(v11, a1, (std::istream *)1, v9); + if ( v11[0] ) + { + v5 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v6 = (_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)); + if ( v5 ) + { + v7 = v5[2]; + if ( v5[1] < v7 && (_BYTE)this == *(_BYTE *)(v7 - 1) ) + { + v5[2] = v7 - 1; + return a1; + } + if ( (*(int (__thiscall **)(_DWORD *, _DWORD))(*v5 + 44))(v5, (unsigned __int8)this) != -1 ) + return a1; + v6 = (_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)); + } + std::ios::clear(v6, v6[5] | 1); + } + return a1; +} +// 49EFC2: variable 'v9' is possibly undefined +// 49EF50: using guessed type char var_19[25]; + +//----- (0049F110) -------------------------------------------------------- +struct _Unwind_Exception *__userpurge std::istream::readsome@( + std::istream::sentry *a1@, + std::istream *this, + char *a3, + int a4) +{ + _DWORD *v5; // ecx + char *v6; // eax + int v7; // ecx + bool v8; // [esp+8h] [ebp-70h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v11[25]; // [esp+5Fh] [ebp-19h] BYREF + + *((_DWORD *)a1 + 1) = 0; + std::istream::sentry::sentry(v11, a1, (std::istream *)1, v8); + if ( !v11[0] ) + return (struct _Unwind_Exception *)*((_DWORD *)a1 + 1); + v5 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v6 = (char *)(v5[3] - v5[2]); + if ( !v6 ) + v6 = (char *)(*(int (__fastcall **)(_DWORD *))(*v5 + 28))(v5); + if ( (int)v6 <= 0 ) + { + if ( v6 == (char *)-1 ) + { + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 2); + return (struct _Unwind_Exception *)*((_DWORD *)a1 + 1); + } + return (struct _Unwind_Exception *)*((_DWORD *)a1 + 1); + } + if ( (int)v6 > (int)a3 ) + v6 = a3; + v7 = *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + lpuexcpt = (struct _Unwind_Exception *)(*(int (__thiscall **)(int, std::istream *, char *))(*(_DWORD *)v7 + 32))( + v7, + this, + v6); + *((_DWORD *)a1 + 1) = lpuexcpt; + return lpuexcpt; +} +// 49F161: variable 'v8' is possibly undefined +// 49F110: using guessed type char var_19[25]; + +//----- (0049F2F0) -------------------------------------------------------- +void __thiscall std::istream::istream(_DWORD *this, int *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // ecx + int v5; // eax + std::ios_base *v6; // [esp+4h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v8; // [esp+14h] [ebp-44h] + + v8 = this + 2; + std::ios_base::ios_base(this + 2); + *((_WORD *)this + 62) = 0; + v2 = a2[1]; + *this = &off_51A7F0; + this[1] = v2; + this[30] = 0; + v3 = *a2; + this[32] = 0; + this[33] = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[2] = off_51A804; + this[34] = 0; + this[35] = 0; + lpuexcpt = v4; + std::ios_base::_M_move((int)v8, v4, v6); + std::ios::_M_cache_locale(v8, (int)(this + 29)); + this[32] = 0; + v5 = *((_DWORD *)lpuexcpt + 28); + *((_DWORD *)lpuexcpt + 28) = 0; + this[30] = v5; + *((_WORD *)this + 62) = *((_WORD *)lpuexcpt + 58); + a2[1] = 0; +} +// 49F38F: variable 'v6' is possibly undefined +// 51A7F0: using guessed type void (__cdecl *off_51A7F0)(std::istream *__hidden this); +// 51A804: using guessed type void (__cdecl *off_51A804[2])(std::istream *__hidden this); + +//----- (0049F420) -------------------------------------------------------- +void __thiscall std::istream::istream(_DWORD *this, int a2) +{ + _DWORD *v2; // [esp+14h] [ebp-44h] + + v2 = this + 2; + std::ios_base::ios_base(this + 2); + this[30] = 0; + *((_WORD *)this + 62) = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + this[35] = 0; + *this = &off_51A7F0; + this[2] = off_51A804; + this[1] = 0; + std::ios::init((int)v2, a2); +} +// 51A7F0: using guessed type void (__cdecl *off_51A7F0)(std::istream *__hidden this); +// 51A804: using guessed type void (__cdecl *off_51A804[2])(std::istream *__hidden this); + +//----- (0049F500) -------------------------------------------------------- +void __fastcall std::istream::istream(int a1) +{ + int v1; // [esp+14h] [ebp-44h] + + v1 = a1 + 8; + std::ios_base::ios_base((_DWORD *)(a1 + 8)); + *(_DWORD *)(a1 + 120) = 0; + *(_WORD *)(a1 + 124) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + *(_DWORD *)(a1 + 136) = 0; + *(_DWORD *)(a1 + 140) = 0; + *(_DWORD *)a1 = &off_51A7F0; + *(_DWORD *)(a1 + 8) = off_51A804; + *(_DWORD *)(a1 + 4) = 0; + std::ios::init(v1, 0); +} +// 51A7F0: using guessed type void (__cdecl *off_51A7F0)(std::istream *__hidden this); +// 51A804: using guessed type void (__cdecl *off_51A804[2])(std::istream *__hidden this); + +//----- (0049F5E0) -------------------------------------------------------- +int __thiscall std::istream::istream(int *this, int *a2, _DWORD *a3) +{ + int v3; // eax + int v4; // edx + char *v5; // ebx + std::ios_base *v6; // edi + int v7; // eax + int result; // eax + std::ios_base *v9; // [esp+4h] [ebp-18h] + + v3 = *a2; + v4 = a2[1]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = v4; + this[1] = a3[1]; + v5 = (char *)this + *(_DWORD *)(v3 - 12); + v6 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v5, v6, v9); + std::ios::_M_cache_locale(v5, (int)(v5 + 108)); + v7 = *((_DWORD *)v6 + 28); + *((_DWORD *)v5 + 30) = 0; + *((_DWORD *)v6 + 28) = 0; + *((_DWORD *)v5 + 28) = v7; + result = *((unsigned __int16 *)v6 + 58); + a3[1] = 0; + *((_WORD *)v5 + 58) = result; + return result; +} +// 49F612: variable 'v9' is possibly undefined + +//----- (0049F660) -------------------------------------------------------- +BOOL __thiscall std::istream::istream(int *this, int *a2, int a3) +{ + int v3; // eax + int v4; // edx + int v5; // ebx + + v3 = *a2; + v4 = a2[1]; + v5 = *(_DWORD *)(*a2 - 12); + *this = *a2; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + return std::ios::init((int)this + *(_DWORD *)(v3 - 12), a3); +} + +//----- (0049F6A0) -------------------------------------------------------- +BOOL __thiscall std::istream::istream(_DWORD *ecx0, std::istream *this) +{ + int v2; // eax + int v3; // edx + int v4; // ebx + + v2 = *(_DWORD *)this; + v3 = *((_DWORD *)this + 1); + v4 = *(_DWORD *)(*(_DWORD *)this - 12); + *ecx0 = *(_DWORD *)this; + *(_DWORD *)((char *)ecx0 + v4) = v3; + ecx0[1] = 0; + return std::ios::init((int)ecx0 + *(_DWORD *)(v2 - 12), 0); +} + +//----- (0049F6D0) -------------------------------------------------------- +void __fastcall std::istream::~istream(_DWORD *a1) +{ + _DWORD *v2; // ecx + + v2 = a1 + 2; + *(v2 - 2) = &off_51A7F0; + *(v2 - 1) = 0; + *v2 = &off_51B7D0; + std::ios_base::~ios_base((int)v2); + operator delete(a1); +} +// 51A7F0: using guessed type void (__cdecl *off_51A7F0)(std::istream *__hidden this); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (0049F700) -------------------------------------------------------- +void __fastcall std::istream::~istream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + *a1 = &off_51A7F0; + v1 = a1 + 2; + *(v1 - 1) = 0; + *v1 = &off_51B7D0; + std::ios_base::~ios_base((int)v1); +} +// 51A7F0: using guessed type void (__cdecl *off_51A7F0)(std::istream *__hidden this); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (0049F720) -------------------------------------------------------- +void __thiscall std::istream::~istream(_DWORD *ecx0, std::istream *this) +{ + int v2; // eax + + v2 = *(_DWORD *)this; + *ecx0 = *(_DWORD *)this; + *(_DWORD *)((char *)ecx0 + *(_DWORD *)(v2 - 12)) = *((_DWORD *)this + 1); + ecx0[1] = 0; +} + +//----- (0049F740) -------------------------------------------------------- +_DWORD *__thiscall std::istream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // edx + char v6; // cl + char v7; // cl + int v8; // edx + std::ios_base *v10; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v10); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + v8 = this[1]; + *((_BYTE *)v4 + 117) = v7; + this[1] = a2[1]; + a2[1] = v8; + return this; +} +// 49F77D: variable 'v10' is possibly undefined + +//----- (0049F800) -------------------------------------------------------- +int __thiscall std::istream::operator>>(void *this, int (__cdecl *a2)(void *)) +{ + return a2(this); +} + +//----- (0049F810) -------------------------------------------------------- +char *__thiscall std::istream::operator>>(char *this, void (__cdecl *a2)(char *)) +{ + a2(&this[*(_DWORD *)(*(_DWORD *)this - 12)]); + return this; +} + +//----- (0049F830) -------------------------------------------------------- +char *__thiscall std::istream::operator>>(char *this, void (__cdecl *a2)(char *)) +{ + a2(&this[*(_DWORD *)(*(_DWORD *)this - 12)]); + return this; +} + +//----- (0049F850) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::operator>>(std::istream::sentry *this, _DWORD *a2) +{ + char *v2; // ecx + int v3; // eax + bool v5; // [esp+8h] [ebp-70h] + char v7; // [esp+5Eh] [ebp-1Ah] BYREF + char v8[25]; // [esp+5Fh] [ebp-19h] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + if ( !a2 ) + { + v3 = 4; + goto LABEL_9; + } + if ( !std::__copy_streambufs_eof>(*((_DWORD **)v2 + 30), a2, v8) ) + { + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = v8[0] == 0 ? 4 : 6; + goto LABEL_9; + } + if ( v8[0] ) + { + v3 = 2; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); +LABEL_9: + std::ios::clear(v2, *((_DWORD *)v2 + 5) | v3); + } + } + else if ( !a2 ) + { + v3 = 4; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + goto LABEL_9; + } + return this; +} +// 49F89A: variable 'v5' is possibly undefined +// 49F850: using guessed type char var_19[25]; + +//----- (0049FA70) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::operator>>(std::istream::sentry *this, _DWORD *a2) +{ + char *v2; // edi + int v3; // ecx + bool v5; // [esp+8h] [ebp-80h] + char v7; // [esp+67h] [ebp-21h] BYREF + int v8; // [esp+68h] [ebp-20h] BYREF + int v9[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v7, this, 0, v5); + if ( v7 ) + { + v8 = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int *))(*(_DWORD *)v3 + 12))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + &v8, + v9); + *a2 = v9[0]; + if ( v8 ) + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v8); + } + return this; +} +// 49FABA: variable 'v5' is possibly undefined +// 49FA70: using guessed type int var_1C[7]; + +//----- (0049FC70) -------------------------------------------------------- +std::istream::sentry *__thiscall std::istream::operator>>(std::istream::sentry *this, _WORD *a2) +{ + char *v2; // edi + int v3; // ecx + int v4; // eax + bool v6; // [esp+8h] [ebp-80h] + char v8; // [esp+67h] [ebp-21h] BYREF + int v9; // [esp+68h] [ebp-20h] BYREF + int v10[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v8, this, 0, v6); + if ( v8 ) + { + v9 = 0; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int *))(*(_DWORD *)v3 + 12))( + v3, + *((_DWORD *)v2 + 30), + -1, + 0, + -1, + (char *)this + *(_DWORD *)(*(_DWORD *)this - 12), + &v9, + v10); + v4 = v9; + if ( v10[0] >= -32768 ) + { + if ( v10[0] > 0x7FFF ) + { + v9 |= 4u; + v4 = v9; + *a2 = 0x7FFF; + goto LABEL_9; + } + *a2 = v10[0]; + } + else + { + v4 = v9 | 4; + v9 |= 4u; + *a2 = 0x8000; + } + if ( !v4 ) + return this; +LABEL_9: + std::ios::clear( + (std::istream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | v4); + } + return this; +} +// 49FD83: conditional instruction was optimized away because eax.4>=4u +// 49FCBA: variable 'v6' is possibly undefined +// 49FC70: using guessed type int var_1C[7]; + +//----- (0049FEB0) -------------------------------------------------------- +std::ostream::sentry *__userpurge std::ostream::put@(std::ostream::sentry *a1@, std::ostream *this, char a3) +{ + _DWORD *v3; // ecx + _BYTE *v4; // eax + int v5; // ecx + int v7; // [esp+0h] [ebp-78h] + std::ostream *v8; // [esp+4h] [ebp-74h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v11[4]; // [esp+58h] [ebp-20h] BYREF + _DWORD *v12; // [esp+5Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v11, a1, v8); + if ( v11[0] ) + { + v3 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v4 = (_BYTE *)v3[5]; + if ( (unsigned int)v4 >= v3[6] ) + { + if ( (*(int (__thiscall **)(_DWORD *, _DWORD))(*v3 + 52))(v3, (unsigned __int8)this) == -1 ) + std::ios::clear( + (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 1); + } + else + { + *v4 = (_BYTE)this; + ++v3[5]; + } + } + lpuexcpt = (struct _Unwind_Exception *)((char *)v12 + *(_DWORD *)(*v12 - 12)); + if ( (*((_BYTE *)lpuexcpt + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v5 = *((_DWORD *)lpuexcpt + 30); + if ( v5 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v5 + 24))(v5, v7) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v12 + *(_DWORD *)(*v12 - 12)), + *(_DWORD *)((char *)v12 + *(_DWORD *)(*v12 - 12) + 20) | 1); + } + } + return a1; +} +// 49FEF8: variable 'v8' is possibly undefined +// 49FF54: variable 'v7' is possibly undefined +// 49FEB0: using guessed type char var_20[4]; + +//----- (004A00A0) -------------------------------------------------------- +void __userpurge std::ostream::swap(_DWORD *a1@, std::ostream *this, std::ostream *a3) +{ + std::ios_base **v3; // ebx + std::ios_base *v4; // esi + std::ios_base *v5; // eax + char v6; // dl + char v7; // dl + std::ios_base *v8; // [esp+4h] [ebp-58h] + + v3 = (std::ios_base **)((char *)a1 + *(_DWORD *)(*a1 - 12)); + v4 = (std::ostream *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + *((_BYTE *)v4 + 117) = v7; +} +// 4A00D7: variable 'v8' is possibly undefined + +//----- (004A0140) -------------------------------------------------------- +_DWORD *__fastcall std::ostream::flush(_DWORD *a1) +{ + int v1; // ecx + + v1 = *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + if ( v1 && (*(int (__fastcall **)(int))(*(_DWORD *)v1 + 24))(v1) == -1 ) + std::ios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 1); + return a1; +} + +//----- (004A0290) -------------------------------------------------------- +_DWORD *__thiscall std::ostream::seekp(_DWORD *this, int a2, int a3, int a4, int a5) +{ + char *v5; // edi + _DWORD *v6; // eax + int v7; // edi + void (__thiscall *v8)(int *, _DWORD *, int, int, int, int, int); // eax + _DWORD *v10; // [esp+0h] [ebp-A8h] + int v12[14]; // [esp+70h] [ebp-38h] BYREF + + v5 = (char *)this + *(_DWORD *)(*this - 12); + if ( (v5[20] & 5) == 0 ) + { + v6 = (_DWORD *)*((_DWORD *)v5 + 30); + v7 = *v6; + v12[6] = a4; + v10 = v6; + v8 = *(void (__thiscall **)(int *, _DWORD *, int, int, int, int, int))(v7 + 20); + v12[4] = a2; + v12[5] = a3; + v12[7] = a5; + v8(v12, v10, a2, a3, a4, a5, 16); + if ( (v12[0] & v12[1]) == -1 ) + std::ios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 4); + } + return this; +} + +//----- (004A0450) -------------------------------------------------------- +_DWORD *__thiscall std::ostream::seekp(_DWORD *this, int a2, int a3, int a4) +{ + char *v4; // edi + int v7[10]; // [esp+60h] [ebp-28h] BYREF + + v4 = (char *)this + *(_DWORD *)(*this - 12); + if ( (v4[20] & 5) == 0 ) + { + (*(void (__thiscall **)(int *, _DWORD, int, int, int, int))(**((_DWORD **)v4 + 30) + 16))( + v7, + *((_DWORD *)v4 + 30), + a2, + a3, + a4, + 16); + if ( (v7[0] & v7[1]) == -1 ) + std::ios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 4); + } + return this; +} + +//----- (004A05E0) -------------------------------------------------------- +_DWORD *__thiscall std::ostream::tellp(_DWORD *ecx0, std::ostream *this) +{ + int v2; // eax + char *v3; // esi + int v6[10]; // [esp+60h] [ebp-28h] BYREF + + v2 = *(_DWORD *)this; + *ecx0 = -1; + ecx0[1] = -1; + v3 = (char *)this + *(_DWORD *)(v2 - 12); + ecx0[2] = 0; + if ( (v3[20] & 5) == 0 ) + { + (*(void (__thiscall **)(int *, _DWORD, _DWORD, _DWORD, int, int))(**((_DWORD **)v3 + 30) + 16))( + v6, + *((_DWORD *)v3 + 30), + 0, + 0, + 1, + 16); + *ecx0 = v6[0]; + ecx0[1] = v6[1]; + ecx0[2] = v6[2]; + } + return ecx0; +} + +//----- (004A0760) -------------------------------------------------------- +std::ostream::sentry *__userpurge std::ostream::write@( + std::ostream::sentry *a1@, + std::ostream *this, + const char *a3, + int a4) +{ + int v4; // ecx + int v5; // ecx + int v7; // [esp+0h] [ebp-78h] + std::ostream *v8; // [esp+4h] [ebp-74h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v11[4]; // [esp+58h] [ebp-20h] BYREF + _DWORD *v12; // [esp+5Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v11, a1, v8); + if ( v11[0] ) + { + v4 = *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + if ( a3 != (const char *)(*(int (__thiscall **)(int, std::ostream *, const char *))(*(_DWORD *)v4 + 48))( + v4, + this, + a3) ) + std::ios::clear( + (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 1); + } + lpuexcpt = (struct _Unwind_Exception *)((char *)v12 + *(_DWORD *)(*v12 - 12)); + if ( (*((_BYTE *)lpuexcpt + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v5 = *((_DWORD *)lpuexcpt + 30); + if ( v5 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v5 + 24))(v5, v7) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v12 + *(_DWORD *)(*v12 - 12)), + *(_DWORD *)((char *)v12 + *(_DWORD *)(*v12 - 12) + 20) | 1); + } + } + return a1; +} +// 4A07A2: variable 'v8' is possibly undefined +// 4A080F: variable 'v7' is possibly undefined +// 4A0760: using guessed type char var_20[4]; + +//----- (004A0930) -------------------------------------------------------- +int __userpurge std::ostream::sentry::sentry@(int a1@, std::ostream::sentry *this, std::ostream *a3) +{ + int v4; // eax + char *v5; // ecx + int result; // eax + + *(_BYTE *)a1 = 0; + v4 = *(_DWORD *)this; + *(_DWORD *)(a1 + 4) = this; + v5 = (char *)this + *(_DWORD *)(v4 - 12); + result = *((_DWORD *)v5 + 5); + if ( *((_DWORD *)v5 + 28) ) + { + if ( result ) + return std::ios::clear(v5, result | 4); + std::ostream::flush(*((_DWORD **)v5 + 28)); + result = *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20); + v5 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + } + if ( result ) + return std::ios::clear(v5, result | 4); + *(_BYTE *)a1 = 1; + return result; +} + +//----- (004A0990) -------------------------------------------------------- +int __userpurge std::ostream::sentry::sentry@(int a1@, std::ostream::sentry *this, std::ostream *a3) +{ + int v4; // eax + char *v5; // ecx + int result; // eax + + *(_BYTE *)a1 = 0; + v4 = *(_DWORD *)this; + *(_DWORD *)(a1 + 4) = this; + v5 = (char *)this + *(_DWORD *)(v4 - 12); + result = *((_DWORD *)v5 + 5); + if ( *((_DWORD *)v5 + 28) ) + { + if ( result ) + return std::ios::clear(v5, result | 4); + std::ostream::flush(*((_DWORD **)v5 + 28)); + result = *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20); + v5 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + } + if ( result ) + return std::ios::clear(v5, result | 4); + *(_BYTE *)a1 = 1; + return result; +} + +//----- (004A09F0) -------------------------------------------------------- +void __fastcall std::ostream::sentry::~sentry(int a1) +{ + int v2; // ebx + int v3; // ecx + _DWORD *v4; // ecx + + if ( (*(_BYTE *)(*(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4) + 13) & 0x20) != 0 ) + { + v2 = *(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4); + if ( !std::uncaught_exception() ) + { + v3 = *(_DWORD *)(v2 + 120); + if ( v3 ) + { + if ( (*(int (__fastcall **)(int))(*(_DWORD *)v3 + 24))(v3) == -1 ) + { + v4 = (_DWORD *)(*(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4)); + std::ios::clear(v4, v4[5] | 1); + } + } + } + } +} + +//----- (004A0A80) -------------------------------------------------------- +void __fastcall std::ostream::sentry::~sentry(int a1) +{ + int v2; // ebx + int v3; // ecx + _DWORD *v4; // ecx + + if ( (*(_BYTE *)(*(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4) + 13) & 0x20) != 0 ) + { + v2 = *(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4); + if ( !std::uncaught_exception() ) + { + v3 = *(_DWORD *)(v2 + 120); + if ( v3 ) + { + if ( (*(int (__fastcall **)(int))(*(_DWORD *)v3 + 24))(v3) == -1 ) + { + v4 = (_DWORD *)(*(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4)); + std::ios::clear(v4, v4[5] | 1); + } + } + } + } +} + +//----- (004A0B10) -------------------------------------------------------- +const char *__userpurge std::ostream::_M_write@(_DWORD *a1@, std::ostream *this, const char *a3, int a4) +{ + int v5; // ecx + const char *result; // eax + + v5 = *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + result = (const char *)(*(int (__thiscall **)(int, std::ostream *, const char *))(*(_DWORD *)v5 + 48))(v5, this, a3); + if ( a3 != result ) + return (const char *)std::ios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 1); + return result; +} + +//----- (004A0B60) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, int a2) +{ + int v2; // ecx + char v3; // dl + int v4; // ecx + char v6; // al + int v7; // eax + int (__stdcall *v8)(unsigned __int8); // edx + int v9; // [esp+0h] [ebp-98h] + std::ostream *v10; // [esp+4h] [ebp-94h] + _BYTE *v11; // [esp+2Ch] [ebp-6Ch] + int v12; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + char v16[4]; // [esp+78h] [ebp-20h] BYREF + _DWORD *v17; // [esp+7Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v16, this, v10); + if ( v16[0] ) + { + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + v12 = *((_DWORD *)lpuexcpt + 32); + if ( !v12 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 117) ) + { + v2 = *((char *)lpuexcpt + 116); + } + else + { + v11 = (_BYTE *)*((_DWORD *)lpuexcpt + 31); + if ( !v11 ) + std::__throw_bad_cast(); + if ( v11[28] ) + { + v2 = (char)v11[61]; + v6 = v11[61]; + } + else + { + std::ctype::_M_widen_init((int)v11); + v2 = 32; + v8 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v11 + 24); + v6 = 32; + if ( v8 != std::ctype::do_widen ) + { + v6 = ((int (__thiscall *)(_BYTE *, int))v8)(v11, 32); + v2 = v6; + } + } + *((_BYTE *)lpuexcpt + 116) = v6; + v7 = *(_DWORD *)this; + *((_BYTE *)lpuexcpt + 117) = 1; + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, int, int))(*(_DWORD *)v12 + 36))( + v12, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + a2); + if ( v3 ) + std::ios::clear( + (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v17 + *(_DWORD *)(*v17 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v9) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v17 + *(_DWORD *)(*v17 - 12)), + *(_DWORD *)((char *)v17 + *(_DWORD *)(*v17 - 12) + 20) | 1); + } + } + return this; +} +// 4A0BA5: variable 'v10' is possibly undefined +// 4A0C28: variable 'v3' is possibly undefined +// 4A0C7C: variable 'v9' is possibly undefined +// 4A0B60: using guessed type char var_20[4]; + +//----- (004A0E10) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, unsigned __int8 a2) +{ + int v2; // ecx + char v3; // dl + int v4; // ecx + char v6; // al + int v7; // eax + int (__stdcall *v8)(unsigned __int8); // edx + int v9; // [esp+0h] [ebp-98h] + std::ostream *v10; // [esp+4h] [ebp-94h] + _BYTE *v11; // [esp+28h] [ebp-70h] + int v12; // [esp+2Ch] [ebp-6Ch] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + char v16[4]; // [esp+78h] [ebp-20h] BYREF + _DWORD *v17; // [esp+7Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v16, this, v10); + if ( v16[0] ) + { + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + v12 = *((_DWORD *)lpuexcpt + 32); + if ( !v12 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 117) ) + { + v2 = *((char *)lpuexcpt + 116); + } + else + { + v11 = (_BYTE *)*((_DWORD *)lpuexcpt + 31); + if ( !v11 ) + std::__throw_bad_cast(); + if ( v11[28] ) + { + v2 = (char)v11[61]; + v6 = v11[61]; + } + else + { + std::ctype::_M_widen_init((int)v11); + v2 = 32; + v8 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v11 + 24); + v6 = 32; + if ( v8 != std::ctype::do_widen ) + { + v6 = ((int (__thiscall *)(_BYTE *, int))v8)(v11, 32); + v2 = v6; + } + } + *((_BYTE *)lpuexcpt + 116) = v6; + v7 = *(_DWORD *)this; + *((_BYTE *)lpuexcpt + 117) = 1; + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, int, _DWORD))(*(_DWORD *)v12 + 8))( + v12, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + a2); + if ( v3 ) + std::ios::clear( + (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v17 + *(_DWORD *)(*v17 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v9) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v17 + *(_DWORD *)(*v17 - 12)), + *(_DWORD *)((char *)v17 + *(_DWORD *)(*v17 - 12) + 20) | 1); + } + } + return this; +} +// 4A0E5B: variable 'v10' is possibly undefined +// 4A0EE5: variable 'v3' is possibly undefined +// 4A0F39: variable 'v9' is possibly undefined +// 4A0E10: using guessed type char var_20[4]; + +//----- (004A10D0) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, double a2) +{ + int v2; // ecx + char v3; // dl + int v4; // ecx + char v6; // al + int v7; // eax + int (__stdcall *v8)(unsigned __int8); // edx + int v9; // [esp+0h] [ebp-98h] + std::ostream *v10; // [esp+4h] [ebp-94h] + _BYTE *v11; // [esp+24h] [ebp-74h] + int v12; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + char v16[4]; // [esp+78h] [ebp-20h] BYREF + _DWORD *v17; // [esp+7Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v16, this, v10); + if ( v16[0] ) + { + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + v12 = *((_DWORD *)lpuexcpt + 32); + if ( !v12 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 117) ) + { + v2 = *((char *)lpuexcpt + 116); + } + else + { + v11 = (_BYTE *)*((_DWORD *)lpuexcpt + 31); + if ( !v11 ) + std::__throw_bad_cast(); + if ( v11[28] ) + { + v2 = (char)v11[61]; + v6 = v11[61]; + } + else + { + std::ctype::_M_widen_init((int)v11); + v2 = 32; + v8 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v11 + 24); + v6 = 32; + if ( v8 != std::ctype::do_widen ) + { + v6 = ((int (__thiscall *)(_BYTE *, int))v8)(v11, 32); + v2 = v6; + } + } + *((_BYTE *)lpuexcpt + 116) = v6; + v7 = *(_DWORD *)this; + *((_BYTE *)lpuexcpt + 117) = 1; + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, int, _DWORD, _DWORD))(*(_DWORD *)v12 + 28))( + v12, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + LODWORD(a2), + HIDWORD(a2)); + if ( v3 ) + std::ios::clear( + (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v17 + *(_DWORD *)(*v17 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v9) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v17 + *(_DWORD *)(*v17 - 12)), + *(_DWORD *)((char *)v17 + *(_DWORD *)(*v17 - 12) + 20) | 1); + } + } + return this; +} +// 4A111B: variable 'v10' is possibly undefined +// 4A1198: variable 'v3' is possibly undefined +// 4A11EC: variable 'v9' is possibly undefined +// 4A10D0: using guessed type char var_20[4]; + +//----- (004A1380) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, long double a2) +{ + int v2; // ecx + char v3; // dl + int v4; // ecx + char v6; // al + int v7; // eax + int (__stdcall *v8)(unsigned __int8); // edx + int v9; // [esp+0h] [ebp-98h] + std::ostream *v10; // [esp+4h] [ebp-94h] + _BYTE *v12; // [esp+2Ch] [ebp-6Ch] + int v13; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + char v17[4]; // [esp+78h] [ebp-20h] BYREF + _DWORD *v18; // [esp+7Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v17, this, v10); + if ( v17[0] ) + { + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + v13 = *((_DWORD *)lpuexcpt + 32); + if ( !v13 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 117) ) + { + v2 = *((char *)lpuexcpt + 116); + } + else + { + v12 = (_BYTE *)*((_DWORD *)lpuexcpt + 31); + if ( !v12 ) + std::__throw_bad_cast(); + if ( v12[28] ) + { + v2 = (char)v12[61]; + v6 = v12[61]; + } + else + { + std::ctype::_M_widen_init((int)v12); + v2 = 32; + v8 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v12 + 24); + v6 = 32; + if ( v8 != std::ctype::do_widen ) + { + v6 = ((int (__thiscall *)(_BYTE *, int))v8)(v12, 32); + v2 = v6; + } + } + *((_BYTE *)lpuexcpt + 116) = v6; + v7 = *(_DWORD *)this; + *((_BYTE *)lpuexcpt + 117) = 1; + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, int, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v13 + 32))( + v13, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + LODWORD(a2), + DWORD1(a2), + HIDWORD(a2)); + if ( v3 ) + std::ios::clear( + (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v18 + *(_DWORD *)(*v18 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v9) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v18 + *(_DWORD *)(*v18 - 12)), + *(_DWORD *)((char *)v18 + *(_DWORD *)(*v18 - 12) + 20) | 1); + } + } + return this; +} +// 4A13C5: variable 'v10' is possibly undefined +// 4A1442: variable 'v3' is possibly undefined +// 4A1496: variable 'v9' is possibly undefined +// 4A1380: using guessed type char var_20[4]; + +//----- (004A1630) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, int a2) +{ + int v2; // ecx + char v3; // dl + int v4; // ecx + char v6; // al + int v7; // eax + int (__stdcall *v8)(unsigned __int8); // edx + int v9; // [esp+0h] [ebp-98h] + std::ostream *v10; // [esp+4h] [ebp-94h] + _BYTE *v11; // [esp+2Ch] [ebp-6Ch] + int v12; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + char v16[4]; // [esp+78h] [ebp-20h] BYREF + _DWORD *v17; // [esp+7Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v16, this, v10); + if ( v16[0] ) + { + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + v12 = *((_DWORD *)lpuexcpt + 32); + if ( !v12 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 117) ) + { + v2 = *((char *)lpuexcpt + 116); + } + else + { + v11 = (_BYTE *)*((_DWORD *)lpuexcpt + 31); + if ( !v11 ) + std::__throw_bad_cast(); + if ( v11[28] ) + { + v2 = (char)v11[61]; + v6 = v11[61]; + } + else + { + std::ctype::_M_widen_init((int)v11); + v2 = 32; + v8 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v11 + 24); + v6 = 32; + if ( v8 != std::ctype::do_widen ) + { + v6 = ((int (__thiscall *)(_BYTE *, int))v8)(v11, 32); + v2 = v6; + } + } + *((_BYTE *)lpuexcpt + 116) = v6; + v7 = *(_DWORD *)this; + *((_BYTE *)lpuexcpt + 117) = 1; + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, int, int))(*(_DWORD *)v12 + 12))( + v12, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + a2); + if ( v3 ) + std::ios::clear( + (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v17 + *(_DWORD *)(*v17 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v9) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v17 + *(_DWORD *)(*v17 - 12)), + *(_DWORD *)((char *)v17 + *(_DWORD *)(*v17 - 12) + 20) | 1); + } + } + return this; +} +// 4A1675: variable 'v10' is possibly undefined +// 4A16F8: variable 'v3' is possibly undefined +// 4A174C: variable 'v9' is possibly undefined +// 4A1630: using guessed type char var_20[4]; + +//----- (004A18E0) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, int a2) +{ + int v2; // ecx + char v3; // dl + int v4; // ecx + char v6; // al + int v7; // eax + int (__stdcall *v8)(unsigned __int8); // edx + int v9; // [esp+0h] [ebp-98h] + std::ostream *v10; // [esp+4h] [ebp-94h] + _BYTE *v11; // [esp+2Ch] [ebp-6Ch] + int v12; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + char v16[4]; // [esp+78h] [ebp-20h] BYREF + _DWORD *v17; // [esp+7Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v16, this, v10); + if ( v16[0] ) + { + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + v12 = *((_DWORD *)lpuexcpt + 32); + if ( !v12 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 117) ) + { + v2 = *((char *)lpuexcpt + 116); + } + else + { + v11 = (_BYTE *)*((_DWORD *)lpuexcpt + 31); + if ( !v11 ) + std::__throw_bad_cast(); + if ( v11[28] ) + { + v2 = (char)v11[61]; + v6 = v11[61]; + } + else + { + std::ctype::_M_widen_init((int)v11); + v2 = 32; + v8 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v11 + 24); + v6 = 32; + if ( v8 != std::ctype::do_widen ) + { + v6 = ((int (__thiscall *)(_BYTE *, int))v8)(v11, 32); + v2 = v6; + } + } + *((_BYTE *)lpuexcpt + 116) = v6; + v7 = *(_DWORD *)this; + *((_BYTE *)lpuexcpt + 117) = 1; + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, int, int))(*(_DWORD *)v12 + 16))( + v12, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + a2); + if ( v3 ) + std::ios::clear( + (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v17 + *(_DWORD *)(*v17 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v9) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v17 + *(_DWORD *)(*v17 - 12)), + *(_DWORD *)((char *)v17 + *(_DWORD *)(*v17 - 12) + 20) | 1); + } + } + return this; +} +// 4A1925: variable 'v10' is possibly undefined +// 4A19A8: variable 'v3' is possibly undefined +// 4A19FC: variable 'v9' is possibly undefined +// 4A18E0: using guessed type char var_20[4]; + +//----- (004A1B90) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::_M_insert(std::ostream::sentry *this, int a2, int a3) +{ + int v3; // ecx + char v4; // dl + int v5; // ecx + char v7; // al + int v8; // eax + int (__stdcall *v9)(unsigned __int8); // edx + int v10; // [esp+0h] [ebp-98h] + std::ostream *v11; // [esp+4h] [ebp-94h] + _BYTE *v12; // [esp+24h] [ebp-74h] + int v13; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + char v17[4]; // [esp+78h] [ebp-20h] BYREF + _DWORD *v18; // [esp+7Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v17, this, v11); + if ( v17[0] ) + { + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + v13 = *((_DWORD *)lpuexcpt + 32); + if ( !v13 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 117) ) + { + v3 = *((char *)lpuexcpt + 116); + } + else + { + v12 = (_BYTE *)*((_DWORD *)lpuexcpt + 31); + if ( !v12 ) + std::__throw_bad_cast(); + if ( v12[28] ) + { + v3 = (char)v12[61]; + v7 = v12[61]; + } + else + { + std::ctype::_M_widen_init((int)v12); + v3 = 32; + v9 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v12 + 24); + v7 = 32; + if ( v9 != std::ctype::do_widen ) + { + v7 = ((int (__thiscall *)(_BYTE *, int))v9)(v12, 32); + v3 = v7; + } + } + *((_BYTE *)lpuexcpt + 116) = v7; + v8 = *(_DWORD *)this; + *((_BYTE *)lpuexcpt + 117) = 1; + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(v8 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, int, int, int))(*(_DWORD *)v13 + 20))( + v13, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v3, + a2, + a3); + if ( v4 ) + std::ios::clear( + (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v18 + *(_DWORD *)(*v18 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v5 = *((_DWORD *)lpuexcpta + 30); + if ( v5 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v5 + 24))(v5, v10) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v18 + *(_DWORD *)(*v18 - 12)), + *(_DWORD *)((char *)v18 + *(_DWORD *)(*v18 - 12) + 20) | 1); + } + } + return this; +} +// 4A1BE1: variable 'v11' is possibly undefined +// 4A1C69: variable 'v4' is possibly undefined +// 4A1CBD: variable 'v10' is possibly undefined +// 4A1B90: using guessed type char var_20[4]; + +//----- (004A1E50) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::_M_insert( + std::ostream::sentry *this, + int a2, + int a3) +{ + int v3; // ecx + char v4; // dl + int v5; // ecx + char v7; // al + int v8; // eax + int (__stdcall *v9)(unsigned __int8); // edx + int v10; // [esp+0h] [ebp-98h] + std::ostream *v11; // [esp+4h] [ebp-94h] + _BYTE *v12; // [esp+24h] [ebp-74h] + int v13; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + char v17[4]; // [esp+78h] [ebp-20h] BYREF + _DWORD *v18; // [esp+7Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v17, this, v11); + if ( v17[0] ) + { + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)); + v13 = *((_DWORD *)lpuexcpt + 32); + if ( !v13 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 117) ) + { + v3 = *((char *)lpuexcpt + 116); + } + else + { + v12 = (_BYTE *)*((_DWORD *)lpuexcpt + 31); + if ( !v12 ) + std::__throw_bad_cast(); + if ( v12[28] ) + { + v3 = (char)v12[61]; + v7 = v12[61]; + } + else + { + std::ctype::_M_widen_init((int)v12); + v3 = 32; + v9 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v12 + 24); + v7 = 32; + if ( v9 != std::ctype::do_widen ) + { + v7 = ((int (__thiscall *)(_BYTE *, int))v9)(v12, 32); + v3 = v7; + } + } + *((_BYTE *)lpuexcpt + 116) = v7; + v8 = *(_DWORD *)this; + *((_BYTE *)lpuexcpt + 117) = 1; + lpuexcpt = (std::ostream::sentry *)((char *)this + *(_DWORD *)(v8 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, int, int, int))(*(_DWORD *)v13 + 24))( + v13, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v3, + a2, + a3); + if ( v4 ) + std::ios::clear( + (std::ostream::sentry *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v18 + *(_DWORD *)(*v18 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v5 = *((_DWORD *)lpuexcpta + 30); + if ( v5 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v5 + 24))(v5, v10) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v18 + *(_DWORD *)(*v18 - 12)), + *(_DWORD *)((char *)v18 + *(_DWORD *)(*v18 - 12) + 20) | 1); + } + } + return this; +} +// 4A1EA1: variable 'v11' is possibly undefined +// 4A1F29: variable 'v4' is possibly undefined +// 4A1F7D: variable 'v10' is possibly undefined +// 4A1E50: using guessed type char var_20[4]; + +//----- (004A2110) -------------------------------------------------------- +void __thiscall std::ostream::ostream(_DWORD *this, _DWORD *a2) +{ + int v2; // eax + std::ios_base *v3; // [esp+4h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v5; // [esp+14h] [ebp-44h] + + v5 = this + 1; + std::ios_base::ios_base(this + 1); + *((_WORD *)this + 60) = 0; + this[29] = 0; + this[31] = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + *this = &off_51A818; + this[1] = off_51A82C; + lpuexcpt = (struct _Unwind_Exception *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_move((int)v5, lpuexcpt, v3); + std::ios::_M_cache_locale(v5, (int)(this + 28)); + v2 = *((_DWORD *)lpuexcpt + 28); + this[31] = 0; + *((_DWORD *)lpuexcpt + 28) = 0; + this[29] = v2; + *((_WORD *)this + 60) = *((_WORD *)lpuexcpt + 58); +} +// 4A21A2: variable 'v3' is possibly undefined +// 51A818: using guessed type void (__cdecl *off_51A818)(std::ostream *__hidden this); +// 51A82C: using guessed type void (__cdecl *off_51A82C[2])(std::ostream *__hidden this); + +//----- (004A2220) -------------------------------------------------------- +void __thiscall std::ostream::ostream(_DWORD *this, int a2) +{ + _DWORD *v2; // [esp+14h] [ebp-44h] + + v2 = this + 1; + std::ios_base::ios_base(this + 1); + this[29] = 0; + *((_WORD *)this + 60) = 0; + this[31] = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + *this = &off_51A818; + this[1] = off_51A82C; + std::ios::init((int)v2, a2); +} +// 51A818: using guessed type void (__cdecl *off_51A818)(std::ostream *__hidden this); +// 51A82C: using guessed type void (__cdecl *off_51A82C[2])(std::ostream *__hidden this); + +//----- (004A2300) -------------------------------------------------------- +int __userpurge std::ostream::ostream@(int a1@, std::ostream *this, std::iostream *a3) +{ + int result; // eax + + std::ios_base::ios_base((_DWORD *)(a1 + 4)); + result = 0; + *(_DWORD *)(a1 + 116) = 0; + *(_WORD *)(a1 + 120) = 0; + *(_DWORD *)(a1 + 124) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + *(_DWORD *)(a1 + 136) = 0; + *(_DWORD *)a1 = &off_51A818; + *(_DWORD *)(a1 + 4) = off_51A82C; + return result; +} +// 51A818: using guessed type void (__cdecl *off_51A818)(std::ostream *__hidden this); +// 51A82C: using guessed type void (__cdecl *off_51A82C[2])(std::ostream *__hidden this); + +//----- (004A2360) -------------------------------------------------------- +void __fastcall std::ostream::ostream(int a1) +{ + int v1; // [esp+14h] [ebp-44h] + + v1 = a1 + 4; + std::ios_base::ios_base((_DWORD *)(a1 + 4)); + *(_DWORD *)(a1 + 116) = 0; + *(_WORD *)(a1 + 120) = 0; + *(_DWORD *)(a1 + 124) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + *(_DWORD *)(a1 + 136) = 0; + *(_DWORD *)a1 = &off_51A818; + *(_DWORD *)(a1 + 4) = off_51A82C; + std::ios::init(v1, 0); +} +// 51A818: using guessed type void (__cdecl *off_51A818)(std::ostream *__hidden this); +// 51A82C: using guessed type void (__cdecl *off_51A82C[2])(std::ostream *__hidden this); + +//----- (004A2440) -------------------------------------------------------- +int __thiscall std::ostream::ostream(_DWORD *this, _DWORD *a2, _DWORD *a3) +{ + int v3; // eax + char *v4; // ebx + std::ios_base *v5; // esi + int v6; // eax + int result; // eax + std::ios_base *v8; // [esp+4h] [ebp-18h] + + v3 = a2[1]; + v4 = (char *)this + *(_DWORD *)(*a2 - 12); + *this = *a2; + *(_DWORD *)v4 = v3; + v5 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v4, v5, v8); + std::ios::_M_cache_locale(v4, (int)(v4 + 108)); + v6 = *((_DWORD *)v5 + 28); + *((_DWORD *)v4 + 30) = 0; + *((_DWORD *)v5 + 28) = 0; + *((_DWORD *)v4 + 28) = v6; + result = *((unsigned __int16 *)v5 + 58); + *((_WORD *)v4 + 58) = result; + return result; +} +// 4A2465: variable 'v8' is possibly undefined + +//----- (004A24B0) -------------------------------------------------------- +BOOL __thiscall std::ostream::ostream(int *this, int *a2, int a3) +{ + int v3; // edx + int v4; // eax + int *v5; // ecx + + v3 = *a2; + v4 = a2[1]; + *this = *a2; + v5 = (int *)((char *)this + *(_DWORD *)(v3 - 12)); + *v5 = v4; + return std::ios::init((int)v5, a3); +} + +//----- (004A24E0) -------------------------------------------------------- +int __thiscall std::ostream::ostream(_DWORD *ecx0, std::ostream *this, std::iostream *a3) +{ + int v3; // edx + int result; // eax + + v3 = *(_DWORD *)this; + result = *((_DWORD *)this + 1); + *ecx0 = *(_DWORD *)this; + *(_DWORD *)((char *)ecx0 + *(_DWORD *)(v3 - 12)) = result; + return result; +} + +//----- (004A2500) -------------------------------------------------------- +BOOL __thiscall std::ostream::ostream(_DWORD *ecx0, std::ostream *this) +{ + int v2; // edx + int v3; // eax + _DWORD *v4; // ecx + + v2 = *(_DWORD *)this; + v3 = *((_DWORD *)this + 1); + *ecx0 = *(_DWORD *)this; + v4 = (_DWORD *)((char *)ecx0 + *(_DWORD *)(v2 - 12)); + *v4 = v3; + return std::ios::init((int)v4, 0); +} + +//----- (004A2520) -------------------------------------------------------- +void __fastcall std::ostream::~ostream(_DWORD *a1) +{ + _DWORD *v2; // ecx + + v2 = a1 + 1; + *(v2 - 1) = &off_51A818; + *v2 = &off_51B7D0; + std::ios_base::~ios_base((int)v2); + operator delete(a1); +} +// 51A818: using guessed type void (__cdecl *off_51A818)(std::ostream *__hidden this); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004A2550) -------------------------------------------------------- +void __fastcall std::ostream::~ostream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + *a1 = &off_51A818; + v1 = a1 + 1; + *v1 = &off_51B7D0; + std::ios_base::~ios_base((int)v1); +} +// 51A818: using guessed type void (__cdecl *off_51A818)(std::ostream *__hidden this); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004A2570) -------------------------------------------------------- +void __thiscall std::ostream::~ostream(_DWORD *ecx0, std::ostream *this) +{ + int v2; // eax + + v2 = *(_DWORD *)this; + *ecx0 = *(_DWORD *)this; + *(_DWORD *)((char *)ecx0 + *(_DWORD *)(v2 - 12)) = *((_DWORD *)this + 1); +} + +//----- (004A2590) -------------------------------------------------------- +_DWORD *__thiscall std::ostream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base *v3; // ebx + std::ios_base **v4; // esi + std::ios_base *v5; // eax + char v6; // dl + char v7; // dl + std::ios_base *v9; // [esp+4h] [ebp-18h] + + v3 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + v4 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + std::ios_base::_M_swap(v4, v3, v9); + std::ios::_M_cache_locale(v4, (int)(v4 + 27)); + std::ios::_M_cache_locale(v3, (int)v3 + 108); + v5 = v4[28]; + v4[28] = (std::ios_base *)*((_DWORD *)v3 + 28); + *((_DWORD *)v3 + 28) = v5; + v6 = *((_BYTE *)v4 + 116); + *((_BYTE *)v4 + 116) = *((_BYTE *)v3 + 116); + LOBYTE(v5) = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 116) = v6; + v7 = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 117) = (_BYTE)v5; + *((_BYTE *)v3 + 117) = v7; + return this; +} +// 4A25CA: variable 'v9' is possibly undefined + +//----- (004A2640) -------------------------------------------------------- +int __thiscall std::ostream::operator<<(void *this, int (__cdecl *a2)(void *)) +{ + return a2(this); +} + +//----- (004A2650) -------------------------------------------------------- +char *__thiscall std::ostream::operator<<(char *this, void (__cdecl *a2)(char *)) +{ + a2(&this[*(_DWORD *)(*(_DWORD *)this - 12)]); + return this; +} + +//----- (004A2670) -------------------------------------------------------- +char *__thiscall std::ostream::operator<<(char *this, void (__cdecl *a2)(char *)) +{ + a2(&this[*(_DWORD *)(*(_DWORD *)this - 12)]); + return this; +} + +//----- (004A26A0) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::operator<<(std::ostream::sentry *this, _DWORD *a2) +{ + char *v2; // ecx + int v3; // eax + int v4; // ecx + int v6; // [esp+0h] [ebp-78h] + std::ostream *v7; // [esp+4h] [ebp-74h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v10; // [esp+57h] [ebp-21h] BYREF + char v11[4]; // [esp+58h] [ebp-20h] BYREF + _DWORD *v12; // [esp+5Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v11, this, v7); + if ( v11[0] ) + { + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + if ( !a2 ) + { + v3 = 1; + goto LABEL_13; + } + if ( !std::__copy_streambufs_eof>(a2, *((_DWORD **)v2 + 30), &v10) ) + { + v3 = 4; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); +LABEL_13: + std::ios::clear(v2, *((_DWORD *)v2 + 5) | v3); + } + } + else if ( !a2 ) + { + v3 = 1; + v2 = (char *)this + *(_DWORD *)(*(_DWORD *)this - 12); + goto LABEL_13; + } + lpuexcpt = (struct _Unwind_Exception *)((char *)v12 + *(_DWORD *)(*v12 - 12)); + if ( (*((_BYTE *)lpuexcpt + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpt + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v6) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v12 + *(_DWORD *)(*v12 - 12)), + *(_DWORD *)((char *)v12 + *(_DWORD *)(*v12 - 12) + 20) | 1); + } + } + return this; +} +// 4A26E2: variable 'v7' is possibly undefined +// 4A277B: variable 'v6' is possibly undefined +// 4A26A0: using guessed type char var_20[4]; + +//----- (004A28B0) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::operator<<(std::ostream::sentry *this, unsigned __int8 a2) +{ + return std::ostream::_M_insert(this, a2); +} + +//----- (004A28E0) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::operator<<(std::ostream::sentry *this, float a2) +{ + return std::ostream::_M_insert(this, a2); +} + +//----- (004A2940) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::operator<<(std::ostream::sentry *this, unsigned __int16 a2) +{ + int v2; // eax + + v2 = *(_DWORD *)((_BYTE *)this + *(_DWORD *)(*(_DWORD *)this - 12) + 12) & 0x4A; + if ( v2 == 64 || v2 == 8 ) + return std::ostream::_M_insert(this, a2); + else + return std::ostream::_M_insert(this, (__int16)a2); +} + +//----- (004A2980) -------------------------------------------------------- +std::ostream::sentry *__thiscall std::ostream::operator<<(std::ostream::sentry *this, unsigned __int16 a2) +{ + return std::ostream::_M_insert(this, a2); +} + +//----- (004A29B0) -------------------------------------------------------- +char *__cdecl std::string::_S_compare(std::string *this, unsigned int a2) +{ + return (char *)this - a2; +} + +//----- (004A29C0) -------------------------------------------------------- +int __thiscall std::string::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004A29D0) -------------------------------------------------------- +int __thiscall std::string::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004A29E0) -------------------------------------------------------- +char *__fastcall std::string::_M_leak_hard(char **a1) +{ + char *result; // eax + unsigned int v3; // [esp+Ch] [ebp-10h] + + if ( *((int *)*a1 - 1) > 0 ) + std::string::_M_mutate(a1, 0, 0, 0, v3); + result = *a1; + *((_DWORD *)*a1 - 1) = -1; + return result; +} +// 4A2A06: variable 'v3' is possibly undefined + +//----- (004A2A20) -------------------------------------------------------- +_DWORD *__cdecl std::string::_S_construct(size_t Size, char a2) +{ + _DWORD *v2; // ebx + _DWORD *result; // eax + + v2 = std::string::_Rep::_S_create(Size, 0); + if ( Size ) + { + if ( Size == 1 ) + *((_BYTE *)v2 + 12) = a2; + else + memset(v2 + 3, a2, Size); + } + v2[2] = 0; + result = v2 + 3; + *v2 = Size; + *((_BYTE *)v2 + Size + 12) = 0; + return result; +} + +//----- (004A2A90) -------------------------------------------------------- +int __cdecl std::string::_S_construct<__gnu_cxx::__normal_iterator>(_BYTE *Src, int a2) +{ + size_t Size; // ebx + size_t *v3; // eax + size_t *v4; // esi + int v5; // ebp + int result; // eax + + Size = a2 - (_DWORD)Src; + v3 = std::string::_Rep::_S_create(a2 - (_DWORD)Src, 0); + v4 = v3; + v5 = (int)(v3 + 3); + if ( a2 - (_DWORD)Src == 1 ) + { + *((_BYTE *)v3 + 12) = *Src; + } + else if ( Size ) + { + memcpy(v3 + 3, Src, Size); + } + v4[2] = 0; + result = v5; + *v4 = Size; + *((_BYTE *)v4 + Size + 12) = 0; + return result; +} + +//----- (004A2B00) -------------------------------------------------------- +int __cdecl std::string::_S_construct(_BYTE *Src, int a2) +{ + size_t Size; // ebx + size_t *v3; // eax + size_t *v4; // esi + int v5; // ebp + int result; // eax + + if ( a2 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a2 - (_DWORD)Src; + v3 = std::string::_Rep::_S_create(a2 - (_DWORD)Src, 0); + v4 = v3; + v5 = (int)(v3 + 3); + if ( a2 - (_DWORD)Src == 1 ) + { + *((_BYTE *)v3 + 12) = *Src; + } + else if ( Size ) + { + memcpy(v3 + 3, Src, Size); + } + v4[2] = 0; + result = v5; + *v4 = Size; + *((_BYTE *)v4 + Size + 12) = 0; + return result; +} + +//----- (004A2B90) -------------------------------------------------------- +int __cdecl std::string::_S_construct(_BYTE *Src, int a2) +{ + size_t Size; // ebx + size_t *v3; // eax + size_t *v4; // esi + int v5; // ebp + int result; // eax + + if ( a2 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a2 - (_DWORD)Src; + v3 = std::string::_Rep::_S_create(a2 - (_DWORD)Src, 0); + v4 = v3; + v5 = (int)(v3 + 3); + if ( a2 - (_DWORD)Src == 1 ) + { + *((_BYTE *)v3 + 12) = *Src; + } + else if ( Size ) + { + memcpy(v3 + 3, Src, Size); + } + v4[2] = 0; + result = v5; + *v4 = Size; + *((_BYTE *)v4 + Size + 12) = 0; + return result; +} + +//----- (004A2C20) -------------------------------------------------------- +void *std::string::_S_empty_rep() +{ + return &std::string::_Rep::_S_empty_rep_storage; +} + +//----- (004A2C30) -------------------------------------------------------- +int __cdecl std::string::_S_copy_chars(_BYTE *a1, unsigned __int8 *Src, size_t Size) +{ + int result; // eax + + result = Size - (_DWORD)Src; + if ( Size - (_DWORD)Src == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( result ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004A2C70) -------------------------------------------------------- +int __cdecl std::string::_S_copy_chars(_BYTE *a1, unsigned __int8 *Src, size_t Size) +{ + int result; // eax + + result = Size - (_DWORD)Src; + if ( Size - (_DWORD)Src == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( result ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004A2CB0) -------------------------------------------------------- +size_t __cdecl std::string::_S_copy_chars(std::string *this, char *Src, size_t Size) +{ + size_t result; // eax + + result = Size - (_DWORD)Src; + if ( Size - (_DWORD)Src == 1 ) + { + result = (unsigned __int8)*Src; + *(_BYTE *)this = result; + } + else if ( result ) + { + return (size_t)memcpy(this, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004A2CF0) -------------------------------------------------------- +size_t __cdecl std::string::_S_copy_chars(std::string *this, char *Src, size_t Size) +{ + size_t result; // eax + + result = Size - (_DWORD)Src; + if ( Size - (_DWORD)Src == 1 ) + { + result = (unsigned __int8)*Src; + *(_BYTE *)this = result; + } + else if ( result ) + { + return (size_t)memcpy(this, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004A2D30) -------------------------------------------------------- +void __fastcall std::string::shrink_to_fit(int *a1) +{ + unsigned int v1; // [esp+4h] [ebp-64h] + + if ( *(_DWORD *)(*a1 - 12) < *(_DWORD *)(*a1 - 8) ) + std::string::reserve(a1, 0, v1); +} +// 4A2D99: variable 'v1' is possibly undefined + +//----- (004A2DC0) -------------------------------------------------------- +char **__userpurge std::string::_M_replace_aux@( + char **a1@, + std::string *this, + unsigned int a3, + size_t Size, + char a5, + char a6) +{ + _BYTE *v7; // edi + unsigned int v9; // [esp+Ch] [ebp-20h] + + if ( Size > a3 + 1073741820 - *((_DWORD *)*a1 - 3) ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + std::string::_M_mutate(a1, (size_t)this, a3, Size, v9); + if ( !Size ) + return a1; + v7 = (char *)this + (_DWORD)*a1; + if ( Size != 1 ) + { + memset(v7, a5, Size); + return a1; + } + *v7 = a5; + return a1; +} +// 4A2DF5: variable 'v9' is possibly undefined + +//----- (004A2E50) -------------------------------------------------------- +char **__userpurge std::string::_M_replace_safe@( + char **a1@, + std::string *this, + unsigned int a3, + _BYTE *Src, + size_t Size, + unsigned int a6) +{ + _BYTE *v7; // edi + unsigned int v9; // [esp+Ch] [ebp-10h] + + std::string::_M_mutate(a1, (size_t)this, a3, Size, v9); + if ( !Size ) + return a1; + v7 = (char *)this + (_DWORD)*a1; + if ( Size != 1 ) + { + memcpy(v7, Src, Size); + return a1; + } + *v7 = *Src; + return a1; +} +// 4A2E6F: variable 'v9' is possibly undefined + +//----- (004A2EC0) -------------------------------------------------------- +_DWORD *__cdecl std::string::_S_construct_aux_2(size_t Size, char a2) +{ + _DWORD *v2; // ebx + _DWORD *result; // eax + + v2 = std::string::_Rep::_S_create(Size, 0); + if ( Size ) + { + if ( Size == 1 ) + *((_BYTE *)v2 + 12) = a2; + else + memset(v2 + 3, a2, Size); + } + v2[2] = 0; + result = v2 + 3; + *v2 = Size; + *((_BYTE *)v2 + Size + 12) = 0; + return result; +} + +//----- (004A2F30) -------------------------------------------------------- +char *__userpurge std::string::at@(char **a1@, std::string *this, unsigned int a3) +{ + char *v3; // eax + char *v6; // eax + unsigned int v7; // [esp+Ch] [ebp-10h] + + v3 = *a1; + if ( (unsigned int)this >= *((_DWORD *)*a1 - 3) ) + std::__throw_out_of_range_fmt( + "basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", + (size_t)this, + *((_DWORD *)*a1 - 3)); + if ( *((int *)v3 - 1) < 0 ) + return &v3[(_DWORD)this]; + if ( *((int *)v3 - 1) > 0 ) + std::string::_M_mutate(a1, 0, 0, 0, v7); + v6 = *a1; + *((_DWORD *)v6 - 1) = -1; + return &v6[(_DWORD)this]; +} +// 4A2F78: variable 'v7' is possibly undefined + +//----- (004A2FB0) -------------------------------------------------------- +char *__fastcall std::string::end(char **a1) +{ + char *v1; // eax + char *v4; // eax + unsigned int v5; // [esp+Ch] [ebp-10h] + + v1 = *a1; + if ( *((int *)*a1 - 1) < 0 ) + return &v1[*((_DWORD *)v1 - 3)]; + if ( *((int *)v1 - 1) > 0 ) + std::string::_M_mutate(a1, 0, 0, 0, v5); + v4 = *a1; + *((_DWORD *)v4 - 1) = -1; + return &v4[*((_DWORD *)v4 - 3)]; +} +// 4A2FE4: variable 'v5' is possibly undefined + +//----- (004A3000) -------------------------------------------------------- +void __thiscall std::string::_Rep::_M_destroy(void *Block, int a2) +{ + operator delete(Block); +} + +//----- (004A3020) -------------------------------------------------------- +void __thiscall std::string::_Rep::_M_dispose(volatile signed __int32 *Block, int a2) +{ + int v2; // eax + + if ( !_CRT_MT ) + { + v2 = *((_DWORD *)Block + 2); + *((_DWORD *)Block + 2) = v2 - 1; + if ( v2 > 0 ) + return; +LABEL_5: + operator delete((void *)Block); + return; + } + if ( _InterlockedExchangeAdd(Block + 2, 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004A3060) -------------------------------------------------------- +int __fastcall std::string::_Rep::_M_refcopy(int a1) +{ + if ( _CRT_MT ) + _InterlockedAdd((volatile signed __int32 *)(a1 + 8), 1u); + else + ++*(_DWORD *)(a1 + 8); + return a1 + 12; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004A3090) -------------------------------------------------------- +int __fastcall std::string::_Rep::_M_refdata(int a1) +{ + return a1 + 12; +} + +//----- (004A30A0) -------------------------------------------------------- +void *std::string::_Rep::_S_empty_rep() +{ + return &std::string::_Rep::_S_empty_rep_storage; +} + +//----- (004A30B0) -------------------------------------------------------- +void __fastcall std::string::_Rep::_M_set_leaked(int a1) +{ + *(_DWORD *)(a1 + 8) = -1; +} + +//----- (004A30C0) -------------------------------------------------------- +void __fastcall std::string::_Rep::_M_set_sharable(int a1) +{ + *(_DWORD *)(a1 + 8) = 0; +} + +//----- (004A30D0) -------------------------------------------------------- +std::string::_Rep *__userpurge std::string::_Rep::_M_set_length_and_sharable@( + _DWORD *a1@, + std::string::_Rep *this, + unsigned int a3) +{ + std::string::_Rep *result; // eax + + result = this; + a1[2] = 0; + *a1 = this; + *((_BYTE *)this + (_DWORD)a1 + 12) = 0; + return result; +} + +//----- (004A30F0) -------------------------------------------------------- +volatile signed __int32 *__thiscall std::string::_Rep::_M_grab(volatile signed __int32 *this, int a2, int a3) +{ + volatile signed __int32 *result; // eax + + if ( *((int *)this + 2) < 0 ) + return std::string::_Rep::_M_clone((int)this, a2, 0); + if ( _CRT_MT ) + { + _InterlockedAdd(this + 2, 1u); + return this + 3; + } + else + { + result = this + 3; + ++*((_DWORD *)this + 2); + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004A3140) -------------------------------------------------------- +_DWORD *__thiscall std::string::_Rep::_M_clone(int this, int a2, int a3) +{ + _DWORD *v4; // ebx + size_t v5; // eax + + v4 = std::string::_Rep::_S_create(a3 + *(_DWORD *)this, *(_DWORD *)(this + 4)); + v5 = *(_DWORD *)this; + if ( *(_DWORD *)this ) + { + if ( v5 == 1 ) + *((_BYTE *)v4 + 12) = *(_BYTE *)(this + 12); + else + memcpy(v4 + 3, (const void *)(this + 12), *(_DWORD *)this); + v5 = *(_DWORD *)this; + } + *v4 = v5; + v4[2] = 0; + *((_BYTE *)v4 + v5 + 12) = 0; + return v4 + 3; +} + +//----- (004A31C0) -------------------------------------------------------- +_DWORD *__cdecl std::string::_Rep::_S_create(unsigned int a1, unsigned int a2) +{ + unsigned int v2; // ebx + size_t v3; // eax + _DWORD *result; // eax + + v2 = a1; + if ( a1 > 0x3FFFFFFC ) + std::__throw_length_error((std::length_error *)"basic_string::_S_create"); + if ( a1 <= a2 ) + { + v3 = a1 + 13; + } + else + { + if ( a1 < 2 * a2 ) + v2 = 2 * a2; + if ( v2 + 29 <= 0x1000 || v2 <= a2 ) + { + v3 = v2 + 13; + if ( (int)(v2 + 13) < 0 ) + std::__throw_bad_alloc(); + } + else + { + v2 = v2 + 4096 - (((_WORD)v2 + 29) & 0xFFF); + if ( v2 > 0x3FFFFFFC ) + v2 = 1073741820; + v3 = v2 + 13; + } + } + result = operator new(v3); + result[1] = v2; + result[2] = 0; + return result; +} + +//----- (004A3250) -------------------------------------------------------- +char *__fastcall std::string::back(char **a1) +{ + char *v1; // eax + int v2; // esi + char *v5; // eax + unsigned int v6; // [esp+Ch] [ebp-10h] + + v1 = *a1; + v2 = *((_DWORD *)*a1 - 3) - 1; + if ( *((int *)*a1 - 1) < 0 ) + return &v1[v2]; + if ( *((int *)v1 - 1) > 0 ) + std::string::_M_mutate(a1, 0, 0, 0, v6); + v5 = *a1; + *((_DWORD *)v5 - 1) = -1; + return &v5[v2]; +} +// 4A3290: variable 'v6' is possibly undefined + +//----- (004A32B0) -------------------------------------------------------- +char **__thiscall std::string::rend(char **ecx0, char **this) +{ + char *v3; // eax + char *v5; // eax + unsigned int v6; // [esp+Ch] [ebp-10h] + + v3 = *this; + if ( *((int *)*this - 1) >= 0 ) + { + if ( *((int *)v3 - 1) > 0 ) + std::string::_M_mutate(this, 0, 0, 0, v6); + v5 = *this; + *((_DWORD *)v5 - 1) = -1; + *ecx0 = v5; + return ecx0; + } + else + { + *ecx0 = v3; + return ecx0; + } +} +// 4A32F0: variable 'v6' is possibly undefined + +//----- (004A3310) -------------------------------------------------------- +int __userpurge std::string::swap@(int *a1@, std::string *this, std::string *a3) +{ + int result; // eax + int v4; // edx + + result = *a1; + if ( *(int *)(*a1 - 4) < 0 ) + *(_DWORD *)(result - 4) = 0; + v4 = *(_DWORD *)this; + if ( *(int *)(*(_DWORD *)this - 4) < 0 ) + *(_DWORD *)(v4 - 4) = 0; + *a1 = v4; + *(_DWORD *)this = result; + return result; +} + +//----- (004A3340) -------------------------------------------------------- +char *__fastcall std::string::begin(char **a1) +{ + char *result; // eax + unsigned int v3; // [esp+Ch] [ebp-10h] + + result = *a1; + if ( *((int *)*a1 - 1) >= 0 ) + { + if ( *((int *)result - 1) > 0 ) + std::string::_M_mutate(a1, 0, 0, 0, v3); + result = *a1; + *((_DWORD *)*a1 - 1) = -1; + } + return result; +} +// 4A3374: variable 'v3' is possibly undefined + +//----- (004A3390) -------------------------------------------------------- +void __fastcall std::string::clear(char **a1) +{ + unsigned int v1; // [esp+Ch] [ebp-10h] + + std::string::_M_mutate(a1, 0, *((_DWORD *)*a1 - 3), 0, v1); +} +// 4A33AB: variable 'v1' is possibly undefined + +//----- (004A33C0) -------------------------------------------------------- +char *__thiscall std::string::erase(char **this, int a2) +{ + size_t v3; // esi + char *v4; // eax + unsigned int v6; // [esp+Ch] [ebp-10h] + + v3 = a2 - (_DWORD)*this; + std::string::_M_mutate(this, v3, 1u, 0, v6); + v4 = *this; + *((_DWORD *)v4 - 1) = -1; + return &v4[v3]; +} +// 4A33E2: variable 'v6' is possibly undefined + +//----- (004A3400) -------------------------------------------------------- +char *__thiscall std::string::erase(char **this, char *a2, char *a3) +{ + char *result; // eax + size_t v5; // ebx + char *v6; // eax + unsigned int v7; // [esp+Ch] [ebp-10h] + + result = a2; + if ( a3 != a2 ) + { + v5 = a2 - *this; + std::string::_M_mutate(this, v5, a3 - a2, 0, v7); + v6 = *this; + *((_DWORD *)v6 - 1) = -1; + return &v6[v5]; + } + return result; +} +// 4A3435: variable 'v7' is possibly undefined + +//----- (004A3450) -------------------------------------------------------- +char **__userpurge std::string::erase@(char **a1@, std::string *this, unsigned int a3, unsigned int a4) +{ + unsigned int v5; // ecx + unsigned int v6; // eax + unsigned int v8; // [esp+Ch] [ebp-10h] + + v5 = *((_DWORD *)*a1 - 3); + v6 = v5 - (_DWORD)this; + if ( v5 - (unsigned int)this > a3 ) + v6 = a3; + if ( (unsigned int)this > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + (size_t)this, + v5); + std::string::_M_mutate(a1, (size_t)this, v6, 0, v8); + return a1; +} +// 4A3482: variable 'v8' is possibly undefined + +//----- (004A34B0) -------------------------------------------------------- +char *__fastcall std::string::front(char **a1) +{ + char *result; // eax + unsigned int v3; // [esp+Ch] [ebp-10h] + + result = *a1; + if ( *((int *)*a1 - 1) >= 0 ) + { + if ( *((int *)result - 1) > 0 ) + std::string::_M_mutate(a1, 0, 0, 0, v3); + result = *a1; + *((_DWORD *)*a1 - 1) = -1; + } + return result; +} +// 4A34E4: variable 'v3' is possibly undefined + +//----- (004A3500) -------------------------------------------------------- +unsigned int *__userpurge std::string::append@(unsigned int *a1@, std::string *this, const char *a3) +{ + size_t v4; // eax + unsigned int v6; // [esp+8h] [ebp-14h] + + v4 = strlen((const char *)this); + return std::string::append(a1, this, v4, v6); +} +// 4A351C: variable 'v6' is possibly undefined + +//----- (004A3530) -------------------------------------------------------- +unsigned int *__userpurge std::string::append@( + unsigned int *a1@, + std::string *this, + size_t Size, + unsigned int a4) +{ + std::string *v5; // ebp + unsigned int v6; // eax + int v7; // esi + std::string *v8; // esi + _BYTE *v9; // eax + int v10; // eax + char *v12; // ebp + bool v13; // cc + void *Src; // [esp+4h] [ebp-28h] + + v5 = this; + if ( Size ) + { + v6 = *a1; + v7 = *(_DWORD *)(*a1 - 12); + if ( Size > 1073741820 - v7 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v8 = (std::string *)(Size + v7); + if ( (unsigned int)v8 > *(_DWORD *)(v6 - 8) || (v13 = *(_DWORD *)(v6 - 4) <= 0, v6 = *a1, !v13) ) + { + if ( v6 <= (unsigned int)this && (unsigned int)this <= v6 + *(_DWORD *)(v6 - 12) ) + { + v12 = (char *)this - v6; + std::string::reserve((int *)a1, v8, (unsigned int)Src); + v5 = (std::string *)&v12[*a1]; + v9 = (_BYTE *)(*(_DWORD *)(*a1 - 12) + *a1); + if ( Size != 1 ) + goto LABEL_8; + goto LABEL_12; + } + std::string::reserve((int *)a1, v8, (unsigned int)Src); + v6 = *a1; + } + v9 = (_BYTE *)(*(_DWORD *)(v6 - 12) + v6); + if ( Size != 1 ) + { +LABEL_8: + memcpy(v9, v5, Size); +LABEL_9: + v10 = *a1; + *(_DWORD *)(v10 - 4) = 0; + *(_DWORD *)(v10 - 12) = v8; + *((_BYTE *)v8 + v10) = 0; + return a1; + } +LABEL_12: + *v9 = *(_BYTE *)v5; + goto LABEL_9; + } + return a1; +} +// 4A3572: variable 'Src' is possibly undefined + +//----- (004A3600) -------------------------------------------------------- +int *__userpurge std::string::append@(int *a1@, std::string *this, const std::string *a3) +{ + size_t Size; // esi + size_t v5; // edi + _BYTE *v6; // edx + _BYTE *v7; // eax + int v8; // eax + void *Src; // [esp+4h] [ebp-28h] + + Size = *(_DWORD *)(*(_DWORD *)this - 12); + if ( Size ) + { + v5 = Size + *(_DWORD *)(*a1 - 12); + if ( v5 > *(_DWORD *)(*a1 - 8) || *(int *)(*a1 - 4) > 0 ) + { + std::string::reserve(a1, (std::string *)(Size + *(_DWORD *)(*a1 - 12)), (unsigned int)Src); + v6 = *(_BYTE **)this; + v7 = (_BYTE *)(*(_DWORD *)(*a1 - 12) + *a1); + if ( Size == 1 ) + { +LABEL_9: + *v7 = *v6; + goto LABEL_5; + } + } + else + { + v6 = *(_BYTE **)this; + v7 = (_BYTE *)(*(_DWORD *)(*a1 - 12) + *a1); + if ( Size == 1 ) + goto LABEL_9; + } + memcpy(v7, v6, Size); +LABEL_5: + v8 = *a1; + *(_DWORD *)(v8 - 4) = 0; + *(_DWORD *)(v8 - 12) = v5; + *(_BYTE *)(v8 + v5) = 0; + } + return a1; +} +// 4A3628: variable 'Src' is possibly undefined + +//----- (004A3690) -------------------------------------------------------- +int *__userpurge std::string::append@( + int *a1@, + std::string *this, + const std::string *a3, + size_t a4, + unsigned int a5) +{ + unsigned int v5; // ebx + size_t Size; // ebx + std::string *v8; // edx + _BYTE *v9; // edi + _BYTE *v10; // eax + int v11; // eax + void *Src; // [esp+4h] [ebp-38h] + std::string *v14; // [esp+1Ch] [ebp-20h] + std::string *v15; // [esp+1Ch] [ebp-20h] + + v5 = *(_DWORD *)(*(_DWORD *)this - 12); + if ( (unsigned int)a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::append", + (size_t)a3, + *(_DWORD *)(*(_DWORD *)this - 12)); + Size = v5 - (_DWORD)a3; + if ( Size > a4 ) + Size = a4; + if ( Size ) + { + v8 = (std::string *)(Size + *(_DWORD *)(*a1 - 12)); + if ( (unsigned int)v8 > *(_DWORD *)(*a1 - 8) || *(int *)(*a1 - 4) > 0 ) + { + v14 = (std::string *)(Size + *(_DWORD *)(*a1 - 12)); + std::string::reserve(a1, v14, (unsigned int)Src); + v8 = v14; + } + v9 = (char *)a3 + *(_DWORD *)this; + v10 = (_BYTE *)(*(_DWORD *)(*a1 - 12) + *a1); + if ( Size == 1 ) + { + *v10 = *v9; + } + else + { + v15 = v8; + memcpy(v10, v9, Size); + v8 = v15; + } + v11 = *a1; + *(_DWORD *)(v11 - 4) = 0; + *(_DWORD *)(v11 - 12) = v8; + *((_BYTE *)v8 + v11) = 0; + } + return a1; +} +// 4A36DA: variable 'Src' is possibly undefined + +//----- (004A3770) -------------------------------------------------------- +int *__userpurge std::string::append@(int *a1@, size_t this, char a3, char a4) +{ + int v5; // edx + int v6; // esi + std::string *v7; // esi + _BYTE *v8; // eax + int v9; // eax + int Val; // [esp+4h] [ebp-28h] + + if ( this ) + { + v5 = *a1; + v6 = *(_DWORD *)(*a1 - 12); + if ( this > 1073741820 - v6 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v7 = (std::string *)(this + v6); + if ( (unsigned int)v7 > *(_DWORD *)(v5 - 8) || *(int *)(v5 - 4) > 0 ) + std::string::reserve(a1, v7, Val); + v8 = (_BYTE *)(*(_DWORD *)(*a1 - 12) + *a1); + if ( this == 1 ) + *v8 = a3; + else + memset(v8, a3, this); + v9 = *a1; + *(_DWORD *)(v9 - 4) = 0; + *(_DWORD *)(v9 - 12) = v7; + *((_BYTE *)v7 + v9) = 0; + } + return a1; +} +// 4A37A8: variable 'Val' is possibly undefined + +//----- (004A3810) -------------------------------------------------------- +_DWORD *__thiscall std::string::assign(_DWORD *this, int *a2) +{ + _DWORD *result; // eax + int v3; // edx + int v4; // ecx + + result = this; + v3 = *this; + if ( *(int *)(*this - 4) < 0 ) + *(_DWORD *)(v3 - 4) = 0; + v4 = *a2; + if ( *(int *)(*a2 - 4) < 0 ) + *(_DWORD *)(v4 - 4) = 0; + *result = v4; + *a2 = v3; + return result; +} + +//----- (004A3850) -------------------------------------------------------- +char **__userpurge std::string::assign@(char **a1@, std::string *this, const char *a3) +{ + size_t v4; // eax + unsigned int v6; // [esp+8h] [ebp-14h] + + v4 = strlen((const char *)this); + return std::string::assign(a1, this, v4, v6); +} +// 4A386C: variable 'v6' is possibly undefined + +//----- (004A3880) -------------------------------------------------------- +char **__userpurge std::string::assign@(char **a1@, std::string *this, size_t Size, unsigned int a4) +{ + char *v4; // eax + unsigned int v5; // edx + bool v7; // cc + char *v8; // eax + char *v9; // eax + unsigned int v11; // [esp+Ch] [ebp-10h] + + v4 = *a1; + v5 = *((_DWORD *)*a1 - 3); + if ( Size > 0x3FFFFFFC ) + std::__throw_length_error((std::length_error *)"basic_string::assign"); + if ( v4 <= (char *)this && &v4[v5] >= (char *)this ) + { + v7 = *((_DWORD *)v4 - 1) <= 0; + v8 = *a1; + if ( !v7 ) + { + v5 = *((_DWORD *)v8 - 3); + goto LABEL_6; + } + if ( Size <= this - (std::string *)v8 ) + { + if ( Size != 1 ) + { + if ( Size ) + { + memcpy(v8, this, Size); + v8 = *a1; + } + goto LABEL_15; + } + } + else + { + if ( this == (std::string *)v8 ) + { +LABEL_15: + *((_DWORD *)v8 - 1) = 0; + *((_DWORD *)v8 - 3) = Size; + v8[Size] = 0; + return a1; + } + if ( Size != 1 ) + { + if ( Size ) + { + memmove(v8, this, Size); + v8 = *a1; + } + goto LABEL_15; + } + } + *v8 = *(_BYTE *)this; + v8 = *a1; + goto LABEL_15; + } +LABEL_6: + std::string::_M_mutate(a1, 0, v5, Size, v11); + if ( !Size ) + return a1; + v9 = *a1; + if ( Size != 1 ) + { + memcpy(v9, this, Size); + return a1; + } + *v9 = *(_BYTE *)this; + return a1; +} +// 4A38D1: variable 'v11' is possibly undefined + +//----- (004A3990) -------------------------------------------------------- +int *__userpurge std::string::assign@(int *a1@, std::string *this, const std::string *a3) +{ + _DWORD *v4; // esi + int v5; // eax + int v6; // edx + char v8[13]; // [esp+1Fh] [ebp-Dh] BYREF + + v4 = *(_DWORD **)this; + if ( *a1 != *(_DWORD *)this ) + { + if ( (int)*(v4 - 1) < 0 ) + { + v4 = std::string::_Rep::_M_clone((int)(v4 - 3), (int)v8, 0); + v5 = *a1; + if ( !_CRT_MT ) + goto LABEL_6; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(v4 - 1, 1u); + else + ++*(v4 - 1); + v5 = *a1; + if ( !_CRT_MT ) + { +LABEL_6: + v6 = *(_DWORD *)(v5 - 4); + *(_DWORD *)(v5 - 4) = v6 - 1; + if ( v6 > 0 ) + { +LABEL_7: + *a1 = (int)v4; + return a1; + } +LABEL_11: + operator delete((void *)(v5 - 12)); + *a1 = (int)v4; + return a1; + } + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v5 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_7; + goto LABEL_11; + } + return a1; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4A3990: using guessed type char var_D[13]; + +//----- (004A3A40) -------------------------------------------------------- +char **__userpurge std::string::assign@( + char **a1@, + std::string *this, + const std::string *a3, + size_t a4, + unsigned int a5) +{ + size_t v5; // eax + unsigned int v7; // [esp+8h] [ebp-14h] + + v5 = *(_DWORD *)(*(_DWORD *)this - 12) - (_DWORD)a3; + if ( v5 > a4 ) + v5 = a4; + if ( (unsigned int)a3 > *(_DWORD *)(*(_DWORD *)this - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::assign", + (size_t)a3, + *(_DWORD *)(*(_DWORD *)this - 12)); + return std::string::assign(a1, (const std::string *)((char *)a3 + *(_DWORD *)this), v5, v7); +} +// 4A3A71: variable 'v7' is possibly undefined + +//----- (004A3AB0) -------------------------------------------------------- +char **__userpurge std::string::assign@(char **a1@, size_t this, char a3, char a4) +{ + char *v5; // edx + unsigned int v7; // [esp+Ch] [ebp-10h] + + if ( this > 0x3FFFFFFC ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + std::string::_M_mutate(a1, 0, *((_DWORD *)*a1 - 3), this, v7); + if ( !this ) + return a1; + v5 = *a1; + if ( this != 1 ) + { + memset(v5, a3, this); + return a1; + } + *v5 = a3; + return a1; +} +// 4A3ADC: variable 'v7' is possibly undefined + +//----- (004A3B30) -------------------------------------------------------- +char **__userpurge std::string::insert@(char **a1@, std::string *a2, char *a3, size_t a4, unsigned int a5) +{ + return std::string::insert(a1, a2 - (std::string *)*a1, a3, a4, a5); +} + +//----- (004A3B40) -------------------------------------------------------- +char *__thiscall std::string::insert(char **this, int a2, char a3) +{ + int v3; // esi + char *v5; // eax + unsigned int v7; // [esp+Ch] [ebp-10h] + + v3 = a2 - (_DWORD)*this; + if ( *((_DWORD *)*this - 3) == 1073741820 ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + std::string::_M_mutate(this, a2 - (_DWORD)*this, 0, 1u, v7); + (*this)[v3] = a3; + v5 = *this; + *((_DWORD *)v5 - 1) = -1; + return &v5[v3]; +} +// 4A3B70: variable 'v7' is possibly undefined + +//----- (004A3BA0) -------------------------------------------------------- +void __thiscall std::string::insert(char **this, int a2, size_t Size, char a4) +{ + size_t v4; // esi + char *v6; // esi + unsigned int v7; // [esp+Ch] [ebp-20h] + + v4 = a2 - (_DWORD)*this; + if ( Size > 1073741820 - *((_DWORD *)*this - 3) ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + std::string::_M_mutate(this, v4, 0, Size, v7); + if ( Size ) + { + v6 = &(*this)[v4]; + if ( Size == 1 ) + *v6 = a4; + else + memset(v6, a4, Size); + } +} +// 4A3BD4: variable 'v7' is possibly undefined + +//----- (004A3C30) -------------------------------------------------------- +char **__userpurge std::string::insert@(char **a1@, std::string *this, char *Str, const char *a4) +{ + size_t v5; // eax + unsigned int v7; // [esp+Ch] [ebp-10h] + + v5 = strlen(Str); + return std::string::insert(a1, (size_t)this, Str, v5, v7); +} +// 4A3C54: variable 'v7' is possibly undefined + +//----- (004A3C70) -------------------------------------------------------- +char **__userpurge std::string::insert@(char **a1@, size_t this, char *Src, size_t Size, unsigned int a5) +{ + char *v5; // edx + size_t v6; // eax + char *v8; // edi + int v10; // ebp + char *v11; // eax + char *v12; // edx + size_t v13; // edi + char *v14; // esi + char *v15; // edx + size_t v16; // eax + unsigned int v17; // [esp+Ch] [ebp-30h] + char *v18; // [esp+1Ch] [ebp-20h] + + v5 = *a1; + v6 = *((_DWORD *)*a1 - 3); + if ( this > v6 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::insert", + this, + *((_DWORD *)*a1 - 3)); + if ( Size > 1073741820 - v6 ) + std::__throw_length_error((std::length_error *)"basic_string::insert"); + if ( v5 <= Src && Src <= &v5[v6] && *((int *)v5 - 1) <= 0 ) + { + v10 = Src - *a1; + std::string::_M_mutate(a1, this, 0, Size, v17); + v11 = &(*a1)[v10]; + v12 = &(*a1)[this]; + if ( &v11[Size] > v12 ) + { + if ( v11 < v12 ) + { + v13 = this - v10; + if ( this - v10 == 1 ) + { + *v12 = *v11; + } + else if ( v13 ) + { + v18 = &(*a1)[this]; + memcpy(v12, v11, v13); + v12 = v18; + } + v14 = &v12[Size]; + v15 = &v12[v13]; + v16 = Size - v13; + if ( Size - v13 == 1 ) + { + *v15 = *v14; + } + else if ( v16 ) + { + memcpy(v15, v14, v16); + } + } + else if ( Size == 1 ) + { + *v12 = v11[1]; + } + else if ( Size ) + { + memcpy(v12, &v11[Size], Size); + } + } + else if ( Size == 1 ) + { + *v12 = *v11; + } + else if ( Size ) + { + memcpy(v12, v11, Size); + } + return a1; + } + std::string::_M_mutate(a1, this, 0, Size, v17); + if ( !Size ) + return a1; + v8 = &(*a1)[this]; + if ( Size != 1 ) + { + memcpy(v8, Src, Size); + return a1; + } + *v8 = *Src; + return a1; +} +// 4A3CC3: variable 'v17' is possibly undefined + +//----- (004A3E20) -------------------------------------------------------- +char **__userpurge std::string::insert@(char **a1@, std::string *this, char **a3, const std::string *a4) +{ + unsigned int v5; // [esp+Ch] [ebp-10h] + + return std::string::insert(a1, (size_t)this, *a3, *((_DWORD *)*a3 - 3), v5); +} +// 4A3E3B: variable 'v5' is possibly undefined + +//----- (004A3E50) -------------------------------------------------------- +char **__userpurge std::string::insert@( + char **a1@, + std::string *this, + _DWORD *a3, + const std::string *a4, + size_t a5, + unsigned int a6) +{ + size_t v6; // eax + unsigned int v8; // [esp+Ch] [ebp-10h] + + v6 = *(_DWORD *)(*a3 - 12) - (_DWORD)a4; + if ( v6 > a5 ) + v6 = a5; + if ( (unsigned int)a4 > *(_DWORD *)(*a3 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::insert", + (size_t)a4, + *(_DWORD *)(*a3 - 12)); + return std::string::insert(a1, (size_t)this, (char *)a4 + *a3, v6, v8); +} +// 4A3E89: variable 'v8' is possibly undefined + +//----- (004A3EC0) -------------------------------------------------------- +char **__userpurge std::string::insert@(char **a1@, std::string *this, size_t Size, char a4, char a5) +{ + unsigned int v5; // edx + _BYTE *v7; // edi + unsigned int v9; // [esp+Ch] [ebp-20h] + + v5 = *((_DWORD *)*a1 - 3); + if ( (unsigned int)this > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::insert", + (size_t)this, + *((_DWORD *)*a1 - 3)); + if ( Size > 1073741820 - v5 ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + std::string::_M_mutate(a1, (size_t)this, 0, Size, v9); + if ( !Size ) + return a1; + v7 = (char *)this + (_DWORD)*a1; + if ( Size != 1 ) + { + memset(v7, a4, Size); + return a1; + } + *v7 = a4; + return a1; +} +// 4A3EF8: variable 'v9' is possibly undefined + +//----- (004A3F70) -------------------------------------------------------- +_DWORD *__thiscall std::string::rbegin(_DWORD *ecx0, char **this) +{ + char *v3; // eax + char *v5; // eax + unsigned int v6; // [esp+Ch] [ebp-10h] + + v3 = *this; + if ( *((int *)*this - 1) >= 0 ) + { + if ( *((int *)v3 - 1) > 0 ) + std::string::_M_mutate(this, 0, 0, 0, v6); + v5 = *this; + *((_DWORD *)v5 - 1) = -1; + *ecx0 = &v5[*((_DWORD *)v5 - 3)]; + return ecx0; + } + else + { + *ecx0 = &v3[*((_DWORD *)v3 - 3)]; + return ecx0; + } +} +// 4A3FB8: variable 'v6' is possibly undefined + +//----- (004A3FE0) -------------------------------------------------------- +void __userpurge std::string::resize(int *a1@, std::string *this, unsigned int a3) +{ + unsigned int v3; // edx + char v4; // [esp+8h] [ebp-14h] + unsigned int v5; // [esp+Ch] [ebp-10h] + + v3 = *(_DWORD *)(*a1 - 12); + if ( (unsigned int)this > 0x3FFFFFFC ) + std::__throw_length_error((std::length_error *)"basic_string::resize"); + if ( (unsigned int)this > v3 ) + { + std::string::append(a1, (size_t)this - v3, 0, v4); + } + else if ( (unsigned int)this < v3 ) + { + std::string::_M_mutate((char **)a1, (size_t)this, v3 - (_DWORD)this, 0, v5); + } +} +// 4A4011: variable 'v5' is possibly undefined +// 4A402D: variable 'v4' is possibly undefined + +//----- (004A4050) -------------------------------------------------------- +void __userpurge std::string::resize(int *a1@, size_t this, char a3, char a4) +{ + unsigned int v4; // edx + unsigned int v5; // [esp+Ch] [ebp-10h] + + v4 = *(_DWORD *)(*a1 - 12); + if ( this > 0x3FFFFFFC ) + std::__throw_length_error((std::length_error *)"basic_string::resize"); + if ( this > v4 ) + { + std::string::append(a1, this - v4, a3, a4); + } + else if ( this < v4 ) + { + std::string::_M_mutate((char **)a1, this, v4 - this, 0, v5); + } +} +// 4A4089: variable 'v5' is possibly undefined + +//----- (004A40D0) -------------------------------------------------------- +size_t __cdecl std::string::_M_copy(std::string *this, char *Src, size_t Size) +{ + size_t result; // eax + + result = Size; + if ( Size == 1 ) + { + result = (unsigned __int8)*Src; + *(_BYTE *)this = result; + } + else if ( Size ) + { + return (size_t)memcpy(this, Src, Size); + } + return result; +} + +//----- (004A4110) -------------------------------------------------------- +std::string *__userpurge std::string::_M_data@(_DWORD *a1@, std::string *this, char *a3) +{ + std::string *result; // eax + + result = this; + *a1 = this; + return result; +} + +//----- (004A4120) -------------------------------------------------------- +char *__fastcall std::string::_M_leak(char **a1) +{ + char *result; // eax + unsigned int v3; // [esp+Ch] [ebp-10h] + + result = *a1; + if ( *((int *)*a1 - 1) >= 0 ) + { + if ( *((int *)result - 1) > 0 ) + std::string::_M_mutate(a1, 0, 0, 0, v3); + result = *a1; + *((_DWORD *)*a1 - 1) = -1; + } + return result; +} +// 4A4154: variable 'v3' is possibly undefined + +//----- (004A4170) -------------------------------------------------------- +size_t __cdecl std::string::_M_move(std::string *this, char *Src, size_t Size) +{ + size_t result; // eax + + result = Size; + if ( Size == 1 ) + { + result = (unsigned __int8)*Src; + *(_BYTE *)this = result; + } + else if ( Size ) + { + return (size_t)memmove(this, Src, Size); + } + return result; +} + +//----- (004A41B0) -------------------------------------------------------- +char **__userpurge std::string::replace@( + char **a1@, + std::string *a2, + int a3, + char *a4, + int a5, + unsigned int a6) +{ + return std::string::replace(a1, a2 - (std::string *)*a1, a3 - (_DWORD)a2, a4, a5 - (_DWORD)a4, a6); +} + +//----- (004A41D0) -------------------------------------------------------- +char **__thiscall std::string::replace(char **this, int a2, int a3, char *Str) +{ + size_t Size; // eax + unsigned int v7; // [esp+10h] [ebp-Ch] + + Size = strlen(Str); + return std::string::replace(this, a2 - (_DWORD)*this, a3 - a2, Str, Size, v7); +} +// 4A4201: variable 'v7' is possibly undefined + +//----- (004A4220) -------------------------------------------------------- +char **__userpurge std::string::replace@( + char **a1@, + std::string *a2, + int a3, + char *a4, + int a5, + unsigned int a6) +{ + return std::string::replace(a1, a2 - (std::string *)*a1, a3 - (_DWORD)a2, a4, a5 - (_DWORD)a4, a6); +} + +//----- (004A4240) -------------------------------------------------------- +char **__userpurge std::string::replace@( + char **a1@, + std::string *a2, + int a3, + char *a4, + size_t a5, + unsigned int a6) +{ + return std::string::replace(a1, a2 - (std::string *)*a1, a3 - (_DWORD)a2, a4, a5, a6); +} + +//----- (004A4260) -------------------------------------------------------- +char **__thiscall std::string::replace(char **this, int a2, int a3, char **a4) +{ + unsigned int v5; // [esp+10h] [ebp-Ch] + + return std::string::replace(this, a2 - (_DWORD)*this, a3 - a2, *a4, *((_DWORD *)*a4 - 3), v5); +} +// 4A4288: variable 'v5' is possibly undefined + +//----- (004A42A0) -------------------------------------------------------- +char **__userpurge std::string::replace@( + char **a1@, + std::string *a2, + int a3, + char *a4, + int a5, + unsigned int a6) +{ + return std::string::replace(a1, a2 - (std::string *)*a1, a3 - (_DWORD)a2, a4, a5 - (_DWORD)a4, a6); +} + +//----- (004A42C0) -------------------------------------------------------- +char **__userpurge std::string::replace@( + char **a1@, + std::string *a2, + int a3, + char *a4, + int a5, + unsigned int a6) +{ + return std::string::replace(a1, a2 - (std::string *)*a1, a3 - (_DWORD)a2, a4, a5 - (_DWORD)a4, a6); +} + +//----- (004A42E0) -------------------------------------------------------- +char **__userpurge std::string::replace@( + char **a1@, + std::string *a2, + int a3, + char *a4, + size_t a5, + unsigned int a6) +{ + return std::string::replace(a1, a2 - (std::string *)*a1, a3 - (_DWORD)a2, a4, a5, a6); +} + +//----- (004A4300) -------------------------------------------------------- +char **__thiscall std::string::replace(char **this, int a2, int a3, size_t Size, char a5) +{ + char *v6; // ecx + size_t v7; // esi + char *v8; // esi + unsigned int v10; // [esp+Ch] [ebp-20h] + + v6 = *this; + v7 = a2 - (_DWORD)v6; + if ( Size > a3 - a2 + 1073741820 - *((_DWORD *)v6 - 3) ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + std::string::_M_mutate(this, v7, a3 - a2, Size, v10); + if ( !Size ) + return this; + v8 = &(*this)[v7]; + if ( Size != 1 ) + { + memset(v8, a5, Size); + return this; + } + *v8 = a5; + return this; +} +// 4A4339: variable 'v10' is possibly undefined + +//----- (004A4390) -------------------------------------------------------- +char **__userpurge std::string::replace@( + char **a1@, + std::string *this, + unsigned int a3, + char *Str, + const char *a5) +{ + size_t Size; // eax + unsigned int v8; // [esp+10h] [ebp-Ch] + + Size = strlen(Str); + return std::string::replace(a1, (size_t)this, a3, Str, Size, v8); +} +// 4A43BC: variable 'v8' is possibly undefined + +//----- (004A43D0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +char **__userpurge std::string::replace@( + char **a1@, + size_t this, + size_t a3, + char *Src, + size_t Size, + unsigned int a6) +{ + char *v6; // edx + size_t v7; // eax + unsigned int v8; // ecx + char *v10; // eax + char *v11; // edx + int v12; // eax + unsigned int v13; // [esp+8h] [ebp-60h] + char *v14; // [esp+10h] [ebp-58h] + char *v15; // [esp+10h] [ebp-58h] + unsigned int v16; // [esp+14h] [ebp-54h] + + v6 = *a1; + v7 = *((_DWORD *)*a1 - 3); + if ( this > v7 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + this, + *((_DWORD *)*a1 - 3)); + v8 = v7 - this; + if ( v7 - this > a3 ) + v8 = a3; + v16 = v8; + if ( Size > v8 - v7 + 1073741820 ) + std::__throw_length_error((std::length_error *)"basic_string::replace"); + if ( v6 > Src || Src > &v6[v7] || *((int *)v6 - 1) > 0 ) + { + std::string::_M_mutate(a1, this, v8, Size, v13); + if ( Size ) + { + if ( Size == 1 ) + (*a1)[this] = *Src; + else + memcpy(&(*a1)[this], Src, Size); + } + return a1; + } + v10 = *a1; + if ( &Src[Size] <= &(*a1)[this] ) + { + v14 = (char *)(Src - v10); +LABEL_15: + std::string::_M_mutate(a1, this, v8, Size, v13); + v11 = &v14[(_DWORD)*a1]; + if ( Size == 1 ) + { + (*a1)[this] = *v11; + } + else if ( Size ) + { + memcpy(&(*a1)[this], v11, Size); + } + return a1; + } + if ( Src >= &v10[this + v8] ) + { + v14 = (char *)(Src - v10 + Size - v8); + goto LABEL_15; + } + LOBYTE(v13) = 0; + v15 = (char *)std::string::_S_construct(Src, (int)&Src[Size]); + std::string::_M_mutate(a1, this, v16, Size, v13); + if ( Size ) + { + if ( Size == 1 ) + (*a1)[this] = *v15; + else + memcpy(&(*a1)[this], v15, Size); + } + if ( _CRT_MT ) + { + v12 = _InterlockedExchangeAdd((volatile signed __int32 *)v15 - 1, 0xFFFFFFFF); + } + else + { + v12 = *((_DWORD *)v15 - 1); + *((_DWORD *)v15 - 1) = v12 - 1; + } + if ( v12 <= 0 ) + operator delete(v15 - 12); + return a1; +} +// 4A4699: positive sp value 4 has been found +// 4A4466: variable 'v13' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004A46B0) -------------------------------------------------------- +char **__userpurge std::string::replace@( + char **a1@, + std::string *this, + unsigned int a3, + char **a4, + const std::string *a5) +{ + unsigned int v6; // [esp+10h] [ebp-Ch] + + return std::string::replace(a1, (size_t)this, a3, *a4, *((_DWORD *)*a4 - 3), v6); +} +// 4A46D3: variable 'v6' is possibly undefined + +//----- (004A46F0) -------------------------------------------------------- +char **__userpurge std::string::replace@( + char **a1@, + std::string *this, + unsigned int a3, + _DWORD *a4, + const std::string *a5, + size_t a6, + unsigned int a7) +{ + size_t Size; // eax + unsigned int v9; // [esp+10h] [ebp-Ch] + + Size = *(_DWORD *)(*a4 - 12) - (_DWORD)a5; + if ( Size > a6 ) + Size = a6; + if ( (unsigned int)a5 > *(_DWORD *)(*a4 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + (size_t)a5, + *(_DWORD *)(*a4 - 12)); + return std::string::replace(a1, (size_t)this, a3, (char *)a5 + *a4, Size, v9); +} +// 4A4731: variable 'v9' is possibly undefined + +//----- (004A4760) -------------------------------------------------------- +char **__userpurge std::string::replace@( + char **a1@, + std::string *this, + unsigned int a3, + size_t a4, + char a5, + char a6) +{ + unsigned int v6; // eax + + v6 = *((_DWORD *)*a1 - 3) - (_DWORD)this; + if ( v6 > a3 ) + v6 = a3; + if ( (unsigned int)this > *((_DWORD *)*a1 - 3) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + (size_t)this, + *((_DWORD *)*a1 - 3)); + return std::string::_M_replace_aux(a1, this, v6, a4, a5, a6); +} + +//----- (004A47D0) -------------------------------------------------------- +void __userpurge std::string::reserve(int *a1@, std::string *this, unsigned int a3) +{ + int v4; // ecx + std::string *v5; // eax + unsigned int v6; // edx + int v7; // ecx + _DWORD *v8; // esi + int v9; // eax + int v10; // edx + char v11[13]; // [esp+1Fh] [ebp-Dh] BYREF + + v4 = *a1; + v5 = this; + if ( this == *(std::string **)(v4 - 8) ) + { + if ( *(int *)(v4 - 4) <= 0 ) + return; + v4 = *a1; + } + v6 = *(_DWORD *)(v4 - 12); + v7 = v4 - 12; + if ( (unsigned int)this < v6 ) + v5 = (std::string *)v6; + v8 = std::string::_Rep::_M_clone(v7, (int)v11, (int)v5 - v6); + v9 = *a1; + if ( _CRT_MT ) + { + v10 = _InterlockedExchangeAdd((volatile signed __int32 *)(v9 - 4), 0xFFFFFFFF); + } + else + { + v10 = *(_DWORD *)(v9 - 4); + *(_DWORD *)(v9 - 4) = v10 - 1; + } + if ( v10 <= 0 ) + operator delete((void *)(v9 - 12)); + *a1 = (int)v8; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4A47D0: using guessed type char var_D[13]; + +//----- (004A4860) -------------------------------------------------------- +void __fastcall std::string::pop_back(char **a1) +{ + unsigned int v1; // eax + unsigned int v2; // [esp+Ch] [ebp-10h] + + v1 = *((_DWORD *)*a1 - 3); + if ( v1 - 1 > v1 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + 0xFFFFFFFF, + 0); + std::string::_M_mutate(a1, v1 - 1, 1u, 0, v2); +} +// 4A4882: variable 'v2' is possibly undefined + +//----- (004A48C0) -------------------------------------------------------- +char *__cdecl std::string::_M_assign(std::string *this, char *Val, size_t Size) +{ + char *result; // eax + + result = Val; + if ( Val == (char *)1 ) + { + *(_BYTE *)this = Size; + } + else if ( Val ) + { + return (char *)memset(this, (char)Size, (size_t)Val); + } + return result; +} + +//----- (004A4900) -------------------------------------------------------- +void __userpurge std::string::_M_mutate( + char **a1@, + size_t this, + unsigned int a3, + unsigned int a4, + unsigned int a5) +{ + int v6; // edi + unsigned int v7; // edx + unsigned int v8; // esi + size_t Size; // edi + _DWORD *v10; // edx + _DWORD *v11; // ebp + size_t v12; // ecx + _DWORD *Src; // eax + _DWORD *v14; // eax + int v15; // edx + _BYTE *v16; // eax + _BYTE *v17; // edx + _BYTE *v18; // ecx + _DWORD *v19; // [esp+18h] [ebp-34h] + + v6 = *((_DWORD *)*a1 - 3); + v7 = *((_DWORD *)*a1 - 2); + v8 = v6 + a4 - a3; + Size = v6 - (this + a3); + if ( v8 > v7 ) + { +LABEL_4: + v10 = std::string::_Rep::_S_create(v8, v7); + v11 = v10 + 3; + v12 = this + a3; + if ( this ) + { + Src = *a1; + v11 = v10 + 3; + if ( this == 1 ) + { + *((_BYTE *)v10 + 12) = *(_BYTE *)Src; + v14 = *a1; + if ( !Size ) + goto LABEL_8; + goto LABEL_12; + } + v19 = v10; + memcpy(v11, Src, this); + v12 = this + a3; + v10 = v19; + } + v14 = *a1; + if ( !Size ) + goto LABEL_8; +LABEL_12: + v16 = (char *)v14 + v12; + v17 = (char *)v10 + this + a4 + 12; + if ( Size != 1 ) + { + memcpy(v17, v16, Size); + v14 = *a1; + if ( !_CRT_MT ) + { +LABEL_9: + v15 = *(v14 - 1); + *(v14 - 1) = v15 - 1; + if ( v15 > 0 ) + { +LABEL_10: + *a1 = (char *)v11; + goto LABEL_11; + } +LABEL_15: + operator delete(v14 - 3); + goto LABEL_10; + } +LABEL_14: + if ( _InterlockedExchangeAdd(v14 - 1, 0xFFFFFFFF) > 0 ) + goto LABEL_10; + goto LABEL_15; + } + *v17 = *v16; + v14 = *a1; +LABEL_8: + if ( !_CRT_MT ) + goto LABEL_9; + goto LABEL_14; + } + if ( *((int *)*a1 - 1) > 0 ) + { + v7 = *((_DWORD *)*a1 - 2); + goto LABEL_4; + } + v11 = *a1; + if ( Size && a4 != a3 ) + { + v18 = (char *)v11 + this + a3; + if ( Size == 1 ) + *((_BYTE *)v11 + this + a4) = *v18; + else + memmove((char *)v11 + this + a4, v18, Size); + v11 = *a1; + } +LABEL_11: + *(v11 - 1) = 0; + *(v11 - 3) = v8; + *((_BYTE *)v11 + v8) = 0; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004A4AB0) -------------------------------------------------------- +int __userpurge std::string::push_back@(int *a1@, std::string *this, char a3) +{ + int v4; // edi + int result; // eax + unsigned int v6; // [esp+4h] [ebp-28h] + + v4 = *(_DWORD *)(*a1 - 12); + if ( (unsigned int)(v4 + 1) > *(_DWORD *)(*a1 - 8) || *(int *)(*a1 - 4) > 0 ) + std::string::reserve(a1, (std::string *)(v4 + 1), v6); + *(_BYTE *)(*a1 + *(_DWORD *)(*a1 - 12)) = (_BYTE)this; + result = *a1; + *(_DWORD *)(result - 4) = 0; + *(_DWORD *)(result - 12) = v4 + 1; + *(_BYTE *)(result + v4 + 1) = 0; + return result; +} +// 4A4AD6: variable 'v6' is possibly undefined + +//----- (004A4B10) -------------------------------------------------------- +_BYTE *__thiscall std::string::string(_DWORD *this, _DWORD *a2) +{ + char *v2; // eax + _BYTE *result; // eax + + *this = *a2; + v2 = (char *)operator new(0xDu); + *((_DWORD *)v2 + 1) = 0; + result = v2 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a2 = result; + return result; +} + +//----- (004A4B50) -------------------------------------------------------- +_BYTE *__thiscall std::string::string(_DWORD *this, _DWORD *a2, int a3) +{ + char *v3; // eax + _BYTE *result; // eax + + *this = *a2; + v3 = (char *)operator new(0xDu); + *((_DWORD *)v3 + 1) = 0; + result = v3 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a2 = result; + return result; +} + +//----- (004A4B90) -------------------------------------------------------- +int __thiscall std::string::string(_DWORD *this, char *Str, int a3) +{ + int v3; // eax + int result; // eax + + v3 = -1; + if ( Str ) + v3 = (int)&Str[strlen(Str)]; + result = std::string::_S_construct(Str, v3); + *this = result; + return result; +} + +//----- (004A4BE0) -------------------------------------------------------- +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, size_t Size, int a4) +{ + int result; // eax + int v6; // ebx + int v7; // edx + int v8; // [esp+1Ch] [ebp-20h] + + if ( &Src[Size] && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + result = (int)std::string::_Rep::_S_create(Size, 0); + v6 = result; + v7 = result + 12; + if ( Size == 1 ) + { + result = *Src; + *(_BYTE *)(v6 + 12) = result; + } + else if ( Size ) + { + v8 = result + 12; + result = (int)memcpy((void *)(result + 12), Src, Size); + v7 = v8; + } + *(_DWORD *)(v6 + 8) = 0; + *(_DWORD *)v6 = Size; + *(_BYTE *)(v6 + Size + 12) = 0; + *this = v7; + return result; +} + +//----- (004A4C80) -------------------------------------------------------- +_BYTE *__thiscall std::string::string(_DWORD *this, int a2) +{ + char *v3; // eax + _BYTE *result; // eax + + v3 = (char *)operator new(0xDu); + *((_DWORD *)v3 + 1) = 0; + result = v3 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *this = result; + return result; +} + +//----- (004A4CC0) -------------------------------------------------------- +_DWORD *__userpurge std::string::string@(_DWORD *a1@, std::string *this, const std::string *a3) +{ + _DWORD *result; // eax + char v5[13]; // [esp+1Fh] [ebp-Dh] BYREF + + result = *(_DWORD **)this; + if ( *(int *)(*(_DWORD *)this - 4) < 0 ) + { + result = std::string::_Rep::_M_clone((int)(result - 3), (int)v5, 0); + *a1 = result; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(result - 1, 1u); + else + ++*(result - 1); + *a1 = result; + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4A4CC0: using guessed type char var_D[13]; + +//----- (004A4D30) -------------------------------------------------------- +_DWORD *__thiscall std::string::string(_DWORD *this, _DWORD *a2, int a3) +{ + _DWORD *result; // eax + + result = (_DWORD *)*a2; + if ( *(int *)(*a2 - 4) < 0 ) + { + result = std::string::_Rep::_M_clone((int)(result - 3), a3, 0); + *this = result; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(result - 1, 1u); + else + ++*(result - 1); + *this = result; + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004A4DA0) -------------------------------------------------------- +int __thiscall std::string::string(int *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v5; // edx + int result; // eax + + v5 = *(_DWORD *)(*a2 - 12); + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + *(_DWORD *)(*a2 - 12)); + result = std::string::_S_construct((_BYTE *)(a3 + *a2), *a2 + v5); + *this = result; + return result; +} + +//----- (004A4E00) -------------------------------------------------------- +int __userpurge std::string::string@( + int *a1@, + std::string *this, + const std::string *a3, + unsigned int a4, + unsigned int a5) +{ + int v6; // edx + unsigned int v7; // eax + char *v8; // eax + int result; // eax + + v6 = *(_DWORD *)this; + v7 = *(_DWORD *)(*(_DWORD *)this - 12) - (_DWORD)a3; + if ( v7 > a4 ) + v7 = a4; + v8 = (char *)a3 + v7 + v6; + if ( (unsigned int)a3 > *(_DWORD *)(*(_DWORD *)this - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + (size_t)a3, + *(_DWORD *)(*(_DWORD *)this - 12)); + result = std::string::_S_construct((_BYTE *)a3 + v6, (int)v8); + *a1 = result; + return result; +} + +//----- (004A4E70) -------------------------------------------------------- +int __thiscall std::string::string(int *this, int *a2, unsigned int a3, unsigned int a4, int a5) +{ + int v6; // edx + unsigned int v7; // eax + int v8; // eax + int result; // eax + + v6 = *a2; + v7 = *(_DWORD *)(*a2 - 12) - a3; + if ( v7 > a4 ) + v7 = a4; + v8 = v6 + a3 + v7; + if ( a3 > *(_DWORD *)(*a2 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + *(_DWORD *)(*a2 - 12)); + result = std::string::_S_construct((_BYTE *)(a3 + v6), v8); + *this = result; + return result; +} + +//----- (004A4EE0) -------------------------------------------------------- +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, size_t Size, int a4) +{ + int result; // eax + int v6; // ebx + int v7; // edx + int v8; // [esp+1Ch] [ebp-20h] + + if ( &Src[Size] && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + result = (int)std::string::_Rep::_S_create(Size, 0); + v6 = result; + v7 = result + 12; + if ( Size == 1 ) + { + result = *Src; + *(_BYTE *)(v6 + 12) = result; + } + else if ( Size ) + { + v8 = result + 12; + result = (int)memcpy((void *)(result + 12), Src, Size); + v7 = v8; + } + *(_DWORD *)(v6 + 8) = 0; + *(_DWORD *)v6 = Size; + *(_BYTE *)(v6 + Size + 12) = 0; + *this = v7; + return result; +} + +//----- (004A4F80) -------------------------------------------------------- +char *__thiscall std::string::string(char **this, size_t Size, char *a3, int a4) +{ + char *result; // eax + char *v6; // ebx + char *v7; // edx + char *v8; // [esp+1Ch] [ebp-20h] + + result = (char *)std::string::_Rep::_S_create(Size, 0); + v6 = result; + v7 = result + 12; + if ( Size ) + { + if ( Size == 1 ) + { + result = a3; + v6[12] = (char)a3; + } + else + { + v8 = result + 12; + result = (char *)memset(v7, (char)a3, Size); + v7 = v8; + } + } + *((_DWORD *)v6 + 2) = 0; + *(_DWORD *)v6 = Size; + v6[Size + 12] = 0; + *this = v7; + return result; +} + +//----- (004A5000) -------------------------------------------------------- +_BYTE *__fastcall std::string::string(_DWORD *a1) +{ + char *v2; // eax + _BYTE *result; // eax + + v2 = (char *)operator new(0xDu); + *((_DWORD *)v2 + 1) = 0; + result = v2 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a1 = result; + return result; +} + +//----- (004A5040) -------------------------------------------------------- +int __thiscall std::string::string<__gnu_cxx::__normal_iterator>( + _DWORD *this, + unsigned __int8 *Src, + int a3, + int a4) +{ + size_t Size; // ebx + int result; // eax + int v7; // esi + int v8; // edx + int v9; // [esp+1Ch] [ebp-20h] + + Size = a3 - (_DWORD)Src; + result = (int)std::string::_Rep::_S_create(a3 - (_DWORD)Src, 0); + v7 = result; + v8 = result + 12; + if ( a3 - (_DWORD)Src == 1 ) + { + result = *Src; + *(_BYTE *)(v7 + 12) = result; + } + else if ( Size ) + { + v9 = result + 12; + result = (int)memcpy((void *)(result + 12), Src, Size); + v8 = v9; + } + *(_DWORD *)(v7 + 8) = 0; + *(_DWORD *)v7 = Size; + *(_BYTE *)(v7 + Size + 12) = 0; + *this = v8; + return result; +} + +//----- (004A50D0) -------------------------------------------------------- +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, int a3, int a4) +{ + size_t Size; // ebx + int result; // eax + int v7; // esi + int v8; // edx + int v9; // [esp+1Ch] [ebp-20h] + + if ( a3 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a3 - (_DWORD)Src; + result = (int)std::string::_Rep::_S_create(a3 - (_DWORD)Src, 0); + v7 = result; + v8 = result + 12; + if ( a3 - (_DWORD)Src == 1 ) + { + result = *Src; + *(_BYTE *)(v7 + 12) = result; + } + else if ( Size ) + { + v9 = result + 12; + result = (int)memcpy((void *)(result + 12), Src, Size); + v8 = v9; + } + *(_DWORD *)(v7 + 8) = 0; + *(_DWORD *)v7 = Size; + *(_BYTE *)(v7 + Size + 12) = 0; + *this = v8; + return result; +} + +//----- (004A5170) -------------------------------------------------------- +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, int a3, int a4) +{ + size_t Size; // ebx + int result; // eax + int v7; // esi + int v8; // edx + int v9; // [esp+1Ch] [ebp-20h] + + if ( a3 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a3 - (_DWORD)Src; + result = (int)std::string::_Rep::_S_create(a3 - (_DWORD)Src, 0); + v7 = result; + v8 = result + 12; + if ( a3 - (_DWORD)Src == 1 ) + { + result = *Src; + *(_BYTE *)(v7 + 12) = result; + } + else if ( Size ) + { + v9 = result + 12; + result = (int)memcpy((void *)(result + 12), Src, Size); + v8 = v9; + } + *(_DWORD *)(v7 + 8) = 0; + *(_DWORD *)v7 = Size; + *(_BYTE *)(v7 + Size + 12) = 0; + *this = v8; + return result; +} + +//----- (004A5210) -------------------------------------------------------- +_BYTE *__thiscall std::string::string(_DWORD *this, _DWORD *a2) +{ + char *v2; // eax + _BYTE *result; // eax + + *this = *a2; + v2 = (char *)operator new(0xDu); + *((_DWORD *)v2 + 1) = 0; + result = v2 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a2 = result; + return result; +} + +//----- (004A5250) -------------------------------------------------------- +_BYTE *__thiscall std::string::string(_DWORD *this, _DWORD *a2, int a3) +{ + char *v3; // eax + _BYTE *result; // eax + + *this = *a2; + v3 = (char *)operator new(0xDu); + *((_DWORD *)v3 + 1) = 0; + result = v3 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a2 = result; + return result; +} + +//----- (004A5290) -------------------------------------------------------- +int __thiscall std::string::string(_DWORD *this, char *Str, int a3) +{ + int v3; // eax + int result; // eax + + v3 = -1; + if ( Str ) + v3 = (int)&Str[strlen(Str)]; + result = std::string::_S_construct(Str, v3); + *this = result; + return result; +} + +//----- (004A52E0) -------------------------------------------------------- +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, size_t Size, int a4) +{ + int result; // eax + int v6; // ebx + int v7; // edx + int v8; // [esp+1Ch] [ebp-20h] + + if ( &Src[Size] && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + result = (int)std::string::_Rep::_S_create(Size, 0); + v6 = result; + v7 = result + 12; + if ( Size == 1 ) + { + result = *Src; + *(_BYTE *)(v6 + 12) = result; + } + else if ( Size ) + { + v8 = result + 12; + result = (int)memcpy((void *)(result + 12), Src, Size); + v7 = v8; + } + *(_DWORD *)(v6 + 8) = 0; + *(_DWORD *)v6 = Size; + *(_BYTE *)(v6 + Size + 12) = 0; + *this = v7; + return result; +} + +//----- (004A5380) -------------------------------------------------------- +_BYTE *__thiscall std::string::string(_DWORD *this, int a2) +{ + char *v3; // eax + _BYTE *result; // eax + + v3 = (char *)operator new(0xDu); + *((_DWORD *)v3 + 1) = 0; + result = v3 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *this = result; + return result; +} + +//----- (004A53C0) -------------------------------------------------------- +_DWORD *__userpurge std::string::string@(_DWORD *a1@, std::string *this, const std::string *a3) +{ + _DWORD *result; // eax + char v5[13]; // [esp+1Fh] [ebp-Dh] BYREF + + result = *(_DWORD **)this; + if ( *(int *)(*(_DWORD *)this - 4) < 0 ) + { + result = std::string::_Rep::_M_clone((int)(result - 3), (int)v5, 0); + *a1 = result; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(result - 1, 1u); + else + ++*(result - 1); + *a1 = result; + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4A53C0: using guessed type char var_D[13]; + +//----- (004A5430) -------------------------------------------------------- +_DWORD *__thiscall std::string::string(_DWORD *this, _DWORD *a2, int a3) +{ + _DWORD *result; // eax + + result = (_DWORD *)*a2; + if ( *(int *)(*a2 - 4) < 0 ) + { + result = std::string::_Rep::_M_clone((int)(result - 3), a3, 0); + *this = result; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(result - 1, 1u); + else + ++*(result - 1); + *this = result; + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004A54A0) -------------------------------------------------------- +int __thiscall std::string::string(int *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v5; // edx + int result; // eax + + v5 = *(_DWORD *)(*a2 - 12); + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + *(_DWORD *)(*a2 - 12)); + result = std::string::_S_construct((_BYTE *)(a3 + *a2), *a2 + v5); + *this = result; + return result; +} + +//----- (004A5500) -------------------------------------------------------- +int __userpurge std::string::string@( + int *a1@, + std::string *this, + const std::string *a3, + unsigned int a4, + unsigned int a5) +{ + int v6; // edx + unsigned int v7; // eax + char *v8; // eax + int result; // eax + + v6 = *(_DWORD *)this; + v7 = *(_DWORD *)(*(_DWORD *)this - 12) - (_DWORD)a3; + if ( v7 > a4 ) + v7 = a4; + v8 = (char *)a3 + v7 + v6; + if ( (unsigned int)a3 > *(_DWORD *)(*(_DWORD *)this - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + (size_t)a3, + *(_DWORD *)(*(_DWORD *)this - 12)); + result = std::string::_S_construct((_BYTE *)a3 + v6, (int)v8); + *a1 = result; + return result; +} + +//----- (004A5570) -------------------------------------------------------- +int __thiscall std::string::string(int *this, int *a2, unsigned int a3, unsigned int a4, int a5) +{ + int v6; // edx + unsigned int v7; // eax + int v8; // eax + int result; // eax + + v6 = *a2; + v7 = *(_DWORD *)(*a2 - 12) - a3; + if ( v7 > a4 ) + v7 = a4; + v8 = v6 + a3 + v7; + if ( a3 > *(_DWORD *)(*a2 - 12) ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + *(_DWORD *)(*a2 - 12)); + result = std::string::_S_construct((_BYTE *)(a3 + v6), v8); + *this = result; + return result; +} + +//----- (004A55E0) -------------------------------------------------------- +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, size_t Size, int a4) +{ + int result; // eax + int v6; // ebx + int v7; // edx + int v8; // [esp+1Ch] [ebp-20h] + + if ( &Src[Size] && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + result = (int)std::string::_Rep::_S_create(Size, 0); + v6 = result; + v7 = result + 12; + if ( Size == 1 ) + { + result = *Src; + *(_BYTE *)(v6 + 12) = result; + } + else if ( Size ) + { + v8 = result + 12; + result = (int)memcpy((void *)(result + 12), Src, Size); + v7 = v8; + } + *(_DWORD *)(v6 + 8) = 0; + *(_DWORD *)v6 = Size; + *(_BYTE *)(v6 + Size + 12) = 0; + *this = v7; + return result; +} + +//----- (004A5680) -------------------------------------------------------- +char *__thiscall std::string::string(char **this, size_t Size, char *a3, int a4) +{ + char *result; // eax + char *v6; // ebx + char *v7; // edx + char *v8; // [esp+1Ch] [ebp-20h] + + result = (char *)std::string::_Rep::_S_create(Size, 0); + v6 = result; + v7 = result + 12; + if ( Size ) + { + if ( Size == 1 ) + { + result = a3; + v6[12] = (char)a3; + } + else + { + v8 = result + 12; + result = (char *)memset(v7, (char)a3, Size); + v7 = v8; + } + } + *((_DWORD *)v6 + 2) = 0; + *(_DWORD *)v6 = Size; + v6[Size + 12] = 0; + *this = v7; + return result; +} + +//----- (004A5700) -------------------------------------------------------- +_BYTE *__fastcall std::string::string(_DWORD *a1) +{ + char *v2; // eax + _BYTE *result; // eax + + v2 = (char *)operator new(0xDu); + *((_DWORD *)v2 + 1) = 0; + result = v2 + 12; + *((_DWORD *)result - 1) = 0; + *((_DWORD *)result - 3) = 0; + *result = 0; + *a1 = result; + return result; +} + +//----- (004A5740) -------------------------------------------------------- +int __thiscall std::string::string<__gnu_cxx::__normal_iterator>( + _DWORD *this, + unsigned __int8 *Src, + int a3, + int a4) +{ + size_t Size; // ebx + int result; // eax + int v7; // esi + int v8; // edx + int v9; // [esp+1Ch] [ebp-20h] + + Size = a3 - (_DWORD)Src; + result = (int)std::string::_Rep::_S_create(a3 - (_DWORD)Src, 0); + v7 = result; + v8 = result + 12; + if ( a3 - (_DWORD)Src == 1 ) + { + result = *Src; + *(_BYTE *)(v7 + 12) = result; + } + else if ( Size ) + { + v9 = result + 12; + result = (int)memcpy((void *)(result + 12), Src, Size); + v8 = v9; + } + *(_DWORD *)(v7 + 8) = 0; + *(_DWORD *)v7 = Size; + *(_BYTE *)(v7 + Size + 12) = 0; + *this = v8; + return result; +} + +//----- (004A57D0) -------------------------------------------------------- +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, int a3, int a4) +{ + size_t Size; // ebx + int result; // eax + int v7; // esi + int v8; // edx + int v9; // [esp+1Ch] [ebp-20h] + + if ( a3 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a3 - (_DWORD)Src; + result = (int)std::string::_Rep::_S_create(a3 - (_DWORD)Src, 0); + v7 = result; + v8 = result + 12; + if ( a3 - (_DWORD)Src == 1 ) + { + result = *Src; + *(_BYTE *)(v7 + 12) = result; + } + else if ( Size ) + { + v9 = result + 12; + result = (int)memcpy((void *)(result + 12), Src, Size); + v8 = v9; + } + *(_DWORD *)(v7 + 8) = 0; + *(_DWORD *)v7 = Size; + *(_BYTE *)(v7 + Size + 12) = 0; + *this = v8; + return result; +} + +//----- (004A5870) -------------------------------------------------------- +int __thiscall std::string::string(_DWORD *this, unsigned __int8 *Src, int a3, int a4) +{ + size_t Size; // ebx + int result; // eax + int v7; // esi + int v8; // edx + int v9; // [esp+1Ch] [ebp-20h] + + if ( a3 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_S_construct null not valid"); + Size = a3 - (_DWORD)Src; + result = (int)std::string::_Rep::_S_create(a3 - (_DWORD)Src, 0); + v7 = result; + v8 = result + 12; + if ( a3 - (_DWORD)Src == 1 ) + { + result = *Src; + *(_BYTE *)(v7 + 12) = result; + } + else if ( Size ) + { + v9 = result + 12; + result = (int)memcpy((void *)(result + 12), Src, Size); + v8 = v9; + } + *(_DWORD *)(v7 + 8) = 0; + *(_DWORD *)v7 = Size; + *(_BYTE *)(v7 + Size + 12) = 0; + *this = v8; + return result; +} + +//----- (004A5910) -------------------------------------------------------- +void __fastcall std::string::~string(int *a1) +{ + int v1; // eax + int v2; // edx + + v1 = *a1; + if ( !_CRT_MT ) + { + v2 = *(_DWORD *)(v1 - 4); + *(_DWORD *)(v1 - 4) = v2 - 1; + if ( v2 > 0 ) + return; +LABEL_5: + operator delete((void *)(v1 - 12)); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v1 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004A5950) -------------------------------------------------------- +void __fastcall std::string::~string(int *a1) +{ + int v1; // eax + int v2; // edx + + v1 = *a1; + if ( !_CRT_MT ) + { + v2 = *(_DWORD *)(v1 - 4); + *(_DWORD *)(v1 - 4) = v2 - 1; + if ( v2 > 0 ) + return; +LABEL_5: + operator delete((void *)(v1 - 12)); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v1 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004A5990) -------------------------------------------------------- +_DWORD *__thiscall std::string::operator=(_DWORD *this, int *a2) +{ + _DWORD *result; // eax + int v3; // edx + int v4; // ecx + + result = this; + v3 = *this; + if ( *(int *)(*this - 4) < 0 ) + *(_DWORD *)(v3 - 4) = 0; + v4 = *a2; + if ( *(int *)(*a2 - 4) < 0 ) + *(_DWORD *)(v4 - 4) = 0; + *result = v4; + *a2 = v3; + return result; +} + +//----- (004A59D0) -------------------------------------------------------- +char **__thiscall std::string::operator=(char **this, std::string *Str) +{ + size_t v3; // eax + unsigned int v5; // [esp+8h] [ebp-14h] + + v3 = strlen((const char *)Str); + return std::string::assign(this, Str, v3, v5); +} +// 4A59EC: variable 'v5' is possibly undefined + +//----- (004A5A00) -------------------------------------------------------- +int *__thiscall std::string::operator=(int *this, _DWORD *a2) +{ + _DWORD *v3; // esi + int v4; // eax + int v5; // edx + char v7[13]; // [esp+1Fh] [ebp-Dh] BYREF + + v3 = (_DWORD *)*a2; + if ( *this != *a2 ) + { + if ( (int)*(v3 - 1) < 0 ) + { + v3 = std::string::_Rep::_M_clone((int)(v3 - 3), (int)v7, 0); + v4 = *this; + if ( !_CRT_MT ) + goto LABEL_6; + } + else + { + if ( _CRT_MT ) + _InterlockedAdd(v3 - 1, 1u); + else + ++*(v3 - 1); + v4 = *this; + if ( !_CRT_MT ) + { +LABEL_6: + v5 = *(_DWORD *)(v4 - 4); + *(_DWORD *)(v4 - 4) = v5 - 1; + if ( v5 > 0 ) + { +LABEL_7: + *this = (int)v3; + return this; + } +LABEL_11: + operator delete((void *)(v4 - 12)); + *this = (int)v3; + return this; + } + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v4 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_7; + goto LABEL_11; + } + return this; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4A5A00: using guessed type char var_D[13]; + +//----- (004A5AB0) -------------------------------------------------------- +char **__thiscall std::string::operator=(char **this, std::string *a2, size_t a3) +{ + unsigned int v5; // [esp+8h] [ebp-14h] + + std::string::assign(this, a2, a3, v5); + return this; +} +// 4A5AC5: variable 'v5' is possibly undefined + +//----- (004A5AE0) -------------------------------------------------------- +char **__thiscall std::string::operator=(char **this, char a2) +{ + unsigned int v4; // [esp+Ch] [ebp-10h] + + std::string::_M_mutate(this, 0, *((_DWORD *)*this - 3), 1u, v4); + **this = a2; + return this; +} +// 4A5B03: variable 'v4' is possibly undefined + +//----- (004A5B20) -------------------------------------------------------- +char *__thiscall std::string::operator[](char **this, int a2) +{ + char *v2; // eax + char *v5; // eax + unsigned int v6; // [esp+Ch] [ebp-10h] + + v2 = *this; + if ( *((int *)*this - 1) < 0 ) + return &v2[a2]; + if ( *((int *)v2 - 1) > 0 ) + std::string::_M_mutate(this, 0, 0, 0, v6); + v5 = *this; + *((_DWORD *)v5 - 1) = -1; + return &v5[a2]; +} +// 4A5B60: variable 'v6' is possibly undefined + +//----- (004A5B80) -------------------------------------------------------- +unsigned int *__thiscall std::string::operator+=(unsigned int *this, std::string *Str) +{ + size_t v3; // eax + unsigned int v5; // [esp+8h] [ebp-14h] + + v3 = strlen((const char *)Str); + return std::string::append(this, Str, v3, v5); +} +// 4A5B9C: variable 'v5' is possibly undefined + +//----- (004A5BD0) -------------------------------------------------------- +int *__thiscall std::string::operator+=(int *this, char a2) +{ + int v3; // edi + int v4; // eax + unsigned int v6; // [esp+4h] [ebp-28h] + + v3 = *(_DWORD *)(*this - 12); + if ( (unsigned int)(v3 + 1) > *(_DWORD *)(*this - 8) || *(int *)(*this - 4) > 0 ) + std::string::reserve(this, (std::string *)(v3 + 1), v6); + *(_BYTE *)(*this + *(_DWORD *)(*this - 12)) = a2; + v4 = *this; + *(_DWORD *)(v4 - 4) = 0; + *(_DWORD *)(v4 - 12) = v3 + 1; + *(_BYTE *)(v4 + v3 + 1) = 0; + return this; +} +// 4A5BF6: variable 'v6' is possibly undefined + +//----- (004A5C30) -------------------------------------------------------- +int __cdecl std::__num_base::_S_format_float(std::__num_base *this, const std::ios_base *a2, char *a3) +{ + int result; // eax + char *v4; // edx + int v5; // edi + _BYTE *v6; // ecx + _BYTE *v7; // esi + int v8; // edx + + result = *((_DWORD *)this + 3); + v4 = (char *)a2 + 1; + *(_BYTE *)a2 = 37; + if ( (result & 0x800) != 0 ) + { + *((_BYTE *)a2 + 1) = 43; + v4 = (char *)a2 + 2; + } + if ( (result & 0x400) != 0 ) + *v4++ = 35; + v5 = result & 0x104; + if ( v5 == 260 ) + { + v6 = v4; + if ( !(_BYTE)a3 ) + goto LABEL_16; +LABEL_12: + *v6++ = (_BYTE)a3; + v7 = v6 + 1; + if ( v5 != 4 ) + goto LABEL_8; +LABEL_13: + *v6 = 102; + *v7 = 0; + return result; + } + v6 = v4 + 2; + *(_WORD *)v4 = 10798; + if ( (_BYTE)a3 ) + goto LABEL_12; + v7 = v4 + 3; + if ( v5 == 4 ) + goto LABEL_13; +LABEL_8: + v8 = result & 0x4000; + if ( v5 == 256 ) + { + result = v8 == 0 ? 101 : 69; + *v6 = result; + *v7 = 0; + return result; + } + if ( v5 != 260 ) + { + result = v8 == 0 ? 103 : 71; + *v6 = result; + *v7 = 0; + return result; + } + v4 = v6; +LABEL_16: + result = (result & 0x4000) == 0 ? 97 : 65; + *v4 = result; + v4[1] = 0; + return result; +} + +//----- (004A5D20) -------------------------------------------------------- +void __fastcall std::bad_typeid::~bad_typeid(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51A83C; + std::exception::~exception(Block); + operator delete(a1); +} +// 4A5D2C: variable 'Block' is possibly undefined +// 51A83C: using guessed type void (__cdecl *off_51A83C)(std::bad_typeid *__hidden this); + +//----- (004A5D50) -------------------------------------------------------- +void __cdecl std::bad_typeid::~bad_typeid(std::exception *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A83C; + std::exception::~exception(a1); +} +// 4A5D50: variable 'v1' is possibly undefined +// 51A83C: using guessed type void (__cdecl *off_51A83C)(std::bad_typeid *__hidden this); + +//----- (004A5D60) -------------------------------------------------------- +int __cdecl std::money_base::_S_construct_pattern() +{ + return std::money_base::_S_default_pattern; +} +// 515480: using guessed type int std::money_base::_S_default_pattern; + +//----- (004A5D70) -------------------------------------------------------- +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int a2, int a3) +{ + _DWORD *v4; // eax + char *v5; // esi + _DWORD *v6; // eax + int result; // eax + + v4 = (_DWORD *)this[2]; + if ( !v4 ) + { + v4 = operator new(0x44u); + *v4 = &off_51B084; + v4[1] = 0; + v4[2] = 0; + v4[3] = 0; + *((_WORD *)v4 + 8) = 0; + *((_BYTE *)v4 + 18) = 0; + v4[5] = 0; + v4[6] = 0; + v4[7] = 0; + v4[8] = 0; + v4[9] = 0; + v4[10] = 0; + v4[11] = 0; + v4[12] = 0; + v4[13] = 0; + *((_BYTE *)v4 + 67) = 0; + this[2] = v4; + } + *((_BYTE *)v4 + 17) = 46; + v5 = std::money_base::_S_atoms; + *(_BYTE *)(this[2] + 18) = 44; + v6 = (_DWORD *)this[2]; + v6[2] = &unk_5110A8; + v6[3] = 0; + v6[5] = &unk_5110A8; + v6[6] = 0; + v6[7] = &unk_5110A8; + v6[8] = 0; + v6[9] = &unk_5110A8; + v6[10] = 0; + v6[11] = 0; + v6[12] = std::money_base::_S_default_pattern; + *(_DWORD *)(this[2] + 52) = std::money_base::_S_default_pattern; + for ( result = 0; result != 11; ++result ) + *(_BYTE *)(this[2] + result + 56) = v5[result]; + return result; +} +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 515480: using guessed type int std::money_base::_S_default_pattern; +// 51B084: using guessed type int (*off_51B084)(); + +//----- (004A5E90) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A850; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A850: using guessed type int (*off_51A850)(); + +//----- (004A5F30) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A850; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A850: using guessed type int (*off_51A850)(); + +//----- (004A5FD0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A850; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A850: using guessed type int (*off_51A850)(); + +//----- (004A6070) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A850; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A850: using guessed type int (*off_51A850)(); + +//----- (004A6110) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A850; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A850: using guessed type int (*off_51A850)(); + +//----- (004A61B0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A850; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A850: using guessed type int (*off_51A850)(); + +//----- (004A6250) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + std::moneypunct::~moneypunct(a1); + operator delete(a1); +} + +//----- (004A62E0) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + void *v1; // edx + void (__fastcall *v2)(void *); // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + void *Block; // [esp+14h] [ebp-48h] + + v1 = (void *)a1[2]; + *a1 = &off_51A850; + Block = v1; + if ( v1 ) + { + v2 = *(void (__fastcall **)(void *))(*(_DWORD *)v1 + 4); + if ( v2 == std::__moneypunct_cache::~__moneypunct_cache ) + { + std::__moneypunct_cache::~__moneypunct_cache((std::locale::facet *)lpfctx); + operator delete(Block); + } + else + { + v2(v1); + } + } + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4A633F: variable 'lpfctx' is possibly undefined +// 51A850: using guessed type int (*off_51A850)(); + +//----- (004A63E0) -------------------------------------------------------- +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int a2, int a3) +{ + _DWORD *v4; // eax + char *v5; // esi + _DWORD *v6; // eax + int result; // eax + + v4 = (_DWORD *)this[2]; + if ( !v4 ) + { + v4 = operator new(0x44u); + *v4 = &off_51B094; + v4[1] = 0; + v4[2] = 0; + v4[3] = 0; + *((_WORD *)v4 + 8) = 0; + *((_BYTE *)v4 + 18) = 0; + v4[5] = 0; + v4[6] = 0; + v4[7] = 0; + v4[8] = 0; + v4[9] = 0; + v4[10] = 0; + v4[11] = 0; + v4[12] = 0; + v4[13] = 0; + *((_BYTE *)v4 + 67) = 0; + this[2] = v4; + } + *((_BYTE *)v4 + 17) = 46; + v5 = std::money_base::_S_atoms; + *(_BYTE *)(this[2] + 18) = 44; + v6 = (_DWORD *)this[2]; + v6[2] = &unk_5110A8; + v6[3] = 0; + v6[5] = &unk_5110A8; + v6[6] = 0; + v6[7] = &unk_5110A8; + v6[8] = 0; + v6[9] = &unk_5110A8; + v6[10] = 0; + v6[11] = 0; + v6[12] = std::money_base::_S_default_pattern; + *(_DWORD *)(this[2] + 52) = std::money_base::_S_default_pattern; + for ( result = 0; result != 11; ++result ) + *(_BYTE *)(this[2] + result + 56) = v5[result]; + return result; +} +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 515480: using guessed type int std::money_base::_S_default_pattern; +// 51B094: using guessed type int (*off_51B094)(); + +//----- (004A6500) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A884; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A884: using guessed type int (*off_51A884)(); + +//----- (004A65A0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A884; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A884: using guessed type int (*off_51A884)(); + +//----- (004A6640) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A884; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A884: using guessed type int (*off_51A884)(); + +//----- (004A66E0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A884; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A884: using guessed type int (*off_51A884)(); + +//----- (004A6780) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A884; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A884: using guessed type int (*off_51A884)(); + +//----- (004A6820) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A884; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A884: using guessed type int (*off_51A884)(); + +//----- (004A68C0) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + std::moneypunct::~moneypunct(a1); + operator delete(a1); +} + +//----- (004A6950) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + void *v1; // edx + void (__fastcall *v2)(void *); // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + void *Block; // [esp+14h] [ebp-48h] + + v1 = (void *)a1[2]; + *a1 = &off_51A884; + Block = v1; + if ( v1 ) + { + v2 = *(void (__fastcall **)(void *))(*(_DWORD *)v1 + 4); + if ( v2 == std::__moneypunct_cache::~__moneypunct_cache ) + { + std::__moneypunct_cache::~__moneypunct_cache((std::locale::facet *)lpfctx); + operator delete(Block); + } + else + { + v2(v1); + } + } + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4A69AF: variable 'lpfctx' is possibly undefined +// 51A884: using guessed type int (*off_51A884)(); + +//----- (004A6A50) -------------------------------------------------------- +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int a2, int a3) +{ + _DWORD *v4; // eax + char *v5; // ebx + int v6; // ecx + int result; // eax + + v4 = (_DWORD *)this[2]; + if ( !v4 ) + { + v4 = operator new(0x54u); + v4[1] = 0; + *v4 = &off_51B0A4; + v4[2] = 0; + v4[3] = 0; + *((_BYTE *)v4 + 16) = 0; + *(_DWORD *)((char *)v4 + 18) = 0; + v4[6] = 0; + v4[7] = 0; + v4[8] = 0; + v4[9] = 0; + v4[10] = 0; + v4[11] = 0; + v4[12] = 0; + v4[13] = 0; + v4[14] = 0; + *((_BYTE *)v4 + 82) = 0; + this[2] = v4; + } + *(_DWORD *)((char *)v4 + 18) = 2883630; + v4[2] = &unk_5110A8; + v5 = std::money_base::_S_atoms; + v4[13] = std::money_base::_S_default_pattern; + v4[3] = 0; + v4[6] = &unk_5110AA; + v4[7] = 0; + v4[8] = &unk_5110AA; + v4[9] = 0; + v4[10] = &unk_5110AA; + v4[11] = 0; + v4[12] = 0; + *(_DWORD *)(this[2] + 56) = std::money_base::_S_default_pattern; + v6 = this[2]; + for ( result = 0; result != 11; ++result ) + *(_WORD *)(v6 + 2 * result + 60) = v5[result]; + return result; +} +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 515480: using guessed type int std::money_base::_S_default_pattern; +// 51B0A4: using guessed type int (*off_51B0A4)(); + +//----- (004A6B70) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A8B8; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A8B8: using guessed type int (*off_51A8B8)(); + +//----- (004A6C10) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A8B8; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A8B8: using guessed type int (*off_51A8B8)(); + +//----- (004A6CB0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A8B8; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A8B8: using guessed type int (*off_51A8B8)(); + +//----- (004A6D50) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A8B8; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A8B8: using guessed type int (*off_51A8B8)(); + +//----- (004A6DF0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A8B8; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A8B8: using guessed type int (*off_51A8B8)(); + +//----- (004A6E90) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A8B8; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A8B8: using guessed type int (*off_51A8B8)(); + +//----- (004A6F30) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + std::moneypunct::~moneypunct(a1); + operator delete(a1); +} + +//----- (004A6FC0) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + void *v1; // edx + void (__fastcall *v2)(void *); // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + void *Block; // [esp+14h] [ebp-48h] + + v1 = (void *)a1[2]; + *a1 = &off_51A8B8; + Block = v1; + if ( v1 ) + { + v2 = *(void (__fastcall **)(void *))(*(_DWORD *)v1 + 4); + if ( v2 == std::__moneypunct_cache::~__moneypunct_cache ) + { + std::__moneypunct_cache::~__moneypunct_cache((std::locale::facet *)lpfctx); + operator delete(Block); + } + else + { + v2(v1); + } + } + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4A701F: variable 'lpfctx' is possibly undefined +// 51A8B8: using guessed type int (*off_51A8B8)(); + +//----- (004A70C0) -------------------------------------------------------- +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int a2, int a3) +{ + _DWORD *v4; // eax + char *v5; // ebx + int v6; // ecx + int result; // eax + + v4 = (_DWORD *)this[2]; + if ( !v4 ) + { + v4 = operator new(0x54u); + v4[1] = 0; + *v4 = &off_51B0B4; + v4[2] = 0; + v4[3] = 0; + *((_BYTE *)v4 + 16) = 0; + *(_DWORD *)((char *)v4 + 18) = 0; + v4[6] = 0; + v4[7] = 0; + v4[8] = 0; + v4[9] = 0; + v4[10] = 0; + v4[11] = 0; + v4[12] = 0; + v4[13] = 0; + v4[14] = 0; + *((_BYTE *)v4 + 82) = 0; + this[2] = v4; + } + *(_DWORD *)((char *)v4 + 18) = 2883630; + v4[2] = &unk_5110A8; + v5 = std::money_base::_S_atoms; + v4[13] = std::money_base::_S_default_pattern; + v4[3] = 0; + v4[6] = &unk_5110AA; + v4[7] = 0; + v4[8] = &unk_5110AA; + v4[9] = 0; + v4[10] = &unk_5110AA; + v4[11] = 0; + v4[12] = 0; + *(_DWORD *)(this[2] + 56) = std::money_base::_S_default_pattern; + v6 = this[2]; + for ( result = 0; result != 11; ++result ) + *(_WORD *)(v6 + 2 * result + 60) = v5[result]; + return result; +} +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 515480: using guessed type int std::money_base::_S_default_pattern; +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (004A71E0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A8EC; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A8EC: using guessed type int (*off_51A8EC)(); + +//----- (004A7280) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A8EC; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A8EC: using guessed type int (*off_51A8EC)(); + +//----- (004A7320) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A8EC; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A8EC: using guessed type int (*off_51A8EC)(); + +//----- (004A73C0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A8EC; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A8EC: using guessed type int (*off_51A8EC)(); + +//----- (004A7460) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A8EC; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A8EC: using guessed type int (*off_51A8EC)(); + +//----- (004A7500) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A8EC; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A8EC: using guessed type int (*off_51A8EC)(); + +//----- (004A75A0) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + std::moneypunct::~moneypunct(a1); + operator delete(a1); +} + +//----- (004A7630) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + void *v1; // edx + void (__fastcall *v2)(void *); // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + void *Block; // [esp+14h] [ebp-48h] + + v1 = (void *)a1[2]; + *a1 = &off_51A8EC; + Block = v1; + if ( v1 ) + { + v2 = *(void (__fastcall **)(void *))(*(_DWORD *)v1 + 4); + if ( v2 == std::__moneypunct_cache::~__moneypunct_cache ) + { + std::__moneypunct_cache::~__moneypunct_cache((std::locale::facet *)lpfctx); + operator delete(Block); + } + else + { + v2(v1); + } + } + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4A768F: variable 'lpfctx' is possibly undefined +// 51A8EC: using guessed type int (*off_51A8EC)(); + +//----- (004A7730) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_initialize_timepunct(_DWORD *this, int a2) +{ + _DWORD *result; // eax + + result = (_DWORD *)this[2]; + if ( !result ) + { + result = operator new(0xC8u); + result[1] = 0; + *result = &off_51AF94; + result[2] = 0; + result[3] = 0; + result[4] = 0; + result[5] = 0; + result[6] = 0; + result[7] = 0; + result[8] = 0; + result[9] = 0; + result[10] = 0; + result[11] = 0; + result[12] = 0; + result[13] = 0; + result[14] = 0; + result[15] = 0; + result[16] = 0; + result[17] = 0; + result[18] = 0; + result[19] = 0; + result[20] = 0; + result[21] = 0; + result[22] = 0; + result[23] = 0; + result[24] = 0; + result[25] = 0; + result[26] = 0; + result[27] = 0; + result[28] = 0; + result[29] = 0; + result[30] = 0; + result[31] = 0; + result[32] = 0; + result[33] = 0; + result[34] = 0; + result[35] = 0; + result[36] = 0; + result[37] = 0; + result[38] = 0; + result[39] = 0; + result[40] = 0; + result[41] = 0; + result[42] = 0; + result[43] = 0; + result[44] = 0; + result[45] = 0; + result[46] = 0; + result[47] = 0; + result[48] = 0; + *((_BYTE *)result + 196) = 0; + this[2] = result; + } + result[2] = "%m/%d/%y"; + result[3] = "%m/%d/%y"; + result[4] = "%H:%M:%S"; + result[5] = "%H:%M:%S"; + result[6] = &off_514522; + result[7] = &off_514522; + result[8] = 5326115; + result[9] = &unk_514526; + result[10] = &off_514522; + result[11] = "Sunday"; + result[12] = "Monday"; + result[13] = "Tuesday"; + result[14] = "Wednesday"; + result[15] = "Thursday"; + result[16] = "Friday"; + result[17] = "Saturday"; + result[18] = &off_514562; + result[19] = &off_514566; + result[20] = &off_51456A; + result[21] = &off_51456E; + result[22] = &off_514572; + result[23] = &off_514576; + result[24] = &off_51457A; + result[25] = "January"; + result[26] = "February"; + result[27] = "March"; + result[28] = "April"; + result[29] = &off_51459B; + result[30] = "June"; + result[31] = "July"; + result[32] = "August"; + result[33] = "September"; + result[34] = "October"; + result[35] = "November"; + result[36] = "December"; + result[37] = &off_5145D4; + result[38] = &off_5145D8; + result[39] = &off_5145DC; + result[40] = &off_5145E0; + result[41] = &off_51459B; + result[42] = &off_5145E4; + result[43] = &off_5145E8; + result[44] = &off_5145EC; + result[45] = &off_5145F0; + result[46] = &off_5145F4; + result[47] = &off_5145F8; + result[48] = &off_5145FC; + return result; +} +// 514522: using guessed type void *off_514522; +// 514562: using guessed type void *off_514562; +// 514566: using guessed type void *off_514566; +// 51456A: using guessed type void *off_51456A; +// 51456E: using guessed type void *off_51456E; +// 514572: using guessed type void *off_514572; +// 514576: using guessed type void *off_514576; +// 51457A: using guessed type void *off_51457A; +// 51459B: using guessed type void *off_51459B; +// 5145D4: using guessed type void *off_5145D4; +// 5145D8: using guessed type void *off_5145D8; +// 5145DC: using guessed type void *off_5145DC; +// 5145E0: using guessed type void *off_5145E0; +// 5145E4: using guessed type void *off_5145E4; +// 5145E8: using guessed type void *off_5145E8; +// 5145EC: using guessed type void *off_5145EC; +// 5145F0: using guessed type void *off_5145F0; +// 5145F4: using guessed type void *off_5145F4; +// 5145F8: using guessed type void *off_5145F8; +// 5145FC: using guessed type void *off_5145FC; +// 51AF94: using guessed type int (*off_51AF94)(); + +//----- (004A7A70) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A920; + this[2] = a2; + this[4] = std::locale::facet::_S_get_c_name(); + std::__timepunct::_M_initialize_timepunct(this, 0); +} +// 51A920: using guessed type int (*off_51A920)(); + +//----- (004A7B10) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2, char *Str1, int a4) +{ + unsigned int v4; // [esp+8h] [ebp-50h] + void *Size; // [esp+10h] [ebp-48h] + const char *c_name; // [esp+14h] [ebp-44h] + + this[1] = a4 != 0; + *this = &off_51A920; + this[2] = 0; + c_name = (const char *)std::locale::facet::_S_get_c_name(); + if ( !strcmp(Str1, c_name) ) + { + this[4] = c_name; + } + else + { + v4 = strlen(Str1) + 1; + Size = (void *)operator new[](v4); + memcpy(Size, Str1, v4); + this[4] = Size; + } + std::__timepunct::_M_initialize_timepunct(this, a2); +} +// 51A920: using guessed type int (*off_51A920)(); + +//----- (004A7C70) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A920; + this[2] = 0; + this[4] = std::locale::facet::_S_get_c_name(); + std::__timepunct::_M_initialize_timepunct(this, 0); +} +// 51A920: using guessed type int (*off_51A920)(); + +//----- (004A7D10) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A920; + this[2] = a2; + this[4] = std::locale::facet::_S_get_c_name(); + std::__timepunct::_M_initialize_timepunct(this, 0); +} +// 51A920: using guessed type int (*off_51A920)(); + +//----- (004A7DB0) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2, char *Str1, int a4) +{ + unsigned int v4; // [esp+8h] [ebp-50h] + void *Size; // [esp+10h] [ebp-48h] + const char *c_name; // [esp+14h] [ebp-44h] + + this[1] = a4 != 0; + *this = &off_51A920; + this[2] = 0; + c_name = (const char *)std::locale::facet::_S_get_c_name(); + if ( !strcmp(Str1, c_name) ) + { + this[4] = c_name; + } + else + { + v4 = strlen(Str1) + 1; + Size = (void *)operator new[](v4); + memcpy(Size, Str1, v4); + this[4] = Size; + } + std::__timepunct::_M_initialize_timepunct(this, a2); +} +// 51A920: using guessed type int (*off_51A920)(); + +//----- (004A7F10) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A920; + this[2] = 0; + this[4] = std::locale::facet::_S_get_c_name(); + std::__timepunct::_M_initialize_timepunct(this, 0); +} +// 51A920: using guessed type int (*off_51A920)(); + +//----- (004A7FB0) -------------------------------------------------------- +void __fastcall std::__timepunct::~__timepunct(_DWORD *Block) +{ + std::__timepunct::~__timepunct(Block); + operator delete(Block); +} + +//----- (004A7FD0) -------------------------------------------------------- +void __fastcall std::__timepunct::~__timepunct(_DWORD *a1) +{ + int **v2; // esi + void *v3; // esi + void (__fastcall *v4)(_DWORD *); // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + struct SjLj_Function_Context *lpfctxa; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A920; + v2 = (int **)a1[4]; + if ( v2 != std::locale::facet::_S_get_c_name() && v2 ) + operator delete[](v2); + v3 = (void *)a1[2]; + if ( v3 ) + { + v4 = *(void (__fastcall **)(_DWORD *))(*(_DWORD *)v3 + 4); + if ( v4 == std::__timepunct_cache::~__timepunct_cache ) + { + *(_DWORD *)v3 = &off_51AF94; + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(v3); + } + else + { + v4((_DWORD *)a1[2]); + } + } + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 3)); + std::locale::facet::~facet((std::locale::facet *)lpfctxa); +} +// 4A802D: variable 'lpfctx' is possibly undefined +// 4A804F: variable 'lpfctxa' is possibly undefined +// 51A920: using guessed type int (*off_51A920)(); +// 51AF94: using guessed type int (*off_51AF94)(); + +//----- (004A8070) -------------------------------------------------------- +void __fastcall std::__timepunct::~__timepunct(_DWORD *a1) +{ + int **v2; // esi + void *v3; // esi + void (__fastcall *v4)(_DWORD *); // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + struct SjLj_Function_Context *lpfctxa; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A920; + v2 = (int **)a1[4]; + if ( v2 != std::locale::facet::_S_get_c_name() && v2 ) + operator delete[](v2); + v3 = (void *)a1[2]; + if ( v3 ) + { + v4 = *(void (__fastcall **)(_DWORD *))(*(_DWORD *)v3 + 4); + if ( v4 == std::__timepunct_cache::~__timepunct_cache ) + { + *(_DWORD *)v3 = &off_51AF94; + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(v3); + } + else + { + v4((_DWORD *)a1[2]); + } + } + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 3)); + std::locale::facet::~facet((std::locale::facet *)lpfctxa); +} +// 4A80CD: variable 'lpfctx' is possibly undefined +// 4A80EF: variable 'lpfctxa' is possibly undefined +// 51A920: using guessed type int (*off_51A920)(); +// 51AF94: using guessed type int (*off_51AF94)(); + +//----- (004A8110) -------------------------------------------------------- +_DWORD *__thiscall std::__timepunct::_M_initialize_timepunct(_DWORD *this, int a2) +{ + _DWORD *result; // eax + + result = (_DWORD *)this[2]; + if ( !result ) + { + result = operator new(0xC8u); + result[1] = 0; + *result = &off_51AFA4; + result[2] = 0; + result[3] = 0; + result[4] = 0; + result[5] = 0; + result[6] = 0; + result[7] = 0; + result[8] = 0; + result[9] = 0; + result[10] = 0; + result[11] = 0; + result[12] = 0; + result[13] = 0; + result[14] = 0; + result[15] = 0; + result[16] = 0; + result[17] = 0; + result[18] = 0; + result[19] = 0; + result[20] = 0; + result[21] = 0; + result[22] = 0; + result[23] = 0; + result[24] = 0; + result[25] = 0; + result[26] = 0; + result[27] = 0; + result[28] = 0; + result[29] = 0; + result[30] = 0; + result[31] = 0; + result[32] = 0; + result[33] = 0; + result[34] = 0; + result[35] = 0; + result[36] = 0; + result[37] = 0; + result[38] = 0; + result[39] = 0; + result[40] = 0; + result[41] = 0; + result[42] = 0; + result[43] = 0; + result[44] = 0; + result[45] = 0; + result[46] = 0; + result[47] = 0; + result[48] = 0; + *((_BYTE *)result + 196) = 0; + this[2] = result; + } + result[2] = &off_514600; + result[3] = &off_514600; + result[4] = "%"; + result[5] = "%"; + result[6] = &unk_514624; + result[7] = &unk_514624; + result[8] = &off_514626; + result[9] = &off_51462C; + result[10] = &unk_514624; + result[11] = &off_514632; + result[12] = &off_514640; + result[13] = &off_51464E; + result[14] = &off_51465E; + result[15] = &off_514672; + result[16] = &off_514684; + result[17] = &off_514692; + result[18] = &off_5146A4; + result[19] = &off_5146AC; + result[20] = &off_5146B4; + result[21] = &off_5146BC; + result[22] = &off_5146C4; + result[23] = &off_5146CC; + result[24] = &off_5146D4; + result[25] = &off_5146DC; + result[26] = &off_5146EC; + result[27] = &off_5146FE; + result[28] = &off_51470A; + result[29] = &off_514716; + result[30] = &off_51471E; + result[31] = &off_514728; + result[32] = &off_514732; + result[33] = &off_514740; + result[34] = &off_514754; + result[35] = &off_514764; + result[36] = &off_514776; + result[37] = &off_514788; + result[38] = &off_514790; + result[39] = &off_514798; + result[40] = &off_5147A0; + result[41] = &off_514716; + result[42] = &off_5147A8; + result[43] = &off_5147B0; + result[44] = &off_5147B8; + result[45] = &off_5147C0; + result[46] = &off_5147C8; + result[47] = &off_5147D0; + result[48] = &off_5147D8; + return result; +} +// 514600: using guessed type void *off_514600; +// 514626: using guessed type void *off_514626; +// 51462C: using guessed type void *off_51462C; +// 514632: using guessed type void *off_514632; +// 514640: using guessed type void *off_514640; +// 51464E: using guessed type void *off_51464E; +// 51465E: using guessed type void *off_51465E; +// 514672: using guessed type void *off_514672; +// 514684: using guessed type void *off_514684; +// 514692: using guessed type void *off_514692; +// 5146A4: using guessed type void *off_5146A4; +// 5146AC: using guessed type void *off_5146AC; +// 5146B4: using guessed type void *off_5146B4; +// 5146BC: using guessed type void *off_5146BC; +// 5146C4: using guessed type void *off_5146C4; +// 5146CC: using guessed type void *off_5146CC; +// 5146D4: using guessed type void *off_5146D4; +// 5146DC: using guessed type void *off_5146DC; +// 5146EC: using guessed type void *off_5146EC; +// 5146FE: using guessed type void *off_5146FE; +// 51470A: using guessed type void *off_51470A; +// 514716: using guessed type void *off_514716; +// 51471E: using guessed type void *off_51471E; +// 514728: using guessed type void *off_514728; +// 514732: using guessed type void *off_514732; +// 514740: using guessed type void *off_514740; +// 514754: using guessed type void *off_514754; +// 514764: using guessed type void *off_514764; +// 514776: using guessed type void *off_514776; +// 514788: using guessed type void *off_514788; +// 514790: using guessed type void *off_514790; +// 514798: using guessed type void *off_514798; +// 5147A0: using guessed type void *off_5147A0; +// 5147A8: using guessed type void *off_5147A8; +// 5147B0: using guessed type void *off_5147B0; +// 5147B8: using guessed type void *off_5147B8; +// 5147C0: using guessed type void *off_5147C0; +// 5147C8: using guessed type void *off_5147C8; +// 5147D0: using guessed type void *off_5147D0; +// 5147D8: using guessed type void *off_5147D8; +// 51AFA4: using guessed type int (*off_51AFA4)(); + +//----- (004A8450) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A930; + this[2] = a2; + this[4] = std::locale::facet::_S_get_c_name(); + std::__timepunct::_M_initialize_timepunct(this, 0); +} +// 51A930: using guessed type int (*off_51A930)(); + +//----- (004A84F0) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2, char *Str1, int a4) +{ + unsigned int v4; // [esp+8h] [ebp-50h] + void *Size; // [esp+10h] [ebp-48h] + const char *c_name; // [esp+14h] [ebp-44h] + + this[1] = a4 != 0; + *this = &off_51A930; + this[2] = 0; + c_name = (const char *)std::locale::facet::_S_get_c_name(); + if ( !strcmp(Str1, c_name) ) + { + this[4] = c_name; + } + else + { + v4 = strlen(Str1) + 1; + Size = (void *)operator new[](v4); + memcpy(Size, Str1, v4); + this[4] = Size; + } + std::__timepunct::_M_initialize_timepunct(this, a2); +} +// 51A930: using guessed type int (*off_51A930)(); + +//----- (004A8650) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A930; + this[2] = 0; + this[4] = std::locale::facet::_S_get_c_name(); + std::__timepunct::_M_initialize_timepunct(this, 0); +} +// 51A930: using guessed type int (*off_51A930)(); + +//----- (004A86F0) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A930; + this[2] = a2; + this[4] = std::locale::facet::_S_get_c_name(); + std::__timepunct::_M_initialize_timepunct(this, 0); +} +// 51A930: using guessed type int (*off_51A930)(); + +//----- (004A8790) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2, char *Str1, int a4) +{ + unsigned int v4; // [esp+8h] [ebp-50h] + void *Size; // [esp+10h] [ebp-48h] + const char *c_name; // [esp+14h] [ebp-44h] + + this[1] = a4 != 0; + *this = &off_51A930; + this[2] = 0; + c_name = (const char *)std::locale::facet::_S_get_c_name(); + if ( !strcmp(Str1, c_name) ) + { + this[4] = c_name; + } + else + { + v4 = strlen(Str1) + 1; + Size = (void *)operator new[](v4); + memcpy(Size, Str1, v4); + this[4] = Size; + } + std::__timepunct::_M_initialize_timepunct(this, a2); +} +// 51A930: using guessed type int (*off_51A930)(); + +//----- (004A88F0) -------------------------------------------------------- +void __thiscall std::__timepunct::__timepunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A930; + this[2] = 0; + this[4] = std::locale::facet::_S_get_c_name(); + std::__timepunct::_M_initialize_timepunct(this, 0); +} +// 51A930: using guessed type int (*off_51A930)(); + +//----- (004A8990) -------------------------------------------------------- +void __fastcall std::__timepunct::~__timepunct(_DWORD *Block) +{ + std::__timepunct::~__timepunct(Block); + operator delete(Block); +} + +//----- (004A89B0) -------------------------------------------------------- +void __fastcall std::__timepunct::~__timepunct(_DWORD *a1) +{ + int **v2; // esi + void *v3; // esi + void (__fastcall *v4)(_DWORD *); // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + struct SjLj_Function_Context *lpfctxa; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A930; + v2 = (int **)a1[4]; + if ( v2 != std::locale::facet::_S_get_c_name() && v2 ) + operator delete[](v2); + v3 = (void *)a1[2]; + if ( v3 ) + { + v4 = *(void (__fastcall **)(_DWORD *))(*(_DWORD *)v3 + 4); + if ( v4 == std::__timepunct_cache::~__timepunct_cache ) + { + *(_DWORD *)v3 = &off_51AFA4; + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(v3); + } + else + { + v4((_DWORD *)a1[2]); + } + } + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 3)); + std::locale::facet::~facet((std::locale::facet *)lpfctxa); +} +// 4A8A0D: variable 'lpfctx' is possibly undefined +// 4A8A2F: variable 'lpfctxa' is possibly undefined +// 51A930: using guessed type int (*off_51A930)(); +// 51AFA4: using guessed type int (*off_51AFA4)(); + +//----- (004A8A50) -------------------------------------------------------- +void __fastcall std::__timepunct::~__timepunct(_DWORD *a1) +{ + int **v2; // esi + void *v3; // esi + void (__fastcall *v4)(_DWORD *); // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + struct SjLj_Function_Context *lpfctxa; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A930; + v2 = (int **)a1[4]; + if ( v2 != std::locale::facet::_S_get_c_name() && v2 ) + operator delete[](v2); + v3 = (void *)a1[2]; + if ( v3 ) + { + v4 = *(void (__fastcall **)(_DWORD *))(*(_DWORD *)v3 + 4); + if ( v4 == std::__timepunct_cache::~__timepunct_cache ) + { + *(_DWORD *)v3 = &off_51AFA4; + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(v3); + } + else + { + v4((_DWORD *)a1[2]); + } + } + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 3)); + std::locale::facet::~facet((std::locale::facet *)lpfctxa); +} +// 4A8AAD: variable 'lpfctx' is possibly undefined +// 4A8ACF: variable 'lpfctxa' is possibly undefined +// 51A930: using guessed type int (*off_51A930)(); +// 51AFA4: using guessed type int (*off_51AFA4)(); + +//----- (004A8AF0) -------------------------------------------------------- +void __userpurge std::logic_error::logic_error(_DWORD *a1@, std::logic_error *this, const char *a3) +{ + int v3; // [esp+5Fh] [ebp-9h] BYREF + + *a1 = &off_51A940; + std::string::string(a1 + 1, (char *)this, (int)&v3); +} +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); + +//----- (004A8B80) -------------------------------------------------------- +void __thiscall std::logic_error::logic_error(_DWORD *this, int a2) +{ + unsigned int v2; // [esp+8h] [ebp-50h] + + *this = &off_51A940; + std::__cow_string::__cow_string(this + 1, *(std::__cow_string **)a2, *(_DWORD *)(a2 + 4), v2); +} +// 4A8BD4: variable 'v2' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); + +//----- (004A8C10) -------------------------------------------------------- +void __userpurge std::logic_error::logic_error(_DWORD *a1@, std::logic_error *this, const std::logic_error *a3) +{ + const std::string *v3; // [esp+4h] [ebp-58h] + + *a1 = &off_51A940; + std::string::string(a1 + 1, (std::logic_error *)((char *)this + 4), v3); +} +// 4A8C4E: variable 'v3' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); + +//----- (004A8C70) -------------------------------------------------------- +void __userpurge std::logic_error::logic_error(_DWORD *a1@, std::logic_error *this, const std::string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-54h] + + *a1 = &off_51A940; + std::string::string(a1 + 1, this, v3); +} +// 4A8CB8: variable 'v3' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); + +//----- (004A8CF0) -------------------------------------------------------- +void __fastcall std::logic_error::~logic_error(void *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + std::logic_error::~logic_error(Block); + operator delete(a1); +} +// 4A8CF6: variable 'Block' is possibly undefined + +//----- (004A8D10) -------------------------------------------------------- +void __cdecl std::logic_error::~logic_error(std::exception *a1) +{ + _DWORD *v1; // ecx + int v2; // eax + int v3; // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *v1 = &off_51A940; + v3 = v1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 > 0 ) + { +LABEL_3: + std::exception::~exception(a1); + return; + } + } + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v5); + std::exception::~exception(a1); +} +// 4A8D1B: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 4A8D10: using guessed type int var_D[3]; + +//----- (004A8D70) -------------------------------------------------------- +int *__thiscall std::logic_error::operator=(int *this, int a2) +{ + const std::string *v4; // [esp+4h] [ebp-58h] + + std::string::assign(this + 1, (std::string *)(a2 + 4), v4); + return this; +} +// 4A8DA8: variable 'v4' is possibly undefined + +//----- (004A8DD0) -------------------------------------------------------- +int *__thiscall std::logic_error::operator=(int *this, int a2) +{ + const std::string *v4; // [esp+4h] [ebp-58h] + + std::string::assign(this + 1, (std::string *)(a2 + 4), v4); + return this; +} +// 4A8E08: variable 'v4' is possibly undefined + +//----- (004A8E30) -------------------------------------------------------- +void __userpurge std::range_error::range_error(_DWORD *a1@, std::range_error *this, const char *a3) +{ + int v4; // [esp+5Fh] [ebp-9h] BYREF + + *a1 = &off_51AB98; + std::string::string(a1 + 1, (char *)this, (int)&v4); + *a1 = &off_51A954; +} +// 51A954: using guessed type void (__cdecl *off_51A954)(std::range_error *__hidden this); +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); + +//----- (004A8EC0) -------------------------------------------------------- +void __thiscall std::range_error::range_error(_DWORD *this, int a2) +{ + unsigned int v2; // [esp+8h] [ebp-50h] + + *this = &off_51AB98; + std::__cow_string::__cow_string(this + 1, *(std::__cow_string **)a2, *(_DWORD *)(a2 + 4), v2); + *this = &off_51A954; +} +// 4A8F14: variable 'v2' is possibly undefined +// 51A954: using guessed type void (__cdecl *off_51A954)(std::range_error *__hidden this); +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); + +//----- (004A8F60) -------------------------------------------------------- +void __userpurge std::range_error::range_error(_DWORD *a1@, std::range_error *this, const std::string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-54h] + + *a1 = &off_51AB98; + std::string::string(a1 + 1, this, v3); + *a1 = &off_51A954; +} +// 4A8FA8: variable 'v3' is possibly undefined +// 51A954: using guessed type void (__cdecl *off_51A954)(std::range_error *__hidden this); +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); + +//----- (004A8FF0) -------------------------------------------------------- +void __fastcall std::range_error::~range_error(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51A954; + std::runtime_error::~runtime_error(Block); + operator delete(a1); +} +// 4A8FFC: variable 'Block' is possibly undefined +// 51A954: using guessed type void (__cdecl *off_51A954)(std::range_error *__hidden this); + +//----- (004A9010) -------------------------------------------------------- +void __cdecl std::range_error::~range_error(std::exception *a1) +{ + _DWORD *v1; // ecx + int v2; // eax + int v3; // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *v1 = &off_51AB98; + v3 = v1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 > 0 ) + { +LABEL_3: + std::exception::~exception(a1); + return; + } + } + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v5); + std::exception::~exception(a1); +} +// 4A901B: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 4A9010: using guessed type int var_D[3]; + +//----- (004A9070) -------------------------------------------------------- +int __usercall std::_Destroy_aux::__destroy *>@( + int a1@, + int a2, + int a3) +{ + volatile signed __int32 **v4; // ecx + + while ( a2 != a3 ) + { + v4 = (volatile signed __int32 **)(a2 + 4); + a2 += 8; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v4); + } + return a1; +} + +//----- (004A9090) -------------------------------------------------------- +int __usercall std::_Destroy_aux::__destroy *>@( + int a1@, + int a2, + int a3) +{ + volatile signed __int32 **v4; // ecx + + while ( a2 != a3 ) + { + v4 = (volatile signed __int32 **)(a2 + 4); + a2 += 8; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v4); + } + return a1; +} + +//----- (004A90B0) -------------------------------------------------------- +int __usercall std::_Destroy_aux::__destroy@(int a1@, void **a2, void **a3) +{ + void **v4; // ecx + + while ( a2 != a3 ) + { + v4 = a2; + a2 += 6; + std::string::_M_dispose(v4); + } + return a1; +} + +//----- (004A90D0) -------------------------------------------------------- +unsigned __int8 *__usercall std::`anonymous namespace'::utf16_span@( + unsigned __int8 *a1@, + unsigned __int8 *a2@, + unsigned int a3@, + unsigned int a4, + char a5) +{ + unsigned int v6; // ebp + unsigned int v7; // esi + unsigned int v8; // ebx + unsigned int utf8_code; // eax + unsigned __int8 *v11[6]; // [esp+8h] [ebp-18h] BYREF + + v11[0] = a1; + v6 = a4; + v11[1] = a2; + if ( (a5 & 4) != 0 + && (unsigned int)(a2 - a1) > 2 + && *(_WORD *)a1 == std::`anonymous namespace'::utf8_bom + && a1[2] == 0xBF ) + { + v11[0] = a1 + 3; + } + if ( a3 > 1 ) + { + v7 = 0; + v8 = 1; + while ( 1 ) + { + utf8_code = std::`anonymous namespace'::read_utf8_code_point(v11, a4); + if ( a4 < utf8_code ) + return v11[0]; + if ( utf8_code <= 0xFFFF ) + v8 = v7; + v7 = v8 + 1; + v8 += 2; + if ( v8 >= a3 ) + goto LABEL_10; + } + } + v8 = 1; +LABEL_10: + if ( a3 != v8 ) + return v11[0]; + if ( a4 >= 0xFFFF ) + v6 = 0xFFFF; + std::`anonymous namespace'::read_utf8_code_point(v11, v6); + return v11[0]; +} +// 515494: using guessed type __int16 std::`anonymous namespace'::utf8_bom; + +//----- (004A91A0) -------------------------------------------------------- +int __cdecl std::`anonymous namespace'::__x86_rdrand() +{ + bool v0; // cf + int v1; // edx + int v4; // [esp+1Ch] [ebp-10h] + + v0 = 0; + v1 = 100; + while ( 1 ) + { + __asm { rdrand eax } + v4 = _EAX; + if ( v0 ) + _EAX = 1; + if ( _EAX ) + break; + v0 = v1-- == 0; + if ( !v1 ) + std::__throw_runtime_error((std::runtime_error *)"random_device: rdrand failed"); + } + return v4; +} + +//----- (004A91E0) -------------------------------------------------------- +int __cdecl std::`anonymous namespace'::__x86_rdseed(std::_anonymous_namespace_ *this) +{ + bool v1; // cf + int v3; // eax + + v1 = 0; + __asm { rdseed eax } + v3 = 99; + do + { + _mm_pause(); + __asm { rdseed edx } + if ( v1 ) + return _EDX; + v1 = v3-- == 0; + } + while ( v3 ); + if ( !this ) + std::__throw_runtime_error((std::runtime_error *)"random_device: rdseed failed"); + return ((int (__cdecl *)(_DWORD))this)(0); +} + +//----- (004A9240) -------------------------------------------------------- +int __cdecl std::`anonymous namespace'::__winxp_rand_s() +{ + int v1[4]; // [esp+1Ch] [ebp-10h] BYREF + + if ( _rand_s((int)v1) ) + std::__throw_runtime_error((std::runtime_error *)"random_device: rand_s failed"); + return v1[0]; +} +// 50B164: using guessed type int (__cdecl *_rand_s)(int); +// 4A9240: using guessed type int var_10[4]; + +//----- (004A9270) -------------------------------------------------------- +int __usercall std::`anonymous namespace'::read_utf16_bom@(int a1@, int *a2@) +{ + int result; // eax + _WORD *v4; // ebx + + result = *a2; + if ( (*a2 & 4) != 0 ) + { + v4 = *(_WORD **)a1; + if ( (unsigned int)(*(_DWORD *)(a1 + 4) - *(_DWORD *)a1) > 1 ) + { + if ( *v4 == 0xFFFE ) + { + result &= ~1u; + *(_DWORD *)a1 = v4 + 1; + *a2 = result; + } + else if ( *v4 == 0xFEFF ) + { + result |= 1u; + *(_DWORD *)a1 = v4 + 1; + *a2 = result; + } + } + } + return result; +} + +//----- (004A92C0) -------------------------------------------------------- +int __cdecl std::`anonymous namespace'::__x86_rdseed_rdrand() +{ + bool v0; // cf + int v2; // eax + + v0 = 0; + __asm { rdseed eax } + v2 = 99; + do + { + _mm_pause(); + __asm { rdseed edx } + if ( v0 ) + return _EDX; + v0 = v2-- == 0; + } + while ( v2 ); + return std::`anonymous namespace'::__x86_rdrand(); +} + +//----- (004A9300) -------------------------------------------------------- +int __usercall std::`anonymous namespace'::read_utf8_code_point@( + unsigned __int8 **a1@, + unsigned int a2@) +{ + unsigned __int8 *v2; // edx + unsigned int v3; // edi + int v4; // ecx + unsigned int v5; // esi + unsigned __int8 v7; // di + unsigned __int8 v8; // di + unsigned __int8 v10; // [esp+7h] [ebp-11h] + + v2 = *a1; + v3 = a1[1] - *a1; + if ( !v3 ) + return -2; + v4 = *v2; + if ( (v4 & 0x80u) == 0 ) + { + v5 = (unsigned __int8)v4; + *a1 = v2 + 1; + return v5; + } + v5 = -1; + if ( (unsigned __int8)v4 <= 0xC1u ) + return v5; + if ( (unsigned __int8)v4 > 0xDFu ) + { + if ( (unsigned __int8)v4 > 0xEFu ) + { + if ( (unsigned __int8)v4 <= 0xF4u ) + { + v5 = -2; + if ( v3 > 3 ) + { + v8 = v2[1]; + v5 = -1; + if ( (v8 & 0xC0) == 0x80 && ((_BYTE)v4 != 0xF0 || v8 > 0x8Fu) ) + { + if ( (_BYTE)v4 != 0xF4 || (v5 = -1, v8 <= 0x8Fu) ) + { + v5 = -1; + v10 = v2[2]; + if ( (v10 & 0xC0) == 0x80 && (v2[3] & 0xC0) == 0x80 ) + { + v5 = (v10 << 6) + (v8 << 12) + (v4 << 18) + v2[3] - 63447168; + if ( v5 <= a2 ) + *a1 = v2 + 4; + } + } + } + } + } + } + else + { + v5 = -2; + if ( v3 > 2 ) + { + v7 = v2[1]; + v5 = -1; + if ( (v7 & 0xC0) == 0x80 && ((_BYTE)v4 != 0xE0 || v7 > 0x9Fu) ) + { + v5 = -1; + if ( (v2[2] & 0xC0) == 0x80 ) + { + v5 = (v7 << 6) + (v4 << 12) + v2[2] - 925824; + if ( a2 >= v5 ) + *a1 = v2 + 3; + } + } + } + } + return v5; + } + if ( v3 != 1 ) + { + if ( (v2[1] & 0xC0) == 0x80 ) + { + v5 = (v4 << 6) + v2[1] - 12416; + if ( a2 >= v5 ) + *a1 = v2 + 2; + } + return v5; + } + return -2; +} + +//----- (004A94C0) -------------------------------------------------------- +int __usercall std::`anonymous namespace'::read_utf8_code_point@( + unsigned __int8 **a1@, + unsigned int a2@) +{ + unsigned __int8 *v2; // edx + unsigned int v3; // edi + int v4; // ecx + unsigned int v5; // esi + unsigned __int8 v7; // di + unsigned __int8 v8; // di + unsigned __int8 v10; // [esp+7h] [ebp-11h] + + v2 = *a1; + v3 = a1[1] - *a1; + if ( !v3 ) + return -2; + v4 = *v2; + if ( (v4 & 0x80u) == 0 ) + { + v5 = (unsigned __int8)v4; + *a1 = v2 + 1; + return v5; + } + v5 = -1; + if ( (unsigned __int8)v4 <= 0xC1u ) + return v5; + if ( (unsigned __int8)v4 > 0xDFu ) + { + if ( (unsigned __int8)v4 > 0xEFu ) + { + if ( (unsigned __int8)v4 <= 0xF4u ) + { + v5 = -2; + if ( v3 > 3 ) + { + v8 = v2[1]; + v5 = -1; + if ( (v8 & 0xC0) == 0x80 && ((_BYTE)v4 != 0xF0 || v8 > 0x8Fu) ) + { + if ( (_BYTE)v4 != 0xF4 || (v5 = -1, v8 <= 0x8Fu) ) + { + v5 = -1; + v10 = v2[2]; + if ( (v10 & 0xC0) == 0x80 && (v2[3] & 0xC0) == 0x80 ) + { + v5 = (v10 << 6) + (v8 << 12) + (v4 << 18) + v2[3] - 63447168; + if ( v5 <= a2 ) + *a1 = v2 + 4; + } + } + } + } + } + } + else + { + v5 = -2; + if ( v3 > 2 ) + { + v7 = v2[1]; + v5 = -1; + if ( (v7 & 0xC0) == 0x80 && ((_BYTE)v4 != 0xE0 || v7 > 0x9Fu) ) + { + v5 = -1; + if ( (v2[2] & 0xC0) == 0x80 ) + { + v5 = (v7 << 6) + (v4 << 12) + v2[2] - 925824; + if ( a2 >= v5 ) + *a1 = v2 + 3; + } + } + } + } + return v5; + } + if ( v3 != 1 ) + { + if ( (v2[1] & 0xC0) == 0x80 ) + { + v5 = (v4 << 6) + v2[1] - 12416; + if ( a2 >= v5 ) + *a1 = v2 + 2; + } + return v5; + } + return -2; +} + +//----- (004A9680) -------------------------------------------------------- +int __usercall std::`anonymous namespace'::write_utf8_code_point@(int a1@, unsigned int a2@) +{ + _BYTE *v3; // esi + int v4; // ecx + int result; // eax + _BYTE *v6; // ecx + int v7; // esi + _BYTE *v8; // ecx + + if ( a2 > 0x7FF ) + { + if ( a2 > 0xFFFF ) + { + result = 0; + if ( a2 <= 0x10FFFF ) + { + v8 = *(_BYTE **)a1; + if ( (unsigned int)(*(_DWORD *)(a1 + 4) - *(_DWORD *)a1) > 3 ) + { + *v8 = (a2 >> 18) - 16; + v8[1] = ((a2 >> 12) & 0x3F) + 0x80; + v8[2] = ((a2 >> 6) & 0x3F) + 0x80; + *(_DWORD *)a1 = v8 + 4; + result = 1; + v8[3] = (a2 & 0x3F) + 0x80; + } + } + } + else + { + v6 = *(_BYTE **)a1; + v7 = *(_DWORD *)(a1 + 4); + result = 0; + if ( (unsigned int)(v7 - (_DWORD)v6) > 2 ) + { + *v6 = (a2 >> 12) - 32; + v6[1] = ((a2 >> 6) & 0x3F) + 0x80; + *(_DWORD *)a1 = v6 + 3; + result = 1; + v6[2] = (a2 & 0x3F) + 0x80; + } + } + } + else + { + v3 = *(_BYTE **)a1; + v4 = *(_DWORD *)(a1 + 4); + result = 0; + if ( (unsigned int)(v4 - (_DWORD)v3) > 1 ) + { + *v3 = (a2 >> 6) - 64; + *(_DWORD *)a1 = v3 + 2; + result = 1; + v3[1] = (a2 & 0x3F) + 0x80; + } + } + return result; +} + +//----- (004A9760) -------------------------------------------------------- +int __usercall std::`anonymous namespace'::write_utf8_code_point@(_BYTE **a1@, unsigned int a2@) +{ + _BYTE *v3; // eax + int result; // eax + _BYTE *v5; // esi + _BYTE *v6; // ebx + _BYTE *v7; // eax + _BYTE *v8; // esi + _BYTE *v9; // ebx + _BYTE *v10; // ebx + _BYTE *v11; // esi + _BYTE *v12; // ebx + + if ( a2 <= 0x7F ) + { + v3 = *a1; + if ( a1[1] == v3 ) + return 0; + *a1 = v3 + 1; + *v3 = a2; + return 1; + } + if ( a2 <= 0x7FF ) + { + v5 = *a1; + v6 = a1[1]; + result = 0; + if ( (unsigned int)(v6 - v5) <= 1 ) + return result; + *a1 = v5 + 1; + *v5 = (a2 >> 6) - 64; +LABEL_8: + v7 = (*a1)++; + *v7 = (a2 & 0x3F) + 0x80; + return 1; + } + if ( a2 <= 0xFFFF ) + { + v11 = *a1; + v12 = a1[1]; + result = 0; + if ( (unsigned int)(v12 - v11) <= 2 ) + return result; + *a1 = v11 + 1; + *v11 = (a2 >> 12) - 32; + goto LABEL_13; + } + result = 0; + if ( a2 <= 0x10FFFF ) + { + v8 = *a1; + if ( (unsigned int)(a1[1] - *a1) > 3 ) + { + *a1 = v8 + 1; + *v8 = (a2 >> 18) - 16; + v9 = (*a1)++; + *v9 = ((a2 >> 12) & 0x3F) + 0x80; +LABEL_13: + v10 = (*a1)++; + *v10 = ((a2 >> 6) & 0x3F) + 0x80; + goto LABEL_8; + } + } + return result; +} + +//----- (004A9850) -------------------------------------------------------- +int __usercall std::`anonymous namespace'::ucs2_in@( + unsigned __int16 **a1@, + int *a2@, + unsigned int a3@, + char a4) +{ + unsigned int v7; // eax + unsigned __int16 *v8; // edx + int v9; // ecx + unsigned __int16 v10; // ax + unsigned __int16 v11; // di + int v13; // [esp+0h] [ebp-20h] + int v14; // [esp+4h] [ebp-1Ch] + unsigned __int16 *v15; // [esp+8h] [ebp-18h] + unsigned int v16; // [esp+Ch] [ebp-14h] + + std::`anonymous namespace'::read_utf16_bom((int)a1, (int *)&a4); + v7 = 0xFFFF; + v8 = *a1; + if ( a3 < 0xFFFF ) + v7 = a3; + v16 = v7; + v15 = a1[1]; + if ( !((unsigned int)((char *)v15 - (char *)v8) >> 1) ) + return 0; + v9 = *a2; + v13 = a2[1]; + v14 = a4 & 1; + while ( v13 != v9 ) + { + v10 = *v8; + v11 = __ROL2__(*v8, 8); + if ( !v14 ) + v10 = v11; + if ( (unsigned __int16)(v10 + 10240) <= 0x7FFu || v16 < v10 ) + return 2; + ++v8; + v9 += 2; + *a1 = v8; + *a2 = v9; + *(_WORD *)(v9 - 2) = v10; + if ( !((unsigned int)((char *)v15 - (char *)v8) >> 1) ) + return 0; + } + return 1; +} + +//----- (004A9920) -------------------------------------------------------- +int __usercall std::`anonymous namespace'::ucs2_out@( + unsigned __int16 **a1@, + _DWORD *a2@, + unsigned int a3@, + char a4) +{ + unsigned __int16 *v5; // ebp + unsigned __int16 *v6; // eax + _WORD *v8; // edx + unsigned int v9; // eax + __int16 v10; // cx + __int16 v11; // ax + unsigned __int16 *v12; // eax + + v5 = a1[1]; + v6 = *a1; + if ( v5 == v6 ) + return 0; + v8 = (_WORD *)*a2; + while ( 1 ) + { + if ( !((unsigned int)(a2[1] - (_DWORD)v8) >> 1) ) + return v6 != v5; + v9 = *v6; + v10 = v9; + if ( v9 - 55296 <= 0x3FF || v9 > a3 ) + break; + v11 = __ROL2__(v9, 8); + if ( (a4 & 1) == 0 ) + v10 = v11; + *v8 = v10; + v5 = a1[1]; + v8 = (_WORD *)(*a2 + 2); + v12 = *a1; + *a2 = v8; + v6 = v12 + 1; + *a1 = v6; + if ( v5 == v6 ) + return 0; + } + return 2; +} + +//----- (004A99C0) -------------------------------------------------------- +int __usercall std::`anonymous namespace'::utf16_in@( + unsigned __int8 **a1@, + char **a2@, + unsigned int a3@, + char a4, + int a5) +{ + unsigned __int8 *v8; // edi + char *v9; // edi + __int16 v10; // cx + unsigned int utf8_code; // eax + unsigned __int8 *v12; // ecx + char *v13; // edx + unsigned int v15; // ecx + __int16 v16; // ax + __int16 v17; // cx + unsigned __int8 *v18; // ecx + unsigned __int8 *v19; // [esp+0h] [ebp-1Ch] + unsigned __int8 *v20; // [esp+4h] [ebp-18h] + + v20 = a1[1]; + v8 = *a1; + v19 = *a1; + if ( (a4 & 4) != 0 + && (unsigned int)(v20 - v8) > 2 + && *(_WORD *)v8 == std::`anonymous namespace'::utf8_bom + && v8[2] == 0xBF ) + { + v19 += 3; + *a1 = v19; + } + if ( v19 != v20 ) + { + v9 = a2[1]; + while ( *a2 != v9 ) + { + utf8_code = std::`anonymous namespace'::read_utf8_code_point(a1, a3); + if ( utf8_code == -2 ) + return a5 + 1; + if ( a3 < utf8_code ) + return 2; + v9 = a2[1]; + v13 = *a2; + if ( utf8_code <= 0xFFFF ) + { + if ( v13 == v9 ) + goto LABEL_13; + v10 = __ROL2__(utf8_code, 8); + if ( (a4 & 1) == 0 ) + LOWORD(utf8_code) = v10; + *a2 = v13 + 2; + v12 = *a1; + *(_WORD *)v13 = utf8_code; + v19 = v12; + v20 = a1[1]; + if ( v20 == v12 ) + return 0; + } + else + { + if ( (unsigned int)(v9 - v13) <= 2 ) + { +LABEL_13: + *a1 = v19; + a1[1] = v20; + return 1; + } + v15 = utf8_code >> 10; + v16 = (utf8_code & 0x3FF) - 9216; + v17 = v15 - 10304; + if ( (a4 & 1) == 0 ) + { + v17 = __ROL2__(v17, 8); + v16 = __ROL2__(v16, 8); + } + *(_WORD *)v13 = v17; + *a2 = v13 + 4; + v18 = *a1; + *((_WORD *)v13 + 1) = v16; + v19 = v18; + v20 = a1[1]; + if ( v20 == v18 ) + return 0; + } + } + } + return 0; +} +// 515494: using guessed type __int16 std::`anonymous namespace'::utf8_bom; + +//----- (004A9B30) -------------------------------------------------------- +int __usercall std::`anonymous namespace'::utf16_out@( + unsigned __int16 **a1@, + _BYTE **a2@, + unsigned int a3@, + int a4) +{ + unsigned __int16 *v5; // edx + unsigned __int16 *v7; // eax + unsigned int v8; // ebp + int v10; // eax + int v11; // ebp + unsigned int v12; // edx + unsigned __int16 *v13; // edx + + v5 = a1[1]; + v7 = *a1; + v8 = (char *)v5 - (char *)v7; + if ( v7 == v5 ) + return 0; + while ( 1 ) + { + v12 = *v7; + if ( v12 - 55296 <= 0x3FF ) + { + if ( a4 == 1 ) + return 2; + if ( v8 <= 2 ) + return 0; + v10 = v7[1]; + if ( (unsigned int)(v10 - 56320) > 0x3FF ) + return 2; + v11 = 2; + v12 = v10 + (v12 << 10) - 56613888; + if ( v12 > a3 ) + return 2; + } + else + { + if ( v12 - 56320 <= 0x3FF ) + return 2; + v11 = 1; + if ( v12 > a3 ) + return 2; + } + if ( !(unsigned __int8)std::`anonymous namespace'::write_utf8_code_point(a2, v12) ) + break; + v13 = a1[1]; + v7 = &(*a1)[v11]; + *a1 = v7; + v8 = (char *)v13 - (char *)v7; + if ( v13 == v7 ) + return 0; + } + return 1; +} + +//----- (004A9BF0) -------------------------------------------------------- +int __fastcall std::__basic_file::fd(FILE **a1) +{ + return fileno(*a1); +} + +//----- (004A9C80) -------------------------------------------------------- +int __fastcall std::__basic_file::file(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (004A9C90) -------------------------------------------------------- +_BYTE *__thiscall std::__basic_file::open(_BYTE *this, char *FileName, char a3, int a4) +{ + unsigned int v4; // eax + const char *Mode; // eax + FILE *v7; // eax + + v4 = (a3 & 0x3D) - 1; + if ( v4 > 0x3B ) + return 0; + Mode = (&CSWTCH_18)[v4]; + if ( !Mode ) + return 0; + if ( *(_DWORD *)this ) + return 0; + v7 = fopen64(FileName, Mode); + *(_DWORD *)this = v7; + if ( !v7 ) + return 0; + this[4] = 1; + return this; +} + +//----- (004A9CF0) -------------------------------------------------------- +FILE *__thiscall std::__basic_file::open(_BYTE *this, wchar_t *FileName, char a3) +{ + FILE *v4; // ecx + unsigned int v5; // eax + char *v6; // edx + char *v7; // edx + wchar_t *v8; // esi + char v9; // al + FILE *v10; // eax + wchar_t Mode[2]; // [esp+18h] [ebp-14h] BYREF + int v13; // [esp+1Ch] [ebp-10h] + + v4 = 0; + v5 = (a3 & 0x3D) - 1; + if ( v5 > 0x3B ) + return v4; + v6 = (&CSWTCH_18)[v5]; + if ( !v6 ) + return v4; + v4 = *(FILE **)this; + if ( !*(_DWORD *)this ) + { + *(_DWORD *)Mode = 0; + v7 = v6 + 1; + v8 = Mode; + v13 = 0; + v9 = *(v7 - 1); + do + { + while ( 1 ) + { + while ( 1 ) + { + while ( v9 == 98 ) + { + ++v7; + *v8++ = 98; + v9 = *(v7 - 1); + if ( !v9 ) + goto LABEL_10; + } + if ( v9 > 98 ) + break; + if ( v9 == 43 ) + { + ++v7; + *v8++ = 43; + v9 = *(v7 - 1); + if ( !v9 ) + goto LABEL_10; + } + else + { + if ( v9 != 97 ) + return v4; + ++v7; + *v8++ = 97; + v9 = *(v7 - 1); + if ( !v9 ) + goto LABEL_10; + } + } + if ( v9 != 114 ) + break; + ++v7; + *v8++ = 114; + v9 = *(v7 - 1); + if ( !v9 ) + goto LABEL_10; + } + if ( v9 != 119 ) + return v4; + ++v7; + *v8++ = 119; + v9 = *(v7 - 1); + } + while ( v9 ); +LABEL_10: + v10 = __wfopen(FileName, Mode); + *(_DWORD *)this = v10; + v4 = v10; + if ( v10 ) + { + this[4] = 1; + return (FILE *)this; + } + return v4; + } + return 0; +} + +//----- (004A9E40) -------------------------------------------------------- +int __fastcall std::__basic_file::sync(FILE **a1) +{ + return fflush(*a1); +} + +//----- (004A9E60) -------------------------------------------------------- +int __fastcall std::__basic_file::close(int a1) +{ + int v3; // eax + + if ( !*(_DWORD *)a1 ) + return 0; + if ( *(_BYTE *)(a1 + 4) ) + { + v3 = fclose(*(FILE **)a1); + *(_DWORD *)a1 = 0; + if ( v3 ) + return 0; + else + return a1; + } + else + { + *(_DWORD *)a1 = 0; + return a1; + } +} + +//----- (004A9EC0) -------------------------------------------------------- +int __thiscall std::__basic_file::xsgetn(FILE **this, void *DstBuf, unsigned int MaxCharCount) +{ + int FileHandle; // eax + int v5; // ebp + + do + { + FileHandle = std::__basic_file::fd(this); + v5 = read(FileHandle, DstBuf, MaxCharCount); + } + while ( v5 == -1 && *__errno() == 4 ); + return v5; +} + +//----- (004A9F10) -------------------------------------------------------- +unsigned int __thiscall std::__basic_file::xsputn(FILE **this, char *a2, unsigned int a3) +{ + int FileHandle; // esi + unsigned int MaxCharCount; // ebp + int v6; // eax + + FileHandle = std::__basic_file::fd(this); + MaxCharCount = a3; + while ( 1 ) + { + while ( 1 ) + { + v6 = write(FileHandle, a2, MaxCharCount); + if ( v6 != -1 ) + break; + if ( *__errno() != 4 ) + return a3 - MaxCharCount; + } + MaxCharCount -= v6; + if ( !MaxCharCount ) + break; + a2 += v6; + } + return a3; +} + +//----- (004A9F80) -------------------------------------------------------- +__int64 __thiscall std::__basic_file::seekoff(FILE **this, __int64 a2, int a3) +{ + int v3; // eax + + v3 = fileno(*this); + return lseek64(v3, a2, a3); +} + +//----- (004AA025) -------------------------------------------------------- +#error "4AA051: call analysis failed (funcsize=14)" + +//----- (004AA060) -------------------------------------------------------- +_BYTE *__thiscall std::__basic_file::sys_open(_BYTE *this, FILE *Stream, int a3) +{ + int v4; // ebp + _BYTE *result; // eax + + if ( !*(_DWORD *)this && Stream ) + { + v4 = *__errno(); + *__errno() = 0; + do + { + if ( !fflush(Stream) ) + { + *__errno() = v4; + result = this; + *(_DWORD *)this = Stream; + this[4] = 0; + return result; + } + } + while ( *__errno() == 4 ); + *__errno() = v4; + } + return 0; +} + +//----- (004AA0D0) -------------------------------------------------------- +FILE **__thiscall std::__basic_file::sys_open(FILE **this, int FileHandle, char a3) +{ + unsigned int v3; // eax + const char *Format; // eax + FILE *v6; // eax + FILE **v7; // [esp+18h] [ebp-44h] + + v7 = this; + v3 = (a3 & 0x3D) - 1; + if ( v3 > 0x3B ) + return 0; + Format = (&CSWTCH_18)[v3]; + if ( !Format ) + return 0; + if ( *this ) + return 0; + v6 = fdopen(FileHandle, Format); + *v7 = v6; + if ( !v6 ) + return 0; + *((_BYTE *)v7 + 4) = 1; + if ( !FileHandle ) + setvbuf(v6, 0, 4, 0); + return v7; +} + +//----- (004AA1C0) -------------------------------------------------------- +int __thiscall std::__basic_file::xsputn_2(FILE **this, char *a2, unsigned int a3, char *a4, unsigned int a5) +{ + int FileHandle; // esi + unsigned int MaxCharCount; // ebp + int v9; // eax + unsigned int v11; // ebp + int v12; // eax + + FileHandle = std::__basic_file::fd(this); + if ( a3 ) + { + v11 = a3; + while ( 1 ) + { + while ( 1 ) + { + v12 = write(FileHandle, a2, v11); + if ( v12 != -1 ) + break; + if ( *__errno() != 4 ) + return a3 - v11; + } + v11 -= v12; + if ( !v11 ) + break; + a2 += v12; + } + FileHandle = std::__basic_file::fd(this); + } + MaxCharCount = a5; + do + { + while ( 1 ) + { + v9 = write(FileHandle, a4, MaxCharCount); + if ( v9 == -1 ) + break; + MaxCharCount -= v9; + if ( !MaxCharCount ) + return a3 + a5; + a4 += v9; + } + } + while ( *__errno() == 4 ); + a5 -= MaxCharCount; + return a3 + a5; +} + +//----- (004AA290) -------------------------------------------------------- +int __fastcall std::__basic_file::showmanyc(FILE **a1) +{ + int FileHandle; // eax + unsigned int st_size_high; // edi + unsigned int st_size; // esi + int v6; // eax + int v7; // esi + signed __int64 v8; // kr08_8 + struct _stat64 Stat; // [esp+18h] [ebp-54h] BYREF + + FileHandle = std::__basic_file::fd(a1); + if ( __fstat64(FileHandle, &Stat) || (Stat.st_mode & 0xF000) != 0x8000 ) + return 0; + st_size_high = HIDWORD(Stat.st_size); + st_size = Stat.st_size; + v6 = std::__basic_file::fd(a1); + v8 = __PAIR64__(st_size_high, st_size) - lseek64(v6, 0LL, 1); + v7 = v8; + if ( v8 > 0x7FFFFFFF ) + return 0x7FFFFFFF; + return v7; +} + +//----- (004AA320) -------------------------------------------------------- +void __thiscall std::__basic_file::__basic_file(_BYTE *this, int a2) +{ + *(_DWORD *)this = 0; + this[4] = 0; +} + +//----- (004AA330) -------------------------------------------------------- +FILE *__fastcall std::__basic_file::~__basic_file(int a1) +{ + FILE *result; // eax + + result = *(FILE **)a1; + if ( *(_DWORD *)a1 ) + { + if ( *(_BYTE *)(a1 + 4) ) + return (FILE *)fclose(*(FILE **)a1); + } + return result; +} + +//----- (004AA350) -------------------------------------------------------- +void __thiscall std::__cow_string::__cow_string(_DWORD *this, _DWORD *a2) +{ + *this = *a2; + *a2 = std::string::_S_construct(0, 0); +} + +//----- (004AA3C0) -------------------------------------------------------- +int __userpurge std::__cow_string::__cow_string@( + _DWORD *a1@, + std::__cow_string *this, + size_t a3, + unsigned int a4) +{ + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + return std::string::string(a1, (unsigned __int8 *)this, a3, (int)v5); +} +// 4AA3C0: using guessed type int var_D[3]; + +//----- (004AA3F0) -------------------------------------------------------- +int __thiscall std::__cow_string::__cow_string(_DWORD *this, int a2) +{ + unsigned int v3; // [esp+8h] [ebp-14h] + + return std::__cow_string::__cow_string(this, *(std::__cow_string **)a2, *(_DWORD *)(a2 + 4), v3); +} +// 4AA403: variable 'v3' is possibly undefined + +//----- (004AA420) -------------------------------------------------------- +void __userpurge std::__cow_string::__cow_string( + _DWORD *a1@, + std::__cow_string *this, + const std::__cow_string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-58h] + + std::string::string(a1, this, v3); +} +// 4AA454: variable 'v3' is possibly undefined + +//----- (004AA480) -------------------------------------------------------- +_DWORD *__fastcall std::__cow_string::__cow_string(_DWORD *a1) +{ + _DWORD *result; // eax + + result = std::string::_S_construct(0, 0); + *a1 = result; + return result; +} + +//----- (004AA4B0) -------------------------------------------------------- +void __fastcall std::__cow_string::~__cow_string(int *a1) +{ + int v1; // ecx + int v2; // eax + int v3[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v1 = *a1; + if ( !_CRT_MT ) + { + v2 = *(_DWORD *)(v1 - 4); + *(_DWORD *)(v1 - 4) = v2 - 1; + if ( v2 > 0 ) + return; +LABEL_5: + std::string::_Rep::_M_destroy((void *)(v1 - 12), (int)v3); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v1 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4AA4B0: using guessed type int var_D[3]; + +//----- (004AA500) -------------------------------------------------------- +int *__thiscall std::__cow_string::operator=(int *this, std::string *a2) +{ + std::string *v4; // [esp+4h] [ebp-18h] + + std::string::swap(this, a2, v4); + return this; +} +// 4AA50D: variable 'v4' is possibly undefined + +//----- (004AA520) -------------------------------------------------------- +int *__thiscall std::__cow_string::operator=(int *this, std::string *a2) +{ + const std::string *v4; // [esp+4h] [ebp-58h] + + std::string::assign(this, a2, v4); + return this; +} +// 4AA554: variable 'v4' is possibly undefined + +//----- (004AA570) -------------------------------------------------------- +void __thiscall std::__shared_ptr::__shared_ptr( + _DWORD *this, + _DWORD *a2) +{ + int v2; // eax + + v2 = a2[1]; + *this = *a2; + this[1] = v2; + if ( v2 ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy(v2); +} + +//----- (004AA594) -------------------------------------------------------- +void __thiscall std::__shared_ptr::__shared_ptr( + int *this, + int *a2) +{ + int *v2; // ecx + int v3; // eax + + v2 = this + 1; + v3 = a2[1]; + *(v2 - 1) = *a2; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(v2, v3); +} + +//----- (004AA5B0) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::__shared_ptr::operator=( + volatile signed __int32 **this, + volatile signed __int32 **a2) +{ + volatile signed __int32 *v2; // edx + + v2 = a2[1]; + *this = *a2; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(this + 1, v2); + return this; +} + +//----- (004AA5D8) -------------------------------------------------------- +int __thiscall std::__shared_ptr::__shared_ptr( + _DWORD *this, + _DWORD *a2) +{ + int result; // eax + + result = a2[1]; + *this = *a2; + this[1] = result; + if ( result ) + { + if ( _CRT_MT ) + _InterlockedIncrement((volatile signed __int32 *)(result + 4)); + else + ++*(_DWORD *)(result + 4); + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004AA604) -------------------------------------------------------- +void __thiscall std::__shared_ptr::__shared_ptr( + _DWORD *this, + _DWORD *a2) +{ + int v2; // eax + + v2 = a2[1]; + *this = *a2; + this[1] = v2; + if ( v2 ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy(v2); +} + +//----- (004AA628) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::__shared_ptr::operator=( + volatile signed __int32 **this, + volatile signed __int32 **a2) +{ + volatile signed __int32 *v2; // edx + + v2 = a2[1]; + *this = *a2; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(this + 1, v2); + return this; +} + +//----- (004AA650) -------------------------------------------------------- +_DWORD *__thiscall std::__sso_string::__sso_string(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + int v3; // ebx + + result = a2; + *this = this + 2; + if ( (_DWORD *)*result == result + 2 ) + { + this[2] = a2[2]; + this[3] = a2[3]; + this[4] = a2[4]; + this[5] = a2[5]; + } + else + { + *this = *a2; + this[2] = a2[2]; + } + v3 = a2[1]; + *a2 = a2 + 2; + a2[1] = 0; + this[1] = v3; + *((_BYTE *)a2 + 8) = 0; + return result; +} + +//----- (004AA6B0) -------------------------------------------------------- +_BYTE *__userpurge std::__sso_string::__sso_string@( + int a1@, + std::__sso_string *this, + size_t Size, + unsigned int a4) +{ + _BYTE *result; // eax + char v6; // dl + int v7; // esi + int v8[4]; // [esp+1Ch] [ebp-10h] BYREF + + result = (_BYTE *)(a1 + 8); + *(_DWORD *)a1 = a1 + 8; + if ( (std::__sso_string *)((char *)this + Size) ) + { + if ( !this ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + } + v8[0] = Size; + if ( Size > 0xF ) + { + result = std::string::_M_create((unsigned int *)v8, 0); + *(_DWORD *)a1 = result; + *(_DWORD *)(a1 + 8) = v8[0]; + } + else + { + if ( Size == 1 ) + { + v6 = *(_BYTE *)this; + *(_DWORD *)(a1 + 4) = 1; + *(_BYTE *)(a1 + 8) = v6; + *(_BYTE *)(a1 + 9) = 0; + return result; + } + if ( !Size ) + { + *(_DWORD *)(a1 + 4) = 0; + *result = 0; + return result; + } + } + memcpy(result, this, Size); + v7 = v8[0]; + result = *(_BYTE **)a1; + *(_DWORD *)(a1 + 4) = v8[0]; + result[v7] = 0; + return result; +} +// 4AA6B0: using guessed type size_t var_10[4]; + +//----- (004AA770) -------------------------------------------------------- +_BYTE *__thiscall std::__sso_string::__sso_string(char *this, int a2) +{ + _BYTE *result; // eax + char *Src; // edi + size_t Size; // esi + char v6; // dl + int v7; // esi + int v8[4]; // [esp+1Ch] [ebp-10h] BYREF + + result = this + 8; + *(_DWORD *)this = this + 8; + Src = *(char **)a2; + Size = *(_DWORD *)(a2 + 4); + if ( Size + *(_DWORD *)a2 ) + { + if ( !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + } + v8[0] = *(_DWORD *)(a2 + 4); + if ( Size > 0xF ) + { + result = std::string::_M_create((unsigned int *)v8, 0); + *(_DWORD *)this = result; + *((_DWORD *)this + 2) = v8[0]; + } + else + { + if ( Size == 1 ) + { + v6 = *Src; + *((_DWORD *)this + 1) = 1; + this[8] = v6; + this[9] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + v7 = v8[0]; + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = v8[0]; + result[v7] = 0; + return result; +} +// 4AA770: using guessed type unsigned int var_10[4]; + +//----- (004AA830) -------------------------------------------------------- +void __userpurge std::__sso_string::__sso_string( + _DWORD *a1@, + std::__sso_string *this, + const std::__sso_string *a3) +{ + _DWORD *v4; // edx + _BYTE *v5; // edi + size_t v6; // esi + _DWORD *v7; // eax + int v8[7]; // [esp+5Ch] [ebp+40h] BYREF + + v4 = a1 + 2; + *a1 = a1 + 2; + v5 = *(_BYTE **)this; + v6 = *((_DWORD *)this + 1); + if ( v6 + *(_DWORD *)this && !v5 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v8[0] = *((_DWORD *)this + 1); + if ( v6 > 0xF ) + { + v7 = std::string::_M_create((unsigned int *)v8, 0); + *a1 = v7; + v4 = v7; + a1[2] = v8[0]; + goto LABEL_10; + } + if ( v6 != 1 ) + { + if ( !v6 ) + goto LABEL_6; +LABEL_10: + memcpy(v4, v5, v6); + v6 = v8[0]; + v4 = (_DWORD *)*a1; + goto LABEL_6; + } + *((_BYTE *)a1 + 8) = *v5; +LABEL_6: + a1[1] = v6; + *((_BYTE *)v4 + v6) = 0; +} +// 4AA830: using guessed type size_t anonymous_0[7]; + +//----- (004AA910) -------------------------------------------------------- +_BYTE *__userpurge std::__sso_string::__sso_string@(int a1@, std::__sso_string **this, const std::string *a3) +{ + unsigned int v4; // [esp+8h] [ebp-14h] + + return std::__sso_string::__sso_string(a1, *this, *((_DWORD *)*this - 3), v4); +} +// 4AA923: variable 'v4' is possibly undefined + +//----- (004AA940) -------------------------------------------------------- +int __fastcall std::__sso_string::__sso_string(int a1) +{ + int result; // eax + + result = a1 + 8; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + *(_BYTE *)(a1 + 8) = 0; + return result; +} + +//----- (004AA960) -------------------------------------------------------- +void __fastcall std::__sso_string::~__sso_string(void **a1) +{ + if ( *a1 != a1 + 2 ) + operator delete(*a1); +} + +//----- (004AA990) -------------------------------------------------------- +_DWORD *__thiscall std::__sso_string::operator=(_DWORD *this, int a2) +{ + _DWORD *v3; // eax + _DWORD *Src; // ecx + int v5; // edx + int v6; // ebp + + v3 = (_DWORD *)*this; + Src = *(_DWORD **)a2; + v5 = *(_DWORD *)(a2 + 4); + if ( *(_DWORD *)a2 != a2 + 8 ) + { + if ( v3 == this + 2 ) + { + *this = Src; + this[1] = v5; + this[2] = *(_DWORD *)(a2 + 8); + } + else + { + *this = Src; + v6 = this[2]; + this[1] = v5; + this[2] = *(_DWORD *)(a2 + 8); + if ( v3 ) + { + *(_DWORD *)a2 = v3; + *(_DWORD *)(a2 + 8) = v6; + goto LABEL_5; + } + } + *(_DWORD *)a2 = a2 + 8; + v3 = (_DWORD *)(a2 + 8); + goto LABEL_5; + } + if ( v5 ) + { + if ( v5 == 1 ) + *(_BYTE *)v3 = *(_BYTE *)(a2 + 8); + else + memcpy(v3, Src, *(_DWORD *)(a2 + 4)); + v5 = *(_DWORD *)(a2 + 4); + v3 = (_DWORD *)*this; + } + this[1] = v5; + *((_BYTE *)v3 + v5) = 0; + v3 = *(_DWORD **)a2; +LABEL_5: + *(_DWORD *)(a2 + 4) = 0; + *(_BYTE *)v3 = 0; + return this; +} + +//----- (004AAA40) -------------------------------------------------------- +void *__thiscall std::__sso_string::operator=(void *this, int a2) +{ + std::string::_M_assign((int)this, a2); + return this; +} + +//----- (004AAA90) -------------------------------------------------------- +void __thiscall std::ctype_byname::ctype_byname(_DWORD *this, int **a2, int a3) +{ + std::ctype::ctype(this, 0, 0, a3); + *this = &off_51A968; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51A968: using guessed type int (*off_51A968)(); + +//----- (004AABA0) -------------------------------------------------------- +void __thiscall std::ctype_byname::ctype_byname(_DWORD *this, int ***a2, int a3) +{ + std::ctype_byname::ctype_byname(this, *a2, a3); +} + +//----- (004AABB0) -------------------------------------------------------- +void __thiscall std::ctype_byname::ctype_byname(_DWORD *this, int ***a2, int a3) +{ + std::ctype_byname::ctype_byname(this, *a2, a3); +} + +//----- (004AABC0) -------------------------------------------------------- +void __fastcall std::ctype_byname::~ctype_byname(_DWORD *Block) +{ + *Block = &off_51A968; + std::ctype::~ctype((int)Block); + operator delete(Block); +} +// 51A968: using guessed type int (*off_51A968)(); + +//----- (004AABE0) -------------------------------------------------------- +void __fastcall std::ctype_byname::~ctype_byname(int a1) +{ + *(_DWORD *)a1 = &off_51A968; + std::ctype::~ctype(a1); +} +// 51A968: using guessed type int (*off_51A968)(); + +//----- (004AABF0) -------------------------------------------------------- +void __thiscall std::ctype_byname::ctype_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B448; + this[2] = std::locale::facet::_S_get_c_locale(); + *((_BYTE *)this + 12) = 0; + std::ctype::_M_initialize_ctype((int)this); + *this = &off_51A998; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + std::ctype::_M_initialize_ctype((int)this); + } + } +} +// 51A998: using guessed type int (*off_51A998)(); +// 51B448: using guessed type int (*off_51B448)(); + +//----- (004AAD50) -------------------------------------------------------- +void __thiscall std::ctype_byname::ctype_byname(_DWORD *this, int ***a2, int a3) +{ + std::ctype_byname::ctype_byname(this, *a2, a3); +} + +//----- (004AAD60) -------------------------------------------------------- +void __thiscall std::ctype_byname::ctype_byname(_DWORD *this, int ***a2, int a3) +{ + std::ctype_byname::ctype_byname(this, *a2, a3); +} + +//----- (004AAD70) -------------------------------------------------------- +void __fastcall std::ctype_byname::~ctype_byname(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B448; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + *Block = &unk_51B24C; + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4AADB4: variable 'lpfctx' is possibly undefined +// 51B448: using guessed type int (*off_51B448)(); + +//----- (004AADD0) -------------------------------------------------------- +void __fastcall std::ctype_byname::~ctype_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B448; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + *a1 = &unk_51B24C; + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4AAE14: variable 'lpfctx' is possibly undefined +// 51B448: using guessed type int (*off_51B448)(); + +//----- (004AAE30) -------------------------------------------------------- +void __userpurge std::domain_error::domain_error(_DWORD *a1@, std::domain_error *this, const char *a3) +{ + int v4; // [esp+5Fh] [ebp-9h] BYREF + + *a1 = &off_51A940; + std::string::string(a1 + 1, (char *)this, (int)&v4); + *a1 = &off_51A9D8; +} +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51A9D8: using guessed type void (__cdecl *off_51A9D8)(std::domain_error *__hidden this); + +//----- (004AAEC0) -------------------------------------------------------- +void __thiscall std::domain_error::domain_error(_DWORD *this, int a2) +{ + unsigned int v2; // [esp+8h] [ebp-50h] + + *this = &off_51A940; + std::__cow_string::__cow_string(this + 1, *(std::__cow_string **)a2, *(_DWORD *)(a2 + 4), v2); + *this = &off_51A9D8; +} +// 4AAF14: variable 'v2' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51A9D8: using guessed type void (__cdecl *off_51A9D8)(std::domain_error *__hidden this); + +//----- (004AAF60) -------------------------------------------------------- +void __userpurge std::domain_error::domain_error(_DWORD *a1@, std::domain_error *this, const std::string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-54h] + + *a1 = &off_51A940; + std::string::string(a1 + 1, this, v3); + *a1 = &off_51A9D8; +} +// 4AAFA8: variable 'v3' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51A9D8: using guessed type void (__cdecl *off_51A9D8)(std::domain_error *__hidden this); + +//----- (004AAFF0) -------------------------------------------------------- +void __fastcall std::domain_error::~domain_error(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51A9D8; + std::logic_error::~logic_error(Block); + operator delete(a1); +} +// 4AAFFC: variable 'Block' is possibly undefined +// 51A9D8: using guessed type void (__cdecl *off_51A9D8)(std::domain_error *__hidden this); + +//----- (004AB010) -------------------------------------------------------- +void __cdecl std::domain_error::~domain_error(std::exception *a1) +{ + _DWORD *v1; // ecx + int v2; // eax + int v3; // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *v1 = &off_51A940; + v3 = v1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 > 0 ) + { +LABEL_3: + std::exception::~exception(a1); + return; + } + } + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v5); + std::exception::~exception(a1); +} +// 4AB01B: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 4AB010: using guessed type int var_D[3]; + +//----- (004AB070) -------------------------------------------------------- +void __userpurge std::length_error::length_error(_DWORD *a1@, std::length_error *this, const char *a3) +{ + int v4; // [esp+5Fh] [ebp-9h] BYREF + + *a1 = &off_51A940; + std::string::string(a1 + 1, (char *)this, (int)&v4); + *a1 = &off_51A9EC; +} +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51A9EC: using guessed type void (__cdecl *off_51A9EC)(std::length_error *__hidden this); + +//----- (004AB100) -------------------------------------------------------- +void __thiscall std::length_error::length_error(_DWORD *this, int a2) +{ + unsigned int v2; // [esp+8h] [ebp-50h] + + *this = &off_51A940; + std::__cow_string::__cow_string(this + 1, *(std::__cow_string **)a2, *(_DWORD *)(a2 + 4), v2); + *this = &off_51A9EC; +} +// 4AB154: variable 'v2' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51A9EC: using guessed type void (__cdecl *off_51A9EC)(std::length_error *__hidden this); + +//----- (004AB1A0) -------------------------------------------------------- +void __userpurge std::length_error::length_error(_DWORD *a1@, std::length_error *this, const std::string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-54h] + + *a1 = &off_51A940; + std::string::string(a1 + 1, this, v3); + *a1 = &off_51A9EC; +} +// 4AB1E8: variable 'v3' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51A9EC: using guessed type void (__cdecl *off_51A9EC)(std::length_error *__hidden this); + +//----- (004AB230) -------------------------------------------------------- +void __fastcall std::length_error::~length_error(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51A9EC; + std::logic_error::~logic_error(Block); + operator delete(a1); +} +// 4AB23C: variable 'Block' is possibly undefined +// 51A9EC: using guessed type void (__cdecl *off_51A9EC)(std::length_error *__hidden this); + +//----- (004AB250) -------------------------------------------------------- +void __cdecl std::length_error::~length_error(std::exception *a1) +{ + _DWORD *v1; // ecx + int v2; // eax + int v3; // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *v1 = &off_51A940; + v3 = v1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 > 0 ) + { +LABEL_3: + std::exception::~exception(a1); + return; + } + } + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v5); + std::exception::~exception(a1); +} +// 4AB25B: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 4AB250: using guessed type int var_D[3]; + +//----- (004AB2B0) -------------------------------------------------------- +void __userpurge std::out_of_range::out_of_range(_DWORD *a1@, std::out_of_range *this, const char *a3) +{ + int v4; // [esp+5Fh] [ebp-9h] BYREF + + *a1 = &off_51A940; + std::string::string(a1 + 1, (char *)this, (int)&v4); + *a1 = &off_51AA00; +} +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51AA00: using guessed type void (__cdecl *off_51AA00)(std::out_of_range *__hidden this); + +//----- (004AB340) -------------------------------------------------------- +void __thiscall std::out_of_range::out_of_range(_DWORD *this, int a2) +{ + unsigned int v2; // [esp+8h] [ebp-50h] + + *this = &off_51A940; + std::__cow_string::__cow_string(this + 1, *(std::__cow_string **)a2, *(_DWORD *)(a2 + 4), v2); + *this = &off_51AA00; +} +// 4AB394: variable 'v2' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51AA00: using guessed type void (__cdecl *off_51AA00)(std::out_of_range *__hidden this); + +//----- (004AB3E0) -------------------------------------------------------- +void __userpurge std::out_of_range::out_of_range(_DWORD *a1@, std::out_of_range *this, const std::string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-54h] + + *a1 = &off_51A940; + std::string::string(a1 + 1, this, v3); + *a1 = &off_51AA00; +} +// 4AB428: variable 'v3' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51AA00: using guessed type void (__cdecl *off_51AA00)(std::out_of_range *__hidden this); + +//----- (004AB470) -------------------------------------------------------- +void __fastcall std::out_of_range::~out_of_range(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51AA00; + std::logic_error::~logic_error(Block); + operator delete(a1); +} +// 4AB47C: variable 'Block' is possibly undefined +// 51AA00: using guessed type void (__cdecl *off_51AA00)(std::out_of_range *__hidden this); + +//----- (004AB490) -------------------------------------------------------- +void __cdecl std::out_of_range::~out_of_range(std::exception *a1) +{ + _DWORD *v1; // ecx + int v2; // eax + int v3; // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *v1 = &off_51A940; + v3 = v1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 > 0 ) + { +LABEL_3: + std::exception::~exception(a1); + return; + } + } + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v5); + std::exception::~exception(a1); +} +// 4AB49B: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 4AB490: using guessed type int var_D[3]; + +//----- (004AB4F0) -------------------------------------------------------- +void __thiscall std::system_error::system_error(_DWORD *this, int a2, int a3, char *Str) +{ + int (__thiscall *v4)(int, int, int); // eax + unsigned int **v5; // eax + unsigned int *v6; // edx + size_t v7; // eax + unsigned int **v8; // eax + unsigned int *v9; // edx + void *Block[2]; // [esp+68h] [ebp-50h] BYREF + int v12[4]; // [esp+70h] [ebp-48h] BYREF + void *v13[2]; // [esp+80h] [ebp-38h] BYREF + int v14[4]; // [esp+88h] [ebp-30h] BYREF + void *v15[2]; // [esp+98h] [ebp-20h] BYREF + char v16[24]; // [esp+A0h] [ebp-18h] BYREF + + v4 = *(int (__thiscall **)(int, int, int))(*(_DWORD *)a3 + 16); + if ( v4 == `anonymous namespace'::io_error_category::message[abi:cxx11] ) + { + v15[1] = 0; + v15[0] = v16; + v16[0] = 0; + if ( a2 == 1 ) + std::string::_M_replace((unsigned int **)v15, 0, 0, "iostream error", 0xEu); + else + std::string::_M_replace((unsigned int **)v15, 0, 0, "Unknown error", 0xDu); + } + else + { + ((void (__cdecl *)(int, int))v4)(a3, a2); + } + v5 = std::string::_M_replace((unsigned int **)v15, 0, 0, ": ", 2u); + v13[0] = v14; + if ( *v5 == (unsigned int *)(v5 + 2) ) + { + v14[0] = (int)v5[2]; + v14[1] = (int)v5[3]; + v14[2] = (int)v5[4]; + v14[3] = (int)v5[5]; + } + else + { + v13[0] = *v5; + v14[0] = (int)v5[2]; + } + v6 = v5[1]; + *((_BYTE *)v5 + 8) = 0; + v13[1] = v6; + *v5 = (unsigned int *)(v5 + 2); + v5[1] = 0; + v7 = strlen(Str); + v8 = std::string::_M_replace((unsigned int **)v13, 0, 0, Str, v7); + Block[0] = v12; + if ( *v8 == (unsigned int *)(v8 + 2) ) + { + v12[0] = (int)v8[2]; + v12[1] = (int)v8[3]; + v12[2] = (int)v8[4]; + v12[3] = (int)v8[5]; + } + else + { + Block[0] = *v8; + v12[0] = (int)v8[2]; + } + v9 = v8[1]; + *((_BYTE *)v8 + 8) = 0; + Block[1] = v9; + *v8 = (unsigned int *)(v8 + 2); + v8[1] = 0; + std::runtime_error::runtime_error(this, (int)Block); + if ( Block[0] != v12 ) + operator delete(Block[0]); + if ( v13[0] != v14 ) + operator delete(v13[0]); + if ( v15[0] != v16 ) + operator delete(v15[0]); + *this = &off_51AA14; + this[2] = a2; + this[3] = a3; +} +// 51AA14: using guessed type void (__cdecl *off_51AA14)(std::system_error *__hidden this); + +//----- (004AB830) -------------------------------------------------------- +void __thiscall std::system_error::system_error(_DWORD *this, int a2, int a3, int a4) +{ + int (__thiscall *v4)(int, int, int); // eax + int *v5; // eax + unsigned int v6; // ebx + unsigned int v7; // eax + unsigned int v8; // edx + void **v9; // eax + _BYTE *Src; // [esp+14h] [ebp-B4h] + _BYTE *Size; // [esp+28h] [ebp-A0h] + void *Block[2]; // [esp+68h] [ebp-60h] BYREF + int v14[4]; // [esp+70h] [ebp-58h] BYREF + void *v15; // [esp+80h] [ebp-48h] BYREF + size_t v16; // [esp+84h] [ebp-44h] + int v17[4]; // [esp+88h] [ebp-40h] BYREF + void *v18; // [esp+98h] [ebp-30h] BYREF + size_t v19; // [esp+9Ch] [ebp-2Ch] + int v20[10]; // [esp+A0h] [ebp-28h] BYREF + + v4 = *(int (__thiscall **)(int, int, int))(*(_DWORD *)a3 + 16); + if ( v4 == `anonymous namespace'::io_error_category::message[abi:cxx11] ) + { + LOBYTE(v20[0]) = 0; + v18 = v20; + v19 = 0; + if ( a2 == 1 ) + std::string::_M_replace((unsigned int **)&v18, 0, 0, "iostream error", 0xEu); + else + std::string::_M_replace((unsigned int **)&v18, 0, 0, "Unknown error", 0xDu); + } + else + { + ((void (__cdecl *)(int, int))v4)(a3, a2); + } + v15 = v17; + Size = *(_BYTE **)(a4 + 4); + Src = *(_BYTE **)a4; + if ( &Size[*(_DWORD *)a4] && !*(_DWORD *)a4 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + Block[0] = *(void **)(a4 + 4); + if ( (unsigned int)Size > 0xF ) + { + v5 = (int *)std::string::_M_create((unsigned int *)Block, 0); + v15 = v5; + v17[0] = (int)Block[0]; +LABEL_29: + memcpy(v5, Src, (size_t)Size); + Size = Block[0]; + v5 = (int *)v15; + goto LABEL_9; + } + if ( Size == (_BYTE *)1 ) + { + LOBYTE(v17[0]) = *Src; + v5 = v17; + goto LABEL_9; + } + v5 = v17; + if ( Size ) + goto LABEL_29; +LABEL_9: + v16 = (size_t)Size; + Size[(_DWORD)v5] = 0; + if ( v16 == 0x3FFFFFFF || v16 == 1073741822 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&v15, ": ", 2u); + v6 = v16 + v19; + v7 = 15; + v8 = 15; + if ( v15 != v17 ) + v8 = v17[0]; + if ( v6 <= v8 ) + goto LABEL_16; + if ( v18 != v20 ) + v7 = v20[0]; + if ( v6 <= v7 ) + v9 = (void **)std::string::_M_replace((unsigned int **)&v18, 0, 0, (char *)v15, v16); + else +LABEL_16: + v9 = (void **)std::string::_M_append(&v15, v18, v19); + Block[0] = v14; + if ( *v9 == v9 + 2 ) + { + v14[0] = (int)v9[2]; + v14[1] = (int)v9[3]; + v14[2] = (int)v9[4]; + v14[3] = (int)v9[5]; + } + else + { + Block[0] = *v9; + v14[0] = (int)v9[2]; + } + Block[1] = v9[1]; + *v9 = v9 + 2; + *((_BYTE *)v9 + 8) = 0; + v9[1] = 0; + std::runtime_error::runtime_error(this, (int)Block); + if ( Block[0] != v14 ) + operator delete(Block[0]); + if ( v15 != v17 ) + operator delete(v15); + if ( v18 != v20 ) + operator delete(v18); + this[2] = a2; + this[3] = a3; + *this = &off_51AA14; +} +// 51AA14: using guessed type void (__cdecl *off_51AA14)(std::system_error *__hidden this); + +//----- (004ABCA0) -------------------------------------------------------- +void __fastcall std::system_error::~system_error(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51AA14; + std::runtime_error::~runtime_error(Block); + operator delete(a1); +} +// 4ABCAC: variable 'Block' is possibly undefined +// 51AA14: using guessed type void (__cdecl *off_51AA14)(std::system_error *__hidden this); + +//----- (004ABCC0) -------------------------------------------------------- +void __cdecl std::system_error::~system_error(std::exception *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51AA14; + std::runtime_error::~runtime_error(a1); +} +// 4ABCC0: variable 'v1' is possibly undefined +// 51AA14: using guessed type void (__cdecl *off_51AA14)(std::system_error *__hidden this); + +//----- (004ABCD0) -------------------------------------------------------- +int __cdecl std::__facet_shims::__time_get( + int a1, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8, + int a9, + char a10) +{ + int result; // eax + + switch ( a10 ) + { + case 'd': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 16))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 'u': + case 'v': + case 'x': + case 'y': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 28))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'm': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 24))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 't': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 12))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'w': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 20))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + } + return result; +} + +//----- (004ABE40) -------------------------------------------------------- +int __cdecl std::__facet_shims::__time_get( + int a1, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8, + int a9, + char a10) +{ + int result; // eax + + switch ( a10 ) + { + case 'd': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 16))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 'u': + case 'v': + case 'x': + case 'y': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 28))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'm': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 24))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 't': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 12))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'w': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 20))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + } + return result; +} + +//----- (004ABFB0) -------------------------------------------------------- +int __cdecl std::__facet_shims::__time_get( + int a1, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8, + int a9, + char a10) +{ + int result; // eax + + switch ( a10 ) + { + case 'd': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 16))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 'u': + case 'v': + case 'x': + case 'y': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 28))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'm': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 24))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 't': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 12))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'w': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 20))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + } + return result; +} + +//----- (004AC120) -------------------------------------------------------- +int __cdecl std::__facet_shims::__time_get( + int a1, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8, + int a9, + char a10) +{ + int result; // eax + + switch ( a10 ) + { + case 'd': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 16))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 'u': + case 'v': + case 'x': + case 'y': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 28))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'm': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 24))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 't': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 12))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + case 'w': + result = (*(int (__thiscall **)(int, int, int, int, int, int, int, int))(*(_DWORD *)a2 + 20))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9); + break; + } + return result; +} + +//----- (004AC290) -------------------------------------------------------- +__int64 __cdecl std::__facet_shims::__money_get( + int a1, + int a2, + __int64 a3, + int a4, + int a5, + unsigned __int8 a6, + int a7, + _DWORD *a8, + int a9, + _DWORD *a10) +{ + int v11; // ecx + int v12; // eax + void (__cdecl *v13)(_DWORD *); // eax + int v14; // eax + const std::string *v15; // [esp+4h] [ebp-74h] + __int64 lpuexcpt; // [esp+20h] [ebp-58h] + int v17; // [esp+6Bh] [ebp-Dh] BYREF + _DWORD v18[3]; // [esp+6Ch] [ebp-Ch] BYREF + __int64 v19; // [esp+88h] [ebp+10h] + + if ( a9 ) + return ((__int64 (__thiscall *)(int, _DWORD, _DWORD, int, int, _DWORD, int, _DWORD *, int))*(_DWORD *)(*(_DWORD *)a2 + 8))( + a2, + a3, + HIDWORD(a3), + a4, + a5, + a6, + a7, + a8, + a9); + v18[0] = std::string::_S_construct(0, 0); + v19 = ((__int64 (__thiscall *)(int, _DWORD, _DWORD, int, int, _DWORD, int, _DWORD *, _DWORD *))*(_DWORD *)(*(_DWORD *)a2 + 12))( + a2, + a3, + HIDWORD(a3), + a4, + a5, + a6, + a7, + a8, + v18); + if ( *a8 ) + { + v11 = v18[0]; + } + else + { + v13 = (void (__cdecl *)(_DWORD *))a10[6]; + if ( v13 ) + v13(a10); + std::string::string(a10, (std::string *)v18, v15); + v11 = v18[0]; + v14 = *(_DWORD *)(v18[0] - 12); + a10[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + a10[1] = v14; + } + lpuexcpt = v19; + if ( _CRT_MT ) + { + v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v11 - 4), 0xFFFFFFFF); + } + else + { + v12 = *(_DWORD *)(v11 - 4); + *(_DWORD *)(v11 - 4) = v12 - 1; + } + if ( v12 <= 0 ) + std::string::_Rep::_M_destroy((void *)(v11 - 12), (int)&v17); + return lpuexcpt; +} +// 4AC429: variable 'v15' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004AC490) -------------------------------------------------------- +__int64 __cdecl std::__facet_shims::__money_get( + int a1, + int *a2, + __int64 a3, + int a4, + int a5, + unsigned __int8 a6, + int a7, + _DWORD *a8, + int a9, + _DWORD *a10) +{ + int v10; // edx + __int64 (__thiscall *v12)(int *, _DWORD, _DWORD, int, int, _DWORD, int, _DWORD *, void **); // eax + void (__cdecl *v13)(_DWORD *); // eax + _BYTE *v14; // ebx + unsigned int v15; // ecx + _DWORD *v16; // eax + __int64 Size; // [esp+20h] [ebp-68h] + size_t Sizea; // [esp+20h] [ebp-68h] + unsigned int v19; // [esp+64h] [ebp-24h] BYREF + void *Block; // [esp+68h] [ebp-20h] BYREF + unsigned int v21; // [esp+6Ch] [ebp-1Ch] + char v22[20]; // [esp+70h] [ebp-18h] BYREF + __int64 v23; // [esp+98h] [ebp+10h] + + v10 = *a2; + if ( a9 ) + return ((__int64 (__thiscall *)(int *, _DWORD, _DWORD, int, int, _DWORD, int, _DWORD *, int))*(_DWORD *)(v10 + 8))( + a2, + a3, + HIDWORD(a3), + a4, + a5, + a6, + a7, + a8, + a9); + Block = v22; + v12 = *(__int64 (__thiscall **)(int *, _DWORD, _DWORD, int, int, _DWORD, int, _DWORD *, void **))(v10 + 12); + v21 = 0; + v22[0] = 0; + v23 = v12(a2, a3, HIDWORD(a3), a4, a5, a6, a7, a8, &Block); + if ( !*a8 ) + { + v13 = (void (__cdecl *)(_DWORD *))a10[6]; + if ( v13 ) + v13(a10); + v14 = Block; + v15 = v21; + v16 = a10 + 2; + *a10 = a10 + 2; + Sizea = v15; + if ( &v14[v15] && !v14 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v19 = v15; + if ( v15 > 0xF ) + { + v16 = std::string::_M_create(&v19, 0); + *a10 = v16; + a10[2] = v19; + } + else + { + if ( v15 == 1 ) + { + *((_BYTE *)a10 + 8) = *v14; +LABEL_15: + a10[1] = Sizea; + *((_BYTE *)v16 + Sizea) = 0; + a10[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + goto LABEL_5; + } + if ( !v15 ) + goto LABEL_15; + } + memcpy(v16, v14, Sizea); + Sizea = v19; + v16 = (_DWORD *)*a10; + goto LABEL_15; + } +LABEL_5: + Size = v23; + if ( Block != v22 ) + operator delete(Block); + return Size; +} + +//----- (004AC700) -------------------------------------------------------- +struct _Unwind_Exception *__cdecl std::__facet_shims::__money_get( + int a1, + int a2, + int a3, + int a4, + int a5, + int a6, + unsigned __int8 a7, + int a8, + _DWORD *a9, + int a10, + _DWORD *a11) +{ + int v12; // ecx + int v13; // eax + void (__cdecl *v14)(_DWORD *); // eax + int v15; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+30h] [ebp-58h] + int v17; // [esp+7Bh] [ebp-Dh] BYREF + _DWORD v18[2]; // [esp+7Ch] [ebp-Ch] BYREF + + if ( a10 ) + return (struct _Unwind_Exception *)(*(unsigned int (__thiscall **)(int, int, int, int, int, _DWORD, int, _DWORD *, int))(*(_DWORD *)a2 + 8))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10); + v18[0] = std::wstring::_S_construct(0, 0); + lpuexcpt = (struct _Unwind_Exception *)(*(unsigned int (__thiscall **)(int, int, int, int, int, _DWORD, int, _DWORD *, _DWORD *))(*(_DWORD *)a2 + 12))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + v18); + if ( *a9 ) + { + v12 = v18[0]; + } + else + { + v14 = (void (__cdecl *)(_DWORD *))a11[6]; + if ( v14 ) + v14(a11); + std::wstring::basic_string(a11, v18); + v12 = v18[0]; + v15 = *(_DWORD *)(v18[0] - 12); + a11[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + a11[1] = v15; + } + if ( _CRT_MT ) + { + v13 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 - 4), 0xFFFFFFFF); + } + else + { + v13 = *(_DWORD *)(v12 - 4); + *(_DWORD *)(v12 - 4) = v13 - 1; + } + if ( v13 <= 0 ) + std::wstring::_Rep::_M_destroy((void *)(v12 - 12), (int)&v17); + return lpuexcpt; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004AC920) -------------------------------------------------------- +struct _Unwind_Exception *__cdecl std::__facet_shims::__money_get( + int a1, + int *a2, + int a3, + int a4, + int a5, + int a6, + unsigned __int8 a7, + int a8, + _DWORD *a9, + int a10, + _DWORD *a11) +{ + int v11; // edx + __int64 (__thiscall *v13)(int *, int, int, int, int, _DWORD, int, _DWORD *, void **); // eax + void (__cdecl *v14)(_DWORD *); // eax + int v15; // edx + struct _Unwind_Exception *lpuexcpt; // [esp+30h] [ebp-68h] + void *Block; // [esp+78h] [ebp-20h] BYREF + int v18; // [esp+7Ch] [ebp-1Ch] + __int16 v19[10]; // [esp+80h] [ebp-18h] BYREF + + v11 = *a2; + if ( a10 ) + return (struct _Unwind_Exception *)(*(unsigned int (__thiscall **)(int *, int, int, int, int, _DWORD, int, _DWORD *, int))(v11 + 8))( + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10); + Block = v19; + v19[0] = 0; + v13 = *(__int64 (__thiscall **)(int *, int, int, int, int, _DWORD, int, _DWORD *, void **))(v11 + 12); + v18 = 0; + lpuexcpt = (struct _Unwind_Exception *)v13(a2, a3, a4, a5, a6, a7, a8, a9, &Block); + if ( !*a9 ) + { + v14 = (void (__cdecl *)(_DWORD *))a11[6]; + if ( v14 ) + v14(a11); + v15 = v18; + *a11 = a11 + 2; + std::wstring::_M_construct(a11, Block, (int)Block + 2 * v15); + a11[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + } + if ( Block != v19 ) + operator delete(Block); + return lpuexcpt; +} + +//----- (004ACAF0) -------------------------------------------------------- +__int64 __cdecl std::__facet_shims::__money_put( + int a1, + int a2, + int a3, + int a4, + unsigned __int8 a5, + int a6, + char a7, + long double a8, + int a9) +{ + int v9; // ecx + int v10; // eax + __int64 lpuexcpt; // [esp+20h] [ebp-58h] + _DWORD v14[2]; // [esp+6Bh] [ebp-Dh] BYREF + + if ( !a9 ) + return ((__int64 (__thiscall *)(int, int, int, _DWORD, int, _DWORD, _DWORD, _DWORD, _DWORD))*(_DWORD *)(*(_DWORD *)a2 + 8))( + a2, + a3, + a4, + a5, + a6, + a7, + LODWORD(a8), + DWORD1(a8), + HIDWORD(a8)); + if ( !*(_DWORD *)(a9 + 24) ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + std::string::string((_DWORD *)((char *)v14 + 1), *(unsigned __int8 **)a9, *(_DWORD *)(a9 + 4), (int)v14); + lpuexcpt = ((__int64 (__thiscall *)(int, int, int, _DWORD, int, _DWORD, char *))*(_DWORD *)(*(_DWORD *)a2 + 12))( + a2, + a3, + a4, + a5, + a6, + a7, + (char *)v14 + 1); + v9 = *(_DWORD *)((char *)v14 + 1); + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)((char *)v14 + 1) - 4), 0xFFFFFFFF) > 0 ) + return lpuexcpt; +LABEL_8: + std::string::_Rep::_M_destroy((void *)(v9 - 12), (int)v14); + return lpuexcpt; + } + v10 = *(_DWORD *)(*(_DWORD *)((char *)v14 + 1) - 4); + *(_DWORD *)(*(_DWORD *)((char *)v14 + 1) - 4) = v10 - 1; + if ( v10 <= 0 ) + goto LABEL_8; + return lpuexcpt; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004ACCA0) -------------------------------------------------------- +__int64 __cdecl std::__facet_shims::__money_put( + int a1, + int a2, + int a3, + int a4, + unsigned __int8 a5, + int a6, + char a7, + long double a8, + int a9) +{ + __int64 lpuexcpt; // [esp+20h] [ebp-68h] + void *Block[2]; // [esp+68h] [ebp-20h] BYREF + char v13[20]; // [esp+70h] [ebp-18h] BYREF + + if ( !a9 ) + return ((__int64 (__thiscall *)(int, int, int, _DWORD, int, _DWORD, _DWORD, _DWORD, _DWORD))*(_DWORD *)(*(_DWORD *)a2 + 8))( + a2, + a3, + a4, + a5, + a6, + a7, + LODWORD(a8), + DWORD1(a8), + HIDWORD(a8)); + if ( !*(_DWORD *)(a9 + 24) ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + Block[0] = v13; + std::string::_M_construct(Block, *(_BYTE **)a9, *(_DWORD *)a9 + *(_DWORD *)(a9 + 4)); + lpuexcpt = ((__int64 (__thiscall *)(int, int, int, _DWORD, int, _DWORD, void **))*(_DWORD *)(*(_DWORD *)a2 + 12))( + a2, + a3, + a4, + a5, + a6, + a7, + Block); + if ( Block[0] != v13 ) + operator delete(Block[0]); + return lpuexcpt; +} + +//----- (004ACE20) -------------------------------------------------------- +__int64 __cdecl std::__facet_shims::__money_put( + int a1, + int a2, + int a3, + int a4, + unsigned __int8 a5, + int a6, + unsigned __int16 a7, + long double a8, + int a9) +{ + int v9; // ecx + int v10; // eax + __int64 lpuexcpt; // [esp+20h] [ebp-58h] + _DWORD v14[2]; // [esp+6Bh] [ebp-Dh] BYREF + + if ( !a9 ) + return ((__int64 (__thiscall *)(int, int, int, _DWORD, int, _DWORD, _DWORD, _DWORD, _DWORD))*(_DWORD *)(*(_DWORD *)a2 + 8))( + a2, + a3, + a4, + a5, + a6, + a7, + LODWORD(a8), + DWORD1(a8), + HIDWORD(a8)); + if ( !*(_DWORD *)(a9 + 24) ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + std::wstring::basic_string((_DWORD *)((char *)v14 + 1), *(_WORD **)a9, *(_DWORD *)(a9 + 4), (int)v14); + lpuexcpt = ((__int64 (__thiscall *)(int, int, int, _DWORD, int, _DWORD, char *))*(_DWORD *)(*(_DWORD *)a2 + 12))( + a2, + a3, + a4, + a5, + a6, + a7, + (char *)v14 + 1); + v9 = *(_DWORD *)((char *)v14 + 1); + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)((char *)v14 + 1) - 4), 0xFFFFFFFF) > 0 ) + return lpuexcpt; +LABEL_8: + std::wstring::_Rep::_M_destroy((void *)(v9 - 12), (int)v14); + return lpuexcpt; + } + v10 = *(_DWORD *)(*(_DWORD *)((char *)v14 + 1) - 4); + *(_DWORD *)(*(_DWORD *)((char *)v14 + 1) - 4) = v10 - 1; + if ( v10 <= 0 ) + goto LABEL_8; + return lpuexcpt; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004ACFD0) -------------------------------------------------------- +__int64 __cdecl std::__facet_shims::__money_put( + int a1, + int a2, + int a3, + int a4, + unsigned __int8 a5, + int a6, + unsigned __int16 a7, + long double a8, + int a9) +{ + __int64 lpuexcpt; // [esp+20h] [ebp-68h] + void *Block[2]; // [esp+68h] [ebp-20h] BYREF + char v13[20]; // [esp+70h] [ebp-18h] BYREF + + if ( !a9 ) + return ((__int64 (__thiscall *)(int, int, int, _DWORD, int, _DWORD, _DWORD, _DWORD, _DWORD))*(_DWORD *)(*(_DWORD *)a2 + 8))( + a2, + a3, + a4, + a5, + a6, + a7, + LODWORD(a8), + DWORD1(a8), + HIDWORD(a8)); + if ( !*(_DWORD *)(a9 + 24) ) + std::__throw_logic_error((std::logic_error *)"uninitialized __any_string"); + Block[0] = v13; + std::wstring::_M_construct(Block, *(_WORD **)a9, *(_DWORD *)a9 + 2 * *(_DWORD *)(a9 + 4)); + lpuexcpt = ((__int64 (__thiscall *)(int, int, int, _DWORD, int, _DWORD, void **))*(_DWORD *)(*(_DWORD *)a2 + 12))( + a2, + a3, + a4, + a5, + a6, + a7, + Block); + if ( Block[0] != v13 ) + operator delete(Block[0]); + return lpuexcpt; +} + +//----- (004AD150) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v2 = _CRT_MT; + *Block = &off_519D20; + v3 = (volatile signed __int32 *)Block[3]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51B590; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4AD1B3: variable 'lpfctx' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519D20: using guessed type int (*off_519D20)(); +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004AD1E0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v2 = _CRT_MT; + *Block = &off_519D3C; + v3 = (volatile signed __int32 *)Block[3]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51A618; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4AD243: variable 'lpfctx' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519D3C: using guessed type int (*off_519D3C)(); +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004AD270) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v2 = _CRT_MT; + *a1 = &off_519D20; + v3 = (volatile signed __int32 *)a1[3]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *a1 = &off_51B590; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4AD2D3: variable 'lpfctx' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519D20: using guessed type int (*off_519D20)(); +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004AD300) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v2 = _CRT_MT; + *a1 = &off_519D3C; + v3 = (volatile signed __int32 *)a1[3]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *a1 = &off_51A618; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4AD363: variable 'lpfctx' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519D3C: using guessed type int (*off_519D3C)(); +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004AD390) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v2 = _CRT_MT; + *Block = &off_519D58; + v3 = (volatile signed __int32 *)Block[3]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51B5AC; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4AD3F3: variable 'lpfctx' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519D58: using guessed type int (*off_519D58)(); +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004AD420) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v2 = _CRT_MT; + *Block = &off_519D74; + v3 = (volatile signed __int32 *)Block[3]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51A634; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4AD483: variable 'lpfctx' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519D74: using guessed type int (*off_519D74)(); +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004AD4B0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v2 = _CRT_MT; + *a1 = &off_519D58; + v3 = (volatile signed __int32 *)a1[3]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *a1 = &off_51B5AC; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4AD513: variable 'lpfctx' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519D58: using guessed type int (*off_519D58)(); +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004AD540) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::collate_shim::~collate_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v2 = _CRT_MT; + *a1 = &off_519D74; + v3 = (volatile signed __int32 *)a1[3]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *a1 = &off_51A634; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4AD5A3: variable 'lpfctx' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519D74: using guessed type int (*off_519D74)(); +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004AD5D0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = _CRT_MT; + *Block = &off_519D90; + v3 = (volatile signed __int32 *)Block[4]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::messages::~messages(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519D90: using guessed type int (*off_519D90)(); + +//----- (004AD620) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = _CRT_MT; + *Block = &off_519DAC; + v3 = (volatile signed __int32 *)Block[4]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::messages::~messages(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519DAC: using guessed type int (*off_519DAC)(); + +//----- (004AD670) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = _CRT_MT; + *a1 = &off_519D90; + v3 = (volatile signed __int32 *)a1[4]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::messages::~messages(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519D90: using guessed type int (*off_519D90)(); + +//----- (004AD6C0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = _CRT_MT; + *a1 = &off_519DAC; + v3 = (volatile signed __int32 *)a1[4]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::messages::~messages(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519DAC: using guessed type int (*off_519DAC)(); + +//----- (004AD710) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = _CRT_MT; + *Block = &off_519DC8; + v3 = (volatile signed __int32 *)Block[4]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::messages::~messages(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519DC8: using guessed type int (*off_519DC8)(); + +//----- (004AD760) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = _CRT_MT; + *Block = &off_519DE4; + v3 = (volatile signed __int32 *)Block[4]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::messages::~messages(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519DE4: using guessed type int (*off_519DE4)(); + +//----- (004AD7B0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = _CRT_MT; + *a1 = &off_519DC8; + v3 = (volatile signed __int32 *)a1[4]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::messages::~messages(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519DC8: using guessed type int (*off_519DC8)(); + +//----- (004AD800) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::messages_shim::~messages_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = _CRT_MT; + *a1 = &off_519DE4; + v3 = (volatile signed __int32 *)a1[4]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::messages::~messages(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519DE4: using guessed type int (*off_519DE4)(); + +//----- (004AD850) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = Block[4]; + *Block = &off_519E00; + v3 = (volatile signed __int32 *)Block[3]; + *(_DWORD *)(v2 + 12) = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::numpunct::~numpunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519E00: using guessed type int (*off_519E00)(); + +//----- (004AD8B0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = Block[4]; + *Block = &off_519E24; + v3 = (volatile signed __int32 *)Block[3]; + *(_DWORD *)(v2 + 12) = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::numpunct::~numpunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519E24: using guessed type int (*off_519E24)(); + +//----- (004AD910) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = a1[4]; + *a1 = &off_519E00; + v3 = (volatile signed __int32 *)a1[3]; + *(_DWORD *)(v2 + 12) = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::numpunct::~numpunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519E00: using guessed type int (*off_519E00)(); + +//----- (004AD960) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = a1[4]; + *a1 = &off_519E24; + v3 = (volatile signed __int32 *)a1[3]; + *(_DWORD *)(v2 + 12) = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::numpunct::~numpunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519E24: using guessed type int (*off_519E24)(); + +//----- (004AD9B0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = Block[4]; + *Block = &off_519E48; + v3 = (volatile signed __int32 *)Block[3]; + *(_DWORD *)(v2 + 12) = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::numpunct::~numpunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519E48: using guessed type int (*off_519E48)(); + +//----- (004ADA10) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = Block[4]; + *Block = &off_519E6C; + v3 = (volatile signed __int32 *)Block[3]; + *(_DWORD *)(v2 + 12) = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::numpunct::~numpunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519E6C: using guessed type int (*off_519E6C)(); + +//----- (004ADA70) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = a1[4]; + *a1 = &off_519E48; + v3 = (volatile signed __int32 *)a1[3]; + *(_DWORD *)(v2 + 12) = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::numpunct::~numpunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519E48: using guessed type int (*off_519E48)(); + +//----- (004ADAC0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::numpunct_shim::~numpunct_shim(_DWORD *a1) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = a1[4]; + *a1 = &off_519E6C; + v3 = (volatile signed __int32 *)a1[3]; + *(_DWORD *)(v2 + 12) = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::numpunct::~numpunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519E6C: using guessed type int (*off_519E6C)(); + +//----- (004ADB10) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519E90; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51B744; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4ADB43: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519E90: using guessed type int (*off_519E90)(); +// 51B744: using guessed type int (*off_51B744)(); + +//----- (004ADB70) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519EB8; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51A6D0; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4ADBA3: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519EB8: using guessed type int (*off_519EB8)(); +// 51A6D0: using guessed type int (*off_51A6D0)(); + +//----- (004ADBD0) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519E90; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51B744; + std::locale::facet::~facet(a1); +} +// 4ADBD1: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519E90: using guessed type int (*off_519E90)(); +// 51B744: using guessed type int (*off_51B744)(); + +//----- (004ADC20) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519EB8; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51A6D0; + std::locale::facet::~facet(a1); +} +// 4ADC21: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519EB8: using guessed type int (*off_519EB8)(); +// 51A6D0: using guessed type int (*off_51A6D0)(); + +//----- (004ADC70) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519EE4; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51B76C; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4ADCA3: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519EE4: using guessed type int (*off_519EE4)(); +// 51B76C: using guessed type int (*off_51B76C)(); + +//----- (004ADCD0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519F0C; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51A6FC; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4ADD03: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F0C: using guessed type int (*off_519F0C)(); +// 51A6FC: using guessed type int (*off_51A6FC)(); + +//----- (004ADD30) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519EE4; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51B76C; + std::locale::facet::~facet(a1); +} +// 4ADD31: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519EE4: using guessed type int (*off_519EE4)(); +// 51B76C: using guessed type int (*off_51B76C)(); + +//----- (004ADD80) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::time_get_shim::~time_get_shim(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519F0C; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51A6FC; + std::locale::facet::~facet(a1); +} +// 4ADD81: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F0C: using guessed type int (*off_519F0C)(); +// 51A6FC: using guessed type int (*off_51A6FC)(); + +//----- (004ADDD0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519F38; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51B804; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4ADE03: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F38: using guessed type int (*off_519F38)(); +// 51B804: using guessed type int (*off_51B804)(); + +//----- (004ADE30) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519F50; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51A728; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4ADE63: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F50: using guessed type int (*off_519F50)(); +// 51A728: using guessed type int (*off_51A728)(); + +//----- (004ADE90) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519F38; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51B804; + std::locale::facet::~facet(a1); +} +// 4ADE91: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F38: using guessed type int (*off_519F38)(); +// 51B804: using guessed type int (*off_51B804)(); + +//----- (004ADEE0) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519F50; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51A728; + std::locale::facet::~facet(a1); +} +// 4ADEE1: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F50: using guessed type int (*off_519F50)(); +// 51A728: using guessed type int (*off_51A728)(); + +//----- (004ADF30) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519F68; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51B81C; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4ADF63: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F68: using guessed type int (*off_519F68)(); +// 51B81C: using guessed type int (*off_51B81C)(); + +//----- (004ADF90) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519F80; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51A740; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4ADFC3: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F80: using guessed type int (*off_519F80)(); +// 51A740: using guessed type int (*off_51A740)(); + +//----- (004ADFF0) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim( + std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519F68; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51B81C; + std::locale::facet::~facet(a1); +} +// 4ADFF1: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F68: using guessed type int (*off_519F68)(); +// 51B81C: using guessed type int (*off_51B81C)(); + +//----- (004AE040) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::money_get_shim::~money_get_shim( + std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519F80; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51A740; + std::locale::facet::~facet(a1); +} +// 4AE041: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F80: using guessed type int (*off_519F80)(); +// 51A740: using guessed type int (*off_51A740)(); + +//----- (004AE090) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519F98; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51B834; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4AE0C3: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F98: using guessed type int (*off_519F98)(); +// 51B834: using guessed type int (*off_51B834)(); + +//----- (004AE0F0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519FB0; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51A758; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4AE123: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519FB0: using guessed type int (*off_519FB0)(); +// 51A758: using guessed type int (*off_51A758)(); + +//----- (004AE150) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519F98; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51B834; + std::locale::facet::~facet(a1); +} +// 4AE151: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519F98: using guessed type int (*off_519F98)(); +// 51B834: using guessed type int (*off_51B834)(); + +//----- (004AE1A0) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519FB0; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51A758; + std::locale::facet::~facet(a1); +} +// 4AE1A1: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519FB0: using guessed type int (*off_519FB0)(); +// 51A758: using guessed type int (*off_51A758)(); + +//----- (004AE1F0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519FC8; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51B84C; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4AE223: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519FC8: using guessed type int (*off_519FC8)(); +// 51B84C: using guessed type int (*off_51B84C)(); + +//----- (004AE250) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim(_DWORD *Block) +{ + int v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + v2 = _CRT_MT; + *Block = &off_519FE0; + v3 = (volatile signed __int32 *)Block[2]; + if ( v2 ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + *Block = &off_51A770; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4AE283: variable 'Blocka' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519FE0: using guessed type int (*off_519FE0)(); +// 51A770: using guessed type int (*off_51A770)(); + +//----- (004AE2B0) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim( + std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519FC8; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51B84C; + std::locale::facet::~facet(a1); +} +// 4AE2B1: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519FC8: using guessed type int (*off_519FC8)(); +// 51B84C: using guessed type int (*off_51B84C)(); + +//----- (004AE300) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::money_put_shim::~money_put_shim( + std::locale::facet *a1) +{ + _DWORD *v1; // ecx + _DWORD *v2; // ebx + int v3; // eax + volatile signed __int32 *v4; // ecx + signed __int32 v5; // eax + + v2 = v1; + v3 = _CRT_MT; + *v1 = &off_519FE0; + v4 = (volatile signed __int32 *)v1[2]; + if ( v3 ) + { + v5 = _InterlockedExchangeAdd(v4 + 1, 0xFFFFFFFF); + } + else + { + v5 = *((_DWORD *)v4 + 1); + *((_DWORD *)v4 + 1) = v5 - 1; + } + if ( v5 == 1 ) + (*(void (**)(void))(*v4 + 4))(); + *v2 = &off_51A770; + std::locale::facet::~facet(a1); +} +// 4AE301: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 519FE0: using guessed type int (*off_519FE0)(); +// 51A770: using guessed type int (*off_51A770)(); + +//----- (004AE350) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)Block[4]; + *Block = &off_519FF8; + v3 = (volatile signed __int32 *)Block[3]; + v2[3] = 0; + v2[6] = 0; + v2[8] = 0; + v2[10] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519FF8: using guessed type int (*off_519FF8)(); + +//----- (004AE3C0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)Block[4]; + *Block = &off_51A02C; + v3 = (volatile signed __int32 *)Block[3]; + v2[3] = 0; + v2[6] = 0; + v2[8] = 0; + v2[10] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A02C: using guessed type int (*off_51A02C)(); + +//----- (004AE430) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *a1) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)a1[4]; + *a1 = &off_519FF8; + v3 = (volatile signed __int32 *)a1[3]; + v2[3] = 0; + v2[6] = 0; + v2[8] = 0; + v2[10] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::moneypunct::~moneypunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 519FF8: using guessed type int (*off_519FF8)(); + +//----- (004AE4A0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *a1) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)a1[4]; + *a1 = &off_51A02C; + v3 = (volatile signed __int32 *)a1[3]; + v2[3] = 0; + v2[6] = 0; + v2[8] = 0; + v2[10] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::moneypunct::~moneypunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A02C: using guessed type int (*off_51A02C)(); + +//----- (004AE510) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)Block[4]; + *Block = &off_51A060; + v3 = (volatile signed __int32 *)Block[3]; + v2[3] = 0; + v2[6] = 0; + v2[8] = 0; + v2[10] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A060: using guessed type int (*off_51A060)(); + +//----- (004AE580) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *Block) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)Block[4]; + *Block = &off_51A094; + v3 = (volatile signed __int32 *)Block[3]; + v2[3] = 0; + v2[6] = 0; + v2[8] = 0; + v2[10] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A094: using guessed type int (*off_51A094)(); + +//----- (004AE5F0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *a1) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)a1[4]; + *a1 = &off_51A060; + v3 = (volatile signed __int32 *)a1[3]; + v2[3] = 0; + v2[6] = 0; + v2[8] = 0; + v2[10] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::moneypunct::~moneypunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A060: using guessed type int (*off_51A060)(); + +//----- (004AE660) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *a1) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)a1[4]; + *a1 = &off_51A094; + v3 = (volatile signed __int32 *)a1[3]; + v2[3] = 0; + v2[6] = 0; + v2[8] = 0; + v2[10] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::moneypunct::~moneypunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A094: using guessed type int (*off_51A094)(); + +//----- (004AE6D0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim( + _DWORD *Block) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)Block[4]; + *Block = &off_51A0C8; + v3 = (volatile signed __int32 *)Block[3]; + v2[3] = 0; + v2[7] = 0; + v2[9] = 0; + v2[11] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A0C8: using guessed type int (*off_51A0C8)(); + +//----- (004AE740) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim( + _DWORD *Block) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)Block[4]; + *Block = &off_51A0FC; + v3 = (volatile signed __int32 *)Block[3]; + v2[3] = 0; + v2[7] = 0; + v2[9] = 0; + v2[11] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A0FC: using guessed type int (*off_51A0FC)(); + +//----- (004AE7B0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *a1) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)a1[4]; + *a1 = &off_51A0C8; + v3 = (volatile signed __int32 *)a1[3]; + v2[3] = 0; + v2[7] = 0; + v2[9] = 0; + v2[11] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::moneypunct::~moneypunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A0C8: using guessed type int (*off_51A0C8)(); + +//----- (004AE820) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *a1) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)a1[4]; + *a1 = &off_51A0FC; + v3 = (volatile signed __int32 *)a1[3]; + v2[3] = 0; + v2[7] = 0; + v2[9] = 0; + v2[11] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::moneypunct::~moneypunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A0FC: using guessed type int (*off_51A0FC)(); + +//----- (004AE890) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim( + _DWORD *Block) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)Block[4]; + *Block = &off_51A130; + v3 = (volatile signed __int32 *)Block[3]; + v2[3] = 0; + v2[7] = 0; + v2[9] = 0; + v2[11] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A130: using guessed type int (*off_51A130)(); + +//----- (004AE900) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim( + _DWORD *Block) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)Block[4]; + *Block = &off_51A164; + v3 = (volatile signed __int32 *)Block[3]; + v2[3] = 0; + v2[7] = 0; + v2[9] = 0; + v2[11] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (__fastcall **)(volatile signed __int32 *))(*v3 + 4))(v3); + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A164: using guessed type int (*off_51A164)(); + +//----- (004AE970) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *a1) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)a1[4]; + *a1 = &off_51A130; + v3 = (volatile signed __int32 *)a1[3]; + v2[3] = 0; + v2[7] = 0; + v2[9] = 0; + v2[11] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::moneypunct::~moneypunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A130: using guessed type int (*off_51A130)(); + +//----- (004AE9E0) -------------------------------------------------------- +void __fastcall std::__facet_shims::`anonymous namespace'::moneypunct_shim::~moneypunct_shim(_DWORD *a1) +{ + _DWORD *v2; // eax + volatile signed __int32 *v3; // ecx + signed __int32 v4; // eax + + v2 = (_DWORD *)a1[4]; + *a1 = &off_51A164; + v3 = (volatile signed __int32 *)a1[3]; + v2[3] = 0; + v2[7] = 0; + v2[9] = 0; + v2[11] = 0; + if ( _CRT_MT ) + { + v4 = _InterlockedExchangeAdd(v3 + 1, 0xFFFFFFFF); + } + else + { + v4 = *((_DWORD *)v3 + 1); + *((_DWORD *)v3 + 1) = v4 - 1; + } + if ( v4 == 1 ) + (*(void (**)(void))(*v3 + 4))(); + std::moneypunct::~moneypunct(a1); +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A164: using guessed type int (*off_51A164)(); + +//----- (004AEA50) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::__destroy_string(int *a1) +{ + int v1; // ecx + int v2; // eax + int v3[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v1 = *a1; + if ( !_CRT_MT ) + { + v2 = *(_DWORD *)(v1 - 4); + *(_DWORD *)(v1 - 4) = v2 - 1; + if ( v2 > 0 ) + return; +LABEL_5: + std::string::_Rep::_M_destroy((void *)(v1 - 12), (int)v3); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v1 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4AEA50: using guessed type int var_D[3]; + +//----- (004AEAA0) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::__destroy_string(void **Block) +{ + if ( *Block != Block + 2 ) + operator delete(*Block); +} + +//----- (004AEAD0) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::__destroy_string(int *a1) +{ + int v1; // ecx + int v2; // eax + int v3[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v1 = *a1; + if ( !_CRT_MT ) + { + v2 = *(_DWORD *)(v1 - 4); + *(_DWORD *)(v1 - 4) = v2 - 1; + if ( v2 > 0 ) + return; +LABEL_5: + std::wstring::_Rep::_M_destroy((void *)(v1 - 12), (int)v3); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v1 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4AEAD0: using guessed type int var_D[3]; + +//----- (004AEB20) -------------------------------------------------------- +void __cdecl std::__facet_shims::`anonymous namespace'::__destroy_string(void **Block) +{ + if ( *Block != Block + 2 ) + operator delete(*Block); +} + +//----- (004AEB50) -------------------------------------------------------- +void __cdecl std::__facet_shims::__messages_get( + int a1, + int a2, + _DWORD *a3, + std::string *a4, + int a5, + int a6, + unsigned __int8 *a7, + size_t a8) +{ + void (__cdecl *v8)(_DWORD *); // eax + int v9; // ecx + int v10; // eax + int v11; // eax + int v12; // ecx + int v13; // eax + const std::string *v14; // [esp+4h] [ebp-74h] + _WORD v15[3]; // [esp+66h] [ebp-12h] BYREF + int v16[3]; // [esp+6Ch] [ebp-Ch] BYREF + + std::string::string(&v15[1], a7, a8, (int)v15); + (*(void (__thiscall **)(int *, int, std::string *, int, int, _WORD *))(*(_DWORD *)a2 + 12))( + v16, + a2, + a4, + a5, + a6, + &v15[1]); + v8 = (void (__cdecl *)(_DWORD *))a3[6]; + if ( v8 ) + v8(a3); + std::string::string(a3, (std::string *)v16, v14); + v9 = v16[0]; + v10 = *(_DWORD *)(v16[0] - 12); + a3[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + a3[1] = v10; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v9 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_5: + v12 = *(_DWORD *)&v15[1]; + if ( !_CRT_MT ) + goto LABEL_6; + goto LABEL_10; + } + } + else + { + v11 = *(_DWORD *)(v9 - 4); + *(_DWORD *)(v9 - 4) = v11 - 1; + if ( v11 > 0 ) + goto LABEL_5; + } + std::string::_Rep::_M_destroy((void *)(v9 - 12), (int)v15 + 1); + v12 = *(_DWORD *)&v15[1]; + if ( !_CRT_MT ) + { +LABEL_6: + v13 = *(_DWORD *)(v12 - 4); + *(_DWORD *)(v12 - 4) = v13 - 1; + if ( v13 > 0 ) + return; +LABEL_11: + std::string::_Rep::_M_destroy((void *)(v12 - 12), (int)v16); + return; + } +LABEL_10: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v12 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_11; +} +// 4AEC04: variable 'v14' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004AED10) -------------------------------------------------------- +void __cdecl std::__facet_shims::__messages_get( + int a1, + int a2, + _DWORD *a3, + int a4, + int a5, + int a6, + _BYTE *a7, + int a8) +{ + void (__cdecl *v8)(_DWORD *); // eax + _BYTE *v9; // edx + _DWORD *v10; // eax + char *v11; // eax + void *Src; // [esp+24h] [ebp-84h] + int Size; // [esp+28h] [ebp-80h] + int v14; // [esp+6Ch] [ebp-3Ch] BYREF + void *v15[2]; // [esp+70h] [ebp-38h] BYREF + char v16[16]; // [esp+78h] [ebp-30h] BYREF + void *Block; // [esp+88h] [ebp-20h] BYREF + unsigned int v18; // [esp+8Ch] [ebp-1Ch] + char v19; // [esp+90h] [ebp-18h] BYREF + + v15[0] = v16; + std::string::_M_construct(v15, a7, (int)&a7[a8]); + (*(void (__thiscall **)(void **, int, int, int, int, void **))(*(_DWORD *)a2 + 12))(&Block, a2, a4, a5, a6, v15); + v8 = (void (__cdecl *)(_DWORD *))a3[6]; + if ( v8 ) + v8(a3); + v9 = Block; + v10 = a3 + 2; + *a3 = a3 + 2; + Src = v9; + Size = v18; + if ( &v9[v18] && !v9 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v14 = v18; + if ( v18 > 0xF ) + { + v10 = std::string::_M_create((unsigned int *)&v14, 0); + *a3 = v10; + a3[2] = v14; +LABEL_16: + memcpy(v10, Src, Size); + Size = v14; + v10 = (_DWORD *)*a3; + goto LABEL_8; + } + if ( v18 == 1 ) + { + *((_BYTE *)a3 + 8) = *v9; + goto LABEL_8; + } + if ( v18 ) + goto LABEL_16; +LABEL_8: + a3[1] = Size; + *((_BYTE *)v10 + Size) = 0; + v11 = (char *)Block; + a3[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + if ( v11 != &v19 ) + operator delete(v11); + if ( v15[0] != v16 ) + operator delete(v15[0]); +} + +//----- (004AEF20) -------------------------------------------------------- +void __cdecl std::__facet_shims::__messages_get( + int a1, + int a2, + _DWORD *a3, + int a4, + int a5, + int a6, + _WORD *a7, + int a8) +{ + void (__cdecl *v8)(_DWORD *); // eax + int v9; // ecx + int v10; // eax + int v11; // eax + int v12; // ecx + int v13; // eax + _WORD v14[3]; // [esp+66h] [ebp-12h] BYREF + int v15[3]; // [esp+6Ch] [ebp-Ch] BYREF + + std::wstring::basic_string(&v14[1], a7, a8, (int)v14); + (*(void (__thiscall **)(int *, int, int, int, int, _WORD *))(*(_DWORD *)a2 + 12))(v15, a2, a4, a5, a6, &v14[1]); + v8 = (void (__cdecl *)(_DWORD *))a3[6]; + if ( v8 ) + v8(a3); + std::wstring::basic_string(a3, v15); + v9 = v15[0]; + v10 = *(_DWORD *)(v15[0] - 12); + a3[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + a3[1] = v10; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v9 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_5: + v12 = *(_DWORD *)&v14[1]; + if ( !_CRT_MT ) + goto LABEL_6; + goto LABEL_10; + } + } + else + { + v11 = *(_DWORD *)(v9 - 4); + *(_DWORD *)(v9 - 4) = v11 - 1; + if ( v11 > 0 ) + goto LABEL_5; + } + std::wstring::_Rep::_M_destroy((void *)(v9 - 12), (int)v14 + 1); + v12 = *(_DWORD *)&v14[1]; + if ( !_CRT_MT ) + { +LABEL_6: + v13 = *(_DWORD *)(v12 - 4); + *(_DWORD *)(v12 - 4) = v13 - 1; + if ( v13 > 0 ) + return; +LABEL_11: + std::wstring::_Rep::_M_destroy((void *)(v12 - 12), (int)v15); + return; + } +LABEL_10: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v12 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_11; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004AF0E0) -------------------------------------------------------- +void __cdecl std::__facet_shims::__messages_get( + int a1, + int a2, + _DWORD *a3, + int a4, + int a5, + int a6, + _WORD *a7, + int a8) +{ + void (__cdecl *v8)(_DWORD *); // eax + void *v9[2]; // [esp+60h] [ebp-38h] BYREF + char v10[16]; // [esp+68h] [ebp-30h] BYREF + void *Block[2]; // [esp+78h] [ebp-20h] BYREF + char v12; // [esp+80h] [ebp-18h] BYREF + + v9[0] = v10; + std::wstring::_M_construct(v9, a7, (int)&a7[a8]); + (*(void (__thiscall **)(void **, int, int, int, int, void **))(*(_DWORD *)a2 + 12))(Block, a2, a4, a5, a6, v9); + v8 = (void (__cdecl *)(_DWORD *))a3[6]; + if ( v8 ) + v8(a3); + *a3 = a3 + 2; + std::wstring::_M_construct(a3, (_WORD *)Block[0], (int)Block[0] + 2 * (int)Block[1]); + a3[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + if ( Block[0] != &v12 ) + operator delete(Block[0]); + if ( v9[0] != v10 ) + operator delete(v9[0]); +} + +//----- (004AF240) -------------------------------------------------------- +struct _Unwind_Exception *__cdecl std::__facet_shims::__messages_open( + int a1, + int a2, + unsigned __int8 *a3, + size_t a4, + int a5) +{ + int v5; // eax + int v6; // ecx + int v7; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + char v10[13]; // [esp+5Bh] [ebp-Dh] BYREF + + std::string::string(&v10[1], a3, a4, (int)v10); + v5 = (*(int (__thiscall **)(int, char *, int))(*(_DWORD *)a2 + 8))(a2, &v10[1], a5); + v6 = *(_DWORD *)&v10[1]; + lpuexcpt = (struct _Unwind_Exception *)v5; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v10[1] - 4), 0xFFFFFFFF) > 0 ) + return lpuexcpt; + } + else + { + v7 = *(_DWORD *)(*(_DWORD *)&v10[1] - 4); + *(_DWORD *)(*(_DWORD *)&v10[1] - 4) = v7 - 1; + if ( v7 > 0 ) + return lpuexcpt; + } + std::string::_Rep::_M_destroy((void *)(v6 - 12), (int)v10); + return lpuexcpt; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4AF240: using guessed type char var_D[13]; + +//----- (004AF350) -------------------------------------------------------- +struct _Unwind_Exception *__cdecl std::__facet_shims::__messages_open(int a1, int a2, _BYTE *a3, int a4, int a5) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + void *Block[2]; // [esp+58h] [ebp-20h] BYREF + char v8[24]; // [esp+60h] [ebp-18h] BYREF + + Block[0] = v8; + std::string::_M_construct(Block, a3, (int)&a3[a4]); + lpuexcpt = (struct _Unwind_Exception *)(*(int (__thiscall **)(int, void **, int))(*(_DWORD *)a2 + 8))(a2, Block, a5); + if ( Block[0] != v8 ) + operator delete(Block[0]); + return lpuexcpt; +} + +//----- (004AF420) -------------------------------------------------------- +struct _Unwind_Exception *__cdecl std::__facet_shims::__messages_open( + int a1, + int a2, + unsigned __int8 *a3, + size_t a4, + int a5) +{ + int v5; // eax + int v6; // ecx + int v7; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + char v10[13]; // [esp+5Bh] [ebp-Dh] BYREF + + std::string::string(&v10[1], a3, a4, (int)v10); + v5 = (*(int (__thiscall **)(int, char *, int))(*(_DWORD *)a2 + 8))(a2, &v10[1], a5); + v6 = *(_DWORD *)&v10[1]; + lpuexcpt = (struct _Unwind_Exception *)v5; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v10[1] - 4), 0xFFFFFFFF) > 0 ) + return lpuexcpt; + } + else + { + v7 = *(_DWORD *)(*(_DWORD *)&v10[1] - 4); + *(_DWORD *)(*(_DWORD *)&v10[1] - 4) = v7 - 1; + if ( v7 > 0 ) + return lpuexcpt; + } + std::string::_Rep::_M_destroy((void *)(v6 - 12), (int)v10); + return lpuexcpt; +} +// 50B0F0: using guessed type int _CRT_MT; +// 4AF420: using guessed type char var_D[13]; + +//----- (004AF530) -------------------------------------------------------- +struct _Unwind_Exception *__cdecl std::__facet_shims::__messages_open( + int a1, + int a2, + _BYTE *a3, + int a4, + int a5) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + void *Block[2]; // [esp+58h] [ebp-20h] BYREF + char v8[24]; // [esp+60h] [ebp-18h] BYREF + + Block[0] = v8; + std::string::_M_construct(Block, a3, (int)&a3[a4]); + lpuexcpt = (struct _Unwind_Exception *)(*(int (__thiscall **)(int, void **, int))(*(_DWORD *)a2 + 8))(a2, Block, a5); + if ( Block[0] != v8 ) + operator delete(Block[0]); + return lpuexcpt; +} + +//----- (004AF600) -------------------------------------------------------- +int __cdecl std::__facet_shims::__messages_close(int a1, int a2, int a3) +{ + return (*(int (__thiscall **)(int, int))(*(_DWORD *)a2 + 16))(a2, a3); +} + +//----- (004AF620) -------------------------------------------------------- +int __cdecl std::__facet_shims::__messages_close(int a1, int a2, int a3) +{ + return (*(int (__thiscall **)(int, int))(*(_DWORD *)a2 + 16))(a2, a3); +} + +//----- (004AF640) -------------------------------------------------------- +int __cdecl std::__facet_shims::__messages_close(int a1, int a2, int a3) +{ + return (*(int (__thiscall **)(int, int))(*(_DWORD *)a2 + 16))(a2, a3); +} + +//----- (004AF660) -------------------------------------------------------- +int __cdecl std::__facet_shims::__messages_close(int a1, int a2, int a3) +{ + return (*(int (__thiscall **)(int, int))(*(_DWORD *)a2 + 16))(a2, a3); +} + +//----- (004AF680) -------------------------------------------------------- +int __cdecl std::__facet_shims::__collate_compare(int a1, int a2, int a3, int a4, int a5, int a6) +{ + return (*(int (__thiscall **)(int, int, int, int, int))(*(_DWORD *)a2 + 8))(a2, a3, a4, a5, a6); +} + +//----- (004AF6C0) -------------------------------------------------------- +int __cdecl std::__facet_shims::__collate_compare(int a1, int a2, int a3, int a4, int a5, int a6) +{ + return (*(int (__thiscall **)(int, int, int, int, int))(*(_DWORD *)a2 + 8))(a2, a3, a4, a5, a6); +} + +//----- (004AF700) -------------------------------------------------------- +int __cdecl std::__facet_shims::__collate_compare(int a1, int a2, int a3, int a4, int a5, int a6) +{ + return (*(int (__thiscall **)(int, int, int, int, int))(*(_DWORD *)a2 + 8))(a2, a3, a4, a5, a6); +} + +//----- (004AF740) -------------------------------------------------------- +int __cdecl std::__facet_shims::__collate_compare(int a1, int a2, int a3, int a4, int a5, int a6) +{ + return (*(int (__thiscall **)(int, int, int, int, int))(*(_DWORD *)a2 + 8))(a2, a3, a4, a5, a6); +} + +//----- (004AF780) -------------------------------------------------------- +void __cdecl std::__facet_shims::__collate_transform(int a1, int a2, _DWORD *a3, std::string *a4, int a5) +{ + void (__cdecl *v5)(_DWORD *); // eax + int v6; // ecx + int v7; // eax + int v8; // eax + const std::string *v9; // [esp+4h] [ebp-64h] + int v10; // [esp+5Bh] [ebp-Dh] BYREF + _DWORD v11[3]; // [esp+5Ch] [ebp-Ch] BYREF + + (*(void (__thiscall **)(_DWORD *, int, std::string *, int))(*(_DWORD *)a2 + 12))(v11, a2, a4, a5); + v5 = (void (__cdecl *)(_DWORD *))a3[6]; + if ( v5 ) + v5(a3); + std::string::string(a3, (std::string *)v11, v9); + v6 = v11[0]; + v7 = *(_DWORD *)(v11[0] - 12); + a3[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + a3[1] = v7; + if ( !_CRT_MT ) + { + v8 = *(_DWORD *)(v6 - 4); + *(_DWORD *)(v6 - 4) = v8 - 1; + if ( v8 > 0 ) + return; +LABEL_7: + std::string::_Rep::_M_destroy((void *)(v6 - 12), (int)&v10); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v6 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_7; +} +// 4AF800: variable 'v9' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004AF8A0) -------------------------------------------------------- +void __cdecl std::__facet_shims::__collate_transform(int a1, int a2, _DWORD *a3, int a4, int a5) +{ + void (__cdecl *v5)(_DWORD *); // eax + _BYTE *v6; // edx + _DWORD *v7; // eax + char *v8; // eax + unsigned int v9; // edx + void *Src; // [esp+14h] [ebp-64h] + int Size; // [esp+18h] [ebp-60h] + unsigned int v12; // [esp+54h] [ebp-24h] BYREF + void *Block; // [esp+58h] [ebp-20h] BYREF + unsigned int v14; // [esp+5Ch] [ebp-1Ch] + char v15; // [esp+60h] [ebp-18h] BYREF + + (*(void (__thiscall **)(void **, int, int, int))(*(_DWORD *)a2 + 12))(&Block, a2, a4, a5); + v5 = (void (__cdecl *)(_DWORD *))a3[6]; + if ( v5 ) + v5(a3); + v6 = Block; + v7 = a3 + 2; + *a3 = a3 + 2; + Src = v6; + Size = v14; + if ( &v6[v14] && !v6 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v12 = v14; + if ( v14 > 0xF ) + { + v7 = std::string::_M_create(&v12, 0); + v9 = v12; + *a3 = v7; + a3[2] = v9; +LABEL_14: + memcpy(v7, Src, Size); + Size = v12; + v7 = (_DWORD *)*a3; + goto LABEL_8; + } + if ( v14 == 1 ) + { + *((_BYTE *)a3 + 8) = *v6; + goto LABEL_8; + } + if ( v14 ) + goto LABEL_14; +LABEL_8: + a3[1] = Size; + *((_BYTE *)v7 + Size) = 0; + v8 = (char *)Block; + a3[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + if ( v8 != &v15 ) + operator delete(v8); +} + +//----- (004AFA30) -------------------------------------------------------- +void __cdecl std::__facet_shims::__collate_transform(int a1, int a2, _DWORD *a3, int a4, int a5) +{ + void (__cdecl *v5)(_DWORD *); // eax + int v6; // ecx + int v7; // eax + int v8; // eax + int v9; // [esp+5Bh] [ebp-Dh] BYREF + _DWORD v10[3]; // [esp+5Ch] [ebp-Ch] BYREF + + (*(void (__thiscall **)(_DWORD *, int, int, int))(*(_DWORD *)a2 + 12))(v10, a2, a4, a5); + v5 = (void (__cdecl *)(_DWORD *))a3[6]; + if ( v5 ) + v5(a3); + std::wstring::basic_string(a3, v10); + v6 = v10[0]; + v7 = *(_DWORD *)(v10[0] - 12); + a3[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + a3[1] = v7; + if ( !_CRT_MT ) + { + v8 = *(_DWORD *)(v6 - 4); + *(_DWORD *)(v6 - 4) = v8 - 1; + if ( v8 > 0 ) + return; +LABEL_7: + std::wstring::_Rep::_M_destroy((void *)(v6 - 12), (int)&v9); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v6 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_7; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004AFB50) -------------------------------------------------------- +void __cdecl std::__facet_shims::__collate_transform(int a1, int a2, _DWORD *a3, int a4, int a5) +{ + void (__cdecl *v5)(_DWORD *); // eax + void *v6; // edx + void *Block[2]; // [esp+58h] [ebp-20h] BYREF + char v8; // [esp+60h] [ebp-18h] BYREF + + (*(void (__thiscall **)(void **, int, int, int))(*(_DWORD *)a2 + 12))(Block, a2, a4, a5); + v5 = (void (__cdecl *)(_DWORD *))a3[6]; + if ( v5 ) + v5(a3); + v6 = Block[1]; + *a3 = a3 + 2; + std::wstring::_M_construct(a3, (_WORD *)Block[0], (int)Block[0] + 2 * (_DWORD)v6); + a3[6] = std::__facet_shims::`anonymous namespace'::__destroy_string; + if ( Block[0] != &v8 ) + operator delete(Block[0]); +} + +//----- (004AFC40) -------------------------------------------------------- +int __cdecl std::__facet_shims::__time_get_dateorder(int a1, int a2) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a2 + 8))(a2); +} + +//----- (004AFC50) -------------------------------------------------------- +int __cdecl std::__facet_shims::__time_get_dateorder(int a1, int a2) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a2 + 8))(a2); +} + +//----- (004AFC60) -------------------------------------------------------- +int __cdecl std::__facet_shims::__time_get_dateorder(int a1, int a2) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a2 + 8))(a2); +} + +//----- (004AFC70) -------------------------------------------------------- +int __cdecl std::__facet_shims::__time_get_dateorder(int a1, int a2) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a2 + 8))(a2); +} + +//----- (004AFC80) -------------------------------------------------------- +void __cdecl std::__facet_shims::__numpunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + int v4; // eax + int v5; // ecx + int v6; // eax + int v7; // eax + int v8; // ecx + int v9; // eax + int v10; // edx + int v11; // ecx + int v12; // eax + unsigned int v13; // [esp+Ch] [ebp-5Ch] + unsigned int v14; // [esp+Ch] [ebp-5Ch] + unsigned int v15; // [esp+Ch] [ebp-5Ch] + std::string *v16; // [esp+14h] [ebp-54h] + std::string *v17; // [esp+14h] [ebp-54h] + std::string *v18; // [esp+14h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-50h] + char v22[13]; // [esp+5Bh] [ebp-Dh] BYREF + + *(_BYTE *)(a3 + 36) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_BYTE *)(a3 + 37) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 20) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 28) = 0; + *(_BYTE *)(a3 + 100) = 1; + (*(void (__thiscall **)(char *, int *))(v3 + 16))(&v22[1], a2); + lpuexcpt = *(struct _Unwind_Exception **)(*(_DWORD *)&v22[1] - 12); + v16 = (std::string *)operator new[]((unsigned int)lpuexcpt + 1); + std::string::copy(&v22[1], v16, (size_t)lpuexcpt, 0, v13); + *((_BYTE *)lpuexcpt + (_DWORD)v16) = 0; + *(_DWORD *)(a3 + 12) = lpuexcpt; + v4 = _CRT_MT; + *(_DWORD *)(a3 + 8) = v16; + v5 = *(_DWORD *)&v22[1]; + if ( v4 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v22[1] - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v6 = *(_DWORD *)(*(_DWORD *)&v22[1] - 4); + *(_DWORD *)(*(_DWORD *)&v22[1] - 4) = v6 - 1; + if ( v6 > 0 ) + goto LABEL_3; + } + std::string::_Rep::_M_destroy((void *)(v5 - 12), (int)v22); +LABEL_3: + (*(void (__thiscall **)(char *, int *))(*a2 + 20))(&v22[1], a2); + lpuexcpta = *(struct _Unwind_Exception **)(*(_DWORD *)&v22[1] - 12); + v17 = (std::string *)operator new[]((unsigned int)lpuexcpta + 1); + std::string::copy(&v22[1], v17, (size_t)lpuexcpta, 0, v14); + *((_BYTE *)lpuexcpta + (_DWORD)v17) = 0; + *(_DWORD *)(a3 + 24) = lpuexcpta; + v7 = _CRT_MT; + *(_DWORD *)(a3 + 20) = v17; + v8 = *(_DWORD *)&v22[1]; + if ( v7 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v22[1] - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_5; + } + else + { + v9 = *(_DWORD *)(*(_DWORD *)&v22[1] - 4); + *(_DWORD *)(*(_DWORD *)&v22[1] - 4) = v9 - 1; + if ( v9 > 0 ) + goto LABEL_5; + } + std::string::_Rep::_M_destroy((void *)(v8 - 12), (int)v22); +LABEL_5: + (*(void (__thiscall **)(char *, int *))(*a2 + 24))(&v22[1], a2); + lpuexcptb = *(struct _Unwind_Exception **)(*(_DWORD *)&v22[1] - 12); + v18 = (std::string *)operator new[]((unsigned int)lpuexcptb + 1); + std::string::copy(&v22[1], v18, (size_t)lpuexcptb, 0, v15); + *(_DWORD *)(a3 + 28) = v18; + *(_DWORD *)(a3 + 32) = lpuexcptb; + v10 = _CRT_MT; + *((_BYTE *)lpuexcptb + (_DWORD)v18) = 0; + v11 = *(_DWORD *)&v22[1]; + if ( !v10 ) + { + v12 = *(_DWORD *)(*(_DWORD *)&v22[1] - 4); + *(_DWORD *)(*(_DWORD *)&v22[1] - 4) = v12 - 1; + if ( v12 > 0 ) + return; +LABEL_11: + std::string::_Rep::_M_destroy((void *)(v11 - 12), (int)v22); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v22[1] - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_11; +} +// 4AFD39: variable 'v13' is possibly undefined +// 4AFDC7: variable 'v14' is possibly undefined +// 4AFE55: variable 'v15' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 4AFC80: using guessed type char var_D[13]; + +//----- (004AFF70) -------------------------------------------------------- +void __cdecl std::__facet_shims::__numpunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + char *v4; // eax + char *v5; // eax + char *v6; // eax + _BYTE *v7; // [esp+14h] [ebp-64h] + _BYTE *v8; // [esp+14h] [ebp-64h] + _BYTE *v9; // [esp+14h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-60h] + void *Block; // [esp+58h] [ebp-20h] BYREF + struct _Unwind_Exception *v14; // [esp+5Ch] [ebp-1Ch] + char v15[24]; // [esp+60h] [ebp-18h] BYREF + + *(_BYTE *)(a3 + 36) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_BYTE *)(a3 + 37) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 20) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 28) = 0; + *(_BYTE *)(a3 + 100) = 1; + (*(void (__thiscall **)(void **, int *))(v3 + 16))(&Block, a2); + lpuexcpt = v14; + v7 = (_BYTE *)operator new[]((unsigned int)v14 + 1); + std::string::copy(&Block, v7, (size_t)lpuexcpt, 0); + *(_DWORD *)(a3 + 12) = lpuexcpt; + *((_BYTE *)lpuexcpt + (_DWORD)v7) = 0; + v4 = (char *)Block; + *(_DWORD *)(a3 + 8) = v7; + if ( v4 != v15 ) + operator delete(v4); + (*(void (__thiscall **)(void **, int *))(*a2 + 20))(&Block, a2); + lpuexcpta = v14; + v8 = (_BYTE *)operator new[]((unsigned int)v14 + 1); + std::string::copy(&Block, v8, (size_t)lpuexcpta, 0); + *(_DWORD *)(a3 + 24) = lpuexcpta; + *((_BYTE *)lpuexcpta + (_DWORD)v8) = 0; + v5 = (char *)Block; + *(_DWORD *)(a3 + 20) = v8; + if ( v5 != v15 ) + operator delete(v5); + (*(void (__thiscall **)(void **, int *))(*a2 + 24))(&Block, a2); + lpuexcptb = v14; + v9 = (_BYTE *)operator new[]((unsigned int)v14 + 1); + std::string::copy(&Block, v9, (size_t)lpuexcptb, 0); + *(_DWORD *)(a3 + 32) = lpuexcptb; + *((_BYTE *)lpuexcptb + (_DWORD)v9) = 0; + v6 = (char *)Block; + *(_DWORD *)(a3 + 28) = v9; + if ( v6 != v15 ) + operator delete(v6); +} + +//----- (004B01A0) -------------------------------------------------------- +void __cdecl std::__facet_shims::__numpunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + int v4; // eax + int v5; // ecx + int v6; // eax + int v7; // eax + int v8; // ecx + int v9; // eax + int v10; // eax + int v11; // ecx + int v12; // eax + unsigned int v13; // [esp+Ch] [ebp-5Ch] + _WORD *v14; // [esp+10h] [ebp-58h] + _WORD *v15; // [esp+10h] [ebp-58h] + std::string *v16; // [esp+14h] [ebp-54h] + int v17; // [esp+14h] [ebp-54h] + int v18; // [esp+14h] [ebp-54h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-50h] + int v22[3]; // [esp+5Bh] [ebp-Dh] BYREF + + *(_WORD *)(a3 + 36) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_WORD *)(a3 + 38) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 20) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 28) = 0; + *(_BYTE *)(a3 + 164) = 1; + (*(void (__thiscall **)(char *, int *))(v3 + 16))((char *)v22 + 1, a2); + lpuexcptb = *(struct _Unwind_Exception **)(*(int *)((char *)v22 + 1) - 12); + v16 = (std::string *)operator new[]((unsigned int)lpuexcptb + 1); + std::string::copy((int *)((char *)v22 + 1), v16, (size_t)lpuexcptb, 0, v13); + *((_BYTE *)lpuexcptb + (_DWORD)v16) = 0; + *(_DWORD *)(a3 + 12) = lpuexcptb; + v4 = _CRT_MT; + *(_DWORD *)(a3 + 8) = v16; + v5 = *(int *)((char *)v22 + 1); + if ( v4 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(int *)((char *)v22 + 1) - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v6 = *(_DWORD *)(*(int *)((char *)v22 + 1) - 4); + *(_DWORD *)(*(int *)((char *)v22 + 1) - 4) = v6 - 1; + if ( v6 > 0 ) + goto LABEL_3; + } + std::string::_Rep::_M_destroy((void *)(v5 - 12), (int)v22); +LABEL_3: + (*(void (__thiscall **)(char *, int *))(*a2 + 20))((char *)v22 + 1, a2); + lpuexcpt = *(struct _Unwind_Exception **)(*(int *)((char *)v22 + 1) - 12); + v7 = (int)lpuexcpt + 1; + if ( (unsigned int)lpuexcpt + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v17 = v7; + v14 = (_WORD *)operator new[](2 * v7); + std::wstring::copy((int *)((char *)v22 + 1), v14, (unsigned int)lpuexcpt, 0); + v14[v17 - 1] = 0; + *(_DWORD *)(a3 + 20) = v14; + v8 = *(int *)((char *)v22 + 1); + *(_DWORD *)(a3 + 24) = lpuexcpt; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v8 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_6; + } + else + { + v9 = *(_DWORD *)(v8 - 4); + *(_DWORD *)(v8 - 4) = v9 - 1; + if ( v9 > 0 ) + goto LABEL_6; + } + std::wstring::_Rep::_M_destroy((void *)(v8 - 12), (int)v22); +LABEL_6: + (*(void (__thiscall **)(char *, int *))(*a2 + 24))((char *)v22 + 1, a2); + lpuexcpta = *(struct _Unwind_Exception **)(*(int *)((char *)v22 + 1) - 12); + v10 = (int)lpuexcpta + 1; + if ( (unsigned int)lpuexcpta + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v18 = v10; + v15 = (_WORD *)operator new[](2 * v10); + std::wstring::copy((int *)((char *)v22 + 1), v15, (unsigned int)lpuexcpta, 0); + v15[v18 - 1] = 0; + *(_DWORD *)(a3 + 28) = v15; + v11 = *(int *)((char *)v22 + 1); + *(_DWORD *)(a3 + 32) = lpuexcpta; + if ( !_CRT_MT ) + { + v12 = *(_DWORD *)(v11 - 4); + *(_DWORD *)(v11 - 4) = v12 - 1; + if ( v12 > 0 ) + return; +LABEL_13: + std::wstring::_Rep::_M_destroy((void *)(v11 - 12), (int)v22); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v11 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_13; +} +// 4B025E: variable 'v13' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004B04E0) -------------------------------------------------------- +void __cdecl std::__facet_shims::__numpunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + char *v4; // eax + int v5; // eax + int v6; // eax + _WORD *v7; // [esp+10h] [ebp-68h] + _WORD *v8; // [esp+10h] [ebp-68h] + _BYTE *v9; // [esp+14h] [ebp-64h] + int v10; // [esp+14h] [ebp-64h] + int v11; // [esp+14h] [ebp-64h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-60h] + void *Block; // [esp+58h] [ebp-20h] BYREF + struct _Unwind_Exception *v16; // [esp+5Ch] [ebp-1Ch] + char v17[24]; // [esp+60h] [ebp-18h] BYREF + + *(_WORD *)(a3 + 36) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_WORD *)(a3 + 38) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 20) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 28) = 0; + *(_BYTE *)(a3 + 164) = 1; + (*(void (__thiscall **)(void **, int *))(v3 + 16))(&Block, a2); + lpuexcptb = v16; + v9 = (_BYTE *)operator new[]((unsigned int)v16 + 1); + std::string::copy(&Block, v9, (size_t)lpuexcptb, 0); + *(_DWORD *)(a3 + 12) = lpuexcptb; + *((_BYTE *)lpuexcptb + (_DWORD)v9) = 0; + v4 = (char *)Block; + *(_DWORD *)(a3 + 8) = v9; + if ( v4 != v17 ) + operator delete(v4); + (*(void (__thiscall **)(void **, int *))(*a2 + 20))(&Block, a2); + lpuexcpt = v16; + v5 = (int)v16 + 1; + if ( (unsigned int)v16 + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v10 = v5; + v7 = (_WORD *)operator new[](2 * v5); + std::wstring::copy(&Block, v7, (unsigned int)lpuexcpt, 0); + v7[v10 - 1] = 0; + *(_DWORD *)(a3 + 20) = v7; + *(_DWORD *)(a3 + 24) = lpuexcpt; + if ( Block != v17 ) + operator delete(Block); + (*(void (__thiscall **)(void **, int *))(*a2 + 24))(&Block, a2); + lpuexcpta = v16; + v6 = (int)v16 + 1; + if ( (unsigned int)v16 + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v11 = v6; + v8 = (_WORD *)operator new[](2 * v6); + std::wstring::copy(&Block, v8, (unsigned int)lpuexcpta, 0); + v8[v11 - 1] = 0; + *(_DWORD *)(a3 + 28) = v8; + *(_DWORD *)(a3 + 32) = lpuexcpta; + if ( Block != v17 ) + operator delete(Block); +} + +//----- (004B0750) -------------------------------------------------------- +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + int v4; // eax + int v5; // ecx + int v6; // eax + int v7; // eax + int v8; // ecx + int v9; // eax + int v10; // eax + int v11; // ecx + int v12; // eax + int v13; // edx + int v14; // ecx + int v15; // eax + unsigned int v16; // [esp+Ch] [ebp-5Ch] + unsigned int v17; // [esp+Ch] [ebp-5Ch] + unsigned int v18; // [esp+Ch] [ebp-5Ch] + unsigned int v19; // [esp+Ch] [ebp-5Ch] + std::string *v20; // [esp+14h] [ebp-54h] + std::string *v21; // [esp+14h] [ebp-54h] + std::string *v22; // [esp+14h] [ebp-54h] + std::string *v23; // [esp+14h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcptc; // [esp+18h] [ebp-50h] + char v28[13]; // [esp+5Bh] [ebp-Dh] BYREF + + *(_BYTE *)(a3 + 17) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_BYTE *)(a3 + 18) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 44) = (*(int (__fastcall **)(int *))(*a2 + 32))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 20) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 28) = 0; + *(_DWORD *)(a3 + 36) = 0; + *(_BYTE *)(a3 + 67) = 1; + (*(void (__thiscall **)(char *, int *))(v3 + 16))(&v28[1], a2); + lpuexcpt = *(struct _Unwind_Exception **)(*(_DWORD *)&v28[1] - 12); + v20 = (std::string *)operator new[]((unsigned int)lpuexcpt + 1); + std::string::copy(&v28[1], v20, (size_t)lpuexcpt, 0, v16); + *((_BYTE *)lpuexcpt + (_DWORD)v20) = 0; + *(_DWORD *)(a3 + 12) = lpuexcpt; + v4 = _CRT_MT; + *(_DWORD *)(a3 + 8) = v20; + v5 = *(_DWORD *)&v28[1]; + if ( v4 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v28[1] - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v6 = *(_DWORD *)(*(_DWORD *)&v28[1] - 4); + *(_DWORD *)(*(_DWORD *)&v28[1] - 4) = v6 - 1; + if ( v6 > 0 ) + goto LABEL_3; + } + std::string::_Rep::_M_destroy((void *)(v5 - 12), (int)v28); +LABEL_3: + (*(void (__thiscall **)(char *, int *))(*a2 + 20))(&v28[1], a2); + lpuexcpta = *(struct _Unwind_Exception **)(*(_DWORD *)&v28[1] - 12); + v21 = (std::string *)operator new[]((unsigned int)lpuexcpta + 1); + std::string::copy(&v28[1], v21, (size_t)lpuexcpta, 0, v17); + *((_BYTE *)lpuexcpta + (_DWORD)v21) = 0; + *(_DWORD *)(a3 + 24) = lpuexcpta; + v7 = _CRT_MT; + *(_DWORD *)(a3 + 20) = v21; + v8 = *(_DWORD *)&v28[1]; + if ( v7 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v28[1] - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_5; + } + else + { + v9 = *(_DWORD *)(*(_DWORD *)&v28[1] - 4); + *(_DWORD *)(*(_DWORD *)&v28[1] - 4) = v9 - 1; + if ( v9 > 0 ) + goto LABEL_5; + } + std::string::_Rep::_M_destroy((void *)(v8 - 12), (int)v28); +LABEL_5: + (*(void (__thiscall **)(char *, int *))(*a2 + 24))(&v28[1], a2); + lpuexcptb = *(struct _Unwind_Exception **)(*(_DWORD *)&v28[1] - 12); + v22 = (std::string *)operator new[]((unsigned int)lpuexcptb + 1); + std::string::copy(&v28[1], v22, (size_t)lpuexcptb, 0, v18); + *((_BYTE *)lpuexcptb + (_DWORD)v22) = 0; + *(_DWORD *)(a3 + 32) = lpuexcptb; + v10 = _CRT_MT; + *(_DWORD *)(a3 + 28) = v22; + v11 = *(_DWORD *)&v28[1]; + if ( v10 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v28[1] - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_7; + } + else + { + v12 = *(_DWORD *)(*(_DWORD *)&v28[1] - 4); + *(_DWORD *)(*(_DWORD *)&v28[1] - 4) = v12 - 1; + if ( v12 > 0 ) + goto LABEL_7; + } + std::string::_Rep::_M_destroy((void *)(v11 - 12), (int)v28); +LABEL_7: + (*(void (__thiscall **)(char *, int *))(*a2 + 28))(&v28[1], a2); + lpuexcptc = *(struct _Unwind_Exception **)(*(_DWORD *)&v28[1] - 12); + v23 = (std::string *)operator new[]((unsigned int)lpuexcptc + 1); + std::string::copy(&v28[1], v23, (size_t)lpuexcptc, 0, v19); + *(_DWORD *)(a3 + 36) = v23; + *(_DWORD *)(a3 + 40) = lpuexcptc; + v13 = _CRT_MT; + *((_BYTE *)lpuexcptc + (_DWORD)v23) = 0; + v14 = *(_DWORD *)&v28[1]; + if ( v13 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v28[1] - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_9; +LABEL_13: + std::string::_Rep::_M_destroy((void *)(v14 - 12), (int)v28); + goto LABEL_9; + } + v15 = *(_DWORD *)(*(_DWORD *)&v28[1] - 4); + *(_DWORD *)(*(_DWORD *)&v28[1] - 4) = v15 - 1; + if ( v15 <= 0 ) + goto LABEL_13; +LABEL_9: + *(_DWORD *)(a3 + 48) = (*(int (__fastcall **)(int *))(*a2 + 36))(a2); + *(_DWORD *)(a3 + 52) = (*(int (__fastcall **)(int *))(*a2 + 40))(a2); +} +// 4B0821: variable 'v16' is possibly undefined +// 4B08AF: variable 'v17' is possibly undefined +// 4B093D: variable 'v18' is possibly undefined +// 4B09CB: variable 'v19' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 4B0750: using guessed type char var_D[13]; + +//----- (004B0B30) -------------------------------------------------------- +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + char *v4; // eax + char *v5; // eax + char *v6; // eax + char *v7; // eax + _BYTE *v8; // [esp+14h] [ebp-64h] + _BYTE *v9; // [esp+14h] [ebp-64h] + _BYTE *v10; // [esp+14h] [ebp-64h] + _BYTE *v11; // [esp+14h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcptc; // [esp+18h] [ebp-60h] + void *Block; // [esp+58h] [ebp-20h] BYREF + struct _Unwind_Exception *v17; // [esp+5Ch] [ebp-1Ch] + char v18[24]; // [esp+60h] [ebp-18h] BYREF + + *(_BYTE *)(a3 + 17) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_BYTE *)(a3 + 18) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 44) = (*(int (__fastcall **)(int *))(*a2 + 32))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 20) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 28) = 0; + *(_DWORD *)(a3 + 36) = 0; + *(_BYTE *)(a3 + 67) = 1; + (*(void (__thiscall **)(void **, int *))(v3 + 16))(&Block, a2); + lpuexcpt = v17; + v8 = (_BYTE *)operator new[]((unsigned int)v17 + 1); + std::string::copy(&Block, v8, (size_t)lpuexcpt, 0); + *(_DWORD *)(a3 + 12) = lpuexcpt; + *((_BYTE *)lpuexcpt + (_DWORD)v8) = 0; + v4 = (char *)Block; + *(_DWORD *)(a3 + 8) = v8; + if ( v4 != v18 ) + operator delete(v4); + (*(void (__thiscall **)(void **, int *))(*a2 + 20))(&Block, a2); + lpuexcpta = v17; + v9 = (_BYTE *)operator new[]((unsigned int)v17 + 1); + std::string::copy(&Block, v9, (size_t)lpuexcpta, 0); + *(_DWORD *)(a3 + 24) = lpuexcpta; + *((_BYTE *)lpuexcpta + (_DWORD)v9) = 0; + v5 = (char *)Block; + *(_DWORD *)(a3 + 20) = v9; + if ( v5 != v18 ) + operator delete(v5); + (*(void (__thiscall **)(void **, int *))(*a2 + 24))(&Block, a2); + lpuexcptb = v17; + v10 = (_BYTE *)operator new[]((unsigned int)v17 + 1); + std::string::copy(&Block, v10, (size_t)lpuexcptb, 0); + *(_DWORD *)(a3 + 32) = lpuexcptb; + *((_BYTE *)lpuexcptb + (_DWORD)v10) = 0; + v6 = (char *)Block; + *(_DWORD *)(a3 + 28) = v10; + if ( v6 != v18 ) + operator delete(v6); + (*(void (__thiscall **)(void **, int *))(*a2 + 28))(&Block, a2); + lpuexcptc = v17; + v11 = (_BYTE *)operator new[]((unsigned int)v17 + 1); + std::string::copy(&Block, v11, (size_t)lpuexcptc, 0); + *(_DWORD *)(a3 + 40) = lpuexcptc; + *((_BYTE *)lpuexcptc + (_DWORD)v11) = 0; + v7 = (char *)Block; + *(_DWORD *)(a3 + 36) = v11; + if ( v7 != v18 ) + operator delete(v7); + *(_DWORD *)(a3 + 48) = (*(int (__fastcall **)(int *))(*a2 + 36))(a2); + *(_DWORD *)(a3 + 52) = (*(int (__fastcall **)(int *))(*a2 + 40))(a2); +} + +//----- (004B0E20) -------------------------------------------------------- +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + int v4; // eax + int v5; // ecx + int v6; // eax + int v7; // eax + int v8; // ecx + int v9; // eax + int v10; // eax + int v11; // ecx + int v12; // eax + int v13; // edx + int v14; // ecx + int v15; // eax + unsigned int v16; // [esp+Ch] [ebp-5Ch] + unsigned int v17; // [esp+Ch] [ebp-5Ch] + unsigned int v18; // [esp+Ch] [ebp-5Ch] + unsigned int v19; // [esp+Ch] [ebp-5Ch] + std::string *v20; // [esp+14h] [ebp-54h] + std::string *v21; // [esp+14h] [ebp-54h] + std::string *v22; // [esp+14h] [ebp-54h] + std::string *v23; // [esp+14h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcptc; // [esp+18h] [ebp-50h] + char v28[13]; // [esp+5Bh] [ebp-Dh] BYREF + + *(_BYTE *)(a3 + 17) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_BYTE *)(a3 + 18) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 44) = (*(int (__fastcall **)(int *))(*a2 + 32))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 20) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 28) = 0; + *(_DWORD *)(a3 + 36) = 0; + *(_BYTE *)(a3 + 67) = 1; + (*(void (__thiscall **)(char *, int *))(v3 + 16))(&v28[1], a2); + lpuexcpt = *(struct _Unwind_Exception **)(*(_DWORD *)&v28[1] - 12); + v20 = (std::string *)operator new[]((unsigned int)lpuexcpt + 1); + std::string::copy(&v28[1], v20, (size_t)lpuexcpt, 0, v16); + *((_BYTE *)lpuexcpt + (_DWORD)v20) = 0; + *(_DWORD *)(a3 + 12) = lpuexcpt; + v4 = _CRT_MT; + *(_DWORD *)(a3 + 8) = v20; + v5 = *(_DWORD *)&v28[1]; + if ( v4 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v28[1] - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v6 = *(_DWORD *)(*(_DWORD *)&v28[1] - 4); + *(_DWORD *)(*(_DWORD *)&v28[1] - 4) = v6 - 1; + if ( v6 > 0 ) + goto LABEL_3; + } + std::string::_Rep::_M_destroy((void *)(v5 - 12), (int)v28); +LABEL_3: + (*(void (__thiscall **)(char *, int *))(*a2 + 20))(&v28[1], a2); + lpuexcpta = *(struct _Unwind_Exception **)(*(_DWORD *)&v28[1] - 12); + v21 = (std::string *)operator new[]((unsigned int)lpuexcpta + 1); + std::string::copy(&v28[1], v21, (size_t)lpuexcpta, 0, v17); + *((_BYTE *)lpuexcpta + (_DWORD)v21) = 0; + *(_DWORD *)(a3 + 24) = lpuexcpta; + v7 = _CRT_MT; + *(_DWORD *)(a3 + 20) = v21; + v8 = *(_DWORD *)&v28[1]; + if ( v7 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v28[1] - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_5; + } + else + { + v9 = *(_DWORD *)(*(_DWORD *)&v28[1] - 4); + *(_DWORD *)(*(_DWORD *)&v28[1] - 4) = v9 - 1; + if ( v9 > 0 ) + goto LABEL_5; + } + std::string::_Rep::_M_destroy((void *)(v8 - 12), (int)v28); +LABEL_5: + (*(void (__thiscall **)(char *, int *))(*a2 + 24))(&v28[1], a2); + lpuexcptb = *(struct _Unwind_Exception **)(*(_DWORD *)&v28[1] - 12); + v22 = (std::string *)operator new[]((unsigned int)lpuexcptb + 1); + std::string::copy(&v28[1], v22, (size_t)lpuexcptb, 0, v18); + *((_BYTE *)lpuexcptb + (_DWORD)v22) = 0; + *(_DWORD *)(a3 + 32) = lpuexcptb; + v10 = _CRT_MT; + *(_DWORD *)(a3 + 28) = v22; + v11 = *(_DWORD *)&v28[1]; + if ( v10 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v28[1] - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_7; + } + else + { + v12 = *(_DWORD *)(*(_DWORD *)&v28[1] - 4); + *(_DWORD *)(*(_DWORD *)&v28[1] - 4) = v12 - 1; + if ( v12 > 0 ) + goto LABEL_7; + } + std::string::_Rep::_M_destroy((void *)(v11 - 12), (int)v28); +LABEL_7: + (*(void (__thiscall **)(char *, int *))(*a2 + 28))(&v28[1], a2); + lpuexcptc = *(struct _Unwind_Exception **)(*(_DWORD *)&v28[1] - 12); + v23 = (std::string *)operator new[]((unsigned int)lpuexcptc + 1); + std::string::copy(&v28[1], v23, (size_t)lpuexcptc, 0, v19); + *(_DWORD *)(a3 + 36) = v23; + *(_DWORD *)(a3 + 40) = lpuexcptc; + v13 = _CRT_MT; + *((_BYTE *)lpuexcptc + (_DWORD)v23) = 0; + v14 = *(_DWORD *)&v28[1]; + if ( v13 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)&v28[1] - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_9; +LABEL_13: + std::string::_Rep::_M_destroy((void *)(v14 - 12), (int)v28); + goto LABEL_9; + } + v15 = *(_DWORD *)(*(_DWORD *)&v28[1] - 4); + *(_DWORD *)(*(_DWORD *)&v28[1] - 4) = v15 - 1; + if ( v15 <= 0 ) + goto LABEL_13; +LABEL_9: + *(_DWORD *)(a3 + 48) = (*(int (__fastcall **)(int *))(*a2 + 36))(a2); + *(_DWORD *)(a3 + 52) = (*(int (__fastcall **)(int *))(*a2 + 40))(a2); +} +// 4B0EF1: variable 'v16' is possibly undefined +// 4B0F7F: variable 'v17' is possibly undefined +// 4B100D: variable 'v18' is possibly undefined +// 4B109B: variable 'v19' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 4B0E20: using guessed type char var_D[13]; + +//----- (004B1200) -------------------------------------------------------- +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + char *v4; // eax + char *v5; // eax + char *v6; // eax + char *v7; // eax + _BYTE *v8; // [esp+14h] [ebp-64h] + _BYTE *v9; // [esp+14h] [ebp-64h] + _BYTE *v10; // [esp+14h] [ebp-64h] + _BYTE *v11; // [esp+14h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcptc; // [esp+18h] [ebp-60h] + void *Block; // [esp+58h] [ebp-20h] BYREF + struct _Unwind_Exception *v17; // [esp+5Ch] [ebp-1Ch] + char v18[24]; // [esp+60h] [ebp-18h] BYREF + + *(_BYTE *)(a3 + 17) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_BYTE *)(a3 + 18) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 44) = (*(int (__fastcall **)(int *))(*a2 + 32))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 20) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 28) = 0; + *(_DWORD *)(a3 + 36) = 0; + *(_BYTE *)(a3 + 67) = 1; + (*(void (__thiscall **)(void **, int *))(v3 + 16))(&Block, a2); + lpuexcpt = v17; + v8 = (_BYTE *)operator new[]((unsigned int)v17 + 1); + std::string::copy(&Block, v8, (size_t)lpuexcpt, 0); + *(_DWORD *)(a3 + 12) = lpuexcpt; + *((_BYTE *)lpuexcpt + (_DWORD)v8) = 0; + v4 = (char *)Block; + *(_DWORD *)(a3 + 8) = v8; + if ( v4 != v18 ) + operator delete(v4); + (*(void (__thiscall **)(void **, int *))(*a2 + 20))(&Block, a2); + lpuexcpta = v17; + v9 = (_BYTE *)operator new[]((unsigned int)v17 + 1); + std::string::copy(&Block, v9, (size_t)lpuexcpta, 0); + *(_DWORD *)(a3 + 24) = lpuexcpta; + *((_BYTE *)lpuexcpta + (_DWORD)v9) = 0; + v5 = (char *)Block; + *(_DWORD *)(a3 + 20) = v9; + if ( v5 != v18 ) + operator delete(v5); + (*(void (__thiscall **)(void **, int *))(*a2 + 24))(&Block, a2); + lpuexcptb = v17; + v10 = (_BYTE *)operator new[]((unsigned int)v17 + 1); + std::string::copy(&Block, v10, (size_t)lpuexcptb, 0); + *(_DWORD *)(a3 + 32) = lpuexcptb; + *((_BYTE *)lpuexcptb + (_DWORD)v10) = 0; + v6 = (char *)Block; + *(_DWORD *)(a3 + 28) = v10; + if ( v6 != v18 ) + operator delete(v6); + (*(void (__thiscall **)(void **, int *))(*a2 + 28))(&Block, a2); + lpuexcptc = v17; + v11 = (_BYTE *)operator new[]((unsigned int)v17 + 1); + std::string::copy(&Block, v11, (size_t)lpuexcptc, 0); + *(_DWORD *)(a3 + 40) = lpuexcptc; + *((_BYTE *)lpuexcptc + (_DWORD)v11) = 0; + v7 = (char *)Block; + *(_DWORD *)(a3 + 36) = v11; + if ( v7 != v18 ) + operator delete(v7); + *(_DWORD *)(a3 + 48) = (*(int (__fastcall **)(int *))(*a2 + 36))(a2); + *(_DWORD *)(a3 + 52) = (*(int (__fastcall **)(int *))(*a2 + 40))(a2); +} + +//----- (004B14F0) -------------------------------------------------------- +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + int v4; // eax + int v5; // ecx + int v6; // eax + int v7; // eax + int v8; // ecx + int v9; // eax + int v10; // eax + int v11; // ecx + int v12; // eax + int v13; // eax + int v14; // ecx + int v15; // eax + unsigned int v16; // [esp+Ch] [ebp-5Ch] + _WORD *v17; // [esp+10h] [ebp-58h] + _WORD *v18; // [esp+10h] [ebp-58h] + _WORD *v19; // [esp+10h] [ebp-58h] + std::string *v20; // [esp+14h] [ebp-54h] + int v21; // [esp+14h] [ebp-54h] + int v22; // [esp+14h] [ebp-54h] + int v23; // [esp+14h] [ebp-54h] + struct _Unwind_Exception *lpuexcptc; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-50h] + int v28[3]; // [esp+5Bh] [ebp-Dh] BYREF + + *(_WORD *)(a3 + 18) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_WORD *)(a3 + 20) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 48) = (*(int (__fastcall **)(int *))(*a2 + 32))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 24) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 32) = 0; + *(_DWORD *)(a3 + 40) = 0; + *(_BYTE *)(a3 + 82) = 1; + (*(void (__thiscall **)(char *, int *))(v3 + 16))((char *)v28 + 1, a2); + lpuexcptc = *(struct _Unwind_Exception **)(*(int *)((char *)v28 + 1) - 12); + v20 = (std::string *)operator new[]((unsigned int)lpuexcptc + 1); + std::string::copy((int *)((char *)v28 + 1), v20, (size_t)lpuexcptc, 0, v16); + *((_BYTE *)lpuexcptc + (_DWORD)v20) = 0; + *(_DWORD *)(a3 + 12) = lpuexcptc; + v4 = _CRT_MT; + *(_DWORD *)(a3 + 8) = v20; + v5 = *(int *)((char *)v28 + 1); + if ( v4 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(int *)((char *)v28 + 1) - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v6 = *(_DWORD *)(*(int *)((char *)v28 + 1) - 4); + *(_DWORD *)(*(int *)((char *)v28 + 1) - 4) = v6 - 1; + if ( v6 > 0 ) + goto LABEL_3; + } + std::string::_Rep::_M_destroy((void *)(v5 - 12), (int)v28); +LABEL_3: + (*(void (__thiscall **)(char *, int *))(*a2 + 20))((char *)v28 + 1, a2); + lpuexcpt = *(struct _Unwind_Exception **)(*(int *)((char *)v28 + 1) - 12); + v7 = (int)lpuexcpt + 1; + if ( (unsigned int)lpuexcpt + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v21 = v7; + v17 = (_WORD *)operator new[](2 * v7); + std::wstring::copy((int *)((char *)v28 + 1), v17, (unsigned int)lpuexcpt, 0); + v17[v21 - 1] = 0; + *(_DWORD *)(a3 + 24) = v17; + v8 = *(int *)((char *)v28 + 1); + *(_DWORD *)(a3 + 28) = lpuexcpt; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v8 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_6; + } + else + { + v9 = *(_DWORD *)(v8 - 4); + *(_DWORD *)(v8 - 4) = v9 - 1; + if ( v9 > 0 ) + goto LABEL_6; + } + std::wstring::_Rep::_M_destroy((void *)(v8 - 12), (int)v28); +LABEL_6: + (*(void (__thiscall **)(char *, int *))(*a2 + 24))((char *)v28 + 1, a2); + lpuexcpta = *(struct _Unwind_Exception **)(*(int *)((char *)v28 + 1) - 12); + v10 = (int)lpuexcpta + 1; + if ( (unsigned int)lpuexcpta + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v22 = v10; + v18 = (_WORD *)operator new[](2 * v10); + std::wstring::copy((int *)((char *)v28 + 1), v18, (unsigned int)lpuexcpta, 0); + v18[v22 - 1] = 0; + *(_DWORD *)(a3 + 32) = v18; + v11 = *(int *)((char *)v28 + 1); + *(_DWORD *)(a3 + 36) = lpuexcpta; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v11 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_9; + } + else + { + v12 = *(_DWORD *)(v11 - 4); + *(_DWORD *)(v11 - 4) = v12 - 1; + if ( v12 > 0 ) + goto LABEL_9; + } + std::wstring::_Rep::_M_destroy((void *)(v11 - 12), (int)v28); +LABEL_9: + (*(void (__thiscall **)(char *, int *))(*a2 + 28))((char *)v28 + 1, a2); + lpuexcptb = *(struct _Unwind_Exception **)(*(int *)((char *)v28 + 1) - 12); + v13 = (int)lpuexcptb + 1; + if ( (unsigned int)lpuexcptb + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v23 = v13; + v19 = (_WORD *)operator new[](2 * v13); + std::wstring::copy((int *)((char *)v28 + 1), v19, (unsigned int)lpuexcptb, 0); + v19[v23 - 1] = 0; + *(_DWORD *)(a3 + 40) = v19; + v14 = *(int *)((char *)v28 + 1); + *(_DWORD *)(a3 + 44) = lpuexcptb; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v14 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_12; +LABEL_16: + std::wstring::_Rep::_M_destroy((void *)(v14 - 12), (int)v28); + goto LABEL_12; + } + v15 = *(_DWORD *)(v14 - 4); + *(_DWORD *)(v14 - 4) = v15 - 1; + if ( v15 <= 0 ) + goto LABEL_16; +LABEL_12: + *(_DWORD *)(a3 + 52) = (*(int (__fastcall **)(int *))(*a2 + 36))(a2); + *(_DWORD *)(a3 + 56) = (*(int (__fastcall **)(int *))(*a2 + 40))(a2); +} +// 4B15C3: variable 'v16' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004B1950) -------------------------------------------------------- +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + char *v4; // eax + int v5; // eax + int v6; // eax + int v7; // eax + _WORD *v8; // [esp+10h] [ebp-68h] + _WORD *v9; // [esp+10h] [ebp-68h] + _WORD *v10; // [esp+10h] [ebp-68h] + _BYTE *v11; // [esp+14h] [ebp-64h] + int v12; // [esp+14h] [ebp-64h] + int v13; // [esp+14h] [ebp-64h] + int v14; // [esp+14h] [ebp-64h] + struct _Unwind_Exception *lpuexcptc; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-60h] + void *Block; // [esp+58h] [ebp-20h] BYREF + struct _Unwind_Exception *v20; // [esp+5Ch] [ebp-1Ch] + char v21[24]; // [esp+60h] [ebp-18h] BYREF + + *(_WORD *)(a3 + 18) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_WORD *)(a3 + 20) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 48) = (*(int (__fastcall **)(int *))(*a2 + 32))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 24) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 32) = 0; + *(_DWORD *)(a3 + 40) = 0; + *(_BYTE *)(a3 + 82) = 1; + (*(void (__thiscall **)(void **, int *))(v3 + 16))(&Block, a2); + lpuexcptc = v20; + v11 = (_BYTE *)operator new[]((unsigned int)v20 + 1); + std::string::copy(&Block, v11, (size_t)lpuexcptc, 0); + *(_DWORD *)(a3 + 12) = lpuexcptc; + *((_BYTE *)lpuexcptc + (_DWORD)v11) = 0; + v4 = (char *)Block; + *(_DWORD *)(a3 + 8) = v11; + if ( v4 != v21 ) + operator delete(v4); + (*(void (__thiscall **)(void **, int *))(*a2 + 20))(&Block, a2); + lpuexcpt = v20; + v5 = (int)v20 + 1; + if ( (unsigned int)v20 + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v12 = v5; + v8 = (_WORD *)operator new[](2 * v5); + std::wstring::copy(&Block, v8, (unsigned int)lpuexcpt, 0); + v8[v12 - 1] = 0; + *(_DWORD *)(a3 + 24) = v8; + *(_DWORD *)(a3 + 28) = lpuexcpt; + if ( Block != v21 ) + operator delete(Block); + (*(void (__thiscall **)(void **, int *))(*a2 + 24))(&Block, a2); + lpuexcpta = v20; + v6 = (int)v20 + 1; + if ( (unsigned int)v20 + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v13 = v6; + v9 = (_WORD *)operator new[](2 * v6); + std::wstring::copy(&Block, v9, (unsigned int)lpuexcpta, 0); + v9[v13 - 1] = 0; + *(_DWORD *)(a3 + 32) = v9; + *(_DWORD *)(a3 + 36) = lpuexcpta; + if ( Block != v21 ) + operator delete(Block); + (*(void (__thiscall **)(void **, int *))(*a2 + 28))(&Block, a2); + lpuexcptb = v20; + v7 = (int)v20 + 1; + if ( (unsigned int)v20 + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v14 = v7; + v10 = (_WORD *)operator new[](2 * v7); + std::wstring::copy(&Block, v10, (unsigned int)lpuexcptb, 0); + v10[v14 - 1] = 0; + *(_DWORD *)(a3 + 40) = v10; + *(_DWORD *)(a3 + 44) = lpuexcptb; + if ( Block != v21 ) + operator delete(Block); + *(_DWORD *)(a3 + 52) = (*(int (__fastcall **)(int *))(*a2 + 36))(a2); + *(_DWORD *)(a3 + 56) = (*(int (__fastcall **)(int *))(*a2 + 40))(a2); +} + +//----- (004B1CB0) -------------------------------------------------------- +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + int v4; // eax + int v5; // ecx + int v6; // eax + int v7; // eax + int v8; // ecx + int v9; // eax + int v10; // eax + int v11; // ecx + int v12; // eax + int v13; // eax + int v14; // ecx + int v15; // eax + unsigned int v16; // [esp+Ch] [ebp-5Ch] + _WORD *v17; // [esp+10h] [ebp-58h] + _WORD *v18; // [esp+10h] [ebp-58h] + _WORD *v19; // [esp+10h] [ebp-58h] + std::string *v20; // [esp+14h] [ebp-54h] + int v21; // [esp+14h] [ebp-54h] + int v22; // [esp+14h] [ebp-54h] + int v23; // [esp+14h] [ebp-54h] + struct _Unwind_Exception *lpuexcptc; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-50h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-50h] + int v28[3]; // [esp+5Bh] [ebp-Dh] BYREF + + *(_WORD *)(a3 + 18) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_WORD *)(a3 + 20) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 48) = (*(int (__fastcall **)(int *))(*a2 + 32))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 24) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 32) = 0; + *(_DWORD *)(a3 + 40) = 0; + *(_BYTE *)(a3 + 82) = 1; + (*(void (__thiscall **)(char *, int *))(v3 + 16))((char *)v28 + 1, a2); + lpuexcptc = *(struct _Unwind_Exception **)(*(int *)((char *)v28 + 1) - 12); + v20 = (std::string *)operator new[]((unsigned int)lpuexcptc + 1); + std::string::copy((int *)((char *)v28 + 1), v20, (size_t)lpuexcptc, 0, v16); + *((_BYTE *)lpuexcptc + (_DWORD)v20) = 0; + *(_DWORD *)(a3 + 12) = lpuexcptc; + v4 = _CRT_MT; + *(_DWORD *)(a3 + 8) = v20; + v5 = *(int *)((char *)v28 + 1); + if ( v4 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(*(int *)((char *)v28 + 1) - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v6 = *(_DWORD *)(*(int *)((char *)v28 + 1) - 4); + *(_DWORD *)(*(int *)((char *)v28 + 1) - 4) = v6 - 1; + if ( v6 > 0 ) + goto LABEL_3; + } + std::string::_Rep::_M_destroy((void *)(v5 - 12), (int)v28); +LABEL_3: + (*(void (__thiscall **)(char *, int *))(*a2 + 20))((char *)v28 + 1, a2); + lpuexcpt = *(struct _Unwind_Exception **)(*(int *)((char *)v28 + 1) - 12); + v7 = (int)lpuexcpt + 1; + if ( (unsigned int)lpuexcpt + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v21 = v7; + v17 = (_WORD *)operator new[](2 * v7); + std::wstring::copy((int *)((char *)v28 + 1), v17, (unsigned int)lpuexcpt, 0); + v17[v21 - 1] = 0; + *(_DWORD *)(a3 + 24) = v17; + v8 = *(int *)((char *)v28 + 1); + *(_DWORD *)(a3 + 28) = lpuexcpt; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v8 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_6; + } + else + { + v9 = *(_DWORD *)(v8 - 4); + *(_DWORD *)(v8 - 4) = v9 - 1; + if ( v9 > 0 ) + goto LABEL_6; + } + std::wstring::_Rep::_M_destroy((void *)(v8 - 12), (int)v28); +LABEL_6: + (*(void (__thiscall **)(char *, int *))(*a2 + 24))((char *)v28 + 1, a2); + lpuexcpta = *(struct _Unwind_Exception **)(*(int *)((char *)v28 + 1) - 12); + v10 = (int)lpuexcpta + 1; + if ( (unsigned int)lpuexcpta + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v22 = v10; + v18 = (_WORD *)operator new[](2 * v10); + std::wstring::copy((int *)((char *)v28 + 1), v18, (unsigned int)lpuexcpta, 0); + v18[v22 - 1] = 0; + *(_DWORD *)(a3 + 32) = v18; + v11 = *(int *)((char *)v28 + 1); + *(_DWORD *)(a3 + 36) = lpuexcpta; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v11 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_9; + } + else + { + v12 = *(_DWORD *)(v11 - 4); + *(_DWORD *)(v11 - 4) = v12 - 1; + if ( v12 > 0 ) + goto LABEL_9; + } + std::wstring::_Rep::_M_destroy((void *)(v11 - 12), (int)v28); +LABEL_9: + (*(void (__thiscall **)(char *, int *))(*a2 + 28))((char *)v28 + 1, a2); + lpuexcptb = *(struct _Unwind_Exception **)(*(int *)((char *)v28 + 1) - 12); + v13 = (int)lpuexcptb + 1; + if ( (unsigned int)lpuexcptb + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v23 = v13; + v19 = (_WORD *)operator new[](2 * v13); + std::wstring::copy((int *)((char *)v28 + 1), v19, (unsigned int)lpuexcptb, 0); + v19[v23 - 1] = 0; + *(_DWORD *)(a3 + 40) = v19; + v14 = *(int *)((char *)v28 + 1); + *(_DWORD *)(a3 + 44) = lpuexcptb; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v14 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_12; +LABEL_16: + std::wstring::_Rep::_M_destroy((void *)(v14 - 12), (int)v28); + goto LABEL_12; + } + v15 = *(_DWORD *)(v14 - 4); + *(_DWORD *)(v14 - 4) = v15 - 1; + if ( v15 <= 0 ) + goto LABEL_16; +LABEL_12: + *(_DWORD *)(a3 + 52) = (*(int (__fastcall **)(int *))(*a2 + 36))(a2); + *(_DWORD *)(a3 + 56) = (*(int (__fastcall **)(int *))(*a2 + 40))(a2); +} +// 4B1D83: variable 'v16' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004B2110) -------------------------------------------------------- +void __cdecl std::__facet_shims::__moneypunct_fill_cache(int a1, int *a2, int a3) +{ + int v3; // eax + char *v4; // eax + int v5; // eax + int v6; // eax + int v7; // eax + _WORD *v8; // [esp+10h] [ebp-68h] + _WORD *v9; // [esp+10h] [ebp-68h] + _WORD *v10; // [esp+10h] [ebp-68h] + _BYTE *v11; // [esp+14h] [ebp-64h] + int v12; // [esp+14h] [ebp-64h] + int v13; // [esp+14h] [ebp-64h] + int v14; // [esp+14h] [ebp-64h] + struct _Unwind_Exception *lpuexcptc; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-60h] + struct _Unwind_Exception *lpuexcptb; // [esp+18h] [ebp-60h] + void *Block; // [esp+58h] [ebp-20h] BYREF + struct _Unwind_Exception *v20; // [esp+5Ch] [ebp-1Ch] + char v21[24]; // [esp+60h] [ebp-18h] BYREF + + *(_WORD *)(a3 + 18) = (*(int (__thiscall **)(int *))(*a2 + 8))(a2); + *(_WORD *)(a3 + 20) = (*(int (__fastcall **)(int *))(*a2 + 12))(a2); + *(_DWORD *)(a3 + 48) = (*(int (__fastcall **)(int *))(*a2 + 32))(a2); + *(_DWORD *)(a3 + 8) = 0; + *(_DWORD *)(a3 + 24) = 0; + v3 = *a2; + *(_DWORD *)(a3 + 32) = 0; + *(_DWORD *)(a3 + 40) = 0; + *(_BYTE *)(a3 + 82) = 1; + (*(void (__thiscall **)(void **, int *))(v3 + 16))(&Block, a2); + lpuexcptc = v20; + v11 = (_BYTE *)operator new[]((unsigned int)v20 + 1); + std::string::copy(&Block, v11, (size_t)lpuexcptc, 0); + *(_DWORD *)(a3 + 12) = lpuexcptc; + *((_BYTE *)lpuexcptc + (_DWORD)v11) = 0; + v4 = (char *)Block; + *(_DWORD *)(a3 + 8) = v11; + if ( v4 != v21 ) + operator delete(v4); + (*(void (__thiscall **)(void **, int *))(*a2 + 20))(&Block, a2); + lpuexcpt = v20; + v5 = (int)v20 + 1; + if ( (unsigned int)v20 + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v12 = v5; + v8 = (_WORD *)operator new[](2 * v5); + std::wstring::copy(&Block, v8, (unsigned int)lpuexcpt, 0); + v8[v12 - 1] = 0; + *(_DWORD *)(a3 + 24) = v8; + *(_DWORD *)(a3 + 28) = lpuexcpt; + if ( Block != v21 ) + operator delete(Block); + (*(void (__thiscall **)(void **, int *))(*a2 + 24))(&Block, a2); + lpuexcpta = v20; + v6 = (int)v20 + 1; + if ( (unsigned int)v20 + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v13 = v6; + v9 = (_WORD *)operator new[](2 * v6); + std::wstring::copy(&Block, v9, (unsigned int)lpuexcpta, 0); + v9[v13 - 1] = 0; + *(_DWORD *)(a3 + 32) = v9; + *(_DWORD *)(a3 + 36) = lpuexcpta; + if ( Block != v21 ) + operator delete(Block); + (*(void (__thiscall **)(void **, int *))(*a2 + 28))(&Block, a2); + lpuexcptb = v20; + v7 = (int)v20 + 1; + if ( (unsigned int)v20 + 1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v14 = v7; + v10 = (_WORD *)operator new[](2 * v7); + std::wstring::copy(&Block, v10, (unsigned int)lpuexcptb, 0); + v10[v14 - 1] = 0; + *(_DWORD *)(a3 + 40) = v10; + *(_DWORD *)(a3 + 44) = lpuexcptb; + if ( Block != v21 ) + operator delete(Block); + *(_DWORD *)(a3 + 52) = (*(int (__fastcall **)(int *))(*a2 + 36))(a2); + *(_DWORD *)(a3 + 56) = (*(int (__fastcall **)(int *))(*a2 + 40))(a2); +} + +//----- (004B2470) -------------------------------------------------------- +void __userpurge std::__ios_failure::__ios_failure(_DWORD *a1@, std::__ios_failure *this, int a3, int a4) +{ + void (__cdecl ***v4)(_anonymous_namespace_::system_error_category *__hidden); // eax + char *v5; // eax + + if ( a3 ) + { + v4 = std::_V2::system_category(); + } + else + { + if ( !(_BYTE)`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec + && __cxa_guard_acquire(&`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec) ) + { + __cxa_guard_release(&`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec); + atexit((_PVFV)__tcf_0_4); + } + a3 = 1; + v4 = &`anonymous namespace'::__io_category_instance(void)::__ec; + } + std::system_error::system_error(a1, a3, (int)v4, (char *)this); + *a1 = &off_51AA28; + v5 = (char *)std::runtime_error::what((int)a1); + std::__construct_ios_failure(a1 + 4, v5); +} +// 50CBD0: using guessed type void (__cdecl **`anonymous namespace'::__io_category_instance(void)::__ec)(_anonymous_namespace_::io_error_category *__hidden this); +// 51AA28: using guessed type void (__cdecl *off_51AA28)(std::__ios_failure *__hidden this); + +//----- (004B25A0) -------------------------------------------------------- +void __fastcall std::__ios_failure::~__ios_failure(void (__cdecl ***a1)(std::ios_base::failure *__hidden this)) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51AA28; + std::__destroy_ios_failure(a1 + 4); + *a1 = (void (__cdecl **)(std::ios_base::failure *__hidden))&off_51A788; + std::system_error::~system_error((std::exception *)lpfctx); + operator delete(a1); +} +// 4B25E4: variable 'lpfctx' is possibly undefined +// 51A788: using guessed type int (*off_51A788)(); +// 51AA28: using guessed type void (__cdecl *off_51AA28)(std::__ios_failure *__hidden this); + +//----- (004B2600) -------------------------------------------------------- +void __fastcall std::__ios_failure::~__ios_failure(void (__cdecl ***a1)(std::ios_base::failure *__hidden this)) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51AA28; + std::__destroy_ios_failure(a1 + 4); + *a1 = (void (__cdecl **)(std::ios_base::failure *__hidden))&off_51A788; + std::system_error::~system_error((std::exception *)lpfctx); +} +// 4B2644: variable 'lpfctx' is possibly undefined +// 51A788: using guessed type int (*off_51A788)(); +// 51AA28: using guessed type void (__cdecl *off_51AA28)(std::__ios_failure *__hidden this); + +//----- (004B2660) -------------------------------------------------------- +void __fastcall std::bad_exception::~bad_exception(void *Block) +{ + operator delete(Block); +} + +//----- (004B2690) -------------------------------------------------------- +unsigned int __thiscall std::filebuf::_M_set_buffer(_DWORD *this, int a2) +{ + unsigned int v2; // eax + int v3; // ebx + int v4; // edx + unsigned int result; // eax + + v2 = this[12]; + v3 = (v2 >> 3) & 1; + if ( (v2 & 0x10) != 0 ) + LOBYTE(v2) = 1; + v4 = this[16]; + result = v2 & 1; + this[1] = v4; + this[2] = v4; + if ( a2 > 0 && (_BYTE)v3 ) + { + this[3] = a2 + v4; +LABEL_6: + this[5] = 0; + this[4] = 0; + this[6] = 0; + return result; + } + this[3] = v4; + if ( a2 ) + goto LABEL_6; + if ( !(_BYTE)result ) + goto LABEL_6; + result = this[17]; + if ( result <= 1 ) + goto LABEL_6; + result = v4 + result - 1; + this[5] = v4; + this[4] = v4; + this[6] = result; + return result; +} + +//----- (004B2710) -------------------------------------------------------- +int __thiscall std::filebuf::_M_get_ext_pos(int this, int a2) +{ + if ( (*(unsigned __int8 (__fastcall **)(_DWORD))(**(_DWORD **)(this + 88) + 24))(*(_DWORD *)(this + 88)) ) + return *(_DWORD *)(this + 8) - *(_DWORD *)(this + 12); + else + return *(_DWORD *)(this + 92) + + (*(int (__thiscall **)(_DWORD, int, _DWORD, _DWORD, int))(**(_DWORD **)(this + 88) + 28))( + *(_DWORD *)(this + 88), + a2, + *(_DWORD *)(this + 92), + *(_DWORD *)(this + 100), + *(_DWORD *)(this + 8) - *(_DWORD *)(this + 4)) + - *(_DWORD *)(this + 104); +} + +//----- (004B2770) -------------------------------------------------------- +int __fastcall std::filebuf::_M_create_pback(int a1) +{ + int v1; // eax + int result; // eax + + if ( !*(_BYTE *)(a1 + 84) ) + { + v1 = *(_DWORD *)(a1 + 8); + *(_BYTE *)(a1 + 84) = 1; + *(_DWORD *)(a1 + 76) = v1; + *(_DWORD *)(a1 + 80) = *(_DWORD *)(a1 + 12); + *(_DWORD *)(a1 + 4) = a1 + 75; + *(_DWORD *)(a1 + 8) = a1 + 75; + result = a1 + 76; + *(_DWORD *)(a1 + 12) = a1 + 76; + } + return result; +} + +//----- (004B27A0) -------------------------------------------------------- +int __fastcall std::filebuf::_M_destroy_pback(int a1) +{ + bool v1; // zf + int v2; // ebx + int v3; // edx + int result; // eax + + if ( *(_BYTE *)(a1 + 84) ) + { + v1 = *(_DWORD *)(a1 + 8) == *(_DWORD *)(a1 + 4); + v2 = *(_DWORD *)(a1 + 64); + v3 = *(_DWORD *)(a1 + 80); + *(_BYTE *)(a1 + 84) = 0; + result = *(_DWORD *)(a1 + 76) + !v1; + *(_DWORD *)(a1 + 4) = v2; + *(_DWORD *)(a1 + 76) = result; + *(_DWORD *)(a1 + 8) = result; + *(_DWORD *)(a1 + 12) = v3; + } + return result; +} + +//----- (004B27E0) -------------------------------------------------------- +int __fastcall std::filebuf::_M_terminate_output(int a1) +{ + int v1; // esi + int v3; // eax + int v4; // ecx + int v5; // eax + int v6; // ebx + _DWORD **v7; // ebp + unsigned int v8; // eax + unsigned int v9; // esi + unsigned __int8 v11; // [esp+2Bh] [ebp-B5h] + FILE **v12; // [esp+2Ch] [ebp-B4h] + int v13; // [esp+30h] [ebp-B0h] + int v14; // [esp+40h] [ebp-A0h] BYREF + char v15[128]; // [esp+44h] [ebp-9Ch] BYREF + char v16[28]; // [esp+C4h] [ebp-1Ch] BYREF + + v1 = 1; + if ( *(_DWORD *)(a1 + 16) < *(_DWORD *)(a1 + 20) ) + { + v3 = (*(int (__thiscall **)(int, int))(*(_DWORD *)a1 + 52))(a1, -1); + LOBYTE(v3) = v3 != -1; + v1 = v3; + } + if ( *(_BYTE *)(a1 + 74) ) + { + v4 = *(_DWORD *)(a1 + 88); + if ( !v4 ) + std::__throw_bad_cast(); + v11 = (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 24))(v4); + if ( !v11 ) + { + if ( (_BYTE)v1 ) + { + v12 = (FILE **)(a1 + 40); + v5 = a1; + v6 = a1 + 56; + v7 = (_DWORD **)v5; + while ( 1 ) + { + v8 = (*(int (__thiscall **)(_DWORD *, int, char *, char *, int *))(*v7[22] + 12))(v7[22], v6, v15, v16, &v14); + v9 = v8; + if ( v8 == 2 ) + break; + if ( v8 <= 1 && v14 - (int)v15 > 0 ) + { + v13 = v14 - (_DWORD)v15; + if ( v13 != std::__basic_file::xsputn(v12, v15, v14 - (_DWORD)v15) ) + return v11; + if ( v9 == 1 ) + continue; + } + return ((int (__thiscall *)(_DWORD **, int))(*v7)[13])(v7, -1) != -1; + } + return v11; + } + } + } + return v1; +} +// 4B27E0: using guessed type char var_1C[28]; + +//----- (004B28F0) -------------------------------------------------------- +bool __thiscall std::filebuf::_M_convert_to_external(int this, char *a2, unsigned int a3) +{ + int v4; // ecx + unsigned int v5; // esi + int v6; // eax + void *v7; // esp + void *v8; // esp + unsigned int v9; // eax + unsigned int v10; // eax + int v12; // esi + char v13; // [esp+20h] [ebp-38h] + int v14; // [esp+38h] [ebp-20h] BYREF + int v15; // [esp+3Ch] [ebp-1Ch] BYREF + char v16[24]; // [esp+40h] [ebp-18h] BYREF + + v4 = *(_DWORD *)(this + 88); + v5 = a3; + if ( !v4 ) + std::__throw_bad_cast(); + if ( (*(unsigned __int8 (__fastcall **)(int))(*(_DWORD *)v4 + 24))(v4) ) + goto LABEL_5; + v6 = 16 * ((a3 * (*(int (__thiscall **)(_DWORD))(**(_DWORD **)(this + 88) + 32))(*(_DWORD *)(this + 88)) + 27) >> 4); + v7 = alloca(v6); + v8 = alloca(v6); + v9 = (*(int (__thiscall **)(_DWORD, int, char *, char *))(**(_DWORD **)(this + 88) + 8))( + *(_DWORD *)(this + 88), + this + 56, + a2, + &a2[a3]); + if ( v9 > 1 ) + { + if ( v9 == 3 ) + { +LABEL_5: + v10 = std::__basic_file::xsputn((FILE **)(this + 40), a2, a3); + return v10 == v5; + } +LABEL_11: + std::__throw_ios_failure("basic_filebuf::_M_convert_to_external conversion error"); + } + v13 = v9; + v5 = v14 - (_DWORD)v16; + v10 = std::__basic_file::xsputn((FILE **)(this + 40), v16, v14 - (_DWORD)v16); + if ( v14 - (_DWORD)v16 != v10 || (v13 & 1) == 0 ) + return v10 == v5; + if ( (*(int (__thiscall **)(_DWORD, int *, int, _DWORD, int *, char *, int, int *))(**(_DWORD **)(this + 88) + 8))( + *(_DWORD *)(this + 88), + &v15, + v15, + *(_DWORD *)(this + 20), + &v15, + v16, + v14, + &v14) == 2 ) + goto LABEL_11; + v12 = v14 - (_DWORD)v16; + return std::__basic_file::xsputn((FILE **)(this + 40), v16, v14 - (_DWORD)v16) == v12; +} + +//----- (004B2A60) -------------------------------------------------------- +void __fastcall std::filebuf::_M_destroy_internal_buffer(int a1) +{ + if ( *(_BYTE *)(a1 + 72) ) + { + if ( *(_DWORD *)(a1 + 64) ) + operator delete[](*(void **)(a1 + 64)); + *(_DWORD *)(a1 + 64) = 0; + *(_BYTE *)(a1 + 72) = 0; + } + if ( *(_DWORD *)(a1 + 92) ) + operator delete[](*(void **)(a1 + 92)); + *(_DWORD *)(a1 + 92) = 0; + *(_DWORD *)(a1 + 96) = 0; + *(_DWORD *)(a1 + 100) = 0; + *(_DWORD *)(a1 + 104) = 0; +} + +//----- (004B2AC0) -------------------------------------------------------- +void __fastcall std::filebuf::_M_allocate_internal_buffer(int a1) +{ + if ( !*(_BYTE *)(a1 + 72) && !*(_DWORD *)(a1 + 64) ) + { + *(_DWORD *)(a1 + 64) = operator new[](*(_DWORD *)(a1 + 68)); + *(_BYTE *)(a1 + 72) = 1; + } +} + +//----- (004B2B00) -------------------------------------------------------- +_DWORD *__thiscall std::filebuf::open(_DWORD *this, char *a2, int a3) +{ + _BYTE *v3; // esi + int v5; // eax + int v6; // eax + _DWORD v8[7]; // [esp+20h] [ebp-1Ch] BYREF + + v3 = this + 10; + if ( !std::__basic_file::is_open(this + 10) ) + { + std::__basic_file::open(v3, a2, a3, 436); + if ( std::__basic_file::is_open(v3) ) + { + v5 = this[16]; + if ( !*((_BYTE *)this + 72) && !v5 ) + { + v5 = operator new[](this[17]); + *((_BYTE *)this + 72) = 1; + this[16] = v5; + } + this[1] = v5; + this[2] = v5; + this[3] = v5; + v6 = this[13]; + this[12] = a3; + *(_WORD *)((char *)this + 73) = 0; + this[5] = 0; + this[4] = 0; + this[6] = 0; + this[14] = v6; + this[15] = v6; + if ( (a3 & 2) == 0 ) + return this; + (*(void (__thiscall **)(_DWORD *, _DWORD *, _DWORD, _DWORD, int, int))(*this + 16))(v8, this, 0, 0, 2, a3); + if ( (v8[0] & v8[1]) != -1 ) + return this; + std::filebuf::close((struct _Unwind_Exception *)this); + } + } + return 0; +} + +//----- (004B2C10) -------------------------------------------------------- +_DWORD *__thiscall std::filebuf::open(_DWORD *this, wchar_t *a2, int a3) +{ + _BYTE *v3; // esi + int v5; // eax + int v6; // eax + _DWORD v8[7]; // [esp+20h] [ebp-1Ch] BYREF + + v3 = this + 10; + if ( !std::__basic_file::is_open(this + 10) ) + { + std::__basic_file::open(v3, a2, a3); + if ( std::__basic_file::is_open(v3) ) + { + v5 = this[16]; + if ( !*((_BYTE *)this + 72) && !v5 ) + { + v5 = operator new[](this[17]); + *((_BYTE *)this + 72) = 1; + this[16] = v5; + } + this[1] = v5; + this[2] = v5; + this[3] = v5; + v6 = this[13]; + this[12] = a3; + *(_WORD *)((char *)this + 73) = 0; + this[5] = 0; + this[4] = 0; + this[6] = 0; + this[14] = v6; + this[15] = v6; + if ( (a3 & 2) == 0 ) + return this; + (*(void (__thiscall **)(_DWORD *, _DWORD *, _DWORD, _DWORD, int, int))(*this + 16))(v8, this, 0, 0, 2, a3); + if ( (v8[0] & v8[1]) != -1 ) + return this; + std::filebuf::close((struct _Unwind_Exception *)this); + } + } + return 0; +} + +//----- (004B2D10) -------------------------------------------------------- +_DWORD *__thiscall std::filebuf::open(_DWORD *this, char *a2, int a3) +{ + return std::filebuf::open(this, *(char **)a2, a3); +} + +//----- (004B2D20) -------------------------------------------------------- +int __thiscall std::filebuf::swap(int this, int a2) +{ + int v3; // eax + int v4; // edx + int v5; // eax + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // edx + int v11; // eax + int v12; // edx + int v13; // eax + int v14; // eax + char v15; // dl + int v16; // edx + int v17; // eax + int v18; // edx + int v19; // eax + int v20; // edx + int v21; // eax + int v22; // edx + int v23; // eax + int v24; // edx + int v25; // eax + int v26; // edx + int v27; // eax + int v28; // edx + int v29; // eax + int v30; // edx + int v31; // eax + int v32; // edx + int v33; // eax + int v34; // edx + int v35; // eax + int v36; // edx + int v37; // eax + int v38; // eax + int result; // eax + const std::locale *v40; // [esp+4h] [ebp-48h] + volatile signed __int32 **v41; // [esp+1Ch] [ebp-30h] + _DWORD *v42[8]; // [esp+2Ch] [ebp-20h] BYREF + + v3 = *(_DWORD *)(this + 4); + *(_DWORD *)(this + 4) = *(_DWORD *)(a2 + 4); + v4 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a2 + 4) = v3; + v5 = *(_DWORD *)(this + 8); + *(_DWORD *)(this + 8) = v4; + v6 = *(_DWORD *)(a2 + 12); + *(_DWORD *)(a2 + 8) = v5; + v7 = *(_DWORD *)(this + 12); + *(_DWORD *)(this + 12) = v6; + v8 = *(_DWORD *)(a2 + 16); + *(_DWORD *)(a2 + 12) = v7; + v9 = *(_DWORD *)(this + 16); + *(_DWORD *)(this + 16) = v8; + v10 = *(_DWORD *)(a2 + 20); + *(_DWORD *)(a2 + 16) = v9; + v11 = *(_DWORD *)(this + 20); + *(_DWORD *)(this + 20) = v10; + v12 = *(_DWORD *)(a2 + 24); + *(_DWORD *)(a2 + 20) = v11; + v13 = *(_DWORD *)(this + 24); + *(_DWORD *)(this + 24) = v12; + *(_DWORD *)(a2 + 24) = v13; + v41 = (volatile signed __int32 **)(this + 28); + std::locale::locale((volatile signed __int32 **)v42, (volatile signed __int32 **)(this + 28), v40); + std::locale::operator=(v41, (volatile signed __int32 **)(a2 + 28)); + std::locale::operator=((volatile signed __int32 **)(a2 + 28), (volatile signed __int32 **)v42); + std::locale::~locale(v42); + v14 = *(_DWORD *)(this + 40); + *(_DWORD *)(this + 40) = *(_DWORD *)(a2 + 40); + v15 = *(_BYTE *)(a2 + 44); + *(_DWORD *)(a2 + 40) = v14; + LOBYTE(v14) = *(_BYTE *)(this + 44); + *(_BYTE *)(this + 44) = v15; + v16 = *(_DWORD *)(a2 + 48); + *(_BYTE *)(a2 + 44) = v14; + v17 = *(_DWORD *)(this + 48); + *(_DWORD *)(this + 48) = v16; + v18 = *(_DWORD *)(a2 + 52); + *(_DWORD *)(a2 + 48) = v17; + v19 = *(_DWORD *)(this + 52); + *(_DWORD *)(this + 52) = v18; + v20 = *(_DWORD *)(a2 + 56); + *(_DWORD *)(a2 + 52) = v19; + v21 = *(_DWORD *)(this + 56); + *(_DWORD *)(this + 56) = v20; + v22 = *(_DWORD *)(a2 + 60); + *(_DWORD *)(a2 + 56) = v21; + v23 = *(_DWORD *)(this + 60); + *(_DWORD *)(this + 60) = v22; + v24 = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 60) = v23; + v25 = *(_DWORD *)(this + 64); + *(_DWORD *)(this + 64) = v24; + v26 = *(_DWORD *)(a2 + 68); + *(_DWORD *)(a2 + 64) = v25; + v27 = *(_DWORD *)(this + 68); + *(_DWORD *)(this + 68) = v26; + *(_DWORD *)(a2 + 68) = v27; + LOBYTE(v27) = *(_BYTE *)(this + 72); + *(_BYTE *)(this + 72) = *(_BYTE *)(a2 + 72); + v28 = *(_DWORD *)(a2 + 92); + *(_BYTE *)(a2 + 72) = v27; + v29 = *(_DWORD *)(this + 92); + *(_DWORD *)(this + 92) = v28; + v30 = *(_DWORD *)(a2 + 96); + *(_DWORD *)(a2 + 92) = v29; + v31 = *(_DWORD *)(this + 96); + *(_DWORD *)(this + 96) = v30; + v32 = *(_DWORD *)(a2 + 100); + *(_DWORD *)(a2 + 96) = v31; + v33 = *(_DWORD *)(this + 100); + *(_DWORD *)(this + 100) = v32; + v34 = *(_DWORD *)(a2 + 104); + *(_DWORD *)(a2 + 100) = v33; + v35 = *(_DWORD *)(this + 104); + *(_DWORD *)(this + 104) = v34; + LOBYTE(v34) = *(_BYTE *)(a2 + 73); + *(_DWORD *)(a2 + 104) = v35; + LOBYTE(v35) = *(_BYTE *)(this + 73); + *(_BYTE *)(this + 73) = v34; + LOBYTE(v34) = *(_BYTE *)(a2 + 74); + *(_BYTE *)(a2 + 73) = v35; + LOBYTE(v35) = *(_BYTE *)(this + 74); + *(_BYTE *)(this + 74) = v34; + v36 = *(_DWORD *)(a2 + 76); + *(_BYTE *)(a2 + 74) = v35; + v37 = *(_DWORD *)(this + 76); + *(_DWORD *)(this + 76) = v36; + *(_DWORD *)(a2 + 76) = v37; + v38 = *(_DWORD *)(this + 80); + *(_DWORD *)(this + 80) = *(_DWORD *)(a2 + 80); + LOBYTE(v36) = *(_BYTE *)(a2 + 84); + *(_DWORD *)(a2 + 80) = v38; + result = *(unsigned __int8 *)(this + 84); + *(_BYTE *)(this + 84) = v36; + *(_BYTE *)(a2 + 84) = result; + return result; +} +// 4B2D88: variable 'v40' is possibly undefined + +//----- (004B2EB0) -------------------------------------------------------- +int __fastcall std::filebuf::sync(_DWORD *a1) +{ + if ( a1[4] >= a1[5] ) + return 0; + else + return -((*(int (__thiscall **)(_DWORD *, int))(*a1 + 52))(a1, -1) == -1); +} + +//----- (004B2EF0) -------------------------------------------------------- +struct _Unwind_Exception *__fastcall std::filebuf::close(struct _Unwind_Exception *a1) +{ + bool v1; // zf + void *v2; // eax + int v3; // edx + int v4; // edx + struct _Unwind_Exception *lpuexcpt; // [esp+1Ch] [ebp-60h] + char *v7; // [esp+24h] [ebp-58h] + char v8; // [esp+2Bh] [ebp-51h] + + lpuexcpt = a1; + v7 = (char *)a1 + 40; + if ( !std::__basic_file::is_open((_DWORD *)a1 + 10) ) + return 0; + v8 = std::filebuf::_M_terminate_output((int)lpuexcpt) ^ 1; + v1 = *((_BYTE *)lpuexcpt + 72) == 0; + *((_DWORD *)lpuexcpt + 12) = 0; + *((_BYTE *)lpuexcpt + 84) = 0; + if ( !v1 ) + { + v2 = (void *)*((_DWORD *)lpuexcpt + 16); + if ( v2 ) + operator delete[](v2); + *((_DWORD *)lpuexcpt + 16) = 0; + *((_BYTE *)lpuexcpt + 72) = 0; + } + if ( *((_DWORD *)lpuexcpt + 23) ) + operator delete[](*((void **)lpuexcpt + 23)); + *((_DWORD *)lpuexcpt + 23) = 0; + *((_DWORD *)lpuexcpt + 24) = 0; + *((_DWORD *)lpuexcpt + 25) = 0; + *((_DWORD *)lpuexcpt + 26) = 0; + *(_WORD *)((char *)lpuexcpt + 73) = 0; + v3 = *((_DWORD *)lpuexcpt + 16); + *((_DWORD *)lpuexcpt + 5) = 0; + *((_DWORD *)lpuexcpt + 1) = v3; + *((_DWORD *)lpuexcpt + 2) = v3; + *((_DWORD *)lpuexcpt + 3) = v3; + v4 = *((_DWORD *)lpuexcpt + 13); + *((_DWORD *)lpuexcpt + 4) = 0; + *((_DWORD *)lpuexcpt + 6) = 0; + *((_DWORD *)lpuexcpt + 14) = v4; + *((_DWORD *)lpuexcpt + 15) = v4; + if ( !std::__basic_file::close((int)v7) || v8 ) + return 0; + return lpuexcpt; +} + +//----- (004B30A0) -------------------------------------------------------- +char __thiscall std::filebuf::imbue(char *this, int a2) +{ + void *v3; // esi + int v4; // eax + int v5; // ecx + int v6; // ecx + int v7; // edi + const void *Src; // eax + int v9; // edi + size_t Size; // edi + int v11; // eax + int v12; // eax + int v14; // [esp+30h] [ebp-1Ch] BYREF + int v15; // [esp+34h] [ebp-18h] + + if ( (unsigned __int8)std::has_facet>(a2) ) + v3 = std::use_facet>(a2); + else + v3 = 0; + LOBYTE(v4) = std::__basic_file::is_open((_DWORD *)this + 10); + if ( !(_BYTE)v4 ) + goto LABEL_13; + if ( !this[73] && !this[74] ) + { + *((_DWORD *)this + 22) = v3; + return v4; + } + v5 = *((_DWORD *)this + 22); + if ( !v5 ) + goto LABEL_24; + v4 = (*(int (__fastcall **)(int))(*(_DWORD *)v5 + 20))(v5); + if ( v4 == -1 ) + goto LABEL_18; + if ( !this[73] ) + { + if ( !this[74] ) + goto LABEL_13; + LOBYTE(v4) = std::filebuf::_M_terminate_output((int)this); + if ( (_BYTE)v4 ) + { + v4 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 1) = v4; + *((_DWORD *)this + 2) = v4; + *((_DWORD *)this + 3) = v4; + *((_DWORD *)this + 6) = 0; + goto LABEL_13; + } +LABEL_18: + *((_DWORD *)this + 22) = 0; + return v4; + } + v6 = *((_DWORD *)this + 22); + if ( !v6 ) +LABEL_24: + std::__throw_bad_cast(); + LOBYTE(v4) = (*(int (__fastcall **)(int))(*(_DWORD *)v6 + 24))(v6); + if ( !(_BYTE)v4 ) + { + v7 = *((_DWORD *)this + 23); + Src = (const void *)(v7 + + (*(int (__thiscall **)(_DWORD, char *, int, _DWORD, int))(**((_DWORD **)this + 22) + 28))( + *((_DWORD *)this + 22), + this + 60, + v7, + *((_DWORD *)this + 25), + *((_DWORD *)this + 2) - *((_DWORD *)this + 1))); + v9 = *((_DWORD *)this + 26); + *((_DWORD *)this + 25) = Src; + Size = v9 - (_DWORD)Src; + if ( Size ) + memmove(*((void **)this + 23), Src, Size); + v11 = *((_DWORD *)this + 23); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 25) = v11; + *((_DWORD *)this + 26) = Size + v11; + v12 = *((_DWORD *)this + 16); + *((_DWORD *)this + 6) = 0; + *((_DWORD *)this + 1) = v12; + *((_DWORD *)this + 2) = v12; + *((_DWORD *)this + 3) = v12; + v4 = *((_DWORD *)this + 13); + *((_DWORD *)this + 14) = v4; + *((_DWORD *)this + 15) = v4; + goto LABEL_13; + } + if ( !v3 ) + goto LABEL_18; + LOBYTE(v4) = (*(int (__fastcall **)(void *))(*(_DWORD *)v3 + 24))(v3); + if ( !(_BYTE)v4 ) + { + (*(void (__thiscall **)(int *, char *, _DWORD, _DWORD, int, _DWORD))(*(_DWORD *)this + 16))( + &v14, + this, + 0, + 0, + 1, + *((_DWORD *)this + 12)); + LOBYTE(v4) = v14 & v15; + if ( (v14 & v15) == -1 ) + goto LABEL_18; + } +LABEL_13: + *((_DWORD *)this + 22) = v3; + return v4; +} + +//----- (004B3280) -------------------------------------------------------- +int __thiscall std::filebuf::setbuf(int this, __int64 a2) +{ + if ( std::__basic_file::is_open((_DWORD *)(this + 40)) ) + return this; + if ( !a2 ) + { + *(_DWORD *)(this + 68) = 1; + return this; + } + if ( !(_DWORD)a2 || SHIDWORD(a2) <= 0 ) + return this; + *(_QWORD *)(this + 64) = a2; + return this; +} + +//----- (004B32E0) -------------------------------------------------------- +int __thiscall std::filebuf::xsgetn(_DWORD *this, char *a2, signed int a3) +{ + char *v4; // edi + signed int v5; // esi + int v6; // eax + int v7; // ebp + char *v8; // ecx + bool v9; // zf + int v10; // edx + int v11; // ecx + int v12; // eax + int v13; // eax + int v14; // ecx + char v15; // al + int v17; // eax + const void *Src; // eax + size_t Size; // edx + int i; // eax + int v21; // eax + int *v22; // eax + int v23; // [esp+1Ch] [ebp-20h] + int v24; // [esp+1Ch] [ebp-20h] + + v4 = a2; + v5 = a3; + if ( *((_BYTE *)this + 84) ) + { + v6 = this[2]; + v7 = 0; + v8 = (char *)this[1]; + if ( a3 <= 0 || v8 != (char *)v6 ) + goto LABEL_4; + v5 = a3 - 1; + *a2 = *v8; + v6 = this[2] + 1; + v9 = *((_BYTE *)this + 84) == 0; + this[2] = v6; + if ( !v9 ) + { + v8 = (char *)this[1]; + v4 = a2 + 1; + v7 = 1; +LABEL_4: + v9 = v8 == (char *)v6; + v10 = this[16]; + v11 = this[20]; + *((_BYTE *)this + 84) = 0; + v12 = this[19] + !v9; + this[1] = v10; + this[19] = v12; + this[2] = v12; + this[3] = v11; + goto LABEL_5; + } + v4 = a2 + 1; + v7 = 1; + } + else if ( *((_BYTE *)this + 74) ) + { + if ( (*(int (__thiscall **)(_DWORD *, int))(*this + 52))(this, -1) == -1 ) + return 0; + v17 = this[16]; + this[5] = 0; + v7 = 0; + this[4] = 0; + this[1] = v17; + this[2] = v17; + this[3] = v17; + this[6] = 0; + *((_BYTE *)this + 74) = 0; + } + else + { + v7 = 0; + } +LABEL_5: + v13 = 2; + if ( this[17] >= 2u ) + v13 = this[17]; + if ( v5 <= v13 - 1 ) + goto LABEL_11; + v14 = this[22]; + if ( !v14 ) + std::__throw_bad_cast(); + v23 = this[12]; + v15 = (*(int (__fastcall **)(int))(*(_DWORD *)v14 + 24))(v14); + if ( (v23 & 8) != 0 && v15 ) + { + Src = (const void *)this[2]; + Size = this[3] - (_DWORD)Src; + if ( Size ) + { + v24 = this[3] - (_DWORD)Src; + memcpy(v4, Src, Size); + this[2] += v24; + v4 += v24; + v7 += v24; + v5 -= v24; + } + for ( i = std::__basic_file::xsgetn((FILE **)this + 10, v4, v5); + ; + i = std::__basic_file::xsgetn((FILE **)this + 10, v4, v5) ) + { + if ( i == -1 ) + { + v22 = __errno(); + std::__throw_ios_failure( + (std::__ios_failure *)"basic_filebuf::xsgetn error reading the file", + (std::runtime_error *)*v22); + } + if ( !i ) + break; + v7 += i; + v5 -= i; + if ( !v5 ) + goto LABEL_28; + v4 += i; + } + if ( !v5 ) + { +LABEL_28: + *((_BYTE *)this + 73) = 1; + return v7; + } + v21 = this[16]; + this[5] = 0; + this[4] = 0; + this[1] = v21; + this[2] = v21; + this[3] = v21; + this[6] = 0; + *((_BYTE *)this + 73) = 0; + } + else + { +LABEL_11: + v7 += std::streambuf::xsgetn(this, v4, v5); + } + return v7; +} + +//----- (004B3500) -------------------------------------------------------- +int __thiscall std::filebuf::xsputn(int this, unsigned __int8 *a2, signed int a3) +{ + int v4; // eax + int v5; // ecx + char v6; // si + int v7; // edx + int v8; // eax + unsigned int v9; // ecx + signed int v10; // esi + int v11; // eax + int v12; // edx + bool v13; // cc + int result; // eax + int v15; // edx + int v16; // ecx + unsigned int v17; // ecx + + v4 = *(_DWORD *)(this + 48); + v5 = *(_DWORD *)(this + 88); + if ( (v4 & 0x10) != 0 ) + LOBYTE(v4) = 1; + v6 = v4 & 1; + if ( !v5 ) + std::__throw_bad_cast(); + if ( !(*(unsigned __int8 (__fastcall **)(int))(*(_DWORD *)v5 + 24))(v5) || !v6 || *(_BYTE *)(this + 73) ) + return std::streambuf::xsputn((_DWORD *)this, a2, a3); + v7 = *(_DWORD *)(this + 20); + v8 = *(_DWORD *)(this + 24) - v7; + if ( !*(_BYTE *)(this + 74) ) + { + v9 = *(_DWORD *)(this + 68); + if ( v9 > 1 ) + v8 = v9 - 1; + } + if ( v8 >= 1024 ) + v8 = 1024; + if ( a3 < v8 ) + return std::streambuf::xsputn((_DWORD *)this, a2, a3); + v10 = v7 - *(_DWORD *)(this + 16); + v11 = std::__basic_file::xsputn_2((FILE **)(this + 40), *(char **)(this + 16), v10, (char *)a2, a3); + if ( v10 + a3 == v11 ) + { + v15 = *(_DWORD *)(this + 64); + v16 = *(_DWORD *)(this + 48); + *(_DWORD *)(this + 4) = v15; + *(_DWORD *)(this + 8) = v15; + *(_DWORD *)(this + 12) = v15; + if ( ((v16 & 0x10) != 0 || (v16 & 1) != 0) && (v17 = *(_DWORD *)(this + 68), v17 > 1) ) + { + *(_DWORD *)(this + 20) = v15; + *(_DWORD *)(this + 16) = v15; + *(_DWORD *)(this + 24) = v15 + v17 - 1; + } + else + { + *(_DWORD *)(this + 20) = 0; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 24) = 0; + } + *(_BYTE *)(this + 74) = 1; + } + v12 = v11 - v10; + v13 = v10 < v11; + result = 0; + if ( v13 ) + return v12; + return result; +} + +//----- (004B3630) -------------------------------------------------------- +_DWORD *__thiscall std::filebuf::_M_seek(_DWORD *this, int a2, __int64 a3, int a4, int a5) +{ + _DWORD *result; // eax + __int64 v7; // rax + int v8; // ecx + int v9; // ecx + + *this = -1; + this[1] = -1; + this[2] = 0; + if ( !(unsigned __int8)std::filebuf::_M_terminate_output(a2) ) + return this; + v7 = std::__basic_file::seekoff((FILE **)(a2 + 40), a3, a4); + if ( ((unsigned int)v7 & HIDWORD(v7)) == -1 ) + return this; + *this = v7; + result = this; + *(_WORD *)(a2 + 73) = 0; + v8 = *(_DWORD *)(a2 + 92); + *(_DWORD *)(a2 + 20) = 0; + *(_DWORD *)(a2 + 104) = v8; + *(_DWORD *)(a2 + 100) = v8; + v9 = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 16) = 0; + *(_DWORD *)(a2 + 4) = v9; + *(_DWORD *)(a2 + 8) = v9; + *(_DWORD *)(a2 + 12) = v9; + *(_DWORD *)(a2 + 24) = 0; + *(_DWORD *)(a2 + 56) = a5; + this[2] = a5; + this[1] = HIDWORD(v7); + return result; +} + +//----- (004B36E0) -------------------------------------------------------- +_DWORD *__thiscall std::filebuf::seekoff(_DWORD *this, int a2, __int64 a3, int a4, int a5) +{ + int v6; // ecx + int v7; // eax + int v8; // edx + bool v9; // al + bool v11; // zf + __int64 v12; // rax + __int64 v13; // rax + int v14; // edx + int v15; // ecx + int v16; // eax + unsigned int v17; // esi + unsigned int v18; // edi + __int64 v19; // kr00_8 + __int64 ext_pos; // [esp+28h] [ebp-54h] + bool v21; // [esp+34h] [ebp-48h] + int v22; // [esp+34h] [ebp-48h] + int v23; // [esp+3Ch] [ebp-40h] + int v24; // [esp+4Ch] [ebp-30h] BYREF + int v25[11]; // [esp+50h] [ebp-2Ch] BYREF + + v6 = *(_DWORD *)(a2 + 88); + if ( v6 ) + { + v7 = (*(int (__fastcall **)(int))(*(_DWORD *)v6 + 20))(v6); + v8 = 0; + if ( v7 >= 0 ) + v8 = v7; + v9 = v7 <= 0; + v23 = v8; + } + else + { + v23 = 0; + v9 = 1; + } + *this = -1; + this[1] = -1; + this[2] = 0; + v21 = v9 && a3 != 0; + if ( !std::__basic_file::is_open((_DWORD *)(a2 + 40)) || v21 ) + return this; + if ( a4 != 1 + || a3 + || *(_BYTE *)(a2 + 74) + && !(*(unsigned __int8 (__fastcall **)(_DWORD))(**(_DWORD **)(a2 + 88) + 24))(*(_DWORD *)(a2 + 88)) ) + { + if ( *(_BYTE *)(a2 + 84) ) + { + v11 = *(_DWORD *)(a2 + 8) == *(_DWORD *)(a2 + 4); + *(_BYTE *)(a2 + 84) = 0; + v14 = *(_DWORD *)(a2 + 80); + v15 = *(_DWORD *)(a2 + 64); + v16 = *(_DWORD *)(a2 + 76) + !v11; + *(_DWORD *)(a2 + 76) = v16; + *(_DWORD *)(a2 + 4) = v15; + *(_DWORD *)(a2 + 8) = v16; + *(_DWORD *)(a2 + 12) = v14; + } + v22 = *(_DWORD *)(a2 + 52); + v24 = v22; + v17 = a3 * v23; + v18 = (unsigned __int64)(a3 * v23) >> 32; + if ( *(_BYTE *)(a2 + 73) && a4 == 1 ) + { + v24 = *(_DWORD *)(a2 + 60); + v19 = std::filebuf::_M_get_ext_pos(a2, (int)&v24) + __PAIR64__(v18, v17); + std::filebuf::_M_seek(v25, a2, v19, 1, v24); + } + else + { + std::filebuf::_M_seek(v25, a2, __SPAIR64__(v18, v17), a4, v22); + } + *this = v25[0]; + this[1] = v25[1]; + this[2] = v25[2]; + return this; + } + v11 = *(_BYTE *)(a2 + 73) == 0; + ext_pos = 0LL; + v24 = *(_DWORD *)(a2 + 52); + if ( !v11 ) + { + v24 = *(_DWORD *)(a2 + 60); + ext_pos = std::filebuf::_M_get_ext_pos(a2, (int)&v24); + } + if ( *(_BYTE *)(a2 + 74) ) + ext_pos = *(_DWORD *)(a2 + 20) - *(_DWORD *)(a2 + 16); + v12 = std::__basic_file::seekoff((FILE **)(a2 + 40), 0LL, 1); + if ( ((unsigned int)v12 & HIDWORD(v12)) == -1 ) + return this; + v13 = ext_pos + v12; + *this = v13; + LODWORD(v13) = v24; + this[1] = HIDWORD(v13); + this[2] = v13; + return this; +} + +//----- (004B3940) -------------------------------------------------------- +_DWORD *__thiscall std::filebuf::seekpos(_DWORD *this, int a2, __int64 a3, int a4, int a5, int a6) +{ + bool v7; // zf + int v8; // edx + int v9; // ecx + int v10; // eax + int v11; // ebp + __int64 v12; // rax + int v14; // ecx + int v15; // ecx + + *this = -1; + this[1] = -1; + this[2] = 0; + if ( std::__basic_file::is_open((_DWORD *)(a2 + 40)) ) + { + if ( *(_BYTE *)(a2 + 84) ) + { + v7 = *(_DWORD *)(a2 + 8) == *(_DWORD *)(a2 + 4); + *(_BYTE *)(a2 + 84) = 0; + v8 = *(_DWORD *)(a2 + 80); + v9 = *(_DWORD *)(a2 + 64); + v10 = *(_DWORD *)(a2 + 76) + !v7; + *(_DWORD *)(a2 + 76) = v10; + *(_DWORD *)(a2 + 4) = v9; + *(_DWORD *)(a2 + 8) = v10; + *(_DWORD *)(a2 + 12) = v8; + } + v11 = a4; + if ( (unsigned __int8)std::filebuf::_M_terminate_output(a2) ) + { + v12 = std::__basic_file::seekoff((FILE **)(a2 + 40), a3, 0); + if ( ((unsigned int)v12 & HIDWORD(v12)) == -1 ) + { + v11 = 0; + } + else + { + *(_DWORD *)(a2 + 20) = 0; + *(_WORD *)(a2 + 73) = 0; + v14 = *(_DWORD *)(a2 + 92); + *(_DWORD *)(a2 + 16) = 0; + *(_DWORD *)(a2 + 104) = v14; + *(_DWORD *)(a2 + 100) = v14; + v15 = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 24) = 0; + *(_DWORD *)(a2 + 4) = v15; + *(_DWORD *)(a2 + 8) = v15; + *(_DWORD *)(a2 + 12) = v15; + *(_DWORD *)(a2 + 56) = a4; + } + } + else + { + v11 = 0; + v12 = -1LL; + } + *(_QWORD *)this = v12; + this[2] = v11; + } + return this; +} + +//----- (004B3A70) -------------------------------------------------------- +int __thiscall std::filebuf::overflow(int this, int a2) +{ + int v3; // edx + int v4; // eax + int v5; // ecx + int ext_pos; // eax + int v7; // ebp + int v8; // edi + int result; // eax + char *v10; // edx + char *v11; // eax + int v12; // eax + int v13; // edx + __int64 v14; // rax + int v15; // eax + int v16; // eax + unsigned int v17; // eax + unsigned int v18; // edx + int v19; // edx + int v20; // ecx + char v21[29]; // [esp+1Fh] [ebp-1Dh] BYREF + + if ( (*(_BYTE *)(this + 48) & 0x11) == 0 ) + return -1; + if ( *(_BYTE *)(this + 73) ) + { + if ( *(_BYTE *)(this + 84) ) + { + v3 = *(_DWORD *)(this + 80); + v4 = *(_DWORD *)(this + 76) + (*(_DWORD *)(this + 8) != *(_DWORD *)(this + 4)); + *(_DWORD *)(this + 76) = v4; + v5 = *(_DWORD *)(this + 64); + *(_DWORD *)(this + 8) = v4; + *(_DWORD *)(this + 4) = v5; + *(_DWORD *)(this + 12) = v3; + *(_BYTE *)(this + 84) = 0; + } + ext_pos = std::filebuf::_M_get_ext_pos(this, this + 60); + v7 = *(_DWORD *)(this + 60); + v8 = ext_pos; + if ( (unsigned __int8)std::filebuf::_M_terminate_output(this) ) + { + v14 = std::__basic_file::seekoff((FILE **)(this + 40), v8, 1); + if ( ((unsigned int)v14 & HIDWORD(v14)) != -1 ) + { + *(_DWORD *)(this + 20) = 0; + *(_WORD *)(this + 73) = 0; + v15 = *(_DWORD *)(this + 92); + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 104) = v15; + *(_DWORD *)(this + 100) = v15; + v16 = *(_DWORD *)(this + 64); + *(_DWORD *)(this + 24) = 0; + *(_DWORD *)(this + 4) = v16; + *(_DWORD *)(this + 8) = v16; + *(_DWORD *)(this + 12) = v16; + *(_DWORD *)(this + 56) = v7; + goto LABEL_19; + } + } + return -1; + } + v10 = *(char **)(this + 16); + v11 = *(char **)(this + 20); + if ( v10 >= v11 ) + { +LABEL_19: + v17 = *(_DWORD *)(this + 68); + if ( v17 <= 1 ) + { + v21[0] = a2; + if ( a2 == -1 ) + { + *(_BYTE *)(this + 74) = 1; + return 0; + } + if ( std::filebuf::_M_convert_to_external(this, v21, 1u) ) + { + *(_BYTE *)(this + 74) = 1; + return a2; + } + return -1; + } + v19 = *(_DWORD *)(this + 64); + v20 = *(_DWORD *)(this + 48); + *(_DWORD *)(this + 4) = v19; + *(_DWORD *)(this + 8) = v19; + *(_DWORD *)(this + 12) = v19; + if ( (v20 & 0x10) != 0 || (v20 & 1) != 0 ) + { + *(_DWORD *)(this + 20) = v19; + *(_DWORD *)(this + 16) = v19; + *(_DWORD *)(this + 24) = v19 + v17 - 1; + } + else + { + *(_DWORD *)(this + 20) = 0; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 24) = 0; + } + *(_BYTE *)(this + 74) = 1; + if ( a2 != -1 ) + { + **(_BYTE **)(this + 20) = a2; + result = a2; + ++*(_DWORD *)(this + 20); + return result; + } + return 0; + } + if ( a2 != -1 ) + { + *v11 = a2; + v10 = *(char **)(this + 16); + v11 = (char *)(*(_DWORD *)(this + 20) + 1); + *(_DWORD *)(this + 20) = v11; + } + if ( !std::filebuf::_M_convert_to_external(this, v10, v11 - v10) ) + return -1; + v12 = *(_DWORD *)(this + 64); + v13 = *(_DWORD *)(this + 48); + *(_DWORD *)(this + 4) = v12; + *(_DWORD *)(this + 8) = v12; + *(_DWORD *)(this + 12) = v12; + if ( ((v13 & 0x10) != 0 || (v13 & 1) != 0) && (v18 = *(_DWORD *)(this + 68), v18 > 1) ) + { + *(_DWORD *)(this + 20) = v12; + *(_DWORD *)(this + 16) = v12; + *(_DWORD *)(this + 24) = v12 + v18 - 1; + } + else + { + *(_DWORD *)(this + 20) = 0; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 24) = 0; + } + result = a2; + if ( a2 == -1 ) + return 0; + return result; +} +// 4B3A70: using guessed type char var_1D[29]; + +//----- (004B3CD0) -------------------------------------------------------- +int __thiscall std::filebuf::pbackfail(char *this, int a2) +{ + char v3; // di + unsigned int v4; // eax + int v5; // edx + int result; // eax + char *v7; // eax + int v8; // eax + int v9; // eax + int v10[7]; // [esp+24h] [ebp-1Ch] BYREF + + if ( (this[48] & 8) == 0 ) + return -1; + if ( this[74] ) + { + if ( (*(int (__thiscall **)(char *, int))(*(_DWORD *)this + 52))(this, -1) == -1 ) + return -1; + v9 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 4) = 0; + v3 = this[84]; + *((_DWORD *)this + 1) = v9; + *((_DWORD *)this + 2) = v9; + *((_DWORD *)this + 3) = v9; + *((_DWORD *)this + 6) = 0; + this[74] = 0; + } + else + { + v3 = this[84]; + v4 = *((_DWORD *)this + 2); + if ( v4 > *((_DWORD *)this + 1) ) + { + *((_DWORD *)this + 2) = v4 - 1; + v5 = *(unsigned __int8 *)(v4 - 1); + goto LABEL_5; + } + } + (*(void (__thiscall **)(int *, char *, int, int, int, int))(*(_DWORD *)this + 16))(v10, this, -1, -1, 1, 24); + if ( (v10[0] & v10[1]) == -1 ) + return -1; + v5 = (*(int (__fastcall **)(char *))(*(_DWORD *)this + 36))(this); + if ( v5 == -1 ) + return -1; +LABEL_5: + result = 0; + if ( a2 == -1 ) + return result; + result = v5; + if ( v5 == a2 ) + return result; + if ( v3 ) + return -1; + v7 = (char *)*((_DWORD *)this + 2); + if ( !this[84] ) + { + *((_DWORD *)this + 19) = v7; + v8 = *((_DWORD *)this + 3); + *((_DWORD *)this + 3) = this + 76; + *((_DWORD *)this + 20) = v8; + v7 = this + 75; + *((_DWORD *)this + 1) = this + 75; + *((_DWORD *)this + 2) = this + 75; + this[84] = 1; + } + this[73] = 1; + *v7 = a2; + return a2; +} + +//----- (004B3E00) -------------------------------------------------------- +int __fastcall std::filebuf::showmanyc(_DWORD *a1) +{ + int v1; // esi + FILE **v2; // ebp + int v4; // ecx + int v5; // esi + int v6; // edi + int v8; // esi + + v1 = a1[12]; + if ( (v1 & 8) == 0 ) + return -1; + v2 = (FILE **)(a1 + 10); + if ( !std::__basic_file::is_open(a1 + 10) ) + return -1; + v4 = a1[22]; + v5 = v1 & 4; + v6 = a1[3] - a1[2]; + if ( !v4 ) + std::__throw_bad_cast(); + if ( (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 20))(v4) < 0 || !v5 ) + return v6; + v8 = std::__basic_file::showmanyc(v2); + return v8 / (*(int (**)(void))(*(_DWORD *)a1[22] + 32))() + v6; +} + +//----- (004B3E90) -------------------------------------------------------- +int __fastcall std::filebuf::underflow(int a1) +{ + unsigned __int8 *v2; // eax + int result; // eax + bool v4; // zf + unsigned int v5; // edx + int v6; // ecx + int v7; // edi + int v8; // ecx + int v9; // eax + signed int v10; // esi + int v11; // ecx + const void *v12; // eax + signed int v13; // edi + unsigned int v14; // edx + signed int v15; // ecx + char *v16; // ebp + int v17; // ecx + char *v18; // eax + void *v19; // edx + int v20; // esi + char v21; // di + int v22; // ebp + char v23; // al + int v24; // eax + int v25; // eax + int v26; // eax + _BYTE *Src; // ecx + unsigned int v28; // eax + size_t Size; // esi + int v30; // eax + int *v31; // eax + unsigned __int8 *v32; // edx + int v33; // eax + char *v34; // eax + char *v35; // eax + char *v36; // eax + unsigned int v37; // [esp+48h] [ebp-34h] + unsigned int v38; // [esp+4Ch] [ebp-30h] + unsigned int v39; // [esp+4Ch] [ebp-30h] + unsigned int v40; // [esp+4Ch] [ebp-30h] + unsigned int v41; // [esp+4Ch] [ebp-30h] + unsigned int v42; // [esp+4Ch] [ebp-30h] + void *v43; // [esp+5Ch] [ebp-20h] BYREF + + if ( (*(_BYTE *)(a1 + 48) & 8) == 0 ) + return -1; + if ( *(_BYTE *)(a1 + 74) ) + { + result = (*(int (__thiscall **)(int, int))(*(_DWORD *)a1 + 52))(a1, -1); + if ( result == -1 ) + return result; + v2 = *(unsigned __int8 **)(a1 + 64); + v4 = *(_BYTE *)(a1 + 84) == 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 4) = v2; + *(_DWORD *)(a1 + 8) = v2; + *(_DWORD *)(a1 + 12) = v2; + *(_DWORD *)(a1 + 24) = 0; + *(_BYTE *)(a1 + 74) = 0; + if ( v4 ) + goto LABEL_4; +LABEL_9: + v4 = *(_DWORD *)(a1 + 4) == (_DWORD)v2; + v5 = *(_DWORD *)(a1 + 80); + *(_BYTE *)(a1 + 84) = 0; + v6 = *(_DWORD *)(a1 + 64); + v2 = (unsigned __int8 *)(*(_DWORD *)(a1 + 76) + !v4); + *(_DWORD *)(a1 + 12) = v5; + *(_DWORD *)(a1 + 76) = v2; + *(_DWORD *)(a1 + 4) = v6; + *(_DWORD *)(a1 + 8) = v2; + if ( (unsigned int)v2 < v5 ) + return *v2; + goto LABEL_10; + } + v2 = *(unsigned __int8 **)(a1 + 8); + if ( *(_BYTE *)(a1 + 84) ) + goto LABEL_9; +LABEL_4: + if ( (unsigned int)v2 < *(_DWORD *)(a1 + 12) ) + return *v2; +LABEL_10: + v7 = 2; + if ( *(_DWORD *)(a1 + 68) >= 2u ) + v7 = *(_DWORD *)(a1 + 68); + v8 = *(_DWORD *)(a1 + 88); + v37 = v7 - 1; + if ( !v8 ) + std::__throw_bad_cast(); + if ( !(*(unsigned __int8 (__fastcall **)(int))(*(_DWORD *)v8 + 24))(v8) ) + { + v9 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 88) + 20))(*(_DWORD *)(a1 + 88)); + if ( v9 <= 0 ) + { + v26 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 88) + 32))(*(_DWORD *)(a1 + 88)); + v11 = v7 - 1; + v10 = v7 + v26 - 2; + } + else + { + v10 = v37 * v9; + v11 = v37 * v9; + } + v12 = *(const void **)(a1 + 100); + v13 = *(_DWORD *)(a1 + 104) - (_DWORD)v12; + v14 = v11 - v13; + if ( v11 <= v13 ) + v14 = 0; + v15 = *(_DWORD *)(a1 + 96); + if ( *(_BYTE *)(a1 + 73) && *(_DWORD *)(a1 + 4) == *(_DWORD *)(a1 + 12) ) + { + if ( !v13 ) + { + if ( v10 <= v15 ) + { + v16 = *(char **)(a1 + 92); + goto LABEL_22; + } + v42 = v14; + v36 = (char *)operator new[](v10); + v14 = v42; + v16 = v36; +LABEL_61: + if ( *(_DWORD *)(a1 + 92) ) + { + v39 = v14; + operator delete[](*(void **)(a1 + 92)); + v14 = v39; + } + *(_DWORD *)(a1 + 92) = v16; + *(_DWORD *)(a1 + 96) = v10; +LABEL_22: + v17 = *(_DWORD *)(a1 + 56); + v18 = &v16[v13]; + *(_DWORD *)(a1 + 100) = v16; + *(_DWORD *)(a1 + 104) = &v16[v13]; + *(_DWORD *)(a1 + 60) = v17; + if ( v14 ) + { + v20 = 0; + goto LABEL_30; + } + v19 = *(void **)(a1 + 4); + v20 = 0; + v43 = v19; + if ( v18 <= v16 ) + { + while ( 1 ) + { +LABEL_29: + v18 = *(char **)(a1 + 104); + v14 = 1; + v13 = (signed int)&v18[-*(_DWORD *)(a1 + 92)]; +LABEL_30: + if ( (signed int)(v14 + v13) > *(_DWORD *)(a1 + 96) ) + std::__throw_ios_failure("basic_filebuf::underflow codecvt::max_length() is not valid"); + v24 = std::__basic_file::xsgetn((FILE **)(a1 + 40), v18, v14); + if ( v24 ) + { + if ( v24 == -1 ) + goto LABEL_49; + v21 = 0; + } + else + { + v21 = 1; + } + v19 = *(void **)(a1 + 4); + v16 = *(char **)(a1 + 100); + v18 = (char *)(*(_DWORD *)(a1 + 104) + v24); + *(_DWORD *)(a1 + 104) = v18; + v43 = v19; + if ( v18 > v16 ) + break; + if ( v20 == 3 ) + goto LABEL_41; + if ( v21 ) + goto LABEL_37; + } + } + else + { + v21 = 0; + } + v20 = (*(int (__thiscall **)(_DWORD, int, char *, char *, int, void *, unsigned int, void **))(**(_DWORD **)(a1 + 88) + 16))( + *(_DWORD *)(a1 + 88), + a1 + 56, + v16, + v18, + a1 + 100, + v19, + (unsigned int)v19 + v37, + &v43); + if ( v20 != 3 ) + { + v22 = (int)v43 - *(_DWORD *)(a1 + 4); + if ( v20 != 2 ) + { + v23 = v21 | (v43 != *(void **)(a1 + 4)); + goto LABEL_28; + } + if ( (int)v43 - *(_DWORD *)(a1 + 4) <= 0 ) + { + if ( !v21 ) + std::__throw_ios_failure("basic_filebuf::underflow invalid byte sequence in file"); + goto LABEL_57; + } + goto LABEL_51; + } + v18 = *(char **)(a1 + 104); + v19 = *(void **)(a1 + 4); +LABEL_41: + Src = *(_BYTE **)(a1 + 92); + v28 = v18 - Src; + v22 = v28; + Size = v28; + if ( v37 < v28 ) + { + Size = v37; + v22 = v37; + } + else if ( !v28 ) + { +LABEL_43: + *(_DWORD *)(a1 + 100) = Src; + v20 = 3; + v23 = v21 | (v22 != 0); +LABEL_28: + if ( !v23 ) + goto LABEL_29; + if ( v22 > 0 ) + goto LABEL_51; + if ( v21 ) + { +LABEL_37: + v25 = *(_DWORD *)(a1 + 64); + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 4) = v25; + *(_DWORD *)(a1 + 8) = v25; + *(_DWORD *)(a1 + 12) = v25; + *(_DWORD *)(a1 + 24) = 0; + *(_BYTE *)(a1 + 73) = 0; + if ( v20 == 1 ) + std::__throw_ios_failure("basic_filebuf::underflow incomplete character in file"); + return -1; + } +LABEL_49: + v31 = __errno(); + std::__throw_ios_failure( + (std::__ios_failure *)"basic_filebuf::underflow error reading the file", + (std::runtime_error *)*v31); + } + memcpy(v19, Src, Size); + Src = (_BYTE *)(*(_DWORD *)(a1 + 92) + Size); + goto LABEL_43; + } + if ( v10 <= v15 ) + { + v16 = *(char **)(a1 + 92); + v14 = 0; +LABEL_68: + v40 = v14; + memmove(v16, v12, v13); + v16 = *(char **)(a1 + 92); + v14 = v40; + goto LABEL_22; + } + v35 = (char *)operator new[](v10); + v14 = 0; + v16 = v35; + } + else + { + if ( v10 <= v15 ) + { + v16 = *(char **)(a1 + 92); + if ( !v13 ) + goto LABEL_22; + goto LABEL_68; + } + v38 = v14; + v34 = (char *)operator new[](v10); + v14 = v38; + v16 = v34; + if ( !v13 ) + goto LABEL_61; + } + v41 = v14; + memcpy(v16, *(const void **)(a1 + 100), v13); + v14 = v41; + goto LABEL_61; + } + v30 = std::__basic_file::xsgetn((FILE **)(a1 + 40), *(void **)(a1 + 4), v37); + v22 = v30; + if ( !v30 ) + { +LABEL_57: + v33 = *(_DWORD *)(a1 + 64); + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 4) = v33; + *(_DWORD *)(a1 + 8) = v33; + *(_DWORD *)(a1 + 12) = v33; + *(_DWORD *)(a1 + 24) = 0; + *(_BYTE *)(a1 + 73) = 0; + return -1; + } + if ( v30 <= 0 ) + goto LABEL_49; +LABEL_51: + v32 = *(unsigned __int8 **)(a1 + 64); + v4 = (*(_BYTE *)(a1 + 48) & 8) == 0; + *(_DWORD *)(a1 + 4) = v32; + *(_DWORD *)(a1 + 8) = v32; + if ( v4 ) + *(_DWORD *)(a1 + 12) = v32; + else + *(_DWORD *)(a1 + 12) = &v32[v22]; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 24) = 0; + *(_BYTE *)(a1 + 73) = 1; + return *v32; +} + +//----- (004B4330) -------------------------------------------------------- +int __thiscall std::filebuf::basic_filebuf(int this, std::locale *a2) +{ + int v3; // eax + int v4; // edx + int v5; // edi + int v6; // ecx + int v7; // eax + int result; // eax + int v9; // edi + int v10; // edx + int v11; // edx + int v12; // edx + int v13; // edx + int v14; // edx + int v15; // edx + int v16; // edx + const std::locale *v17; // [esp+4h] [ebp-18h] + + std::streambuf::basic_streambuf((_DWORD *)this, a2, v17); + v3 = *((_DWORD *)a2 + 10); + v4 = *((_DWORD *)a2 + 17); + *(_DWORD *)this = off_51AA50; + v5 = *((_DWORD *)a2 + 14); + v6 = *((_DWORD *)a2 + 16); + *(_DWORD *)(this + 32) = 0; + *(_DWORD *)(this + 40) = v3; + LOBYTE(v3) = *((_BYTE *)a2 + 44); + *(_DWORD *)(this + 36) = 0; + *(_BYTE *)(this + 44) = v3; + v7 = *((_DWORD *)a2 + 12); + *((_DWORD *)a2 + 10) = 0; + *((_BYTE *)a2 + 44) = 0; + *(_DWORD *)(this + 68) = v4; + LOWORD(v4) = *((_WORD *)a2 + 36); + *(_DWORD *)(this + 48) = v7; + result = *((_DWORD *)a2 + 13); + *(_WORD *)(this + 72) = v4; + LOBYTE(v4) = *((_BYTE *)a2 + 74); + *(_DWORD *)(this + 56) = v5; + v9 = *((_DWORD *)a2 + 15); + *(_BYTE *)(this + 74) = v4; + LOBYTE(v4) = *((_BYTE *)a2 + 75); + *(_DWORD *)(this + 64) = v6; + *(_DWORD *)(this + 60) = v9; + *((_DWORD *)a2 + 12) = 0; + *(_DWORD *)(this + 52) = result; + *((_DWORD *)a2 + 16) = 0; + *((_DWORD *)a2 + 17) = 1; + *((_WORD *)a2 + 36) = 0; + *((_BYTE *)a2 + 74) = 0; + *(_BYTE *)(this + 75) = v4; + v10 = *((_DWORD *)a2 + 19); + *((_DWORD *)a2 + 19) = 0; + *(_DWORD *)(this + 76) = v10; + v11 = *((_DWORD *)a2 + 20); + *((_DWORD *)a2 + 1) = 0; + *(_DWORD *)(this + 80) = v11; + LOBYTE(v11) = *((_BYTE *)a2 + 84); + *((_DWORD *)a2 + 20) = 0; + *(_BYTE *)(this + 84) = v11; + v12 = *((_DWORD *)a2 + 22); + *((_BYTE *)a2 + 84) = 0; + *(_DWORD *)(this + 88) = v12; + v13 = *((_DWORD *)a2 + 23); + *((_DWORD *)a2 + 2) = 0; + *(_DWORD *)(this + 92) = v13; + v14 = *((_DWORD *)a2 + 24); + *((_DWORD *)a2 + 23) = 0; + *(_DWORD *)(this + 96) = v14; + v15 = *((_DWORD *)a2 + 25); + *((_DWORD *)a2 + 24) = 0; + *(_DWORD *)(this + 100) = v15; + v16 = *((_DWORD *)a2 + 26); + *((_DWORD *)a2 + 25) = 0; + *(_DWORD *)(this + 104) = v16; + *((_DWORD *)a2 + 26) = 0; + *((_DWORD *)a2 + 3) = 0; + *((_DWORD *)a2 + 5) = 0; + *((_DWORD *)a2 + 4) = 0; + *((_DWORD *)a2 + 6) = 0; + *((_DWORD *)a2 + 14) = result; + *((_DWORD *)a2 + 15) = result; + return result; +} +// 4B433F: variable 'v17' is possibly undefined +// 51AA50: using guessed type int (*off_51AA50[2])(); + +//----- (004B4470) -------------------------------------------------------- +void __fastcall std::filebuf::basic_filebuf(int a1) +{ + int v2; // [esp+20h] [ebp-4Ch] + + *(_DWORD *)a1 = &off_51ADD4; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 8) = 0; + *(_DWORD *)(a1 + 12) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 24) = 0; + v2 = a1 + 28; + std::locale::locale((_DWORD *)(a1 + 28)); + *(_DWORD *)a1 = off_51AA50; + *(_DWORD *)(a1 + 32) = 0; + *(_DWORD *)(a1 + 36) = 0; + std::__basic_file::__basic_file((_BYTE *)(a1 + 40), a1 + 32); + *(_DWORD *)(a1 + 48) = 0; + *(_DWORD *)(a1 + 52) = 0; + *(_DWORD *)(a1 + 56) = 0; + *(_DWORD *)(a1 + 60) = 0; + *(_DWORD *)(a1 + 64) = 0; + *(_DWORD *)(a1 + 68) = 512; + *(_DWORD *)(a1 + 72) = 0; + *(_DWORD *)(a1 + 76) = 0; + *(_DWORD *)(a1 + 80) = 0; + *(_BYTE *)(a1 + 84) = 0; + *(_DWORD *)(a1 + 88) = 0; + *(_DWORD *)(a1 + 92) = 0; + *(_DWORD *)(a1 + 96) = 0; + *(_DWORD *)(a1 + 100) = 0; + *(_DWORD *)(a1 + 104) = 0; + if ( (unsigned __int8)std::has_facet>(v2) ) + *(_DWORD *)(a1 + 88) = std::use_facet>(v2); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004B4600) -------------------------------------------------------- +int __thiscall std::filebuf::basic_filebuf(int this, std::locale *a2) +{ + int v3; // eax + int v4; // edx + int v5; // edi + int v6; // ecx + int v7; // eax + int result; // eax + int v9; // edi + int v10; // edx + int v11; // edx + int v12; // edx + int v13; // edx + int v14; // edx + int v15; // edx + int v16; // edx + const std::locale *v17; // [esp+4h] [ebp-18h] + + std::streambuf::basic_streambuf((_DWORD *)this, a2, v17); + v3 = *((_DWORD *)a2 + 10); + v4 = *((_DWORD *)a2 + 17); + *(_DWORD *)this = off_51AA50; + v5 = *((_DWORD *)a2 + 14); + v6 = *((_DWORD *)a2 + 16); + *(_DWORD *)(this + 32) = 0; + *(_DWORD *)(this + 40) = v3; + LOBYTE(v3) = *((_BYTE *)a2 + 44); + *(_DWORD *)(this + 36) = 0; + *(_BYTE *)(this + 44) = v3; + v7 = *((_DWORD *)a2 + 12); + *((_DWORD *)a2 + 10) = 0; + *((_BYTE *)a2 + 44) = 0; + *(_DWORD *)(this + 68) = v4; + LOWORD(v4) = *((_WORD *)a2 + 36); + *(_DWORD *)(this + 48) = v7; + result = *((_DWORD *)a2 + 13); + *(_WORD *)(this + 72) = v4; + LOBYTE(v4) = *((_BYTE *)a2 + 74); + *(_DWORD *)(this + 56) = v5; + v9 = *((_DWORD *)a2 + 15); + *(_BYTE *)(this + 74) = v4; + LOBYTE(v4) = *((_BYTE *)a2 + 75); + *(_DWORD *)(this + 64) = v6; + *(_DWORD *)(this + 60) = v9; + *((_DWORD *)a2 + 12) = 0; + *(_DWORD *)(this + 52) = result; + *((_DWORD *)a2 + 16) = 0; + *((_DWORD *)a2 + 17) = 1; + *((_WORD *)a2 + 36) = 0; + *((_BYTE *)a2 + 74) = 0; + *(_BYTE *)(this + 75) = v4; + v10 = *((_DWORD *)a2 + 19); + *((_DWORD *)a2 + 19) = 0; + *(_DWORD *)(this + 76) = v10; + v11 = *((_DWORD *)a2 + 20); + *((_DWORD *)a2 + 1) = 0; + *(_DWORD *)(this + 80) = v11; + LOBYTE(v11) = *((_BYTE *)a2 + 84); + *((_DWORD *)a2 + 20) = 0; + *(_BYTE *)(this + 84) = v11; + v12 = *((_DWORD *)a2 + 22); + *((_BYTE *)a2 + 84) = 0; + *(_DWORD *)(this + 88) = v12; + v13 = *((_DWORD *)a2 + 23); + *((_DWORD *)a2 + 2) = 0; + *(_DWORD *)(this + 92) = v13; + v14 = *((_DWORD *)a2 + 24); + *((_DWORD *)a2 + 23) = 0; + *(_DWORD *)(this + 96) = v14; + v15 = *((_DWORD *)a2 + 25); + *((_DWORD *)a2 + 24) = 0; + *(_DWORD *)(this + 100) = v15; + v16 = *((_DWORD *)a2 + 26); + *((_DWORD *)a2 + 25) = 0; + *(_DWORD *)(this + 104) = v16; + *((_DWORD *)a2 + 26) = 0; + *((_DWORD *)a2 + 3) = 0; + *((_DWORD *)a2 + 5) = 0; + *((_DWORD *)a2 + 4) = 0; + *((_DWORD *)a2 + 6) = 0; + *((_DWORD *)a2 + 14) = result; + *((_DWORD *)a2 + 15) = result; + return result; +} +// 4B460F: variable 'v17' is possibly undefined +// 51AA50: using guessed type int (*off_51AA50[2])(); + +//----- (004B4740) -------------------------------------------------------- +void __fastcall std::filebuf::basic_filebuf(int a1) +{ + int v2; // [esp+20h] [ebp-4Ch] + + *(_DWORD *)a1 = &off_51ADD4; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 8) = 0; + *(_DWORD *)(a1 + 12) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 24) = 0; + v2 = a1 + 28; + std::locale::locale((_DWORD *)(a1 + 28)); + *(_DWORD *)a1 = off_51AA50; + *(_DWORD *)(a1 + 32) = 0; + *(_DWORD *)(a1 + 36) = 0; + std::__basic_file::__basic_file((_BYTE *)(a1 + 40), a1 + 32); + *(_DWORD *)(a1 + 48) = 0; + *(_DWORD *)(a1 + 52) = 0; + *(_DWORD *)(a1 + 56) = 0; + *(_DWORD *)(a1 + 60) = 0; + *(_DWORD *)(a1 + 64) = 0; + *(_DWORD *)(a1 + 68) = 512; + *(_DWORD *)(a1 + 72) = 0; + *(_DWORD *)(a1 + 76) = 0; + *(_DWORD *)(a1 + 80) = 0; + *(_BYTE *)(a1 + 84) = 0; + *(_DWORD *)(a1 + 88) = 0; + *(_DWORD *)(a1 + 92) = 0; + *(_DWORD *)(a1 + 96) = 0; + *(_DWORD *)(a1 + 100) = 0; + *(_DWORD *)(a1 + 104) = 0; + if ( (unsigned __int8)std::has_facet>(v2) ) + *(_DWORD *)(a1 + 88) = std::use_facet>(v2); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004B48D0) -------------------------------------------------------- +void __fastcall std::filebuf::~filebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA50; + std::filebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51ADD4; + std::locale::~locale((_DWORD **)a1 + 7); + operator delete(a1); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004B4980) -------------------------------------------------------- +void __fastcall std::filebuf::~filebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA50; + std::filebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51ADD4; + std::locale::~locale((_DWORD **)a1 + 7); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004B4A20) -------------------------------------------------------- +void __fastcall std::filebuf::~filebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA50; + std::filebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51ADD4; + std::locale::~locale((_DWORD **)a1 + 7); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004B4AC0) -------------------------------------------------------- +int __thiscall std::filebuf::operator=(int this, int a2) +{ + int v3; // eax + char v4; // dl + int v5; // eax + int v6; // eax + int v7; // eax + int v8; // eax + int v9; // eax + int v10; // eax + int v11; // eax + int v12; // eax + int v13; // eax + int v14; // eax + int v15; // eax + int result; // eax + + std::filebuf::close((struct _Unwind_Exception *)this); + std::streambuf::operator=((volatile signed __int32 **)this, a2); + v3 = *(_DWORD *)(this + 40); + *(_DWORD *)(this + 40) = *(_DWORD *)(a2 + 40); + v4 = *(_BYTE *)(a2 + 44); + *(_DWORD *)(a2 + 40) = v3; + LOBYTE(v3) = *(_BYTE *)(this + 44); + *(_BYTE *)(this + 44) = v4; + *(_BYTE *)(a2 + 44) = v3; + v5 = *(_DWORD *)(a2 + 48); + *(_DWORD *)(a2 + 48) = 0; + *(_DWORD *)(this + 48) = v5; + *(_DWORD *)(this + 52) = *(_DWORD *)(a2 + 52); + *(_DWORD *)(this + 56) = *(_DWORD *)(a2 + 56); + *(_DWORD *)(this + 60) = *(_DWORD *)(a2 + 60); + v6 = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 64) = 0; + *(_DWORD *)(this + 64) = v6; + v7 = *(_DWORD *)(a2 + 68); + *(_DWORD *)(a2 + 68) = 1; + *(_DWORD *)(this + 68) = v7; + LOBYTE(v7) = *(_BYTE *)(a2 + 72); + *(_BYTE *)(a2 + 72) = 0; + *(_BYTE *)(this + 72) = v7; + v8 = *(_DWORD *)(a2 + 92); + *(_DWORD *)(a2 + 92) = 0; + *(_DWORD *)(this + 92) = v8; + v9 = *(_DWORD *)(a2 + 96); + *(_DWORD *)(a2 + 96) = 0; + *(_DWORD *)(this + 96) = v9; + v10 = *(_DWORD *)(a2 + 100); + *(_DWORD *)(a2 + 100) = 0; + *(_DWORD *)(this + 100) = v10; + v11 = *(_DWORD *)(a2 + 104); + *(_DWORD *)(a2 + 104) = 0; + *(_DWORD *)(this + 104) = v11; + LOBYTE(v11) = *(_BYTE *)(a2 + 73); + *(_BYTE *)(a2 + 73) = 0; + *(_BYTE *)(this + 73) = v11; + LOBYTE(v11) = *(_BYTE *)(a2 + 74); + *(_BYTE *)(a2 + 74) = 0; + *(_BYTE *)(this + 74) = v11; + v12 = *(_DWORD *)(a2 + 76); + *(_DWORD *)(a2 + 76) = 0; + *(_DWORD *)(this + 76) = v12; + v13 = *(_DWORD *)(a2 + 80); + *(_DWORD *)(a2 + 80) = 0; + *(_DWORD *)(this + 80) = v13; + LOBYTE(v13) = *(_BYTE *)(a2 + 84); + *(_BYTE *)(a2 + 84) = 0; + *(_BYTE *)(this + 84) = v13; + v14 = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 20) = 0; + *(_DWORD *)(a2 + 4) = v14; + *(_DWORD *)(a2 + 8) = v14; + *(_DWORD *)(a2 + 12) = v14; + v15 = *(_DWORD *)(a2 + 52); + *(_DWORD *)(a2 + 16) = 0; + *(_DWORD *)(a2 + 56) = v15; + *(_DWORD *)(a2 + 60) = v15; + result = this; + *(_DWORD *)(a2 + 24) = 0; + return result; +} + +//----- (004B4BE0) -------------------------------------------------------- +unsigned int __thiscall std::wfilebuf::_M_set_buffer(_DWORD *this, int a2) +{ + int v2; // eax + bool v3; // bl + int v4; // edx + unsigned int result; // eax + + v2 = this[12]; + v3 = (v2 & 8) != 0; + if ( (v2 & 0x10) != 0 ) + LOBYTE(v2) = 1; + v4 = this[16]; + result = v2 & 1; + this[1] = v4; + this[2] = v4; + if ( a2 > 0 && v3 ) + { + result = v4 + 2 * a2; + this[3] = result; +LABEL_6: + this[5] = 0; + this[4] = 0; + this[6] = 0; + return result; + } + this[3] = v4; + if ( a2 ) + goto LABEL_6; + if ( !(_BYTE)result ) + goto LABEL_6; + result = this[17]; + if ( result <= 1 ) + goto LABEL_6; + result = v4 + 2 * result - 2; + this[5] = v4; + this[4] = v4; + this[6] = result; + return result; +} + +//----- (004B4C60) -------------------------------------------------------- +int __thiscall std::wfilebuf::_M_get_ext_pos(int this, int a2) +{ + if ( (*(unsigned __int8 (__fastcall **)(_DWORD))(**(_DWORD **)(this + 92) + 24))(*(_DWORD *)(this + 92)) ) + return (*(_DWORD *)(this + 8) - *(_DWORD *)(this + 12)) >> 1; + else + return *(_DWORD *)(this + 96) + + (*(int (__thiscall **)(_DWORD, int, _DWORD, _DWORD, int))(**(_DWORD **)(this + 92) + 28))( + *(_DWORD *)(this + 92), + a2, + *(_DWORD *)(this + 96), + *(_DWORD *)(this + 104), + (*(_DWORD *)(this + 8) - *(_DWORD *)(this + 4)) >> 1) + - *(_DWORD *)(this + 108); +} + +//----- (004B4CD0) -------------------------------------------------------- +int __fastcall std::wfilebuf::_M_create_pback(int a1) +{ + int v1; // eax + int result; // eax + + if ( !*(_BYTE *)(a1 + 88) ) + { + v1 = *(_DWORD *)(a1 + 8); + *(_BYTE *)(a1 + 88) = 1; + *(_DWORD *)(a1 + 80) = v1; + *(_DWORD *)(a1 + 84) = *(_DWORD *)(a1 + 12); + *(_DWORD *)(a1 + 4) = a1 + 76; + *(_DWORD *)(a1 + 8) = a1 + 76; + result = a1 + 78; + *(_DWORD *)(a1 + 12) = a1 + 78; + } + return result; +} + +//----- (004B4D00) -------------------------------------------------------- +int __fastcall std::wfilebuf::_M_destroy_pback(int a1) +{ + bool v1; // zf + int v2; // eax + int v3; // ebx + int result; // eax + int v5; // edx + + if ( *(_BYTE *)(a1 + 88) ) + { + v1 = *(_DWORD *)(a1 + 8) == *(_DWORD *)(a1 + 4); + v2 = *(_DWORD *)(a1 + 80); + v3 = *(_DWORD *)(a1 + 64); + *(_BYTE *)(a1 + 88) = 0; + result = v2 + 2 * !v1; + v5 = *(_DWORD *)(a1 + 84); + *(_DWORD *)(a1 + 4) = v3; + *(_DWORD *)(a1 + 80) = result; + *(_DWORD *)(a1 + 8) = result; + *(_DWORD *)(a1 + 12) = v5; + } + return result; +} + +//----- (004B4D40) -------------------------------------------------------- +int __fastcall std::wfilebuf::_M_terminate_output(int a1) +{ + int v1; // esi + int v3; // eax + int v4; // ecx + int v5; // eax + int v6; // ebx + _DWORD **v7; // ebp + unsigned int v8; // eax + unsigned int v9; // esi + unsigned __int8 v11; // [esp+2Bh] [ebp-B5h] + FILE **v12; // [esp+2Ch] [ebp-B4h] + int v13; // [esp+30h] [ebp-B0h] + int v14; // [esp+40h] [ebp-A0h] BYREF + char v15[128]; // [esp+44h] [ebp-9Ch] BYREF + char v16[28]; // [esp+C4h] [ebp-1Ch] BYREF + + v1 = 1; + if ( *(_DWORD *)(a1 + 16) < *(_DWORD *)(a1 + 20) ) + { + v3 = (*(int (__thiscall **)(int, int))(*(_DWORD *)a1 + 52))(a1, 0xFFFF); + LOBYTE(v3) = (_WORD)v3 != 0xFFFF; + v1 = v3; + } + if ( *(_BYTE *)(a1 + 74) ) + { + v4 = *(_DWORD *)(a1 + 92); + if ( !v4 ) + std::__throw_bad_cast(); + v11 = (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 24))(v4); + if ( !v11 ) + { + if ( (_BYTE)v1 ) + { + v12 = (FILE **)(a1 + 40); + v5 = a1; + v6 = a1 + 56; + v7 = (_DWORD **)v5; + while ( 1 ) + { + v8 = (*(int (__thiscall **)(_DWORD *, int, char *, char *, int *))(*v7[23] + 12))(v7[23], v6, v15, v16, &v14); + v9 = v8; + if ( v8 == 2 ) + break; + if ( v8 <= 1 && v14 - (int)v15 > 0 ) + { + v13 = v14 - (_DWORD)v15; + if ( v13 != std::__basic_file::xsputn(v12, v15, v14 - (_DWORD)v15) ) + return v11; + if ( v9 == 1 ) + continue; + } + return ((unsigned __int16 (__thiscall *)(_DWORD **, int))(*v7)[13])(v7, 0xFFFF) != 0xFFFF; + } + return v11; + } + } + } + return v1; +} +// 4B4D40: using guessed type char var_1C[28]; + +//----- (004B4E50) -------------------------------------------------------- +bool __thiscall std::wfilebuf::_M_convert_to_external(int this, char *a2, unsigned int a3) +{ + int v4; // ecx + unsigned int v5; // esi + int v6; // eax + void *v7; // esp + void *v8; // esp + unsigned int v9; // eax + unsigned int v10; // eax + int v12; // esi + char v13; // [esp+20h] [ebp-38h] + int v14; // [esp+38h] [ebp-20h] BYREF + int v15; // [esp+3Ch] [ebp-1Ch] BYREF + char v16[24]; // [esp+40h] [ebp-18h] BYREF + + v4 = *(_DWORD *)(this + 92); + v5 = a3; + if ( !v4 ) + std::__throw_bad_cast(); + if ( (*(unsigned __int8 (__fastcall **)(int))(*(_DWORD *)v4 + 24))(v4) ) + goto LABEL_5; + v6 = 16 * ((a3 * (*(int (__thiscall **)(_DWORD))(**(_DWORD **)(this + 92) + 32))(*(_DWORD *)(this + 92)) + 27) >> 4); + v7 = alloca(v6); + v8 = alloca(v6); + v9 = (*(int (__thiscall **)(_DWORD, int, char *, char *))(**(_DWORD **)(this + 92) + 8))( + *(_DWORD *)(this + 92), + this + 56, + a2, + &a2[2 * a3]); + if ( v9 > 1 ) + { + if ( v9 == 3 ) + { +LABEL_5: + v10 = std::__basic_file::xsputn((FILE **)(this + 40), a2, a3); + return v10 == v5; + } +LABEL_11: + std::__throw_ios_failure("basic_filebuf::_M_convert_to_external conversion error"); + } + v13 = v9; + v5 = v14 - (_DWORD)v16; + v10 = std::__basic_file::xsputn((FILE **)(this + 40), v16, v14 - (_DWORD)v16); + if ( v14 - (_DWORD)v16 != v10 || (v13 & 1) == 0 ) + return v10 == v5; + if ( (*(int (__thiscall **)(_DWORD, int *, int, _DWORD, int *, char *, int, int *))(**(_DWORD **)(this + 92) + 8))( + *(_DWORD *)(this + 92), + &v15, + v15, + *(_DWORD *)(this + 20), + &v15, + v16, + v14, + &v14) == 2 ) + goto LABEL_11; + v12 = v14 - (_DWORD)v16; + return std::__basic_file::xsputn((FILE **)(this + 40), v16, v14 - (_DWORD)v16) == v12; +} + +//----- (004B4FC0) -------------------------------------------------------- +void __fastcall std::wfilebuf::_M_destroy_internal_buffer(int a1) +{ + if ( *(_BYTE *)(a1 + 72) ) + { + if ( *(_DWORD *)(a1 + 64) ) + operator delete[](*(void **)(a1 + 64)); + *(_DWORD *)(a1 + 64) = 0; + *(_BYTE *)(a1 + 72) = 0; + } + if ( *(_DWORD *)(a1 + 96) ) + operator delete[](*(void **)(a1 + 96)); + *(_DWORD *)(a1 + 96) = 0; + *(_DWORD *)(a1 + 100) = 0; + *(_DWORD *)(a1 + 104) = 0; + *(_DWORD *)(a1 + 108) = 0; +} + +//----- (004B5020) -------------------------------------------------------- +void __fastcall std::wfilebuf::_M_allocate_internal_buffer(int a1) +{ + unsigned int v1; // eax + + if ( !*(_BYTE *)(a1 + 72) && !*(_DWORD *)(a1 + 64) ) + { + v1 = *(_DWORD *)(a1 + 68); + if ( v1 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + *(_DWORD *)(a1 + 64) = operator new[](2 * v1); + *(_BYTE *)(a1 + 72) = 1; + } +} + +//----- (004B5060) -------------------------------------------------------- +_DWORD *__thiscall std::wfilebuf::open(_DWORD *this, char *a2, int a3) +{ + _BYTE *v3; // esi + int v5; // eax + int v6; // eax + unsigned int v8; // eax + _DWORD v9[7]; // [esp+20h] [ebp-1Ch] BYREF + + v3 = this + 10; + if ( !std::__basic_file::is_open(this + 10) ) + { + std::__basic_file::open(v3, a2, a3, 436); + if ( std::__basic_file::is_open(v3) ) + { + v5 = this[16]; + if ( !*((_BYTE *)this + 72) && !v5 ) + { + v8 = this[17]; + if ( v8 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v5 = operator new[](2 * v8); + *((_BYTE *)this + 72) = 1; + this[16] = v5; + } + this[1] = v5; + this[2] = v5; + this[3] = v5; + v6 = this[13]; + this[12] = a3; + *(_WORD *)((char *)this + 73) = 0; + this[5] = 0; + this[4] = 0; + this[6] = 0; + this[14] = v6; + this[15] = v6; + if ( (a3 & 2) == 0 ) + return this; + (*(void (__thiscall **)(_DWORD *, _DWORD *, _DWORD, _DWORD, int, int))(*this + 16))(v9, this, 0, 0, 2, a3); + if ( (v9[0] & v9[1]) != -1 ) + return this; + std::wfilebuf::close((struct _Unwind_Exception *)this); + } + } + return 0; +} + +//----- (004B5180) -------------------------------------------------------- +_DWORD *__thiscall std::wfilebuf::open(_DWORD *this, wchar_t *a2, int a3) +{ + _BYTE *v3; // esi + int v5; // eax + int v6; // eax + unsigned int v8; // eax + _DWORD v9[7]; // [esp+20h] [ebp-1Ch] BYREF + + v3 = this + 10; + if ( !std::__basic_file::is_open(this + 10) ) + { + std::__basic_file::open(v3, a2, a3); + if ( std::__basic_file::is_open(v3) ) + { + v5 = this[16]; + if ( !*((_BYTE *)this + 72) && !v5 ) + { + v8 = this[17]; + if ( v8 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v5 = operator new[](2 * v8); + *((_BYTE *)this + 72) = 1; + this[16] = v5; + } + this[1] = v5; + this[2] = v5; + this[3] = v5; + v6 = this[13]; + this[12] = a3; + *(_WORD *)((char *)this + 73) = 0; + this[5] = 0; + this[4] = 0; + this[6] = 0; + this[14] = v6; + this[15] = v6; + if ( (a3 & 2) == 0 ) + return this; + (*(void (__thiscall **)(_DWORD *, _DWORD *, _DWORD, _DWORD, int, int))(*this + 16))(v9, this, 0, 0, 2, a3); + if ( (v9[0] & v9[1]) != -1 ) + return this; + std::wfilebuf::close((struct _Unwind_Exception *)this); + } + } + return 0; +} + +//----- (004B5290) -------------------------------------------------------- +_DWORD *__thiscall std::wfilebuf::open(_DWORD *this, char *a2, int a3) +{ + return std::wfilebuf::open(this, *(char **)a2, a3); +} + +//----- (004B52A0) -------------------------------------------------------- +int __thiscall std::wfilebuf::swap(int this, int a2) +{ + int v3; // eax + int v4; // edx + int v5; // eax + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // edx + int v11; // eax + int v12; // edx + int v13; // eax + int v14; // eax + char v15; // dl + int v16; // edx + int v17; // eax + int v18; // edx + int v19; // eax + int v20; // edx + int v21; // eax + int v22; // edx + int v23; // eax + int v24; // edx + int v25; // eax + int v26; // edx + int v27; // eax + int v28; // edx + int v29; // eax + int v30; // edx + int v31; // eax + int v32; // edx + int v33; // eax + int v34; // edx + int v35; // eax + int v36; // edx + int v37; // eax + int v38; // eax + int result; // eax + const std::locale *v40; // [esp+4h] [ebp-48h] + volatile signed __int32 **v41; // [esp+1Ch] [ebp-30h] + _DWORD *v42[8]; // [esp+2Ch] [ebp-20h] BYREF + + v3 = *(_DWORD *)(this + 4); + *(_DWORD *)(this + 4) = *(_DWORD *)(a2 + 4); + v4 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a2 + 4) = v3; + v5 = *(_DWORD *)(this + 8); + *(_DWORD *)(this + 8) = v4; + v6 = *(_DWORD *)(a2 + 12); + *(_DWORD *)(a2 + 8) = v5; + v7 = *(_DWORD *)(this + 12); + *(_DWORD *)(this + 12) = v6; + v8 = *(_DWORD *)(a2 + 16); + *(_DWORD *)(a2 + 12) = v7; + v9 = *(_DWORD *)(this + 16); + *(_DWORD *)(this + 16) = v8; + v10 = *(_DWORD *)(a2 + 20); + *(_DWORD *)(a2 + 16) = v9; + v11 = *(_DWORD *)(this + 20); + *(_DWORD *)(this + 20) = v10; + v12 = *(_DWORD *)(a2 + 24); + *(_DWORD *)(a2 + 20) = v11; + v13 = *(_DWORD *)(this + 24); + *(_DWORD *)(this + 24) = v12; + *(_DWORD *)(a2 + 24) = v13; + v41 = (volatile signed __int32 **)(this + 28); + std::locale::locale((volatile signed __int32 **)v42, (volatile signed __int32 **)(this + 28), v40); + std::locale::operator=(v41, (volatile signed __int32 **)(a2 + 28)); + std::locale::operator=((volatile signed __int32 **)(a2 + 28), (volatile signed __int32 **)v42); + std::locale::~locale(v42); + v14 = *(_DWORD *)(this + 40); + *(_DWORD *)(this + 40) = *(_DWORD *)(a2 + 40); + v15 = *(_BYTE *)(a2 + 44); + *(_DWORD *)(a2 + 40) = v14; + LOBYTE(v14) = *(_BYTE *)(this + 44); + *(_BYTE *)(this + 44) = v15; + v16 = *(_DWORD *)(a2 + 48); + *(_BYTE *)(a2 + 44) = v14; + v17 = *(_DWORD *)(this + 48); + *(_DWORD *)(this + 48) = v16; + v18 = *(_DWORD *)(a2 + 52); + *(_DWORD *)(a2 + 48) = v17; + v19 = *(_DWORD *)(this + 52); + *(_DWORD *)(this + 52) = v18; + v20 = *(_DWORD *)(a2 + 56); + *(_DWORD *)(a2 + 52) = v19; + v21 = *(_DWORD *)(this + 56); + *(_DWORD *)(this + 56) = v20; + v22 = *(_DWORD *)(a2 + 60); + *(_DWORD *)(a2 + 56) = v21; + v23 = *(_DWORD *)(this + 60); + *(_DWORD *)(this + 60) = v22; + v24 = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 60) = v23; + v25 = *(_DWORD *)(this + 64); + *(_DWORD *)(this + 64) = v24; + v26 = *(_DWORD *)(a2 + 68); + *(_DWORD *)(a2 + 64) = v25; + v27 = *(_DWORD *)(this + 68); + *(_DWORD *)(this + 68) = v26; + *(_DWORD *)(a2 + 68) = v27; + LOBYTE(v27) = *(_BYTE *)(this + 72); + *(_BYTE *)(this + 72) = *(_BYTE *)(a2 + 72); + v28 = *(_DWORD *)(a2 + 96); + *(_BYTE *)(a2 + 72) = v27; + v29 = *(_DWORD *)(this + 96); + *(_DWORD *)(this + 96) = v28; + v30 = *(_DWORD *)(a2 + 100); + *(_DWORD *)(a2 + 96) = v29; + v31 = *(_DWORD *)(this + 100); + *(_DWORD *)(this + 100) = v30; + v32 = *(_DWORD *)(a2 + 104); + *(_DWORD *)(a2 + 100) = v31; + v33 = *(_DWORD *)(this + 104); + *(_DWORD *)(this + 104) = v32; + v34 = *(_DWORD *)(a2 + 108); + *(_DWORD *)(a2 + 104) = v33; + v35 = *(_DWORD *)(this + 108); + *(_DWORD *)(this + 108) = v34; + LOBYTE(v34) = *(_BYTE *)(a2 + 73); + *(_DWORD *)(a2 + 108) = v35; + LOBYTE(v35) = *(_BYTE *)(this + 73); + *(_BYTE *)(this + 73) = v34; + LOBYTE(v34) = *(_BYTE *)(a2 + 74); + *(_BYTE *)(a2 + 73) = v35; + LOBYTE(v35) = *(_BYTE *)(this + 74); + *(_BYTE *)(this + 74) = v34; + v36 = *(_DWORD *)(a2 + 80); + *(_BYTE *)(a2 + 74) = v35; + v37 = *(_DWORD *)(this + 80); + *(_DWORD *)(this + 80) = v36; + *(_DWORD *)(a2 + 80) = v37; + v38 = *(_DWORD *)(this + 84); + *(_DWORD *)(this + 84) = *(_DWORD *)(a2 + 84); + LOBYTE(v36) = *(_BYTE *)(a2 + 88); + *(_DWORD *)(a2 + 84) = v38; + result = *(unsigned __int8 *)(this + 88); + *(_BYTE *)(this + 88) = v36; + *(_BYTE *)(a2 + 88) = result; + return result; +} +// 4B5308: variable 'v40' is possibly undefined + +//----- (004B5430) -------------------------------------------------------- +int __fastcall std::wfilebuf::sync(_DWORD *a1) +{ + if ( a1[4] >= a1[5] ) + return 0; + else + return -((*(unsigned __int16 (__thiscall **)(_DWORD *, int))(*a1 + 52))(a1, 0xFFFF) == 0xFFFF); +} + +//----- (004B5470) -------------------------------------------------------- +struct _Unwind_Exception *__fastcall std::wfilebuf::close(struct _Unwind_Exception *a1) +{ + bool v1; // zf + void *v2; // eax + int v3; // edx + int v4; // edx + struct _Unwind_Exception *lpuexcpt; // [esp+1Ch] [ebp-60h] + char *v7; // [esp+24h] [ebp-58h] + char v8; // [esp+2Bh] [ebp-51h] + + lpuexcpt = a1; + v7 = (char *)a1 + 40; + if ( !std::__basic_file::is_open((_DWORD *)a1 + 10) ) + return 0; + v8 = std::wfilebuf::_M_terminate_output((int)lpuexcpt) ^ 1; + v1 = *((_BYTE *)lpuexcpt + 72) == 0; + *((_DWORD *)lpuexcpt + 12) = 0; + *((_BYTE *)lpuexcpt + 88) = 0; + if ( !v1 ) + { + v2 = (void *)*((_DWORD *)lpuexcpt + 16); + if ( v2 ) + operator delete[](v2); + *((_DWORD *)lpuexcpt + 16) = 0; + *((_BYTE *)lpuexcpt + 72) = 0; + } + if ( *((_DWORD *)lpuexcpt + 24) ) + operator delete[](*((void **)lpuexcpt + 24)); + *((_DWORD *)lpuexcpt + 24) = 0; + *((_DWORD *)lpuexcpt + 25) = 0; + *((_DWORD *)lpuexcpt + 26) = 0; + *((_DWORD *)lpuexcpt + 27) = 0; + *(_WORD *)((char *)lpuexcpt + 73) = 0; + v3 = *((_DWORD *)lpuexcpt + 16); + *((_DWORD *)lpuexcpt + 5) = 0; + *((_DWORD *)lpuexcpt + 1) = v3; + *((_DWORD *)lpuexcpt + 2) = v3; + *((_DWORD *)lpuexcpt + 3) = v3; + v4 = *((_DWORD *)lpuexcpt + 13); + *((_DWORD *)lpuexcpt + 4) = 0; + *((_DWORD *)lpuexcpt + 6) = 0; + *((_DWORD *)lpuexcpt + 14) = v4; + *((_DWORD *)lpuexcpt + 15) = v4; + if ( !std::__basic_file::close((int)v7) || v8 ) + return 0; + return lpuexcpt; +} + +//----- (004B5620) -------------------------------------------------------- +char __thiscall std::wfilebuf::imbue(char *this, int a2) +{ + void *v3; // esi + int v4; // eax + int v5; // ecx + int v6; // ecx + int v7; // edi + const void *Src; // eax + int v9; // edi + size_t Size; // edi + int v11; // eax + int v12; // eax + int v14; // [esp+30h] [ebp-1Ch] BYREF + int v15; // [esp+34h] [ebp-18h] + + if ( (unsigned __int8)std::has_facet>(a2) ) + v3 = std::use_facet>(a2); + else + v3 = 0; + LOBYTE(v4) = std::__basic_file::is_open((_DWORD *)this + 10); + if ( !(_BYTE)v4 ) + goto LABEL_13; + if ( !this[73] && !this[74] ) + { + *((_DWORD *)this + 23) = v3; + return v4; + } + v5 = *((_DWORD *)this + 23); + if ( !v5 ) + goto LABEL_24; + v4 = (*(int (__fastcall **)(int))(*(_DWORD *)v5 + 20))(v5); + if ( v4 == -1 ) + goto LABEL_18; + if ( !this[73] ) + { + if ( !this[74] ) + goto LABEL_13; + LOBYTE(v4) = std::wfilebuf::_M_terminate_output((int)this); + if ( (_BYTE)v4 ) + { + v4 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 1) = v4; + *((_DWORD *)this + 2) = v4; + *((_DWORD *)this + 3) = v4; + *((_DWORD *)this + 6) = 0; + goto LABEL_13; + } +LABEL_18: + *((_DWORD *)this + 23) = 0; + return v4; + } + v6 = *((_DWORD *)this + 23); + if ( !v6 ) +LABEL_24: + std::__throw_bad_cast(); + LOBYTE(v4) = (*(int (__fastcall **)(int))(*(_DWORD *)v6 + 24))(v6); + if ( !(_BYTE)v4 ) + { + v7 = *((_DWORD *)this + 24); + Src = (const void *)(v7 + + (*(int (__thiscall **)(_DWORD, char *, int, _DWORD, int))(**((_DWORD **)this + 23) + 28))( + *((_DWORD *)this + 23), + this + 60, + v7, + *((_DWORD *)this + 26), + (*((_DWORD *)this + 2) - *((_DWORD *)this + 1)) >> 1)); + v9 = *((_DWORD *)this + 27); + *((_DWORD *)this + 26) = Src; + Size = v9 - (_DWORD)Src; + if ( Size ) + memmove(*((void **)this + 24), Src, Size); + v11 = *((_DWORD *)this + 24); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 4) = 0; + *((_DWORD *)this + 26) = v11; + *((_DWORD *)this + 27) = Size + v11; + v12 = *((_DWORD *)this + 16); + *((_DWORD *)this + 6) = 0; + *((_DWORD *)this + 1) = v12; + *((_DWORD *)this + 2) = v12; + *((_DWORD *)this + 3) = v12; + v4 = *((_DWORD *)this + 13); + *((_DWORD *)this + 14) = v4; + *((_DWORD *)this + 15) = v4; + goto LABEL_13; + } + if ( !v3 ) + goto LABEL_18; + LOBYTE(v4) = (*(int (__fastcall **)(void *))(*(_DWORD *)v3 + 24))(v3); + if ( !(_BYTE)v4 ) + { + (*(void (__thiscall **)(int *, char *, _DWORD, _DWORD, int, _DWORD))(*(_DWORD *)this + 16))( + &v14, + this, + 0, + 0, + 1, + *((_DWORD *)this + 12)); + LOBYTE(v4) = v14 & v15; + if ( (v14 & v15) == -1 ) + goto LABEL_18; + } +LABEL_13: + *((_DWORD *)this + 23) = v3; + return v4; +} + +//----- (004B5800) -------------------------------------------------------- +int __thiscall std::wfilebuf::setbuf(int this, __int64 a2) +{ + if ( std::__basic_file::is_open((_DWORD *)(this + 40)) ) + return this; + if ( !a2 ) + { + *(_DWORD *)(this + 68) = 1; + return this; + } + if ( !(_DWORD)a2 || SHIDWORD(a2) <= 0 ) + return this; + *(_QWORD *)(this + 64) = a2; + return this; +} + +//----- (004B5860) -------------------------------------------------------- +int __thiscall std::wfilebuf::xsgetn(_DWORD *this, char *a2, signed int a3) +{ + char *v4; // edi + signed int v5; // esi + _WORD *v6; // ecx + _WORD *v7; // eax + int v8; // ebp + bool v9; // zf + int v10; // eax + int v11; // edx + int v12; // eax + int v13; // ecx + int v14; // eax + int v15; // ecx + char v16; // al + int v18; // eax + _BYTE *v19; // edx + _BYTE *Src; // eax + int i; // eax + int v22; // eax + int *v23; // eax + int v24; // [esp+1Ch] [ebp-20h] + int v25; // [esp+1Ch] [ebp-20h] + + v4 = a2; + v5 = a3; + if ( *((_BYTE *)this + 88) ) + { + v6 = (_WORD *)this[2]; + v7 = (_WORD *)this[1]; + v8 = 0; + if ( a3 > 0 && v7 == v6 ) + { + v6 = v7 + 1; + v5 = a3 - 1; + v4 = a2 + 2; + v8 = 1; + *(_WORD *)a2 = *v7; + } + v9 = v6 == v7; + v10 = this[20]; + v11 = this[16]; + *((_BYTE *)this + 88) = 0; + this[1] = v11; + v12 = v10 + 2 * !v9; + v13 = this[21]; + this[20] = v12; + this[2] = v12; + this[3] = v13; + } + else if ( *((_BYTE *)this + 74) ) + { + if ( (*(unsigned __int16 (__thiscall **)(_DWORD *, int))(*this + 52))(this, 0xFFFF) == 0xFFFF ) + return 0; + v18 = this[16]; + this[5] = 0; + v8 = 0; + this[4] = 0; + this[1] = v18; + this[2] = v18; + this[3] = v18; + this[6] = 0; + *((_BYTE *)this + 74) = 0; + } + else + { + v8 = 0; + } + v14 = 2; + if ( this[17] >= 2u ) + v14 = this[17]; + if ( v5 <= v14 - 1 ) + goto LABEL_12; + v15 = this[23]; + if ( !v15 ) + std::__throw_bad_cast(); + v24 = this[12]; + v16 = (*(int (__fastcall **)(int))(*(_DWORD *)v15 + 24))(v15); + if ( (v24 & 8) != 0 && v16 ) + { + v19 = (_BYTE *)this[3]; + Src = (_BYTE *)this[2]; + if ( Src != v19 ) + { + v25 = v19 - Src; + memcpy(v4, Src, v19 - Src); + this[2] += v25; + v4 += v25; + v8 += v25 >> 1; + v5 -= v25 >> 1; + } + for ( i = std::__basic_file::xsgetn((FILE **)this + 10, v4, v5); + ; + i = std::__basic_file::xsgetn((FILE **)this + 10, v4, v5) ) + { + if ( i == -1 ) + { + v23 = __errno(); + std::__throw_ios_failure( + (std::__ios_failure *)"basic_filebuf::xsgetn error reading the file", + (std::runtime_error *)*v23); + } + if ( !i ) + break; + v8 += i; + v5 -= i; + if ( !v5 ) + goto LABEL_26; + v4 += 2 * i; + } + if ( !v5 ) + { +LABEL_26: + *((_BYTE *)this + 73) = 1; + return v8; + } + v22 = this[16]; + this[5] = 0; + this[4] = 0; + this[1] = v22; + this[2] = v22; + this[3] = v22; + this[6] = 0; + *((_BYTE *)this + 73) = 0; + } + else + { +LABEL_12: + v8 += std::wstreambuf::xsgetn(this, v4, v5); + } + return v8; +} + +//----- (004B5A60) -------------------------------------------------------- +int __thiscall std::wfilebuf::xsputn(int this, char *a2, signed int a3) +{ + int v4; // eax + int v5; // ecx + char v6; // si + int v7; // edx + int v8; // eax + unsigned int v9; // ecx + int v10; // esi + int v11; // eax + int v12; // edx + bool v13; // cc + int result; // eax + int v15; // edx + int v16; // ecx + unsigned int v17; // ecx + char *v18; // [esp+0h] [ebp-2Ch] + + v4 = *(_DWORD *)(this + 48); + v5 = *(_DWORD *)(this + 92); + if ( (v4 & 0x10) != 0 ) + LOBYTE(v4) = 1; + v6 = v4 & 1; + if ( !v5 ) + std::__throw_bad_cast(); + if ( !(*(unsigned __int8 (__fastcall **)(int))(*(_DWORD *)v5 + 24))(v5) || !v6 || *(_BYTE *)(this + 73) ) + return std::wstreambuf::xsputn((_DWORD *)this, a2, a3); + v7 = *(_DWORD *)(this + 20); + v8 = (*(_DWORD *)(this + 24) - v7) >> 1; + if ( !*(_BYTE *)(this + 74) ) + { + v9 = *(_DWORD *)(this + 68); + if ( v9 > 1 ) + v8 = v9 - 1; + } + if ( v8 >= 1024 ) + v8 = 1024; + if ( a3 < v8 ) + return std::wstreambuf::xsputn((_DWORD *)this, a2, a3); + v18 = *(char **)(this + 16); + v10 = (v7 - (int)v18) >> 1; + v11 = std::__basic_file::xsputn_2((FILE **)(this + 40), v18, v10, a2, a3); + if ( v10 + a3 == v11 ) + { + v15 = *(_DWORD *)(this + 64); + v16 = *(_DWORD *)(this + 48); + *(_DWORD *)(this + 4) = v15; + *(_DWORD *)(this + 8) = v15; + *(_DWORD *)(this + 12) = v15; + if ( ((v16 & 0x10) != 0 || (v16 & 1) != 0) && (v17 = *(_DWORD *)(this + 68), v17 > 1) ) + { + *(_DWORD *)(this + 20) = v15; + *(_DWORD *)(this + 16) = v15; + *(_DWORD *)(this + 24) = v15 + 2 * v17 - 2; + } + else + { + *(_DWORD *)(this + 20) = 0; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 24) = 0; + } + *(_BYTE *)(this + 74) = 1; + } + v12 = v11 - v10; + v13 = v10 < v11; + result = 0; + if ( v13 ) + return v12; + return result; +} + +//----- (004B5B90) -------------------------------------------------------- +_DWORD *__thiscall std::wfilebuf::_M_seek(_DWORD *this, int a2, __int64 a3, int a4, int a5) +{ + _DWORD *result; // eax + __int64 v7; // rax + int v8; // ecx + int v9; // ecx + + *this = -1; + this[1] = -1; + this[2] = 0; + if ( !(unsigned __int8)std::wfilebuf::_M_terminate_output(a2) ) + return this; + v7 = std::__basic_file::seekoff((FILE **)(a2 + 40), a3, a4); + if ( ((unsigned int)v7 & HIDWORD(v7)) == -1 ) + return this; + *this = v7; + result = this; + *(_WORD *)(a2 + 73) = 0; + v8 = *(_DWORD *)(a2 + 96); + *(_DWORD *)(a2 + 20) = 0; + *(_DWORD *)(a2 + 108) = v8; + *(_DWORD *)(a2 + 104) = v8; + v9 = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 16) = 0; + *(_DWORD *)(a2 + 4) = v9; + *(_DWORD *)(a2 + 8) = v9; + *(_DWORD *)(a2 + 12) = v9; + *(_DWORD *)(a2 + 24) = 0; + *(_DWORD *)(a2 + 56) = a5; + this[2] = a5; + this[1] = HIDWORD(v7); + return result; +} + +//----- (004B5C40) -------------------------------------------------------- +_DWORD *__thiscall std::wfilebuf::seekoff(_DWORD *this, int a2, __int64 a3, int a4, int a5) +{ + int v6; // ecx + int v7; // eax + int v8; // edx + bool v9; // al + bool v11; // zf + __int64 v12; // rax + __int64 v13; // rax + int v14; // eax + int v15; // edx + unsigned int v16; // esi + unsigned int v17; // edi + __int64 v18; // kr00_8 + __int64 ext_pos; // [esp+28h] [ebp-54h] + bool v20; // [esp+34h] [ebp-48h] + int v21; // [esp+34h] [ebp-48h] + int v22; // [esp+3Ch] [ebp-40h] + int v23; // [esp+4Ch] [ebp-30h] BYREF + int v24[11]; // [esp+50h] [ebp-2Ch] BYREF + + v6 = *(_DWORD *)(a2 + 92); + if ( v6 ) + { + v7 = (*(int (__fastcall **)(int))(*(_DWORD *)v6 + 20))(v6); + v8 = 0; + if ( v7 >= 0 ) + v8 = v7; + v9 = v7 <= 0; + v22 = v8; + } + else + { + v22 = 0; + v9 = 1; + } + *this = -1; + this[1] = -1; + this[2] = 0; + v20 = v9 && a3 != 0; + if ( !std::__basic_file::is_open((_DWORD *)(a2 + 40)) || v20 ) + return this; + if ( a4 != 1 + || a3 + || *(_BYTE *)(a2 + 74) + && !(*(unsigned __int8 (__fastcall **)(_DWORD))(**(_DWORD **)(a2 + 92) + 24))(*(_DWORD *)(a2 + 92)) ) + { + if ( *(_BYTE *)(a2 + 88) ) + { + v11 = *(_DWORD *)(a2 + 8) == *(_DWORD *)(a2 + 4); + *(_BYTE *)(a2 + 88) = 0; + v14 = *(_DWORD *)(a2 + 80) + 2 * !v11; + v15 = *(_DWORD *)(a2 + 84); + *(_DWORD *)(a2 + 4) = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 80) = v14; + *(_DWORD *)(a2 + 8) = v14; + *(_DWORD *)(a2 + 12) = v15; + } + v21 = *(_DWORD *)(a2 + 52); + v23 = v21; + v16 = a3 * v22; + v17 = (unsigned __int64)(a3 * v22) >> 32; + if ( *(_BYTE *)(a2 + 73) && a4 == 1 ) + { + v23 = *(_DWORD *)(a2 + 60); + v18 = std::wfilebuf::_M_get_ext_pos(a2, (int)&v23) + __PAIR64__(v17, v16); + std::wfilebuf::_M_seek(v24, a2, v18, 1, v23); + } + else + { + std::wfilebuf::_M_seek(v24, a2, __SPAIR64__(v17, v16), a4, v21); + } + *this = v24[0]; + this[1] = v24[1]; + this[2] = v24[2]; + return this; + } + v11 = *(_BYTE *)(a2 + 73) == 0; + ext_pos = 0LL; + v23 = *(_DWORD *)(a2 + 52); + if ( !v11 ) + { + v23 = *(_DWORD *)(a2 + 60); + ext_pos = std::wfilebuf::_M_get_ext_pos(a2, (int)&v23); + } + if ( *(_BYTE *)(a2 + 74) ) + ext_pos = (*(_DWORD *)(a2 + 20) - *(_DWORD *)(a2 + 16)) >> 1; + v12 = std::__basic_file::seekoff((FILE **)(a2 + 40), 0LL, 1); + if ( ((unsigned int)v12 & HIDWORD(v12)) == -1 ) + return this; + v13 = ext_pos + v12; + *this = v13; + LODWORD(v13) = v23; + this[1] = HIDWORD(v13); + this[2] = v13; + return this; +} + +//----- (004B5EB0) -------------------------------------------------------- +_DWORD *__thiscall std::wfilebuf::seekpos(_DWORD *this, int a2, __int64 a3, int a4, int a5, int a6) +{ + bool v7; // zf + int v8; // eax + int v9; // edx + int v10; // ebp + __int64 v11; // rax + int v13; // ecx + int v14; // ecx + + *this = -1; + this[1] = -1; + this[2] = 0; + if ( std::__basic_file::is_open((_DWORD *)(a2 + 40)) ) + { + if ( *(_BYTE *)(a2 + 88) ) + { + v7 = *(_DWORD *)(a2 + 8) == *(_DWORD *)(a2 + 4); + *(_BYTE *)(a2 + 88) = 0; + v8 = *(_DWORD *)(a2 + 80) + 2 * !v7; + v9 = *(_DWORD *)(a2 + 84); + *(_DWORD *)(a2 + 4) = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 80) = v8; + *(_DWORD *)(a2 + 8) = v8; + *(_DWORD *)(a2 + 12) = v9; + } + v10 = a4; + if ( (unsigned __int8)std::wfilebuf::_M_terminate_output(a2) ) + { + v11 = std::__basic_file::seekoff((FILE **)(a2 + 40), a3, 0); + if ( ((unsigned int)v11 & HIDWORD(v11)) == -1 ) + { + v10 = 0; + } + else + { + *(_DWORD *)(a2 + 20) = 0; + *(_WORD *)(a2 + 73) = 0; + v13 = *(_DWORD *)(a2 + 96); + *(_DWORD *)(a2 + 16) = 0; + *(_DWORD *)(a2 + 108) = v13; + *(_DWORD *)(a2 + 104) = v13; + v14 = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 24) = 0; + *(_DWORD *)(a2 + 4) = v14; + *(_DWORD *)(a2 + 8) = v14; + *(_DWORD *)(a2 + 12) = v14; + *(_DWORD *)(a2 + 56) = a4; + } + } + else + { + v10 = 0; + v11 = -1LL; + } + *(_QWORD *)this = v11; + this[2] = v10; + } + return this; +} + +//----- (004B5FE0) -------------------------------------------------------- +int __thiscall std::wfilebuf::overflow(int this, int a2) +{ + int v3; // eax + int v4; // edx + int v5; // ecx + int ext_pos; // eax + int v7; // ebp + int v8; // edi + int result; // eax + char *v10; // edx + char *v11; // eax + int v12; // eax + int v13; // edx + __int64 v14; // rax + int v15; // eax + int v16; // eax + unsigned int v17; // eax + int v18; // edx + int v19; // ecx + _WORD *v20; // eax + unsigned int v21; // edx + __int16 v22[15]; // [esp+1Eh] [ebp-1Eh] BYREF + + if ( (*(_BYTE *)(this + 48) & 0x11) == 0 ) + return -1; + if ( *(_BYTE *)(this + 73) ) + { + if ( *(_BYTE *)(this + 88) ) + { + v3 = *(_DWORD *)(this + 80) + 2 * (*(_DWORD *)(this + 8) != *(_DWORD *)(this + 4)); + v4 = *(_DWORD *)(this + 84); + *(_DWORD *)(this + 80) = v3; + v5 = *(_DWORD *)(this + 64); + *(_DWORD *)(this + 8) = v3; + *(_DWORD *)(this + 4) = v5; + *(_DWORD *)(this + 12) = v4; + *(_BYTE *)(this + 88) = 0; + } + ext_pos = std::wfilebuf::_M_get_ext_pos(this, this + 60); + v7 = *(_DWORD *)(this + 60); + v8 = ext_pos; + if ( (unsigned __int8)std::wfilebuf::_M_terminate_output(this) ) + { + v14 = std::__basic_file::seekoff((FILE **)(this + 40), v8, 1); + if ( ((unsigned int)v14 & HIDWORD(v14)) != -1 ) + { + *(_DWORD *)(this + 20) = 0; + *(_WORD *)(this + 73) = 0; + v15 = *(_DWORD *)(this + 96); + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 108) = v15; + *(_DWORD *)(this + 104) = v15; + v16 = *(_DWORD *)(this + 64); + *(_DWORD *)(this + 24) = 0; + *(_DWORD *)(this + 4) = v16; + *(_DWORD *)(this + 8) = v16; + *(_DWORD *)(this + 12) = v16; + *(_DWORD *)(this + 56) = v7; + goto LABEL_19; + } + } + return -1; + } + v10 = *(char **)(this + 16); + v11 = *(char **)(this + 20); + if ( v11 <= v10 ) + { +LABEL_19: + v17 = *(_DWORD *)(this + 68); + if ( v17 <= 1 ) + { + v22[0] = a2; + if ( (_WORD)a2 == 0xFFFF ) + { + *(_BYTE *)(this + 74) = 1; + return 0; + } + if ( std::wfilebuf::_M_convert_to_external(this, (char *)v22, 1u) ) + { + *(_BYTE *)(this + 74) = 1; + return a2; + } + return -1; + } + v18 = *(_DWORD *)(this + 64); + v19 = *(_DWORD *)(this + 48); + *(_DWORD *)(this + 4) = v18; + *(_DWORD *)(this + 8) = v18; + *(_DWORD *)(this + 12) = v18; + if ( (v19 & 0x10) != 0 || (v19 & 1) != 0 ) + { + *(_DWORD *)(this + 20) = v18; + *(_DWORD *)(this + 16) = v18; + *(_DWORD *)(this + 24) = v18 + 2 * v17 - 2; + } + else + { + *(_DWORD *)(this + 20) = 0; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 24) = 0; + } + *(_BYTE *)(this + 74) = 1; + if ( (_WORD)a2 != 0xFFFF ) + { + v20 = *(_WORD **)(this + 20); + *v20 = a2; + *(_DWORD *)(this + 20) = v20 + 1; + return a2; + } + return 0; + } + if ( (_WORD)a2 != 0xFFFF ) + { + *(_WORD *)v11 = a2; + v11 += 2; + *(_DWORD *)(this + 20) = v11; + } + if ( !std::wfilebuf::_M_convert_to_external(this, v10, (v11 - v10) >> 1) ) + return -1; + v12 = *(_DWORD *)(this + 64); + v13 = *(_DWORD *)(this + 48); + *(_DWORD *)(this + 4) = v12; + *(_DWORD *)(this + 8) = v12; + *(_DWORD *)(this + 12) = v12; + if ( ((v13 & 0x10) != 0 || (v13 & 1) != 0) && (v21 = *(_DWORD *)(this + 68), v21 > 1) ) + { + *(_DWORD *)(this + 20) = v12; + *(_DWORD *)(this + 16) = v12; + *(_DWORD *)(this + 24) = v12 + 2 * v21 - 2; + } + else + { + *(_DWORD *)(this + 20) = 0; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 24) = 0; + } + result = a2; + if ( (_WORD)a2 == 0xFFFF ) + return 0; + return result; +} +// 4B5FE0: using guessed type __int16 var_1E[15]; + +//----- (004B6230) -------------------------------------------------------- +int __thiscall std::wfilebuf::pbackfail(char *this, int a2) +{ + char v3; // di + unsigned int v4; // eax + int v5; // edx + int result; // eax + char *v7; // eax + int v8; // eax + int v9; // eax + int v10[7]; // [esp+24h] [ebp-1Ch] BYREF + + if ( (this[48] & 8) == 0 ) + return -1; + if ( this[74] ) + { + if ( (*(unsigned __int16 (__thiscall **)(char *, int))(*(_DWORD *)this + 52))(this, 0xFFFF) == 0xFFFF ) + return -1; + v9 = *((_DWORD *)this + 16); + *((_DWORD *)this + 5) = 0; + *((_DWORD *)this + 4) = 0; + v3 = this[88]; + *((_DWORD *)this + 1) = v9; + *((_DWORD *)this + 2) = v9; + *((_DWORD *)this + 3) = v9; + *((_DWORD *)this + 6) = 0; + this[74] = 0; + } + else + { + v3 = this[88]; + v4 = *((_DWORD *)this + 2); + if ( v4 > *((_DWORD *)this + 1) ) + { + *((_DWORD *)this + 2) = v4 - 2; + v5 = *(unsigned __int16 *)(v4 - 2); + goto LABEL_5; + } + } + (*(void (__thiscall **)(int *, char *, int, int, int, int))(*(_DWORD *)this + 16))(v10, this, -1, -1, 1, 24); + if ( (v10[0] & v10[1]) == -1 ) + return -1; + v5 = (*(int (__fastcall **)(char *))(*(_DWORD *)this + 36))(this); + if ( (_WORD)v5 == 0xFFFF ) + return -1; +LABEL_5: + result = 0; + if ( (_WORD)a2 == 0xFFFF ) + return result; + result = v5; + if ( (_WORD)v5 == (_WORD)a2 ) + return result; + if ( v3 ) + return -1; + v7 = (char *)*((_DWORD *)this + 2); + if ( !this[88] ) + { + *((_DWORD *)this + 20) = v7; + v8 = *((_DWORD *)this + 3); + *((_DWORD *)this + 3) = this + 78; + *((_DWORD *)this + 21) = v8; + v7 = this + 76; + *((_DWORD *)this + 1) = this + 76; + *((_DWORD *)this + 2) = this + 76; + this[88] = 1; + } + this[73] = 1; + *(_WORD *)v7 = a2; + return a2; +} + +//----- (004B6360) -------------------------------------------------------- +int __fastcall std::wfilebuf::showmanyc(_DWORD *a1) +{ + int v1; // edi + FILE **v2; // ebp + int v4; // ecx + int v5; // edi + int v6; // esi + int v8; // edi + + v1 = a1[12]; + if ( (v1 & 8) == 0 ) + return -1; + v2 = (FILE **)(a1 + 10); + if ( !std::__basic_file::is_open(a1 + 10) ) + return -1; + v4 = a1[23]; + v5 = v1 & 4; + v6 = (a1[3] - a1[2]) >> 1; + if ( !v4 ) + std::__throw_bad_cast(); + if ( (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 20))(v4) < 0 || !v5 ) + return v6; + v8 = std::__basic_file::showmanyc(v2); + return v8 / (*(int (**)(void))(*(_DWORD *)a1[23] + 32))() + v6; +} + +//----- (004B63F0) -------------------------------------------------------- +int __fastcall std::wfilebuf::underflow(int a1) +{ + unsigned __int16 *v2; // eax + int v3; // edi + int v4; // ecx + int v5; // eax + signed int v6; // esi + int v7; // ecx + const void *Src; // eax + signed int Size; // edi + unsigned int v10; // edx + signed int v11; // ecx + char *v12; // ebp + int v13; // ecx + char *v14; // eax + void *v15; // edx + int v16; // esi + char v17; // di + int v18; // ebp + char v19; // al + int v20; // eax + int v21; // eax + int result; // eax + bool v23; // zf + int v24; // eax + int v25; // ecx + unsigned int v26; // edx + int v27; // eax + int v28; // eax + unsigned int v29; // ecx + char *v30; // eax + unsigned int v31; // esi + unsigned __int16 *v32; // eax + int v33; // eax + int *v34; // eax + char *v35; // eax + char *v36; // eax + char *v37; // eax + unsigned int v38; // [esp+44h] [ebp-34h] + unsigned int v39; // [esp+48h] [ebp-30h] + unsigned int v40; // [esp+48h] [ebp-30h] + unsigned int v41; // [esp+48h] [ebp-30h] + unsigned int v42; // [esp+48h] [ebp-30h] + unsigned int v43; // [esp+48h] [ebp-30h] + void *v44; // [esp+58h] [ebp-20h] BYREF + + if ( (*(_BYTE *)(a1 + 48) & 8) == 0 ) + return -1; + if ( *(_BYTE *)(a1 + 74) ) + { + result = (*(int (__thiscall **)(int, int))(*(_DWORD *)a1 + 52))(a1, 0xFFFF); + if ( (_WORD)result == 0xFFFF ) + return result; + v2 = *(unsigned __int16 **)(a1 + 64); + v23 = *(_BYTE *)(a1 + 88) == 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 4) = v2; + *(_DWORD *)(a1 + 8) = v2; + *(_DWORD *)(a1 + 12) = v2; + *(_DWORD *)(a1 + 24) = 0; + *(_BYTE *)(a1 + 74) = 0; + if ( v23 ) + { +LABEL_4: + if ( *(_DWORD *)(a1 + 12) <= (unsigned int)v2 ) + goto LABEL_5; + return *v2; + } + } + else + { + v2 = *(unsigned __int16 **)(a1 + 8); + if ( !*(_BYTE *)(a1 + 88) ) + goto LABEL_4; + } + v23 = *(_DWORD *)(a1 + 4) == (_DWORD)v2; + v24 = *(_DWORD *)(a1 + 80); + *(_BYTE *)(a1 + 88) = 0; + v25 = *(_DWORD *)(a1 + 64); + v2 = (unsigned __int16 *)(v24 + 2 * !v23); + v26 = *(_DWORD *)(a1 + 84); + *(_DWORD *)(a1 + 80) = v2; + *(_DWORD *)(a1 + 4) = v25; + *(_DWORD *)(a1 + 8) = v2; + *(_DWORD *)(a1 + 12) = v26; + if ( v26 > (unsigned int)v2 ) + return *v2; +LABEL_5: + v3 = 2; + if ( *(_DWORD *)(a1 + 68) >= 2u ) + v3 = *(_DWORD *)(a1 + 68); + v4 = *(_DWORD *)(a1 + 92); + v38 = v3 - 1; + if ( !v4 ) + std::__throw_bad_cast(); + if ( !(*(unsigned __int8 (__fastcall **)(int))(*(_DWORD *)v4 + 24))(v4) ) + { + v5 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 92) + 20))(*(_DWORD *)(a1 + 92)); + if ( v5 <= 0 ) + { + v33 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 92) + 32))(*(_DWORD *)(a1 + 92)); + v7 = v3 - 1; + v6 = v3 + v33 - 2; + } + else + { + v6 = v38 * v5; + v7 = v38 * v5; + } + Src = *(const void **)(a1 + 104); + Size = *(_DWORD *)(a1 + 108) - (_DWORD)Src; + v10 = v7 - Size; + if ( v7 <= Size ) + v10 = 0; + v11 = *(_DWORD *)(a1 + 100); + if ( *(_BYTE *)(a1 + 73) && *(_DWORD *)(a1 + 4) == *(_DWORD *)(a1 + 12) ) + { + if ( !Size ) + { + if ( v6 <= v11 ) + { + v12 = *(char **)(a1 + 96); + goto LABEL_17; + } + v43 = v10; + v37 = (char *)operator new[](v6); + v10 = v43; + v12 = v37; +LABEL_62: + if ( *(_DWORD *)(a1 + 96) ) + { + v40 = v10; + operator delete[](*(void **)(a1 + 96)); + v10 = v40; + } + *(_DWORD *)(a1 + 96) = v12; + *(_DWORD *)(a1 + 100) = v6; +LABEL_17: + v13 = *(_DWORD *)(a1 + 56); + v14 = &v12[Size]; + *(_DWORD *)(a1 + 104) = v12; + *(_DWORD *)(a1 + 108) = &v12[Size]; + *(_DWORD *)(a1 + 60) = v13; + if ( v10 ) + { + v16 = 0; + goto LABEL_25; + } + v15 = *(void **)(a1 + 4); + v16 = 0; + v44 = v15; + if ( v14 <= v12 ) + { + while ( 1 ) + { +LABEL_24: + v14 = *(char **)(a1 + 108); + v10 = 1; + Size = (signed int)&v14[-*(_DWORD *)(a1 + 96)]; +LABEL_25: + if ( (signed int)(v10 + Size) > *(_DWORD *)(a1 + 100) ) + std::__throw_ios_failure("basic_filebuf::underflow codecvt::max_length() is not valid"); + v20 = std::__basic_file::xsgetn((FILE **)(a1 + 40), v14, v10); + if ( v20 ) + { + if ( v20 == -1 ) + goto LABEL_59; + v17 = 0; + } + else + { + v17 = 1; + } + v15 = *(void **)(a1 + 4); + v12 = *(char **)(a1 + 104); + v14 = (char *)(*(_DWORD *)(a1 + 108) + v20); + *(_DWORD *)(a1 + 108) = v14; + v44 = v15; + if ( v14 > v12 ) + break; + if ( v16 == 3 ) + goto LABEL_44; + if ( v17 ) + goto LABEL_32; + } + } + else + { + v17 = 0; + } + v16 = (*(int (__thiscall **)(_DWORD, int, char *, char *, int, void *, unsigned int, void **))(**(_DWORD **)(a1 + 92) + 16))( + *(_DWORD *)(a1 + 92), + a1 + 56, + v12, + v14, + a1 + 104, + v15, + (unsigned int)v15 + 2 * v38, + &v44); + if ( v16 != 3 ) + { + v18 = ((int)v44 - *(_DWORD *)(a1 + 4)) >> 1; + if ( v16 != 2 ) + { + v19 = v17 | (v44 != *(void **)(a1 + 4)); + goto LABEL_23; + } + if ( (int)v44 - *(_DWORD *)(a1 + 4) <= 0 ) + { + if ( !v17 ) + std::__throw_ios_failure("basic_filebuf::underflow invalid byte sequence in file"); + goto LABEL_41; + } + goto LABEL_54; + } + v14 = *(char **)(a1 + 108); + v15 = *(void **)(a1 + 4); +LABEL_44: + v29 = *(_DWORD *)(a1 + 96); + v30 = &v14[-v29]; + v18 = (int)v30; + v31 = (unsigned int)v30; + if ( v38 < (unsigned int)v30 ) + { + v31 = v38; + v18 = v38; + } + else if ( !v30 ) + { +LABEL_46: + *(_DWORD *)(a1 + 104) = v29; + v16 = 3; + v19 = v17 | (v18 != 0); +LABEL_23: + if ( !v19 ) + goto LABEL_24; + if ( v18 > 0 ) + goto LABEL_54; + if ( v17 ) + { +LABEL_32: + v21 = *(_DWORD *)(a1 + 64); + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 4) = v21; + *(_DWORD *)(a1 + 8) = v21; + *(_DWORD *)(a1 + 12) = v21; + *(_DWORD *)(a1 + 24) = 0; + *(_BYTE *)(a1 + 73) = 0; + if ( v16 == 1 ) + std::__throw_ios_failure("basic_filebuf::underflow incomplete character in file"); + return -1; + } +LABEL_59: + v34 = __errno(); + std::__throw_ios_failure( + (std::__ios_failure *)"basic_filebuf::underflow error reading the file", + (std::runtime_error *)*v34); + } + memcpy(v15, *(const void **)(a1 + 96), 2 * v31); + v29 = v31 + *(_DWORD *)(a1 + 96); + goto LABEL_46; + } + if ( v6 <= v11 ) + { + v12 = *(char **)(a1 + 96); + v10 = 0; +LABEL_73: + v42 = v10; + memmove(v12, Src, Size); + v12 = *(char **)(a1 + 96); + v10 = v42; + goto LABEL_17; + } + v36 = (char *)operator new[](v6); + v10 = 0; + v12 = v36; + } + else + { + if ( v6 <= v11 ) + { + v12 = *(char **)(a1 + 96); + if ( !Size ) + goto LABEL_17; + goto LABEL_73; + } + v39 = v10; + v35 = (char *)operator new[](v6); + v10 = v39; + v12 = v35; + if ( !Size ) + goto LABEL_62; + } + v41 = v10; + memcpy(v12, *(const void **)(a1 + 104), Size); + v10 = v41; + goto LABEL_62; + } + v27 = std::__basic_file::xsgetn((FILE **)(a1 + 40), *(void **)(a1 + 4), v38); + v18 = v27; + if ( !v27 ) + { +LABEL_41: + v28 = *(_DWORD *)(a1 + 64); + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 4) = v28; + *(_DWORD *)(a1 + 8) = v28; + *(_DWORD *)(a1 + 12) = v28; + *(_DWORD *)(a1 + 24) = 0; + *(_BYTE *)(a1 + 73) = 0; + return -1; + } + if ( v27 <= 0 ) + goto LABEL_59; +LABEL_54: + v32 = *(unsigned __int16 **)(a1 + 64); + v23 = (*(_BYTE *)(a1 + 48) & 8) == 0; + *(_DWORD *)(a1 + 4) = v32; + *(_DWORD *)(a1 + 8) = v32; + if ( v23 ) + *(_DWORD *)(a1 + 12) = v32; + else + *(_DWORD *)(a1 + 12) = &v32[v18]; + *(_DWORD *)(a1 + 20) = 0; + result = *v32; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 24) = 0; + *(_BYTE *)(a1 + 73) = 1; + return result; +} + +//----- (004B68A0) -------------------------------------------------------- +int __thiscall std::wfilebuf::basic_filebuf(int this, std::locale *a2) +{ + int v3; // eax + int v4; // edx + int v5; // edi + int v6; // ecx + int v7; // eax + int result; // eax + int v9; // edi + int v10; // edx + int v11; // edx + int v12; // edx + int v13; // edx + int v14; // edx + int v15; // edx + int v16; // edx + const std::locale *v17; // [esp+4h] [ebp-18h] + + std::wstreambuf::basic_streambuf((_DWORD *)this, a2, v17); + v3 = *((_DWORD *)a2 + 10); + v4 = *((_DWORD *)a2 + 17); + *(_DWORD *)this = off_51AA90; + v5 = *((_DWORD *)a2 + 14); + v6 = *((_DWORD *)a2 + 16); + *(_DWORD *)(this + 32) = 0; + *(_DWORD *)(this + 40) = v3; + LOBYTE(v3) = *((_BYTE *)a2 + 44); + *(_DWORD *)(this + 36) = 0; + *(_BYTE *)(this + 44) = v3; + v7 = *((_DWORD *)a2 + 12); + *((_DWORD *)a2 + 10) = 0; + *((_BYTE *)a2 + 44) = 0; + *(_DWORD *)(this + 68) = v4; + LOWORD(v4) = *((_WORD *)a2 + 36); + *(_DWORD *)(this + 48) = v7; + result = *((_DWORD *)a2 + 13); + *(_WORD *)(this + 72) = v4; + LOBYTE(v4) = *((_BYTE *)a2 + 74); + *(_DWORD *)(this + 56) = v5; + v9 = *((_DWORD *)a2 + 15); + *(_BYTE *)(this + 74) = v4; + LOWORD(v4) = *((_WORD *)a2 + 38); + *(_DWORD *)(this + 64) = v6; + *(_DWORD *)(this + 60) = v9; + *((_DWORD *)a2 + 12) = 0; + *(_DWORD *)(this + 52) = result; + *((_DWORD *)a2 + 16) = 0; + *((_DWORD *)a2 + 17) = 1; + *((_WORD *)a2 + 36) = 0; + *((_BYTE *)a2 + 74) = 0; + *(_WORD *)(this + 76) = v4; + v10 = *((_DWORD *)a2 + 20); + *((_DWORD *)a2 + 20) = 0; + *(_DWORD *)(this + 80) = v10; + v11 = *((_DWORD *)a2 + 21); + *((_DWORD *)a2 + 1) = 0; + *(_DWORD *)(this + 84) = v11; + LOBYTE(v11) = *((_BYTE *)a2 + 88); + *((_DWORD *)a2 + 21) = 0; + *(_BYTE *)(this + 88) = v11; + v12 = *((_DWORD *)a2 + 23); + *((_BYTE *)a2 + 88) = 0; + *(_DWORD *)(this + 92) = v12; + v13 = *((_DWORD *)a2 + 24); + *((_DWORD *)a2 + 2) = 0; + *(_DWORD *)(this + 96) = v13; + v14 = *((_DWORD *)a2 + 25); + *((_DWORD *)a2 + 24) = 0; + *(_DWORD *)(this + 100) = v14; + v15 = *((_DWORD *)a2 + 26); + *((_DWORD *)a2 + 25) = 0; + *(_DWORD *)(this + 104) = v15; + v16 = *((_DWORD *)a2 + 27); + *((_DWORD *)a2 + 26) = 0; + *(_DWORD *)(this + 108) = v16; + *((_DWORD *)a2 + 27) = 0; + *((_DWORD *)a2 + 3) = 0; + *((_DWORD *)a2 + 5) = 0; + *((_DWORD *)a2 + 4) = 0; + *((_DWORD *)a2 + 6) = 0; + *((_DWORD *)a2 + 14) = result; + *((_DWORD *)a2 + 15) = result; + return result; +} +// 4B68AF: variable 'v17' is possibly undefined +// 51AA90: using guessed type int (*off_51AA90[2])(); + +//----- (004B69E0) -------------------------------------------------------- +void __fastcall std::wfilebuf::basic_filebuf(int a1) +{ + int v2; // [esp+20h] [ebp-4Ch] + + *(_DWORD *)a1 = &off_51AE14; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 8) = 0; + *(_DWORD *)(a1 + 12) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 24) = 0; + v2 = a1 + 28; + std::locale::locale((_DWORD *)(a1 + 28)); + *(_DWORD *)a1 = off_51AA90; + *(_DWORD *)(a1 + 32) = 0; + *(_DWORD *)(a1 + 36) = 0; + std::__basic_file::__basic_file((_BYTE *)(a1 + 40), a1 + 32); + *(_WORD *)(a1 + 72) = 0; + *(_DWORD *)(a1 + 48) = 0; + *(_DWORD *)(a1 + 52) = 0; + *(_DWORD *)(a1 + 56) = 0; + *(_DWORD *)(a1 + 60) = 0; + *(_DWORD *)(a1 + 64) = 0; + *(_DWORD *)(a1 + 68) = 512; + *(_BYTE *)(a1 + 74) = 0; + *(_WORD *)(a1 + 76) = 0; + *(_DWORD *)(a1 + 80) = 0; + *(_DWORD *)(a1 + 84) = 0; + *(_BYTE *)(a1 + 88) = 0; + *(_DWORD *)(a1 + 92) = 0; + *(_DWORD *)(a1 + 96) = 0; + *(_DWORD *)(a1 + 100) = 0; + *(_DWORD *)(a1 + 104) = 0; + *(_DWORD *)(a1 + 108) = 0; + if ( (unsigned __int8)std::has_facet>(v2) ) + *(_DWORD *)(a1 + 92) = std::use_facet>(v2); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004B6B80) -------------------------------------------------------- +int __thiscall std::wfilebuf::basic_filebuf(int this, std::locale *a2) +{ + int v3; // eax + int v4; // edx + int v5; // edi + int v6; // ecx + int v7; // eax + int result; // eax + int v9; // edi + int v10; // edx + int v11; // edx + int v12; // edx + int v13; // edx + int v14; // edx + int v15; // edx + int v16; // edx + const std::locale *v17; // [esp+4h] [ebp-18h] + + std::wstreambuf::basic_streambuf((_DWORD *)this, a2, v17); + v3 = *((_DWORD *)a2 + 10); + v4 = *((_DWORD *)a2 + 17); + *(_DWORD *)this = off_51AA90; + v5 = *((_DWORD *)a2 + 14); + v6 = *((_DWORD *)a2 + 16); + *(_DWORD *)(this + 32) = 0; + *(_DWORD *)(this + 40) = v3; + LOBYTE(v3) = *((_BYTE *)a2 + 44); + *(_DWORD *)(this + 36) = 0; + *(_BYTE *)(this + 44) = v3; + v7 = *((_DWORD *)a2 + 12); + *((_DWORD *)a2 + 10) = 0; + *((_BYTE *)a2 + 44) = 0; + *(_DWORD *)(this + 68) = v4; + LOWORD(v4) = *((_WORD *)a2 + 36); + *(_DWORD *)(this + 48) = v7; + result = *((_DWORD *)a2 + 13); + *(_WORD *)(this + 72) = v4; + LOBYTE(v4) = *((_BYTE *)a2 + 74); + *(_DWORD *)(this + 56) = v5; + v9 = *((_DWORD *)a2 + 15); + *(_BYTE *)(this + 74) = v4; + LOWORD(v4) = *((_WORD *)a2 + 38); + *(_DWORD *)(this + 64) = v6; + *(_DWORD *)(this + 60) = v9; + *((_DWORD *)a2 + 12) = 0; + *(_DWORD *)(this + 52) = result; + *((_DWORD *)a2 + 16) = 0; + *((_DWORD *)a2 + 17) = 1; + *((_WORD *)a2 + 36) = 0; + *((_BYTE *)a2 + 74) = 0; + *(_WORD *)(this + 76) = v4; + v10 = *((_DWORD *)a2 + 20); + *((_DWORD *)a2 + 20) = 0; + *(_DWORD *)(this + 80) = v10; + v11 = *((_DWORD *)a2 + 21); + *((_DWORD *)a2 + 1) = 0; + *(_DWORD *)(this + 84) = v11; + LOBYTE(v11) = *((_BYTE *)a2 + 88); + *((_DWORD *)a2 + 21) = 0; + *(_BYTE *)(this + 88) = v11; + v12 = *((_DWORD *)a2 + 23); + *((_BYTE *)a2 + 88) = 0; + *(_DWORD *)(this + 92) = v12; + v13 = *((_DWORD *)a2 + 24); + *((_DWORD *)a2 + 2) = 0; + *(_DWORD *)(this + 96) = v13; + v14 = *((_DWORD *)a2 + 25); + *((_DWORD *)a2 + 24) = 0; + *(_DWORD *)(this + 100) = v14; + v15 = *((_DWORD *)a2 + 26); + *((_DWORD *)a2 + 25) = 0; + *(_DWORD *)(this + 104) = v15; + v16 = *((_DWORD *)a2 + 27); + *((_DWORD *)a2 + 26) = 0; + *(_DWORD *)(this + 108) = v16; + *((_DWORD *)a2 + 27) = 0; + *((_DWORD *)a2 + 3) = 0; + *((_DWORD *)a2 + 5) = 0; + *((_DWORD *)a2 + 4) = 0; + *((_DWORD *)a2 + 6) = 0; + *((_DWORD *)a2 + 14) = result; + *((_DWORD *)a2 + 15) = result; + return result; +} +// 4B6B8F: variable 'v17' is possibly undefined +// 51AA90: using guessed type int (*off_51AA90[2])(); + +//----- (004B6CC0) -------------------------------------------------------- +void __fastcall std::wfilebuf::basic_filebuf(int a1) +{ + int v2; // [esp+20h] [ebp-4Ch] + + *(_DWORD *)a1 = &off_51AE14; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 8) = 0; + *(_DWORD *)(a1 + 12) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 24) = 0; + v2 = a1 + 28; + std::locale::locale((_DWORD *)(a1 + 28)); + *(_DWORD *)a1 = off_51AA90; + *(_DWORD *)(a1 + 32) = 0; + *(_DWORD *)(a1 + 36) = 0; + std::__basic_file::__basic_file((_BYTE *)(a1 + 40), a1 + 32); + *(_WORD *)(a1 + 72) = 0; + *(_DWORD *)(a1 + 48) = 0; + *(_DWORD *)(a1 + 52) = 0; + *(_DWORD *)(a1 + 56) = 0; + *(_DWORD *)(a1 + 60) = 0; + *(_DWORD *)(a1 + 64) = 0; + *(_DWORD *)(a1 + 68) = 512; + *(_BYTE *)(a1 + 74) = 0; + *(_WORD *)(a1 + 76) = 0; + *(_DWORD *)(a1 + 80) = 0; + *(_DWORD *)(a1 + 84) = 0; + *(_BYTE *)(a1 + 88) = 0; + *(_DWORD *)(a1 + 92) = 0; + *(_DWORD *)(a1 + 96) = 0; + *(_DWORD *)(a1 + 100) = 0; + *(_DWORD *)(a1 + 104) = 0; + *(_DWORD *)(a1 + 108) = 0; + if ( (unsigned __int8)std::has_facet>(v2) ) + *(_DWORD *)(a1 + 92) = std::use_facet>(v2); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004B6E60) -------------------------------------------------------- +void __fastcall std::wfilebuf::~wfilebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA90; + std::wfilebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51AE14; + std::locale::~locale((_DWORD **)a1 + 7); + operator delete(a1); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004B6F10) -------------------------------------------------------- +void __fastcall std::wfilebuf::~wfilebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA90; + std::wfilebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51AE14; + std::locale::~locale((_DWORD **)a1 + 7); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004B6FB0) -------------------------------------------------------- +void __fastcall std::wfilebuf::~wfilebuf(struct _Unwind_Exception *a1) +{ + *(_DWORD *)a1 = off_51AA90; + std::wfilebuf::close(a1); + std::__basic_file::~__basic_file((int)a1 + 40); + *(_DWORD *)a1 = &off_51AE14; + std::locale::~locale((_DWORD **)a1 + 7); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004B7050) -------------------------------------------------------- +int __thiscall std::wfilebuf::operator=(int this, int a2) +{ + int v3; // eax + char v4; // dl + int v5; // eax + int v6; // eax + int v7; // eax + int v8; // eax + int v9; // eax + int v10; // eax + int v11; // eax + int v12; // eax + int v13; // eax + int v14; // eax + int v15; // eax + int result; // eax + + std::wfilebuf::close((struct _Unwind_Exception *)this); + std::wstreambuf::operator=((volatile signed __int32 **)this, a2); + v3 = *(_DWORD *)(this + 40); + *(_DWORD *)(this + 40) = *(_DWORD *)(a2 + 40); + v4 = *(_BYTE *)(a2 + 44); + *(_DWORD *)(a2 + 40) = v3; + LOBYTE(v3) = *(_BYTE *)(this + 44); + *(_BYTE *)(this + 44) = v4; + *(_BYTE *)(a2 + 44) = v3; + v5 = *(_DWORD *)(a2 + 48); + *(_DWORD *)(a2 + 48) = 0; + *(_DWORD *)(this + 48) = v5; + *(_DWORD *)(this + 52) = *(_DWORD *)(a2 + 52); + *(_DWORD *)(this + 56) = *(_DWORD *)(a2 + 56); + *(_DWORD *)(this + 60) = *(_DWORD *)(a2 + 60); + v6 = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 64) = 0; + *(_DWORD *)(this + 64) = v6; + v7 = *(_DWORD *)(a2 + 68); + *(_DWORD *)(a2 + 68) = 1; + *(_DWORD *)(this + 68) = v7; + LOBYTE(v7) = *(_BYTE *)(a2 + 72); + *(_BYTE *)(a2 + 72) = 0; + *(_BYTE *)(this + 72) = v7; + v8 = *(_DWORD *)(a2 + 96); + *(_DWORD *)(a2 + 96) = 0; + *(_DWORD *)(this + 96) = v8; + v9 = *(_DWORD *)(a2 + 100); + *(_DWORD *)(a2 + 100) = 0; + *(_DWORD *)(this + 100) = v9; + v10 = *(_DWORD *)(a2 + 104); + *(_DWORD *)(a2 + 104) = 0; + *(_DWORD *)(this + 104) = v10; + v11 = *(_DWORD *)(a2 + 108); + *(_DWORD *)(a2 + 108) = 0; + *(_DWORD *)(this + 108) = v11; + LOBYTE(v11) = *(_BYTE *)(a2 + 73); + *(_BYTE *)(a2 + 73) = 0; + *(_BYTE *)(this + 73) = v11; + LOBYTE(v11) = *(_BYTE *)(a2 + 74); + *(_BYTE *)(a2 + 74) = 0; + *(_BYTE *)(this + 74) = v11; + v12 = *(_DWORD *)(a2 + 80); + *(_DWORD *)(a2 + 80) = 0; + *(_DWORD *)(this + 80) = v12; + v13 = *(_DWORD *)(a2 + 84); + *(_DWORD *)(a2 + 84) = 0; + *(_DWORD *)(this + 84) = v13; + LOBYTE(v13) = *(_BYTE *)(a2 + 88); + *(_BYTE *)(a2 + 88) = 0; + *(_BYTE *)(this + 88) = v13; + v14 = *(_DWORD *)(a2 + 64); + *(_DWORD *)(a2 + 20) = 0; + *(_DWORD *)(a2 + 4) = v14; + *(_DWORD *)(a2 + 8) = v14; + *(_DWORD *)(a2 + 12) = v14; + v15 = *(_DWORD *)(a2 + 52); + *(_DWORD *)(a2 + 16) = 0; + *(_DWORD *)(a2 + 56) = v15; + *(_DWORD *)(a2 + 60) = v15; + result = this; + *(_DWORD *)(a2 + 24) = 0; + return result; +} + +//----- (004B7170) -------------------------------------------------------- +int __thiscall std::fstream::open(int *this, char *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::filebuf::open(this + 3, a2, a3) == 0; + v5 = *this; + if ( v4 ) + return std::ios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::ios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004B71E0) -------------------------------------------------------- +int __thiscall std::fstream::open(int *this, wchar_t *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::filebuf::open(this + 3, a2, a3) == 0; + v5 = *this; + if ( v4 ) + return std::ios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::ios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004B7250) -------------------------------------------------------- +int __thiscall std::fstream::open(int *this, char **a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::filebuf::open(this + 3, *a2, a3) == 0; + v5 = *this; + if ( v4 ) + return std::ios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::ios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004B72C0) -------------------------------------------------------- +void __thiscall std::fstream::swap(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // edi + std::ios_base *v4; // esi + std::ios_base *v5; // edx + char v6; // cl + char v7; // cl + int v8; // edx + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + v8 = this[1]; + *((_BYTE *)v4 + 117) = v7; + this[1] = a2[1]; + a2[1] = v8; + std::filebuf::swap((int)(this + 3), (int)(a2 + 3)); +} +// 4B7300: variable 'v9' is possibly undefined + +//----- (004B7390) -------------------------------------------------------- +struct _Unwind_Exception *__fastcall std::fstream::close(_DWORD *a1) +{ + struct _Unwind_Exception *result; // eax + + result = std::filebuf::close((struct _Unwind_Exception *)(a1 + 3)); + if ( !result ) + return (struct _Unwind_Exception *)std::ios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 4); + return result; +} + +//----- (004B73D0) -------------------------------------------------------- +bool __fastcall std::fstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 52)); +} + +//----- (004B73E0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::fstream::basic_fstream(_DWORD *this, int *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // ecx + int v5; // eax + std::ios_base *v6; // [esp+0h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v8; // [esp+14h] [ebp-44h] + + v8 = this + 30; + std::ios_base::ios_base(this + 30); + *((_WORD *)this + 118) = 0; + v2 = a2[1]; + *this = &unk_51598C; + this[1] = v2; + this[58] = 0; + v3 = *a2; + this[60] = 0; + this[61] = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[30] = &unk_5159A0; + this[62] = 0; + this[63] = 0; + lpuexcpt = v4; + std::ios_base::_M_move((int)v8, v4, v6); + std::ios::_M_cache_locale(v8, (int)(this + 57)); + this[60] = 0; + v5 = *((_DWORD *)lpuexcpt + 28); + *((_DWORD *)lpuexcpt + 28) = 0; + this[58] = v5; + *((_WORD *)this + 118) = *((_WORD *)lpuexcpt + 58); + a2[1] = 0; + *this = off_51AAD4; + this[30] = off_51AAFC; + this[2] = off_51AAE8; + std::filebuf::basic_filebuf((int)(this + 3), (std::locale *)(a2 + 3)); + this[60] = this + 3; +} +// 4B7572: positive sp value 4 has been found +// 4B7485: variable 'v6' is possibly undefined +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); + +//----- (004B7580) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::fstream::basic_fstream(_DWORD *this, char *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+24h] [ebp-44h] + + v5 = this + 30; + std::ios_base::ios_base(this + 30); + this[58] = 0; + *((_WORD *)this + 118) = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + this[63] = 0; + *this = &unk_51598C; + this[30] = &unk_5159A0; + this[1] = 0; + std::ios::init((int)v5, 0); + this[2] = &unk_5159B4; + this[30] = &unk_5159C8; + std::ios::init((int)v5, 0); + *this = off_51AAD4; + this[30] = off_51AAFC; + this[2] = off_51AAE8; + std::filebuf::basic_filebuf((int)(this + 3)); + std::ios::init((int)v5, (int)(this + 3)); + v3 = std::filebuf::open(this + 3, a2, a3); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::ios::clear(v4, 0); + else + std::ios::clear(v4, v4[5] | 4); +} +// 4B7735: positive sp value 4 has been found +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); + +//----- (004B7760) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::fstream::basic_fstream(_DWORD *this, wchar_t *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+24h] [ebp-44h] + + v5 = this + 30; + std::ios_base::ios_base(this + 30); + this[58] = 0; + *((_WORD *)this + 118) = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + this[63] = 0; + *this = &unk_51598C; + this[30] = &unk_5159A0; + this[1] = 0; + std::ios::init((int)v5, 0); + this[2] = &unk_5159B4; + this[30] = &unk_5159C8; + std::ios::init((int)v5, 0); + *this = off_51AAD4; + this[30] = off_51AAFC; + this[2] = off_51AAE8; + std::filebuf::basic_filebuf((int)(this + 3)); + std::ios::init((int)v5, (int)(this + 3)); + v3 = std::filebuf::open(this + 3, a2, a3); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::ios::clear(v4, 0); + else + std::ios::clear(v4, v4[5] | 4); +} +// 4B7915: positive sp value 4 has been found +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); + +//----- (004B7940) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::fstream::basic_fstream(_DWORD *this, char **a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+24h] [ebp-44h] + + v5 = this + 30; + std::ios_base::ios_base(this + 30); + this[58] = 0; + *((_WORD *)this + 118) = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + this[63] = 0; + *this = &unk_51598C; + this[30] = &unk_5159A0; + this[1] = 0; + std::ios::init((int)v5, 0); + this[2] = &unk_5159B4; + this[30] = &unk_5159C8; + std::ios::init((int)v5, 0); + *this = off_51AAD4; + this[30] = off_51AAFC; + this[2] = off_51AAE8; + std::filebuf::basic_filebuf((int)(this + 3)); + std::ios::init((int)v5, (int)(this + 3)); + v3 = std::filebuf::open(this + 3, *a2, a3); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::ios::clear(v4, 0); + else + std::ios::clear(v4, v4[5] | 4); +} +// 4B7AFD: positive sp value 4 has been found +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); + +//----- (004B7B30) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __fastcall std::fstream::basic_fstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 120; + std::ios_base::ios_base((_DWORD *)(a1 + 120)); + *(_DWORD *)(a1 + 232) = 0; + *(_WORD *)(a1 + 236) = 0; + *(_DWORD *)(a1 + 240) = 0; + *(_DWORD *)(a1 + 244) = 0; + *(_DWORD *)(a1 + 248) = 0; + *(_DWORD *)(a1 + 252) = 0; + *(_DWORD *)a1 = &unk_51598C; + *(_DWORD *)(a1 + 120) = &unk_5159A0; + *(_DWORD *)(a1 + 4) = 0; + std::ios::init(v1, 0); + *(_DWORD *)(a1 + 8) = &unk_5159B4; + *(_DWORD *)(a1 + 120) = &unk_5159C8; + std::ios::init(v1, 0); + *(_DWORD *)a1 = off_51AAD4; + *(_DWORD *)(a1 + 120) = off_51AAFC; + *(_DWORD *)(a1 + 8) = off_51AAE8; + std::filebuf::basic_filebuf(a1 + 12); + std::ios::init(v1, a1 + 12); +} +// 4B7C99: positive sp value 4 has been found +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); + +//----- (004B7CD0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::fstream::basic_fstream(int *this, int *a2, _DWORD *a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // eax + int v11; // edx + int v12; // eax + int v13; // edx + std::ios_base *v14; // [esp+0h] [ebp-58h] + std::ios_base *v15; // [esp+10h] [ebp-48h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-44h] + + v4 = a2[2]; + v5 = a2[3]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = a3[1]; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v4 - 12)); + v15 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)lpuexcpt, v15, v14); + std::ios::_M_cache_locale(lpuexcpt, (int)lpuexcpt + 108); + v7 = *((_DWORD *)v15 + 28); + *((_DWORD *)lpuexcpt + 30) = 0; + *((_DWORD *)v15 + 28) = 0; + *((_DWORD *)lpuexcpt + 28) = v7; + *((_WORD *)lpuexcpt + 58) = *((_WORD *)v15 + 58); + v8 = a2[5]; + a3[1] = 0; + v9 = a2[4]; + this[2] = v9; + *(int *)((char *)this + *(_DWORD *)(v9 - 12) + 8) = v8; + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = *a2; + v13 = a2[8]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v12 - 12)) = v13; + this[2] = a2[9]; + std::filebuf::basic_filebuf((int)(this + 3), (std::locale *)(a3 + 3)); + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)(this + 3); +} +// 4B7E1E: positive sp value 4 has been found +// 4B7D36: variable 'v14' is possibly undefined + +//----- (004B7E40) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::fstream::basic_fstream(int *this, int *a2, char *a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + _DWORD *v9; // ecx + int v10; // eax + int v11; // edx + int v12; // edx + int v13; // eax + _DWORD *v14; // eax + char *v15; // ebx + _DWORD *v16; // ecx + + v5 = a2[2]; + v6 = a2[3]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = a2[4]; + this[2] = v8; + v9 = (int *)((char *)this + *(_DWORD *)(v8 - 12) + 8); + *v9 = a2[5]; + std::ios::init((int)v9, 0); + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = a2[8]; + v13 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v13 - 12)) = v12; + this[2] = a2[9]; + std::filebuf::basic_filebuf((int)(this + 3)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 3)); + v14 = std::filebuf::open(this + 3, a3, a4); + v15 = (char *)this + *(_DWORD *)(*this - 12); + v16 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v14 ) + std::ios::clear(v16, 0); + else + std::ios::clear(v16, *((_DWORD *)v15 + 5) | 4); +} +// 4B7FCE: positive sp value 4 has been found + +//----- (004B8030) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::fstream::basic_fstream(int *this, int *a2, wchar_t *a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + _DWORD *v9; // ecx + int v10; // eax + int v11; // edx + int v12; // edx + int v13; // eax + _DWORD *v14; // eax + char *v15; // ebx + _DWORD *v16; // ecx + + v5 = a2[2]; + v6 = a2[3]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = a2[4]; + this[2] = v8; + v9 = (int *)((char *)this + *(_DWORD *)(v8 - 12) + 8); + *v9 = a2[5]; + std::ios::init((int)v9, 0); + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = a2[8]; + v13 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v13 - 12)) = v12; + this[2] = a2[9]; + std::filebuf::basic_filebuf((int)(this + 3)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 3)); + v14 = std::filebuf::open(this + 3, a3, a4); + v15 = (char *)this + *(_DWORD *)(*this - 12); + v16 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v14 ) + std::ios::clear(v16, 0); + else + std::ios::clear(v16, *((_DWORD *)v15 + 5) | 4); +} +// 4B81BE: positive sp value 4 has been found + +//----- (004B8220) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::fstream::basic_fstream(int *this, int *a2, char **a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + _DWORD *v9; // ecx + int v10; // eax + int v11; // edx + int v12; // edx + int v13; // eax + _DWORD *v14; // eax + char *v15; // ebx + _DWORD *v16; // ecx + + v5 = a2[2]; + v6 = a2[3]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = a2[4]; + this[2] = v8; + v9 = (int *)((char *)this + *(_DWORD *)(v8 - 12) + 8); + *v9 = a2[5]; + std::ios::init((int)v9, 0); + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = a2[8]; + v13 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v13 - 12)) = v12; + this[2] = a2[9]; + std::filebuf::basic_filebuf((int)(this + 3)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 3)); + v14 = std::filebuf::open(this + 3, *a3, a4); + v15 = (char *)this + *(_DWORD *)(*this - 12); + v16 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v14 ) + std::ios::clear(v16, 0); + else + std::ios::clear(v16, *((_DWORD *)v15 + 5) | 4); +} +// 4B83AE: positive sp value 4 has been found + +//----- (004B8410) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::fstream::basic_fstream(int *this, int *a2) +{ + int v3; // eax + int v4; // ecx + int v5; // edx + int v6; // eax + _DWORD *v7; // ecx + int v8; // eax + int v9; // edx + int v10; // edx + int v11; // eax + + v3 = a2[2]; + v4 = a2[3]; + v5 = *(_DWORD *)(v3 - 12); + *this = v3; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v3 - 12), 0); + v6 = a2[4]; + this[2] = v6; + v7 = (int *)((char *)this + *(_DWORD *)(v6 - 12) + 8); + *v7 = a2[5]; + std::ios::init((int)v7, 0); + v8 = a2[1]; + v9 = a2[6]; + *this = v8; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + this[2] = a2[7]; + v10 = a2[8]; + v11 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v11 - 12)) = v10; + this[2] = a2[9]; + std::filebuf::basic_filebuf((int)(this + 3)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 3)); +} +// 4B8546: positive sp value 4 has been found + +//----- (004B85A0) -------------------------------------------------------- +void __fastcall std::fstream::~fstream(_DWORD *a1) +{ + *a1 = off_51AAD4; + a1[30] = off_51AAFC; + a1[2] = off_51AAE8; + a1[3] = off_51AA50; + std::filebuf::close((struct _Unwind_Exception *)(a1 + 3)); + std::__basic_file::~__basic_file((int)(a1 + 13)); + a1[3] = &off_51ADD4; + std::locale::~locale((_DWORD **)a1 + 10); + a1[2] = &unk_5159B4; + *a1 = &unk_51598C; + a1[1] = 0; + a1[30] = &off_51B7D0; + std::ios_base::~ios_base((int)(a1 + 30)); + operator delete(a1); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004B8690) -------------------------------------------------------- +void __fastcall std::fstream::~fstream(int a1) +{ + *(_DWORD *)a1 = off_51AAD4; + *(_DWORD *)(a1 + 120) = off_51AAFC; + *(_DWORD *)(a1 + 8) = off_51AAE8; + *(_DWORD *)(a1 + 12) = off_51AA50; + std::filebuf::close((struct _Unwind_Exception *)(a1 + 12)); + std::__basic_file::~__basic_file(a1 + 52); + *(_DWORD *)(a1 + 12) = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 40)); + *(_DWORD *)(a1 + 8) = &unk_5159B4; + *(_DWORD *)a1 = &unk_51598C; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 120) = &off_51B7D0; + std::ios_base::~ios_base(a1 + 120); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004B8770) -------------------------------------------------------- +void __thiscall std::fstream::~fstream(int *this, int *a2) +{ + int v3; // eax + int v4; // eax + int v5; // eax + int v6; // eax + int v7; // eax + + v3 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = a2[8]; + v4 = a2[9]; + this[3] = (int)off_51AA50; + this[2] = v4; + std::filebuf::close((struct _Unwind_Exception *)(this + 3)); + std::__basic_file::~__basic_file((int)(this + 13)); + this[3] = (int)&off_51ADD4; + std::locale::~locale((_DWORD **)this + 10); + v5 = a2[1]; + *this = v5; + *(int *)((char *)this + *(_DWORD *)(v5 - 12)) = a2[6]; + this[2] = a2[7]; + v6 = a2[4]; + this[2] = v6; + *(int *)((char *)this + *(_DWORD *)(v6 - 12) + 8) = a2[5]; + v7 = a2[2]; + *this = v7; + *(int *)((char *)this + *(_DWORD *)(v7 - 12)) = a2[3]; + this[1] = 0; +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004B8880) -------------------------------------------------------- +_DWORD *__thiscall std::fstream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + char v6; // cl + char v7; // cl + int v8; // eax + std::ios_base *v10; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v10); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + v8 = this[1]; + *((_BYTE *)v4 + 117) = v7; + this[1] = a2[1]; + a2[1] = v8; + std::filebuf::operator=((int)(this + 3), (int)(a2 + 3)); + return this; +} +// 4B88C0: variable 'v10' is possibly undefined + +//----- (004B8960) -------------------------------------------------------- +int __thiscall std::wfstream::open(int *this, char *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::wfilebuf::open(this + 3, a2, a3) == 0; + v5 = *this; + if ( v4 ) + return std::wios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::wios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004B89D0) -------------------------------------------------------- +int __thiscall std::wfstream::open(int *this, wchar_t *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::wfilebuf::open(this + 3, a2, a3) == 0; + v5 = *this; + if ( v4 ) + return std::wios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::wios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004B8A40) -------------------------------------------------------- +int __thiscall std::wfstream::open(int *this, char **a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::wfilebuf::open(this + 3, *a2, a3) == 0; + v5 = *this; + if ( v4 ) + return std::wios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::wios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004B8AB0) -------------------------------------------------------- +void __thiscall std::wfstream::swap(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // edi + std::ios_base *v4; // esi + std::ios_base *v5; // edx + __int16 v6; // cx + int v7; // edx + std::ios_base *v8; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = a2[1]; + a2[1] = v7; + std::wfilebuf::swap((int)(this + 3), (int)(a2 + 3)); +} +// 4B8AF0: variable 'v8' is possibly undefined + +//----- (004B8B80) -------------------------------------------------------- +struct _Unwind_Exception *__fastcall std::wfstream::close(_DWORD *a1) +{ + struct _Unwind_Exception *result; // eax + + result = std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 3)); + if ( !result ) + return (struct _Unwind_Exception *)std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 4); + return result; +} + +//----- (004B8BC0) -------------------------------------------------------- +bool __fastcall std::wfstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 52)); +} + +//----- (004B8BD0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::wfstream::basic_fstream(_DWORD *this, int *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // ecx + int v5; // eax + std::ios_base *v6; // [esp+0h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v8; // [esp+14h] [ebp-44h] + + v8 = this + 31; + std::ios_base::ios_base(this + 31); + v2 = a2[1]; + *((_WORD *)this + 120) = 0; + *this = &unk_5159DC; + this[1] = v2; + this[59] = 0; + v3 = *a2; + *((_BYTE *)this + 242) = 0; + this[61] = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[62] = 0; + this[63] = 0; + this[64] = 0; + this[31] = &unk_5159F0; + lpuexcpt = v4; + std::ios_base::_M_move((int)v8, v4, v6); + std::wios::_M_cache_locale(v8, (int)(this + 58)); + this[61] = 0; + v5 = *((_DWORD *)lpuexcpt + 28); + *((_DWORD *)lpuexcpt + 28) = 0; + this[59] = v5; + *((_WORD *)this + 120) = *((_WORD *)lpuexcpt + 58); + *((_BYTE *)this + 242) = *((_BYTE *)lpuexcpt + 118); + a2[1] = 0; + *this = off_51AB10; + this[31] = off_51AB38; + this[2] = off_51AB24; + std::wfilebuf::basic_filebuf((int)(this + 3), (std::locale *)(a2 + 3)); + this[61] = this + 3; +} +// 4B8D73: positive sp value 4 has been found +// 4B8C7C: variable 'v6' is possibly undefined +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); + +//----- (004B8D80) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::wfstream::basic_fstream(_DWORD *this, char *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+24h] [ebp-44h] + + v5 = this + 31; + std::ios_base::ios_base(this + 31); + this[59] = 0; + *((_WORD *)this + 120) = 0; + *((_BYTE *)this + 242) = 0; + this[61] = 0; + this[62] = 0; + this[63] = 0; + this[64] = 0; + *this = &unk_5159DC; + this[31] = &unk_5159F0; + this[1] = 0; + std::wios::init((int)v5, 0); + this[2] = &unk_515A40; + this[31] = &unk_515A54; + std::wios::init((int)v5, 0); + *this = off_51AB10; + this[31] = off_51AB38; + this[2] = off_51AB24; + std::wfilebuf::basic_filebuf((int)(this + 3)); + std::wios::init((int)v5, (int)(this + 3)); + v3 = std::wfilebuf::open(this + 3, a2, a3); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::wios::clear(v4, 0); + else + std::wios::clear(v4, v4[5] | 4); +} +// 4B8F45: positive sp value 4 has been found +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); + +//----- (004B8F70) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::wfstream::basic_fstream(_DWORD *this, wchar_t *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+24h] [ebp-44h] + + v5 = this + 31; + std::ios_base::ios_base(this + 31); + this[59] = 0; + *((_WORD *)this + 120) = 0; + *((_BYTE *)this + 242) = 0; + this[61] = 0; + this[62] = 0; + this[63] = 0; + this[64] = 0; + *this = &unk_5159DC; + this[31] = &unk_5159F0; + this[1] = 0; + std::wios::init((int)v5, 0); + this[2] = &unk_515A40; + this[31] = &unk_515A54; + std::wios::init((int)v5, 0); + *this = off_51AB10; + this[31] = off_51AB38; + this[2] = off_51AB24; + std::wfilebuf::basic_filebuf((int)(this + 3)); + std::wios::init((int)v5, (int)(this + 3)); + v3 = std::wfilebuf::open(this + 3, a2, a3); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::wios::clear(v4, 0); + else + std::wios::clear(v4, v4[5] | 4); +} +// 4B9135: positive sp value 4 has been found +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); + +//----- (004B9160) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::wfstream::basic_fstream(_DWORD *this, char **a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+24h] [ebp-44h] + + v5 = this + 31; + std::ios_base::ios_base(this + 31); + this[59] = 0; + *((_WORD *)this + 120) = 0; + *((_BYTE *)this + 242) = 0; + this[61] = 0; + this[62] = 0; + this[63] = 0; + this[64] = 0; + *this = &unk_5159DC; + this[31] = &unk_5159F0; + this[1] = 0; + std::wios::init((int)v5, 0); + this[2] = &unk_515A40; + this[31] = &unk_515A54; + std::wios::init((int)v5, 0); + *this = off_51AB10; + this[31] = off_51AB38; + this[2] = off_51AB24; + std::wfilebuf::basic_filebuf((int)(this + 3)); + std::wios::init((int)v5, (int)(this + 3)); + v3 = std::wfilebuf::open(this + 3, *a2, a3); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::wios::clear(v4, 0); + else + std::wios::clear(v4, v4[5] | 4); +} +// 4B9325: positive sp value 4 has been found +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); + +//----- (004B9350) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __fastcall std::wfstream::basic_fstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 124; + std::ios_base::ios_base((_DWORD *)(a1 + 124)); + *(_DWORD *)(a1 + 236) = 0; + *(_WORD *)(a1 + 240) = 0; + *(_BYTE *)(a1 + 242) = 0; + *(_DWORD *)(a1 + 244) = 0; + *(_DWORD *)(a1 + 248) = 0; + *(_DWORD *)(a1 + 252) = 0; + *(_DWORD *)(a1 + 256) = 0; + *(_DWORD *)a1 = &unk_5159DC; + *(_DWORD *)(a1 + 124) = &unk_5159F0; + *(_DWORD *)(a1 + 4) = 0; + std::wios::init(v1, 0); + *(_DWORD *)(a1 + 8) = &unk_515A40; + *(_DWORD *)(a1 + 124) = &unk_515A54; + std::wios::init(v1, 0); + *(_DWORD *)a1 = off_51AB10; + *(_DWORD *)(a1 + 124) = off_51AB38; + *(_DWORD *)(a1 + 8) = off_51AB24; + std::wfilebuf::basic_filebuf(a1 + 12); + std::wios::init(v1, a1 + 12); +} +// 4B94C0: positive sp value 4 has been found +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); + +//----- (004B94F0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::wfstream::basic_fstream(int *this, int *a2, _DWORD *a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // eax + int v11; // edx + int v12; // eax + int v13; // edx + std::ios_base *v14; // [esp+0h] [ebp-58h] + std::ios_base *v15; // [esp+10h] [ebp-48h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-44h] + + v4 = a2[2]; + v5 = a2[3]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = a3[1]; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v4 - 12)); + v15 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)lpuexcpt, v15, v14); + std::wios::_M_cache_locale(lpuexcpt, (int)lpuexcpt + 108); + v7 = *((_DWORD *)v15 + 28); + *((_DWORD *)lpuexcpt + 30) = 0; + *((_DWORD *)v15 + 28) = 0; + *((_DWORD *)lpuexcpt + 28) = v7; + *((_WORD *)lpuexcpt + 58) = *((_WORD *)v15 + 58); + *((_BYTE *)lpuexcpt + 118) = *((_BYTE *)v15 + 118); + a3[1] = 0; + v8 = a2[5]; + v9 = a2[4]; + this[2] = v9; + *(int *)((char *)this + *(_DWORD *)(v9 - 12) + 8) = v8; + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = *a2; + v13 = a2[8]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v12 - 12)) = v13; + this[2] = a2[9]; + std::wfilebuf::basic_filebuf((int)(this + 3), (std::locale *)(a3 + 3)); + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)(this + 3); +} +// 4B9645: positive sp value 4 has been found +// 4B9556: variable 'v14' is possibly undefined + +//----- (004B9660) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::wfstream::basic_fstream(int *this, int *a2, char *a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + _DWORD *v9; // ecx + int v10; // eax + int v11; // edx + int v12; // edx + int v13; // eax + _DWORD *v14; // eax + char *v15; // ebx + _DWORD *v16; // ecx + + v5 = a2[2]; + v6 = a2[3]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = a2[4]; + this[2] = v8; + v9 = (int *)((char *)this + *(_DWORD *)(v8 - 12) + 8); + *v9 = a2[5]; + std::wios::init((int)v9, 0); + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = a2[8]; + v13 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v13 - 12)) = v12; + this[2] = a2[9]; + std::wfilebuf::basic_filebuf((int)(this + 3)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 3)); + v14 = std::wfilebuf::open(this + 3, a3, a4); + v15 = (char *)this + *(_DWORD *)(*this - 12); + v16 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v14 ) + std::wios::clear(v16, 0); + else + std::wios::clear(v16, *((_DWORD *)v15 + 5) | 4); +} +// 4B97EE: positive sp value 4 has been found + +//----- (004B9850) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::wfstream::basic_fstream(int *this, int *a2, wchar_t *a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + _DWORD *v9; // ecx + int v10; // eax + int v11; // edx + int v12; // edx + int v13; // eax + _DWORD *v14; // eax + char *v15; // ebx + _DWORD *v16; // ecx + + v5 = a2[2]; + v6 = a2[3]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = a2[4]; + this[2] = v8; + v9 = (int *)((char *)this + *(_DWORD *)(v8 - 12) + 8); + *v9 = a2[5]; + std::wios::init((int)v9, 0); + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = a2[8]; + v13 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v13 - 12)) = v12; + this[2] = a2[9]; + std::wfilebuf::basic_filebuf((int)(this + 3)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 3)); + v14 = std::wfilebuf::open(this + 3, a3, a4); + v15 = (char *)this + *(_DWORD *)(*this - 12); + v16 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v14 ) + std::wios::clear(v16, 0); + else + std::wios::clear(v16, *((_DWORD *)v15 + 5) | 4); +} +// 4B99DE: positive sp value 4 has been found + +//----- (004B9A40) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::wfstream::basic_fstream(int *this, int *a2, char **a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + _DWORD *v9; // ecx + int v10; // eax + int v11; // edx + int v12; // edx + int v13; // eax + _DWORD *v14; // eax + char *v15; // ebx + _DWORD *v16; // ecx + + v5 = a2[2]; + v6 = a2[3]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = a2[4]; + this[2] = v8; + v9 = (int *)((char *)this + *(_DWORD *)(v8 - 12) + 8); + *v9 = a2[5]; + std::wios::init((int)v9, 0); + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = a2[8]; + v13 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v13 - 12)) = v12; + this[2] = a2[9]; + std::wfilebuf::basic_filebuf((int)(this + 3)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 3)); + v14 = std::wfilebuf::open(this + 3, *a3, a4); + v15 = (char *)this + *(_DWORD *)(*this - 12); + v16 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v14 ) + std::wios::clear(v16, 0); + else + std::wios::clear(v16, *((_DWORD *)v15 + 5) | 4); +} +// 4B9BCE: positive sp value 4 has been found + +//----- (004B9C30) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::wfstream::basic_fstream(int *this, int *a2) +{ + int v3; // eax + int v4; // ecx + int v5; // edx + int v6; // eax + _DWORD *v7; // ecx + int v8; // eax + int v9; // edx + int v10; // edx + int v11; // eax + + v3 = a2[2]; + v4 = a2[3]; + v5 = *(_DWORD *)(v3 - 12); + *this = v3; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v3 - 12), 0); + v6 = a2[4]; + this[2] = v6; + v7 = (int *)((char *)this + *(_DWORD *)(v6 - 12) + 8); + *v7 = a2[5]; + std::wios::init((int)v7, 0); + v8 = a2[1]; + v9 = a2[6]; + *this = v8; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + this[2] = a2[7]; + v10 = a2[8]; + v11 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v11 - 12)) = v10; + this[2] = a2[9]; + std::wfilebuf::basic_filebuf((int)(this + 3)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 3)); +} +// 4B9D66: positive sp value 4 has been found + +//----- (004B9DC0) -------------------------------------------------------- +void __fastcall std::wfstream::~wfstream(_DWORD *a1) +{ + *a1 = off_51AB10; + a1[31] = off_51AB38; + a1[2] = off_51AB24; + a1[3] = off_51AA90; + std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 3)); + std::__basic_file::~__basic_file((int)(a1 + 13)); + a1[3] = &off_51AE14; + std::locale::~locale((_DWORD **)a1 + 10); + a1[2] = &unk_515A40; + *a1 = &unk_5159DC; + a1[1] = 0; + a1[31] = &off_51B7E0; + std::ios_base::~ios_base((int)(a1 + 31)); + operator delete(a1); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004B9EB0) -------------------------------------------------------- +void __fastcall std::wfstream::~wfstream(int a1) +{ + *(_DWORD *)a1 = off_51AB10; + *(_DWORD *)(a1 + 124) = off_51AB38; + *(_DWORD *)(a1 + 8) = off_51AB24; + *(_DWORD *)(a1 + 12) = off_51AA90; + std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 12)); + std::__basic_file::~__basic_file(a1 + 52); + *(_DWORD *)(a1 + 12) = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 40)); + *(_DWORD *)(a1 + 8) = &unk_515A40; + *(_DWORD *)a1 = &unk_5159DC; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 124) = &off_51B7E0; + std::ios_base::~ios_base(a1 + 124); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004B9F90) -------------------------------------------------------- +void __thiscall std::wfstream::~wfstream(int *this, int *a2) +{ + int v3; // eax + int v4; // eax + int v5; // eax + int v6; // eax + int v7; // eax + + v3 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = a2[8]; + v4 = a2[9]; + this[3] = (int)off_51AA90; + this[2] = v4; + std::wfilebuf::close((struct _Unwind_Exception *)(this + 3)); + std::__basic_file::~__basic_file((int)(this + 13)); + this[3] = (int)&off_51AE14; + std::locale::~locale((_DWORD **)this + 10); + v5 = a2[1]; + *this = v5; + *(int *)((char *)this + *(_DWORD *)(v5 - 12)) = a2[6]; + this[2] = a2[7]; + v6 = a2[4]; + this[2] = v6; + *(int *)((char *)this + *(_DWORD *)(v6 - 12) + 8) = a2[5]; + v7 = a2[2]; + *this = v7; + *(int *)((char *)this + *(_DWORD *)(v7 - 12)) = a2[3]; + this[1] = 0; +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004BA0A0) -------------------------------------------------------- +_DWORD *__thiscall std::wfstream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + __int16 v6; // cx + int v7; // eax + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = a2[1]; + a2[1] = v7; + std::wfilebuf::operator=((int)(this + 3), (int)(a2 + 3)); + return this; +} +// 4BA0E0: variable 'v9' is possibly undefined + +//----- (004BA180) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 48))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BA180: using guessed type int var_1C[7]; + +//----- (004BA340) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 8))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BA340: using guessed type int var_1C[7]; + +//----- (004BA500) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 40))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BA500: using guessed type int var_1C[7]; + +//----- (004BA6C0) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 44))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BA6C0: using guessed type int var_1C[7]; + +//----- (004BA880) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 36))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BA880: using guessed type int var_1C[7]; + +//----- (004BAA40) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 20))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BAA40: using guessed type int var_1C[7]; + +//----- (004BAC00) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 12))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BAC00: using guessed type int var_1C[7]; + +//----- (004BADC0) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 24))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BADC0: using guessed type int var_1C[7]; + +//----- (004BAF80) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 16))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BAF80: using guessed type int var_1C[7]; + +//----- (004BB140) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 28))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BB140: using guessed type int var_1C[7]; + +//----- (004BB300) -------------------------------------------------------- +char *__thiscall std::wistream::_M_extract(char *this, int a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+6Bh] [ebp-1Dh] BYREF + int v7[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7[0] = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int))(*(_DWORD *)v3 + 32))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + v7, + a2); + if ( v7[0] ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7[0]); + } + return this; +} +// 4BB300: using guessed type int var_1C[7]; + +//----- (004BB4C0) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::get(_DWORD *this, _WORD *a2, int a3) +{ + int v4; // ecx + __int16 v5; // ax + + v4 = *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 124); + if ( !v4 ) + std::__throw_bad_cast(); + v5 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 40))(v4, 10); + return std::wistream::get(this, a2, a3, v5); +} + +//----- (004BB510) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::get(_DWORD *this, _WORD *a2, int a3, __int16 a4) +{ + int v4; // ecx + int v6; // eax + __int16 *v7; // eax + __int16 v8; // ax + int v9; // edx + __int16 v10; // dx + __int16 *v11; // eax + __int16 *v12; // eax + int v13; // edx + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-64h] + char v16[25]; // [esp+6Fh] [ebp-19h] BYREF + + this[1] = 0; + std::wistream::sentry::sentry(v16, this, 1); + if ( !v16[0] ) + { + v4 = this[1]; + goto LABEL_3; + } + lpuexcpt = *(struct _Unwind_Exception **)((char *)this + *(_DWORD *)(*this - 12) + 120); + v7 = (__int16 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v7 >= *((_DWORD *)lpuexcpt + 3) ) + v8 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + else + v8 = *v7; + v4 = this[1]; + v9 = v4 + 1; + if ( a3 <= v4 + 1 ) + { +LABEL_29: + if ( v8 != -1 ) + goto LABEL_3; + goto LABEL_30; + } + if ( v8 == -1 ) + { +LABEL_30: + if ( a3 > 0 ) + *a2 = 0; + v6 = 6; + if ( !v4 ) + { +LABEL_8: + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | v6); + return this; + } + goto LABEL_33; + } + if ( a4 == v8 ) + { +LABEL_3: + if ( a3 > 0 ) + *a2 = 0; + if ( !v4 ) + { + v6 = 4; + goto LABEL_8; + } + return this; + } + while ( 1 ) + { + *a2++ = v8; + this[1] = v9; + v12 = (__int16 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v12 < *((_DWORD *)lpuexcpt + 3) ) + { + v10 = *v12; + *((_DWORD *)lpuexcpt + 2) = v12 + 1; + if ( v10 == -1 ) + goto LABEL_23; + } + else if ( (*(unsigned __int16 (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 40))(lpuexcpt) == 0xFFFF ) + { +LABEL_23: + v13 = this[1]; + if ( a3 > 0 ) + { + *a2 = 0; + v6 = 2; + if ( v13 ) + goto LABEL_8; + goto LABEL_25; + } + if ( !v13 ) + { + v6 = 2; + goto LABEL_25; + } +LABEL_33: + v6 = 2; + goto LABEL_8; + } + v11 = (__int16 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v11 >= *((_DWORD *)lpuexcpt + 3) ) + v8 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + else + v8 = *v11; + v4 = this[1]; + v9 = v4 + 1; + if ( v4 + 1 >= a3 ) + goto LABEL_29; + if ( v8 == -1 ) + break; + if ( a4 == v8 ) + { + v6 = 0; + goto LABEL_35; + } + } + v6 = 2; +LABEL_35: + if ( a3 > 0 ) + *a2 = 0; + if ( !v4 ) + { +LABEL_25: + v6 |= 4u; + goto LABEL_8; + } + if ( v6 ) + goto LABEL_8; + return this; +} +// 4BB510: using guessed type char var_19[25]; + +//----- (004BB870) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::get(_DWORD *this, _DWORD *a2) +{ + int v3; // ecx + __int16 v4; // ax + + v3 = *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 124); + if ( !v3 ) + std::__throw_bad_cast(); + v4 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v3 + 40))(v3, 10); + return std::wistream::get(this, a2, v4); +} + +//----- (004BB8C0) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::get(_DWORD *this, _DWORD *a2, __int16 a3) +{ + int v3; // eax + unsigned __int16 *v5; // eax + int v6; // edx + __int16 *v7; // eax + __int16 v8; // dx + _WORD *v9; // eax + _WORD *v10; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-64h] + char v13[25]; // [esp+6Fh] [ebp-19h] BYREF + + this[1] = 0; + std::wistream::sentry::sentry(v13, this, 1); + if ( v13[0] ) + { + lpuexcpt = *(struct _Unwind_Exception **)((char *)this + *(_DWORD *)(*this - 12) + 120); + v5 = (unsigned __int16 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v5 >= *((_DWORD *)lpuexcpt + 3) ) + v6 = (*(unsigned __int16 (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + else + v6 = *v5; + if ( (_WORD)v6 != 0xFFFF ) + { + if ( a3 == (_WORD)v6 ) + goto LABEL_2; + while ( 1 ) + { + v10 = (_WORD *)a2[5]; + if ( (unsigned int)v10 < a2[6] ) + { + *v10 = v6; + a2[5] = v10 + 1; + } + else if ( (*(unsigned __int16 (__thiscall **)(_DWORD *, int))(*a2 + 52))(a2, v6) == 0xFFFF ) + { + goto LABEL_2; + } + ++this[1]; + v7 = (__int16 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v7 >= *((_DWORD *)lpuexcpt + 3) ) + { + v8 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 40))(lpuexcpt); + } + else + { + v8 = *v7; + *((_DWORD *)lpuexcpt + 2) = v7 + 1; + } + if ( v8 == -1 ) + break; + v9 = (_WORD *)*((_DWORD *)lpuexcpt + 2); + v6 = (unsigned int)v9 >= *((_DWORD *)lpuexcpt + 3) + ? (*(unsigned __int16 (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt) + : (unsigned __int16)*v9; + if ( (_WORD)v6 == 0xFFFF ) + break; + if ( a3 == (_WORD)v6 ) + goto LABEL_2; + } + } + v3 = this[1] == 0 ? 6 : 2; + goto LABEL_4; + } +LABEL_2: + if ( !this[1] ) + { + v3 = 4; +LABEL_4: + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | v3); + } + return this; +} +// 4BB8C0: using guessed type char var_19[25]; + +//----- (004BBB50) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::get(_DWORD *this, _WORD *a2) +{ + int v2; // eax + _DWORD *v4; // ecx + __int16 *v5; // eax + __int16 v6; // dx + char v8[25]; // [esp+5Fh] [ebp-19h] BYREF + + this[1] = 0; + std::wistream::sentry::sentry(v8, this, 1); + if ( v8[0] ) + { + v4 = *(_DWORD **)((char *)this + *(_DWORD *)(*this - 12) + 120); + v5 = (__int16 *)v4[2]; + if ( (unsigned int)v5 >= v4[3] ) + { + v6 = (*(int (__fastcall **)(_DWORD *))(*v4 + 40))(v4); + } + else + { + v6 = *v5; + v4[2] = v5 + 1; + } + if ( v6 != -1 ) + { + this[1] = 1; + *a2 = v6; + return this; + } + v2 = this[1] == 0 ? 6 : 2; + goto LABEL_4; + } + if ( !this[1] ) + { + v2 = 4; +LABEL_4: + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | v2); + } + return this; +} +// 4BBB50: using guessed type char var_19[25]; + +//----- (004BBD10) -------------------------------------------------------- +int __fastcall std::wistream::get(_DWORD *a1) +{ + int v1; // eax + _DWORD *v3; // ecx + unsigned __int16 *v4; // eax + unsigned __int16 v5; // dx + unsigned __int16 lpuexcpt; // [esp+14h] [ebp-64h] + char v8[25]; // [esp+5Fh] [ebp-19h] BYREF + + a1[1] = 0; + std::wistream::sentry::sentry(v8, a1, 1); + if ( v8[0] ) + { + v3 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + v4 = (unsigned __int16 *)v3[2]; + if ( (unsigned int)v4 >= v3[3] ) + { + lpuexcpt = (*(int (__fastcall **)(_DWORD *))(*v3 + 40))(v3); + } + else + { + v5 = *v4; + v3[2] = v4 + 1; + lpuexcpt = v5; + } + if ( lpuexcpt != 0xFFFF ) + { + a1[1] = 1; + return lpuexcpt; + } + v1 = a1[1] == 0 ? 6 : 2; + goto LABEL_4; + } + if ( !a1[1] ) + { + v1 = 4; +LABEL_4: + std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | v1); + } + return (unsigned __int16)-1; +} +// 4BBD10: using guessed type char var_19[25]; + +//----- (004BBEE0) -------------------------------------------------------- +int __fastcall std::wistream::peek(_DWORD *a1) +{ + _DWORD *v2; // ecx + unsigned __int16 *v3; // eax + unsigned __int16 lpuexcpt; // [esp+14h] [ebp-64h] + char v6[25]; // [esp+5Fh] [ebp-19h] BYREF + + a1[1] = 0; + std::wistream::sentry::sentry(v6, a1, 1); + lpuexcpt = -1; + if ( v6[0] ) + { + v2 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + v3 = (unsigned __int16 *)v2[2]; + if ( (unsigned int)v3 >= v2[3] ) + lpuexcpt = (*(int (__fastcall **)(_DWORD *))(*v2 + 36))(v2); + else + lpuexcpt = *v3; + if ( lpuexcpt == 0xFFFF ) + std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 2); + } + return lpuexcpt; +} +// 4BBEE0: using guessed type char var_19[25]; + +//----- (004BC090) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::read(_DWORD *this, int a2, int a3) +{ + int v3; // ecx + int v4; // eax + char v7[25]; // [esp+5Fh] [ebp-19h] BYREF + + this[1] = 0; + std::wistream::sentry::sentry(v7, this, 1); + if ( v7[0] ) + { + v3 = *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 120); + v4 = (*(int (__thiscall **)(int, int, int))(*(_DWORD *)v3 + 32))(v3, a2, a3); + this[1] = v4; + if ( a3 != v4 ) + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 6); + } + return this; +} +// 4BC090: using guessed type char var_19[25]; + +//----- (004BC220) -------------------------------------------------------- +void __thiscall std::wistream::swap(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // edx + __int16 v6; // cx + int v7; // edx + std::ios_base *v8; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = a2[1]; + a2[1] = v7; +} +// 4BC25D: variable 'v8' is possibly undefined + +//----- (004BC2E0) -------------------------------------------------------- +int __fastcall std::wistream::sync(_DWORD *a1) +{ + int v1; // ecx + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v5[25]; // [esp+5Fh] [ebp-19h] BYREF + + std::wistream::sentry::sentry(v5, a1, 1); + if ( !v5[0] ) + return -1; + v1 = *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + if ( !v1 ) + return -1; + lpuexcpt = (struct _Unwind_Exception *)(*(int (__fastcall **)(int))(*(_DWORD *)v1 + 24))(v1); + if ( lpuexcpt != (struct _Unwind_Exception *)-1 ) + return 0; + std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 1); + return (int)lpuexcpt; +} +// 4BC2E0: using guessed type char var_19[25]; + +//----- (004BC470) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::seekg(_DWORD *this, int a2, int a3, int a4, int a5) +{ + char *v5; // edi + _DWORD *v6; // eax + int v7; // edi + void (__thiscall *v8)(int *, _DWORD *, int, int, int, int, int); // eax + _DWORD *v10; // [esp+0h] [ebp-B8h] + char v12; // [esp+7Fh] [ebp-39h] BYREF + int v13[14]; // [esp+80h] [ebp-38h] BYREF + + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) & 0xFFFFFFFD); + std::wistream::sentry::sentry(&v12, this, 1); + if ( v12 ) + { + v5 = (char *)this + *(_DWORD *)(*this - 12); + if ( (v5[20] & 5) == 0 ) + { + v6 = (_DWORD *)*((_DWORD *)v5 + 30); + v7 = *v6; + v13[6] = a4; + v10 = v6; + v8 = *(void (__thiscall **)(int *, _DWORD *, int, int, int, int, int))(v7 + 20); + v13[4] = a2; + v13[5] = a3; + v13[7] = a5; + v8(v13, v10, a2, a3, a4, a5, 8); + if ( (v13[0] & v13[1]) == -1 ) + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 4); + } + } + return this; +} + +//----- (004BC6B0) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::seekg(_DWORD *this, int a2, int a3, int a4) +{ + char *v4; // edi + char v7; // [esp+6Fh] [ebp-29h] BYREF + int v8[10]; // [esp+70h] [ebp-28h] BYREF + + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) & 0xFFFFFFFD); + std::wistream::sentry::sentry(&v7, this, 1); + if ( v7 ) + { + v4 = (char *)this + *(_DWORD *)(*this - 12); + if ( (v4[20] & 5) == 0 ) + { + (*(void (__thiscall **)(int *, _DWORD, int, int, int, int))(**((_DWORD **)v4 + 30) + 16))( + v8, + *((_DWORD *)v4 + 30), + a2, + a3, + a4, + 8); + if ( (v8[0] & v8[1]) == -1 ) + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 4); + } + } + return this; +} + +//----- (004BC880) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::tellg(_DWORD *this, _DWORD *a2) +{ + char *v2; // esi + char v5; // [esp+6Fh] [ebp-29h] BYREF + int v6[10]; // [esp+70h] [ebp-28h] BYREF + + *this = -1; + this[1] = -1; + this[2] = 0; + std::wistream::sentry::sentry(&v5, a2, 1); + if ( v5 ) + { + v2 = (char *)a2 + *(_DWORD *)(*a2 - 12); + if ( (v2[20] & 5) == 0 ) + { + (*(void (__thiscall **)(int *, _DWORD, _DWORD, _DWORD, int, int))(**((_DWORD **)v2 + 30) + 16))( + v6, + *((_DWORD *)v2 + 30), + 0, + 0, + 1, + 8); + *this = v6[0]; + this[1] = v6[1]; + this[2] = v6[2]; + } + } + return this; +} + +//----- (004BCA30) -------------------------------------------------------- +int *__fastcall std::wistream::unget(int *a1) +{ + int v2; // eax + _DWORD *v3; // ecx + _DWORD *v4; // eax + unsigned int v5; // eax + unsigned int v6; // edx + __int16 v7; // ax + char v10[25]; // [esp+5Fh] [ebp-19h] BYREF + + v2 = *a1; + a1[1] = 0; + std::wios::clear( + (int *)((char *)a1 + *(_DWORD *)(v2 - 12)), + *(int *)((char *)a1 + *(_DWORD *)(v2 - 12) + 20) & 0xFFFFFFFD); + std::wistream::sentry::sentry(v10, a1, 1); + if ( !v10[0] ) + return a1; + v3 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + v4 = (int *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + if ( !v3 ) + { +LABEL_8: + std::wios::clear(v4, v4[5] | 1); + return a1; + } + v5 = v3[2]; + if ( v3[1] >= v5 ) + { + v7 = (*(int (__thiscall **)(_DWORD *, int))(*v3 + 44))(v3, 0xFFFF); + } + else + { + v6 = v5 - 2; + v7 = *(_WORD *)(v5 - 2); + v3[2] = v6; + } + if ( v7 == -1 ) + { + v4 = (int *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + goto LABEL_8; + } + return a1; +} +// 4BCA30: using guessed type char var_19[25]; + +//----- (004BCC00) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::ignore(_DWORD *this, int a2) +{ + __int16 *v3; // eax + __int16 v4; // dx + signed int i; // eax + unsigned int v6; // esi + __int16 *v7; // ecx + int v8; // edx + __int16 *v9; // ecx + __int16 v10; // ax + __int16 *v11; // eax + _DWORD *v12; // [esp+1Ch] [ebp-6Ch] + char v13; // [esp+23h] [ebp-65h] + char lpuexcpt; // [esp+24h] [ebp-64h] + _DWORD *v15; // [esp+28h] [ebp-60h] + char v16[25]; // [esp+6Fh] [ebp-19h] BYREF + + v15 = this; + if ( a2 == 1 ) + return std::wistream::ignore(this); + this[1] = 0; + std::wistream::sentry::sentry(v16, this, 1); + if ( a2 > 0 ) + { + lpuexcpt = v16[0]; + if ( v16[0] ) + { + v12 = *(_DWORD **)((char *)v15 + *(_DWORD *)(*v15 - 12) + 120); + v3 = (__int16 *)v12[2]; + if ( (unsigned int)v3 >= v12[3] ) + v4 = (*(int (__fastcall **)(_DWORD *))(*v12 + 36))(v12); + else + v4 = *v3; + v13 = 0; + for ( i = v15[1]; ; i = 0x80000000 ) + { +LABEL_9: + if ( a2 > i ) + { + while ( v4 != -1 ) + { + v6 = v12[3]; + v7 = (__int16 *)v12[2]; + v8 = (int)(v6 - (_DWORD)v7) >> 1; + if ( v8 > a2 - i ) + v8 = a2 - i; + if ( v8 <= 1 ) + { + v15[1] = i + 1; + if ( (unsigned int)v7 >= v6 ) + { + v10 = (*(int (__fastcall **)(_DWORD *))(*v12 + 40))(v12); + } + else + { + v10 = *v7; + v12[2] = v7 + 1; + } + if ( v10 != -1 ) + { + v11 = (__int16 *)v12[2]; + if ( (unsigned int)v11 < v12[3] ) + { + v4 = *v11; + i = v15[1]; + goto LABEL_9; + } +LABEL_27: + v4 = (*(int (__fastcall **)(_DWORD *))(*v12 + 36))(v12); + i = v15[1]; + goto LABEL_9; + } + break; + } + v9 = &v7[v8]; + i += v8; + v12[2] = v9; + v15[1] = i; + if ( v6 <= (unsigned int)v9 ) + goto LABEL_27; + v4 = *v9; + if ( a2 <= i ) + goto LABEL_16; + } +LABEL_24: + if ( v13 ) + v15[1] = 0x7FFFFFFF; +LABEL_26: + std::wios::clear( + (_DWORD *)((char *)v15 + *(_DWORD *)(*v15 - 12)), + *(_DWORD *)((char *)v15 + *(_DWORD *)(*v15 - 12) + 20) | 2); + return v15; + } +LABEL_16: + if ( a2 != 0x7FFFFFFF ) + break; + if ( v4 == -1 ) + goto LABEL_24; + v15[1] = 0x80000000; + v13 = lpuexcpt; + } + if ( v13 ) + v15[1] = 0x7FFFFFFF; + if ( v4 == -1 ) + goto LABEL_26; + } + } + return v15; +} +// 4BCC00: using guessed type char var_19[25]; + +//----- (004BCF00) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::ignore(_DWORD *this, int a2, __int16 a3) +{ + __int16 *v4; // eax + __int16 v5; // ax + signed int i; // ecx + unsigned int v7; // edi + __int16 *v8; // esi + int v9; // ebx + int v10; // edx + int v11; // eax + _WORD *v12; // eax + __int16 *v13; // eax + unsigned int v14; // eax + __int16 v15; // ax + __int16 *v16; // eax + _DWORD *v17; // [esp+28h] [ebp-70h] + char v18; // [esp+2Eh] [ebp-6Ah] + char v19; // [esp+2Fh] [ebp-69h] + _DWORD *v20; // [esp+38h] [ebp-60h] + char v21[25]; // [esp+7Fh] [ebp-19h] BYREF + + v20 = this; + if ( a3 == -1 ) + return std::wistream::ignore(this, a2); + this[1] = 0; + std::wistream::sentry::sentry(v21, this, 1); + if ( a2 > 0 ) + { + v19 = v21[0]; + if ( v21[0] ) + { + v17 = *(_DWORD **)((char *)v20 + *(_DWORD *)(*v20 - 12) + 120); + v4 = (__int16 *)v17[2]; + if ( (unsigned int)v4 >= v17[3] ) + v5 = (*(int (__fastcall **)(_DWORD *))(*v17 + 36))(v17); + else + v5 = *v4; + v18 = 0; +LABEL_9: + for ( i = v20[1]; a2 <= i; i = 0x80000000 ) + { +LABEL_22: + if ( a2 != 0x7FFFFFFF ) + { + if ( v18 ) + goto LABEL_29; + goto LABEL_30; + } + if ( v5 == -1 ) + goto LABEL_37; + if ( v5 == a3 ) + { + if ( !v18 ) + goto LABEL_33; +LABEL_29: + v20[1] = 0x7FFFFFFF; +LABEL_30: + if ( v5 != -1 ) + { + if ( v5 != a3 ) + return v20; +LABEL_32: + i = v20[1]; +LABEL_33: + if ( i != 0x7FFFFFFF ) +LABEL_34: + v20[1] = i + 1; + v14 = v17[2]; + if ( v14 >= v17[3] ) + (*(void (__fastcall **)(_DWORD *))(*v17 + 40))(v17); + else + v17[2] = v14 + 2; + return v20; + } +LABEL_39: + std::wios::clear( + (_DWORD *)((char *)v20 + *(_DWORD *)(*v20 - 12)), + *(_DWORD *)((char *)v20 + *(_DWORD *)(*v20 - 12) + 20) | 2); + return v20; + } + v20[1] = 0x80000000; + v18 = v19; + } + while ( v5 != -1 ) + { + if ( v5 == a3 ) + { + if ( a2 == 0x7FFFFFFF ) + { + if ( !v18 ) + goto LABEL_34; + } + else if ( !v18 ) + { + goto LABEL_32; + } + goto LABEL_29; + } + v7 = v17[3]; + v8 = (__int16 *)v17[2]; + v9 = a2 - i; + if ( (int)(v7 - (_DWORD)v8) >> 1 <= a2 - i ) + v9 = (v17[3] - (int)v8) >> 1; + if ( v9 <= 1 ) + { + v20[1] = i + 1; + if ( v7 <= (unsigned int)v8 ) + { + v15 = (*(int (__fastcall **)(_DWORD *))(*v17 + 40))(v17); + } + else + { + v15 = *v8; + v17[2] = v8 + 1; + } + if ( v15 != -1 ) + { + v16 = (__int16 *)v17[2]; + if ( (unsigned int)v16 < v17[3] ) + { + v5 = *v16; + i = v20[1]; + goto LABEL_9; + } +LABEL_45: + v5 = (*(int (__fastcall **)(_DWORD *))(*v17 + 36))(v17); + i = v20[1]; + goto LABEL_9; + } + break; + } + v10 = v9; + v11 = v9; + if ( v8 ) + { + v12 = (_WORD *)v17[2]; + while ( a3 != *v12 ) + { + ++v12; + if ( !--v10 ) + { + v11 = v9; + goto LABEL_20; + } + } + v11 = v12 - v8; + v9 = v11; + } +LABEL_20: + v13 = &v8[v11]; + i += v9; + v17[2] = v13; + v20[1] = i; + if ( v7 <= (unsigned int)v13 ) + goto LABEL_45; + v5 = *v13; + if ( a2 <= i ) + goto LABEL_22; + } +LABEL_37: + if ( v18 ) + v20[1] = 0x7FFFFFFF; + goto LABEL_39; + } + } + return v20; +} +// 4BCF00: using guessed type char var_19[25]; + +//----- (004BD300) -------------------------------------------------------- +_DWORD *__fastcall std::wistream::ignore(_DWORD *a1) +{ + _DWORD *v2; // ecx + __int16 *v3; // eax + __int16 v4; // dx + char v6[25]; // [esp+5Fh] [ebp-19h] BYREF + + a1[1] = 0; + std::wistream::sentry::sentry(v6, a1, 1); + if ( v6[0] ) + { + v2 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + v3 = (__int16 *)v2[2]; + if ( (unsigned int)v3 >= v2[3] ) + { + v4 = (*(int (__fastcall **)(_DWORD *))(*v2 + 40))(v2); + } + else + { + v4 = *v3; + v2[2] = v3 + 1; + } + if ( v4 == -1 ) + std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 2); + else + a1[1] = 1; + } + return a1; +} +// 4BD300: using guessed type char var_19[25]; + +//----- (004BD4B0) -------------------------------------------------------- +void __thiscall std::wistream::sentry::sentry(_BYTE *this, _DWORD *a2, char a3) +{ + char *v3; // ecx + int v4; // eax + unsigned __int16 *v5; // eax + unsigned __int16 v6; // ax + __int16 v7; // dx + _WORD *v8; // eax + __int16 *v9; // eax + int v10; // [esp+10h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + + *this = 0; + v3 = (char *)a2 + *(_DWORD *)(*a2 - 12); + v4 = *((_DWORD *)v3 + 5); + if ( v4 ) + goto LABEL_6; + if ( !*((_DWORD *)v3 + 28) ) + { + if ( a3 || (v3[13] & 0x10) == 0 ) + goto LABEL_9; + goto LABEL_10; + } + std::wostream::flush(*((_DWORD **)v3 + 28)); + v3 = (char *)a2 + *(_DWORD *)(*a2 - 12); + if ( !a3 && (v3[13] & 0x10) != 0 ) + { +LABEL_10: + lpuexcpt = (struct _Unwind_Exception *)*((_DWORD *)v3 + 30); + v5 = (unsigned __int16 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v5 >= *((_DWORD *)lpuexcpt + 3) ) + { + v6 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + v3 = (char *)a2 + *(_DWORD *)(*a2 - 12); + } + else + { + v6 = *v5; + } + v10 = *((_DWORD *)v3 + 31); + if ( !v10 ) + std::__throw_bad_cast(); + if ( v6 == 0xFFFF ) + { +LABEL_24: + v4 = *((_DWORD *)v3 + 5) | 2; + goto LABEL_6; + } + while ( (*(unsigned __int8 (__thiscall **)(int, int, _DWORD))(*(_DWORD *)v10 + 8))(v10, 32, v6) ) + { + v9 = (__int16 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v9 < *((_DWORD *)lpuexcpt + 3) ) + { + v7 = *v9; + *((_DWORD *)lpuexcpt + 2) = v9 + 1; + } + else + { + v7 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 40))(lpuexcpt); + } + if ( v7 != -1 ) + { + v8 = (_WORD *)*((_DWORD *)lpuexcpt + 2); + v6 = (unsigned int)v8 >= *((_DWORD *)lpuexcpt + 3) + ? (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt) + : *v8; + if ( v6 != 0xFFFF ) + continue; + } + v3 = (char *)a2 + *(_DWORD *)(*a2 - 12); + goto LABEL_24; + } + v3 = (char *)a2 + *(_DWORD *)(*a2 - 12); + } + v4 = *((_DWORD *)v3 + 5); + if ( v4 ) + { +LABEL_6: + std::wios::clear(v3, v4 | 4); + return; + } +LABEL_9: + *this = 1; +} + +//----- (004BD750) -------------------------------------------------------- +void __thiscall std::wistream::sentry::sentry(_BYTE *this, _DWORD *a2, char a3) +{ + char *v3; // ecx + int v4; // eax + unsigned __int16 *v5; // eax + unsigned __int16 v6; // ax + __int16 v7; // dx + _WORD *v8; // eax + __int16 *v9; // eax + int v10; // [esp+10h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + + *this = 0; + v3 = (char *)a2 + *(_DWORD *)(*a2 - 12); + v4 = *((_DWORD *)v3 + 5); + if ( v4 ) + goto LABEL_6; + if ( !*((_DWORD *)v3 + 28) ) + { + if ( a3 || (v3[13] & 0x10) == 0 ) + goto LABEL_9; + goto LABEL_10; + } + std::wostream::flush(*((_DWORD **)v3 + 28)); + v3 = (char *)a2 + *(_DWORD *)(*a2 - 12); + if ( !a3 && (v3[13] & 0x10) != 0 ) + { +LABEL_10: + lpuexcpt = (struct _Unwind_Exception *)*((_DWORD *)v3 + 30); + v5 = (unsigned __int16 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v5 >= *((_DWORD *)lpuexcpt + 3) ) + { + v6 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + v3 = (char *)a2 + *(_DWORD *)(*a2 - 12); + } + else + { + v6 = *v5; + } + v10 = *((_DWORD *)v3 + 31); + if ( !v10 ) + std::__throw_bad_cast(); + if ( v6 == 0xFFFF ) + { +LABEL_24: + v4 = *((_DWORD *)v3 + 5) | 2; + goto LABEL_6; + } + while ( (*(unsigned __int8 (__thiscall **)(int, int, _DWORD))(*(_DWORD *)v10 + 8))(v10, 32, v6) ) + { + v9 = (__int16 *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v9 < *((_DWORD *)lpuexcpt + 3) ) + { + v7 = *v9; + *((_DWORD *)lpuexcpt + 2) = v9 + 1; + } + else + { + v7 = (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 40))(lpuexcpt); + } + if ( v7 != -1 ) + { + v8 = (_WORD *)*((_DWORD *)lpuexcpt + 2); + v6 = (unsigned int)v8 >= *((_DWORD *)lpuexcpt + 3) + ? (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt) + : *v8; + if ( v6 != 0xFFFF ) + continue; + } + v3 = (char *)a2 + *(_DWORD *)(*a2 - 12); + goto LABEL_24; + } + v3 = (char *)a2 + *(_DWORD *)(*a2 - 12); + } + v4 = *((_DWORD *)v3 + 5); + if ( v4 ) + { +LABEL_6: + std::wios::clear(v3, v4 | 4); + return; + } +LABEL_9: + *this = 1; +} + +//----- (004BD9F0) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::getline(_DWORD *this, char *a2, int a3) +{ + int v4; // ecx + __int16 v5; // ax + + v4 = *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 124); + if ( !v4 ) + std::__throw_bad_cast(); + v5 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 40))(v4, 10); + return std::wistream::getline(this, a2, a3, v5); +} + +//----- (004BDA40) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::getline(_DWORD *this, char *a2, int a3, __int16 a4) +{ + int v4; // esi + int v5; // edx + __int16 *v7; // eax + __int16 v8; // dx + int v9; // eax + unsigned int v10; // ebx + char *v11; // ecx + int v12; // edi + int v13; // eax + int v14; // edx + int v15; // esi + char *v16; // eax + char *v17; // ecx + unsigned int v18; // eax + __int16 v19; // ax + __int16 *v20; // eax + int v21; // [esp+18h] [ebp-70h] + _DWORD *v22; // [esp+20h] [ebp-68h] + int lpuexcpt; // [esp+24h] [ebp-64h] + char v25[25]; // [esp+6Fh] [ebp-19h] BYREF + + this[1] = 0; + std::wistream::sentry::sentry(v25, this, 1); + if ( !v25[0] ) + { +LABEL_2: + v4 = this[1]; + if ( a3 > 0 ) + goto LABEL_3; +LABEL_27: + if ( !v4 ) + goto LABEL_4; + return this; + } + v22 = *(_DWORD **)((char *)this + *(_DWORD *)(*this - 12) + 120); + v7 = (__int16 *)v22[2]; + if ( (unsigned int)v7 >= v22[3] ) + v8 = (*(int (__fastcall **)(_DWORD *))(*v22 + 36))(v22); + else + v8 = *v7; + v9 = this[1]; + v4 = v9 + 1; + if ( a3 > v9 + 1 ) + { + if ( v8 != -1 ) + { + if ( v8 != a4 ) + { + while ( 1 ) + { + v10 = v22[3]; + v11 = (char *)v22[2]; + v12 = a3 - v9 - 1; + v13 = (int)(v10 - (_DWORD)v11) >> 1; + if ( v12 <= v13 ) + v13 = v12; + lpuexcpt = v13; + if ( v13 <= 1 ) + { + *(_WORD *)a2 = v8; + this[1] = v4; + if ( v10 <= (unsigned int)v11 ) + { + v19 = (*(int (__fastcall **)(_DWORD *))(*v22 + 40))(v22); + } + else + { + v19 = *(_WORD *)v11; + v22[2] = v11 + 2; + } + if ( v19 == -1 ) + { + a2 += 2; + v9 = this[1]; +LABEL_43: + v5 = 2; + if ( a3 > 0 ) + *(_WORD *)a2 = 0; +LABEL_45: + if ( !v9 ) + v5 |= 4u; + goto LABEL_5; + } + v20 = (__int16 *)v22[2]; + if ( (unsigned int)v20 >= v22[3] ) + v8 = (*(int (__fastcall **)(_DWORD *))(*v22 + 36))(v22); + else + v8 = *v20; + a2 += 2; + v9 = this[1]; + } + else + { + v14 = v13; + v15 = v13; + if ( !v11 ) + goto LABEL_19; + v16 = (char *)v22[2]; + while ( *(_WORD *)v16 != a4 ) + { + v16 += 2; + if ( !--v14 ) + goto LABEL_19; + } + v21 = v16 - v11; + lpuexcpt = (v16 - v11) >> 1; + v15 = lpuexcpt; + if ( lpuexcpt ) + { +LABEL_19: + v21 = 2 * v15; + memcpy(a2, v11, 2 * v15); + v11 = (char *)v22[2]; + v10 = v22[3]; + } + a2 += v21; + v17 = &v11[v21]; + v22[2] = v17; + v9 = this[1] + lpuexcpt; + this[1] = v9; + if ( (unsigned int)v17 >= v10 ) + { + v8 = (*(int (__fastcall **)(_DWORD *))(*v22 + 36))(v22); + v9 = this[1]; + } + else + { + v8 = *(_WORD *)v17; + } + } + v4 = v9 + 1; + if ( v9 + 1 >= a3 ) + goto LABEL_38; + if ( v8 == -1 ) + goto LABEL_43; + if ( a4 == v8 ) + goto LABEL_25; + } + } + goto LABEL_25; + } + if ( a3 > 0 ) + { +LABEL_52: + v5 = 2; + *(_WORD *)a2 = 0; + if ( !v9 ) + v5 = 6; + goto LABEL_5; + } +LABEL_56: + v5 = 2; + goto LABEL_45; + } +LABEL_38: + if ( v8 == -1 ) + { + v9 = this[1]; + if ( a3 > 0 ) + goto LABEL_52; + goto LABEL_56; + } + if ( v8 != a4 ) + { + v9 = this[1]; + if ( a3 <= 0 ) + { + v5 = 4; + goto LABEL_45; + } + *(_WORD *)a2 = 0; + v5 = 4; +LABEL_5: + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | v5); + return this; + } +LABEL_25: + this[1] = v4; + v18 = v22[2]; + if ( v18 >= v22[3] ) + { + (*(void (__fastcall **)(_DWORD *))(*v22 + 40))(v22); + goto LABEL_2; + } + v22[2] = v18 + 2; + if ( a3 <= 0 ) + goto LABEL_27; +LABEL_3: + *(_WORD *)a2 = 0; + if ( !v4 ) + { +LABEL_4: + v5 = 4; + goto LABEL_5; + } + return this; +} +// 4BDA40: using guessed type char var_19[25]; + +//----- (004BDED0) -------------------------------------------------------- +int *__thiscall std::wistream::putback(int *this, unsigned __int16 a2) +{ + int v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // eax + unsigned int v6; // eax + __int16 v7; // dx + char v10[25]; // [esp+5Fh] [ebp-19h] BYREF + + v3 = *this; + this[1] = 0; + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(v3 - 12)), + *(int *)((char *)this + *(_DWORD *)(v3 - 12) + 20) & 0xFFFFFFFD); + std::wistream::sentry::sentry(v10, this, 1); + if ( !v10[0] ) + return this; + v4 = *(_DWORD **)((char *)this + *(_DWORD *)(*this - 12) + 120); + v5 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( !v4 ) + { +LABEL_9: + std::wios::clear(v5, v5[5] | 1); + return this; + } + v6 = v4[2]; + if ( v4[1] < v6 && (v7 = *(_WORD *)(v6 - 2), a2 == v7) ) + v4[2] = v6 - 2; + else + v7 = (*(int (__thiscall **)(_DWORD *, _DWORD))(*v4 + 44))(v4, a2); + if ( v7 == -1 ) + { + v5 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + goto LABEL_9; + } + return this; +} +// 4BDED0: using guessed type char var_19[25]; + +//----- (004BE0B0) -------------------------------------------------------- +struct _Unwind_Exception *__thiscall std::wistream::readsome(_DWORD *this, int a2, int a3) +{ + _DWORD *v4; // ecx + int v5; // eax + int v6; // edx + int v7; // eax + int v8; // ecx + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v11[25]; // [esp+5Fh] [ebp-19h] BYREF + + this[1] = 0; + std::wistream::sentry::sentry(v11, this, 1); + if ( !v11[0] ) + return (struct _Unwind_Exception *)this[1]; + v4 = *(_DWORD **)((char *)this + *(_DWORD *)(*this - 12) + 120); + v5 = v4[3]; + v6 = v4[2]; + if ( v5 == v6 ) + v7 = (*(int (__fastcall **)(_DWORD *))(*v4 + 28))(v4); + else + v7 = (v5 - v6) >> 1; + if ( v7 <= 0 ) + { + if ( v7 == -1 ) + { + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 2); + return (struct _Unwind_Exception *)this[1]; + } + return (struct _Unwind_Exception *)this[1]; + } + if ( v7 > a3 ) + v7 = a3; + v8 = *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 120); + lpuexcpt = (struct _Unwind_Exception *)(*(int (__thiscall **)(int, int, int))(*(_DWORD *)v8 + 32))(v8, a2, v7); + this[1] = lpuexcpt; + return lpuexcpt; +} +// 4BE0B0: using guessed type char var_19[25]; + +//----- (004BE2A0) -------------------------------------------------------- +void __thiscall std::wistream::basic_istream(_DWORD *this, int *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // ecx + int v5; // eax + std::ios_base *v6; // [esp+4h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v8; // [esp+14h] [ebp-44h] + + v8 = this + 2; + std::ios_base::ios_base(this + 2); + v2 = a2[1]; + *((_WORD *)this + 62) = 0; + *((_BYTE *)this + 126) = 0; + this[1] = v2; + this[30] = 0; + v3 = *a2; + *this = &off_51AB4C; + this[32] = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[33] = 0; + this[34] = 0; + this[35] = 0; + this[2] = off_51AB60; + lpuexcpt = v4; + std::ios_base::_M_move((int)v8, v4, v6); + std::wios::_M_cache_locale(v8, (int)(this + 29)); + this[32] = 0; + v5 = *((_DWORD *)lpuexcpt + 28); + *((_DWORD *)lpuexcpt + 28) = 0; + this[30] = v5; + *((_WORD *)this + 62) = *((_WORD *)lpuexcpt + 58); + *((_BYTE *)this + 126) = *((_BYTE *)lpuexcpt + 118); + a2[1] = 0; +} +// 4BE343: variable 'v6' is possibly undefined +// 51AB4C: using guessed type int (*off_51AB4C)(); +// 51AB60: using guessed type int (*off_51AB60[2])(); + +//----- (004BE3E0) -------------------------------------------------------- +void __thiscall std::wistream::basic_istream(_DWORD *this, int a2) +{ + _DWORD *v2; // [esp+14h] [ebp-44h] + + v2 = this + 2; + std::ios_base::ios_base(this + 2); + this[30] = 0; + *((_WORD *)this + 62) = 0; + *((_BYTE *)this + 126) = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + this[35] = 0; + *this = &off_51AB4C; + this[2] = off_51AB60; + this[1] = 0; + std::wios::init((int)v2, a2); +} +// 51AB4C: using guessed type int (*off_51AB4C)(); +// 51AB60: using guessed type int (*off_51AB60[2])(); + +//----- (004BE4C0) -------------------------------------------------------- +void __fastcall std::wistream::basic_istream(int a1) +{ + int v1; // [esp+14h] [ebp-44h] + + v1 = a1 + 8; + std::ios_base::ios_base((_DWORD *)(a1 + 8)); + *(_DWORD *)(a1 + 120) = 0; + *(_WORD *)(a1 + 124) = 0; + *(_BYTE *)(a1 + 126) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + *(_DWORD *)(a1 + 136) = 0; + *(_DWORD *)(a1 + 140) = 0; + *(_DWORD *)a1 = &off_51AB4C; + *(_DWORD *)(a1 + 8) = off_51AB60; + *(_DWORD *)(a1 + 4) = 0; + std::wios::init(v1, 0); +} +// 51AB4C: using guessed type int (*off_51AB4C)(); +// 51AB60: using guessed type int (*off_51AB60[2])(); + +//----- (004BE5A0) -------------------------------------------------------- +int __thiscall std::wistream::basic_istream(int *this, int *a2, _DWORD *a3) +{ + int v3; // eax + int v4; // edx + char *v5; // ebx + std::ios_base *v6; // esi + int v7; // eax + int result; // eax + std::ios_base *v9; // [esp+4h] [ebp-18h] + + v3 = *a2; + v4 = a2[1]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = v4; + this[1] = a3[1]; + v5 = (char *)this + *(_DWORD *)(v3 - 12); + v6 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v5, v6, v9); + std::wios::_M_cache_locale(v5, (int)(v5 + 108)); + v7 = *((_DWORD *)v6 + 28); + *((_DWORD *)v5 + 30) = 0; + *((_DWORD *)v6 + 28) = 0; + *((_DWORD *)v5 + 28) = v7; + *((_WORD *)v5 + 58) = *((_WORD *)v6 + 58); + result = *((unsigned __int8 *)v6 + 118); + a3[1] = 0; + v5[118] = result; + return result; +} +// 4BE5D2: variable 'v9' is possibly undefined + +//----- (004BE620) -------------------------------------------------------- +BOOL __thiscall std::wistream::basic_istream(int *this, int *a2, int a3) +{ + int v3; // eax + int v4; // edx + int v5; // ebx + + v3 = *a2; + v4 = a2[1]; + v5 = *(_DWORD *)(*a2 - 12); + *this = *a2; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + return std::wios::init((int)this + *(_DWORD *)(v3 - 12), a3); +} + +//----- (004BE660) -------------------------------------------------------- +BOOL __thiscall std::wistream::basic_istream(int *this, int *a2) +{ + int v2; // eax + int v3; // edx + int v4; // ebx + + v2 = *a2; + v3 = a2[1]; + v4 = *(_DWORD *)(*a2 - 12); + *this = *a2; + *(int *)((char *)this + v4) = v3; + this[1] = 0; + return std::wios::init((int)this + *(_DWORD *)(v2 - 12), 0); +} + +//----- (004BE690) -------------------------------------------------------- +void __fastcall std::wistream::~wistream(char *Block) +{ + char *v2; // ecx + + v2 = Block + 8; + *((_DWORD *)v2 - 2) = &off_51AB4C; + *((_DWORD *)v2 - 1) = 0; + *(_DWORD *)v2 = &off_51B7E0; + std::ios_base::~ios_base((int)v2); + operator delete(Block); +} +// 51AB4C: using guessed type int (*off_51AB4C)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004BE6C0) -------------------------------------------------------- +void __fastcall std::wistream::~wistream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + *a1 = &off_51AB4C; + v1 = a1 + 2; + *(v1 - 1) = 0; + *v1 = &off_51B7E0; + std::ios_base::~ios_base((int)v1); +} +// 51AB4C: using guessed type int (*off_51AB4C)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004BE6E0) -------------------------------------------------------- +int __thiscall std::wistream::~wistream(int *this, int *a2) +{ + int v2; // eax + int result; // eax + + v2 = *a2; + *this = *a2; + result = *(_DWORD *)(v2 - 12); + *(int *)((char *)this + result) = a2[1]; + this[1] = 0; + return result; +} + +//----- (004BE700) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // edx + __int16 v6; // cx + int v7; // edx + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = a2[1]; + a2[1] = v7; + return this; +} +// 4BE73D: variable 'v9' is possibly undefined + +//----- (004BE7C0) -------------------------------------------------------- +int __thiscall std::wistream::operator>>(void *this, int (__cdecl *a2)(void *)) +{ + return a2(this); +} + +//----- (004BE7D0) -------------------------------------------------------- +char *__thiscall std::wistream::operator>>(char *this, void (__cdecl *a2)(char *)) +{ + a2(&this[*(_DWORD *)(*(_DWORD *)this - 12)]); + return this; +} + +//----- (004BE7F0) -------------------------------------------------------- +char *__thiscall std::wistream::operator>>(char *this, void (__cdecl *a2)(char *)) +{ + a2(&this[*(_DWORD *)(*(_DWORD *)this - 12)]); + return this; +} + +//----- (004BE810) -------------------------------------------------------- +_DWORD *__thiscall std::wistream::operator>>(_DWORD *this, _DWORD *a2) +{ + char *v2; // ecx + int v3; // eax + char v6; // [esp+5Eh] [ebp-1Ah] BYREF + char v7[25]; // [esp+5Fh] [ebp-19h] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v2 = (char *)this + *(_DWORD *)(*this - 12); + if ( !a2 ) + { + v3 = 4; + goto LABEL_9; + } + if ( !std::__copy_streambufs_eof>(*((_DWORD **)v2 + 30), a2, v7) ) + { + v2 = (char *)this + *(_DWORD *)(*this - 12); + v3 = v7[0] == 0 ? 4 : 6; + goto LABEL_9; + } + if ( v7[0] ) + { + v3 = 2; + v2 = (char *)this + *(_DWORD *)(*this - 12); +LABEL_9: + std::wios::clear(v2, *((_DWORD *)v2 + 5) | v3); + } + } + else if ( !a2 ) + { + v3 = 4; + v2 = (char *)this + *(_DWORD *)(*this - 12); + goto LABEL_9; + } + return this; +} +// 4BE810: using guessed type char var_19[25]; + +//----- (004BEA30) -------------------------------------------------------- +char *__thiscall std::wistream::operator>>(char *this, _DWORD *a2) +{ + char *v2; // edi + int v3; // ecx + char v6; // [esp+67h] [ebp-21h] BYREF + int v7; // [esp+68h] [ebp-20h] BYREF + int v8[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v6, this, 0); + if ( v6 ) + { + v7 = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int *))(*(_DWORD *)v3 + 12))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + &v7, + v8); + *a2 = v8[0]; + if ( v7 ) + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v7); + } + return this; +} +// 4BEA30: using guessed type int var_1C[7]; + +//----- (004BEC30) -------------------------------------------------------- +char *__thiscall std::wistream::operator>>(char *this, _WORD *a2) +{ + char *v2; // edi + int v3; // ecx + int v4; // eax + char v7; // [esp+67h] [ebp-21h] BYREF + int v8; // [esp+68h] [ebp-20h] BYREF + int v9[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v7, this, 0); + if ( v7 ) + { + v8 = 0; + v2 = &this[*(_DWORD *)(*(_DWORD *)this - 12)]; + v3 = *((_DWORD *)v2 + 33); + if ( !v3 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, _DWORD, int, _DWORD, int, char *, int *, int *))(*(_DWORD *)v3 + 12))( + v3, + *((_DWORD *)v2 + 30), + 0xFFFF, + 0, + 0xFFFF, + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + &v8, + v9); + v4 = v8; + if ( v9[0] >= -32768 ) + { + if ( v9[0] > 0x7FFF ) + { + v8 |= 4u; + v4 = v8; + *a2 = 0x7FFF; + goto LABEL_9; + } + *a2 = v9[0]; + } + else + { + v4 = v8 | 4; + v8 |= 4u; + *a2 = 0x8000; + } + if ( !v4 ) + return this; +LABEL_9: + std::wios::clear( + &this[*(_DWORD *)(*(_DWORD *)this - 12)], + *(_DWORD *)&this[*(_DWORD *)(*(_DWORD *)this - 12) + 20] | v4); + } + return this; +} +// 4BED43: conditional instruction was optimized away because eax.4>=4u +// 4BEC30: using guessed type int var_1C[7]; + +//----- (004BEE70) -------------------------------------------------------- +int *__thiscall std::wostream::put(int *this, unsigned __int16 a2) +{ + _DWORD *v2; // ecx + unsigned int v3; // eax + unsigned int v4; // eax + int v5; // ecx + int v7; // [esp+0h] [ebp-78h] + unsigned __int16 lpuexcpt; // [esp+14h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+14h] [ebp-64h] + int v11; // [esp+58h] [ebp-20h] BYREF + _DWORD *v12; // [esp+5Ch] [ebp-1Ch] + + lpuexcpt = a2; + std::wostream::sentry::sentry(&v11, this); + if ( (_BYTE)v11 ) + { + v2 = *(_DWORD **)((char *)this + *(_DWORD *)(*this - 12) + 120); + v3 = v2[5]; + if ( v3 >= v2[6] ) + { + lpuexcpt = (*(int (__thiscall **)(_DWORD *, _DWORD))(*v2 + 52))(v2, a2); + } + else + { + v4 = v3 + 2; + *(_WORD *)(v4 - 2) = a2; + v2[5] = v4; + } + if ( lpuexcpt == 0xFFFF ) + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(*this - 12)), + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v12 + *(_DWORD *)(*v12 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v5 = *((_DWORD *)lpuexcpta + 30); + if ( v5 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v5 + 24))(v5, v7) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v12 + *(_DWORD *)(*v12 - 12)), + *(_DWORD *)((char *)v12 + *(_DWORD *)(*v12 - 12) + 20) | 1); + } + } + return this; +} +// 4BEF27: variable 'v7' is possibly undefined + +//----- (004BF080) -------------------------------------------------------- +void __thiscall std::wostream::swap(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v2; // ebx + std::ios_base *v3; // esi + std::ios_base *v4; // eax + __int16 v5; // dx + std::ios_base *v6; // [esp+4h] [ebp-58h] + + v2 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v3 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v2, v3, v6); + std::wios::_M_cache_locale(v2, (int)(v2 + 27)); + std::wios::_M_cache_locale(v3, (int)v3 + 108); + v4 = v2[28]; + v2[28] = (std::ios_base *)*((_DWORD *)v3 + 28); + v5 = *((_WORD *)v3 + 58); + *((_DWORD *)v3 + 28) = v4; + LOWORD(v4) = *((_WORD *)v2 + 58); + *((_WORD *)v2 + 58) = v5; + LOBYTE(v5) = *((_BYTE *)v2 + 118); + *((_WORD *)v3 + 58) = (_WORD)v4; + *((_BYTE *)v2 + 118) = *((_BYTE *)v3 + 118); + *((_BYTE *)v3 + 118) = v5; +} +// 4BF0B7: variable 'v6' is possibly undefined + +//----- (004BF130) -------------------------------------------------------- +_DWORD *__fastcall std::wostream::flush(_DWORD *a1) +{ + int v1; // ecx + + v1 = *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + if ( v1 && (*(int (__fastcall **)(int))(*(_DWORD *)v1 + 24))(v1) == -1 ) + std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 1); + return a1; +} + +//----- (004BF280) -------------------------------------------------------- +_DWORD *__thiscall std::wostream::seekp(_DWORD *this, int a2, int a3, int a4, int a5) +{ + char *v5; // edi + _DWORD *v6; // eax + int v7; // edi + void (__thiscall *v8)(int *, _DWORD *, int, int, int, int, int); // eax + _DWORD *v10; // [esp+0h] [ebp-A8h] + int v12[14]; // [esp+70h] [ebp-38h] BYREF + + v5 = (char *)this + *(_DWORD *)(*this - 12); + if ( (v5[20] & 5) == 0 ) + { + v6 = (_DWORD *)*((_DWORD *)v5 + 30); + v7 = *v6; + v12[6] = a4; + v10 = v6; + v8 = *(void (__thiscall **)(int *, _DWORD *, int, int, int, int, int))(v7 + 20); + v12[4] = a2; + v12[5] = a3; + v12[7] = a5; + v8(v12, v10, a2, a3, a4, a5, 16); + if ( (v12[0] & v12[1]) == -1 ) + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 4); + } + return this; +} + +//----- (004BF440) -------------------------------------------------------- +_DWORD *__thiscall std::wostream::seekp(_DWORD *this, int a2, int a3, int a4) +{ + char *v4; // edi + int v7[10]; // [esp+60h] [ebp-28h] BYREF + + v4 = (char *)this + *(_DWORD *)(*this - 12); + if ( (v4[20] & 5) == 0 ) + { + (*(void (__thiscall **)(int *, _DWORD, int, int, int, int))(**((_DWORD **)v4 + 30) + 16))( + v7, + *((_DWORD *)v4 + 30), + a2, + a3, + a4, + 16); + if ( (v7[0] & v7[1]) == -1 ) + std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 4); + } + return this; +} + +//----- (004BF5D0) -------------------------------------------------------- +_DWORD *__thiscall std::wostream::tellp(_DWORD *this, int *a2) +{ + int v2; // eax + char *v3; // esi + int v6[10]; // [esp+60h] [ebp-28h] BYREF + + v2 = *a2; + *this = -1; + this[1] = -1; + v3 = (char *)a2 + *(_DWORD *)(v2 - 12); + this[2] = 0; + if ( (v3[20] & 5) == 0 ) + { + (*(void (__thiscall **)(int *, _DWORD, _DWORD, _DWORD, int, int))(**((_DWORD **)v3 + 30) + 16))( + v6, + *((_DWORD *)v3 + 30), + 0, + 0, + 1, + 16); + *this = v6[0]; + this[1] = v6[1]; + this[2] = v6[2]; + } + return this; +} + +//----- (004BF750) -------------------------------------------------------- +int *__thiscall std::wostream::write(int *this, int a2, int a3) +{ + int v3; // ecx + int v4; // ecx + int v6; // [esp+0h] [ebp-78h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + int v9; // [esp+58h] [ebp-20h] BYREF + _DWORD *v10; // [esp+5Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v9, this); + if ( (_BYTE)v9 ) + { + v3 = *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120); + if ( a3 != (*(int (__thiscall **)(int, int, int))(*(_DWORD *)v3 + 48))(v3, a2, a3) ) + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(*this - 12)), + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + } + lpuexcpt = (struct _Unwind_Exception *)((char *)v10 + *(_DWORD *)(*v10 - 12)); + if ( (*((_BYTE *)lpuexcpt + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpt + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v6) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v10 + *(_DWORD *)(*v10 - 12)), + *(_DWORD *)((char *)v10 + *(_DWORD *)(*v10 - 12) + 20) | 1); + } + } + return this; +} +// 4BF7FF: variable 'v6' is possibly undefined + +//----- (004BF920) -------------------------------------------------------- +int __thiscall std::wostream::sentry::sentry(_DWORD *this, int *a2) +{ + int v3; // eax + char *v4; // ecx + int result; // eax + + *(_BYTE *)this = 0; + v3 = *a2; + this[1] = a2; + v4 = (char *)a2 + *(_DWORD *)(v3 - 12); + result = *((_DWORD *)v4 + 5); + if ( *((_DWORD *)v4 + 28) ) + { + if ( result ) + return std::wios::clear(v4, result | 4); + std::wostream::flush(*((_DWORD **)v4 + 28)); + result = *(int *)((char *)a2 + *(_DWORD *)(*a2 - 12) + 20); + v4 = (char *)a2 + *(_DWORD *)(*a2 - 12); + } + if ( result ) + return std::wios::clear(v4, result | 4); + *(_BYTE *)this = 1; + return result; +} + +//----- (004BF980) -------------------------------------------------------- +int __thiscall std::wostream::sentry::sentry(_DWORD *this, int *a2) +{ + int v3; // eax + char *v4; // ecx + int result; // eax + + *(_BYTE *)this = 0; + v3 = *a2; + this[1] = a2; + v4 = (char *)a2 + *(_DWORD *)(v3 - 12); + result = *((_DWORD *)v4 + 5); + if ( *((_DWORD *)v4 + 28) ) + { + if ( result ) + return std::wios::clear(v4, result | 4); + std::wostream::flush(*((_DWORD **)v4 + 28)); + result = *(int *)((char *)a2 + *(_DWORD *)(*a2 - 12) + 20); + v4 = (char *)a2 + *(_DWORD *)(*a2 - 12); + } + if ( result ) + return std::wios::clear(v4, result | 4); + *(_BYTE *)this = 1; + return result; +} + +//----- (004BF9E0) -------------------------------------------------------- +void __fastcall std::wostream::sentry::~sentry(int a1) +{ + int v2; // ebx + int v3; // ecx + _DWORD *v4; // ecx + + if ( (*(_BYTE *)(*(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4) + 13) & 0x20) != 0 ) + { + v2 = *(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4); + if ( !std::uncaught_exception() ) + { + v3 = *(_DWORD *)(v2 + 120); + if ( v3 ) + { + if ( (*(int (__fastcall **)(int))(*(_DWORD *)v3 + 24))(v3) == -1 ) + { + v4 = (_DWORD *)(*(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4)); + std::wios::clear(v4, v4[5] | 1); + } + } + } + } +} + +//----- (004BFA70) -------------------------------------------------------- +void __fastcall std::wostream::sentry::~sentry(int a1) +{ + int v2; // ebx + int v3; // ecx + _DWORD *v4; // ecx + + if ( (*(_BYTE *)(*(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4) + 13) & 0x20) != 0 ) + { + v2 = *(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4); + if ( !std::uncaught_exception() ) + { + v3 = *(_DWORD *)(v2 + 120); + if ( v3 ) + { + if ( (*(int (__fastcall **)(int))(*(_DWORD *)v3 + 24))(v3) == -1 ) + { + v4 = (_DWORD *)(*(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4)); + std::wios::clear(v4, v4[5] | 1); + } + } + } + } +} + +//----- (004BFB00) -------------------------------------------------------- +int __thiscall std::wostream::_M_write(_DWORD *this, int a2, int a3) +{ + int v4; // ecx + int result; // eax + + v4 = *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 120); + result = (*(int (__thiscall **)(int, int, int))(*(_DWORD *)v4 + 48))(v4, a2, a3); + if ( a3 != result ) + return std::wios::clear( + (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)), + *(_DWORD *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + return result; +} + +//----- (004BFB50) -------------------------------------------------------- +int *__thiscall std::wostream::_M_insert(int *this, int a2) +{ + unsigned __int16 v2; // ax + char v3; // dl + int v4; // ecx + int v6; // ecx + int v7; // edx + int v8; // [esp+0h] [ebp-88h] + int v9; // [esp+20h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+24h] [ebp-64h] + int v13; // [esp+68h] [ebp-20h] BYREF + _DWORD *v14; // [esp+6Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v13, this); + if ( (_BYTE)v13 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(*this - 12)); + v9 = *((_DWORD *)lpuexcpt + 32); + if ( !v9 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 118) ) + { + v2 = *((_WORD *)lpuexcpt + 58); + } + else + { + v6 = *((_DWORD *)lpuexcpt + 31); + if ( !v6 ) + std::__throw_bad_cast(); + v2 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v6 + 40))(v6, 32); + v7 = *this; + *((_WORD *)lpuexcpt + 58) = v2; + *((_BYTE *)lpuexcpt + 118) = 1; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, _DWORD, int))(*(_DWORD *)v9 + 36))( + v9, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + a2); + if ( v3 ) + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(*this - 12)), + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v14 + *(_DWORD *)(*v14 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v8) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v14 + *(_DWORD *)(*v14 - 12)), + *(_DWORD *)((char *)v14 + *(_DWORD *)(*v14 - 12) + 20) | 1); + } + } + return this; +} +// 4BFC18: variable 'v3' is possibly undefined +// 4BFC6C: variable 'v8' is possibly undefined + +//----- (004BFDC0) -------------------------------------------------------- +int *__thiscall std::wostream::_M_insert(int *this, unsigned __int8 a2) +{ + unsigned __int16 v2; // ax + char v3; // dl + int v4; // ecx + int v6; // ecx + int v7; // edx + int v8; // [esp+0h] [ebp-98h] + int v9; // [esp+2Ch] [ebp-6Ch] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + int v13; // [esp+78h] [ebp-20h] BYREF + _DWORD *v14; // [esp+7Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v13, this); + if ( (_BYTE)v13 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(*this - 12)); + v9 = *((_DWORD *)lpuexcpt + 32); + if ( !v9 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 118) ) + { + v2 = *((_WORD *)lpuexcpt + 58); + } + else + { + v6 = *((_DWORD *)lpuexcpt + 31); + if ( !v6 ) + std::__throw_bad_cast(); + v2 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v6 + 40))(v6, 32); + v7 = *this; + *((_WORD *)lpuexcpt + 58) = v2; + *((_BYTE *)lpuexcpt + 118) = 1; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, _DWORD, _DWORD))(*(_DWORD *)v9 + 8))( + v9, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + a2); + if ( v3 ) + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(*this - 12)), + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v14 + *(_DWORD *)(*v14 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v8) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v14 + *(_DWORD *)(*v14 - 12)), + *(_DWORD *)((char *)v14 + *(_DWORD *)(*v14 - 12) + 20) | 1); + } + } + return this; +} +// 4BFE98: variable 'v3' is possibly undefined +// 4BFEEC: variable 'v8' is possibly undefined + +//----- (004C0040) -------------------------------------------------------- +int *__thiscall std::wostream::_M_insert(int *this, double a2) +{ + unsigned __int16 v2; // ax + char v3; // dl + int v4; // ecx + int v6; // ecx + int v7; // edx + int v8; // [esp+0h] [ebp-98h] + int v9; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + int v13; // [esp+78h] [ebp-20h] BYREF + _DWORD *v14; // [esp+7Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v13, this); + if ( (_BYTE)v13 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(*this - 12)); + v9 = *((_DWORD *)lpuexcpt + 32); + if ( !v9 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 118) ) + { + v2 = *((_WORD *)lpuexcpt + 58); + } + else + { + v6 = *((_DWORD *)lpuexcpt + 31); + if ( !v6 ) + std::__throw_bad_cast(); + v2 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v6 + 40))(v6, 32); + v7 = *this; + *((_WORD *)lpuexcpt + 58) = v2; + *((_BYTE *)lpuexcpt + 118) = 1; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v9 + 28))( + v9, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + LODWORD(a2), + HIDWORD(a2)); + if ( v3 ) + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(*this - 12)), + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v14 + *(_DWORD *)(*v14 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v8) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v14 + *(_DWORD *)(*v14 - 12)), + *(_DWORD *)((char *)v14 + *(_DWORD *)(*v14 - 12) + 20) | 1); + } + } + return this; +} +// 4C010B: variable 'v3' is possibly undefined +// 4C015F: variable 'v8' is possibly undefined + +//----- (004C02B0) -------------------------------------------------------- +int *__thiscall std::wostream::_M_insert(int *this, long double a2) +{ + unsigned __int16 v2; // ax + char v3; // dl + int v4; // ecx + int v6; // ecx + int v7; // edx + int v8; // [esp+0h] [ebp-88h] + int v10; // [esp+20h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+24h] [ebp-64h] + int v14; // [esp+68h] [ebp-20h] BYREF + _DWORD *v15; // [esp+6Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v14, this); + if ( (_BYTE)v14 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(*this - 12)); + v10 = *((_DWORD *)lpuexcpt + 32); + if ( !v10 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 118) ) + { + v2 = *((_WORD *)lpuexcpt + 58); + } + else + { + v6 = *((_DWORD *)lpuexcpt + 31); + if ( !v6 ) + std::__throw_bad_cast(); + v2 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v6 + 40))(v6, 32); + v7 = *this; + *((_WORD *)lpuexcpt + 58) = v2; + *((_BYTE *)lpuexcpt + 118) = 1; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, _DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v10 + 32))( + v10, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + LODWORD(a2), + DWORD1(a2), + HIDWORD(a2)); + if ( v3 ) + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(*this - 12)), + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v15 + *(_DWORD *)(*v15 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v8) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v15 + *(_DWORD *)(*v15 - 12)), + *(_DWORD *)((char *)v15 + *(_DWORD *)(*v15 - 12) + 20) | 1); + } + } + return this; +} +// 4C0372: variable 'v3' is possibly undefined +// 4C03C6: variable 'v8' is possibly undefined + +//----- (004C0520) -------------------------------------------------------- +int *__thiscall std::wostream::_M_insert(int *this, int a2) +{ + unsigned __int16 v2; // ax + char v3; // dl + int v4; // ecx + int v6; // ecx + int v7; // edx + int v8; // [esp+0h] [ebp-88h] + int v9; // [esp+20h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+24h] [ebp-64h] + int v13; // [esp+68h] [ebp-20h] BYREF + _DWORD *v14; // [esp+6Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v13, this); + if ( (_BYTE)v13 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(*this - 12)); + v9 = *((_DWORD *)lpuexcpt + 32); + if ( !v9 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 118) ) + { + v2 = *((_WORD *)lpuexcpt + 58); + } + else + { + v6 = *((_DWORD *)lpuexcpt + 31); + if ( !v6 ) + std::__throw_bad_cast(); + v2 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v6 + 40))(v6, 32); + v7 = *this; + *((_WORD *)lpuexcpt + 58) = v2; + *((_BYTE *)lpuexcpt + 118) = 1; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, _DWORD, int))(*(_DWORD *)v9 + 12))( + v9, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + a2); + if ( v3 ) + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(*this - 12)), + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v14 + *(_DWORD *)(*v14 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v8) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v14 + *(_DWORD *)(*v14 - 12)), + *(_DWORD *)((char *)v14 + *(_DWORD *)(*v14 - 12) + 20) | 1); + } + } + return this; +} +// 4C05E8: variable 'v3' is possibly undefined +// 4C063C: variable 'v8' is possibly undefined + +//----- (004C0790) -------------------------------------------------------- +int *__thiscall std::wostream::_M_insert(int *this, int a2) +{ + unsigned __int16 v2; // ax + char v3; // dl + int v4; // ecx + int v6; // ecx + int v7; // edx + int v8; // [esp+0h] [ebp-88h] + int v9; // [esp+20h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+24h] [ebp-64h] + int v13; // [esp+68h] [ebp-20h] BYREF + _DWORD *v14; // [esp+6Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v13, this); + if ( (_BYTE)v13 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(*this - 12)); + v9 = *((_DWORD *)lpuexcpt + 32); + if ( !v9 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 118) ) + { + v2 = *((_WORD *)lpuexcpt + 58); + } + else + { + v6 = *((_DWORD *)lpuexcpt + 31); + if ( !v6 ) + std::__throw_bad_cast(); + v2 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v6 + 40))(v6, 32); + v7 = *this; + *((_WORD *)lpuexcpt + 58) = v2; + *((_BYTE *)lpuexcpt + 118) = 1; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v7 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, _DWORD, int))(*(_DWORD *)v9 + 16))( + v9, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v2, + a2); + if ( v3 ) + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(*this - 12)), + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v14 + *(_DWORD *)(*v14 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpta + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v8) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v14 + *(_DWORD *)(*v14 - 12)), + *(_DWORD *)((char *)v14 + *(_DWORD *)(*v14 - 12) + 20) | 1); + } + } + return this; +} +// 4C0858: variable 'v3' is possibly undefined +// 4C08AC: variable 'v8' is possibly undefined + +//----- (004C0A00) -------------------------------------------------------- +int *__thiscall std::wostream::_M_insert(int *this, int a2, int a3) +{ + unsigned __int16 v3; // ax + char v4; // dl + int v5; // ecx + int v7; // ecx + int v8; // edx + int v9; // [esp+0h] [ebp-98h] + int v10; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + int v14; // [esp+78h] [ebp-20h] BYREF + _DWORD *v15; // [esp+7Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v14, this); + if ( (_BYTE)v14 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(*this - 12)); + v10 = *((_DWORD *)lpuexcpt + 32); + if ( !v10 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 118) ) + { + v3 = *((_WORD *)lpuexcpt + 58); + } + else + { + v7 = *((_DWORD *)lpuexcpt + 31); + if ( !v7 ) + std::__throw_bad_cast(); + v3 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v7 + 40))(v7, 32); + v8 = *this; + *((_WORD *)lpuexcpt + 58) = v3; + *((_BYTE *)lpuexcpt + 118) = 1; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v8 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, _DWORD, int, int))(*(_DWORD *)v10 + 20))( + v10, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v3, + a2, + a3); + if ( v4 ) + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(*this - 12)), + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v15 + *(_DWORD *)(*v15 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v5 = *((_DWORD *)lpuexcpta + 30); + if ( v5 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v5 + 24))(v5, v9) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v15 + *(_DWORD *)(*v15 - 12)), + *(_DWORD *)((char *)v15 + *(_DWORD *)(*v15 - 12) + 20) | 1); + } + } + return this; +} +// 4C0ADC: variable 'v4' is possibly undefined +// 4C0B30: variable 'v9' is possibly undefined + +//----- (004C0C80) -------------------------------------------------------- +int *__thiscall std::wostream::_M_insert(int *this, int a2, int a3) +{ + unsigned __int16 v3; // ax + char v4; // dl + int v5; // ecx + int v7; // ecx + int v8; // edx + int v9; // [esp+0h] [ebp-98h] + int v10; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + struct _Unwind_Exception *lpuexcpta; // [esp+34h] [ebp-64h] + int v14; // [esp+78h] [ebp-20h] BYREF + _DWORD *v15; // [esp+7Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v14, this); + if ( (_BYTE)v14 ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(*this - 12)); + v10 = *((_DWORD *)lpuexcpt + 32); + if ( !v10 ) + std::__throw_bad_cast(); + if ( *((_BYTE *)lpuexcpt + 118) ) + { + v3 = *((_WORD *)lpuexcpt + 58); + } + else + { + v7 = *((_DWORD *)lpuexcpt + 31); + if ( !v7 ) + std::__throw_bad_cast(); + v3 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v7 + 40))(v7, 32); + v8 = *this; + *((_WORD *)lpuexcpt + 58) = v3; + *((_BYTE *)lpuexcpt + 118) = 1; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v8 - 12)); + } + (*(void (__thiscall **)(int, _DWORD, bool, struct _Unwind_Exception *, _DWORD, int, int))(*(_DWORD *)v10 + 24))( + v10, + *((_DWORD *)lpuexcpt + 30), + *((_DWORD *)lpuexcpt + 30) == 0, + lpuexcpt, + v3, + a2, + a3); + if ( v4 ) + std::wios::clear( + (int *)((char *)this + *(_DWORD *)(*this - 12)), + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 20) | 1); + } + lpuexcpta = (struct _Unwind_Exception *)((char *)v15 + *(_DWORD *)(*v15 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v5 = *((_DWORD *)lpuexcpta + 30); + if ( v5 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v5 + 24))(v5, v9) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v15 + *(_DWORD *)(*v15 - 12)), + *(_DWORD *)((char *)v15 + *(_DWORD *)(*v15 - 12) + 20) | 1); + } + } + return this; +} +// 4C0D5C: variable 'v4' is possibly undefined +// 4C0DB0: variable 'v9' is possibly undefined + +//----- (004C0F00) -------------------------------------------------------- +void __thiscall std::wostream::basic_ostream(_DWORD *this, _DWORD *a2) +{ + int v2; // eax + std::ios_base *v3; // [esp+4h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v5; // [esp+14h] [ebp-44h] + + v5 = this + 1; + std::ios_base::ios_base(this + 1); + *((_WORD *)this + 60) = 0; + this[29] = 0; + *((_BYTE *)this + 122) = 0; + this[31] = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + *this = &off_51AB74; + this[1] = off_51AB88; + lpuexcpt = (struct _Unwind_Exception *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_move((int)v5, lpuexcpt, v3); + std::wios::_M_cache_locale(v5, (int)(this + 28)); + v2 = *((_DWORD *)lpuexcpt + 28); + this[31] = 0; + *((_DWORD *)lpuexcpt + 28) = 0; + this[29] = v2; + *((_WORD *)this + 60) = *((_WORD *)lpuexcpt + 58); + *((_BYTE *)this + 122) = *((_BYTE *)lpuexcpt + 118); +} +// 4C0F96: variable 'v3' is possibly undefined +// 51AB74: using guessed type int (*off_51AB74)(); +// 51AB88: using guessed type int (*off_51AB88[2])(); + +//----- (004C1020) -------------------------------------------------------- +void __thiscall std::wostream::basic_ostream(_DWORD *this, int a2) +{ + _DWORD *v2; // [esp+14h] [ebp-44h] + + v2 = this + 1; + std::ios_base::ios_base(this + 1); + this[29] = 0; + *((_WORD *)this + 60) = 0; + *((_BYTE *)this + 122) = 0; + this[31] = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + *this = &off_51AB74; + this[1] = off_51AB88; + std::wios::init((int)v2, a2); +} +// 51AB74: using guessed type int (*off_51AB74)(); +// 51AB88: using guessed type int (*off_51AB88[2])(); + +//----- (004C1100) -------------------------------------------------------- +int __thiscall std::wostream::basic_ostream(_DWORD *this, int a2) +{ + int result; // eax + + std::ios_base::ios_base(this + 1); + result = 0; + *((_BYTE *)this + 122) = 0; + this[29] = 0; + *((_WORD *)this + 60) = 0; + this[31] = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + *this = &off_51AB74; + this[1] = off_51AB88; + return result; +} +// 51AB74: using guessed type int (*off_51AB74)(); +// 51AB88: using guessed type int (*off_51AB88[2])(); + +//----- (004C1160) -------------------------------------------------------- +void __fastcall std::wostream::basic_ostream(int a1) +{ + int v1; // [esp+14h] [ebp-44h] + + v1 = a1 + 4; + std::ios_base::ios_base((_DWORD *)(a1 + 4)); + *(_DWORD *)(a1 + 116) = 0; + *(_WORD *)(a1 + 120) = 0; + *(_BYTE *)(a1 + 122) = 0; + *(_DWORD *)(a1 + 124) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + *(_DWORD *)(a1 + 136) = 0; + *(_DWORD *)a1 = &off_51AB74; + *(_DWORD *)(a1 + 4) = off_51AB88; + std::wios::init(v1, 0); +} +// 51AB74: using guessed type int (*off_51AB74)(); +// 51AB88: using guessed type int (*off_51AB88[2])(); + +//----- (004C1240) -------------------------------------------------------- +int __thiscall std::wostream::basic_ostream(_DWORD *this, _DWORD *a2, _DWORD *a3) +{ + int v3; // eax + char *v4; // ebx + std::ios_base *v5; // esi + int v6; // eax + int result; // eax + std::ios_base *v8; // [esp+4h] [ebp-18h] + + v3 = a2[1]; + v4 = (char *)this + *(_DWORD *)(*a2 - 12); + *this = *a2; + *(_DWORD *)v4 = v3; + v5 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v4, v5, v8); + std::wios::_M_cache_locale(v4, (int)(v4 + 108)); + v6 = *((_DWORD *)v5 + 28); + *((_DWORD *)v4 + 30) = 0; + *((_DWORD *)v5 + 28) = 0; + *((_DWORD *)v4 + 28) = v6; + *((_WORD *)v4 + 58) = *((_WORD *)v5 + 58); + result = *((unsigned __int8 *)v5 + 118); + v4[118] = result; + return result; +} +// 4C1265: variable 'v8' is possibly undefined + +//----- (004C12B0) -------------------------------------------------------- +BOOL __thiscall std::wostream::basic_ostream(int *this, int *a2, int a3) +{ + int v3; // edx + int v4; // eax + int *v5; // ecx + + v3 = *a2; + v4 = a2[1]; + *this = *a2; + v5 = (int *)((char *)this + *(_DWORD *)(v3 - 12)); + *v5 = v4; + return std::wios::init((int)v5, a3); +} + +//----- (004C12E0) -------------------------------------------------------- +int __thiscall std::wostream::basic_ostream(int *this, int *a2, int a3) +{ + int v3; // edx + int result; // eax + + v3 = *a2; + result = a2[1]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = result; + return result; +} + +//----- (004C1300) -------------------------------------------------------- +BOOL __thiscall std::wostream::basic_ostream(int *this, int *a2) +{ + int v2; // edx + int v3; // eax + _DWORD *v4; // ecx + + v2 = *a2; + v3 = a2[1]; + *this = *a2; + v4 = (int *)((char *)this + *(_DWORD *)(v2 - 12)); + *v4 = v3; + return std::wios::init((int)v4, 0); +} + +//----- (004C1320) -------------------------------------------------------- +void __fastcall std::wostream::~wostream(char *Block) +{ + char *v2; // ecx + + v2 = Block + 4; + *((_DWORD *)v2 - 1) = &off_51AB74; + *(_DWORD *)v2 = &off_51B7E0; + std::ios_base::~ios_base((int)v2); + operator delete(Block); +} +// 51AB74: using guessed type int (*off_51AB74)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004C1350) -------------------------------------------------------- +void __fastcall std::wostream::~wostream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + *a1 = &off_51AB74; + v1 = a1 + 1; + *v1 = &off_51B7E0; + std::ios_base::~ios_base((int)v1); +} +// 51AB74: using guessed type int (*off_51AB74)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004C1370) -------------------------------------------------------- +int __thiscall std::wostream::~wostream(int *this, int *a2) +{ + int v2; // eax + int result; // eax + + v2 = *a2; + *this = *a2; + result = *(_DWORD *)(v2 - 12); + *(int *)((char *)this + result) = a2[1]; + return result; +} + +//----- (004C1390) -------------------------------------------------------- +_DWORD *__thiscall std::wostream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base *v3; // ebx + std::ios_base **v4; // esi + std::ios_base *v5; // eax + __int16 v6; // dx + std::ios_base *v8; // [esp+4h] [ebp-18h] + + v3 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + v4 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + std::ios_base::_M_swap(v4, v3, v8); + std::wios::_M_cache_locale(v4, (int)(v4 + 27)); + std::wios::_M_cache_locale(v3, (int)v3 + 108); + v5 = v4[28]; + v4[28] = (std::ios_base *)*((_DWORD *)v3 + 28); + v6 = *((_WORD *)v3 + 58); + *((_DWORD *)v3 + 28) = v5; + LOWORD(v5) = *((_WORD *)v4 + 58); + *((_WORD *)v4 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v4 + 118); + *((_WORD *)v3 + 58) = (_WORD)v5; + *((_BYTE *)v4 + 118) = *((_BYTE *)v3 + 118); + *((_BYTE *)v3 + 118) = v6; + return this; +} +// 4C13CA: variable 'v8' is possibly undefined + +//----- (004C1440) -------------------------------------------------------- +int __thiscall std::wostream::operator<<(void *this, int (__cdecl *a2)(void *)) +{ + return a2(this); +} + +//----- (004C1450) -------------------------------------------------------- +char *__thiscall std::wostream::operator<<(char *this, void (__cdecl *a2)(char *)) +{ + a2(&this[*(_DWORD *)(*(_DWORD *)this - 12)]); + return this; +} + +//----- (004C1470) -------------------------------------------------------- +char *__thiscall std::wostream::operator<<(char *this, void (__cdecl *a2)(char *)) +{ + a2(&this[*(_DWORD *)(*(_DWORD *)this - 12)]); + return this; +} + +//----- (004C14A0) -------------------------------------------------------- +int *__thiscall std::wostream::operator<<(int *this, _DWORD *a2) +{ + char *v2; // ecx + int v3; // eax + int v4; // ecx + int v6; // [esp+0h] [ebp-78h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-64h] + char v9; // [esp+57h] [ebp-21h] BYREF + int v10; // [esp+58h] [ebp-20h] BYREF + _DWORD *v11; // [esp+5Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v10, this); + if ( (_BYTE)v10 ) + { + v2 = (char *)this + *(_DWORD *)(*this - 12); + if ( !a2 ) + { + v3 = 1; + goto LABEL_13; + } + if ( !std::__copy_streambufs_eof>(a2, *((_DWORD **)v2 + 30), &v9) ) + { + v3 = 4; + v2 = (char *)this + *(_DWORD *)(*this - 12); +LABEL_13: + std::wios::clear(v2, *((_DWORD *)v2 + 5) | v3); + } + } + else if ( !a2 ) + { + v3 = 1; + v2 = (char *)this + *(_DWORD *)(*this - 12); + goto LABEL_13; + } + lpuexcpt = (struct _Unwind_Exception *)((char *)v11 + *(_DWORD *)(*v11 - 12)); + if ( (*((_BYTE *)lpuexcpt + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v4 = *((_DWORD *)lpuexcpt + 30); + if ( v4 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 24))(v4, v6) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v11 + *(_DWORD *)(*v11 - 12)), + *(_DWORD *)((char *)v11 + *(_DWORD *)(*v11 - 12) + 20) | 1); + } + } + return this; +} +// 4C157B: variable 'v6' is possibly undefined + +//----- (004C16B0) -------------------------------------------------------- +int *__thiscall std::wostream::operator<<(int *this, unsigned __int8 a2) +{ + return std::wostream::_M_insert(this, a2); +} + +//----- (004C16E0) -------------------------------------------------------- +int *__thiscall std::wostream::operator<<(int *this, float a2) +{ + return std::wostream::_M_insert(this, a2); +} + +//----- (004C1740) -------------------------------------------------------- +int *__thiscall std::wostream::operator<<(int *this, unsigned __int16 a2) +{ + int v2; // eax + + v2 = *(int *)((char *)this + *(_DWORD *)(*this - 12) + 12) & 0x4A; + if ( v2 == 64 || v2 == 8 ) + return std::wostream::_M_insert(this, a2); + else + return std::wostream::_M_insert(this, (__int16)a2); +} + +//----- (004C1780) -------------------------------------------------------- +int *__thiscall std::wostream::operator<<(int *this, unsigned __int16 a2) +{ + return std::wostream::_M_insert(this, a2); +} + +//----- (004C17B0) -------------------------------------------------------- +void __thiscall std::random_device::_M_init_pretr1(_DWORD *this, unsigned __int8 **a2) +{ + void *Block[2]; // [esp+58h] [ebp-20h] BYREF + char v4[24]; // [esp+60h] [ebp-18h] BYREF + + if ( !std::string::compare((int)a2, "mt19937") || (unsigned int)**a2 - 48 <= 9 ) + { + Block[0] = v4; + std::string::_M_construct(Block, "default", (int)""); + std::random_device::_M_init(this, (int)Block); + if ( Block[0] != v4 ) + operator delete(Block[0]); + } + else + { + std::random_device::_M_init(this, (int)a2); + } +} + +//----- (004C18C0) -------------------------------------------------------- +void __userpurge std::random_device::_M_init_pretr1(_DWORD *a1@, std::random_device **this, const std::string *a3) +{ + unsigned int v3; // [esp+8h] [ebp-14h] + + std::random_device::_M_init(a1, *this, *((const char **)*this - 3), v3); +} +// 4C18D3: variable 'v3' is possibly undefined + +//----- (004C1900) -------------------------------------------------------- +int __fastcall std::random_device::_M_fini(int *a1) +{ + int result; // eax + + result = *a1; + if ( *a1 ) + { + result = close(a1[2]); + a1[2] = -1; + *a1 = 0; + } + return result; +} + +//----- (004C1940) -------------------------------------------------------- +void __userpurge std::random_device::_M_init( + _DWORD *a1@, + std::random_device *this, + const char *a3, + unsigned int a4) +{ + void *Block[2]; // [esp+58h] [ebp-20h] BYREF + char v6[24]; // [esp+60h] [ebp-18h] BYREF + + Block[0] = v6; + std::string::_M_construct(Block, this, (int)this + (_DWORD)a3); + std::random_device::_M_init(a1, (int)Block); + if ( Block[0] != v6 ) + operator delete(Block[0]); +} + +//----- (004C1A00) -------------------------------------------------------- +void *__thiscall std::random_device::_M_init(_DWORD *this, int a2) +{ + void *result; // eax + unsigned int v5; // kr00_4 + unsigned int v6; // kr04_4 + unsigned int v7; // kr08_4 + unsigned int v17; // kr0C_4 + unsigned int v18; // kr10_4 + unsigned int v19; // kr14_4 + unsigned int v34; // [esp-4h] [ebp-20h] + unsigned int v35; // [esp-4h] [ebp-20h] + + *this = 0; + this[1] = 0; + this[2] = -1; + result = (void *)std::string::compare(a2, "default"); + if ( !result ) + { +LABEL_2: + this[1] = std::`anonymous namespace'::__winxp_rand_s; + return result; + } + if ( std::string::compare(a2, "rdseed") ) + { + if ( std::string::compare(a2, "rdrand") && std::string::compare(a2, "rdrnd") ) + { + result = (void *)std::string::compare(a2, "rand_s"); + if ( result ) + std::__throw_runtime_error((std::runtime_error *)"random_device::random_device(const std::string&): unsupported token"); + goto LABEL_2; + } + v5 = __readeflags(); + v34 = v5; + v6 = __readeflags(); + __writeeflags(v6 ^ 0x200000); + v7 = __readeflags(); + __writeeflags(v34); + if ( ((v6 ^ v7) & 0x200000) != 0 ) + { + _EAX = 0; + __asm { cpuid } + if ( _EAX ) + { + if ( _EBX == 1970169159 || _EBX == 1752462657 ) + { + _EAX = 1; + __asm { cpuid } + if ( (_ECX & 0x40000000) != 0 ) + { + this[1] = std::`anonymous namespace'::__x86_rdrand; + return result; + } + } + } + } +LABEL_20: + std::__throw_runtime_error((std::runtime_error *)"random_device::random_device(const std::string&): device not available"); + } + v17 = __readeflags(); + v35 = v17; + v18 = __readeflags(); + __writeeflags(v18 ^ 0x200000); + v19 = __readeflags(); + __writeeflags(v35); + if ( ((v18 ^ v19) & 0x200000) == 0 ) + goto LABEL_20; + __asm { cpuid } + if ( !_EAX || _EBX != 1970169159 && _EBX != 1752462657 ) + goto LABEL_20; + _EAX = 7; + __asm { cpuid } + if ( (_EBX & 0x40000) == 0 ) + goto LABEL_20; + _EAX = 1; + __asm { cpuid } + result = std::`anonymous namespace'::__x86_rdseed; + if ( (_ECX & 0x40000000) != 0 ) + result = std::`anonymous namespace'::__x86_rdseed_rdrand; + this[1] = result; + return result; +} + +//----- (004C1BA0) -------------------------------------------------------- +void __userpurge std::random_device::_M_init(_DWORD *a1@, std::random_device **this, const std::string *a3) +{ + unsigned int v3; // [esp+8h] [ebp-14h] + + std::random_device::_M_init(a1, *this, *((const char **)*this - 3), v3); +} +// 4C1BB3: variable 'v3' is possibly undefined + +//----- (004C1BD0) -------------------------------------------------------- +int __fastcall std::random_device::_M_getval(int a1) +{ + int (__cdecl *v1)(_DWORD); // eax + unsigned int MaxCharCount; // ebx + int *DstBuf; // esi + int v6; // eax + int v7; // [esp+1Ch] [ebp-20h] BYREF + + v1 = *(int (__cdecl **)(_DWORD))(a1 + 4); + if ( v1 ) + return v1(0); + MaxCharCount = 4; + DstBuf = &v7; + do + { + while ( 1 ) + { + v6 = read(*(_DWORD *)(a1 + 8), DstBuf, MaxCharCount); + if ( v6 > 0 ) + break; + if ( v6 != -1 || *__errno() != 4 ) + std::__throw_runtime_error((std::runtime_error *)"random_device could not be read"); + } + DstBuf = (int *)((char *)DstBuf + v6); + MaxCharCount -= v6; + } + while ( MaxCharCount ); + return v7; +} + +//----- (004C1C50) -------------------------------------------------------- +void __userpurge std::runtime_error::runtime_error(_DWORD *a1@, std::runtime_error *this, const char *a3) +{ + int v3; // [esp+5Fh] [ebp-9h] BYREF + + *a1 = &off_51AB98; + std::string::string(a1 + 1, (char *)this, (int)&v3); +} +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); + +//----- (004C1CE0) -------------------------------------------------------- +void __thiscall std::runtime_error::runtime_error(_DWORD *this, int a2) +{ + unsigned int v2; // [esp+8h] [ebp-50h] + + *this = &off_51AB98; + std::__cow_string::__cow_string(this + 1, *(std::__cow_string **)a2, *(_DWORD *)(a2 + 4), v2); +} +// 4C1D34: variable 'v2' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); + +//----- (004C1D70) -------------------------------------------------------- +void __userpurge std::runtime_error::runtime_error( + _DWORD *a1@, + std::runtime_error *this, + const std::runtime_error *a3) +{ + const std::string *v3; // [esp+4h] [ebp-58h] + + *a1 = &off_51AB98; + std::string::string(a1 + 1, (std::runtime_error *)((char *)this + 4), v3); +} +// 4C1DAE: variable 'v3' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); + +//----- (004C1DD0) -------------------------------------------------------- +void __userpurge std::runtime_error::runtime_error(_DWORD *a1@, std::runtime_error *this, const std::string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-54h] + + *a1 = &off_51AB98; + std::string::string(a1 + 1, this, v3); +} +// 4C1E18: variable 'v3' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); + +//----- (004C1E50) -------------------------------------------------------- +void __fastcall std::runtime_error::~runtime_error(void *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + std::runtime_error::~runtime_error(Block); + operator delete(a1); +} +// 4C1E56: variable 'Block' is possibly undefined + +//----- (004C1E70) -------------------------------------------------------- +void __cdecl std::runtime_error::~runtime_error(std::exception *a1) +{ + _DWORD *v1; // ecx + int v2; // eax + int v3; // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *v1 = &off_51AB98; + v3 = v1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 > 0 ) + { +LABEL_3: + std::exception::~exception(a1); + return; + } + } + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v5); + std::exception::~exception(a1); +} +// 4C1E7B: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 4C1E70: using guessed type int var_D[3]; + +//----- (004C1ED0) -------------------------------------------------------- +int *__thiscall std::runtime_error::operator=(int *this, int a2) +{ + const std::string *v4; // [esp+4h] [ebp-58h] + + std::string::assign(this + 1, (std::string *)(a2 + 4), v4); + return this; +} +// 4C1F08: variable 'v4' is possibly undefined + +//----- (004C1F30) -------------------------------------------------------- +int *__thiscall std::runtime_error::operator=(int *this, int a2) +{ + const std::string *v4; // [esp+4h] [ebp-58h] + + std::string::assign(this + 1, (std::string *)(a2 + 4), v4); + return this; +} +// 4C1F68: variable 'v4' is possibly undefined + +//----- (004C1F90) -------------------------------------------------------- +int __fastcall std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(volatile signed __int32 **a1) +{ + volatile signed __int32 *v1; // ecx + int result; // eax + + v1 = *a1; + if ( v1 ) + return std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v1); + return result; +} + +//----- (004C1FA0) -------------------------------------------------------- +int __thiscall std::ifstream::open(int *this, char *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::filebuf::open(this + 2, a2, a3 | 8) == 0; + v5 = *this; + if ( v4 ) + return std::ios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::ios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C2010) -------------------------------------------------------- +int __thiscall std::ifstream::open(int *this, wchar_t *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::filebuf::open(this + 2, a2, a3 | 8) == 0; + v5 = *this; + if ( v4 ) + return std::ios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::ios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C2080) -------------------------------------------------------- +int __thiscall std::ifstream::open(int *this, char **a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::filebuf::open(this + 2, *a2, a3 | 8) == 0; + v5 = *this; + if ( v4 ) + return std::ios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::ios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C20F0) -------------------------------------------------------- +void __thiscall std::ifstream::swap(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // edi + std::ios_base *v4; // esi + std::ios_base *v5; // edx + char v6; // cl + char v7; // cl + int v8; // edx + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + v8 = this[1]; + *((_BYTE *)v4 + 117) = v7; + this[1] = a2[1]; + a2[1] = v8; + std::filebuf::swap((int)(this + 2), (int)(a2 + 2)); +} +// 4C2130: variable 'v9' is possibly undefined + +//----- (004C21C0) -------------------------------------------------------- +struct _Unwind_Exception *__fastcall std::ifstream::close(_DWORD *a1) +{ + struct _Unwind_Exception *result; // eax + + result = std::filebuf::close((struct _Unwind_Exception *)(a1 + 2)); + if ( !result ) + return (struct _Unwind_Exception *)std::ios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 4); + return result; +} + +//----- (004C2200) -------------------------------------------------------- +bool __fastcall std::ifstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 48)); +} + +//----- (004C2210) -------------------------------------------------------- +void __thiscall std::ifstream::basic_ifstream(_DWORD *this, int *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // ecx + int v5; // eax + std::ios_base *v6; // [esp+4h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v8; // [esp+14h] [ebp-44h] + + v8 = this + 29; + std::ios_base::ios_base(this + 29); + *((_WORD *)this + 116) = 0; + v2 = a2[1]; + *this = &unk_515A68; + this[1] = v2; + this[57] = 0; + v3 = *a2; + this[59] = 0; + this[60] = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[29] = &unk_515A7C; + this[61] = 0; + this[62] = 0; + lpuexcpt = v4; + std::ios_base::_M_move((int)v8, v4, v6); + std::ios::_M_cache_locale(v8, (int)(this + 56)); + this[59] = 0; + v5 = *((_DWORD *)lpuexcpt + 28); + *((_DWORD *)lpuexcpt + 28) = 0; + this[57] = v5; + *((_WORD *)this + 116) = *((_WORD *)lpuexcpt + 58); + a2[1] = 0; + *this = off_51ABB0; + this[29] = off_51ABC4; + std::filebuf::basic_filebuf((int)(this + 2), (std::locale *)(a2 + 2)); + this[59] = this + 2; +} +// 4C22B5: variable 'v6' is possibly undefined +// 51ABB0: using guessed type int (*off_51ABB0[2])(); +// 51ABC4: using guessed type int (*off_51ABC4[2])(); + +//----- (004C23A0) -------------------------------------------------------- +void __thiscall std::ifstream::basic_ifstream(_DWORD *this, char *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 29; + std::ios_base::ios_base(this + 29); + this[57] = 0; + *((_WORD *)this + 116) = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + *this = &unk_515A68; + this[29] = &unk_515A7C; + this[1] = 0; + std::ios::init((int)v5, 0); + *this = off_51ABB0; + this[29] = off_51ABC4; + std::filebuf::basic_filebuf((int)(this + 2)); + std::ios::init((int)v5, (int)(this + 2)); + v3 = std::filebuf::open(this + 2, a2, a3 | 8); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::ios::clear(v4, 0); + else + std::ios::clear(v4, v4[5] | 4); +} +// 51ABB0: using guessed type int (*off_51ABB0[2])(); +// 51ABC4: using guessed type int (*off_51ABC4[2])(); + +//----- (004C2550) -------------------------------------------------------- +void __thiscall std::ifstream::basic_ifstream(_DWORD *this, wchar_t *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 29; + std::ios_base::ios_base(this + 29); + this[57] = 0; + *((_WORD *)this + 116) = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + *this = &unk_515A68; + this[29] = &unk_515A7C; + this[1] = 0; + std::ios::init((int)v5, 0); + *this = off_51ABB0; + this[29] = off_51ABC4; + std::filebuf::basic_filebuf((int)(this + 2)); + std::ios::init((int)v5, (int)(this + 2)); + v3 = std::filebuf::open(this + 2, a2, a3 | 8); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::ios::clear(v4, 0); + else + std::ios::clear(v4, v4[5] | 4); +} +// 51ABB0: using guessed type int (*off_51ABB0[2])(); +// 51ABC4: using guessed type int (*off_51ABC4[2])(); + +//----- (004C2700) -------------------------------------------------------- +void __thiscall std::ifstream::basic_ifstream(_DWORD *this, char **a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 29; + std::ios_base::ios_base(this + 29); + this[57] = 0; + *((_WORD *)this + 116) = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + *this = &unk_515A68; + this[29] = &unk_515A7C; + this[1] = 0; + std::ios::init((int)v5, 0); + *this = off_51ABB0; + this[29] = off_51ABC4; + std::filebuf::basic_filebuf((int)(this + 2)); + std::ios::init((int)v5, (int)(this + 2)); + v3 = std::filebuf::open(this + 2, *a2, a3 | 8); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::ios::clear(v4, 0); + else + std::ios::clear(v4, v4[5] | 4); +} +// 51ABB0: using guessed type int (*off_51ABB0[2])(); +// 51ABC4: using guessed type int (*off_51ABC4[2])(); + +//----- (004C28B0) -------------------------------------------------------- +void __fastcall std::ifstream::basic_ifstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 116; + std::ios_base::ios_base((_DWORD *)(a1 + 116)); + *(_DWORD *)(a1 + 228) = 0; + *(_WORD *)(a1 + 232) = 0; + *(_DWORD *)(a1 + 236) = 0; + *(_DWORD *)(a1 + 240) = 0; + *(_DWORD *)(a1 + 244) = 0; + *(_DWORD *)(a1 + 248) = 0; + *(_DWORD *)a1 = &unk_515A68; + *(_DWORD *)(a1 + 116) = &unk_515A7C; + *(_DWORD *)(a1 + 4) = 0; + std::ios::init(v1, 0); + *(_DWORD *)a1 = off_51ABB0; + *(_DWORD *)(a1 + 116) = off_51ABC4; + std::filebuf::basic_filebuf(a1 + 8); + std::ios::init(v1, a1 + 8); +} +// 51ABB0: using guessed type int (*off_51ABB0[2])(); +// 51ABC4: using guessed type int (*off_51ABC4[2])(); + +//----- (004C2A00) -------------------------------------------------------- +void __thiscall std::ifstream::basic_ifstream(int *this, int *a2, _DWORD *a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + std::ios_base *v10; // [esp+4h] [ebp-54h] + std::ios_base *v11; // [esp+10h] [ebp-48h] + char *v12; // [esp+14h] [ebp-44h] + + v4 = a2[1]; + v5 = a2[2]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = a3[1]; + v12 = (char *)this + *(_DWORD *)(v4 - 12); + v11 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v12, v11, v10); + std::ios::_M_cache_locale(v12, (int)(v12 + 108)); + v7 = *((_DWORD *)v11 + 28); + *((_DWORD *)v12 + 30) = 0; + *((_DWORD *)v11 + 28) = 0; + v8 = a2[3]; + *((_DWORD *)v12 + 28) = v7; + *((_WORD *)v12 + 58) = *((_WORD *)v11 + 58); + a3[1] = 0; + v9 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v9 - 12)) = v8; + std::filebuf::basic_filebuf((int)(this + 2), (std::locale *)(a3 + 2)); + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)(this + 2); +} +// 4C2A67: variable 'v10' is possibly undefined + +//----- (004C2B40) -------------------------------------------------------- +void __thiscall std::ifstream::basic_ifstream(int *this, int *a2, char *a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + int v9; // edx + _DWORD *v10; // eax + _DWORD *v11; // ecx + + v5 = a2[1]; + v6 = a2[2]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = *a2; + v9 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + std::filebuf::basic_filebuf((int)(this + 2)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 2)); + v10 = std::filebuf::open(this + 2, a3, a4 | 8); + v11 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v10 ) + std::ios::clear(v11, 0); + else + std::ios::clear(v11, v11[5] | 4); +} + +//----- (004C2CB0) -------------------------------------------------------- +void __thiscall std::ifstream::basic_ifstream(int *this, int *a2, wchar_t *a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + int v9; // edx + _DWORD *v10; // eax + _DWORD *v11; // ecx + + v5 = a2[1]; + v6 = a2[2]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = *a2; + v9 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + std::filebuf::basic_filebuf((int)(this + 2)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 2)); + v10 = std::filebuf::open(this + 2, a3, a4 | 8); + v11 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v10 ) + std::ios::clear(v11, 0); + else + std::ios::clear(v11, v11[5] | 4); +} + +//----- (004C2E20) -------------------------------------------------------- +void __thiscall std::ifstream::basic_ifstream(int *this, int *a2, char **a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + int v9; // edx + _DWORD *v10; // eax + _DWORD *v11; // ecx + + v5 = a2[1]; + v6 = a2[2]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = *a2; + v9 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + std::filebuf::basic_filebuf((int)(this + 2)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 2)); + v10 = std::filebuf::open(this + 2, *a3, a4 | 8); + v11 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v10 ) + std::ios::clear(v11, 0); + else + std::ios::clear(v11, v11[5] | 4); +} + +//----- (004C2F90) -------------------------------------------------------- +void __thiscall std::ifstream::basic_ifstream(int *this, int *a2) +{ + int v3; // eax + int v4; // ecx + int v5; // edx + int v6; // eax + int v7; // edx + + v3 = a2[1]; + v4 = a2[2]; + v5 = *(_DWORD *)(v3 - 12); + *this = v3; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v3 - 12), 0); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + std::filebuf::basic_filebuf((int)(this + 2)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 2)); +} + +//----- (004C30B0) -------------------------------------------------------- +void __fastcall std::ifstream::~ifstream(_DWORD *a1) +{ + *a1 = off_51ABB0; + a1[29] = off_51ABC4; + a1[2] = off_51AA50; + std::filebuf::close((struct _Unwind_Exception *)(a1 + 2)); + std::__basic_file::~__basic_file((int)(a1 + 12)); + a1[2] = &off_51ADD4; + std::locale::~locale((_DWORD **)a1 + 9); + *a1 = &unk_515A68; + a1[1] = 0; + a1[29] = &off_51B7D0; + std::ios_base::~ios_base((int)(a1 + 29)); + operator delete(a1); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ABB0: using guessed type int (*off_51ABB0[2])(); +// 51ABC4: using guessed type int (*off_51ABC4[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004C3190) -------------------------------------------------------- +void __fastcall std::ifstream::~ifstream(int a1) +{ + *(_DWORD *)a1 = off_51ABB0; + *(_DWORD *)(a1 + 116) = off_51ABC4; + *(_DWORD *)(a1 + 8) = off_51AA50; + std::filebuf::close((struct _Unwind_Exception *)(a1 + 8)); + std::__basic_file::~__basic_file(a1 + 48); + *(_DWORD *)(a1 + 8) = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 36)); + *(_DWORD *)a1 = &unk_515A68; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 116) = &off_51B7D0; + std::ios_base::~ios_base(a1 + 116); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ABB0: using guessed type int (*off_51ABB0[2])(); +// 51ABC4: using guessed type int (*off_51ABC4[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004C3260) -------------------------------------------------------- +void __thiscall std::ifstream::~ifstream(int *this, int *a2) +{ + int v3; // eax + int v4; // eax + + v3 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = a2[3]; + this[2] = (int)off_51AA50; + std::filebuf::close((struct _Unwind_Exception *)(this + 2)); + std::__basic_file::~__basic_file((int)(this + 12)); + this[2] = (int)&off_51ADD4; + std::locale::~locale((_DWORD **)this + 9); + v4 = a2[1]; + *this = v4; + *(int *)((char *)this + *(_DWORD *)(v4 - 12)) = a2[2]; + this[1] = 0; +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004C3340) -------------------------------------------------------- +_DWORD *__thiscall std::ifstream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + char v6; // cl + char v7; // cl + int v8; // eax + std::ios_base *v10; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v10); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + v8 = this[1]; + *((_BYTE *)v4 + 117) = v7; + this[1] = a2[1]; + a2[1] = v8; + std::filebuf::operator=((int)(this + 2), (int)(a2 + 2)); + return this; +} +// 4C3380: variable 'v10' is possibly undefined + +//----- (004C3420) -------------------------------------------------------- +int __thiscall std::wifstream::open(int *this, char *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::wfilebuf::open(this + 2, a2, a3 | 8) == 0; + v5 = *this; + if ( v4 ) + return std::wios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::wios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C3490) -------------------------------------------------------- +int __thiscall std::wifstream::open(int *this, wchar_t *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::wfilebuf::open(this + 2, a2, a3 | 8) == 0; + v5 = *this; + if ( v4 ) + return std::wios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::wios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C3500) -------------------------------------------------------- +int __thiscall std::wifstream::open(int *this, char **a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::wfilebuf::open(this + 2, *a2, a3 | 8) == 0; + v5 = *this; + if ( v4 ) + return std::wios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::wios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C3570) -------------------------------------------------------- +void __thiscall std::wifstream::swap(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // edi + std::ios_base *v4; // esi + std::ios_base *v5; // edx + __int16 v6; // cx + int v7; // edx + std::ios_base *v8; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = a2[1]; + a2[1] = v7; + std::wfilebuf::swap((int)(this + 2), (int)(a2 + 2)); +} +// 4C35B0: variable 'v8' is possibly undefined + +//----- (004C3640) -------------------------------------------------------- +struct _Unwind_Exception *__fastcall std::wifstream::close(_DWORD *a1) +{ + struct _Unwind_Exception *result; // eax + + result = std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 2)); + if ( !result ) + return (struct _Unwind_Exception *)std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 4); + return result; +} + +//----- (004C3680) -------------------------------------------------------- +bool __fastcall std::wifstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 48)); +} + +//----- (004C3690) -------------------------------------------------------- +void __thiscall std::wifstream::basic_ifstream(_DWORD *this, int *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // ecx + int v5; // eax + std::ios_base *v6; // [esp+4h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v8; // [esp+14h] [ebp-44h] + + v8 = this + 30; + std::ios_base::ios_base(this + 30); + v2 = a2[1]; + *((_WORD *)this + 118) = 0; + *this = &unk_515A90; + this[1] = v2; + this[58] = 0; + v3 = *a2; + *((_BYTE *)this + 238) = 0; + this[60] = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[61] = 0; + this[62] = 0; + this[63] = 0; + this[30] = &unk_515AA4; + lpuexcpt = v4; + std::ios_base::_M_move((int)v8, v4, v6); + std::wios::_M_cache_locale(v8, (int)(this + 57)); + this[60] = 0; + v5 = *((_DWORD *)lpuexcpt + 28); + *((_DWORD *)lpuexcpt + 28) = 0; + this[58] = v5; + *((_WORD *)this + 118) = *((_WORD *)lpuexcpt + 58); + *((_BYTE *)this + 238) = *((_BYTE *)lpuexcpt + 118); + a2[1] = 0; + *this = off_51ABD8; + this[30] = off_51ABEC; + std::wfilebuf::basic_filebuf((int)(this + 2), (std::locale *)(a2 + 2)); + this[60] = this + 2; +} +// 4C373C: variable 'v6' is possibly undefined +// 51ABD8: using guessed type int (*off_51ABD8[2])(); +// 51ABEC: using guessed type int (*off_51ABEC[2])(); + +//----- (004C3830) -------------------------------------------------------- +void __thiscall std::wifstream::basic_ifstream(_DWORD *this, char *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 30; + std::ios_base::ios_base(this + 30); + this[58] = 0; + *((_WORD *)this + 118) = 0; + *((_BYTE *)this + 238) = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + this[63] = 0; + *this = &unk_515A90; + this[30] = &unk_515AA4; + this[1] = 0; + std::wios::init((int)v5, 0); + *this = off_51ABD8; + this[30] = off_51ABEC; + std::wfilebuf::basic_filebuf((int)(this + 2)); + std::wios::init((int)v5, (int)(this + 2)); + v3 = std::wfilebuf::open(this + 2, a2, a3 | 8); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::wios::clear(v4, 0); + else + std::wios::clear(v4, v4[5] | 4); +} +// 51ABD8: using guessed type int (*off_51ABD8[2])(); +// 51ABEC: using guessed type int (*off_51ABEC[2])(); + +//----- (004C39E0) -------------------------------------------------------- +void __thiscall std::wifstream::basic_ifstream(_DWORD *this, wchar_t *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 30; + std::ios_base::ios_base(this + 30); + this[58] = 0; + *((_WORD *)this + 118) = 0; + *((_BYTE *)this + 238) = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + this[63] = 0; + *this = &unk_515A90; + this[30] = &unk_515AA4; + this[1] = 0; + std::wios::init((int)v5, 0); + *this = off_51ABD8; + this[30] = off_51ABEC; + std::wfilebuf::basic_filebuf((int)(this + 2)); + std::wios::init((int)v5, (int)(this + 2)); + v3 = std::wfilebuf::open(this + 2, a2, a3 | 8); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::wios::clear(v4, 0); + else + std::wios::clear(v4, v4[5] | 4); +} +// 51ABD8: using guessed type int (*off_51ABD8[2])(); +// 51ABEC: using guessed type int (*off_51ABEC[2])(); + +//----- (004C3B90) -------------------------------------------------------- +void __thiscall std::wifstream::basic_ifstream(_DWORD *this, char **a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 30; + std::ios_base::ios_base(this + 30); + this[58] = 0; + *((_WORD *)this + 118) = 0; + *((_BYTE *)this + 238) = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + this[63] = 0; + *this = &unk_515A90; + this[30] = &unk_515AA4; + this[1] = 0; + std::wios::init((int)v5, 0); + *this = off_51ABD8; + this[30] = off_51ABEC; + std::wfilebuf::basic_filebuf((int)(this + 2)); + std::wios::init((int)v5, (int)(this + 2)); + v3 = std::wfilebuf::open(this + 2, *a2, a3 | 8); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::wios::clear(v4, 0); + else + std::wios::clear(v4, v4[5] | 4); +} +// 51ABD8: using guessed type int (*off_51ABD8[2])(); +// 51ABEC: using guessed type int (*off_51ABEC[2])(); + +//----- (004C3D40) -------------------------------------------------------- +void __fastcall std::wifstream::basic_ifstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 120; + std::ios_base::ios_base((_DWORD *)(a1 + 120)); + *(_DWORD *)(a1 + 232) = 0; + *(_WORD *)(a1 + 236) = 0; + *(_BYTE *)(a1 + 238) = 0; + *(_DWORD *)(a1 + 240) = 0; + *(_DWORD *)(a1 + 244) = 0; + *(_DWORD *)(a1 + 248) = 0; + *(_DWORD *)(a1 + 252) = 0; + *(_DWORD *)a1 = &unk_515A90; + *(_DWORD *)(a1 + 120) = &unk_515AA4; + *(_DWORD *)(a1 + 4) = 0; + std::wios::init(v1, 0); + *(_DWORD *)a1 = off_51ABD8; + *(_DWORD *)(a1 + 120) = off_51ABEC; + std::wfilebuf::basic_filebuf(a1 + 8); + std::wios::init(v1, a1 + 8); +} +// 51ABD8: using guessed type int (*off_51ABD8[2])(); +// 51ABEC: using guessed type int (*off_51ABEC[2])(); + +//----- (004C3EA0) -------------------------------------------------------- +void __thiscall std::wifstream::basic_ifstream(int *this, int *a2, _DWORD *a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + std::ios_base *v10; // [esp+4h] [ebp-54h] + std::ios_base *v11; // [esp+10h] [ebp-48h] + char *v12; // [esp+14h] [ebp-44h] + + v4 = a2[1]; + v5 = a2[2]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = a3[1]; + v12 = (char *)this + *(_DWORD *)(v4 - 12); + v11 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v12, v11, v10); + std::wios::_M_cache_locale(v12, (int)(v12 + 108)); + v7 = *((_DWORD *)v11 + 28); + *((_DWORD *)v12 + 30) = 0; + *((_DWORD *)v11 + 28) = 0; + v8 = a2[3]; + *((_DWORD *)v12 + 28) = v7; + *((_WORD *)v12 + 58) = *((_WORD *)v11 + 58); + v12[118] = *((_BYTE *)v11 + 118); + a3[1] = 0; + v9 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v9 - 12)) = v8; + std::wfilebuf::basic_filebuf((int)(this + 2), (std::locale *)(a3 + 2)); + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)(this + 2); +} +// 4C3F07: variable 'v10' is possibly undefined + +//----- (004C3FF0) -------------------------------------------------------- +void __thiscall std::wifstream::basic_ifstream(int *this, int *a2, char *a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + int v9; // edx + _DWORD *v10; // eax + _DWORD *v11; // ecx + + v5 = a2[1]; + v6 = a2[2]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = *a2; + v9 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + std::wfilebuf::basic_filebuf((int)(this + 2)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 2)); + v10 = std::wfilebuf::open(this + 2, a3, a4 | 8); + v11 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v10 ) + std::wios::clear(v11, 0); + else + std::wios::clear(v11, v11[5] | 4); +} + +//----- (004C4160) -------------------------------------------------------- +void __thiscall std::wifstream::basic_ifstream(int *this, int *a2, wchar_t *a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + int v9; // edx + _DWORD *v10; // eax + _DWORD *v11; // ecx + + v5 = a2[1]; + v6 = a2[2]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = *a2; + v9 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + std::wfilebuf::basic_filebuf((int)(this + 2)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 2)); + v10 = std::wfilebuf::open(this + 2, a3, a4 | 8); + v11 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v10 ) + std::wios::clear(v11, 0); + else + std::wios::clear(v11, v11[5] | 4); +} + +//----- (004C42D0) -------------------------------------------------------- +void __thiscall std::wifstream::basic_ifstream(int *this, int *a2, char **a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + int v9; // edx + _DWORD *v10; // eax + _DWORD *v11; // ecx + + v5 = a2[1]; + v6 = a2[2]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = *a2; + v9 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + std::wfilebuf::basic_filebuf((int)(this + 2)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 2)); + v10 = std::wfilebuf::open(this + 2, *a3, a4 | 8); + v11 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v10 ) + std::wios::clear(v11, 0); + else + std::wios::clear(v11, v11[5] | 4); +} + +//----- (004C4440) -------------------------------------------------------- +void __thiscall std::wifstream::basic_ifstream(int *this, int *a2) +{ + int v3; // eax + int v4; // ecx + int v5; // edx + int v6; // eax + int v7; // edx + + v3 = a2[1]; + v4 = a2[2]; + v5 = *(_DWORD *)(v3 - 12); + *this = v3; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v3 - 12), 0); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + std::wfilebuf::basic_filebuf((int)(this + 2)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 2)); +} + +//----- (004C4560) -------------------------------------------------------- +void __fastcall std::wifstream::~wifstream(_DWORD *a1) +{ + *a1 = off_51ABD8; + a1[30] = off_51ABEC; + a1[2] = off_51AA90; + std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 2)); + std::__basic_file::~__basic_file((int)(a1 + 12)); + a1[2] = &off_51AE14; + std::locale::~locale((_DWORD **)a1 + 9); + *a1 = &unk_515A90; + a1[1] = 0; + a1[30] = &off_51B7E0; + std::ios_base::~ios_base((int)(a1 + 30)); + operator delete(a1); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51ABD8: using guessed type int (*off_51ABD8[2])(); +// 51ABEC: using guessed type int (*off_51ABEC[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004C4640) -------------------------------------------------------- +void __fastcall std::wifstream::~wifstream(int a1) +{ + *(_DWORD *)a1 = off_51ABD8; + *(_DWORD *)(a1 + 120) = off_51ABEC; + *(_DWORD *)(a1 + 8) = off_51AA90; + std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 8)); + std::__basic_file::~__basic_file(a1 + 48); + *(_DWORD *)(a1 + 8) = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 36)); + *(_DWORD *)a1 = &unk_515A90; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 120) = &off_51B7E0; + std::ios_base::~ios_base(a1 + 120); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51ABD8: using guessed type int (*off_51ABD8[2])(); +// 51ABEC: using guessed type int (*off_51ABEC[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004C4710) -------------------------------------------------------- +void __thiscall std::wifstream::~wifstream(int *this, int *a2) +{ + int v3; // eax + int v4; // eax + + v3 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = a2[3]; + this[2] = (int)off_51AA90; + std::wfilebuf::close((struct _Unwind_Exception *)(this + 2)); + std::__basic_file::~__basic_file((int)(this + 12)); + this[2] = (int)&off_51AE14; + std::locale::~locale((_DWORD **)this + 9); + v4 = a2[1]; + *this = v4; + *(int *)((char *)this + *(_DWORD *)(v4 - 12)) = a2[2]; + this[1] = 0; +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004C47F0) -------------------------------------------------------- +_DWORD *__thiscall std::wifstream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + __int16 v6; // cx + int v7; // eax + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = a2[1]; + a2[1] = v7; + std::wfilebuf::operator=((int)(this + 2), (int)(a2 + 2)); + return this; +} +// 4C4830: variable 'v9' is possibly undefined + +//----- (004C48D0) -------------------------------------------------------- +void __thiscall std::wiostream::swap(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // edx + __int16 v6; // cx + int v7; // edx + std::ios_base *v8; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = a2[1]; + a2[1] = v7; +} +// 4C490D: variable 'v8' is possibly undefined + +//----- (004C4990) -------------------------------------------------------- +void __thiscall std::wiostream::basic_iostream(_DWORD *this, int *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // ecx + int v5; // eax + std::ios_base *v6; // [esp+4h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v8; // [esp+14h] [ebp-44h] + + v8 = this + 3; + std::ios_base::ios_base(this + 3); + v2 = a2[1]; + *((_WORD *)this + 64) = 0; + *this = &unk_515AB8; + this[1] = v2; + this[31] = 0; + v3 = *a2; + *((_BYTE *)this + 130) = 0; + this[33] = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[34] = 0; + this[35] = 0; + this[36] = 0; + this[3] = &unk_515ACC; + lpuexcpt = v4; + std::ios_base::_M_move((int)v8, v4, v6); + std::wios::_M_cache_locale(v8, (int)(this + 30)); + this[33] = 0; + v5 = *((_DWORD *)lpuexcpt + 28); + *((_DWORD *)lpuexcpt + 28) = 0; + this[31] = v5; + *((_WORD *)this + 64) = *((_WORD *)lpuexcpt + 58); + *((_BYTE *)this + 130) = *((_BYTE *)lpuexcpt + 118); + a2[1] = 0; + *this = &off_51AC00; + this[3] = off_51AC28; + this[2] = off_51AC14; +} +// 4C4A39: variable 'v6' is possibly undefined +// 51AC00: using guessed type int (*off_51AC00)(); +// 51AC14: using guessed type int (*off_51AC14[2])(); +// 51AC28: using guessed type int (*off_51AC28[2])(); + +//----- (004C4AF0) -------------------------------------------------------- +void __thiscall std::wiostream::basic_iostream(_DWORD *this, int a2) +{ + _DWORD *v2; // [esp+14h] [ebp-44h] + + v2 = this + 3; + std::ios_base::ios_base(this + 3); + this[31] = 0; + *((_WORD *)this + 64) = 0; + *((_BYTE *)this + 130) = 0; + this[33] = 0; + this[34] = 0; + this[35] = 0; + this[36] = 0; + *this = &unk_515AB8; + this[3] = &unk_515ACC; + this[1] = 0; + std::wios::init((int)v2, a2); + this[2] = &unk_515AE0; + this[3] = &unk_515AF4; + std::wios::init((int)v2, a2); + *this = &off_51AC00; + this[3] = off_51AC28; + this[2] = off_51AC14; +} +// 51AC00: using guessed type int (*off_51AC00)(); +// 51AC14: using guessed type int (*off_51AC14[2])(); +// 51AC28: using guessed type int (*off_51AC28[2])(); + +//----- (004C4C40) -------------------------------------------------------- +void __fastcall std::wiostream::basic_iostream(int a1) +{ + int v1; // [esp+14h] [ebp-44h] + + v1 = a1 + 12; + std::ios_base::ios_base((_DWORD *)(a1 + 12)); + *(_DWORD *)(a1 + 124) = 0; + *(_WORD *)(a1 + 128) = 0; + *(_BYTE *)(a1 + 130) = 0; + *(_DWORD *)(a1 + 132) = 0; + *(_DWORD *)(a1 + 136) = 0; + *(_DWORD *)(a1 + 140) = 0; + *(_DWORD *)(a1 + 144) = 0; + *(_DWORD *)a1 = &unk_515AB8; + *(_DWORD *)(a1 + 12) = &unk_515ACC; + *(_DWORD *)(a1 + 4) = 0; + std::wios::init(v1, 0); + *(_DWORD *)(a1 + 8) = &unk_515AE0; + *(_DWORD *)(a1 + 12) = &unk_515AF4; + std::wios::init(v1, 0); + *(_DWORD *)a1 = &off_51AC00; + *(_DWORD *)(a1 + 12) = off_51AC28; + *(_DWORD *)(a1 + 8) = off_51AC14; +} +// 51AC00: using guessed type int (*off_51AC00)(); +// 51AC14: using guessed type int (*off_51AC14[2])(); +// 51AC28: using guessed type int (*off_51AC28[2])(); + +//----- (004C4D90) -------------------------------------------------------- +int __thiscall std::wiostream::basic_iostream(int *this, int *a2, _DWORD *a3) +{ + int v4; // eax + int v5; // edi + char *v6; // edi + std::ios_base *v7; // ebp + int v8; // eax + int v9; // eax + int v10; // edx + int v11; // eax + int v12; // edx + int result; // eax + std::ios_base *v14; // [esp+4h] [ebp-28h] + + v4 = a2[1]; + v5 = a2[2]; + *this = v4; + *(int *)((char *)this + *(_DWORD *)(v4 - 12)) = v5; + this[1] = a3[1]; + v6 = (char *)this + *(_DWORD *)(v4 - 12); + v7 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v6, v7, v14); + std::wios::_M_cache_locale(v6, (int)(v6 + 108)); + v8 = *((_DWORD *)v7 + 28); + *((_DWORD *)v6 + 30) = 0; + *((_DWORD *)v7 + 28) = 0; + *((_DWORD *)v6 + 28) = v8; + *((_WORD *)v6 + 58) = *((_WORD *)v7 + 58); + v6[118] = *((_BYTE *)v7 + 118); + v9 = a2[3]; + a3[1] = 0; + v10 = a2[4]; + this[2] = v9; + *(int *)((char *)this + *(_DWORD *)(v9 - 12) + 8) = v10; + v11 = *a2; + v12 = a2[5]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v11 - 12)) = v12; + result = a2[6]; + this[2] = result; + return result; +} +// 4C4DC6: variable 'v14' is possibly undefined + +//----- (004C4E40) -------------------------------------------------------- +void __thiscall std::wiostream::basic_iostream(int *this, int *a2, int a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + _DWORD *v8; // ecx + int v9; // eax + int v10; // edx + + v4 = a2[1]; + v5 = a2[2]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v4 - 12), a3); + v7 = a2[3]; + this[2] = v7; + v8 = (int *)((char *)this + *(_DWORD *)(v7 - 12) + 8); + *v8 = a2[4]; + std::wios::init((int)v8, a3); + v9 = *a2; + v10 = a2[5]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v9 - 12)) = v10; + this[2] = a2[6]; +} + +//----- (004C4F40) -------------------------------------------------------- +void __thiscall std::wiostream::basic_iostream(int *this, int *a2) +{ + int v3; // eax + int v4; // ecx + int v5; // edx + int v6; // eax + _DWORD *v7; // ecx + int v8; // eax + int v9; // edx + + v3 = a2[1]; + v4 = a2[2]; + v5 = *(_DWORD *)(v3 - 12); + *this = v3; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v3 - 12), 0); + v6 = a2[3]; + this[2] = v6; + v7 = (int *)((char *)this + *(_DWORD *)(v6 - 12) + 8); + *v7 = a2[4]; + std::wios::init((int)v7, 0); + v8 = *a2; + v9 = a2[5]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + this[2] = a2[6]; +} + +//----- (004C5040) -------------------------------------------------------- +void __fastcall std::wiostream::~basic_iostream(char *Block) +{ + char *v2; // ecx + + v2 = Block + 12; + *((_DWORD *)v2 - 1) = &unk_515AE0; + *((_DWORD *)v2 - 3) = &unk_515AB8; + *((_DWORD *)v2 - 2) = 0; + *(_DWORD *)v2 = &off_51B7E0; + std::ios_base::~ios_base((int)v2); + operator delete(Block); +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004C5080) -------------------------------------------------------- +void __fastcall std::wiostream::~basic_iostream(int a1) +{ + _DWORD *v1; // ecx + + *(_DWORD *)(a1 + 8) = &unk_515AE0; + v1 = (_DWORD *)(a1 + 12); + *(v1 - 3) = &unk_515AB8; + *(v1 - 2) = 0; + *v1 = &off_51B7E0; + std::ios_base::~ios_base((int)v1); +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004C50B0) -------------------------------------------------------- +int __thiscall std::wiostream::~basic_iostream(int *this, int *a2) +{ + int v2; // edx + int v3; // edx + int v4; // edx + int result; // eax + + v2 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v2 - 12)) = a2[5]; + this[2] = a2[6]; + v3 = a2[3]; + this[2] = v3; + *(int *)((char *)this + *(_DWORD *)(v3 - 12) + 8) = a2[4]; + v4 = a2[1]; + *this = v4; + result = *(_DWORD *)(v4 - 12); + *(int *)((char *)this + result) = a2[2]; + this[1] = 0; + return result; +} + +//----- (004C5100) -------------------------------------------------------- +_DWORD *__thiscall std::wiostream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // edx + __int16 v6; // cx + int v7; // edx + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = a2[1]; + a2[1] = v7; + return this; +} +// 4C513D: variable 'v9' is possibly undefined + +//----- (004C51C0) -------------------------------------------------------- +int __thiscall std::ofstream::open(int *this, char *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::filebuf::open(this + 1, a2, a3 | 0x10) == 0; + v5 = *this; + if ( v4 ) + return std::ios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::ios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C5230) -------------------------------------------------------- +int __thiscall std::ofstream::open(int *this, wchar_t *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::filebuf::open(this + 1, a2, a3 | 0x10) == 0; + v5 = *this; + if ( v4 ) + return std::ios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::ios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C52A0) -------------------------------------------------------- +int __thiscall std::ofstream::open(int *this, char **a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::filebuf::open(this + 1, *a2, a3 | 0x10) == 0; + v5 = *this; + if ( v4 ) + return std::ios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::ios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C5310) -------------------------------------------------------- +void __thiscall std::ofstream::swap(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // edx + char v6; // cl + char v7; // cl + std::ios_base *v8; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + *((_BYTE *)v4 + 117) = v7; + std::filebuf::swap((int)(this + 1), (int)(a2 + 1)); +} +// 4C5350: variable 'v8' is possibly undefined + +//----- (004C53D0) -------------------------------------------------------- +struct _Unwind_Exception *__fastcall std::ofstream::close(_DWORD *a1) +{ + struct _Unwind_Exception *result; // eax + + result = std::filebuf::close((struct _Unwind_Exception *)(a1 + 1)); + if ( !result ) + return (struct _Unwind_Exception *)std::ios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 4); + return result; +} + +//----- (004C5410) -------------------------------------------------------- +bool __fastcall std::ofstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 44)); +} + +//----- (004C5420) -------------------------------------------------------- +void __thiscall std::ofstream::basic_ofstream(_DWORD *this, _DWORD *a2) +{ + int v2; // eax + std::ios_base *v3; // [esp+4h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v5; // [esp+14h] [ebp-44h] + + v5 = this + 28; + std::ios_base::ios_base(this + 28); + *((_WORD *)this + 114) = 0; + this[56] = 0; + this[58] = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + *this = &unk_515B08; + this[28] = &unk_515B1C; + lpuexcpt = (struct _Unwind_Exception *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_move((int)v5, lpuexcpt, v3); + std::ios::_M_cache_locale(v5, (int)(this + 55)); + v2 = *((_DWORD *)lpuexcpt + 28); + *this = off_51AC3C; + *((_DWORD *)lpuexcpt + 28) = 0; + this[56] = v2; + LOWORD(v2) = *((_WORD *)lpuexcpt + 58); + this[58] = 0; + *((_WORD *)this + 114) = v2; + this[28] = off_51AC50; + std::filebuf::basic_filebuf((int)(this + 1), (std::locale *)(a2 + 1)); + this[58] = this + 1; +} +// 4C54BB: variable 'v3' is possibly undefined +// 51AC3C: using guessed type int (*off_51AC3C[2])(); +// 51AC50: using guessed type int (*off_51AC50[2])(); + +//----- (004C55A0) -------------------------------------------------------- +void __thiscall std::ofstream::basic_ofstream(_DWORD *this, char *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 28; + std::ios_base::ios_base(this + 28); + this[56] = 0; + *((_WORD *)this + 114) = 0; + this[58] = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + *this = &unk_515B08; + this[28] = &unk_515B1C; + std::ios::init((int)v5, 0); + *this = off_51AC3C; + this[28] = off_51AC50; + std::filebuf::basic_filebuf((int)(this + 1)); + std::ios::init((int)v5, (int)(this + 1)); + v3 = std::filebuf::open(this + 1, a2, a3 | 0x10); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::ios::clear(v4, 0); + else + std::ios::clear(v4, v4[5] | 4); +} +// 51AC3C: using guessed type int (*off_51AC3C[2])(); +// 51AC50: using guessed type int (*off_51AC50[2])(); + +//----- (004C5740) -------------------------------------------------------- +void __thiscall std::ofstream::basic_ofstream(_DWORD *this, wchar_t *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 28; + std::ios_base::ios_base(this + 28); + this[56] = 0; + *((_WORD *)this + 114) = 0; + this[58] = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + *this = &unk_515B08; + this[28] = &unk_515B1C; + std::ios::init((int)v5, 0); + *this = off_51AC3C; + this[28] = off_51AC50; + std::filebuf::basic_filebuf((int)(this + 1)); + std::ios::init((int)v5, (int)(this + 1)); + v3 = std::filebuf::open(this + 1, a2, a3 | 0x10); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::ios::clear(v4, 0); + else + std::ios::clear(v4, v4[5] | 4); +} +// 51AC3C: using guessed type int (*off_51AC3C[2])(); +// 51AC50: using guessed type int (*off_51AC50[2])(); + +//----- (004C58E0) -------------------------------------------------------- +void __thiscall std::ofstream::basic_ofstream(_DWORD *this, char **a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 28; + std::ios_base::ios_base(this + 28); + this[56] = 0; + *((_WORD *)this + 114) = 0; + this[58] = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + *this = &unk_515B08; + this[28] = &unk_515B1C; + std::ios::init((int)v5, 0); + *this = off_51AC3C; + this[28] = off_51AC50; + std::filebuf::basic_filebuf((int)(this + 1)); + std::ios::init((int)v5, (int)(this + 1)); + v3 = std::filebuf::open(this + 1, *a2, a3 | 0x10); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::ios::clear(v4, 0); + else + std::ios::clear(v4, v4[5] | 4); +} +// 51AC3C: using guessed type int (*off_51AC3C[2])(); +// 51AC50: using guessed type int (*off_51AC50[2])(); + +//----- (004C5A80) -------------------------------------------------------- +void __fastcall std::ofstream::basic_ofstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 112; + std::ios_base::ios_base((_DWORD *)(a1 + 112)); + *(_DWORD *)(a1 + 224) = 0; + *(_WORD *)(a1 + 228) = 0; + *(_DWORD *)(a1 + 232) = 0; + *(_DWORD *)(a1 + 236) = 0; + *(_DWORD *)(a1 + 240) = 0; + *(_DWORD *)(a1 + 244) = 0; + *(_DWORD *)a1 = &unk_515B08; + *(_DWORD *)(a1 + 112) = &unk_515B1C; + std::ios::init(v1, 0); + *(_DWORD *)a1 = off_51AC3C; + *(_DWORD *)(a1 + 112) = off_51AC50; + std::filebuf::basic_filebuf(a1 + 4); + std::ios::init(v1, a1 + 4); +} +// 51AC3C: using guessed type int (*off_51AC3C[2])(); +// 51AC50: using guessed type int (*off_51AC50[2])(); + +//----- (004C5BC0) -------------------------------------------------------- +void __thiscall std::ofstream::basic_ofstream(int *this, int *a2, _DWORD *a3) +{ + int v3; // eax + int v4; // eax + int v5; // edx + int v6; // eax + std::ios_base *v7; // [esp+4h] [ebp-54h] + std::ios_base *v8; // [esp+10h] [ebp-48h] + char *v9; // [esp+14h] [ebp-44h] + + v3 = a2[1]; + *this = v3; + v9 = (char *)this + *(_DWORD *)(v3 - 12); + *(_DWORD *)v9 = a2[2]; + v8 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v9, v8, v7); + std::ios::_M_cache_locale(v9, (int)(v9 + 108)); + v4 = *((_DWORD *)v8 + 28); + *((_DWORD *)v8 + 28) = 0; + *((_DWORD *)v9 + 30) = 0; + *((_DWORD *)v9 + 28) = v4; + *((_WORD *)v9 + 58) = *((_WORD *)v8 + 58); + v5 = a2[3]; + v6 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v5; + std::filebuf::basic_filebuf((int)(this + 1), (std::locale *)(a3 + 1)); + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)(this + 1); +} +// 4C5C1E: variable 'v7' is possibly undefined + +//----- (004C5CF0) -------------------------------------------------------- +void __thiscall std::ofstream::basic_ofstream(int *this, int *a2, char *a3, int a4) +{ + int v4; // eax + _DWORD *v5; // ecx + int v6; // eax + int v7; // edx + _DWORD *v8; // eax + _DWORD *v9; // ecx + + v4 = a2[1]; + *this = v4; + v5 = (int *)((char *)this + *(_DWORD *)(v4 - 12)); + *v5 = a2[2]; + std::ios::init((int)v5, 0); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + std::filebuf::basic_filebuf((int)(this + 1)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 1)); + v8 = std::filebuf::open(this + 1, a3, a4 | 0x10); + v9 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v8 ) + std::ios::clear(v9, 0); + else + std::ios::clear(v9, v9[5] | 4); +} + +//----- (004C5E40) -------------------------------------------------------- +void __thiscall std::ofstream::basic_ofstream(int *this, int *a2, wchar_t *a3, int a4) +{ + int v4; // eax + _DWORD *v5; // ecx + int v6; // eax + int v7; // edx + _DWORD *v8; // eax + _DWORD *v9; // ecx + + v4 = a2[1]; + *this = v4; + v5 = (int *)((char *)this + *(_DWORD *)(v4 - 12)); + *v5 = a2[2]; + std::ios::init((int)v5, 0); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + std::filebuf::basic_filebuf((int)(this + 1)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 1)); + v8 = std::filebuf::open(this + 1, a3, a4 | 0x10); + v9 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v8 ) + std::ios::clear(v9, 0); + else + std::ios::clear(v9, v9[5] | 4); +} + +//----- (004C5F90) -------------------------------------------------------- +void __thiscall std::ofstream::basic_ofstream(int *this, int *a2, char **a3, int a4) +{ + int v4; // eax + _DWORD *v5; // ecx + int v6; // eax + int v7; // edx + _DWORD *v8; // eax + _DWORD *v9; // ecx + + v4 = a2[1]; + *this = v4; + v5 = (int *)((char *)this + *(_DWORD *)(v4 - 12)); + *v5 = a2[2]; + std::ios::init((int)v5, 0); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + std::filebuf::basic_filebuf((int)(this + 1)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 1)); + v8 = std::filebuf::open(this + 1, *a3, a4 | 0x10); + v9 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v8 ) + std::ios::clear(v9, 0); + else + std::ios::clear(v9, v9[5] | 4); +} + +//----- (004C60E0) -------------------------------------------------------- +void __thiscall std::ofstream::basic_ofstream(int *this, int *a2) +{ + int v2; // eax + _DWORD *v3; // ecx + int v4; // eax + int v5; // edx + + v2 = a2[1]; + *this = v2; + v3 = (int *)((char *)this + *(_DWORD *)(v2 - 12)); + *v3 = a2[2]; + std::ios::init((int)v3, 0); + v4 = *a2; + v5 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v4 - 12)) = v5; + std::filebuf::basic_filebuf((int)(this + 1)); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 1)); +} + +//----- (004C61E0) -------------------------------------------------------- +void __fastcall std::ofstream::~ofstream(_DWORD *a1) +{ + *a1 = off_51AC3C; + a1[28] = off_51AC50; + a1[1] = off_51AA50; + std::filebuf::close((struct _Unwind_Exception *)(a1 + 1)); + std::__basic_file::~__basic_file((int)(a1 + 11)); + a1[1] = &off_51ADD4; + std::locale::~locale((_DWORD **)a1 + 8); + *a1 = &unk_515B08; + a1[28] = &off_51B7D0; + std::ios_base::~ios_base((int)(a1 + 28)); + operator delete(a1); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51AC3C: using guessed type int (*off_51AC3C[2])(); +// 51AC50: using guessed type int (*off_51AC50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004C62C0) -------------------------------------------------------- +void __fastcall std::ofstream::~ofstream(int a1) +{ + *(_DWORD *)a1 = off_51AC3C; + *(_DWORD *)(a1 + 112) = off_51AC50; + *(_DWORD *)(a1 + 4) = off_51AA50; + std::filebuf::close((struct _Unwind_Exception *)(a1 + 4)); + std::__basic_file::~__basic_file(a1 + 44); + *(_DWORD *)(a1 + 4) = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_515B08; + *(_DWORD *)(a1 + 112) = &off_51B7D0; + std::ios_base::~ios_base(a1 + 112); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51AC3C: using guessed type int (*off_51AC3C[2])(); +// 51AC50: using guessed type int (*off_51AC50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004C6390) -------------------------------------------------------- +void __thiscall std::ofstream::~ofstream(int *this, int *a2) +{ + int v3; // eax + int v4; // eax + + v3 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = a2[3]; + this[1] = (int)off_51AA50; + std::filebuf::close((struct _Unwind_Exception *)(this + 1)); + std::__basic_file::~__basic_file((int)(this + 11)); + this[1] = (int)&off_51ADD4; + std::locale::~locale((_DWORD **)this + 8); + v4 = a2[1]; + *this = v4; + *(int *)((char *)this + *(_DWORD *)(v4 - 12)) = a2[2]; +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004C6470) -------------------------------------------------------- +_DWORD *__thiscall std::ofstream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + char v6; // cl + char v7; // cl + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + *((_BYTE *)v4 + 117) = v7; + std::filebuf::operator=((int)(this + 1), (int)(a2 + 1)); + return this; +} +// 4C64B0: variable 'v9' is possibly undefined + +//----- (004C6540) -------------------------------------------------------- +int __thiscall std::wofstream::open(int *this, char *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::wfilebuf::open(this + 1, a2, a3 | 0x10) == 0; + v5 = *this; + if ( v4 ) + return std::wios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::wios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C65B0) -------------------------------------------------------- +int __thiscall std::wofstream::open(int *this, wchar_t *a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::wfilebuf::open(this + 1, a2, a3 | 0x10) == 0; + v5 = *this; + if ( v4 ) + return std::wios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::wios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C6620) -------------------------------------------------------- +int __thiscall std::wofstream::open(int *this, char **a2, int a3) +{ + bool v4; // zf + int v5; // eax + + v4 = std::wfilebuf::open(this + 1, *a2, a3 | 0x10) == 0; + v5 = *this; + if ( v4 ) + return std::wios::clear( + (int *)((char *)this + *(_DWORD *)(v5 - 12)), + *(int *)((char *)this + *(_DWORD *)(v5 - 12) + 20) | 4); + else + return std::wios::clear((int *)((char *)this + *(_DWORD *)(v5 - 12)), 0); +} + +//----- (004C6690) -------------------------------------------------------- +void __thiscall std::wofstream::swap(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // edx + __int16 v6; // cx + std::ios_base *v7; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v7); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + *((_BYTE *)v4 + 118) = v6; + std::wfilebuf::swap((int)(this + 1), (int)(a2 + 1)); +} +// 4C66D0: variable 'v7' is possibly undefined + +//----- (004C6750) -------------------------------------------------------- +struct _Unwind_Exception *__fastcall std::wofstream::close(_DWORD *a1) +{ + struct _Unwind_Exception *result; // eax + + result = std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 1)); + if ( !result ) + return (struct _Unwind_Exception *)std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 4); + return result; +} + +//----- (004C6790) -------------------------------------------------------- +bool __fastcall std::wofstream::is_open(int a1) +{ + return std::__basic_file::is_open((_DWORD *)(a1 + 44)); +} + +//----- (004C67A0) -------------------------------------------------------- +void __thiscall std::wofstream::basic_ofstream(_DWORD *this, _DWORD *a2) +{ + int v2; // eax + std::ios_base *v3; // [esp+4h] [ebp-54h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v5; // [esp+14h] [ebp-44h] + + v5 = this + 29; + std::ios_base::ios_base(this + 29); + *((_WORD *)this + 116) = 0; + this[57] = 0; + *((_BYTE *)this + 234) = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + *this = &unk_515B30; + this[29] = &unk_515B44; + lpuexcpt = (struct _Unwind_Exception *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_move((int)v5, lpuexcpt, v3); + std::wios::_M_cache_locale(v5, (int)(this + 56)); + v2 = *((_DWORD *)lpuexcpt + 28); + *this = off_51AC64; + *((_DWORD *)lpuexcpt + 28) = 0; + this[57] = v2; + LOWORD(v2) = *((_WORD *)lpuexcpt + 58); + this[59] = 0; + *((_WORD *)this + 116) = v2; + LOBYTE(v2) = *((_BYTE *)lpuexcpt + 118); + this[29] = off_51AC78; + *((_BYTE *)this + 234) = v2; + std::wfilebuf::basic_filebuf((int)(this + 1), (std::locale *)(a2 + 1)); + this[59] = this + 1; +} +// 4C6842: variable 'v3' is possibly undefined +// 51AC64: using guessed type int (*off_51AC64[2])(); +// 51AC78: using guessed type int (*off_51AC78[2])(); + +//----- (004C6930) -------------------------------------------------------- +void __thiscall std::wofstream::basic_ofstream(_DWORD *this, char *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 29; + std::ios_base::ios_base(this + 29); + this[57] = 0; + *((_WORD *)this + 116) = 0; + *((_BYTE *)this + 234) = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + *this = &unk_515B30; + this[29] = &unk_515B44; + std::wios::init((int)v5, 0); + *this = off_51AC64; + this[29] = off_51AC78; + std::wfilebuf::basic_filebuf((int)(this + 1)); + std::wios::init((int)v5, (int)(this + 1)); + v3 = std::wfilebuf::open(this + 1, a2, a3 | 0x10); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::wios::clear(v4, 0); + else + std::wios::clear(v4, v4[5] | 4); +} +// 51AC64: using guessed type int (*off_51AC64[2])(); +// 51AC78: using guessed type int (*off_51AC78[2])(); + +//----- (004C6AD0) -------------------------------------------------------- +void __thiscall std::wofstream::basic_ofstream(_DWORD *this, wchar_t *a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 29; + std::ios_base::ios_base(this + 29); + this[57] = 0; + *((_WORD *)this + 116) = 0; + *((_BYTE *)this + 234) = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + *this = &unk_515B30; + this[29] = &unk_515B44; + std::wios::init((int)v5, 0); + *this = off_51AC64; + this[29] = off_51AC78; + std::wfilebuf::basic_filebuf((int)(this + 1)); + std::wios::init((int)v5, (int)(this + 1)); + v3 = std::wfilebuf::open(this + 1, a2, a3 | 0x10); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::wios::clear(v4, 0); + else + std::wios::clear(v4, v4[5] | 4); +} +// 51AC64: using guessed type int (*off_51AC64[2])(); +// 51AC78: using guessed type int (*off_51AC78[2])(); + +//----- (004C6C70) -------------------------------------------------------- +void __thiscall std::wofstream::basic_ofstream(_DWORD *this, char **a2, int a3) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + _DWORD *v5; // [esp+20h] [ebp-48h] + + v5 = this + 29; + std::ios_base::ios_base(this + 29); + this[57] = 0; + *((_WORD *)this + 116) = 0; + *((_BYTE *)this + 234) = 0; + this[59] = 0; + this[60] = 0; + this[61] = 0; + this[62] = 0; + *this = &unk_515B30; + this[29] = &unk_515B44; + std::wios::init((int)v5, 0); + *this = off_51AC64; + this[29] = off_51AC78; + std::wfilebuf::basic_filebuf((int)(this + 1)); + std::wios::init((int)v5, (int)(this + 1)); + v3 = std::wfilebuf::open(this + 1, *a2, a3 | 0x10); + v4 = (_DWORD *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v3 ) + std::wios::clear(v4, 0); + else + std::wios::clear(v4, v4[5] | 4); +} +// 51AC64: using guessed type int (*off_51AC64[2])(); +// 51AC78: using guessed type int (*off_51AC78[2])(); + +//----- (004C6E10) -------------------------------------------------------- +void __fastcall std::wofstream::basic_ofstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 116; + std::ios_base::ios_base((_DWORD *)(a1 + 116)); + *(_DWORD *)(a1 + 228) = 0; + *(_WORD *)(a1 + 232) = 0; + *(_BYTE *)(a1 + 234) = 0; + *(_DWORD *)(a1 + 236) = 0; + *(_DWORD *)(a1 + 240) = 0; + *(_DWORD *)(a1 + 244) = 0; + *(_DWORD *)(a1 + 248) = 0; + *(_DWORD *)a1 = &unk_515B30; + *(_DWORD *)(a1 + 116) = &unk_515B44; + std::wios::init(v1, 0); + *(_DWORD *)a1 = off_51AC64; + *(_DWORD *)(a1 + 116) = off_51AC78; + std::wfilebuf::basic_filebuf(a1 + 4); + std::wios::init(v1, a1 + 4); +} +// 51AC64: using guessed type int (*off_51AC64[2])(); +// 51AC78: using guessed type int (*off_51AC78[2])(); + +//----- (004C6F60) -------------------------------------------------------- +void __thiscall std::wofstream::basic_ofstream(int *this, int *a2, _DWORD *a3) +{ + int v3; // eax + int v4; // eax + int v5; // edx + int v6; // eax + std::ios_base *v7; // [esp+4h] [ebp-54h] + std::ios_base *v8; // [esp+10h] [ebp-48h] + char *v9; // [esp+14h] [ebp-44h] + + v3 = a2[1]; + *this = v3; + v9 = (char *)this + *(_DWORD *)(v3 - 12); + *(_DWORD *)v9 = a2[2]; + v8 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v9, v8, v7); + std::wios::_M_cache_locale(v9, (int)(v9 + 108)); + v4 = *((_DWORD *)v8 + 28); + *((_DWORD *)v8 + 28) = 0; + *((_DWORD *)v9 + 30) = 0; + *((_DWORD *)v9 + 28) = v4; + *((_WORD *)v9 + 58) = *((_WORD *)v8 + 58); + v9[118] = *((_BYTE *)v8 + 118); + v5 = a2[3]; + v6 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v5; + std::wfilebuf::basic_filebuf((int)(this + 1), (std::locale *)(a3 + 1)); + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)(this + 1); +} +// 4C6FBE: variable 'v7' is possibly undefined + +//----- (004C7090) -------------------------------------------------------- +void __thiscall std::wofstream::basic_ofstream(int *this, int *a2, char *a3, int a4) +{ + int v4; // eax + _DWORD *v5; // ecx + int v6; // eax + int v7; // edx + _DWORD *v8; // eax + _DWORD *v9; // ecx + + v4 = a2[1]; + *this = v4; + v5 = (int *)((char *)this + *(_DWORD *)(v4 - 12)); + *v5 = a2[2]; + std::wios::init((int)v5, 0); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + std::wfilebuf::basic_filebuf((int)(this + 1)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 1)); + v8 = std::wfilebuf::open(this + 1, a3, a4 | 0x10); + v9 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v8 ) + std::wios::clear(v9, 0); + else + std::wios::clear(v9, v9[5] | 4); +} + +//----- (004C71E0) -------------------------------------------------------- +void __thiscall std::wofstream::basic_ofstream(int *this, int *a2, wchar_t *a3, int a4) +{ + int v4; // eax + _DWORD *v5; // ecx + int v6; // eax + int v7; // edx + _DWORD *v8; // eax + _DWORD *v9; // ecx + + v4 = a2[1]; + *this = v4; + v5 = (int *)((char *)this + *(_DWORD *)(v4 - 12)); + *v5 = a2[2]; + std::wios::init((int)v5, 0); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + std::wfilebuf::basic_filebuf((int)(this + 1)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 1)); + v8 = std::wfilebuf::open(this + 1, a3, a4 | 0x10); + v9 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v8 ) + std::wios::clear(v9, 0); + else + std::wios::clear(v9, v9[5] | 4); +} + +//----- (004C7330) -------------------------------------------------------- +void __thiscall std::wofstream::basic_ofstream(int *this, int *a2, char **a3, int a4) +{ + int v4; // eax + _DWORD *v5; // ecx + int v6; // eax + int v7; // edx + _DWORD *v8; // eax + _DWORD *v9; // ecx + + v4 = a2[1]; + *this = v4; + v5 = (int *)((char *)this + *(_DWORD *)(v4 - 12)); + *v5 = a2[2]; + std::wios::init((int)v5, 0); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + std::wfilebuf::basic_filebuf((int)(this + 1)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 1)); + v8 = std::wfilebuf::open(this + 1, *a3, a4 | 0x10); + v9 = (int *)((char *)this + *(_DWORD *)(*this - 12)); + if ( v8 ) + std::wios::clear(v9, 0); + else + std::wios::clear(v9, v9[5] | 4); +} + +//----- (004C7480) -------------------------------------------------------- +void __thiscall std::wofstream::basic_ofstream(int *this, int *a2) +{ + int v2; // eax + _DWORD *v3; // ecx + int v4; // eax + int v5; // edx + + v2 = a2[1]; + *this = v2; + v3 = (int *)((char *)this + *(_DWORD *)(v2 - 12)); + *v3 = a2[2]; + std::wios::init((int)v3, 0); + v4 = *a2; + v5 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v4 - 12)) = v5; + std::wfilebuf::basic_filebuf((int)(this + 1)); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)(this + 1)); +} + +//----- (004C7580) -------------------------------------------------------- +void __fastcall std::wofstream::~wofstream(_DWORD *a1) +{ + *a1 = off_51AC64; + a1[29] = off_51AC78; + a1[1] = off_51AA90; + std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 1)); + std::__basic_file::~__basic_file((int)(a1 + 11)); + a1[1] = &off_51AE14; + std::locale::~locale((_DWORD **)a1 + 8); + *a1 = &unk_515B30; + a1[29] = &off_51B7E0; + std::ios_base::~ios_base((int)(a1 + 29)); + operator delete(a1); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AC64: using guessed type int (*off_51AC64[2])(); +// 51AC78: using guessed type int (*off_51AC78[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004C7660) -------------------------------------------------------- +void __fastcall std::wofstream::~wofstream(int a1) +{ + *(_DWORD *)a1 = off_51AC64; + *(_DWORD *)(a1 + 116) = off_51AC78; + *(_DWORD *)(a1 + 4) = off_51AA90; + std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 4)); + std::__basic_file::~__basic_file(a1 + 44); + *(_DWORD *)(a1 + 4) = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_515B30; + *(_DWORD *)(a1 + 116) = &off_51B7E0; + std::ios_base::~ios_base(a1 + 116); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AC64: using guessed type int (*off_51AC64[2])(); +// 51AC78: using guessed type int (*off_51AC78[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004C7730) -------------------------------------------------------- +void __thiscall std::wofstream::~wofstream(int *this, int *a2) +{ + int v3; // eax + int v4; // eax + + v3 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = a2[3]; + this[1] = (int)off_51AA90; + std::wfilebuf::close((struct _Unwind_Exception *)(this + 1)); + std::__basic_file::~__basic_file((int)(this + 11)); + this[1] = (int)&off_51AE14; + std::locale::~locale((_DWORD **)this + 8); + v4 = a2[1]; + *this = v4; + *(int *)((char *)this + *(_DWORD *)(v4 - 12)) = a2[2]; +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004C7810) -------------------------------------------------------- +_DWORD *__thiscall std::wofstream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + __int16 v6; // cx + std::ios_base *v8; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + *((_BYTE *)v4 + 118) = v6; + std::wfilebuf::operator=((int)(this + 1), (int)(a2 + 1)); + return this; +} +// 4C7850: variable 'v8' is possibly undefined + +//----- (004C78E0) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int **a2, int a3) +{ + std::codecvt::codecvt(this, a3); + *this = &off_51AC88; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51AC88: using guessed type int (*off_51AC88)(); + +//----- (004C79E0) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + std::codecvt::codecvt(this, a3); + *this = &off_51AC88; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51AC88: using guessed type int (*off_51AC88)(); + +//----- (004C7AF0) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + std::codecvt::codecvt(this, a3); + *this = &off_51AC88; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51AC88: using guessed type int (*off_51AC88)(); + +//----- (004C7C00) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int **a2, int a3) +{ + std::codecvt::codecvt(this, a3); + *this = &off_51AC88; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51AC88: using guessed type int (*off_51AC88)(); + +//----- (004C7D00) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + std::codecvt::codecvt(this, a3); + *this = &off_51AC88; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51AC88: using guessed type int (*off_51AC88)(); + +//----- (004C7E10) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + std::codecvt::codecvt(this, a3); + *this = &off_51AC88; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51AC88: using guessed type int (*off_51AC88)(); + +//----- (004C7F20) -------------------------------------------------------- +void __fastcall std::codecvt_byname::~codecvt_byname(_DWORD *Block) +{ + *Block = &off_51AC88; + std::codecvt::~codecvt(Block); + operator delete(Block); +} +// 51AC88: using guessed type int (*off_51AC88)(); + +//----- (004C7F40) -------------------------------------------------------- +void __fastcall std::codecvt_byname::~codecvt_byname(_DWORD *a1) +{ + *a1 = &off_51AC88; + std::codecvt::~codecvt(a1); +} +// 51AC88: using guessed type int (*off_51AC88)(); + +//----- (004C7F50) -------------------------------------------------------- +void __fastcall std::codecvt_byname::~codecvt_byname(_DWORD *a1) +{ + *a1 = &off_51AC88; + std::codecvt::~codecvt(a1); +} +// 51AC88: using guessed type int (*off_51AC88)(); + +//----- (004C7F60) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int **a2, int a3) +{ + std::codecvt::codecvt(this, a3); + *this = &off_51ACB4; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51ACB4: using guessed type int (*off_51ACB4)(); + +//----- (004C8060) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + std::codecvt::codecvt(this, a3); + *this = &off_51ACB4; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51ACB4: using guessed type int (*off_51ACB4)(); + +//----- (004C8170) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + std::codecvt::codecvt(this, a3); + *this = &off_51ACB4; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51ACB4: using guessed type int (*off_51ACB4)(); + +//----- (004C8280) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int **a2, int a3) +{ + std::codecvt::codecvt(this, a3); + *this = &off_51ACB4; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51ACB4: using guessed type int (*off_51ACB4)(); + +//----- (004C8380) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + std::codecvt::codecvt(this, a3); + *this = &off_51ACB4; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51ACB4: using guessed type int (*off_51ACB4)(); + +//----- (004C8490) -------------------------------------------------------- +void __thiscall std::codecvt_byname::codecvt_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + std::codecvt::codecvt(this, a3); + *this = &off_51ACB4; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51ACB4: using guessed type int (*off_51ACB4)(); + +//----- (004C85A0) -------------------------------------------------------- +void __fastcall std::codecvt_byname::~codecvt_byname(_DWORD *Block) +{ + *Block = &off_51ACB4; + std::codecvt::~codecvt(Block); + operator delete(Block); +} +// 51ACB4: using guessed type int (*off_51ACB4)(); + +//----- (004C85C0) -------------------------------------------------------- +void __fastcall std::codecvt_byname::~codecvt_byname(_DWORD *a1) +{ + *a1 = &off_51ACB4; + std::codecvt::~codecvt(a1); +} +// 51ACB4: using guessed type int (*off_51ACB4)(); + +//----- (004C85D0) -------------------------------------------------------- +void __fastcall std::codecvt_byname::~codecvt_byname(_DWORD *a1) +{ + *a1 = &off_51ACB4; + std::codecvt::~codecvt(a1); +} +// 51ACB4: using guessed type int (*off_51ACB4)(); + +//----- (004C85E0) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B590; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51ACE0; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51ACE0: using guessed type int (*off_51ACE0)(); +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004C8720) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + this[1] = a3 != 0; + *this = &off_51B590; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51ACE0; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51ACE0: using guessed type int (*off_51ACE0)(); +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004C8870) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B590; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51ACE0; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51ACE0: using guessed type int (*off_51ACE0)(); +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004C89B0) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + this[1] = a3 != 0; + *this = &off_51B590; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51ACE0; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51ACE0: using guessed type int (*off_51ACE0)(); +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004C8B00) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B590; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4C8B3E: variable 'lpfctx' is possibly undefined +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004C8B60) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B590; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4C8B9E: variable 'lpfctx' is possibly undefined +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004C8BC0) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B590; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4C8BFE: variable 'lpfctx' is possibly undefined +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004C8C20) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B5AC; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51ACFC; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51ACFC: using guessed type int (*off_51ACFC)(); +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004C8D60) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + this[1] = a3 != 0; + *this = &off_51B5AC; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51ACFC; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51ACFC: using guessed type int (*off_51ACFC)(); +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004C8EB0) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B5AC; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51ACFC; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51ACFC: using guessed type int (*off_51ACFC)(); +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004C8FF0) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + this[1] = a3 != 0; + *this = &off_51B5AC; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51ACFC; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51ACFC: using guessed type int (*off_51ACFC)(); +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004C9140) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B5AC; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4C917E: variable 'lpfctx' is possibly undefined +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004C91A0) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B5AC; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4C91DE: variable 'lpfctx' is possibly undefined +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004C9200) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B5AC; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4C923E: variable 'lpfctx' is possibly undefined +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004C9260) -------------------------------------------------------- +void __userpurge std::overflow_error::overflow_error(_DWORD *a1@, std::overflow_error *this, const char *a3) +{ + int v4; // [esp+5Fh] [ebp-9h] BYREF + + *a1 = &off_51AB98; + std::string::string(a1 + 1, (char *)this, (int)&v4); + *a1 = &off_51AD18; +} +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 51AD18: using guessed type void (__cdecl *off_51AD18)(std::overflow_error *__hidden this); + +//----- (004C92F0) -------------------------------------------------------- +void __thiscall std::overflow_error::overflow_error(_DWORD *this, int a2) +{ + unsigned int v2; // [esp+8h] [ebp-50h] + + *this = &off_51AB98; + std::__cow_string::__cow_string(this + 1, *(std::__cow_string **)a2, *(_DWORD *)(a2 + 4), v2); + *this = &off_51AD18; +} +// 4C9344: variable 'v2' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 51AD18: using guessed type void (__cdecl *off_51AD18)(std::overflow_error *__hidden this); + +//----- (004C9390) -------------------------------------------------------- +void __userpurge std::overflow_error::overflow_error( + _DWORD *a1@, + std::overflow_error *this, + const std::string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-54h] + + *a1 = &off_51AB98; + std::string::string(a1 + 1, this, v3); + *a1 = &off_51AD18; +} +// 4C93D8: variable 'v3' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 51AD18: using guessed type void (__cdecl *off_51AD18)(std::overflow_error *__hidden this); + +//----- (004C9420) -------------------------------------------------------- +void __fastcall std::overflow_error::~overflow_error(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51AD18; + std::runtime_error::~runtime_error(Block); + operator delete(a1); +} +// 4C942C: variable 'Block' is possibly undefined +// 51AD18: using guessed type void (__cdecl *off_51AD18)(std::overflow_error *__hidden this); + +//----- (004C9440) -------------------------------------------------------- +void __cdecl std::overflow_error::~overflow_error(std::exception *a1) +{ + _DWORD *v1; // ecx + int v2; // eax + int v3; // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *v1 = &off_51AB98; + v3 = v1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 > 0 ) + { +LABEL_3: + std::exception::~exception(a1); + return; + } + } + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v5); + std::exception::~exception(a1); +} +// 4C944B: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 4C9440: using guessed type int var_D[3]; + +//----- (004C94A0) -------------------------------------------------------- +void __fastcall std::_Rb_tree_header::_Rb_tree_header(_DWORD *a1) +{ + *a1 = 0; + a1[1] = 0; + a1[2] = a1; + a1[3] = a1; + a1[4] = 0; +} + +//----- (004C94BC) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::_M_destroy( + void *Block) +{ + operator delete(Block); +} + +//----- (004C94CC) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::_M_dispose(int a1) +{ + void **v1; // ebx + + v1 = *(void ***)(a1 + 12); + if ( v1 ) + { + std::string::_M_dispose(v1 + 12); + std::string::_M_dispose(v1 + 6); + std::string::_M_dispose(v1); + operator delete(v1); + } +} + +//----- (004C9500) -------------------------------------------------------- +int __stdcall std::_Sp_counted_ptr::_M_get_deleter(int a1) +{ + return 0; +} + +//----- (004C9508) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr( + void *Block) +{ + operator delete(Block); +} + +//----- (004C951C) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::_M_destroy( + void *Block) +{ + operator delete(Block); +} + +//----- (004C952C) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::_M_dispose(int a1) +{ + void *v1; // ebx + + v1 = *(void **)(a1 + 12); + if ( v1 ) + { + WXSS::CSSTreeLib::CSSSyntaxTree::~CSSSyntaxTree(*(_DWORD *)(a1 + 12)); + operator delete(v1); + } +} + +//----- (004C9550) -------------------------------------------------------- +int __stdcall std::_Sp_counted_ptr::_M_get_deleter( + int a1) +{ + return 0; +} + +//----- (004C9558) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr( + void *Block) +{ + operator delete(Block); +} + +//----- (004C956C) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::_M_destroy(void *Block) +{ + operator delete(Block); +} + +//----- (004C957C) -------------------------------------------------------- +int __fastcall std::_Sp_counted_ptr::_M_dispose(int a1) +{ + int v1; // ecx + int result; // eax + + v1 = *(_DWORD *)(a1 + 12); + if ( v1 ) + return (*(int (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + return result; +} + +//----- (004C958C) -------------------------------------------------------- +int __stdcall std::_Sp_counted_ptr::_M_get_deleter(int a1) +{ + return 0; +} + +//----- (004C9594) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr( + void *Block) +{ + operator delete(Block); +} + +//----- (004C95A8) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::_M_destroy(void *Block) +{ + operator delete(Block); +} + +//----- (004C95B8) -------------------------------------------------------- +int __fastcall std::_Sp_counted_ptr::_M_dispose(int a1) +{ + int v1; // ecx + int result; // eax + + v1 = *(_DWORD *)(a1 + 12); + if ( v1 ) + return (*(int (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + return result; +} + +//----- (004C95C8) -------------------------------------------------------- +int __stdcall std::_Sp_counted_ptr::_M_get_deleter(int a1) +{ + return 0; +} + +//----- (004C95D0) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr( + void *Block) +{ + operator delete(Block); +} + +//----- (004C95E4) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::_M_destroy(void *Block) +{ + operator delete(Block); +} + +//----- (004C95F4) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::_M_dispose(int a1) +{ + volatile signed __int32 **v1; // ebx + + v1 = *(volatile signed __int32 ***)(a1 + 12); + if ( v1 ) + { + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v1 + 2); + operator delete(v1); + } +} + +//----- (004C9618) -------------------------------------------------------- +int __stdcall std::_Sp_counted_ptr::_M_get_deleter(int a1) +{ + return 0; +} + +//----- (004C9620) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr(void *Block) +{ + operator delete(Block); +} + +//----- (004C9634) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::_M_destroy(void *Block) +{ + operator delete(Block); +} + +//----- (004C9644) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::_M_dispose(int a1) +{ + void *v1; // ebx + + v1 = *(void **)(a1 + 12); + if ( v1 ) + { + std::string::_M_dispose(*(void ***)(a1 + 12)); + operator delete(v1); + } +} + +//----- (004C9668) -------------------------------------------------------- +int __stdcall std::_Sp_counted_ptr::_M_get_deleter(int a1) +{ + return 0; +} + +//----- (004C9670) -------------------------------------------------------- +void __fastcall std::_Sp_counted_ptr::~_Sp_counted_ptr(void *Block) +{ + operator delete(Block); +} + +//----- (004C9690) -------------------------------------------------------- +_DWORD *__thiscall std::streambuf::pubseekoff(_DWORD *this, int a2, int a3, int a4, int a5, int a6) +{ + _DWORD *result; // eax + _DWORD *(__thiscall *v7)(_DWORD *, int, int, int, int, int); // edx + + result = this; + v7 = *(_DWORD *(__thiscall **)(_DWORD *, int, int, int, int, int))(*(_DWORD *)a2 + 16); + if ( v7 == std::streambuf::seekoff ) + { + *this = -1; + this[1] = -1; + this[2] = 0; + } + else + { + v7(this, a2, a3, a4, a5, a6); + return this; + } + return result; +} + +//----- (004C9710) -------------------------------------------------------- +_DWORD *__thiscall std::streambuf::pubseekpos(_DWORD *this, int a2, int a3, int a4, int a5, int a6, int a7) +{ + _DWORD *result; // eax + _DWORD *(__thiscall *v8)(_DWORD *, int, int, int, int, int, int); // edx + + result = this; + v8 = *(_DWORD *(__thiscall **)(_DWORD *, int, int, int, int, int, int))(*(_DWORD *)a2 + 20); + if ( v8 == std::streambuf::seekpos ) + { + *this = -1; + this[1] = -1; + this[2] = 0; + } + else + { + v8(this, a2, a3, a4, a5, a6, a7); + return this; + } + return result; +} + +//----- (004C97B0) -------------------------------------------------------- +int __thiscall std::streambuf::__safe_gbump(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[2] += a2; + return result; +} + +//----- (004C97C0) -------------------------------------------------------- +int __thiscall std::streambuf::__safe_pbump(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[5] += a2; + return result; +} + +//----- (004C97D0) -------------------------------------------------------- +int __thiscall std::streambuf::setg(_DWORD *this, int a2, int a3, int a4) +{ + int result; // eax + + this[1] = a2; + this[2] = a3; + result = a4; + this[3] = a4; + return result; +} + +//----- (004C97F0) -------------------------------------------------------- +int __thiscall std::streambuf::setp(_DWORD *this, int a2, int a3) +{ + int result; // eax + + this[5] = a2; + this[4] = a2; + result = a3; + this[6] = a3; + return result; +} + +//----- (004C9810) -------------------------------------------------------- +void __thiscall std::streambuf::swap(int this, int a2) +{ + volatile signed __int32 **v2; // esi + int v3; // edx + int v4; // ebx + int v5; // edx + int v6; // ebx + int v7; // edx + int v8; // ebx + int v9; // edx + int v10; // ebx + int v11; // edx + int v12; // ebx + int v13; // edx + const std::locale *v14; // [esp+4h] [ebp-28h] + _DWORD *v15[4]; // [esp+1Ch] [ebp-10h] BYREF + + v2 = (volatile signed __int32 **)(this + 28); + v3 = *(_DWORD *)(this + 4); + *(_DWORD *)(this + 4) = *(_DWORD *)(a2 + 4); + v4 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a2 + 4) = v3; + v5 = *(_DWORD *)(this + 8); + *(_DWORD *)(this + 8) = v4; + v6 = *(_DWORD *)(a2 + 12); + *(_DWORD *)(a2 + 8) = v5; + v7 = *(_DWORD *)(this + 12); + *(_DWORD *)(this + 12) = v6; + v8 = *(_DWORD *)(a2 + 16); + *(_DWORD *)(a2 + 12) = v7; + v9 = *(_DWORD *)(this + 16); + *(_DWORD *)(this + 16) = v8; + v10 = *(_DWORD *)(a2 + 20); + *(_DWORD *)(a2 + 16) = v9; + v11 = *(_DWORD *)(this + 20); + *(_DWORD *)(this + 20) = v10; + v12 = *(_DWORD *)(a2 + 24); + *(_DWORD *)(a2 + 20) = v11; + v13 = *(_DWORD *)(this + 24); + *(_DWORD *)(this + 24) = v12; + *(_DWORD *)(a2 + 24) = v13; + std::locale::locale((volatile signed __int32 **)v15, (volatile signed __int32 **)(this + 28), v14); + std::locale::operator=(v2, (volatile signed __int32 **)(a2 + 28)); + std::locale::operator=((volatile signed __int32 **)(a2 + 28), (volatile signed __int32 **)v15); + std::locale::~locale(v15); +} +// 4C9871: variable 'v14' is possibly undefined + +//----- (004C98B0) -------------------------------------------------------- +int std::streambuf::sync() +{ + return 0; +} + +//----- (004C98C0) -------------------------------------------------------- +int __thiscall std::streambuf::gbump(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[2] += a2; + return result; +} + +//----- (004C98E0) -------------------------------------------------------- +int __thiscall std::streambuf::pbump(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[5] += a2; + return result; +} + +//----- (004C98F0) -------------------------------------------------------- +int __fastcall std::streambuf::sgetc(_DWORD *a1) +{ + unsigned __int8 *v1; // eax + int result; // eax + int (*v3)(void); // edx + + v1 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v1 < a1[3] ) + return *v1; + v3 = *(int (**)(void))(*a1 + 36); + result = -1; + if ( v3 != std::streambuf::underflow ) + return v3(); + return result; +} + +//----- (004C9920) -------------------------------------------------------- +int __fastcall std::streambuf::sgetn(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 32))(a1); +} + +//----- (004C9930) -------------------------------------------------------- +int __thiscall std::streambuf::sputc(_DWORD *this, unsigned __int8 a2) +{ + _BYTE *v2; // eax + int v3; // ebx + int (__stdcall *v5)(int); // eax + + v2 = (_BYTE *)this[5]; + v3 = a2; + if ( this[6] > (unsigned int)v2 ) + { + *v2 = a2; + ++this[5]; + return v3; + } + v5 = *(int (__stdcall **)(int))(*this + 52); + if ( v5 == std::streambuf::overflow ) + return -1; + return v5(a2); +} + +//----- (004C9970) -------------------------------------------------------- +int __fastcall std::streambuf::sputn(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 48))(a1); +} + +//----- (004C9980) -------------------------------------------------------- +int __fastcall std::streambuf::uflow(_DWORD *a1) +{ + int (*v1)(); // eax + unsigned __int8 *v4; // eax + int v5; // edx + + v1 = *(int (**)())(*a1 + 36); + if ( v1 == std::streambuf::underflow ) + return -1; + if ( v1() == -1 ) + return -1; + v4 = (unsigned __int8 *)a1[2]; + v5 = *v4; + a1[2] = v4 + 1; + return v5; +} + +//----- (004C99D0) -------------------------------------------------------- +int __fastcall std::streambuf::sbumpc(_DWORD *a1) +{ + unsigned __int8 *v1; // eax + int v2; // edx + int (*v4)(void); // edx + int (*v5)(); // eax + unsigned __int8 *v6; // eax + int v7; // edx + + v1 = (unsigned __int8 *)a1[2]; + if ( (unsigned int)v1 < a1[3] ) + { + v2 = *v1; + a1[2] = v1 + 1; + return v2; + } + v4 = *(int (**)(void))(*a1 + 40); + if ( (char *)v4 != (char *)std::streambuf::uflow ) + return v4(); + v5 = *(int (**)())(*a1 + 36); + if ( v5 == std::streambuf::underflow ) + return -1; + if ( v5() == -1 ) + return -1; + v6 = (unsigned __int8 *)a1[2]; + v7 = *v6; + a1[2] = v6 + 1; + return v7; +} + +//----- (004C9A50) -------------------------------------------------------- +void *__thiscall std::streambuf::setbuf(void *this, int a2, int a3) +{ + return this; +} + +//----- (004C9A60) -------------------------------------------------------- +int __fastcall std::streambuf::snextc(_DWORD *a1) +{ + unsigned int v1; // eax + unsigned int v2; // edx + unsigned __int8 *v3; // eax + int (*v5)(void); // edx + int (*v6)(); // eax + int (*v7)(); // eax + int v8; // eax + _DWORD *v9; // ecx + unsigned __int8 *v10; // eax + unsigned int v11; // edx + + v1 = a1[2]; + v2 = a1[3]; + if ( v1 < v2 ) + { + v3 = (unsigned __int8 *)(v1 + 1); + a1[2] = v3; + if ( (unsigned int)v3 < v2 ) + return *v3; + v7 = *(int (**)())(*a1 + 36); + if ( v7 == std::streambuf::underflow ) + return -1; + return v7(); + } + v5 = *(int (**)(void))(*a1 + 40); + if ( (char *)v5 == (char *)std::streambuf::uflow ) + { + v6 = *(int (**)())(*a1 + 36); + if ( v6 == std::streambuf::underflow || v6() == -1 ) + return -1; + v9 = a1; + v11 = a1[3]; + v10 = (unsigned __int8 *)(a1[2] + 1); + a1[2] = v10; + } + else + { + v8 = v5(); + v9 = a1; + if ( v8 == -1 ) + return -1; + v10 = (unsigned __int8 *)a1[2]; + v11 = a1[3]; + } + if ( (unsigned int)v10 < v11 ) + return *v10; + v7 = *(int (**)())(*v9 + 36); + if ( v7 == std::streambuf::underflow ) + return -1; + return v7(); +} + +//----- (004C9B20) -------------------------------------------------------- +int (*__fastcall std::streambuf::stossc(_DWORD *a1))(void) +{ + unsigned int v1; // eax + int (*result)(void); // eax + int (*v3)(void); // edx + + v1 = a1[2]; + if ( v1 >= a1[3] ) + { + v3 = *(int (**)(void))(*a1 + 40); + if ( (char *)v3 == (char *)std::streambuf::uflow ) + { + result = *(int (**)(void))(*a1 + 36); + if ( result != std::streambuf::underflow ) + { + result = (int (*)(void))result(); + if ( result != (int (*)(void))-1 ) + ++a1[2]; + } + } + else + { + return (int (*)(void))v3(); + } + } + else + { + result = (int (*)(void))(v1 + 1); + a1[2] = result; + } + return result; +} + +//----- (004C9B80) -------------------------------------------------------- +int __thiscall std::streambuf::xsgetn(_DWORD *this, char *a2, int a3) +{ + int v5; // esi + const void *Src; // ecx + int v7; // eax + size_t Size; // ebx + char *v10; // ebx + int (__fastcall *v11)(_DWORD *); // edx + int (*v12)(); // eax + char *v13; // eax + char v14; // cl + int v15; // eax + char *v16; // [esp+30h] [ebp+4h] + + if ( a3 > 0 ) + { + v5 = 0; + while ( 1 ) + { + Src = (const void *)this[2]; + v7 = this[3] - (_DWORD)Src; + if ( v7 ) + { + Size = a3 - v5; + v16 = a2; + if ( a3 - v5 > v7 ) + Size = this[3] - (_DWORD)Src; + v5 += Size; + memcpy(a2, Src, Size); + this[2] += Size; + if ( a3 <= v5 ) + return v5; + v10 = &v16[Size]; + } + else + { + v10 = a2; + } + v11 = *(int (__fastcall **)(_DWORD *))(*this + 40); + if ( v11 == std::streambuf::uflow ) + { + v12 = *(int (**)())(*this + 36); + if ( v12 == std::streambuf::underflow || ((int (__fastcall *)(_DWORD *))v12)(this) == -1 ) + return v5; + v13 = (char *)this[2]; + v14 = *v13; + this[2] = v13 + 1; + } + else + { + v15 = v11(this); + v14 = v15; + if ( v15 == -1 ) + return v5; + } + ++v5; + *v10 = v14; + a2 = v10 + 1; + if ( a3 <= v5 ) + return v5; + } + } + return 0; +} + +//----- (004C9C40) -------------------------------------------------------- +int __thiscall std::streambuf::xsputn(_DWORD *this, unsigned __int8 *a2, int a3) +{ + int v5; // ebx + void *v6; // edx + int v7; // eax + size_t Size; // ecx + int (__stdcall *v10)(int); // eax + size_t v11; // [esp+1Ch] [ebp-20h] + + if ( a3 > 0 ) + { + v5 = 0; + while ( 1 ) + { + v6 = (void *)this[5]; + v7 = this[6] - (_DWORD)v6; + if ( v7 ) + { + Size = a3 - v5; + if ( a3 - v5 > v7 ) + Size = this[6] - (_DWORD)v6; + v11 = Size; + memcpy(v6, a2, Size); + this[5] += v11; + v5 += v11; + if ( a3 <= v5 ) + return v5; + a2 += v11; + } + v10 = *(int (__stdcall **)(int))(*this + 52); + if ( v10 != std::streambuf::overflow && ((int (__thiscall *)(_DWORD *, _DWORD))v10)(this, *a2) != -1 ) + { + ++v5; + ++a2; + if ( a3 > v5 ) + continue; + } + return v5; + } + } + return 0; +} + +//----- (004C9CE0) -------------------------------------------------------- +int __fastcall std::streambuf::pubsync(int a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*(_DWORD *)a1 + 24); + if ( v1 == std::streambuf::sync ) + return 0; + else + return v1(); +} + +//----- (004C9D00) -------------------------------------------------------- +_DWORD *__thiscall std::streambuf::seekoff(_DWORD *this, int a2, int a3, int a4, int a5, int a6) +{ + _DWORD *result; // eax + + *this = -1; + result = this; + this[1] = -1; + this[2] = 0; + return result; +} + +//----- (004C9D20) -------------------------------------------------------- +_DWORD *__thiscall std::streambuf::seekpos(_DWORD *this, int a2, int a3, int a4, int a5, int a6, int a7) +{ + _DWORD *result; // eax + + result = this; + *this = -1; + this[1] = -1; + this[2] = 0; + return result; +} + +//----- (004C9D40) -------------------------------------------------------- +int __fastcall std::streambuf::sungetc(_DWORD *a1) +{ + unsigned int v1; // eax + int result; // eax + int (__stdcall *v3)(int); // edx + + v1 = a1[2]; + if ( a1[1] >= v1 ) + { + v3 = *(int (__stdcall **)(int))(*a1 + 44); + result = -1; + if ( v3 != std::streambuf::pbackfail ) + return v3(-1); + } + else + { + a1[2] = v1 - 1; + return *(unsigned __int8 *)(v1 - 1); + } + return result; +} + +//----- (004C9D90) -------------------------------------------------------- +int __fastcall std::streambuf::in_avail(_DWORD *a1) +{ + int result; // eax + int (*v2)(void); // edx + + result = a1[3] - a1[2]; + if ( !result ) + { + v2 = *(int (**)(void))(*a1 + 28); + if ( v2 != std::streambuf::showmanyc ) + return v2(); + } + return result; +} + +//----- (004C9DC0) -------------------------------------------------------- +int __stdcall std::streambuf::overflow(int a1) +{ + return -1; +} + +//----- (004C9DD0) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::streambuf::pubimbue( + volatile signed __int32 **this, + volatile signed __int32 **a2, + volatile signed __int32 **a3) +{ + int (__stdcall *v3)(int); // eax + const std::locale *v5; // [esp+4h] [ebp-54h] + + std::locale::locale(this, a2 + 7, v5); + v3 = (int (__stdcall *)(int))*((_DWORD *)*a2 + 2); + if ( v3 != std::streambuf::imbue ) + ((void (__thiscall *)(volatile signed __int32 **, volatile signed __int32 **))v3)(a2, a3); + std::locale::operator=(a2 + 7, a3); + return this; +} +// 4C9E0E: variable 'v5' is possibly undefined +// 4C98D0: using guessed type int __stdcall std::streambuf::imbue(int); + +//----- (004C9E90) -------------------------------------------------------- +int __stdcall std::streambuf::pbackfail(int a1) +{ + return -1; +} + +//----- (004C9EA0) -------------------------------------------------------- +void *__thiscall std::streambuf::pubsetbuf(void *this, int a2, int a3) +{ + void *result; // eax + void *(__thiscall *v4)(void *, int, int); // edx + + result = this; + v4 = *(void *(__thiscall **)(void *, int, int))(*(_DWORD *)this + 12); + if ( v4 != std::streambuf::setbuf ) + return (void *)((int (__stdcall *)(int, int))v4)(a2, a3); + return result; +} + +//----- (004C9EC0) -------------------------------------------------------- +int std::streambuf::showmanyc() +{ + return 0; +} + +//----- (004C9ED0) -------------------------------------------------------- +int __thiscall std::streambuf::sputbackc(_DWORD *this, unsigned __int8 a2) +{ + unsigned int v2; // eax + int result; // eax + + v2 = this[2]; + if ( this[1] < v2 && *(_BYTE *)(v2 - 1) == a2 ) + { + this[2] = v2 - 1; + return *(unsigned __int8 *)(v2 - 1); + } + else + { + result = -1; + if ( *(int (__stdcall **)(int))(*this + 44) != std::streambuf::pbackfail ) + return (*(int (__thiscall **)(_DWORD *, _DWORD))(*this + 44))(this, a2); + } + return result; +} + +//----- (004C9F10) -------------------------------------------------------- +int std::streambuf::underflow() +{ + return -1; +} + +//----- (004C9F20) -------------------------------------------------------- +volatile signed __int32 *__userpurge std::streambuf::basic_streambuf@( + _DWORD *a1@, + std::locale *a2, + const std::locale *a3) +{ + volatile signed __int32 **v3; // ecx + + *a1 = &off_51ADD4; + v3 = (volatile signed __int32 **)(a1 + 7); + *(v3 - 6) = (volatile signed __int32 *)*((_DWORD *)a2 + 1); + *(v3 - 5) = (volatile signed __int32 *)*((_DWORD *)a2 + 2); + *(v3 - 4) = (volatile signed __int32 *)*((_DWORD *)a2 + 3); + *(v3 - 3) = (volatile signed __int32 *)*((_DWORD *)a2 + 4); + *(v3 - 2) = (volatile signed __int32 *)*((_DWORD *)a2 + 5); + *(v3 - 1) = (volatile signed __int32 *)*((_DWORD *)a2 + 6); + return std::locale::locale(v3, (volatile signed __int32 **)a2 + 7, a3); +} +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004C9F60) -------------------------------------------------------- +void __fastcall std::streambuf::basic_streambuf(_DWORD *a1) +{ + _DWORD *v1; // ecx + + *a1 = &off_51ADD4; + v1 = a1 + 7; + *(v1 - 6) = 0; + *(v1 - 5) = 0; + *(v1 - 4) = 0; + *(v1 - 3) = 0; + *(v1 - 2) = 0; + *(v1 - 1) = 0; + std::locale::locale(v1); +} +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004C9FA0) -------------------------------------------------------- +volatile signed __int32 *__userpurge std::streambuf::basic_streambuf@( + _DWORD *a1@, + std::locale *a2, + const std::locale *a3) +{ + volatile signed __int32 **v3; // ecx + + *a1 = &off_51ADD4; + v3 = (volatile signed __int32 **)(a1 + 7); + *(v3 - 6) = (volatile signed __int32 *)*((_DWORD *)a2 + 1); + *(v3 - 5) = (volatile signed __int32 *)*((_DWORD *)a2 + 2); + *(v3 - 4) = (volatile signed __int32 *)*((_DWORD *)a2 + 3); + *(v3 - 3) = (volatile signed __int32 *)*((_DWORD *)a2 + 4); + *(v3 - 2) = (volatile signed __int32 *)*((_DWORD *)a2 + 5); + *(v3 - 1) = (volatile signed __int32 *)*((_DWORD *)a2 + 6); + return std::locale::locale(v3, (volatile signed __int32 **)a2 + 7, a3); +} +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004C9FE0) -------------------------------------------------------- +void __fastcall std::streambuf::basic_streambuf(_DWORD *a1) +{ + _DWORD *v1; // ecx + + *a1 = &off_51ADD4; + v1 = a1 + 7; + *(v1 - 6) = 0; + *(v1 - 5) = 0; + *(v1 - 4) = 0; + *(v1 - 3) = 0; + *(v1 - 2) = 0; + *(v1 - 1) = 0; + std::locale::locale(v1); +} +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004CA020) -------------------------------------------------------- +void __fastcall std::streambuf::~streambuf(char *Block) +{ + char *v2; // ecx + + v2 = Block + 28; + *((_DWORD *)v2 - 7) = &off_51ADD4; + std::locale::~locale((_DWORD **)v2); + operator delete(Block); +} +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004CA050) -------------------------------------------------------- +void __fastcall std::streambuf::~streambuf(int a1) +{ + *(_DWORD *)a1 = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 28)); +} +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004CA060) -------------------------------------------------------- +void __fastcall std::streambuf::~streambuf(int a1) +{ + *(_DWORD *)a1 = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 28)); +} +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004CA070) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::streambuf::operator=(volatile signed __int32 **this, int a2) +{ + volatile signed __int32 **v3; // ecx + + v3 = this + 7; + *(v3 - 6) = *(volatile signed __int32 **)(a2 + 4); + *(v3 - 5) = *(volatile signed __int32 **)(a2 + 8); + *(v3 - 4) = *(volatile signed __int32 **)(a2 + 12); + *(v3 - 3) = *(volatile signed __int32 **)(a2 + 16); + *(v3 - 2) = *(volatile signed __int32 **)(a2 + 20); + *(v3 - 1) = *(volatile signed __int32 **)(a2 + 24); + std::locale::operator=(v3, (volatile signed __int32 **)(a2 + 28)); + return this; +} + +//----- (004CA0C0) -------------------------------------------------------- +_DWORD *__thiscall std::wstreambuf::pubseekoff(_DWORD *this, int a2, int a3, int a4, int a5, int a6) +{ + _DWORD *result; // eax + _DWORD *(__thiscall *v7)(_DWORD *, int, int, int, int, int); // edx + + result = this; + v7 = *(_DWORD *(__thiscall **)(_DWORD *, int, int, int, int, int))(*(_DWORD *)a2 + 16); + if ( v7 == std::wstreambuf::seekoff ) + { + *this = -1; + this[1] = -1; + this[2] = 0; + } + else + { + v7(this, a2, a3, a4, a5, a6); + return this; + } + return result; +} + +//----- (004CA140) -------------------------------------------------------- +_DWORD *__thiscall std::wstreambuf::pubseekpos(_DWORD *this, int a2, int a3, int a4, int a5, int a6, int a7) +{ + _DWORD *result; // eax + _DWORD *(__thiscall *v8)(_DWORD *, int, int, int, int, int, int); // edx + + result = this; + v8 = *(_DWORD *(__thiscall **)(_DWORD *, int, int, int, int, int, int))(*(_DWORD *)a2 + 20); + if ( v8 == std::wstreambuf::seekpos ) + { + *this = -1; + this[1] = -1; + this[2] = 0; + } + else + { + v8(this, a2, a3, a4, a5, a6, a7); + return this; + } + return result; +} + +//----- (004CA1E0) -------------------------------------------------------- +int __thiscall std::wstreambuf::__safe_gbump(_DWORD *this, int a2) +{ + int result; // eax + + result = 2 * a2; + this[2] += 2 * a2; + return result; +} + +//----- (004CA1F0) -------------------------------------------------------- +int __thiscall std::wstreambuf::__safe_pbump(_DWORD *this, int a2) +{ + int result; // eax + + result = 2 * a2; + this[5] += 2 * a2; + return result; +} + +//----- (004CA200) -------------------------------------------------------- +int __thiscall std::wstreambuf::setg(_DWORD *this, int a2, int a3, int a4) +{ + int result; // eax + + this[1] = a2; + this[2] = a3; + result = a4; + this[3] = a4; + return result; +} + +//----- (004CA220) -------------------------------------------------------- +int __thiscall std::wstreambuf::setp(_DWORD *this, int a2, int a3) +{ + int result; // eax + + this[5] = a2; + this[4] = a2; + result = a3; + this[6] = a3; + return result; +} + +//----- (004CA240) -------------------------------------------------------- +void __thiscall std::wstreambuf::swap(int this, int a2) +{ + volatile signed __int32 **v2; // esi + int v3; // edx + int v4; // ebx + int v5; // edx + int v6; // ebx + int v7; // edx + int v8; // ebx + int v9; // edx + int v10; // ebx + int v11; // edx + int v12; // ebx + int v13; // edx + const std::locale *v14; // [esp+4h] [ebp-28h] + _DWORD *v15[4]; // [esp+1Ch] [ebp-10h] BYREF + + v2 = (volatile signed __int32 **)(this + 28); + v3 = *(_DWORD *)(this + 4); + *(_DWORD *)(this + 4) = *(_DWORD *)(a2 + 4); + v4 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a2 + 4) = v3; + v5 = *(_DWORD *)(this + 8); + *(_DWORD *)(this + 8) = v4; + v6 = *(_DWORD *)(a2 + 12); + *(_DWORD *)(a2 + 8) = v5; + v7 = *(_DWORD *)(this + 12); + *(_DWORD *)(this + 12) = v6; + v8 = *(_DWORD *)(a2 + 16); + *(_DWORD *)(a2 + 12) = v7; + v9 = *(_DWORD *)(this + 16); + *(_DWORD *)(this + 16) = v8; + v10 = *(_DWORD *)(a2 + 20); + *(_DWORD *)(a2 + 16) = v9; + v11 = *(_DWORD *)(this + 20); + *(_DWORD *)(this + 20) = v10; + v12 = *(_DWORD *)(a2 + 24); + *(_DWORD *)(a2 + 20) = v11; + v13 = *(_DWORD *)(this + 24); + *(_DWORD *)(this + 24) = v12; + *(_DWORD *)(a2 + 24) = v13; + std::locale::locale((volatile signed __int32 **)v15, (volatile signed __int32 **)(this + 28), v14); + std::locale::operator=(v2, (volatile signed __int32 **)(a2 + 28)); + std::locale::operator=((volatile signed __int32 **)(a2 + 28), (volatile signed __int32 **)v15); + std::locale::~locale(v15); +} +// 4CA2A1: variable 'v14' is possibly undefined + +//----- (004CA2E0) -------------------------------------------------------- +int std::wstreambuf::sync() +{ + return 0; +} + +//----- (004CA2F0) -------------------------------------------------------- +int __thiscall std::wstreambuf::gbump(_DWORD *this, int a2) +{ + int result; // eax + + result = 2 * a2; + this[2] += 2 * a2; + return result; +} + +//----- (004CA310) -------------------------------------------------------- +int __thiscall std::wstreambuf::pbump(_DWORD *this, int a2) +{ + int result; // eax + + result = 2 * a2; + this[5] += 2 * a2; + return result; +} + +//----- (004CA320) -------------------------------------------------------- +int __fastcall std::wstreambuf::sgetc(_DWORD *a1) +{ + unsigned __int16 *v1; // eax + int result; // eax + int (*v3)(void); // edx + + v1 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v1 < a1[3] ) + return *v1; + v3 = *(int (**)(void))(*a1 + 36); + result = -1; + if ( v3 != std::wstreambuf::underflow ) + return v3(); + return result; +} + +//----- (004CA350) -------------------------------------------------------- +int __fastcall std::wstreambuf::sgetn(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 32))(a1); +} + +//----- (004CA360) -------------------------------------------------------- +int __thiscall std::wstreambuf::sputc(_DWORD *this, int a2) +{ + _WORD *v2; // eax + int result; // eax + + v2 = (_WORD *)this[5]; + if ( this[6] <= (unsigned int)v2 ) + { + result = -1; + if ( *(int (__stdcall **)(int))(*this + 52) != std::wstreambuf::overflow ) + return (*(int (__thiscall **)(_DWORD *, _DWORD))(*this + 52))(this, (unsigned __int16)a2); + } + else + { + *v2 = a2; + this[5] = v2 + 1; + return a2; + } + return result; +} + +//----- (004CA3A0) -------------------------------------------------------- +int __fastcall std::wstreambuf::sputn(int a1) +{ + return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 48))(a1); +} + +//----- (004CA3B0) -------------------------------------------------------- +int __fastcall std::wstreambuf::uflow(_DWORD *a1) +{ + int (*v1)(); // eax + unsigned __int16 *v4; // eax + int v5; // edx + + v1 = *(int (**)())(*a1 + 36); + if ( v1 == std::wstreambuf::underflow ) + return -1; + if ( (unsigned __int16)v1() == 0xFFFF ) + return -1; + v4 = (unsigned __int16 *)a1[2]; + v5 = *v4; + a1[2] = v4 + 1; + return v5; +} + +//----- (004CA400) -------------------------------------------------------- +int __fastcall std::wstreambuf::sbumpc(_DWORD *a1) +{ + unsigned __int16 *v1; // eax + int v2; // edx + int (*v4)(void); // edx + int (*v5)(); // eax + unsigned __int16 *v6; // eax + int v7; // edx + + v1 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v1 < a1[3] ) + { + v2 = *v1; + a1[2] = v1 + 1; + return v2; + } + v4 = *(int (**)(void))(*a1 + 40); + if ( (char *)v4 != (char *)std::wstreambuf::uflow ) + return v4(); + v5 = *(int (**)())(*a1 + 36); + if ( v5 == std::wstreambuf::underflow ) + return -1; + if ( (unsigned __int16)v5() == 0xFFFF ) + return -1; + v6 = (unsigned __int16 *)a1[2]; + v7 = *v6; + a1[2] = v6 + 1; + return v7; +} + +//----- (004CA480) -------------------------------------------------------- +void *__thiscall std::wstreambuf::setbuf(void *this, int a2, int a3) +{ + return this; +} + +//----- (004CA490) -------------------------------------------------------- +int __fastcall std::wstreambuf::snextc(_DWORD *a1) +{ + __int16 *v1; // eax + __int16 v2; // dx + unsigned __int16 *v3; // eax + int (*v5)(); // eax + int (*v6)(void); // edx + int (*v7)(); // eax + __int16 v8; // ax + _DWORD *v9; // ecx + __int16 v10; // dx + unsigned __int16 *v11; // eax + __int16 *v12; // eax + + v1 = (__int16 *)a1[2]; + if ( (unsigned int)v1 < a1[3] ) + { + v2 = *v1; + a1[2] = v1 + 1; + if ( v2 == -1 ) + return -1; + v3 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v3 < a1[3] ) + return *v3; + v5 = *(int (**)())(*a1 + 36); + if ( v5 == std::wstreambuf::underflow ) + return -1; + return v5(); + } + v6 = *(int (**)(void))(*a1 + 40); + if ( (char *)v6 == (char *)std::wstreambuf::uflow ) + { + v7 = *(int (**)())(*a1 + 36); + if ( v7 == std::wstreambuf::underflow || (unsigned __int16)v7() == 0xFFFF ) + return -1; + v9 = a1; + v12 = (__int16 *)a1[2]; + v10 = *v12; + a1[2] = v12 + 1; + } + else + { + v8 = v6(); + v9 = a1; + v10 = v8; + } + if ( v10 == -1 ) + return -1; + v11 = (unsigned __int16 *)v9[2]; + if ( (unsigned int)v11 < v9[3] ) + return *v11; + v5 = *(int (**)())(*v9 + 36); + if ( v5 == std::wstreambuf::underflow ) + return -1; + return v5(); +} + +//----- (004CA550) -------------------------------------------------------- +int (*__fastcall std::wstreambuf::stossc(_DWORD *a1))(void) +{ + unsigned int v1; // eax + int (*result)(void); // eax + int (*v3)(void); // edx + + v1 = a1[2]; + if ( v1 >= a1[3] ) + { + v3 = *(int (**)(void))(*a1 + 40); + if ( (char *)v3 == (char *)std::wstreambuf::uflow ) + { + result = *(int (**)(void))(*a1 + 36); + if ( result != std::wstreambuf::underflow ) + { + result = (int (*)(void))result(); + if ( (_WORD)result != 0xFFFF ) + a1[2] += 2; + } + } + else + { + return (int (*)(void))v3(); + } + } + else + { + result = (int (*)(void))(v1 + 2); + a1[2] = result; + } + return result; +} + +//----- (004CA5B0) -------------------------------------------------------- +int __thiscall std::wstreambuf::xsgetn(_DWORD *this, char *a2, int a3) +{ + int v4; // esi + int v5; // edx + _BYTE *v7; // ebx + char *Src; // eax + int v9; // ebx + int v10; // ebp + char *v12; // ebp + int (__fastcall *v13)(_DWORD *); // ebx + int (*v14)(); // eax + __int16 *v15; // ecx + __int16 v16; // ax + char *v17; // [esp+30h] [ebp+4h] + int v18; // [esp+34h] [ebp+8h] + int v19; // [esp+34h] [ebp+8h] + int v20; // [esp+34h] [ebp+8h] + + v4 = 0; + v5 = a3; + if ( a3 > 0 ) + { + while ( 1 ) + { + v7 = (_BYTE *)this[3]; + Src = (char *)this[2]; + if ( v7 == Src ) + { + v12 = a2; + } + else + { + v9 = (v7 - Src) >> 1; + if ( v9 > v5 - v4 ) + v9 = v5 - v4; + v10 = 2 * v9; + if ( v9 ) + { + v18 = v5; + v17 = a2; + memcpy(a2, Src, 2 * v9); + Src = (char *)this[2]; + v5 = v18; + a2 = v17; + } + v4 += v9; + this[2] = &Src[v10]; + if ( v5 <= v4 ) + return v4; + v12 = &a2[v10]; + } + v13 = *(int (__fastcall **)(_DWORD *))(*this + 40); + if ( v13 == std::wstreambuf::uflow ) + { + v14 = *(int (**)())(*this + 36); + if ( v14 == std::wstreambuf::underflow ) + return v4; + v19 = v5; + if ( ((unsigned __int16 (__fastcall *)(_DWORD *))v14)(this) == 0xFFFF ) + return v4; + v15 = (__int16 *)this[2]; + v5 = v19; + v16 = *v15; + this[2] = v15 + 1; + } + else + { + v20 = v5; + v16 = v13(this); + v5 = v20; + } + if ( v16 != -1 ) + { + ++v4; + *(_WORD *)v12 = v16; + a2 = v12 + 2; + if ( v5 > v4 ) + continue; + } + return v4; + } + } + return v4; +} + +//----- (004CA6A0) -------------------------------------------------------- +int __thiscall std::wstreambuf::xsputn(_DWORD *this, char *a2, int a3) +{ + int v3; // edx + int v6; // esi + _BYTE *v7; // ebx + char *v8; // eax + int v9; // ebx + int v10; // ecx + int (__stdcall *v12)(int); // eax + int v13; // [esp+44h] [ebp+8h] + int v14; // [esp+44h] [ebp+8h] + + v3 = a3; + if ( a3 > 0 ) + { + v6 = 0; + while ( 1 ) + { + v7 = (_BYTE *)this[6]; + v8 = (char *)this[5]; + if ( v7 != v8 ) + { + v9 = (v7 - v8) >> 1; + if ( v9 > v3 - v6 ) + v9 = v3 - v6; + v10 = 2 * v9; + if ( v9 ) + { + v13 = v3; + memcpy(v8, a2, 2 * v9); + v8 = (char *)this[5]; + v3 = v13; + v10 = 2 * v9; + } + v6 += v9; + this[5] = &v8[v10]; + if ( v3 <= v6 ) + return v6; + a2 += v10; + } + v12 = *(int (__stdcall **)(int))(*this + 52); + if ( v12 != std::wstreambuf::overflow ) + { + v14 = v3; + if ( ((unsigned __int16 (__thiscall *)(_DWORD *, _DWORD))v12)(this, *(unsigned __int16 *)a2) != 0xFFFF ) + { + v3 = v14; + ++v6; + a2 += 2; + if ( v14 > v6 ) + continue; + } + } + return v6; + } + } + return 0; +} + +//----- (004CA770) -------------------------------------------------------- +int __fastcall std::wstreambuf::pubsync(int a1) +{ + int (*v1)(void); // eax + + v1 = *(int (**)(void))(*(_DWORD *)a1 + 24); + if ( v1 == std::wstreambuf::sync ) + return 0; + else + return v1(); +} + +//----- (004CA790) -------------------------------------------------------- +_DWORD *__thiscall std::wstreambuf::seekoff(_DWORD *this, int a2, int a3, int a4, int a5, int a6) +{ + _DWORD *result; // eax + + *this = -1; + result = this; + this[1] = -1; + this[2] = 0; + return result; +} + +//----- (004CA7B0) -------------------------------------------------------- +_DWORD *__thiscall std::wstreambuf::seekpos(_DWORD *this, int a2, int a3, int a4, int a5, int a6, int a7) +{ + _DWORD *result; // eax + + result = this; + *this = -1; + this[1] = -1; + this[2] = 0; + return result; +} + +//----- (004CA7D0) -------------------------------------------------------- +int __fastcall std::wstreambuf::sungetc(_DWORD *a1) +{ + unsigned int v1; // eax + unsigned int v2; // edx + int result; // eax + int (__stdcall *v4)(int); // edx + + v1 = a1[2]; + if ( a1[1] >= v1 ) + { + v4 = *(int (__stdcall **)(int))(*a1 + 44); + result = -1; + if ( v4 != std::wstreambuf::pbackfail ) + return v4(0xFFFF); + } + else + { + v2 = v1 - 2; + result = *(unsigned __int16 *)(v1 - 2); + a1[2] = v2; + } + return result; +} + +//----- (004CA820) -------------------------------------------------------- +int __fastcall std::wstreambuf::in_avail(_DWORD *a1) +{ + int v1; // eax + int v2; // edx + int result; // eax + int (*v4)(void); // edx + + v1 = a1[3]; + v2 = a1[2]; + if ( v1 != v2 ) + return (v1 - v2) >> 1; + v4 = *(int (**)(void))(*a1 + 28); + result = 0; + if ( v4 != std::wstreambuf::showmanyc ) + return v4(); + return result; +} + +//----- (004CA850) -------------------------------------------------------- +int __stdcall std::wstreambuf::overflow(int a1) +{ + return -1; +} + +//----- (004CA860) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::wstreambuf::pubimbue( + volatile signed __int32 **this, + volatile signed __int32 **a2, + volatile signed __int32 **a3) +{ + int (__stdcall *v3)(int); // eax + const std::locale *v5; // [esp+4h] [ebp-54h] + + std::locale::locale(this, a2 + 7, v5); + v3 = (int (__stdcall *)(int))*((_DWORD *)*a2 + 2); + if ( v3 != std::wstreambuf::imbue ) + ((void (__thiscall *)(volatile signed __int32 **, volatile signed __int32 **))v3)(a2, a3); + std::locale::operator=(a2 + 7, a3); + return this; +} +// 4CA89E: variable 'v5' is possibly undefined +// 4CA300: using guessed type int __stdcall std::wstreambuf::imbue(int); + +//----- (004CA920) -------------------------------------------------------- +int __stdcall std::wstreambuf::pbackfail(int a1) +{ + return -1; +} + +//----- (004CA930) -------------------------------------------------------- +void *__thiscall std::wstreambuf::pubsetbuf(void *this, int a2, int a3) +{ + void *result; // eax + void *(__thiscall *v4)(void *, int, int); // edx + + result = this; + v4 = *(void *(__thiscall **)(void *, int, int))(*(_DWORD *)this + 12); + if ( v4 != std::wstreambuf::setbuf ) + return (void *)((int (__stdcall *)(int, int))v4)(a2, a3); + return result; +} + +//----- (004CA950) -------------------------------------------------------- +int std::wstreambuf::showmanyc() +{ + return 0; +} + +//----- (004CA960) -------------------------------------------------------- +int __thiscall std::wstreambuf::sputbackc(_DWORD *this, int a2) +{ + unsigned int v2; // eax + int result; // eax + + v2 = this[2]; + if ( this[1] < v2 && *(_WORD *)(v2 - 2) == (_WORD)a2 ) + { + this[2] = v2 - 2; + return a2; + } + else + { + result = -1; + if ( *(int (__stdcall **)(int))(*this + 44) != std::wstreambuf::pbackfail ) + return (*(int (__thiscall **)(_DWORD *, _DWORD))(*this + 44))(this, (unsigned __int16)a2); + } + return result; +} + +//----- (004CA9A0) -------------------------------------------------------- +int std::wstreambuf::underflow() +{ + return -1; +} + +//----- (004CA9B0) -------------------------------------------------------- +volatile signed __int32 *__userpurge std::wstreambuf::basic_streambuf@( + _DWORD *a1@, + std::locale *a2, + const std::locale *a3) +{ + volatile signed __int32 **v3; // ecx + + *a1 = &off_51AE14; + v3 = (volatile signed __int32 **)(a1 + 7); + *(v3 - 6) = (volatile signed __int32 *)*((_DWORD *)a2 + 1); + *(v3 - 5) = (volatile signed __int32 *)*((_DWORD *)a2 + 2); + *(v3 - 4) = (volatile signed __int32 *)*((_DWORD *)a2 + 3); + *(v3 - 3) = (volatile signed __int32 *)*((_DWORD *)a2 + 4); + *(v3 - 2) = (volatile signed __int32 *)*((_DWORD *)a2 + 5); + *(v3 - 1) = (volatile signed __int32 *)*((_DWORD *)a2 + 6); + return std::locale::locale(v3, (volatile signed __int32 **)a2 + 7, a3); +} +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004CA9F0) -------------------------------------------------------- +void __fastcall std::wstreambuf::basic_streambuf(_DWORD *a1) +{ + _DWORD *v1; // ecx + + *a1 = &off_51AE14; + v1 = a1 + 7; + *(v1 - 6) = 0; + *(v1 - 5) = 0; + *(v1 - 4) = 0; + *(v1 - 3) = 0; + *(v1 - 2) = 0; + *(v1 - 1) = 0; + std::locale::locale(v1); +} +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004CAA30) -------------------------------------------------------- +volatile signed __int32 *__userpurge std::wstreambuf::basic_streambuf@( + _DWORD *a1@, + std::locale *a2, + const std::locale *a3) +{ + volatile signed __int32 **v3; // ecx + + *a1 = &off_51AE14; + v3 = (volatile signed __int32 **)(a1 + 7); + *(v3 - 6) = (volatile signed __int32 *)*((_DWORD *)a2 + 1); + *(v3 - 5) = (volatile signed __int32 *)*((_DWORD *)a2 + 2); + *(v3 - 4) = (volatile signed __int32 *)*((_DWORD *)a2 + 3); + *(v3 - 3) = (volatile signed __int32 *)*((_DWORD *)a2 + 4); + *(v3 - 2) = (volatile signed __int32 *)*((_DWORD *)a2 + 5); + *(v3 - 1) = (volatile signed __int32 *)*((_DWORD *)a2 + 6); + return std::locale::locale(v3, (volatile signed __int32 **)a2 + 7, a3); +} +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004CAA70) -------------------------------------------------------- +void __fastcall std::wstreambuf::basic_streambuf(_DWORD *a1) +{ + _DWORD *v1; // ecx + + *a1 = &off_51AE14; + v1 = a1 + 7; + *(v1 - 6) = 0; + *(v1 - 5) = 0; + *(v1 - 4) = 0; + *(v1 - 3) = 0; + *(v1 - 2) = 0; + *(v1 - 1) = 0; + std::locale::locale(v1); +} +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004CAAB0) -------------------------------------------------------- +void __fastcall std::wstreambuf::~wstreambuf(char *Block) +{ + char *v2; // ecx + + v2 = Block + 28; + *((_DWORD *)v2 - 7) = &off_51AE14; + std::locale::~locale((_DWORD **)v2); + operator delete(Block); +} +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004CAAE0) -------------------------------------------------------- +void __fastcall std::wstreambuf::~wstreambuf(int a1) +{ + *(_DWORD *)a1 = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 28)); +} +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004CAAF0) -------------------------------------------------------- +void __fastcall std::wstreambuf::~wstreambuf(int a1) +{ + *(_DWORD *)a1 = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 28)); +} +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004CAB00) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::wstreambuf::operator=(volatile signed __int32 **this, int a2) +{ + volatile signed __int32 **v3; // ecx + + v3 = this + 7; + *(v3 - 6) = *(volatile signed __int32 **)(a2 + 4); + *(v3 - 5) = *(volatile signed __int32 **)(a2 + 8); + *(v3 - 4) = *(volatile signed __int32 **)(a2 + 12); + *(v3 - 3) = *(volatile signed __int32 **)(a2 + 16); + *(v3 - 2) = *(volatile signed __int32 **)(a2 + 20); + *(v3 - 1) = *(volatile signed __int32 **)(a2 + 24); + std::locale::operator=(v3, (volatile signed __int32 **)(a2 + 28)); + return this; +} + +//----- (004CAB50) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B6C4; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51AE54; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51AE54: using guessed type int (*off_51AE54)(); +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004CAC90) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int ***a2, int a3) +{ + std::messages_byname::messages_byname(this, *a2, a3); +} + +//----- (004CACA0) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B6C4; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51AE54; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51AE54: using guessed type int (*off_51AE54)(); +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004CADE0) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int ***a2, int a3) +{ + std::messages_byname::messages_byname(this, *a2, a3); +} + +//----- (004CADF0) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B6C4; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4CAE2E: variable 'lpfctx' is possibly undefined +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004CAE50) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B6C4; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4CAE8E: variable 'lpfctx' is possibly undefined +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004CAEB0) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B6C4; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4CAEEE: variable 'lpfctx' is possibly undefined +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004CAF10) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B6E0; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51AE70; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51AE70: using guessed type int (*off_51AE70)(); +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004CB050) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int ***a2, int a3) +{ + std::messages_byname::messages_byname(this, *a2, a3); +} + +//----- (004CB060) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B6E0; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51AE70; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51AE70: using guessed type int (*off_51AE70)(); +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004CB1A0) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int ***a2, int a3) +{ + std::messages_byname::messages_byname(this, *a2, a3); +} + +//----- (004CB1B0) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B6E0; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4CB1EE: variable 'lpfctx' is possibly undefined +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004CB210) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B6E0; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4CB24E: variable 'lpfctx' is possibly undefined +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004CB270) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B6E0; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4CB2AE: variable 'lpfctx' is possibly undefined +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004CB2D0) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51B6FC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51AE8C; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::numpunct::_M_initialize_numpunct(this, v4[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51AE8C: using guessed type int (*off_51AE8C)(); +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004CB410) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **a2, int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51B6FC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51AE8C; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::numpunct::_M_initialize_numpunct(this, v5[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51AE8C: using guessed type int (*off_51AE8C)(); +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004CB560) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51B6FC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51AE8C; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::numpunct::_M_initialize_numpunct(this, v4[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51AE8C: using guessed type int (*off_51AE8C)(); +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004CB6A0) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **a2, int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51B6FC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51AE8C; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::numpunct::_M_initialize_numpunct(this, v5[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51AE8C: using guessed type int (*off_51AE8C)(); +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004CB7F0) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *Block) +{ + *Block = &off_51AE8C; + std::numpunct::~numpunct(Block); + operator delete(Block); +} +// 51AE8C: using guessed type int (*off_51AE8C)(); + +//----- (004CB810) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *a1) +{ + *a1 = &off_51AE8C; + std::numpunct::~numpunct(a1); +} +// 51AE8C: using guessed type int (*off_51AE8C)(); + +//----- (004CB820) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *a1) +{ + *a1 = &off_51AE8C; + std::numpunct::~numpunct(a1); +} +// 51AE8C: using guessed type int (*off_51AE8C)(); + +//----- (004CB830) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51B720; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51AEB0; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::numpunct::_M_initialize_numpunct(this, v4[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51AEB0: using guessed type int (*off_51AEB0)(); +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004CB970) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **a2, int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51B720; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51AEB0; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::numpunct::_M_initialize_numpunct(this, v5[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51AEB0: using guessed type int (*off_51AEB0)(); +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004CBAC0) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51B720; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51AEB0; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::numpunct::_M_initialize_numpunct(this, v4[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51AEB0: using guessed type int (*off_51AEB0)(); +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004CBC00) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **a2, int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51B720; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51AEB0; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::numpunct::_M_initialize_numpunct(this, v5[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51AEB0: using guessed type int (*off_51AEB0)(); +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004CBD50) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *Block) +{ + *Block = &off_51AEB0; + std::numpunct::~numpunct(Block); + operator delete(Block); +} +// 51AEB0: using guessed type int (*off_51AEB0)(); + +//----- (004CBD70) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *a1) +{ + *a1 = &off_51AEB0; + std::numpunct::~numpunct(a1); +} +// 51AEB0: using guessed type int (*off_51AEB0)(); + +//----- (004CBD80) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *a1) +{ + *a1 = &off_51AEB0; + std::numpunct::~numpunct(a1); +} +// 51AEB0: using guessed type int (*off_51AEB0)(); + +//----- (004CBD90) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AED4; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AED4: using guessed type int (*off_51AED4)(); + +//----- (004CBDB0) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AED4; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AED4: using guessed type int (*off_51AED4)(); + +//----- (004CBDD0) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AED4; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AED4: using guessed type int (*off_51AED4)(); + +//----- (004CBDF0) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AED4; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AED4: using guessed type int (*off_51AED4)(); + +//----- (004CBE10) -------------------------------------------------------- +void __fastcall std::time_get_byname>::~time_get_byname(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B744; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4CBE1C: variable 'Blocka' is possibly undefined +// 51B744: using guessed type int (*off_51B744)(); + +//----- (004CBE30) -------------------------------------------------------- +void __cdecl std::time_get_byname>::~time_get_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B744; + std::locale::facet::~facet(a1); +} +// 4CBE30: variable 'v1' is possibly undefined +// 51B744: using guessed type int (*off_51B744)(); + +//----- (004CBE40) -------------------------------------------------------- +void __cdecl std::time_get_byname>::~time_get_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B744; + std::locale::facet::~facet(a1); +} +// 4CBE40: variable 'v1' is possibly undefined +// 51B744: using guessed type int (*off_51B744)(); + +//----- (004CBE50) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AEFC; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AEFC: using guessed type int (*off_51AEFC)(); + +//----- (004CBE70) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AEFC; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AEFC: using guessed type int (*off_51AEFC)(); + +//----- (004CBE90) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AEFC; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AEFC: using guessed type int (*off_51AEFC)(); + +//----- (004CBEB0) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AEFC; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AEFC: using guessed type int (*off_51AEFC)(); + +//----- (004CBED0) -------------------------------------------------------- +void __fastcall std::time_get_byname>::~time_get_byname(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B76C; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4CBEDC: variable 'Blocka' is possibly undefined +// 51B76C: using guessed type int (*off_51B76C)(); + +//----- (004CBEF0) -------------------------------------------------------- +void __cdecl std::time_get_byname>::~time_get_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B76C; + std::locale::facet::~facet(a1); +} +// 4CBEF0: variable 'v1' is possibly undefined +// 51B76C: using guessed type int (*off_51B76C)(); + +//----- (004CBF00) -------------------------------------------------------- +void __cdecl std::time_get_byname>::~time_get_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B76C; + std::locale::facet::~facet(a1); +} +// 4CBF00: variable 'v1' is possibly undefined +// 51B76C: using guessed type int (*off_51B76C)(); + +//----- (004CBF10) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF24; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF24: using guessed type int (*off_51AF24)(); + +//----- (004CBF30) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF24; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF24: using guessed type int (*off_51AF24)(); + +//----- (004CBF50) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF24; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF24: using guessed type int (*off_51AF24)(); + +//----- (004CBF70) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF24; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF24: using guessed type int (*off_51AF24)(); + +//----- (004CBF90) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF24; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF24: using guessed type int (*off_51AF24)(); + +//----- (004CBFB0) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF24; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF24: using guessed type int (*off_51AF24)(); + +//----- (004CBFD0) -------------------------------------------------------- +void __fastcall std::time_put_byname>::~time_put_byname(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B794; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4CBFDC: variable 'Blocka' is possibly undefined +// 51B794: using guessed type int (*off_51B794)(); + +//----- (004CBFF0) -------------------------------------------------------- +void __cdecl std::time_put_byname>::~time_put_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B794; + std::locale::facet::~facet(a1); +} +// 4CBFF0: variable 'v1' is possibly undefined +// 51B794: using guessed type int (*off_51B794)(); + +//----- (004CC000) -------------------------------------------------------- +void __cdecl std::time_put_byname>::~time_put_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B794; + std::locale::facet::~facet(a1); +} +// 4CC000: variable 'v1' is possibly undefined +// 51B794: using guessed type int (*off_51B794)(); + +//----- (004CC010) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF38; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF38: using guessed type int (*off_51AF38)(); + +//----- (004CC030) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF38; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF38: using guessed type int (*off_51AF38)(); + +//----- (004CC050) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF38; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF38: using guessed type int (*off_51AF38)(); + +//----- (004CC070) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF38; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF38: using guessed type int (*off_51AF38)(); + +//----- (004CC090) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF38; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF38: using guessed type int (*off_51AF38)(); + +//----- (004CC0B0) -------------------------------------------------------- +BOOL __thiscall std::time_put_byname>::time_put_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51AF38; + result = a3 != 0; + this[1] = result; + return result; +} +// 51AF38: using guessed type int (*off_51AF38)(); + +//----- (004CC0D0) -------------------------------------------------------- +void __fastcall std::time_put_byname>::~time_put_byname(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B7A8; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4CC0DC: variable 'Blocka' is possibly undefined +// 51B7A8: using guessed type int (*off_51B7A8)(); + +//----- (004CC0F0) -------------------------------------------------------- +void __cdecl std::time_put_byname>::~time_put_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B7A8; + std::locale::facet::~facet(a1); +} +// 4CC0F0: variable 'v1' is possibly undefined +// 51B7A8: using guessed type int (*off_51B7A8)(); + +//----- (004CC100) -------------------------------------------------------- +void __cdecl std::time_put_byname>::~time_put_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B7A8; + std::locale::facet::~facet(a1); +} +// 4CC100: variable 'v1' is possibly undefined +// 51B7A8: using guessed type int (*off_51B7A8)(); + +//----- (004CC110) -------------------------------------------------------- +void __userpurge std::underflow_error::underflow_error(_DWORD *a1@, std::underflow_error *this, const char *a3) +{ + int v4; // [esp+5Fh] [ebp-9h] BYREF + + *a1 = &off_51AB98; + std::string::string(a1 + 1, (char *)this, (int)&v4); + *a1 = &off_51AF4C; +} +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 51AF4C: using guessed type void (__cdecl *off_51AF4C)(std::underflow_error *__hidden this); + +//----- (004CC1A0) -------------------------------------------------------- +void __thiscall std::underflow_error::underflow_error(_DWORD *this, int a2) +{ + unsigned int v2; // [esp+8h] [ebp-50h] + + *this = &off_51AB98; + std::__cow_string::__cow_string(this + 1, *(std::__cow_string **)a2, *(_DWORD *)(a2 + 4), v2); + *this = &off_51AF4C; +} +// 4CC1F4: variable 'v2' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 51AF4C: using guessed type void (__cdecl *off_51AF4C)(std::underflow_error *__hidden this); + +//----- (004CC240) -------------------------------------------------------- +void __userpurge std::underflow_error::underflow_error( + _DWORD *a1@, + std::underflow_error *this, + const std::string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-54h] + + *a1 = &off_51AB98; + std::string::string(a1 + 1, this, v3); + *a1 = &off_51AF4C; +} +// 4CC288: variable 'v3' is possibly undefined +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 51AF4C: using guessed type void (__cdecl *off_51AF4C)(std::underflow_error *__hidden this); + +//----- (004CC2D0) -------------------------------------------------------- +void __fastcall std::underflow_error::~underflow_error(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51AF4C; + std::runtime_error::~runtime_error(Block); + operator delete(a1); +} +// 4CC2DC: variable 'Block' is possibly undefined +// 51AF4C: using guessed type void (__cdecl *off_51AF4C)(std::underflow_error *__hidden this); + +//----- (004CC2F0) -------------------------------------------------------- +void __cdecl std::underflow_error::~underflow_error(std::exception *a1) +{ + _DWORD *v1; // ecx + int v2; // eax + int v3; // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *v1 = &off_51AB98; + v3 = v1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 > 0 ) + { +LABEL_3: + std::exception::~exception(a1); + return; + } + } + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v5); + std::exception::~exception(a1); +} +// 4CC2FB: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51AB98: using guessed type void (__cdecl *off_51AB98)(std::runtime_error *__hidden this); +// 4CC2F0: using guessed type int var_D[3]; + +//----- (004CC350) -------------------------------------------------------- +int __fastcall std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(volatile signed __int32 *a1) +{ + signed __int32 v1; // eax + int result; // eax + signed __int32 v3; // eax + int v4; // [esp-1Ch] [ebp-1Ch] + int v5; // [esp-18h] [ebp-18h] + int v6; // [esp-14h] [ebp-14h] + volatile signed __int32 *v7; // [esp-10h] [ebp-10h] + int v8; // [esp-Ch] [ebp-Ch] + int v9; // [esp-8h] [ebp-8h] + + if ( _CRT_MT ) + { + v1 = _InterlockedExchangeAdd(a1 + 1, 0xFFFFFFFF); + } + else + { + v1 = *((_DWORD *)a1 + 1); + *((_DWORD *)a1 + 1) = v1 - 1; + } + result = v1 - 1; + if ( !result ) + { + (*(void (__stdcall **)(int, int, int, volatile signed __int32 *, int, int))(*a1 + 8))(v4, v5, v6, a1, v8, v9); + if ( _CRT_MT ) + { + v3 = _InterlockedExchangeAdd(v7 + 2, 0xFFFFFFFF); + } + else + { + v3 = *((_DWORD *)v7 + 2); + *((_DWORD *)v7 + 2) = v3 - 1; + } + result = v3 - 1; + if ( !result ) + return (*(int (__fastcall **)(volatile signed __int32 *))(*v7 + 12))(v7); + } + return result; +} +// 4CC37A: variable 'v4' is possibly undefined +// 4CC37A: variable 'v5' is possibly undefined +// 4CC37A: variable 'v6' is possibly undefined +// 4CC37A: variable 'v8' is possibly undefined +// 4CC37A: variable 'v9' is possibly undefined +// 4CC38C: variable 'v7' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004CC3AC) -------------------------------------------------------- +void __fastcall std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy(int a1) +{ + if ( _CRT_MT ) + _InterlockedIncrement((volatile signed __int32 *)(a1 + 4)); + else + ++*(_DWORD *)(a1 + 4); +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004CC3C0) -------------------------------------------------------- +void __thiscall std::__numpunct_cache::_M_cache(int this, int a2) +{ + _DWORD *(__thiscall *v2)(char *, int); // eax + unsigned int v3; // eax + bool v4; // al + _DWORD *(__thiscall *v5)(int *, int); // eax + unsigned int v6; // eax + _DWORD *(__thiscall *v7)(int *, int); // eax + unsigned int v8; // eax + int (__fastcall *v9)(int); // eax + char v10; // al + int (__fastcall *v11)(int); // eax + char v12; // al + char v13; // al + char *v14; // edx + void (__thiscall *v15)(_BYTE *, char *, char *, int); // eax + char v16; // al + void (__thiscall *v17)(_BYTE *, char *, char *, int); // eax + int v18; // ecx + int v19; // eax + int v20; // ecx + int v21; // eax + int v22; // ecx + int v23; // eax + unsigned int v24; // [esp+Ch] [ebp-7Ch] + unsigned int v25; // [esp+Ch] [ebp-7Ch] + unsigned int v26; // [esp+Ch] [ebp-7Ch] + char *v27; // [esp+1Ch] [ebp-6Ch] + char *v28; // [esp+1Ch] [ebp-6Ch] + std::string *v29; // [esp+24h] [ebp-64h] + std::string *v30; // [esp+28h] [ebp-60h] + std::string *Block; // [esp+2Ch] [ebp-5Ch] + _DWORD *v32; // [esp+34h] [ebp-54h] + _BYTE *v33; // [esp+34h] [ebp-54h] + char v35[7]; // [esp+71h] [ebp-17h] BYREF + int v36; // [esp+78h] [ebp-10h] BYREF + int v37[3]; // [esp+7Ch] [ebp-Ch] BYREF + + v32 = std::use_facet>(a2); + v2 = *(_DWORD *(__thiscall **)(char *, int))(*v32 + 16); + if ( (char *)v2 == (char *)std::numpunct::do_grouping ) + std::string::string(&v35[3], *(char **)(v32[2] + 8), (int)v37); + else + v2(&v35[3], (int)v32); + v3 = *(_DWORD *)(*(_DWORD *)&v35[3] - 12); + *(_DWORD *)(this + 12) = v3; + Block = (std::string *)operator new[](v3); + std::string::copy(&v35[3], Block, *(_DWORD *)(this + 12), 0, v24); + v4 = 0; + if ( *(_DWORD *)(this + 12) ) + v4 = (unsigned __int8)(*(_BYTE *)Block - 1) <= 0x7Du; + *(_BYTE *)(this + 16) = v4; + v5 = *(_DWORD *(__thiscall **)(int *, int))(*v32 + 20); + if ( v5 == std::numpunct::do_truename ) + std::string::string(&v36, *(char **)(v32[2] + 20), (int)&v35[1]); + else + v5(&v36, (int)v32); + v6 = *(_DWORD *)(v36 - 12); + *(_DWORD *)(this + 24) = v6; + v29 = (std::string *)operator new[](v6); + std::string::copy(&v36, v29, *(_DWORD *)(this + 24), 0, v25); + v7 = *(_DWORD *(__thiscall **)(int *, int))(*v32 + 24); + if ( v7 == std::numpunct::do_falsename ) + std::string::string(v37, *(char **)(v32[2] + 28), (int)&v35[2]); + else + v7(v37, (int)v32); + v8 = *(_DWORD *)(v37[0] - 12); + *(_DWORD *)(this + 32) = v8; + v30 = (std::string *)operator new[](v8); + std::string::copy(v37, v30, *(_DWORD *)(this + 32), 0, v26); + v9 = *(int (__fastcall **)(int))(*v32 + 8); + if ( v9 == std::numpunct::do_decimal_point ) + v10 = *(_BYTE *)(v32[2] + 36); + else + v10 = v9((int)v32); + *(_BYTE *)(this + 36) = v10; + v11 = *(int (__fastcall **)(int))(*v32 + 12); + if ( v11 == std::numpunct::do_thousands_sep ) + v12 = *(_BYTE *)(v32[2] + 37); + else + v12 = v11((int)v32); + *(_BYTE *)(this + 37) = v12; + v33 = std::use_facet>(a2); + v13 = v33[28]; + v27 = std::__num_base::_S_atoms_out[0]; + v14 = std::__num_base::_S_atoms_out[0]; + if ( v13 == 1 ) + goto LABEL_17; + if ( !v13 ) + std::ctype::_M_widen_init((int)v33); + v14 = v27; + v15 = *(void (__thiscall **)(_BYTE *, char *, char *, int))(*(_DWORD *)v33 + 28); + if ( (char *)v15 == (char *)std::ctype::do_widen ) + { +LABEL_17: + *(_DWORD *)(this + 38) = *(_DWORD *)v14; + *(_DWORD *)(this + 42) = *((_DWORD *)v14 + 1); + *(_DWORD *)(this + 46) = *((_DWORD *)v14 + 2); + *(_DWORD *)(this + 50) = *((_DWORD *)v14 + 3); + *(_DWORD *)(this + 54) = *((_DWORD *)v14 + 4); + *(_DWORD *)(this + 58) = *((_DWORD *)v14 + 5); + *(_DWORD *)(this + 62) = *((_DWORD *)v14 + 6); + *(_DWORD *)(this + 66) = *((_DWORD *)v14 + 7); + *(_DWORD *)(this + 70) = *((_DWORD *)v14 + 8); + } + else + { + v15(v33, v27, v27 + 36, this + 38); + } + v28 = std::__num_base::_S_atoms_in[0]; + v16 = v33[28]; + if ( v16 == 1 ) + goto LABEL_21; + if ( v16 ) + { + v17 = *(void (__thiscall **)(_BYTE *, char *, char *, int))(*(_DWORD *)v33 + 28); + if ( (char *)v17 == (char *)std::ctype::do_widen ) + { +LABEL_21: + *(_DWORD *)(this + 74) = *(_DWORD *)v28; + *(_DWORD *)(this + 78) = *((_DWORD *)v28 + 1); + *(_DWORD *)(this + 82) = *((_DWORD *)v28 + 2); + *(_DWORD *)(this + 86) = *((_DWORD *)v28 + 3); + *(_DWORD *)(this + 90) = *((_DWORD *)v28 + 4); + *(_DWORD *)(this + 94) = *((_DWORD *)v28 + 5); + *(_WORD *)(this + 98) = *((_WORD *)v28 + 12); + goto LABEL_22; + } + } + else + { + std::ctype::_M_widen_init((int)v33); + v17 = *(void (__thiscall **)(_BYTE *, char *, char *, int))(*(_DWORD *)v33 + 28); + if ( (char *)v17 == (char *)std::ctype::do_widen ) + goto LABEL_21; + } + v17(v33, v28, v28 + 26, this + 74); +LABEL_22: + *(_DWORD *)(this + 8) = Block; + *(_DWORD *)(this + 20) = v29; + v18 = v37[0]; + *(_DWORD *)(this + 28) = v30; + *(_BYTE *)(this + 100) = 1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v18 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_24: + v20 = v36; + if ( !_CRT_MT ) + goto LABEL_25; + goto LABEL_31; + } + } + else + { + v19 = *(_DWORD *)(v18 - 4); + *(_DWORD *)(v18 - 4) = v19 - 1; + if ( v19 > 0 ) + goto LABEL_24; + } + std::string::_Rep::_M_destroy((void *)(v18 - 12), (int)&v35[2]); + v20 = v36; + if ( !_CRT_MT ) + { +LABEL_25: + v21 = *(_DWORD *)(v20 - 4); + *(_DWORD *)(v20 - 4) = v21 - 1; + if ( v21 > 0 ) + goto LABEL_26; + goto LABEL_32; + } +LABEL_31: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v20 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_26: + v22 = *(_DWORD *)&v35[3]; + if ( !_CRT_MT ) + goto LABEL_27; + goto LABEL_33; + } +LABEL_32: + std::string::_Rep::_M_destroy((void *)(v20 - 12), (int)v37); + v22 = *(_DWORD *)&v35[3]; + if ( !_CRT_MT ) + { +LABEL_27: + v23 = *(_DWORD *)(v22 - 4); + *(_DWORD *)(v22 - 4) = v23 - 1; + if ( v23 > 0 ) + return; +LABEL_34: + std::string::_Rep::_M_destroy((void *)(v22 - 12), (int)v37); + return; + } +LABEL_33: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v22 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_34; +} +// 4CC47D: variable 'v24' is possibly undefined +// 4CC51F: variable 'v25' is possibly undefined +// 4CC5A1: variable 'v26' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C480: using guessed type char *std::__num_base::_S_atoms_in[3]; +// 50C484: using guessed type char *std::__num_base::_S_atoms_out[2]; + +//----- (004CCA20) -------------------------------------------------------- +int __thiscall std::__numpunct_cache::__numpunct_cache(_DWORD *this, int a2) +{ + int result; // eax + + *this = &off_51AF60; + this[2] = 0; + this[3] = 0; + *((_BYTE *)this + 16) = 0; + this[1] = a2 != 0; + result = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + *((_WORD *)this + 18) = 0; + *((_BYTE *)this + 100) = 0; + return result; +} +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (004CCA70) -------------------------------------------------------- +int __thiscall std::__numpunct_cache::__numpunct_cache(_DWORD *this, int a2) +{ + int result; // eax + + *this = &off_51AF60; + this[2] = 0; + this[3] = 0; + *((_BYTE *)this + 16) = 0; + this[1] = a2 != 0; + result = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + *((_WORD *)this + 18) = 0; + *((_BYTE *)this + 100) = 0; + return result; +} +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (004CCAC0) -------------------------------------------------------- +void __fastcall std::__numpunct_cache::~__numpunct_cache(void *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + std::__numpunct_cache::~__numpunct_cache((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4CCB00: variable 'lpfctx' is possibly undefined + +//----- (004CCB50) -------------------------------------------------------- +void __cdecl std::__numpunct_cache::~__numpunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + int v2; // ebx + bool v3; // zf + + v2 = v1; + v3 = *(_BYTE *)(v1 + 100) == 0; + *(_DWORD *)v1 = &off_51AF60; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( *(_DWORD *)(v2 + 20) ) + operator delete[](*(void **)(v2 + 20)); + if ( *(_DWORD *)(v2 + 28) ) + operator delete[](*(void **)(v2 + 28)); + } + std::locale::facet::~facet(a1); +} +// 4CCB51: variable 'v1' is possibly undefined +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (004CCBA0) -------------------------------------------------------- +void __cdecl std::__numpunct_cache::~__numpunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + int v2; // ebx + bool v3; // zf + + v2 = v1; + v3 = *(_BYTE *)(v1 + 100) == 0; + *(_DWORD *)v1 = &off_51AF60; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( *(_DWORD *)(v2 + 20) ) + operator delete[](*(void **)(v2 + 20)); + if ( *(_DWORD *)(v2 + 28) ) + operator delete[](*(void **)(v2 + 28)); + } + std::locale::facet::~facet(a1); +} +// 4CCBA1: variable 'v1' is possibly undefined +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (004CCBF0) -------------------------------------------------------- +void __thiscall std::__numpunct_cache::_M_cache(int this, int a2) +{ + _DWORD *(__thiscall *v2)(char *, int); // eax + unsigned int v3; // eax + bool v4; // al + _DWORD *(__thiscall *v5)(int *, int); // eax + unsigned int v6; // eax + _DWORD *(__thiscall *v7)(int *, int); // eax + unsigned int v8; // eax + int v9; // eax + int (__fastcall *v10)(int); // edx + __int16 v11; // dx + int (__fastcall *v12)(int); // eax + __int16 v13; // ax + int v14; // ecx + int v15; // eax + int v16; // ecx + int v17; // eax + int v18; // ecx + int v19; // eax + unsigned int v20; // [esp+Ch] [ebp-6Ch] + _WORD *v21; // [esp+14h] [ebp-64h] + _WORD *v22; // [esp+18h] [ebp-60h] + std::string *Block; // [esp+1Ch] [ebp-5Ch] + _DWORD *v24; // [esp+24h] [ebp-54h] + void *v25; // [esp+24h] [ebp-54h] + char v27[7]; // [esp+61h] [ebp-17h] BYREF + int v28; // [esp+68h] [ebp-10h] BYREF + int v29[2]; // [esp+6Ch] [ebp-Ch] BYREF + + v24 = std::use_facet>(a2); + v2 = *(_DWORD *(__thiscall **)(char *, int))(*v24 + 16); + if ( (char *)v2 == (char *)std::numpunct::do_grouping ) + std::string::string(&v27[3], *(char **)(v24[2] + 8), (int)v29); + else + v2(&v27[3], (int)v24); + v3 = *(_DWORD *)(*(_DWORD *)&v27[3] - 12); + *(_DWORD *)(this + 12) = v3; + Block = (std::string *)operator new[](v3); + std::string::copy(&v27[3], Block, *(_DWORD *)(this + 12), 0, v20); + v4 = 0; + if ( *(_DWORD *)(this + 12) ) + v4 = (unsigned __int8)(*(_BYTE *)Block - 1) <= 0x7Du; + *(_BYTE *)(this + 16) = v4; + v5 = *(_DWORD *(__thiscall **)(int *, int))(*v24 + 20); + if ( v5 == std::numpunct::do_truename ) + std::wstring::basic_string(&v28, *(wchar_t **)(v24[2] + 20), (int)&v27[1]); + else + v5(&v28, (int)v24); + v6 = *(_DWORD *)(v28 - 12); + *(_DWORD *)(this + 24) = v6; + if ( v6 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v21 = (_WORD *)operator new[](2 * v6); + std::wstring::copy(&v28, v21, *(_DWORD *)(this + 24), 0); + v7 = *(_DWORD *(__thiscall **)(int *, int))(*v24 + 24); + if ( v7 == std::numpunct::do_falsename ) + std::wstring::basic_string(v29, *(wchar_t **)(v24[2] + 28), (int)&v27[2]); + else + v7(v29, (int)v24); + v8 = *(_DWORD *)(v29[0] - 12); + *(_DWORD *)(this + 32) = v8; + if ( v8 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v22 = (_WORD *)operator new[](2 * v8); + std::wstring::copy(v29, v22, *(_DWORD *)(this + 32), 0); + v9 = *v24; + v10 = *(int (__fastcall **)(int))(*v24 + 8); + if ( v10 == std::numpunct::do_decimal_point ) + { + v11 = *(_WORD *)(v24[2] + 36); + } + else + { + v11 = v10((int)v24); + v9 = *v24; + } + v12 = *(int (__fastcall **)(int))(v9 + 12); + *(_WORD *)(this + 36) = v11; + if ( v12 == std::numpunct::do_thousands_sep ) + v13 = *(_WORD *)(v24[2] + 38); + else + v13 = v12((int)v24); + *(_WORD *)(this + 38) = v13; + v25 = std::use_facet>(a2); + (*(void (__thiscall **)(void *, char *, char *, int))(*(_DWORD *)v25 + 44))( + v25, + std::__num_base::_S_atoms_out[0], + std::__num_base::_S_atoms_out[0] + 36, + this + 40); + (*(void (__thiscall **)(void *, char *, char *, int))(*(_DWORD *)v25 + 44))( + v25, + std::__num_base::_S_atoms_in[0], + std::__num_base::_S_atoms_in[0] + 26, + this + 112); + v14 = v29[0]; + *(_DWORD *)(this + 8) = Block; + *(_BYTE *)(this + 164) = 1; + *(_DWORD *)(this + 20) = v21; + *(_DWORD *)(this + 28) = v22; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v14 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_17: + v16 = v28; + if ( !_CRT_MT ) + goto LABEL_18; + goto LABEL_24; + } + } + else + { + v15 = *(_DWORD *)(v14 - 4); + *(_DWORD *)(v14 - 4) = v15 - 1; + if ( v15 > 0 ) + goto LABEL_17; + } + std::wstring::_Rep::_M_destroy((void *)(v14 - 12), (int)&v27[2]); + v16 = v28; + if ( !_CRT_MT ) + { +LABEL_18: + v17 = *(_DWORD *)(v16 - 4); + *(_DWORD *)(v16 - 4) = v17 - 1; + if ( v17 > 0 ) + goto LABEL_19; + goto LABEL_25; + } +LABEL_24: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v16 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_19: + v18 = *(_DWORD *)&v27[3]; + if ( !_CRT_MT ) + goto LABEL_20; + goto LABEL_26; + } +LABEL_25: + std::wstring::_Rep::_M_destroy((void *)(v16 - 12), (int)v29); + v18 = *(_DWORD *)&v27[3]; + if ( !_CRT_MT ) + { +LABEL_20: + v19 = *(_DWORD *)(v18 - 4); + *(_DWORD *)(v18 - 4) = v19 - 1; + if ( v19 > 0 ) + return; +LABEL_27: + std::string::_Rep::_M_destroy((void *)(v18 - 12), (int)v29); + return; + } +LABEL_26: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v18 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_27; +} +// 4CCCAB: variable 'v20' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C480: using guessed type char *std::__num_base::_S_atoms_in[3]; +// 50C484: using guessed type char *std::__num_base::_S_atoms_out[2]; + +//----- (004CD170) -------------------------------------------------------- +BOOL __thiscall std::__numpunct_cache::__numpunct_cache(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51AF70; + this[2] = 0; + this[3] = 0; + result = a2 != 0; + *((_BYTE *)this + 16) = 0; + this[1] = result; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + *((_BYTE *)this + 164) = 0; + return result; +} +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (004CD1D0) -------------------------------------------------------- +BOOL __thiscall std::__numpunct_cache::__numpunct_cache(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51AF70; + this[2] = 0; + this[3] = 0; + result = a2 != 0; + *((_BYTE *)this + 16) = 0; + this[1] = result; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + *((_BYTE *)this + 164) = 0; + return result; +} +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (004CD230) -------------------------------------------------------- +void __fastcall std::__numpunct_cache::~__numpunct_cache(void *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + std::__numpunct_cache::~__numpunct_cache((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4CD270: variable 'lpfctx' is possibly undefined + +//----- (004CD2C0) -------------------------------------------------------- +void __cdecl std::__numpunct_cache::~__numpunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + int v2; // ebx + bool v3; // zf + + v2 = v1; + v3 = *(_BYTE *)(v1 + 164) == 0; + *(_DWORD *)v1 = &off_51AF70; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( *(_DWORD *)(v2 + 20) ) + operator delete[](*(void **)(v2 + 20)); + if ( *(_DWORD *)(v2 + 28) ) + operator delete[](*(void **)(v2 + 28)); + } + std::locale::facet::~facet(a1); +} +// 4CD2C1: variable 'v1' is possibly undefined +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (004CD310) -------------------------------------------------------- +void __cdecl std::__numpunct_cache::~__numpunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + int v2; // ebx + bool v3; // zf + + v2 = v1; + v3 = *(_BYTE *)(v1 + 164) == 0; + *(_DWORD *)v1 = &off_51AF70; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( *(_DWORD *)(v2 + 20) ) + operator delete[](*(void **)(v2 + 20)); + if ( *(_DWORD *)(v2 + 28) ) + operator delete[](*(void **)(v2 + 28)); + } + std::locale::facet::~facet(a1); +} +// 4CD311: variable 'v1' is possibly undefined +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (004CD360) -------------------------------------------------------- +void __userpurge std::invalid_argument::invalid_argument(_DWORD *a1@, std::invalid_argument *this, const char *a3) +{ + int v4; // [esp+5Fh] [ebp-9h] BYREF + + *a1 = &off_51A940; + std::string::string(a1 + 1, (char *)this, (int)&v4); + *a1 = &off_51AF80; +} +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51AF80: using guessed type void (__cdecl *off_51AF80)(std::invalid_argument *__hidden this); + +//----- (004CD3F0) -------------------------------------------------------- +void __thiscall std::invalid_argument::invalid_argument(_DWORD *this, int a2) +{ + unsigned int v2; // [esp+8h] [ebp-50h] + + *this = &off_51A940; + std::__cow_string::__cow_string(this + 1, *(std::__cow_string **)a2, *(_DWORD *)(a2 + 4), v2); + *this = &off_51AF80; +} +// 4CD444: variable 'v2' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51AF80: using guessed type void (__cdecl *off_51AF80)(std::invalid_argument *__hidden this); + +//----- (004CD490) -------------------------------------------------------- +void __userpurge std::invalid_argument::invalid_argument( + _DWORD *a1@, + std::invalid_argument *this, + const std::string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-54h] + + *a1 = &off_51A940; + std::string::string(a1 + 1, this, v3); + *a1 = &off_51AF80; +} +// 4CD4D8: variable 'v3' is possibly undefined +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 51AF80: using guessed type void (__cdecl *off_51AF80)(std::invalid_argument *__hidden this); + +//----- (004CD520) -------------------------------------------------------- +void __fastcall std::invalid_argument::~invalid_argument(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51AF80; + std::logic_error::~logic_error(Block); + operator delete(a1); +} +// 4CD52C: variable 'Block' is possibly undefined +// 51AF80: using guessed type void (__cdecl *off_51AF80)(std::invalid_argument *__hidden this); + +//----- (004CD540) -------------------------------------------------------- +void __cdecl std::invalid_argument::~invalid_argument(std::exception *a1) +{ + _DWORD *v1; // ecx + int v2; // eax + int v3; // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *v1 = &off_51A940; + v3 = v1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 > 0 ) + { +LABEL_3: + std::exception::~exception(a1); + return; + } + } + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v5); + std::exception::~exception(a1); +} +// 4CD54B: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51A940: using guessed type void (__cdecl *off_51A940)(std::logic_error *__hidden this); +// 4CD540: using guessed type int var_D[3]; + +//----- (004CD5A0) -------------------------------------------------------- +BOOL __thiscall std::__timepunct_cache::__timepunct_cache(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51AF94; + this[2] = 0; + this[3] = 0; + result = a2 != 0; + this[4] = 0; + this[1] = result; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + this[14] = 0; + this[15] = 0; + this[16] = 0; + this[17] = 0; + this[18] = 0; + this[19] = 0; + this[20] = 0; + this[21] = 0; + this[22] = 0; + this[23] = 0; + this[24] = 0; + this[25] = 0; + this[26] = 0; + this[27] = 0; + this[28] = 0; + this[29] = 0; + this[30] = 0; + this[31] = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + this[35] = 0; + this[36] = 0; + this[37] = 0; + this[38] = 0; + this[39] = 0; + this[40] = 0; + this[41] = 0; + this[42] = 0; + this[43] = 0; + this[44] = 0; + this[45] = 0; + this[46] = 0; + this[47] = 0; + this[48] = 0; + *((_BYTE *)this + 196) = 0; + return result; +} +// 51AF94: using guessed type int (*off_51AF94)(); + +//----- (004CD740) -------------------------------------------------------- +BOOL __thiscall std::__timepunct_cache::__timepunct_cache(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51AF94; + this[2] = 0; + this[3] = 0; + result = a2 != 0; + this[4] = 0; + this[1] = result; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + this[14] = 0; + this[15] = 0; + this[16] = 0; + this[17] = 0; + this[18] = 0; + this[19] = 0; + this[20] = 0; + this[21] = 0; + this[22] = 0; + this[23] = 0; + this[24] = 0; + this[25] = 0; + this[26] = 0; + this[27] = 0; + this[28] = 0; + this[29] = 0; + this[30] = 0; + this[31] = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + this[35] = 0; + this[36] = 0; + this[37] = 0; + this[38] = 0; + this[39] = 0; + this[40] = 0; + this[41] = 0; + this[42] = 0; + this[43] = 0; + this[44] = 0; + this[45] = 0; + this[46] = 0; + this[47] = 0; + this[48] = 0; + *((_BYTE *)this + 196) = 0; + return result; +} +// 51AF94: using guessed type int (*off_51AF94)(); + +//----- (004CD8E0) -------------------------------------------------------- +void __fastcall std::__timepunct_cache::~__timepunct_cache(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51AF94; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4CD8EC: variable 'Blocka' is possibly undefined +// 51AF94: using guessed type int (*off_51AF94)(); + +//----- (004CD900) -------------------------------------------------------- +void __cdecl std::__timepunct_cache::~__timepunct_cache(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51AF94; + std::locale::facet::~facet(a1); +} +// 4CD900: variable 'v1' is possibly undefined +// 51AF94: using guessed type int (*off_51AF94)(); + +//----- (004CD910) -------------------------------------------------------- +void __cdecl std::__timepunct_cache::~__timepunct_cache(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51AF94; + std::locale::facet::~facet(a1); +} +// 4CD910: variable 'v1' is possibly undefined +// 51AF94: using guessed type int (*off_51AF94)(); + +//----- (004CD920) -------------------------------------------------------- +BOOL __thiscall std::__timepunct_cache::__timepunct_cache(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51AFA4; + this[2] = 0; + this[3] = 0; + result = a2 != 0; + this[4] = 0; + this[1] = result; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + this[14] = 0; + this[15] = 0; + this[16] = 0; + this[17] = 0; + this[18] = 0; + this[19] = 0; + this[20] = 0; + this[21] = 0; + this[22] = 0; + this[23] = 0; + this[24] = 0; + this[25] = 0; + this[26] = 0; + this[27] = 0; + this[28] = 0; + this[29] = 0; + this[30] = 0; + this[31] = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + this[35] = 0; + this[36] = 0; + this[37] = 0; + this[38] = 0; + this[39] = 0; + this[40] = 0; + this[41] = 0; + this[42] = 0; + this[43] = 0; + this[44] = 0; + this[45] = 0; + this[46] = 0; + this[47] = 0; + this[48] = 0; + *((_BYTE *)this + 196) = 0; + return result; +} +// 51AFA4: using guessed type int (*off_51AFA4)(); + +//----- (004CDAC0) -------------------------------------------------------- +BOOL __thiscall std::__timepunct_cache::__timepunct_cache(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51AFA4; + this[2] = 0; + this[3] = 0; + result = a2 != 0; + this[4] = 0; + this[1] = result; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + this[14] = 0; + this[15] = 0; + this[16] = 0; + this[17] = 0; + this[18] = 0; + this[19] = 0; + this[20] = 0; + this[21] = 0; + this[22] = 0; + this[23] = 0; + this[24] = 0; + this[25] = 0; + this[26] = 0; + this[27] = 0; + this[28] = 0; + this[29] = 0; + this[30] = 0; + this[31] = 0; + this[32] = 0; + this[33] = 0; + this[34] = 0; + this[35] = 0; + this[36] = 0; + this[37] = 0; + this[38] = 0; + this[39] = 0; + this[40] = 0; + this[41] = 0; + this[42] = 0; + this[43] = 0; + this[44] = 0; + this[45] = 0; + this[46] = 0; + this[47] = 0; + this[48] = 0; + *((_BYTE *)this + 196) = 0; + return result; +} +// 51AFA4: using guessed type int (*off_51AFA4)(); + +//----- (004CDC60) -------------------------------------------------------- +void __fastcall std::__timepunct_cache::~__timepunct_cache(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51AFA4; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4CDC6C: variable 'Blocka' is possibly undefined +// 51AFA4: using guessed type int (*off_51AFA4)(); + +//----- (004CDC80) -------------------------------------------------------- +void __cdecl std::__timepunct_cache::~__timepunct_cache(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51AFA4; + std::locale::facet::~facet(a1); +} +// 4CDC80: variable 'v1' is possibly undefined +// 51AFA4: using guessed type int (*off_51AFA4)(); + +//----- (004CDC90) -------------------------------------------------------- +void __cdecl std::__timepunct_cache::~__timepunct_cache(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51AFA4; + std::locale::facet::~facet(a1); +} +// 4CDC90: variable 'v1' is possibly undefined +// 51AFA4: using guessed type int (*off_51AFA4)(); + +//----- (004CDCA0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A850; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51AFB4; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A850: using guessed type int (*off_51A850)(); +// 51AFB4: using guessed type int (*off_51AFB4)(); + +//----- (004CDDF0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A850; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51AFB4; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A850: using guessed type int (*off_51A850)(); +// 51AFB4: using guessed type int (*off_51AFB4)(); + +//----- (004CDF50) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A850; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51AFB4; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A850: using guessed type int (*off_51A850)(); +// 51AFB4: using guessed type int (*off_51AFB4)(); + +//----- (004CE0A0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A850; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51AFB4; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A850: using guessed type int (*off_51A850)(); +// 51AFB4: using guessed type int (*off_51AFB4)(); + +//----- (004CE200) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block) +{ + *Block = &off_51AFB4; + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 51AFB4: using guessed type int (*off_51AFB4)(); + +//----- (004CE220) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51AFB4; + std::moneypunct::~moneypunct(a1); +} +// 51AFB4: using guessed type int (*off_51AFB4)(); + +//----- (004CE230) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51AFB4; + std::moneypunct::~moneypunct(a1); +} +// 51AFB4: using guessed type int (*off_51AFB4)(); + +//----- (004CE240) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A884; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51AFE8; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A884: using guessed type int (*off_51A884)(); +// 51AFE8: using guessed type int (*off_51AFE8)(); + +//----- (004CE390) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A884; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51AFE8; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A884: using guessed type int (*off_51A884)(); +// 51AFE8: using guessed type int (*off_51AFE8)(); + +//----- (004CE4F0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A884; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51AFE8; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A884: using guessed type int (*off_51A884)(); +// 51AFE8: using guessed type int (*off_51AFE8)(); + +//----- (004CE640) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A884; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51AFE8; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A884: using guessed type int (*off_51A884)(); +// 51AFE8: using guessed type int (*off_51AFE8)(); + +//----- (004CE7A0) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block) +{ + *Block = &off_51AFE8; + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 51AFE8: using guessed type int (*off_51AFE8)(); + +//----- (004CE7C0) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51AFE8; + std::moneypunct::~moneypunct(a1); +} +// 51AFE8: using guessed type int (*off_51AFE8)(); + +//----- (004CE7D0) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51AFE8; + std::moneypunct::~moneypunct(a1); +} +// 51AFE8: using guessed type int (*off_51AFE8)(); + +//----- (004CE7E0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A8B8; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51B01C; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A8B8: using guessed type int (*off_51A8B8)(); +// 51B01C: using guessed type int (*off_51B01C)(); + +//----- (004CE930) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A8B8; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51B01C; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A8B8: using guessed type int (*off_51A8B8)(); +// 51B01C: using guessed type int (*off_51B01C)(); + +//----- (004CEA90) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A8B8; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51B01C; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A8B8: using guessed type int (*off_51A8B8)(); +// 51B01C: using guessed type int (*off_51B01C)(); + +//----- (004CEBE0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A8B8; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51B01C; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A8B8: using guessed type int (*off_51A8B8)(); +// 51B01C: using guessed type int (*off_51B01C)(); + +//----- (004CED40) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block) +{ + *Block = &off_51B01C; + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 51B01C: using guessed type int (*off_51B01C)(); + +//----- (004CED60) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51B01C; + std::moneypunct::~moneypunct(a1); +} +// 51B01C: using guessed type int (*off_51B01C)(); + +//----- (004CED70) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51B01C; + std::moneypunct::~moneypunct(a1); +} +// 51B01C: using guessed type int (*off_51B01C)(); + +//----- (004CED80) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A8EC; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51B050; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A8EC: using guessed type int (*off_51A8EC)(); +// 51B050: using guessed type int (*off_51B050)(); + +//----- (004CEED0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A8EC; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51B050; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A8EC: using guessed type int (*off_51A8EC)(); +// 51B050: using guessed type int (*off_51B050)(); + +//----- (004CF030) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A8EC; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51B050; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A8EC: using guessed type int (*off_51A8EC)(); +// 51B050: using guessed type int (*off_51B050)(); + +//----- (004CF180) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A8EC; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51B050; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A8EC: using guessed type int (*off_51A8EC)(); +// 51B050: using guessed type int (*off_51B050)(); + +//----- (004CF2E0) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block) +{ + *Block = &off_51B050; + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 51B050: using guessed type int (*off_51B050)(); + +//----- (004CF300) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51B050; + std::moneypunct::~moneypunct(a1); +} +// 51B050: using guessed type int (*off_51B050)(); + +//----- (004CF310) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51B050; + std::moneypunct::~moneypunct(a1); +} +// 51B050: using guessed type int (*off_51B050)(); + +//----- (004CF320) -------------------------------------------------------- +void __thiscall std::__moneypunct_cache::_M_cache(int this, int a2) +{ + int (__fastcall *v2)(int); // eax + char v3; // al + int (__fastcall *v4)(int); // eax + char v5; // al + int v6; // eax + int (__fastcall *v7)(int); // edx + int v8; // edx + _DWORD *(__thiscall *v9)(int *, int); // eax + unsigned int v10; // eax + bool v11; // al + _DWORD *(__thiscall *v12)(int *, int); // eax + unsigned int v13; // eax + _DWORD *(__thiscall *v14)(int *, int); // eax + unsigned int v15; // eax + _DWORD *(__thiscall *v16)(int *, int); // eax + unsigned int v17; // eax + int (__fastcall *v18)(int); // eax + int v19; // eax + int (__fastcall *v20)(int); // eax + int v21; // eax + _BYTE *v22; // eax + int v23; // ecx + char v24; // al + char *v25; // edx + void (__thiscall *v26)(int, char *, char *, int); // eax + int v27; // eax + int v28; // ecx + int v29; // eax + int v30; // ecx + int v31; // eax + int v32; // ecx + int v33; // eax + int v34; // ecx + int v35; // eax + unsigned int v36; // [esp+Ch] [ebp-8Ch] + unsigned int v37; // [esp+Ch] [ebp-8Ch] + unsigned int v38; // [esp+Ch] [ebp-8Ch] + unsigned int v39; // [esp+Ch] [ebp-8Ch] + char *v40; // [esp+18h] [ebp-80h] + std::string *v41; // [esp+20h] [ebp-78h] + std::string *v42; // [esp+24h] [ebp-74h] + std::string *v43; // [esp+28h] [ebp-70h] + std::string *Block; // [esp+2Ch] [ebp-6Ch] + _DWORD *v45; // [esp+34h] [ebp-64h] + int v46; // [esp+34h] [ebp-64h] + int v48; // [esp+7Dh] [ebp-1Bh] BYREF + int v49; // [esp+80h] [ebp-18h] BYREF + int v50; // [esp+84h] [ebp-14h] BYREF + int v51; // [esp+88h] [ebp-10h] BYREF + int v52[3]; // [esp+8Ch] [ebp-Ch] BYREF + + v45 = std::use_facet>(a2); + v2 = *(int (__fastcall **)(int))(*v45 + 8); + if ( v2 == std::moneypunct::do_decimal_point ) + v3 = *(_BYTE *)(v45[2] + 17); + else + v3 = ((int (__fastcall *)(_DWORD *, _DWORD *))v2)(v45, v45); + *(_BYTE *)(this + 17) = v3; + v4 = *(int (__fastcall **)(int))(*v45 + 12); + if ( v4 == std::moneypunct::do_thousands_sep ) + v5 = *(_BYTE *)(v45[2] + 18); + else + v5 = v4((int)v45); + *(_BYTE *)(this + 18) = v5; + v6 = *v45; + v7 = *(int (__fastcall **)(int))(*v45 + 32); + if ( v7 == std::moneypunct::do_frac_digits ) + { + v8 = *(_DWORD *)(v45[2] + 44); + } + else + { + v8 = v7((int)v45); + v6 = *v45; + } + v9 = *(_DWORD *(__thiscall **)(int *, int))(v6 + 16); + *(_DWORD *)(this + 44) = v8; + if ( v9 == std::moneypunct::do_grouping ) + std::string::string(&v49, *(char **)(v45[2] + 8), (int)v52); + else + v9(&v49, (int)v45); + v10 = *(_DWORD *)(v49 - 12); + *(_DWORD *)(this + 12) = v10; + Block = (std::string *)operator new[](v10); + std::string::copy(&v49, Block, *(_DWORD *)(this + 12), 0, v36); + v11 = 0; + if ( *(_DWORD *)(this + 12) ) + v11 = (unsigned __int8)(*(_BYTE *)Block - 1) <= 0x7Du; + *(_BYTE *)(this + 16) = v11; + v12 = *(_DWORD *(__thiscall **)(int *, int))(*v45 + 20); + if ( v12 == std::moneypunct::do_curr_symbol ) + std::string::string(&v50, *(char **)(v45[2] + 20), (int)&v48); + else + v12(&v50, (int)v45); + v13 = *(_DWORD *)(v50 - 12); + *(_DWORD *)(this + 24) = v13; + v41 = (std::string *)operator new[](v13); + std::string::copy(&v50, v41, *(_DWORD *)(this + 24), 0, v37); + v14 = *(_DWORD *(__thiscall **)(int *, int))(*v45 + 24); + if ( v14 == std::moneypunct::do_positive_sign ) + std::string::string(&v51, *(char **)(v45[2] + 28), (int)&v48 + 1); + else + v14(&v51, (int)v45); + v15 = *(_DWORD *)(v51 - 12); + *(_DWORD *)(this + 32) = v15; + v42 = (std::string *)operator new[](v15); + std::string::copy(&v51, v42, *(_DWORD *)(this + 32), 0, v38); + v16 = *(_DWORD *(__thiscall **)(int *, int))(*v45 + 28); + if ( v16 == std::moneypunct::do_negative_sign ) + std::string::string(v52, *(char **)(v45[2] + 36), (int)&v48 + 2); + else + v16(v52, (int)v45); + v17 = *(_DWORD *)(v52[0] - 12); + *(_DWORD *)(this + 40) = v17; + v43 = (std::string *)operator new[](v17); + std::string::copy(v52, v43, *(_DWORD *)(this + 40), 0, v39); + v18 = *(int (__fastcall **)(int))(*v45 + 36); + if ( v18 == std::moneypunct::do_pos_format ) + v19 = *(_DWORD *)(v45[2] + 48); + else + v19 = v18((int)v45); + *(_DWORD *)(this + 48) = v19; + v20 = *(int (__fastcall **)(int))(*v45 + 40); + if ( v20 == std::moneypunct::do_neg_format ) + v21 = *(_DWORD *)(v45[2] + 52); + else + v21 = v20((int)v45); + *(_DWORD *)(this + 52) = v21; + v22 = std::use_facet>(a2); + v23 = this; + v46 = (int)v22; + v24 = v22[28]; + v25 = std::money_base::_S_atoms; + v40 = std::money_base::_S_atoms; + if ( v24 == 1 ) + { + v27 = *(_DWORD *)std::money_base::_S_atoms; + goto LABEL_25; + } + if ( v24 ) + { + v26 = *(void (__thiscall **)(int, char *, char *, int))(*(_DWORD *)v46 + 28); + if ( (char *)v26 == (char *)std::ctype::do_widen ) + { +LABEL_24: + v25 = v40; + v23 = this; + v27 = *(_DWORD *)v40; +LABEL_25: + *(_DWORD *)(v23 + 56) = v27; + *(_DWORD *)(this + 60) = *((_DWORD *)v25 + 1); + *(_WORD *)(this + 64) = *((_WORD *)v25 + 4); + *(_BYTE *)(this + 66) = v25[10]; + goto LABEL_26; + } + } + else + { + std::ctype::_M_widen_init(v46); + v26 = *(void (__thiscall **)(int, char *, char *, int))(*(_DWORD *)v46 + 28); + if ( (char *)v26 == (char *)std::ctype::do_widen ) + goto LABEL_24; + } + v26(v46, v40, v40 + 11, this + 56); +LABEL_26: + v28 = v52[0]; + *(_DWORD *)(this + 8) = Block; + *(_BYTE *)(this + 67) = 1; + *(_DWORD *)(this + 20) = v41; + *(_DWORD *)(this + 28) = v42; + *(_DWORD *)(this + 36) = v43; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v28 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_28: + v30 = v51; + if ( !_CRT_MT ) + goto LABEL_29; + goto LABEL_37; + } + } + else + { + v29 = *(_DWORD *)(v28 - 4); + *(_DWORD *)(v28 - 4) = v29 - 1; + if ( v29 > 0 ) + goto LABEL_28; + } + std::string::_Rep::_M_destroy((void *)(v28 - 12), (int)&v48 + 2); + v30 = v51; + if ( !_CRT_MT ) + { +LABEL_29: + v31 = *(_DWORD *)(v30 - 4); + *(_DWORD *)(v30 - 4) = v31 - 1; + if ( v31 > 0 ) + goto LABEL_30; + goto LABEL_38; + } +LABEL_37: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v30 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_30: + v32 = v50; + if ( !_CRT_MT ) + goto LABEL_31; + goto LABEL_39; + } +LABEL_38: + std::string::_Rep::_M_destroy((void *)(v30 - 12), (int)v52); + v32 = v50; + if ( !_CRT_MT ) + { +LABEL_31: + v33 = *(_DWORD *)(v32 - 4); + *(_DWORD *)(v32 - 4) = v33 - 1; + if ( v33 > 0 ) + goto LABEL_32; + goto LABEL_40; + } +LABEL_39: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v32 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_32: + v34 = v49; + if ( !_CRT_MT ) + goto LABEL_33; + goto LABEL_41; + } +LABEL_40: + std::string::_Rep::_M_destroy((void *)(v32 - 12), (int)v52); + v34 = v49; + if ( !_CRT_MT ) + { +LABEL_33: + v35 = *(_DWORD *)(v34 - 4); + *(_DWORD *)(v34 - 4) = v35 - 1; + if ( v35 > 0 ) + return; +LABEL_42: + std::string::_Rep::_M_destroy((void *)(v34 - 12), (int)v52); + return; + } +LABEL_41: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v34 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_42; +} +// 4CF43B: variable 'v36' is possibly undefined +// 4CF4DD: variable 'v37' is possibly undefined +// 4CF55F: variable 'v38' is possibly undefined +// 4CF5E1: variable 'v39' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C488: using guessed type char *std::money_base::_S_atoms; + +//----- (004CFB00) -------------------------------------------------------- +int __thiscall std::__moneypunct_cache::__moneypunct_cache(_DWORD *this, int a2) +{ + int result; // eax + + *this = &off_51B084; + this[2] = 0; + this[3] = 0; + *((_BYTE *)this + 18) = 0; + this[1] = a2 != 0; + result = 0; + *((_WORD *)this + 8) = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + *((_BYTE *)this + 67) = 0; + return result; +} +// 51B084: using guessed type int (*off_51B084)(); + +//----- (004CFB80) -------------------------------------------------------- +int __thiscall std::__moneypunct_cache::__moneypunct_cache(_DWORD *this, int a2) +{ + int result; // eax + + *this = &off_51B084; + this[2] = 0; + this[3] = 0; + *((_BYTE *)this + 18) = 0; + this[1] = a2 != 0; + result = 0; + *((_WORD *)this + 8) = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + *((_BYTE *)this + 67) = 0; + return result; +} +// 51B084: using guessed type int (*off_51B084)(); + +//----- (004CFC00) -------------------------------------------------------- +void __fastcall std::__moneypunct_cache::~__moneypunct_cache(void *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + std::__moneypunct_cache::~__moneypunct_cache((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4CFC40: variable 'lpfctx' is possibly undefined + +//----- (004CFC90) -------------------------------------------------------- +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + void **v2; // ebx + bool v3; // zf + + v2 = (void **)v1; + v3 = *(_BYTE *)(v1 + 67) == 0; + *(_DWORD *)v1 = &off_51B084; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( v2[5] ) + operator delete[](v2[5]); + if ( v2[7] ) + operator delete[](v2[7]); + if ( v2[9] ) + operator delete[](v2[9]); + } + std::locale::facet::~facet(a1); +} +// 4CFC91: variable 'v1' is possibly undefined +// 51B084: using guessed type int (*off_51B084)(); + +//----- (004CFCF0) -------------------------------------------------------- +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + void **v2; // ebx + bool v3; // zf + + v2 = (void **)v1; + v3 = *(_BYTE *)(v1 + 67) == 0; + *(_DWORD *)v1 = &off_51B084; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( v2[5] ) + operator delete[](v2[5]); + if ( v2[7] ) + operator delete[](v2[7]); + if ( v2[9] ) + operator delete[](v2[9]); + } + std::locale::facet::~facet(a1); +} +// 4CFCF1: variable 'v1' is possibly undefined +// 51B084: using guessed type int (*off_51B084)(); + +//----- (004CFD50) -------------------------------------------------------- +void __thiscall std::__moneypunct_cache::_M_cache(int this, int a2) +{ + int (__fastcall *v2)(int); // eax + char v3; // al + int (__fastcall *v4)(int); // eax + char v5; // al + int v6; // eax + int (__fastcall *v7)(int); // edx + int v8; // edx + _DWORD *(__thiscall *v9)(int *, int); // eax + unsigned int v10; // eax + bool v11; // al + _DWORD *(__thiscall *v12)(int *, int); // eax + unsigned int v13; // eax + _DWORD *(__thiscall *v14)(int *, int); // eax + unsigned int v15; // eax + _DWORD *(__thiscall *v16)(int *, int); // eax + unsigned int v17; // eax + int (__fastcall *v18)(int); // eax + int v19; // eax + int (__fastcall *v20)(int); // eax + int v21; // eax + _BYTE *v22; // eax + int v23; // ecx + char v24; // al + char *v25; // edx + void (__thiscall *v26)(int, char *, char *, int); // eax + int v27; // eax + int v28; // ecx + int v29; // eax + int v30; // ecx + int v31; // eax + int v32; // ecx + int v33; // eax + int v34; // ecx + int v35; // eax + unsigned int v36; // [esp+Ch] [ebp-8Ch] + unsigned int v37; // [esp+Ch] [ebp-8Ch] + unsigned int v38; // [esp+Ch] [ebp-8Ch] + unsigned int v39; // [esp+Ch] [ebp-8Ch] + char *v40; // [esp+18h] [ebp-80h] + std::string *v41; // [esp+20h] [ebp-78h] + std::string *v42; // [esp+24h] [ebp-74h] + std::string *v43; // [esp+28h] [ebp-70h] + std::string *Block; // [esp+2Ch] [ebp-6Ch] + _DWORD *v45; // [esp+34h] [ebp-64h] + int v46; // [esp+34h] [ebp-64h] + int v48; // [esp+7Dh] [ebp-1Bh] BYREF + int v49; // [esp+80h] [ebp-18h] BYREF + int v50; // [esp+84h] [ebp-14h] BYREF + int v51; // [esp+88h] [ebp-10h] BYREF + int v52[3]; // [esp+8Ch] [ebp-Ch] BYREF + + v45 = std::use_facet>(a2); + v2 = *(int (__fastcall **)(int))(*v45 + 8); + if ( v2 == std::moneypunct::do_decimal_point ) + v3 = *(_BYTE *)(v45[2] + 17); + else + v3 = ((int (__fastcall *)(_DWORD *, _DWORD *))v2)(v45, v45); + *(_BYTE *)(this + 17) = v3; + v4 = *(int (__fastcall **)(int))(*v45 + 12); + if ( v4 == std::moneypunct::do_thousands_sep ) + v5 = *(_BYTE *)(v45[2] + 18); + else + v5 = v4((int)v45); + *(_BYTE *)(this + 18) = v5; + v6 = *v45; + v7 = *(int (__fastcall **)(int))(*v45 + 32); + if ( v7 == std::moneypunct::do_frac_digits ) + { + v8 = *(_DWORD *)(v45[2] + 44); + } + else + { + v8 = v7((int)v45); + v6 = *v45; + } + v9 = *(_DWORD *(__thiscall **)(int *, int))(v6 + 16); + *(_DWORD *)(this + 44) = v8; + if ( v9 == std::moneypunct::do_grouping ) + std::string::string(&v49, *(char **)(v45[2] + 8), (int)v52); + else + v9(&v49, (int)v45); + v10 = *(_DWORD *)(v49 - 12); + *(_DWORD *)(this + 12) = v10; + Block = (std::string *)operator new[](v10); + std::string::copy(&v49, Block, *(_DWORD *)(this + 12), 0, v36); + v11 = 0; + if ( *(_DWORD *)(this + 12) ) + v11 = (unsigned __int8)(*(_BYTE *)Block - 1) <= 0x7Du; + *(_BYTE *)(this + 16) = v11; + v12 = *(_DWORD *(__thiscall **)(int *, int))(*v45 + 20); + if ( v12 == std::moneypunct::do_curr_symbol ) + std::string::string(&v50, *(char **)(v45[2] + 20), (int)&v48); + else + v12(&v50, (int)v45); + v13 = *(_DWORD *)(v50 - 12); + *(_DWORD *)(this + 24) = v13; + v41 = (std::string *)operator new[](v13); + std::string::copy(&v50, v41, *(_DWORD *)(this + 24), 0, v37); + v14 = *(_DWORD *(__thiscall **)(int *, int))(*v45 + 24); + if ( v14 == std::moneypunct::do_positive_sign ) + std::string::string(&v51, *(char **)(v45[2] + 28), (int)&v48 + 1); + else + v14(&v51, (int)v45); + v15 = *(_DWORD *)(v51 - 12); + *(_DWORD *)(this + 32) = v15; + v42 = (std::string *)operator new[](v15); + std::string::copy(&v51, v42, *(_DWORD *)(this + 32), 0, v38); + v16 = *(_DWORD *(__thiscall **)(int *, int))(*v45 + 28); + if ( v16 == std::moneypunct::do_negative_sign ) + std::string::string(v52, *(char **)(v45[2] + 36), (int)&v48 + 2); + else + v16(v52, (int)v45); + v17 = *(_DWORD *)(v52[0] - 12); + *(_DWORD *)(this + 40) = v17; + v43 = (std::string *)operator new[](v17); + std::string::copy(v52, v43, *(_DWORD *)(this + 40), 0, v39); + v18 = *(int (__fastcall **)(int))(*v45 + 36); + if ( v18 == std::moneypunct::do_pos_format ) + v19 = *(_DWORD *)(v45[2] + 48); + else + v19 = v18((int)v45); + *(_DWORD *)(this + 48) = v19; + v20 = *(int (__fastcall **)(int))(*v45 + 40); + if ( v20 == std::moneypunct::do_neg_format ) + v21 = *(_DWORD *)(v45[2] + 52); + else + v21 = v20((int)v45); + *(_DWORD *)(this + 52) = v21; + v22 = std::use_facet>(a2); + v23 = this; + v46 = (int)v22; + v24 = v22[28]; + v25 = std::money_base::_S_atoms; + v40 = std::money_base::_S_atoms; + if ( v24 == 1 ) + { + v27 = *(_DWORD *)std::money_base::_S_atoms; + goto LABEL_25; + } + if ( v24 ) + { + v26 = *(void (__thiscall **)(int, char *, char *, int))(*(_DWORD *)v46 + 28); + if ( (char *)v26 == (char *)std::ctype::do_widen ) + { +LABEL_24: + v25 = v40; + v23 = this; + v27 = *(_DWORD *)v40; +LABEL_25: + *(_DWORD *)(v23 + 56) = v27; + *(_DWORD *)(this + 60) = *((_DWORD *)v25 + 1); + *(_WORD *)(this + 64) = *((_WORD *)v25 + 4); + *(_BYTE *)(this + 66) = v25[10]; + goto LABEL_26; + } + } + else + { + std::ctype::_M_widen_init(v46); + v26 = *(void (__thiscall **)(int, char *, char *, int))(*(_DWORD *)v46 + 28); + if ( (char *)v26 == (char *)std::ctype::do_widen ) + goto LABEL_24; + } + v26(v46, v40, v40 + 11, this + 56); +LABEL_26: + v28 = v52[0]; + *(_DWORD *)(this + 8) = Block; + *(_BYTE *)(this + 67) = 1; + *(_DWORD *)(this + 20) = v41; + *(_DWORD *)(this + 28) = v42; + *(_DWORD *)(this + 36) = v43; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v28 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_28: + v30 = v51; + if ( !_CRT_MT ) + goto LABEL_29; + goto LABEL_37; + } + } + else + { + v29 = *(_DWORD *)(v28 - 4); + *(_DWORD *)(v28 - 4) = v29 - 1; + if ( v29 > 0 ) + goto LABEL_28; + } + std::string::_Rep::_M_destroy((void *)(v28 - 12), (int)&v48 + 2); + v30 = v51; + if ( !_CRT_MT ) + { +LABEL_29: + v31 = *(_DWORD *)(v30 - 4); + *(_DWORD *)(v30 - 4) = v31 - 1; + if ( v31 > 0 ) + goto LABEL_30; + goto LABEL_38; + } +LABEL_37: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v30 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_30: + v32 = v50; + if ( !_CRT_MT ) + goto LABEL_31; + goto LABEL_39; + } +LABEL_38: + std::string::_Rep::_M_destroy((void *)(v30 - 12), (int)v52); + v32 = v50; + if ( !_CRT_MT ) + { +LABEL_31: + v33 = *(_DWORD *)(v32 - 4); + *(_DWORD *)(v32 - 4) = v33 - 1; + if ( v33 > 0 ) + goto LABEL_32; + goto LABEL_40; + } +LABEL_39: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v32 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_32: + v34 = v49; + if ( !_CRT_MT ) + goto LABEL_33; + goto LABEL_41; + } +LABEL_40: + std::string::_Rep::_M_destroy((void *)(v32 - 12), (int)v52); + v34 = v49; + if ( !_CRT_MT ) + { +LABEL_33: + v35 = *(_DWORD *)(v34 - 4); + *(_DWORD *)(v34 - 4) = v35 - 1; + if ( v35 > 0 ) + return; +LABEL_42: + std::string::_Rep::_M_destroy((void *)(v34 - 12), (int)v52); + return; + } +LABEL_41: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v34 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_42; +} +// 4CFE6B: variable 'v36' is possibly undefined +// 4CFF0D: variable 'v37' is possibly undefined +// 4CFF8F: variable 'v38' is possibly undefined +// 4D0011: variable 'v39' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C488: using guessed type char *std::money_base::_S_atoms; + +//----- (004D0530) -------------------------------------------------------- +int __thiscall std::__moneypunct_cache::__moneypunct_cache(_DWORD *this, int a2) +{ + int result; // eax + + *this = &off_51B094; + this[2] = 0; + this[3] = 0; + *((_BYTE *)this + 18) = 0; + this[1] = a2 != 0; + result = 0; + *((_WORD *)this + 8) = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + *((_BYTE *)this + 67) = 0; + return result; +} +// 51B094: using guessed type int (*off_51B094)(); + +//----- (004D05B0) -------------------------------------------------------- +int __thiscall std::__moneypunct_cache::__moneypunct_cache(_DWORD *this, int a2) +{ + int result; // eax + + *this = &off_51B094; + this[2] = 0; + this[3] = 0; + *((_BYTE *)this + 18) = 0; + this[1] = a2 != 0; + result = 0; + *((_WORD *)this + 8) = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + *((_BYTE *)this + 67) = 0; + return result; +} +// 51B094: using guessed type int (*off_51B094)(); + +//----- (004D0630) -------------------------------------------------------- +void __fastcall std::__moneypunct_cache::~__moneypunct_cache(void *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + std::__moneypunct_cache::~__moneypunct_cache((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4D0670: variable 'lpfctx' is possibly undefined + +//----- (004D06C0) -------------------------------------------------------- +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + void **v2; // ebx + bool v3; // zf + + v2 = (void **)v1; + v3 = *(_BYTE *)(v1 + 67) == 0; + *(_DWORD *)v1 = &off_51B094; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( v2[5] ) + operator delete[](v2[5]); + if ( v2[7] ) + operator delete[](v2[7]); + if ( v2[9] ) + operator delete[](v2[9]); + } + std::locale::facet::~facet(a1); +} +// 4D06C1: variable 'v1' is possibly undefined +// 51B094: using guessed type int (*off_51B094)(); + +//----- (004D0720) -------------------------------------------------------- +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + void **v2; // ebx + bool v3; // zf + + v2 = (void **)v1; + v3 = *(_BYTE *)(v1 + 67) == 0; + *(_DWORD *)v1 = &off_51B094; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( v2[5] ) + operator delete[](v2[5]); + if ( v2[7] ) + operator delete[](v2[7]); + if ( v2[9] ) + operator delete[](v2[9]); + } + std::locale::facet::~facet(a1); +} +// 4D0721: variable 'v1' is possibly undefined +// 51B094: using guessed type int (*off_51B094)(); + +//----- (004D0780) -------------------------------------------------------- +void __thiscall std::__moneypunct_cache::_M_cache(int this, int a2) +{ + _DWORD *v2; // eax + int (__fastcall *v3)(int); // edx + __int16 v4; // dx + int (__fastcall *v5)(int); // edx + __int16 v6; // dx + int (__fastcall *v7)(int); // edx + int v8; // edx + _DWORD *(__thiscall *v9)(int *, int); // eax + unsigned int v10; // eax + bool v11; // al + _DWORD *(__thiscall *v12)(int *, int); // eax + unsigned int v13; // eax + _DWORD *(__thiscall *v14)(int *, int); // eax + unsigned int v15; // eax + _DWORD *(__thiscall *v16)(int *, int); // eax + unsigned int v17; // eax + int (__fastcall *v18)(int); // eax + int v19; // eax + int (__fastcall *v20)(int); // eax + int v21; // eax + void *v22; // eax + int v23; // ecx + int v24; // eax + int v25; // ecx + int v26; // eax + int v27; // ecx + int v28; // eax + int v29; // ecx + int v30; // eax + unsigned int v31; // [esp+Ch] [ebp-7Ch] + _WORD *v32; // [esp+10h] [ebp-78h] + _WORD *v33; // [esp+14h] [ebp-74h] + _WORD *v34; // [esp+18h] [ebp-70h] + std::string *Block; // [esp+1Ch] [ebp-6Ch] + _DWORD *v36; // [esp+24h] [ebp-64h] + int v38; // [esp+6Dh] [ebp-1Bh] BYREF + int v39; // [esp+70h] [ebp-18h] BYREF + int v40; // [esp+74h] [ebp-14h] BYREF + int v41; // [esp+78h] [ebp-10h] BYREF + int v42[2]; // [esp+7Ch] [ebp-Ch] BYREF + + v36 = std::use_facet>(a2); + v2 = (_DWORD *)*v36; + v3 = *(int (__fastcall **)(int))(*v36 + 8); + if ( v3 == std::moneypunct::do_decimal_point ) + { + v4 = *(_WORD *)(v36[2] + 18); + } + else + { + v4 = v3((int)v36); + v2 = (_DWORD *)*v36; + } + *(_WORD *)(this + 18) = v4; + v5 = (int (__fastcall *)(int))v2[3]; + if ( v5 == std::moneypunct::do_thousands_sep ) + { + v6 = *(_WORD *)(v36[2] + 20); + } + else + { + v6 = v5((int)v36); + v2 = (_DWORD *)*v36; + } + *(_WORD *)(this + 20) = v6; + v7 = (int (__fastcall *)(int))v2[8]; + if ( v7 == std::moneypunct::do_frac_digits ) + { + v8 = *(_DWORD *)(v36[2] + 48); + } + else + { + v8 = v7((int)v36); + v2 = (_DWORD *)*v36; + } + v9 = (_DWORD *(__thiscall *)(int *, int))v2[4]; + *(_DWORD *)(this + 48) = v8; + if ( v9 == std::moneypunct::do_grouping ) + std::string::string(&v39, *(char **)(v36[2] + 8), (int)v42); + else + v9(&v39, (int)v36); + v10 = *(_DWORD *)(v39 - 12); + *(_DWORD *)(this + 12) = v10; + Block = (std::string *)operator new[](v10); + std::string::copy(&v39, Block, *(_DWORD *)(this + 12), 0, v31); + v11 = 0; + if ( *(_DWORD *)(this + 12) ) + v11 = (unsigned __int8)(*(_BYTE *)Block - 1) <= 0x7Du; + *(_BYTE *)(this + 16) = v11; + v12 = *(_DWORD *(__thiscall **)(int *, int))(*v36 + 20); + if ( v12 == std::moneypunct::do_curr_symbol ) + std::wstring::basic_string(&v40, *(wchar_t **)(v36[2] + 24), (int)&v38); + else + v12(&v40, (int)v36); + v13 = *(_DWORD *)(v40 - 12); + *(_DWORD *)(this + 28) = v13; + if ( v13 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v32 = (_WORD *)operator new[](2 * v13); + std::wstring::copy(&v40, v32, *(_DWORD *)(this + 28), 0); + v14 = *(_DWORD *(__thiscall **)(int *, int))(*v36 + 24); + if ( v14 == std::moneypunct::do_positive_sign ) + std::wstring::basic_string(&v41, *(wchar_t **)(v36[2] + 32), (int)&v38 + 1); + else + v14(&v41, (int)v36); + v15 = *(_DWORD *)(v41 - 12); + *(_DWORD *)(this + 36) = v15; + if ( v15 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v33 = (_WORD *)operator new[](2 * v15); + std::wstring::copy(&v41, v33, *(_DWORD *)(this + 36), 0); + v16 = *(_DWORD *(__thiscall **)(int *, int))(*v36 + 28); + if ( v16 == std::moneypunct::do_negative_sign ) + std::wstring::basic_string(v42, *(wchar_t **)(v36[2] + 40), (int)&v38 + 2); + else + v16(v42, (int)v36); + v17 = *(_DWORD *)(v42[0] - 12); + *(_DWORD *)(this + 44) = v17; + if ( v17 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v34 = (_WORD *)operator new[](2 * v17); + std::wstring::copy(v42, v34, *(_DWORD *)(this + 44), 0); + v18 = *(int (__fastcall **)(int))(*v36 + 36); + if ( v18 == std::moneypunct::do_pos_format ) + v19 = *(_DWORD *)(v36[2] + 52); + else + v19 = v18((int)v36); + *(_DWORD *)(this + 52) = v19; + v20 = *(int (__fastcall **)(int))(*v36 + 40); + if ( v20 == std::moneypunct::do_neg_format ) + v21 = *(_DWORD *)(v36[2] + 56); + else + v21 = v20((int)v36); + *(_DWORD *)(this + 56) = v21; + v22 = std::use_facet>(a2); + (*(void (__thiscall **)(void *, char *, char *, int))(*(_DWORD *)v22 + 44))( + v22, + std::money_base::_S_atoms, + std::money_base::_S_atoms + 11, + this + 60); + v23 = v42[0]; + *(_DWORD *)(this + 8) = Block; + *(_DWORD *)(this + 24) = v32; + *(_DWORD *)(this + 32) = v33; + *(_DWORD *)(this + 40) = v34; + *(_BYTE *)(this + 82) = 1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v23 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_26: + v25 = v41; + if ( !_CRT_MT ) + goto LABEL_27; + goto LABEL_35; + } + } + else + { + v24 = *(_DWORD *)(v23 - 4); + *(_DWORD *)(v23 - 4) = v24 - 1; + if ( v24 > 0 ) + goto LABEL_26; + } + std::wstring::_Rep::_M_destroy((void *)(v23 - 12), (int)&v38 + 2); + v25 = v41; + if ( !_CRT_MT ) + { +LABEL_27: + v26 = *(_DWORD *)(v25 - 4); + *(_DWORD *)(v25 - 4) = v26 - 1; + if ( v26 > 0 ) + goto LABEL_28; + goto LABEL_36; + } +LABEL_35: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v25 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_28: + v27 = v40; + if ( !_CRT_MT ) + goto LABEL_29; + goto LABEL_37; + } +LABEL_36: + std::wstring::_Rep::_M_destroy((void *)(v25 - 12), (int)v42); + v27 = v40; + if ( !_CRT_MT ) + { +LABEL_29: + v28 = *(_DWORD *)(v27 - 4); + *(_DWORD *)(v27 - 4) = v28 - 1; + if ( v28 > 0 ) + goto LABEL_30; + goto LABEL_38; + } +LABEL_37: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v27 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_30: + v29 = v39; + if ( !_CRT_MT ) + goto LABEL_31; + goto LABEL_39; + } +LABEL_38: + std::wstring::_Rep::_M_destroy((void *)(v27 - 12), (int)v42); + v29 = v39; + if ( !_CRT_MT ) + { +LABEL_31: + v30 = *(_DWORD *)(v29 - 4); + *(_DWORD *)(v29 - 4) = v30 - 1; + if ( v30 > 0 ) + return; +LABEL_40: + std::string::_Rep::_M_destroy((void *)(v29 - 12), (int)v42); + return; + } +LABEL_39: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v29 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_40; +} +// 4D089C: variable 'v31' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C488: using guessed type char *std::money_base::_S_atoms; + +//----- (004D0F10) -------------------------------------------------------- +BOOL __thiscall std::__moneypunct_cache::__moneypunct_cache(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B0A4; + this[2] = 0; + this[3] = 0; + result = a2 != 0; + *((_BYTE *)this + 16) = 0; + this[1] = result; + *(_DWORD *)((char *)this + 18) = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + this[14] = 0; + *((_BYTE *)this + 82) = 0; + return result; +} +// 51B0A4: using guessed type int (*off_51B0A4)(); + +//----- (004D0F90) -------------------------------------------------------- +BOOL __thiscall std::__moneypunct_cache::__moneypunct_cache(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B0A4; + this[2] = 0; + this[3] = 0; + result = a2 != 0; + *((_BYTE *)this + 16) = 0; + this[1] = result; + *(_DWORD *)((char *)this + 18) = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + this[14] = 0; + *((_BYTE *)this + 82) = 0; + return result; +} +// 51B0A4: using guessed type int (*off_51B0A4)(); + +//----- (004D1010) -------------------------------------------------------- +void __fastcall std::__moneypunct_cache::~__moneypunct_cache(void *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + std::__moneypunct_cache::~__moneypunct_cache((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4D1050: variable 'lpfctx' is possibly undefined + +//----- (004D10A0) -------------------------------------------------------- +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + void **v2; // ebx + bool v3; // zf + + v2 = (void **)v1; + v3 = *(_BYTE *)(v1 + 82) == 0; + *(_DWORD *)v1 = &off_51B0A4; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( v2[6] ) + operator delete[](v2[6]); + if ( v2[8] ) + operator delete[](v2[8]); + if ( v2[10] ) + operator delete[](v2[10]); + } + std::locale::facet::~facet(a1); +} +// 4D10A1: variable 'v1' is possibly undefined +// 51B0A4: using guessed type int (*off_51B0A4)(); + +//----- (004D1100) -------------------------------------------------------- +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + void **v2; // ebx + bool v3; // zf + + v2 = (void **)v1; + v3 = *(_BYTE *)(v1 + 82) == 0; + *(_DWORD *)v1 = &off_51B0A4; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( v2[6] ) + operator delete[](v2[6]); + if ( v2[8] ) + operator delete[](v2[8]); + if ( v2[10] ) + operator delete[](v2[10]); + } + std::locale::facet::~facet(a1); +} +// 4D1101: variable 'v1' is possibly undefined +// 51B0A4: using guessed type int (*off_51B0A4)(); + +//----- (004D1160) -------------------------------------------------------- +void __thiscall std::__moneypunct_cache::_M_cache(int this, int a2) +{ + _DWORD *v2; // eax + int (__fastcall *v3)(int); // edx + __int16 v4; // dx + int (__fastcall *v5)(int); // edx + __int16 v6; // dx + int (__fastcall *v7)(int); // edx + int v8; // edx + _DWORD *(__thiscall *v9)(int *, int); // eax + unsigned int v10; // eax + bool v11; // al + _DWORD *(__thiscall *v12)(int *, int); // eax + unsigned int v13; // eax + _DWORD *(__thiscall *v14)(int *, int); // eax + unsigned int v15; // eax + _DWORD *(__thiscall *v16)(int *, int); // eax + unsigned int v17; // eax + int (__fastcall *v18)(int); // eax + int v19; // eax + int (__fastcall *v20)(int); // eax + int v21; // eax + void *v22; // eax + int v23; // ecx + int v24; // eax + int v25; // ecx + int v26; // eax + int v27; // ecx + int v28; // eax + int v29; // ecx + int v30; // eax + unsigned int v31; // [esp+Ch] [ebp-7Ch] + _WORD *v32; // [esp+10h] [ebp-78h] + _WORD *v33; // [esp+14h] [ebp-74h] + _WORD *v34; // [esp+18h] [ebp-70h] + std::string *Block; // [esp+1Ch] [ebp-6Ch] + _DWORD *v36; // [esp+24h] [ebp-64h] + int v38; // [esp+6Dh] [ebp-1Bh] BYREF + int v39; // [esp+70h] [ebp-18h] BYREF + int v40; // [esp+74h] [ebp-14h] BYREF + int v41; // [esp+78h] [ebp-10h] BYREF + int v42[2]; // [esp+7Ch] [ebp-Ch] BYREF + + v36 = std::use_facet>(a2); + v2 = (_DWORD *)*v36; + v3 = *(int (__fastcall **)(int))(*v36 + 8); + if ( v3 == std::moneypunct::do_decimal_point ) + { + v4 = *(_WORD *)(v36[2] + 18); + } + else + { + v4 = v3((int)v36); + v2 = (_DWORD *)*v36; + } + *(_WORD *)(this + 18) = v4; + v5 = (int (__fastcall *)(int))v2[3]; + if ( v5 == std::moneypunct::do_thousands_sep ) + { + v6 = *(_WORD *)(v36[2] + 20); + } + else + { + v6 = v5((int)v36); + v2 = (_DWORD *)*v36; + } + *(_WORD *)(this + 20) = v6; + v7 = (int (__fastcall *)(int))v2[8]; + if ( v7 == std::moneypunct::do_frac_digits ) + { + v8 = *(_DWORD *)(v36[2] + 48); + } + else + { + v8 = v7((int)v36); + v2 = (_DWORD *)*v36; + } + v9 = (_DWORD *(__thiscall *)(int *, int))v2[4]; + *(_DWORD *)(this + 48) = v8; + if ( v9 == std::moneypunct::do_grouping ) + std::string::string(&v39, *(char **)(v36[2] + 8), (int)v42); + else + v9(&v39, (int)v36); + v10 = *(_DWORD *)(v39 - 12); + *(_DWORD *)(this + 12) = v10; + Block = (std::string *)operator new[](v10); + std::string::copy(&v39, Block, *(_DWORD *)(this + 12), 0, v31); + v11 = 0; + if ( *(_DWORD *)(this + 12) ) + v11 = (unsigned __int8)(*(_BYTE *)Block - 1) <= 0x7Du; + *(_BYTE *)(this + 16) = v11; + v12 = *(_DWORD *(__thiscall **)(int *, int))(*v36 + 20); + if ( v12 == std::moneypunct::do_curr_symbol ) + std::wstring::basic_string(&v40, *(wchar_t **)(v36[2] + 24), (int)&v38); + else + v12(&v40, (int)v36); + v13 = *(_DWORD *)(v40 - 12); + *(_DWORD *)(this + 28) = v13; + if ( v13 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v32 = (_WORD *)operator new[](2 * v13); + std::wstring::copy(&v40, v32, *(_DWORD *)(this + 28), 0); + v14 = *(_DWORD *(__thiscall **)(int *, int))(*v36 + 24); + if ( v14 == std::moneypunct::do_positive_sign ) + std::wstring::basic_string(&v41, *(wchar_t **)(v36[2] + 32), (int)&v38 + 1); + else + v14(&v41, (int)v36); + v15 = *(_DWORD *)(v41 - 12); + *(_DWORD *)(this + 36) = v15; + if ( v15 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v33 = (_WORD *)operator new[](2 * v15); + std::wstring::copy(&v41, v33, *(_DWORD *)(this + 36), 0); + v16 = *(_DWORD *(__thiscall **)(int *, int))(*v36 + 28); + if ( v16 == std::moneypunct::do_negative_sign ) + std::wstring::basic_string(v42, *(wchar_t **)(v36[2] + 40), (int)&v38 + 2); + else + v16(v42, (int)v36); + v17 = *(_DWORD *)(v42[0] - 12); + *(_DWORD *)(this + 44) = v17; + if ( v17 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v34 = (_WORD *)operator new[](2 * v17); + std::wstring::copy(v42, v34, *(_DWORD *)(this + 44), 0); + v18 = *(int (__fastcall **)(int))(*v36 + 36); + if ( v18 == std::moneypunct::do_pos_format ) + v19 = *(_DWORD *)(v36[2] + 52); + else + v19 = v18((int)v36); + *(_DWORD *)(this + 52) = v19; + v20 = *(int (__fastcall **)(int))(*v36 + 40); + if ( v20 == std::moneypunct::do_neg_format ) + v21 = *(_DWORD *)(v36[2] + 56); + else + v21 = v20((int)v36); + *(_DWORD *)(this + 56) = v21; + v22 = std::use_facet>(a2); + (*(void (__thiscall **)(void *, char *, char *, int))(*(_DWORD *)v22 + 44))( + v22, + std::money_base::_S_atoms, + std::money_base::_S_atoms + 11, + this + 60); + v23 = v42[0]; + *(_DWORD *)(this + 8) = Block; + *(_DWORD *)(this + 24) = v32; + *(_DWORD *)(this + 32) = v33; + *(_DWORD *)(this + 40) = v34; + *(_BYTE *)(this + 82) = 1; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v23 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_26: + v25 = v41; + if ( !_CRT_MT ) + goto LABEL_27; + goto LABEL_35; + } + } + else + { + v24 = *(_DWORD *)(v23 - 4); + *(_DWORD *)(v23 - 4) = v24 - 1; + if ( v24 > 0 ) + goto LABEL_26; + } + std::wstring::_Rep::_M_destroy((void *)(v23 - 12), (int)&v38 + 2); + v25 = v41; + if ( !_CRT_MT ) + { +LABEL_27: + v26 = *(_DWORD *)(v25 - 4); + *(_DWORD *)(v25 - 4) = v26 - 1; + if ( v26 > 0 ) + goto LABEL_28; + goto LABEL_36; + } +LABEL_35: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v25 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_28: + v27 = v40; + if ( !_CRT_MT ) + goto LABEL_29; + goto LABEL_37; + } +LABEL_36: + std::wstring::_Rep::_M_destroy((void *)(v25 - 12), (int)v42); + v27 = v40; + if ( !_CRT_MT ) + { +LABEL_29: + v28 = *(_DWORD *)(v27 - 4); + *(_DWORD *)(v27 - 4) = v28 - 1; + if ( v28 > 0 ) + goto LABEL_30; + goto LABEL_38; + } +LABEL_37: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v27 - 4), 0xFFFFFFFF) > 0 ) + { +LABEL_30: + v29 = v39; + if ( !_CRT_MT ) + goto LABEL_31; + goto LABEL_39; + } +LABEL_38: + std::wstring::_Rep::_M_destroy((void *)(v27 - 12), (int)v42); + v29 = v39; + if ( !_CRT_MT ) + { +LABEL_31: + v30 = *(_DWORD *)(v29 - 4); + *(_DWORD *)(v29 - 4) = v30 - 1; + if ( v30 > 0 ) + return; +LABEL_40: + std::string::_Rep::_M_destroy((void *)(v29 - 12), (int)v42); + return; + } +LABEL_39: + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v29 - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_40; +} +// 4D127C: variable 'v31' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C488: using guessed type char *std::money_base::_S_atoms; + +//----- (004D18F0) -------------------------------------------------------- +BOOL __thiscall std::__moneypunct_cache::__moneypunct_cache(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B0B4; + this[2] = 0; + this[3] = 0; + result = a2 != 0; + *((_BYTE *)this + 16) = 0; + this[1] = result; + *(_DWORD *)((char *)this + 18) = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + this[14] = 0; + *((_BYTE *)this + 82) = 0; + return result; +} +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (004D1970) -------------------------------------------------------- +BOOL __thiscall std::__moneypunct_cache::__moneypunct_cache(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B0B4; + this[2] = 0; + this[3] = 0; + result = a2 != 0; + *((_BYTE *)this + 16) = 0; + this[1] = result; + *(_DWORD *)((char *)this + 18) = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + this[10] = 0; + this[11] = 0; + this[12] = 0; + this[13] = 0; + this[14] = 0; + *((_BYTE *)this + 82) = 0; + return result; +} +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (004D19F0) -------------------------------------------------------- +void __fastcall std::__moneypunct_cache::~__moneypunct_cache(void *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + std::__moneypunct_cache::~__moneypunct_cache((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4D1A30: variable 'lpfctx' is possibly undefined + +//----- (004D1A80) -------------------------------------------------------- +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + void **v2; // ebx + bool v3; // zf + + v2 = (void **)v1; + v3 = *(_BYTE *)(v1 + 82) == 0; + *(_DWORD *)v1 = &off_51B0B4; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( v2[6] ) + operator delete[](v2[6]); + if ( v2[8] ) + operator delete[](v2[8]); + if ( v2[10] ) + operator delete[](v2[10]); + } + std::locale::facet::~facet(a1); +} +// 4D1A81: variable 'v1' is possibly undefined +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (004D1AE0) -------------------------------------------------------- +void __cdecl std::__moneypunct_cache::~__moneypunct_cache(std::locale::facet *a1) +{ + int v1; // ecx + void **v2; // ebx + bool v3; // zf + + v2 = (void **)v1; + v3 = *(_BYTE *)(v1 + 82) == 0; + *(_DWORD *)v1 = &off_51B0B4; + if ( !v3 ) + { + if ( *(_DWORD *)(v1 + 8) ) + operator delete[](*(void **)(v1 + 8)); + if ( v2[6] ) + operator delete[](v2[6]); + if ( v2[8] ) + operator delete[](v2[8]); + if ( v2[10] ) + operator delete[](v2[10]); + } + std::locale::facet::~facet(a1); +} +// 4D1AE1: variable 'v1' is possibly undefined +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (004D1B40) -------------------------------------------------------- +void __fastcall std::__codecvt_utf8_base::~__codecvt_utf8_base(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &unk_51B2B8; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4D1B4C: variable 'Blocka' is possibly undefined + +//----- (004D1B60) -------------------------------------------------------- +void __cdecl std::__codecvt_utf8_base::~__codecvt_utf8_base(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &unk_51B2B8; + std::locale::facet::~facet(a1); +} +// 4D1B60: variable 'v1' is possibly undefined + +//----- (004D1B70) -------------------------------------------------------- +void __fastcall std::__codecvt_utf8_base::~__codecvt_utf8_base(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &unk_51B310; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4D1B7C: variable 'Blocka' is possibly undefined + +//----- (004D1B90) -------------------------------------------------------- +void __cdecl std::__codecvt_utf8_base::~__codecvt_utf8_base(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &unk_51B310; + std::locale::facet::~facet(a1); +} +// 4D1B90: variable 'v1' is possibly undefined + +//----- (004D1BA0) -------------------------------------------------------- +void __fastcall std::__codecvt_utf8_base::~__codecvt_utf8_base(_DWORD *Block) +{ + *Block = &off_51B11C; + std::codecvt::~codecvt(Block); + operator delete(Block); +} +// 51B11C: using guessed type int (*off_51B11C)(); + +//----- (004D1BC0) -------------------------------------------------------- +void __fastcall std::__codecvt_utf8_base::~__codecvt_utf8_base(_DWORD *a1) +{ + *a1 = &off_51B11C; + std::codecvt::~codecvt(a1); +} +// 51B11C: using guessed type int (*off_51B11C)(); + +//----- (004D1BD0) -------------------------------------------------------- +void __fastcall std::__iosfail_type_info::~__iosfail_type_info(_DWORD *a1) +{ + __cxxabiv1::__si_class_type_info *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51B148; + __cxxabiv1::__si_class_type_info::~__si_class_type_info(Block); + operator delete(a1); +} +// 4D1BDC: variable 'Block' is possibly undefined +// 51B148: using guessed type void (__cdecl *off_51B148)(std::__iosfail_type_info *__hidden this); + +//----- (004D1BF0) -------------------------------------------------------- +void __cdecl std::__iosfail_type_info::~__iosfail_type_info(std::__iosfail_type_info *this) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B148; + __cxxabiv1::__si_class_type_info::~__si_class_type_info(this); +} +// 4D1BF0: variable 'v1' is possibly undefined +// 51B148: using guessed type void (__cdecl *off_51B148)(std::__iosfail_type_info *__hidden this); + +//----- (004D1C00) -------------------------------------------------------- +void __fastcall std::__codecvt_utf16_base::~__codecvt_utf16_base(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &unk_51B2B8; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4D1C0C: variable 'Blocka' is possibly undefined + +//----- (004D1C20) -------------------------------------------------------- +void __cdecl std::__codecvt_utf16_base::~__codecvt_utf16_base(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &unk_51B2B8; + std::locale::facet::~facet(a1); +} +// 4D1C20: variable 'v1' is possibly undefined + +//----- (004D1C30) -------------------------------------------------------- +void __fastcall std::__codecvt_utf16_base::~__codecvt_utf16_base(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &unk_51B310; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4D1C3C: variable 'Blocka' is possibly undefined + +//----- (004D1C50) -------------------------------------------------------- +void __cdecl std::__codecvt_utf16_base::~__codecvt_utf16_base(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &unk_51B310; + std::locale::facet::~facet(a1); +} +// 4D1C50: variable 'v1' is possibly undefined + +//----- (004D1C60) -------------------------------------------------------- +void __fastcall std::__codecvt_utf16_base::~__codecvt_utf16_base(_DWORD *Block) +{ + *Block = &off_51B1CC; + std::codecvt::~codecvt(Block); + operator delete(Block); +} +// 51B1CC: using guessed type int (*off_51B1CC)(); + +//----- (004D1C80) -------------------------------------------------------- +void __fastcall std::__codecvt_utf16_base::~__codecvt_utf16_base(_DWORD *a1) +{ + *a1 = &off_51B1CC; + std::codecvt::~codecvt(a1); +} +// 51B1CC: using guessed type int (*off_51B1CC)(); + +//----- (004D1C90) -------------------------------------------------------- +void __fastcall std::bad_array_new_length::~bad_array_new_length(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51B1F8; + std::bad_alloc::~bad_alloc(Block); + operator delete(a1); +} +// 4D1C9C: variable 'Block' is possibly undefined +// 51B1F8: using guessed type void (__cdecl *off_51B1F8)(std::bad_array_new_length *__hidden this); + +//----- (004D1CC0) -------------------------------------------------------- +void __cdecl std::bad_array_new_length::~bad_array_new_length(std::exception *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B1F8; + std::bad_alloc::~bad_alloc(a1); +} +// 4D1CC0: variable 'v1' is possibly undefined +// 51B1F8: using guessed type void (__cdecl *off_51B1F8)(std::bad_array_new_length *__hidden this); + +//----- (004D1CD0) -------------------------------------------------------- +void __fastcall std::__codecvt_utf8_utf16_base::~__codecvt_utf8_utf16_base(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &unk_51B2B8; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4D1CDC: variable 'Blocka' is possibly undefined + +//----- (004D1CF0) -------------------------------------------------------- +void __cdecl std::__codecvt_utf8_utf16_base::~__codecvt_utf8_utf16_base(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &unk_51B2B8; + std::locale::facet::~facet(a1); +} +// 4D1CF0: variable 'v1' is possibly undefined + +//----- (004D1D00) -------------------------------------------------------- +void __fastcall std::__codecvt_utf8_utf16_base::~__codecvt_utf8_utf16_base(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &unk_51B310; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4D1D0C: variable 'Blocka' is possibly undefined + +//----- (004D1D20) -------------------------------------------------------- +void __cdecl std::__codecvt_utf8_utf16_base::~__codecvt_utf8_utf16_base(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &unk_51B310; + std::locale::facet::~facet(a1); +} +// 4D1D20: variable 'v1' is possibly undefined + +//----- (004D1D30) -------------------------------------------------------- +void __fastcall std::__codecvt_utf8_utf16_base::~__codecvt_utf8_utf16_base(_DWORD *Block) +{ + *Block = &off_51B3EC; + std::codecvt::~codecvt(Block); + operator delete(Block); +} +// 51B3EC: using guessed type int (*off_51B3EC)(); + +//----- (004D1D50) -------------------------------------------------------- +void __fastcall std::__codecvt_utf8_utf16_base::~__codecvt_utf8_utf16_base(_DWORD *a1) +{ + *a1 = &off_51B3EC; + std::codecvt::~codecvt(a1); +} +// 51B3EC: using guessed type int (*off_51B3EC)(); + +//----- (004D1D60) -------------------------------------------------------- +void __fastcall std::_V2::error_category::~error_category(void *Block) +{ + operator delete(Block); +} + +//----- (004D1D80) -------------------------------------------------------- +void (__cdecl ***std::_V2::system_category())(_anonymous_namespace_::system_error_category *__hidden this) +{ + return `anonymous namespace'::system_category_instance; +} +// 50BFC4: using guessed type void (__cdecl **`anonymous namespace'::system_category_instance[2])(_anonymous_namespace_::system_error_category *__hidden this); + +//----- (004D1D90) -------------------------------------------------------- +void (__cdecl ***std::_V2::generic_category())(_anonymous_namespace_::generic_error_category *__hidden this) +{ + return &`anonymous namespace'::generic_category_instance; +} +// 50BFC8: using guessed type void (__cdecl **`anonymous namespace'::generic_category_instance)(_anonymous_namespace_::generic_error_category *__hidden this); + +//----- (004D1DA0) -------------------------------------------------------- +char *__thiscall std::map>::operator[]( + _DWORD *this, + int a2) +{ + bool v2; // zf + struct _Unwind_Exception *v3; // eax + struct _Unwind_Exception *v4; // edx + _DWORD *v5; // edx + struct _Unwind_Exception *v7; // [esp+1Ch] [ebp-4Ch] + struct _Unwind_Exception *Block; // [esp+24h] [ebp-44h] + _DWORD *Blocka; // [esp+24h] [ebp-44h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-40h] + + v7 = (struct _Unwind_Exception *)(this + 1); + Block = (struct _Unwind_Exception *)this[2]; + lpuexcpt = (struct _Unwind_Exception *)(this + 1); + while ( Block ) + { + v2 = (unsigned __int8)std::operator<((int)Block + 16, a2) == 0; + v3 = lpuexcpt; + v4 = (struct _Unwind_Exception *)*((_DWORD *)Block + 3); + if ( v2 ) + { + v4 = (struct _Unwind_Exception *)*((_DWORD *)Block + 2); + if ( v2 ) + v3 = Block; + } + Block = v4; + lpuexcpt = v3; + } + if ( v7 == lpuexcpt || (unsigned __int8)std::operator<(a2, (int)lpuexcpt + 16) ) + { + Blocka = operator new(0x30u); + std::string::basic_string((char *)Blocka + 16, a2); + Blocka[10] = 0; + Blocka[11] = 0; + lpuexcpt = (struct _Unwind_Exception *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_hint_unique_pos( + this, + lpuexcpt, + (int)(Blocka + 4)); + if ( v5 ) + { + lpuexcpt = (struct _Unwind_Exception *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_insert_node( + this, + (int)lpuexcpt, + v5, + Blocka); + } + else + { + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)Blocka + 11); + std::string::_M_dispose((void **)Blocka + 4); + operator delete(Blocka); + } + } + return (char *)lpuexcpt + 40; +} +// 4D1E9F: variable 'v5' is possibly undefined + +//----- (004D1F50) -------------------------------------------------------- +char *__thiscall std::map::operator[](_DWORD *this, int a2) +{ + bool v2; // zf + struct _Unwind_Exception *v3; // eax + struct _Unwind_Exception *v4; // edx + _DWORD *v5; // edx + struct _Unwind_Exception *v7; // [esp+1Ch] [ebp-4Ch] + struct _Unwind_Exception *Block; // [esp+24h] [ebp-44h] + char *Blocka; // [esp+24h] [ebp-44h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-40h] + + v7 = (struct _Unwind_Exception *)(this + 1); + Block = (struct _Unwind_Exception *)this[2]; + lpuexcpt = (struct _Unwind_Exception *)(this + 1); + while ( Block ) + { + v2 = (unsigned __int8)std::operator<((int)Block + 16, a2) == 0; + v3 = lpuexcpt; + v4 = (struct _Unwind_Exception *)*((_DWORD *)Block + 3); + if ( v2 ) + { + v4 = (struct _Unwind_Exception *)*((_DWORD *)Block + 2); + if ( v2 ) + v3 = Block; + } + Block = v4; + lpuexcpt = v3; + } + if ( v7 == lpuexcpt || (unsigned __int8)std::operator<(a2, (int)lpuexcpt + 16) ) + { + Blocka = (char *)operator new(0x40u); + std::string::basic_string(Blocka + 16, a2); + *((_DWORD *)Blocka + 11) = 0; + Blocka[48] = 0; + *((_DWORD *)Blocka + 10) = Blocka + 48; + lpuexcpt = (struct _Unwind_Exception *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos( + this, + lpuexcpt, + (int)(Blocka + 16)); + if ( v5 ) + { + lpuexcpt = (struct _Unwind_Exception *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_insert_node( + this, + (int)lpuexcpt, + v5, + Blocka); + } + else + { + std::string::_M_dispose((void **)Blocka + 10); + std::string::_M_dispose((void **)Blocka + 4); + operator delete(Blocka); + } + } + return (char *)lpuexcpt + 40; +} +// 4D205E: variable 'v5' is possibly undefined + +//----- (004D210C) -------------------------------------------------------- +char *__thiscall std::map>::operator[](_DWORD *this, _DWORD *a2) +{ + _DWORD *v3; // ebx + _DWORD *v4; // edx + char v5; // al + _DWORD *v6; // ecx + _DWORD *insert_hint_unique_pos; // eax + _DWORD *v8; // edx + _DWORD *v9; // edi + char v10; // al + _DWORD *v12; // [esp+18h] [ebp-20h] + _DWORD *v13; // [esp+18h] [ebp-20h] + _DWORD *v14; // [esp+1Ch] [ebp-1Ch] + _DWORD *v15; // [esp+1Ch] [ebp-1Ch] + + v3 = this + 1; + v4 = (_DWORD *)this[2]; + v14 = this + 1; + while ( v4 ) + { + v12 = v4; + v5 = std::operator<((int)(v4 + 4), (int)a2); + v6 = (_DWORD *)v12[3]; + if ( !v5 ) + v6 = (_DWORD *)v12[2]; + if ( !v5 ) + v3 = v12; + v4 = v6; + } + if ( v14 == v3 || (unsigned __int8)std::operator<((int)a2, (int)(v3 + 4)) ) + { + v13 = v3; + v3 = operator new(0x34u); + std::string::basic_string(v3 + 4, a2); + v3[10] = 0; + v3[11] = 0; + v3[12] = 0; + insert_hint_unique_pos = std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_hint_unique_pos( + this, + v13, + (int)(v3 + 4)); + v9 = v8; + if ( v8 ) + { + v10 = v14 == v8 || insert_hint_unique_pos != 0; + if ( !v10 ) + v10 = std::operator<((int)(v3 + 4), (int)(v8 + 4)); + std::_Rb_tree_insert_and_rebalance(v10, v3, v9, v14); + ++this[5]; + } + else + { + v15 = insert_hint_unique_pos; + std::vector::~vector((void ***)v3 + 10); + std::string::_M_dispose((void **)v3 + 4); + operator delete(v3); + v3 = v15; + } + } + return (char *)(v3 + 10); +} +// 4D21B5: variable 'v8' is possibly undefined + +//----- (004D222C) -------------------------------------------------------- +char *__thiscall std::map>::operator[](_DWORD *this, int a2) +{ + bool v2; // zf + struct _Unwind_Exception *v3; // eax + struct _Unwind_Exception *v4; // edx + _DWORD *v5; // edx + char v6; // al + _DWORD *insert_hint_unique_pos; // [esp+14h] [ebp-54h] + _DWORD *v9; // [esp+18h] [ebp-50h] + _DWORD *v10; // [esp+18h] [ebp-50h] + _DWORD *v12; // [esp+20h] [ebp-48h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-44h] + void **lpuexcpta; // [esp+24h] [ebp-44h] + _DWORD *Block; // [esp+28h] [ebp-40h] + + v12 = this + 1; + lpuexcpt = (struct _Unwind_Exception *)this[2]; + Block = this + 1; + while ( lpuexcpt ) + { + v2 = (unsigned __int8)std::operator<((int)lpuexcpt + 16, a2) == 0; + v3 = (struct _Unwind_Exception *)Block; + v4 = (struct _Unwind_Exception *)*((_DWORD *)lpuexcpt + 3); + if ( v2 ) + { + v4 = (struct _Unwind_Exception *)*((_DWORD *)lpuexcpt + 2); + if ( v2 ) + v3 = lpuexcpt; + } + lpuexcpt = v4; + Block = v3; + } + if ( v12 == Block || (unsigned __int8)std::operator<(a2, (int)(Block + 4)) ) + { + v9 = Block; + Block = operator new(0x34u); + lpuexcpta = (void **)(Block + 4); + std::string::basic_string((char *)Block + 16, a2); + Block[10] = 0; + Block[11] = 0; + Block[12] = 0; + insert_hint_unique_pos = std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_hint_unique_pos( + this, + v9, + (int)(Block + 4)); + v10 = v5; + if ( v5 ) + { + v6 = insert_hint_unique_pos != 0 || v12 == v5; + if ( !v6 ) + v6 = std::operator<((int)lpuexcpta, (int)(v5 + 4)); + std::_Rb_tree_insert_and_rebalance(v6, Block, v10, v12); + ++this[5]; + } + else + { + std::vector::~vector((void ***)Block + 10); + std::string::_M_dispose(lpuexcpta); + operator delete(Block); + Block = insert_hint_unique_pos; + } + } + return (char *)(Block + 10); +} +// 4D2335: variable 'v5' is possibly undefined + +//----- (004D2424) -------------------------------------------------------- +void **__thiscall std::map::operator[](void **this, int a2) +{ + bool v2; // zf + void **v3; // eax + struct _Unwind_Exception *v4; // edx + void **v5; // edx + char v6; // al + void **insert_hint_unique_pos; // [esp+14h] [ebp-54h] + void **v9; // [esp+18h] [ebp-50h] + void **v10; // [esp+18h] [ebp-50h] + void **v12; // [esp+20h] [ebp-48h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-44h] + void **lpuexcpta; // [esp+24h] [ebp-44h] + void **Block; // [esp+28h] [ebp-40h] + + v12 = this + 1; + lpuexcpt = (struct _Unwind_Exception *)this[2]; + Block = this + 1; + while ( lpuexcpt ) + { + v2 = (unsigned __int8)std::operator<((int)lpuexcpt + 16, a2) == 0; + v3 = Block; + v4 = (struct _Unwind_Exception *)*((_DWORD *)lpuexcpt + 3); + if ( v2 ) + { + v4 = (struct _Unwind_Exception *)*((_DWORD *)lpuexcpt + 2); + if ( v2 ) + v3 = (void **)lpuexcpt; + } + lpuexcpt = v4; + Block = v3; + } + if ( v12 == Block || (unsigned __int8)std::operator<(a2, (int)(Block + 4)) ) + { + v9 = Block; + Block = (void **)operator new(0x2Cu); + lpuexcpta = Block + 4; + std::string::basic_string((char *)Block + 16, a2); + Block[10] = 0; + insert_hint_unique_pos = (void **)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos( + this, + v9, + (int)(Block + 4)); + v10 = v5; + if ( v5 ) + { + v6 = insert_hint_unique_pos != 0 || v12 == v5; + if ( !v6 ) + v6 = std::operator<((int)lpuexcpta, (int)(v5 + 4)); + std::_Rb_tree_insert_and_rebalance(v6, Block, v10, v12); + this[5] = (char *)this[5] + 1; + } + else + { + std::string::_M_dispose(lpuexcpta); + operator delete(Block); + Block = insert_hint_unique_pos; + } + } + return Block + 10; +} +// 4D251F: variable 'v5' is possibly undefined + +//----- (004D2604) -------------------------------------------------------- +void **__thiscall std::map::operator[](void **this, int a2) +{ + bool v2; // zf + void **v3; // eax + struct _Unwind_Exception *v4; // edx + void **v5; // edx + char v6; // al + void **insert_hint_unique_pos; // [esp+14h] [ebp-54h] + void **v9; // [esp+18h] [ebp-50h] + void **v10; // [esp+18h] [ebp-50h] + void **v12; // [esp+20h] [ebp-48h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-44h] + void **lpuexcpta; // [esp+24h] [ebp-44h] + void **Block; // [esp+28h] [ebp-40h] + + v12 = this + 1; + lpuexcpt = (struct _Unwind_Exception *)this[2]; + Block = this + 1; + while ( lpuexcpt ) + { + v2 = (unsigned __int8)std::operator<((int)lpuexcpt + 16, a2) == 0; + v3 = Block; + v4 = (struct _Unwind_Exception *)*((_DWORD *)lpuexcpt + 3); + if ( v2 ) + { + v4 = (struct _Unwind_Exception *)*((_DWORD *)lpuexcpt + 2); + if ( v2 ) + v3 = (void **)lpuexcpt; + } + lpuexcpt = v4; + Block = v3; + } + if ( v12 == Block || (unsigned __int8)std::operator<(a2, (int)(Block + 4)) ) + { + v9 = Block; + Block = (void **)operator new(0x2Cu); + lpuexcpta = Block + 4; + std::string::basic_string((char *)Block + 16, a2); + Block[10] = 0; + insert_hint_unique_pos = (void **)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos( + this, + v9, + (int)(Block + 4)); + v10 = v5; + if ( v5 ) + { + v6 = insert_hint_unique_pos != 0 || v12 == v5; + if ( !v6 ) + v6 = std::operator<((int)lpuexcpta, (int)(v5 + 4)); + std::_Rb_tree_insert_and_rebalance(v6, Block, v10, v12); + this[5] = (char *)this[5] + 1; + } + else + { + std::string::_M_dispose(lpuexcpta); + operator delete(Block); + Block = insert_hint_unique_pos; + } + } + return Block + 10; +} +// 4D26FF: variable 'v5' is possibly undefined + +//----- (004D27E4) -------------------------------------------------------- +_DWORD *__thiscall std::map>>::operator[]( + _DWORD *this, + _DWORD *a2) +{ + _DWORD *v3; // edi + _DWORD *v4; // ebx + _DWORD *i; // eax + _DWORD *v6; // edx + int *v7; // eax + _DWORD *v8; // edx + bool v9; // al + _DWORD *v11; // [esp+1Ch] [ebp-1Ch] + _DWORD *insert_hint_unique_pos; // [esp+1Ch] [ebp-1Ch] + + v3 = this + 1; + v4 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v6 ) + { + v6 = (_DWORD *)i[3]; + if ( i[4] >= *a2 ) + v6 = (_DWORD *)i[2]; + if ( i[4] >= *a2 ) + v4 = i; + } + if ( v3 == v4 || *a2 < v4[4] ) + { + v11 = v4; + v4 = operator new(0x2Cu); + v4[4] = *a2; + std::_Rb_tree_header::_Rb_tree_header(v4 + 6); + insert_hint_unique_pos = std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_get_insert_hint_unique_pos( + this, + v11, + v7); + if ( v8 ) + { + v9 = insert_hint_unique_pos != 0 || v3 == v8; + if ( !v9 ) + v9 = v4[4] < v8[4]; + std::_Rb_tree_insert_and_rebalance(v9, v4, v8, v3); + ++this[5]; + } + else + { + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree((int)(v4 + 5)); + operator delete(v4); + v4 = insert_hint_unique_pos; + } + } + return v4 + 5; +} +// 4D285F: variable 'v7' is possibly undefined +// 4D286B: variable 'v8' is possibly undefined + +//----- (004D28C4) -------------------------------------------------------- +void __thiscall std::pair>::pair(_DWORD *this, _DWORD *a2) +{ + std::string::basic_string(this, a2); + std::__shared_ptr::__shared_ptr(this + 6, a2 + 6); +} + +//----- (004D28F0) -------------------------------------------------------- +void __thiscall std::pair>::pair,true>( + _DWORD *this, + int a2) +{ + int v3; // [esp+1Fh] [ebp-9h] BYREF + + std::string::basic_string(this, *(char **)a2, (int)&v3); + std::__shared_ptr::__shared_ptr(this + 6, (_DWORD *)(a2 + 4)); +} + +//----- (004D2924) -------------------------------------------------------- +void __fastcall std::pair>::~pair(int a1) +{ + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a1 + 28)); + std::string::_M_dispose((void **)a1); +} + +//----- (004D2940) -------------------------------------------------------- +void __fastcall std::pair::~pair(void **a1) +{ + std::string::_M_dispose(a1 + 6); + std::string::_M_dispose(a1); +} + +//----- (004D2960) -------------------------------------------------------- +int __cdecl std::__pad>::_S_pad(_DWORD *a1, void *Src, char *a3, char *a4, int a5, int a6) +{ + char *v6; // edi + size_t Size; // ebx + int result; // eax + size_t v9; // ebp + char *v10; // esi + _BYTE *v11; // eax + _BYTE *v12; // ecx + char v13; // al + char v14; // dl + int (__stdcall *v15)(unsigned __int8); // edx + int (__stdcall *v16)(unsigned __int8); // edx + char v17; // dl + int (__stdcall *v18)(unsigned __int8); // eax + char v19; // dl + int (__stdcall *v20)(unsigned __int8); // eax + int (__stdcall *v21)(unsigned __int8); // eax + char *v22; // [esp+14h] [ebp-28h] + _BYTE *v23; // [esp+1Ch] [ebp-20h] + _BYTE *v24; // [esp+1Ch] [ebp-20h] + _BYTE *v25; // [esp+1Ch] [ebp-20h] + _BYTE *v26; // [esp+1Ch] [ebp-20h] + _BYTE *v27; // [esp+1Ch] [ebp-20h] + + v6 = a3; + v22 = a4; + Size = a5 - a6; + result = a1[3] & 0xB0; + if ( result == 32 ) + { + if ( a6 ) + { + result = (int)memcpy(a3, a4, a6); + if ( !Size ) + return result; + } + else if ( !Size ) + { + return result; + } + return (int)memset(&a3[a6], (char)Src, Size); + } + v9 = a6; + if ( result != 16 ) + goto LABEL_3; + v11 = std::use_facet>((int)(a1 + 27)); + v12 = v11; + if ( v11[28] ) + { + result = (unsigned __int8)*a4; + if ( v12[74] == (_BYTE)result ) + goto LABEL_29; + goto LABEL_8; + } + v23 = v11; + std::ctype::_M_widen_init((int)v11); + v12 = v23; + v15 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v23 + 24); + result = 45; + if ( v15 != std::ctype::do_widen ) + { + result = v15(45u); + v12 = v23; + } + if ( *a4 == (_BYTE)result ) + goto LABEL_29; + if ( v12[28] ) + { + result = (unsigned __int8)*a4; +LABEL_8: + if ( v12[72] != (_BYTE)result ) + { +LABEL_9: + if ( v12[77] == (_BYTE)result && a6 > 1 ) + { +LABEL_11: + v13 = a4[1]; + if ( v13 == v12[149] ) + { +LABEL_43: + v6 = a3 + 2; + v9 = a6 - 2; + *a3 = *a4; + result = (unsigned __int8)a4[1]; + v22 = a4 + 2; + a3[1] = result; + goto LABEL_3; + } + goto LABEL_12; + } +LABEL_3: + v10 = &v6[Size]; + if ( !Size ) + { + if ( !v9 ) + return result; + return (int)memcpy(v10, v22, v9); + } + goto LABEL_15; + } +LABEL_29: + *a3 = result; + v9 = a6 - 1; + v6 = a3 + 1; + v22 = a4 + 1; + goto LABEL_3; + } + v24 = v12; + std::ctype::_M_widen_init((int)v12); + v12 = v24; + v16 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v24 + 24); + result = 43; + if ( v16 != std::ctype::do_widen ) + { + result = v16(43u); + v12 = v24; + } + if ( *a4 == (_BYTE)result ) + goto LABEL_29; + if ( v12[28] ) + { + result = (unsigned __int8)*a4; + goto LABEL_9; + } + v25 = v12; + std::ctype::_M_widen_init((int)v12); + v12 = v25; + v17 = 48; + v18 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v25 + 24); + if ( v18 != std::ctype::do_widen ) + { + v17 = v18(48u); + v12 = v25; + } + result = (int)a4; + if ( *a4 != v17 || a6 <= 1 ) + goto LABEL_3; + if ( v12[28] ) + goto LABEL_11; + v26 = v12; + std::ctype::_M_widen_init((int)v12); + v12 = v26; + v19 = 120; + v20 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v26 + 24); + if ( v20 != std::ctype::do_widen ) + { + v19 = v20(120u); + v12 = v26; + } + v13 = a4[1]; + if ( v13 == v19 ) + goto LABEL_43; + if ( v12[28] ) + { +LABEL_12: + v14 = v12[117]; + goto LABEL_13; + } + v27 = v12; + std::ctype::_M_widen_init((int)v12); + v21 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v27 + 24); + if ( v21 == std::ctype::do_widen ) + v14 = 88; + else + v14 = v21(88u); + v13 = a4[1]; +LABEL_13: + if ( v14 == v13 ) + goto LABEL_43; + v10 = &a3[Size]; + if ( !Size ) + return (int)memcpy(v10, v22, v9); +LABEL_15: + result = (int)memset(v6, (char)Src, Size); + if ( v9 ) + return (int)memcpy(v10, v22, v9); + return result; +} + +//----- (004D2CA0) -------------------------------------------------------- +_WORD *__cdecl std::__pad>::_S_pad( + _DWORD *a1, + void *Src, + _WORD *Size, + _WORD *a4, + int a5, + int a6) +{ + _WORD *v6; // esi + int v7; // ebx + _WORD *result; // eax + int v9; // edx + __int16 v10; // ax + __int16 v11; // ax + __int16 v12; // ax + _WORD *v13; // esi + _WORD *v14; // [esp+20h] [ebp-2Ch] + void *v15; // [esp+28h] [ebp-24h] + + v14 = a4; + v6 = Size; + v7 = a5 - a6; + result = (_WORD *)(a1[3] & 0xB0); + if ( result != (_WORD *)32 ) + { + v9 = a6; + if ( result == (_WORD *)16 ) + { + v15 = std::use_facet>((int)(a1 + 27)); + v10 = (*(int (__stdcall **)(int))(*(_DWORD *)v15 + 40))(45); + if ( *a4 == v10 || (v10 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v15 + 40))(v15, 43), *a4 == v10) ) + { + *Size = v10; + v9 = a6 - 1; + v6 = Size + 1; + v14 = a4 + 1; + } + else + { + v11 = (*(int (__stdcall **)(int))(*(_DWORD *)v15 + 40))(48); + v9 = a6; + if ( *a4 == v11 && a6 > 1 ) + { + if ( a4[1] != (*(unsigned __int16 (__stdcall **)(int))(*(_DWORD *)v15 + 40))(120) ) + { + v12 = (*(int (__thiscall **)(void *, int))(*(_DWORD *)v15 + 40))(v15, 88); + v9 = a6; + if ( a4[1] != v12 ) + { + result = &Size[v7]; + if ( !v7 ) + return memcpy(result, v14, 2 * v9); + do + { +LABEL_4: + *v6++ = (_WORD)Src; + --v7; + } + while ( v7 ); +LABEL_5: + if ( !v9 ) + return result; + return memcpy(result, v14, 2 * v9); + } + } + v6 = Size + 2; + v9 = a6 - 2; + *Size = *a4; + v14 = a4 + 2; + Size[1] = a4[1]; + } + } + } + result = &v6[v7]; + if ( !v7 ) + goto LABEL_5; + goto LABEL_4; + } + if ( a6 ) + { + result = memcpy(Size, a4, 2 * a6); + v13 = &Size[a6]; + if ( !v7 ) + return result; + } + else + { + v13 = &Size[a6]; + if ( !v7 ) + return result; + } + do + { + *v13++ = (_WORD)Src; + --v7; + } + while ( v7 ); + return result; +} + +//----- (004D2ED0) -------------------------------------------------------- +void **std::ctype::classic_table() +{ + return &std::ctype::classic_table(void)::_S_classic_table; +} +// 51B880: using guessed type void *std::ctype::classic_table(void)::_S_classic_table; + +//----- (004D2EE0) -------------------------------------------------------- +int __thiscall std::ctype::ctype(_DWORD *this, void **a2, char a3, int a4) +{ + void **v4; // eax + int result; // eax + + v4 = a2; + *this = &off_51B418; + this[4] = 0; + this[5] = 0; + this[1] = a4 != 0; + *((_BYTE *)this + 12) = a3 & (a2 != 0); + if ( !a2 ) + v4 = &std::ctype::classic_table(void)::_S_classic_table; + *(_DWORD *)((char *)this + 29) = 0; + *(_DWORD *)((char *)this + 281) = 0; + this[6] = v4; + result = 0; + memset( + (void *)(((unsigned int)this + 33) & 0xFFFFFFFC), + 0, + 4 * (((unsigned int)this - (((unsigned int)this + 33) & 0xFFFFFFFC) + 285) >> 2)); + *((_BYTE *)this + 28) = 0; + *(_DWORD *)((char *)this + 285) = 0; + *(_DWORD *)((char *)this + 537) = 0; + memset( + (void *)(((unsigned int)this + 289) & 0xFFFFFFFC), + 0, + 4 * (((unsigned int)this - (((unsigned int)this + 289) & 0xFFFFFFFC) + 541) >> 2)); + *((_BYTE *)this + 541) = 0; + return result; +} +// 51B418: using guessed type int (*off_51B418)(); +// 51B880: using guessed type void *std::ctype::classic_table(void)::_S_classic_table; + +//----- (004D2F90) -------------------------------------------------------- +int __thiscall std::ctype::ctype(_DWORD *this, int a2, void **a3, char a4, int a5) +{ + void **v5; // eax + int result; // eax + + v5 = a3; + *this = &off_51B418; + this[4] = 0; + this[5] = 0; + this[1] = a5 != 0; + *((_BYTE *)this + 12) = a4 & (a3 != 0); + if ( !a3 ) + v5 = &std::ctype::classic_table(void)::_S_classic_table; + *(_DWORD *)((char *)this + 29) = 0; + *(_DWORD *)((char *)this + 281) = 0; + this[6] = v5; + result = 0; + memset( + (void *)(((unsigned int)this + 33) & 0xFFFFFFFC), + 0, + 4 * (((unsigned int)this - (((unsigned int)this + 33) & 0xFFFFFFFC) + 285) >> 2)); + *((_BYTE *)this + 28) = 0; + *(_DWORD *)((char *)this + 285) = 0; + *(_DWORD *)((char *)this + 537) = 0; + memset( + (void *)(((unsigned int)this + 289) & 0xFFFFFFFC), + 0, + 4 * (((unsigned int)this - (((unsigned int)this + 289) & 0xFFFFFFFC) + 541) >> 2)); + *((_BYTE *)this + 541) = 0; + return result; +} +// 51B418: using guessed type int (*off_51B418)(); +// 51B880: using guessed type void *std::ctype::classic_table(void)::_S_classic_table; + +//----- (004D3040) -------------------------------------------------------- +void __fastcall std::ctype::~ctype(void **Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B418; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + if ( *((_BYTE *)Block + 12) && Block[6] ) + operator delete[](Block[6]); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4D3093: variable 'lpfctx' is possibly undefined +// 51B418: using guessed type int (*off_51B418)(); + +//----- (004D30B0) -------------------------------------------------------- +void __fastcall std::ctype::~ctype(int a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *(_DWORD *)a1 = &off_51B418; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 8)); + if ( *(_BYTE *)(a1 + 12) && *(_DWORD *)(a1 + 24) ) + operator delete[](*(void **)(a1 + 24)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4D3103: variable 'lpfctx' is possibly undefined +// 51B418: using guessed type int (*off_51B418)(); + +//----- (004D3120) -------------------------------------------------------- +int __fastcall std::ctype::_M_initialize_ctype(int a1) +{ + int WCh; // ebx + int v3; // eax + int i; // ebx + int j; // ebx + int result; // eax + + for ( WCh = 0; WCh != 128; ++WCh ) + { + v3 = wctob(WCh); + if ( v3 == -1 ) + { + *(_BYTE *)(a1 + 12) = 0; + goto LABEL_5; + } + *(_BYTE *)(a1 + WCh + 13) = v3; + } + *(_BYTE *)(a1 + 12) = 1; +LABEL_5: + for ( i = 0; i != 256; ++i ) + *(_WORD *)(a1 + 2 * i + 142) = btowc(i); + for ( j = 0; j != 16; ++j ) + { + *(_WORD *)(a1 + 2 * j + 654) = 1 << j; + result = std::ctype::_M_convert_to_wmask(1 << j); + *(_WORD *)(a1 + 2 * j + 686) = result; + } + return result; +} + +//----- (004D31C0) -------------------------------------------------------- +int __thiscall std::ctype::ctype(_DWORD *this, char a2, int a3) +{ + int v4; // eax + + *this = &off_51B448; + this[1] = a3 != 0; + v4 = std::locale::facet::_S_clone_c_locale(); + *((_BYTE *)this + 12) = 0; + this[2] = v4; + return std::ctype::_M_initialize_ctype((int)this); +} +// 51B448: using guessed type int (*off_51B448)(); + +//----- (004D3200) -------------------------------------------------------- +void __thiscall std::ctype::ctype(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B448; + this[2] = std::locale::facet::_S_get_c_locale(); + *((_BYTE *)this + 12) = 0; + std::ctype::_M_initialize_ctype((int)this); +} +// 51B448: using guessed type int (*off_51B448)(); + +//----- (004D32B0) -------------------------------------------------------- +void __fastcall std::ctype::~ctype(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B448; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + *Block = &unk_51B24C; + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4D32F4: variable 'lpfctx' is possibly undefined +// 51B448: using guessed type int (*off_51B448)(); + +//----- (004D3310) -------------------------------------------------------- +void __fastcall std::ctype::~ctype(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B448; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + *a1 = &unk_51B24C; + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4D3354: variable 'lpfctx' is possibly undefined +// 51B448: using guessed type int (*off_51B448)(); + +//----- (004D3370) -------------------------------------------------------- +int __fastcall std::deque>::back(_DWORD *a1) +{ + int v1; // eax + + v1 = a1[6]; + if ( v1 == a1[7] ) + v1 = *(_DWORD *)(a1[9] - 4) + 512; + return v1 - 8; +} + +//----- (004D3388) -------------------------------------------------------- +int __fastcall std::deque>::pop_back(_DWORD *a1) +{ + char *v2; // ecx + int v4; // eax + int v5; // ecx + + v2 = (char *)a1[6]; + if ( v2 == (char *)a1[7] ) + { + operator delete(v2); + v4 = a1[9]; + v5 = *(_DWORD *)(v4 - 4); + a1[9] = v4 - 4; + a1[7] = v5; + a1[8] = v5 + 512; + a1[6] = v5 + 504; + return std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(v5 + 508)); + } + else + { + a1[6] = v2 - 8; + return std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)v2 - 1); + } +} + +//----- (004D33E0) -------------------------------------------------------- +void __thiscall std::deque>::push_back(int this, int *a2) +{ + int v3; // eax + int v4; // edi + char *v5; // ecx + int v6; // edi + unsigned int v7; // eax + int v8; // edi + char *v9; // edi + char *v10; // eax + int v11; // ecx + unsigned int v12; // esi + int v13; // ecx + int v14; // eax + int v15; // eax + int v16; // eax + int v17; // esi + int *v18; // edx + int v19; // eax + int v20; // [esp+18h] [ebp-20h] + int v21; // [esp+1Ch] [ebp-1Ch] + char *v22; // [esp+1Ch] [ebp-1Ch] + + v3 = *(_DWORD *)(this + 24); + if ( v3 == *(_DWORD *)(this + 32) - 8 ) + { + v4 = *(_DWORD *)(this + 36); + v5 = *(char **)(this + 20); + v21 = v4; + v20 = v4 - (_DWORD)v5; + v6 = (v4 - (int)v5) >> 2; + if ( ((*(_DWORD *)(this + 16) - *(_DWORD *)(this + 8)) >> 3) + + ((v3 - *(_DWORD *)(this + 28)) >> 3) + + ((v6 - 1) << 6) == 0xFFFFFFF ) + std::__throw_length_error((std::length_error *)"cannot create std::deque larger than max_size()"); + v7 = *(_DWORD *)(this + 4); + if ( v7 - ((v21 - *(_DWORD *)this) >> 2) <= 1 ) + { + v8 = v6 + 2; + if ( v7 <= 2 * v8 ) + { + v11 = 1; + if ( v7 ) + v11 = *(_DWORD *)(this + 4); + v12 = v7 + v11 + 2; + if ( v12 > 0x1FFFFFFF ) + std::__throw_bad_alloc(); + v22 = (char *)operator new(4 * v12); + v9 = &v22[4 * ((v12 - v8) >> 1)]; + v13 = *(_DWORD *)(this + 20); + v14 = *(_DWORD *)(this + 36) + 4; + if ( v14 != v13 ) + memmove(v9, *(const void **)(this + 20), v14 - v13); + operator delete(*(void **)this); + *(_DWORD *)(this + 4) = v12; + *(_DWORD *)this = v22; + } + else + { + v9 = (char *)(*(_DWORD *)this + 4 * ((v7 - v8) >> 1)); + v10 = (char *)(v21 + 4); + if ( v5 <= v9 ) + { + if ( v5 != v10 ) + memmove(&v9[v20 - (v21 - (_DWORD)v5)], v5, v21 + 4 - (_DWORD)v5); + } + else if ( v5 != v10 ) + { + memmove(v9, v5, v21 + 4 - (_DWORD)v5); + } + } + v15 = *(_DWORD *)v9; + *(_DWORD *)(this + 20) = v9; + *(_DWORD *)(this + 12) = v15; + *(_DWORD *)(this + 16) = v15 + 512; + v16 = *(_DWORD *)&v9[v20]; + *(_DWORD *)(this + 36) = &v9[v20]; + *(_DWORD *)(this + 28) = v16; + *(_DWORD *)(this + 32) = v16 + 512; + } + v17 = *(_DWORD *)(this + 36); + *(_DWORD *)(v17 + 4) = operator new(0x200u); + std::__shared_ptr::__shared_ptr( + *(int **)(this + 24), + a2); + v18 = (int *)(*(_DWORD *)(this + 36) + 4); + v19 = *v18; + *(_DWORD *)(this + 36) = v18; + *(_DWORD *)(this + 28) = v19; + *(_DWORD *)(this + 32) = v19 + 512; + *(_DWORD *)(this + 24) = v19; + } + else + { + std::__shared_ptr::__shared_ptr( + *(int **)(this + 24), + a2); + *(_DWORD *)(this + 24) += 8; + } +} + +//----- (004D35A0) -------------------------------------------------------- +int __fastcall std::deque>::pop_back(_DWORD *a1) +{ + char *v2; // ecx + int v4; // eax + int v5; // ecx + + v2 = (char *)a1[6]; + if ( v2 == (char *)a1[7] ) + { + operator delete(v2); + v4 = a1[9]; + v5 = *(_DWORD *)(v4 - 4); + a1[9] = v4 - 4; + a1[7] = v5; + a1[8] = v5 + 512; + a1[6] = v5 + 504; + return std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(v5 + 508)); + } + else + { + a1[6] = v2 - 8; + return std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)v2 - 1); + } +} + +//----- (004D35F8) -------------------------------------------------------- +void __thiscall std::deque>::push_back(int this, int *a2) +{ + _DWORD *v3; // eax + char *v4; // ecx + int v5; // esi + unsigned int v6; // eax + int v7; // ebx + char *v8; // ebx + char *v9; // eax + int v10; // ecx + unsigned int v11; // esi + char *v12; // eax + const void *v13; // ecx + int v14; // eax + int v15; // eax + char *v16; // ebx + int v17; // eax + int v18; // ebx + int *v19; // ecx + int *v20; // ecx + int v21; // eax + int v22; // [esp+18h] [ebp-20h] + int v23; // [esp+1Ch] [ebp-1Ch] + char *v24; // [esp+1Ch] [ebp-1Ch] + + v3 = *(_DWORD **)(this + 24); + if ( v3 == (_DWORD *)(*(_DWORD *)(this + 32) - 8) ) + { + v4 = *(char **)(this + 20); + v23 = *(_DWORD *)(this + 36); + v22 = v23 - (_DWORD)v4; + v5 = (v23 - (int)v4) >> 2; + if ( ((*(_DWORD *)(this + 16) - *(_DWORD *)(this + 8)) >> 3) + + (((int)v3 - *(_DWORD *)(this + 28)) >> 3) + + ((v5 - 1) << 6) == 0xFFFFFFF ) + std::__throw_length_error((std::length_error *)"cannot create std::deque larger than max_size()"); + v6 = *(_DWORD *)(this + 4); + if ( v6 - ((v23 - *(_DWORD *)this) >> 2) <= 1 ) + { + v7 = v5 + 2; + if ( v6 <= 2 * (v5 + 2) ) + { + v10 = 1; + if ( v6 ) + v10 = *(_DWORD *)(this + 4); + v11 = v6 + v10 + 2; + if ( v11 > 0x1FFFFFFF ) + std::__throw_bad_alloc(); + v12 = (char *)operator new(4 * v11); + v13 = *(const void **)(this + 20); + v24 = v12; + v8 = &v12[4 * ((v11 - v7) >> 1)]; + v14 = *(_DWORD *)(this + 36) + 4; + if ( (const void *)v14 != v13 ) + memmove(v8, v13, v14 - (_DWORD)v13); + operator delete(*(void **)this); + *(_DWORD *)(this + 4) = v11; + *(_DWORD *)this = v24; + } + else + { + v8 = (char *)(*(_DWORD *)this + 4 * ((v6 - v7) >> 1)); + v9 = (char *)(v23 + 4); + if ( v4 <= v8 ) + { + if ( v9 != v4 ) + memmove(v8, v4, v23 + 4 - (_DWORD)v4); + } + else if ( v9 != v4 ) + { + memmove(v8, v4, v23 + 4 - (_DWORD)v4); + } + } + v15 = *(_DWORD *)v8; + *(_DWORD *)(this + 20) = v8; + v16 = &v8[v22]; + *(_DWORD *)(this + 12) = v15; + *(_DWORD *)(this + 16) = v15 + 512; + v17 = *(_DWORD *)v16; + *(_DWORD *)(this + 36) = v16; + *(_DWORD *)(this + 28) = v17; + *(_DWORD *)(this + 32) = v17 + 512; + } + v18 = *(_DWORD *)(this + 36); + *(_DWORD *)(v18 + 4) = operator new(0x200u); + v19 = (int *)(*(_DWORD *)(this + 24) + 4); + *(v19 - 1) = *a2; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(v19, a2[1]); + v20 = (int *)(*(_DWORD *)(this + 36) + 4); + v21 = *v20; + *(_DWORD *)(this + 36) = v20; + *(_DWORD *)(this + 28) = v21; + *(_DWORD *)(this + 32) = v21 + 512; + *(_DWORD *)(this + 24) = v21; + } + else + { + *v3 = *a2; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(v3 + 1, a2[1]); + *(_DWORD *)(this + 24) += 8; + } +} + +//----- (004D37CC) -------------------------------------------------------- +void __thiscall std::deque::_M_push_back_aux(int this, int a2) +{ + int v2; // edi + struct _Unwind_Exception *v3; // ecx + unsigned int v4; // eax + struct _Unwind_Exception *v5; // eax + int v6; // edx + const void *v7; // edx + int v8; // eax + int v9; // eax + int v10; // eax + int *v11; // edx + int v12; // eax + char *v13; // [esp+18h] [ebp-60h] + int v14; // [esp+1Ch] [ebp-5Ch] + unsigned int v15; // [esp+20h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-54h] + struct _Unwind_Exception *lpuexcpta; // [esp+24h] [ebp-54h] + struct _Unwind_Exception *lpuexcptb; // [esp+24h] [ebp-54h] + + v2 = *(_DWORD *)(this + 36); + v3 = *(struct _Unwind_Exception **)(this + 20); + v14 = *(_DWORD *)(this + 36) - (_DWORD)v3; + if ( -1431655765 * ((*(_DWORD *)(this + 16) - *(_DWORD *)(this + 8)) >> 3) + + 21 * ((v14 >> 2) - 1) + - 1431655765 * ((*(_DWORD *)(this + 24) - *(_DWORD *)(this + 28)) >> 3) == 89478485 ) + std::__throw_length_error((std::length_error *)"cannot create std::deque larger than max_size()"); + v4 = *(_DWORD *)(this + 4); + if ( v4 - ((v2 - *(_DWORD *)this) >> 2) <= 1 ) + { + lpuexcpt = (struct _Unwind_Exception *)((v14 >> 2) + 2); + if ( v4 <= 2 * (int)lpuexcpt ) + { + v6 = 1; + if ( v4 ) + v6 = *(_DWORD *)(this + 4); + v15 = v4 + v6 + 2; + if ( v15 > 0x1FFFFFFF ) + std::__throw_bad_alloc(); + v13 = (char *)operator new(4 * v15); + lpuexcpta = (struct _Unwind_Exception *)&v13[4 * ((v15 - (unsigned int)lpuexcpt) >> 1)]; + v7 = *(const void **)(this + 20); + v8 = *(_DWORD *)(this + 36) + 4; + if ( (const void *)v8 != v7 ) + memmove(lpuexcpta, v7, v8 - (_DWORD)v7); + operator delete(*(void **)this); + *(_DWORD *)this = v13; + *(_DWORD *)(this + 4) = v15; + } + else + { + lpuexcpta = (struct _Unwind_Exception *)(*(_DWORD *)this + 4 * ((v4 - (unsigned int)lpuexcpt) >> 1)); + v5 = (struct _Unwind_Exception *)(v2 + 4); + if ( v3 <= lpuexcpta ) + { + if ( v3 != v5 ) + memmove((char *)lpuexcpta + *(_DWORD *)(this + 36) - v2, v3, v2 + 4 - (_DWORD)v3); + } + else if ( v3 != v5 ) + { + memmove(lpuexcpta, v3, v2 + 4 - (_DWORD)v3); + } + } + *(_DWORD *)(this + 20) = lpuexcpta; + v9 = *(_DWORD *)lpuexcpta; + *(_DWORD *)(this + 12) = *(_DWORD *)lpuexcpta; + *(_DWORD *)(this + 16) = v9 + 504; + *(_DWORD *)(this + 36) = (char *)lpuexcpta + v14; + v10 = *(_DWORD *)((char *)lpuexcpta + v14); + *(_DWORD *)(this + 28) = v10; + *(_DWORD *)(this + 32) = v10 + 504; + } + lpuexcptb = *(struct _Unwind_Exception **)(this + 36); + *((_DWORD *)lpuexcptb + 1) = operator new(0x1F8u); + std::string::basic_string(*(char **)(this + 24), a2); + v11 = (int *)(*(_DWORD *)(this + 36) + 4); + v12 = *v11; + *(_DWORD *)(this + 36) = v11; + *(_DWORD *)(this + 28) = v12; + *(_DWORD *)(this + 24) = v12; + *(_DWORD *)(this + 32) = v12 + 504; +} + +//----- (004D3A70) -------------------------------------------------------- +void __thiscall std::deque::push_back(_DWORD *this, int a2) +{ + int v3; // eax + char *v4; // ecx + + v3 = this[8]; + v4 = (char *)this[6]; + if ( v4 == (char *)(v3 - 24) ) + { + std::deque::_M_push_back_aux((int)this, a2); + } + else + { + std::string::basic_string(v4, a2); + this[6] += 24; + } +} + +//----- (004D3AB0) -------------------------------------------------------- +std::locale *std::locale::_S_initialize() +{ + std::locale *result; // eax + std::locale::_Impl *v1; // [esp+4h] [ebp-18h] + std::locale::_Impl *v2; // [esp+4h] [ebp-18h] + + if ( !_CRT_MT ) + { + result = (std::locale *)std::locale::_S_classic; + if ( std::locale::_S_classic ) + return result; +LABEL_5: + std::locale::_Impl::_Impl(`anonymous namespace'::c_locale_impl, (std::locale::_Impl *)2, (unsigned int)v1); + std::locale::_S_classic = (int)`anonymous namespace'::c_locale_impl; + std::locale::_S_global = (int)`anonymous namespace'::c_locale_impl; + return std::locale::locale( + &`anonymous namespace'::c_locale, + (std::locale *)`anonymous namespace'::c_locale_impl, + v2); + } + __gthr_win32_once((int)&std::locale::_S_once, (void (*)(void))std::locale::_S_initialize_once); + result = (std::locale *)std::locale::_S_classic; + if ( !std::locale::_S_classic ) + goto LABEL_5; + return result; +} +// 4D3AF9: variable 'v1' is possibly undefined +// 4D3B21: variable 'v2' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50B3B4: using guessed type _DWORD `anonymous namespace'::c_locale_impl[5]; +// 50BDC0: using guessed type _DWORD `anonymous namespace'::c_locale; +// 50C5E8: using guessed type int std::locale::_S_classic; +// 50C604: using guessed type int std::locale::_S_global; + +//----- (004D3B30) -------------------------------------------------------- +std::locale *std::locale::_S_initialize_once() +{ + unsigned int v1; // [esp+4h] [ebp-18h] + std::locale::_Impl *v2; // [esp+4h] [ebp-18h] + + std::locale::_Impl::_Impl(`anonymous namespace'::c_locale_impl, (std::locale::_Impl *)2, v1); + std::locale::_S_classic = (int)`anonymous namespace'::c_locale_impl; + std::locale::_S_global = (int)`anonymous namespace'::c_locale_impl; + return std::locale::locale(&`anonymous namespace'::c_locale, (std::locale *)`anonymous namespace'::c_locale_impl, v2); +} +// 4D3B3F: variable 'v1' is possibly undefined +// 4D3B67: variable 'v2' is possibly undefined +// 50B3B4: using guessed type _DWORD `anonymous namespace'::c_locale_impl[5]; +// 50BDC0: using guessed type _DWORD `anonymous namespace'::c_locale; +// 50C5E8: using guessed type int std::locale::_S_classic; +// 50C604: using guessed type int std::locale::_S_global; + +//----- (004D3B80) -------------------------------------------------------- +std::locale *__cdecl std::locale::_S_normalize_category(std::locale *this) +{ + std::locale *result; // eax + + result = this; + if ( this && (((unsigned __int8)this & 0x3F) == 0 || ((unsigned int)this & 0xFFFFFFC0) != 0) ) + { + if ( (unsigned int)this - 1 > 4 ) + std::__throw_runtime_error((std::runtime_error *)"locale::_S_normalize_category category not found"); + return (std::locale *)CSWTCH_112[(_DWORD)this - 1]; + } + return result; +} +// 515304: using guessed type int CSWTCH_112[7]; + +//----- (004D3BC0) -------------------------------------------------------- +void __userpurge std::locale::_Impl::_M_init_extra(int a1@, std::locale::_Impl *this, std::locale::facet **a3) +{ + int v3; // edx + int v4; // eax + int v5; // edx + int v6; // eax + int v7; // ecx + int v8; // edx + int v9; // eax + int v10; // ecx + int v11; // eax + int v12; // edx + int v13; // [esp+1Ch] [ebp-5Ch] + int v14; // [esp+20h] [ebp-58h] + int v15; // [esp+24h] [ebp-54h] + int v16; // [esp+24h] [ebp-54h] + int v17; // [esp+24h] [ebp-54h] + int v18; // [esp+24h] [ebp-54h] + int v19; // [esp+24h] [ebp-54h] + int v20; // [esp+24h] [ebp-54h] + int v21; // [esp+24h] [ebp-54h] + int v22; // [esp+24h] [ebp-54h] + int v23; // [esp+24h] [ebp-54h] + int v24; // [esp+24h] [ebp-54h] + int v25; // [esp+28h] [ebp-50h] + int v26; // [esp+2Ch] [ebp-4Ch] + int v27; // [esp+2Ch] [ebp-4Ch] + int v28; // [esp+2Ch] [ebp-4Ch] + int v29; // [esp+2Ch] [ebp-4Ch] + int v30; // [esp+2Ch] [ebp-4Ch] + int v31; // [esp+2Ch] [ebp-4Ch] + int v32; // [esp+2Ch] [ebp-4Ch] + int v33; // [esp+2Ch] [ebp-4Ch] + int v34; // [esp+2Ch] [ebp-4Ch] + int v35; // [esp+30h] [ebp-48h] + int v36; // [esp+34h] [ebp-44h] + int v37; // [esp+34h] [ebp-44h] + int v38; // [esp+34h] [ebp-44h] + int v39; // [esp+34h] [ebp-44h] + struct _Unwind_Exception *lpuexcpta; // [esp+38h] [ebp-40h] + + v3 = *((_DWORD *)this + 1); + v4 = *(_DWORD *)this; + dword_50C4C8 = 1; + std::`anonymous namespace'::numpunct_c = (int)&off_51B6FC; + v36 = v3; + v14 = v4; + v5 = *((_DWORD *)this + 2); + dword_50C4CC = v4; + v35 = v5; + std::numpunct::_M_initialize_numpunct(&std::`anonymous namespace'::numpunct_c, 0); + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C4C8, 1u); + else + ++dword_50C4C8; + v26 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v26 + 4 * std::locale::id::_M_id(&std::numpunct::id)) = &std::`anonymous namespace'::numpunct_c; + dword_50C540 = 1; + std::`anonymous namespace'::collate_c = (int)&off_51B590; + dword_50C544 = std::locale::facet::_S_get_c_locale(); + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C540, 1u); + else + ++dword_50C540; + v27 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v27 + 4 * std::locale::id::_M_id(&std::collate::id)) = &std::`anonymous namespace'::collate_c; + dword_50C510 = 1; + std::`anonymous namespace'::moneypunct_cf = (int)&off_51A850; + dword_50C514 = v36; + std::moneypunct::_M_initialize_moneypunct(&std::`anonymous namespace'::moneypunct_cf, 0, 0); + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C510, 1u); + else + ++dword_50C510; + v28 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v28 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = &std::`anonymous namespace'::moneypunct_cf; + dword_50C51C = 1; + std::`anonymous namespace'::moneypunct_ct = (int)&off_51A884; + dword_50C520 = v35; + std::moneypunct::_M_initialize_moneypunct(&std::`anonymous namespace'::moneypunct_ct, 0, 0); + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C51C, 1u); + else + ++dword_50C51C; + v29 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v29 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = &std::`anonymous namespace'::moneypunct_ct; + dword_50C4F0 = 1; + std::`anonymous namespace'::money_get_c = (int)&off_51B804; + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C4F0, 1u); + else + dword_50C4F0 = 2; + v30 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v30 + 4 * std::locale::id::_M_id(&std::money_get>::id)) = &std::`anonymous namespace'::money_get_c; + dword_50C500 = 1; + std::`anonymous namespace'::money_put_c = (int)&off_51B834; + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C500, 1u); + else + dword_50C500 = 2; + v31 = *(_DWORD *)(a1 + 4); + v6 = std::locale::id::_M_id(&std::money_put>::id); + v7 = _CRT_MT; + *(_DWORD *)(v31 + 4 * v6) = &std::`anonymous namespace'::money_put_c; + dword_50C4E0 = 1; + std::`anonymous namespace'::time_get_c = (int)&off_51B744; + if ( v7 ) + _InterlockedAdd(&dword_50C4E0, 1u); + else + dword_50C4E0 = 2; + v32 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v32 + 4 * std::locale::id::_M_id(&std::time_get>::id)) = &std::`anonymous namespace'::time_get_c; + std::messages::messages(&std::`anonymous namespace'::messages_c, 1); + if ( _CRT_MT ) + _InterlockedAdd(dword_50C4A8, 1u); + else + ++dword_50C4A8[0]; + v33 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v33 + 4 * std::locale::id::_M_id(&std::messages::id)) = &std::`anonymous namespace'::messages_c; + dword_50C4D4 = 1; + std::`anonymous namespace'::numpunct_w = (int)&off_51B720; + v34 = *((_DWORD *)this + 4); + v13 = *((_DWORD *)this + 3); + v8 = *((_DWORD *)this + 5); + dword_50C4D8 = v13; + v25 = v8; + std::numpunct::_M_initialize_numpunct(&std::`anonymous namespace'::numpunct_w, 0); + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C4D4, 1u); + else + ++dword_50C4D4; + v15 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v15 + 4 * std::locale::id::_M_id(&std::numpunct::id)) = &std::`anonymous namespace'::numpunct_w; + dword_50C54C = 1; + std::`anonymous namespace'::collate_w = (int)&off_51B5AC; + dword_50C550 = std::locale::facet::_S_get_c_locale(); + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C54C, 1u); + else + ++dword_50C54C; + v16 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v16 + 4 * std::locale::id::_M_id(&std::collate::id)) = &std::`anonymous namespace'::collate_w; + dword_50C528 = 1; + std::`anonymous namespace'::moneypunct_wf = (int)&off_51A8B8; + dword_50C52C = v34; + std::moneypunct::_M_initialize_moneypunct(&std::`anonymous namespace'::moneypunct_wf, 0, 0); + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C528, 1u); + else + ++dword_50C528; + v17 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v17 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = &std::`anonymous namespace'::moneypunct_wf; + dword_50C534 = 1; + std::`anonymous namespace'::moneypunct_wt = (int)&off_51A8EC; + dword_50C538 = v25; + std::moneypunct::_M_initialize_moneypunct(&std::`anonymous namespace'::moneypunct_wt, 0, 0); + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C534, 1u); + else + ++dword_50C534; + v18 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v18 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = &std::`anonymous namespace'::moneypunct_wt; + dword_50C4F8 = 1; + std::`anonymous namespace'::money_get_w = (int)&off_51B81C; + if ( _CRT_MT ) + _InterlockedAdd(&dword_50C4F8, 1u); + else + dword_50C4F8 = 2; + v19 = *(_DWORD *)(a1 + 4); + v9 = std::locale::id::_M_id(&std::money_get>::id); + v10 = _CRT_MT; + *(_DWORD *)(v19 + 4 * v9) = &std::`anonymous namespace'::money_get_w; + dword_50C508 = 1; + std::`anonymous namespace'::money_put_w = (int)&off_51B84C; + if ( v10 ) + _InterlockedAdd(&dword_50C508, 1u); + else + dword_50C508 = 2; + v20 = *(_DWORD *)(a1 + 4); + v11 = std::locale::id::_M_id(std::money_put>::id); + v12 = _CRT_MT; + *(_DWORD *)(v20 + 4 * v11) = &std::`anonymous namespace'::money_put_w; + dword_50C4E8 = 1; + std::`anonymous namespace'::time_get_w = (int)&off_51B76C; + if ( v12 ) + _InterlockedAdd(&dword_50C4E8, 1u); + else + dword_50C4E8 = 2; + v21 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v21 + 4 * std::locale::id::_M_id(&std::time_get>::id)) = &std::`anonymous namespace'::time_get_w; + std::messages::messages(&std::`anonymous namespace'::messages_w, 1); + if ( _CRT_MT ) + _InterlockedAdd(dword_50C4B8, 1u); + else + ++dword_50C4B8[0]; + v22 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v22 + 4 * std::locale::id::_M_id(&std::messages::id)) = &std::`anonymous namespace'::messages_w; + v23 = *(_DWORD *)(a1 + 12); + *(_DWORD *)(v23 + 4 * std::locale::id::_M_id(&std::numpunct::id)) = v14; + v24 = *(_DWORD *)(a1 + 12); + *(_DWORD *)(v24 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = v36; + v37 = *(_DWORD *)(a1 + 12); + *(_DWORD *)(v37 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = v35; + v38 = *(_DWORD *)(a1 + 12); + *(_DWORD *)(v38 + 4 * std::locale::id::_M_id(&std::numpunct::id)) = v13; + v39 = *(_DWORD *)(a1 + 12); + *(_DWORD *)(v39 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = v34; + lpuexcpta = *(struct _Unwind_Exception **)(a1 + 12); + *((_DWORD *)lpuexcpta + std::locale::id::_M_id(&std::moneypunct::id)) = v25; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C48C: using guessed type signed __int32 std::moneypunct::id; +// 50C490: using guessed type signed __int32 std::moneypunct::id; +// 50C494: using guessed type signed __int32 std::moneypunct::id; +// 50C498: using guessed type signed __int32 std::moneypunct::id; +// 50C4A4: using guessed type _DWORD std::`anonymous namespace'::messages_c; +// 50C4A8: using guessed type signed __int32 dword_50C4A8[3]; +// 50C4B4: using guessed type _DWORD std::`anonymous namespace'::messages_w; +// 50C4B8: using guessed type signed __int32 dword_50C4B8[3]; +// 50C4C4: using guessed type int std::`anonymous namespace'::numpunct_c; +// 50C4C8: using guessed type int dword_50C4C8; +// 50C4CC: using guessed type int dword_50C4CC; +// 50C4D0: using guessed type int std::`anonymous namespace'::numpunct_w; +// 50C4D4: using guessed type int dword_50C4D4; +// 50C4D8: using guessed type int dword_50C4D8; +// 50C4DC: using guessed type int std::`anonymous namespace'::time_get_c; +// 50C4E0: using guessed type int dword_50C4E0; +// 50C4E4: using guessed type int std::`anonymous namespace'::time_get_w; +// 50C4E8: using guessed type int dword_50C4E8; +// 50C4EC: using guessed type int std::`anonymous namespace'::money_get_c; +// 50C4F0: using guessed type int dword_50C4F0; +// 50C4F4: using guessed type int std::`anonymous namespace'::money_get_w; +// 50C4F8: using guessed type int dword_50C4F8; +// 50C4FC: using guessed type int std::`anonymous namespace'::money_put_c; +// 50C500: using guessed type int dword_50C500; +// 50C504: using guessed type int std::`anonymous namespace'::money_put_w; +// 50C508: using guessed type int dword_50C508; +// 50C50C: using guessed type int std::`anonymous namespace'::moneypunct_cf; +// 50C510: using guessed type int dword_50C510; +// 50C514: using guessed type int dword_50C514; +// 50C518: using guessed type int std::`anonymous namespace'::moneypunct_ct; +// 50C51C: using guessed type int dword_50C51C; +// 50C520: using guessed type int dword_50C520; +// 50C524: using guessed type int std::`anonymous namespace'::moneypunct_wf; +// 50C528: using guessed type int dword_50C528; +// 50C52C: using guessed type int dword_50C52C; +// 50C530: using guessed type int std::`anonymous namespace'::moneypunct_wt; +// 50C534: using guessed type int dword_50C534; +// 50C538: using guessed type int dword_50C538; +// 50C53C: using guessed type int std::`anonymous namespace'::collate_c; +// 50C540: using guessed type int dword_50C540; +// 50C544: using guessed type int dword_50C544; +// 50C548: using guessed type int std::`anonymous namespace'::collate_w; +// 50C54C: using guessed type int dword_50C54C; +// 50C550: using guessed type int dword_50C550; +// 50C660: using guessed type signed __int32 std::collate::id; +// 50C664: using guessed type signed __int32 std::collate::id; +// 50C680: using guessed type signed __int32 std::messages::id; +// 50C684: using guessed type signed __int32 std::messages::id; +// 50C688: using guessed type signed __int32 std::numpunct::id; +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 50C690: using guessed type signed __int32 std::time_get>::id; +// 50C694: using guessed type signed __int32 std::time_get>::id; +// 50C6A0: using guessed type signed __int32 std::money_get>::id; +// 50C6A4: using guessed type signed __int32 std::money_get>::id; +// 50C6A8: using guessed type signed __int32 std::money_put>::id; +// 50C6AC: using guessed type signed __int32 std::money_put>::id[5]; +// 51A850: using guessed type int (*off_51A850)(); +// 51A884: using guessed type int (*off_51A884)(); +// 51A8B8: using guessed type int (*off_51A8B8)(); +// 51A8EC: using guessed type int (*off_51A8EC)(); +// 51B590: using guessed type int (*off_51B590)(); +// 51B5AC: using guessed type int (*off_51B5AC)(); +// 51B6FC: using guessed type int (*off_51B6FC)(); +// 51B720: using guessed type int (*off_51B720)(); +// 51B744: using guessed type int (*off_51B744)(); +// 51B76C: using guessed type int (*off_51B76C)(); +// 51B804: using guessed type int (*off_51B804)(); +// 51B81C: using guessed type int (*off_51B81C)(); +// 51B834: using guessed type int (*off_51B834)(); +// 51B84C: using guessed type int (*off_51B84C)(); + +//----- (004D43D0) -------------------------------------------------------- +void __userpurge std::locale::_Impl::_M_init_extra( + int a1@, + std::locale::_Impl *this, + int *a3, + int **a4, + const char *a5, + const char *a6) +{ + int v6; // eax + _DWORD *v7; // edx + int v8; // eax + int v9; // eax + void *v10; // eax + int v11; // ecx + void *v12; // eax + int v13; // edx + void *v14; // eax + int v15; // ecx + int v16; // eax + _DWORD *v17; // edx + int v18; // eax + int v19; // eax + void *v20; // eax + int v21; // ecx + void *v22; // eax + int v23; // edx + void *v24; // eax + int v25; // ecx + int v26; // [esp+14h] [ebp-74h] + int v27; // [esp+14h] [ebp-74h] + int v28; // [esp+14h] [ebp-74h] + volatile signed __int32 *v29; // [esp+14h] [ebp-74h] + int v30; // [esp+18h] [ebp-70h] + int v31; // [esp+18h] [ebp-70h] + int v32; // [esp+18h] [ebp-70h] + volatile signed __int32 *v33; // [esp+18h] [ebp-70h] + _DWORD *Block; // [esp+1Ch] [ebp-6Ch] + int v35; // [esp+20h] [ebp-68h] + _DWORD *v36; // [esp+20h] [ebp-68h] + _DWORD *v37; // [esp+24h] [ebp-64h] + _DWORD *v38; // [esp+28h] [ebp-60h] + int v39; // [esp+2Ch] [ebp-5Ch] + _DWORD *v40; // [esp+2Ch] [ebp-5Ch] + _DWORD *v41; // [esp+30h] [ebp-58h] + int v42; // [esp+34h] [ebp-54h] + _DWORD *v43; // [esp+34h] [ebp-54h] + int v44; // [esp+34h] [ebp-54h] + int v45; // [esp+34h] [ebp-54h] + int v46; // [esp+34h] [ebp-54h] + int v47; // [esp+34h] [ebp-54h] + _DWORD *v48; // [esp+34h] [ebp-54h] + int v49; // [esp+34h] [ebp-54h] + int v50; // [esp+34h] [ebp-54h] + struct _Unwind_Exception *lpuexcpta; // [esp+38h] [ebp-50h] + + v41 = operator new(0xCu); + v41[1] = 0; + v6 = *(_DWORD *)this; + *v41 = &off_51B6FC; + v41[2] = 0; + std::numpunct::_M_initialize_numpunct(v41, v6); + if ( _CRT_MT ) + _InterlockedAdd(v41 + 1, 1u); + else + ++v41[1]; + v42 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v42 + 4 * std::locale::id::_M_id(&std::numpunct::id)) = v41; + v7 = operator new(0xCu); + v7[1] = 0; + *v7 = &off_51B590; + v43 = v7; + v7[2] = std::locale::facet::_S_clone_c_locale(); + if ( _CRT_MT ) + _InterlockedAdd(v43 + 1, 1u); + else + ++v43[1]; + v39 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v39 + 4 * std::locale::id::_M_id(&std::collate::id)) = v43; + v40 = operator new(0xCu); + v40[1] = 0; + v8 = *(_DWORD *)this; + *v40 = &off_51A850; + v40[2] = 0; + std::moneypunct::_M_initialize_moneypunct(v40, v8, 0); + if ( _CRT_MT ) + _InterlockedAdd(v40 + 1, 1u); + else + ++v40[1]; + v44 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v44 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = v40; + v38 = operator new(0xCu); + v38[1] = 0; + v9 = *(_DWORD *)this; + *v38 = &off_51A884; + v38[2] = 0; + std::moneypunct::_M_initialize_moneypunct(v38, v9, 0); + if ( _CRT_MT ) + _InterlockedAdd(v38 + 1, 1u); + else + ++v38[1]; + v45 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v45 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = v38; + v10 = operator new(8u); + v11 = _CRT_MT; + *((_DWORD *)v10 + 1) = 0; + *(_DWORD *)v10 = &off_51B804; + if ( v11 ) + _InterlockedAdd((volatile signed __int32 *)v10 + 1, 1u); + else + *((_DWORD *)v10 + 1) = 1; + v30 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v30 + 4 * std::locale::id::_M_id(&std::money_get>::id)) = v10; + v12 = operator new(8u); + v13 = _CRT_MT; + *((_DWORD *)v12 + 1) = 0; + *(_DWORD *)v12 = &off_51B834; + if ( v13 ) + _InterlockedAdd((volatile signed __int32 *)v12 + 1, 1u); + else + *((_DWORD *)v12 + 1) = 1; + v31 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v31 + 4 * std::locale::id::_M_id(&std::money_put>::id)) = v12; + v14 = operator new(8u); + v15 = _CRT_MT; + *((_DWORD *)v14 + 1) = 0; + *(_DWORD *)v14 = &off_51B744; + if ( v15 ) + _InterlockedAdd((volatile signed __int32 *)v14 + 1, 1u); + else + *((_DWORD *)v14 + 1) = 1; + v32 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v32 + 4 * std::locale::id::_M_id(&std::time_get>::id)) = v14; + v33 = (volatile signed __int32 *)operator new(0x10u); + std::messages::messages(v33, *(_DWORD *)this, (int)a4, 0); + if ( _CRT_MT ) + _InterlockedAdd(v33 + 1, 1u); + else + ++*((_DWORD *)v33 + 1); + v46 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v46 + 4 * std::locale::id::_M_id(&std::messages::id)) = v33; + v37 = operator new(0xCu); + v37[1] = 0; + v16 = *(_DWORD *)this; + *v37 = &off_51B720; + v37[2] = 0; + std::numpunct::_M_initialize_numpunct(v37, v16); + if ( _CRT_MT ) + _InterlockedAdd(v37 + 1, 1u); + else + ++v37[1]; + v47 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v47 + 4 * std::locale::id::_M_id(&std::numpunct::id)) = v37; + v17 = operator new(0xCu); + v17[1] = 0; + *v17 = &off_51B5AC; + v48 = v17; + v17[2] = std::locale::facet::_S_clone_c_locale(); + if ( _CRT_MT ) + _InterlockedAdd(v48 + 1, 1u); + else + ++v48[1]; + v35 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v35 + 4 * std::locale::id::_M_id(&std::collate::id)) = v48; + v36 = operator new(0xCu); + v36[1] = 0; + v18 = *a3; + *v36 = &off_51A8B8; + v36[2] = 0; + std::moneypunct::_M_initialize_moneypunct(v36, v18, (int)a5); + if ( _CRT_MT ) + _InterlockedAdd(v36 + 1, 1u); + else + ++v36[1]; + v49 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v49 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = v36; + Block = operator new(0xCu); + Block[1] = 0; + v19 = *a3; + *Block = &off_51A8EC; + Block[2] = 0; + std::moneypunct::_M_initialize_moneypunct(Block, v19, (int)a5); + if ( _CRT_MT ) + _InterlockedAdd(Block + 1, 1u); + else + ++Block[1]; + v50 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v50 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = Block; + v20 = operator new(8u); + v21 = _CRT_MT; + *((_DWORD *)v20 + 1) = 0; + *(_DWORD *)v20 = &off_51B81C; + if ( v21 ) + _InterlockedAdd((volatile signed __int32 *)v20 + 1, 1u); + else + *((_DWORD *)v20 + 1) = 1; + v26 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v26 + 4 * std::locale::id::_M_id(&std::money_get>::id)) = v20; + v22 = operator new(8u); + v23 = _CRT_MT; + *((_DWORD *)v22 + 1) = 0; + *(_DWORD *)v22 = &off_51B84C; + if ( v23 ) + _InterlockedAdd((volatile signed __int32 *)v22 + 1, 1u); + else + *((_DWORD *)v22 + 1) = 1; + v27 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v27 + 4 * std::locale::id::_M_id(std::money_put>::id)) = v22; + v24 = operator new(8u); + v25 = _CRT_MT; + *((_DWORD *)v24 + 1) = 0; + *(_DWORD *)v24 = &off_51B76C; + if ( v25 ) + _InterlockedAdd((volatile signed __int32 *)v24 + 1, 1u); + else + *((_DWORD *)v24 + 1) = 1; + v28 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v28 + 4 * std::locale::id::_M_id(&std::time_get>::id)) = v24; + v29 = (volatile signed __int32 *)operator new(0x10u); + std::messages::messages(v29, *(_DWORD *)this, (int)a4, 0); + if ( _CRT_MT ) + _InterlockedAdd(v29 + 1, 1u); + else + ++*((_DWORD *)v29 + 1); + lpuexcpta = *(struct _Unwind_Exception **)(a1 + 4); + *((_DWORD *)lpuexcpta + std::locale::id::_M_id(&std::messages::id)) = v29; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C48C: using guessed type signed __int32 std::moneypunct::id; +// 50C490: using guessed type signed __int32 std::moneypunct::id; +// 50C494: using guessed type signed __int32 std::moneypunct::id; +// 50C498: using guessed type signed __int32 std::moneypunct::id; +// 50C660: using guessed type signed __int32 std::collate::id; +// 50C664: using guessed type signed __int32 std::collate::id; +// 50C680: using guessed type signed __int32 std::messages::id; +// 50C684: using guessed type signed __int32 std::messages::id; +// 50C688: using guessed type signed __int32 std::numpunct::id; +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 50C690: using guessed type signed __int32 std::time_get>::id; +// 50C694: using guessed type signed __int32 std::time_get>::id; +// 50C6A0: using guessed type signed __int32 std::money_get>::id; +// 50C6A4: using guessed type signed __int32 std::money_get>::id; +// 50C6A8: using guessed type signed __int32 std::money_put>::id; +// 50C6AC: using guessed type signed __int32 std::money_put>::id[5]; +// 51A850: using guessed type int (*off_51A850)(); +// 51A884: using guessed type int (*off_51A884)(); +// 51A8B8: using guessed type int (*off_51A8B8)(); +// 51A8EC: using guessed type int (*off_51A8EC)(); +// 51B590: using guessed type int (*off_51B590)(); +// 51B5AC: using guessed type int (*off_51B5AC)(); +// 51B6FC: using guessed type int (*off_51B6FC)(); +// 51B720: using guessed type int (*off_51B720)(); +// 51B744: using guessed type int (*off_51B744)(); +// 51B76C: using guessed type int (*off_51B76C)(); +// 51B804: using guessed type int (*off_51B804)(); +// 51B81C: using guessed type int (*off_51B81C)(); +// 51B834: using guessed type int (*off_51B834)(); +// 51B84C: using guessed type int (*off_51B84C)(); + +//----- (004D4C40) -------------------------------------------------------- +void __userpurge std::locale::_Impl::_M_install_cache( + int a1@, + std::locale::_Impl *this, + const std::locale::facet *a3, + unsigned int a4) +{ + volatile signed __int32 *v4; // edx + int *v5; // ecx + int v6; // esi + volatile signed __int32 *v7; // ebx + int v8; // eax + int v9; // edx + int v10; // edx + volatile signed __int32 *v11; // edx + int v12; // eax + int v13; // esi + _DWORD *v14; // ebx + void (__fastcall *v15)(void *); // eax + int v16; // ebx + _DWORD *exception; // eax + _DWORD *v18; // eax + volatile signed __int32 *v19; // eax + + if ( !(_BYTE)`guard variable for'`anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex + && __cxa_guard_acquire(&`guard variable for'`anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex) ) + { + if ( _CRT_MT ) + __gthr_win32_mutex_init_function(`anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex); + __cxa_guard_release(&`guard variable for'`anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex); + atexit(__tcf_0_1); + } + if ( _CRT_MT && __gthr_win32_mutex_lock((int)`anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex) ) + { + exception = __cxa_allocate_exception(4u); + *exception = &off_519CF8; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'__gnu_cxx::__concurrence_lock_error, + (void (__cdecl *)(void *))__gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error); + } + v4 = (volatile signed __int32 *)std::locale::_S_twinned_facets[0]; + if ( !std::locale::_S_twinned_facets[0] ) + { +LABEL_24: + v10 = -1; + goto LABEL_25; + } + v5 = std::locale::_S_twinned_facets; + while ( 1 ) + { + v6 = *v4; + if ( *v4 ) + goto LABEL_6; + if ( !_CRT_MT ) + { + v6 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v6; + *v4 = v6; +LABEL_6: + v7 = (volatile signed __int32 *)v5[1]; + v8 = *v7; + if ( a3 == (const std::locale::facet *)(v6 - 1) ) + goto LABEL_15; + goto LABEL_7; + } + _InterlockedCompareExchange(v4, _InterlockedIncrement(&std::locale::id::_S_refcount), 0); + v7 = (volatile signed __int32 *)v5[1]; + v8 = *v7; + if ( a3 == (const std::locale::facet *)(*v4 - 1) ) + { +LABEL_15: + v9 = v8; + if ( !v8 ) + { + if ( _CRT_MT ) + { + _InterlockedCompareExchange(v7, _InterlockedIncrement(&std::locale::id::_S_refcount), 0); + v9 = *v7; + } + else + { + v9 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v9; + *v7 = v9; + } + } + v10 = v9 - 1; + goto LABEL_25; + } +LABEL_7: + if ( v8 ) + goto LABEL_10; + if ( _CRT_MT ) + break; + v8 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v8; + *v7 = v8; +LABEL_10: + if ( a3 == (const std::locale::facet *)(v8 - 1) ) + goto LABEL_20; +LABEL_11: + v4 = (volatile signed __int32 *)v5[2]; + v5 += 2; + if ( !v4 ) + goto LABEL_24; + } + _InterlockedCompareExchange(v7, _InterlockedIncrement(&std::locale::id::_S_refcount), 0); + if ( a3 != (const std::locale::facet *)(*v7 - 1) ) + goto LABEL_11; +LABEL_20: + v11 = (volatile signed __int32 *)*v5; + v12 = *(_DWORD *)*v5; + if ( !v12 ) + { + if ( _CRT_MT ) + { + _InterlockedCompareExchange(v11, _InterlockedIncrement(&std::locale::id::_S_refcount), 0); + v12 = *v11; + } + else + { + v12 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v12; + *v11 = v12; + } + } + v10 = (int)a3; + a3 = (const std::locale::facet *)(v12 - 1); +LABEL_25: + v13 = *(_DWORD *)(a1 + 12); + v14 = (_DWORD *)(v13 + 4 * (_DWORD)a3); + if ( !*v14 ) + { + v19 = (volatile signed __int32 *)((char *)this + 4); + if ( _CRT_MT ) + { + _InterlockedAdd(v19, 1u); + v16 = _CRT_MT; + v13 = *(_DWORD *)(a1 + 12); + *(_DWORD *)(v13 + 4 * (_DWORD)a3) = this; + if ( v10 == -1 ) + goto LABEL_30; + if ( v16 ) + { + _InterlockedAdd(v19, 1u); + v16 = _CRT_MT; + *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4 * v10) = this; + goto LABEL_30; + } + } + else + { + ++*((_DWORD *)this + 1); + *v14 = this; + if ( v10 == -1 ) + return; + } + ++*((_DWORD *)this + 1); + *(_DWORD *)(v13 + 4 * v10) = this; + return; + } + if ( this ) + { + v15 = *(void (__fastcall **)(void *))(*(_DWORD *)this + 4); + if ( v15 == std::locale::facet::~facet ) + operator delete(this); + else + ((void (__fastcall *)(std::locale::_Impl *, int))v15)(this, v10); + } + v16 = _CRT_MT; +LABEL_30: + if ( v16 ) + { + if ( __gthr_win32_mutex_unlock((int)`anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex) ) + { + v18 = __cxa_allocate_exception(4u); + *v18 = &off_519D0C; + __cxa_throw( + v18, + (struct type_info *)&`typeinfo for'__gnu_cxx::__concurrence_unlock_error, + (void (__cdecl *)(void *))__gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error); + } + } +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C5EC: using guessed type int std::locale::id::_S_refcount; +// 50CBD4: using guessed type _DWORD `anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex[2]; +// 5154C0: using guessed type int std::locale::_S_twinned_facets[24]; +// 515CC8: using guessed type int *`typeinfo for'__gnu_cxx::__concurrence_lock_error; +// 515CD4: using guessed type int *`typeinfo for'__gnu_cxx::__concurrence_unlock_error; +// 519CF8: using guessed type void (__cdecl *off_519CF8)(__gnu_cxx::__concurrence_lock_error *__hidden this); +// 519D0C: using guessed type void (__cdecl *off_519D0C)(__gnu_cxx::__concurrence_unlock_error *__hidden this); + +//----- (004D50B0) -------------------------------------------------------- +void __userpurge std::locale::_Impl::_M_install_facet( + _DWORD *a1@, + std::locale::_Impl *this, + const std::locale::id *a3, + const std::locale::facet *a4) +{ + void *v4; // esi + unsigned int v5; // eax + unsigned int v6; // ecx + int v7; // ebx + int i; // eax + unsigned int v9; // ecx + int v10; // ebx + int j; // eax + volatile signed __int32 *v12; // ecx + volatile signed __int32 *v13; // ebx + std::locale::facet **v14; // ecx + int v15; // edx + volatile signed __int32 *v16; // ebx + int v17; // eax + volatile signed __int32 v18; // edx + int v19; // edx + _DWORD *v20; // eax + _DWORD *v21; // ecx + signed __int32 v22; // eax + int v23; // eax + int v24; // eax + volatile signed __int32 *v25; // ecx + signed __int32 v26; // eax + void (*v27)(void); // eax + volatile signed __int32 *v28; // edx + int v29; // ebx + int v30; // eax + _DWORD *v31; // eax + _DWORD *v32; // ecx + signed __int32 v33; // eax + void (*v34)(void); // eax + void (*v35)(void); // eax + void (*v36)(void); // eax + const std::locale::id *Val; // [esp+4h] [ebp-98h] + unsigned int v38; // [esp+10h] [ebp-8Ch] + struct _Unwind_Exception *lpuexcpt; // [esp+1Ch] [ebp-80h] + int v41; // [esp+20h] [ebp-7Ch] + int v42; // [esp+24h] [ebp-78h] + volatile signed __int32 **v43; // [esp+24h] [ebp-78h] + _DWORD *v44; // [esp+28h] [ebp-74h] + int v45; // [esp+2Ch] [ebp-70h] + unsigned int v46; // [esp+34h] [ebp-68h] + void *v47; // [esp+38h] [ebp-64h] + int v48; // [esp+3Ch] [ebp-60h] + int v49; // [esp+40h] [ebp-5Ch] + _DWORD *v50; // [esp+44h] [ebp-58h] + _DWORD *v51; // [esp+48h] [ebp-54h] + + if ( !a3 ) + return; + v41 = *(_DWORD *)this; + if ( !*(_DWORD *)this ) + { + if ( _CRT_MT ) + { + _InterlockedCompareExchange( + (volatile signed __int32 *)this, + _InterlockedIncrement(&std::locale::id::_S_refcount), + 0); + v41 = *(_DWORD *)this; + } + else + { + v41 = ++std::locale::id::_S_refcount; + *(_DWORD *)this = std::locale::id::_S_refcount; + } + } + v45 = v41 - 1; + if ( a1[2] - 1 < (unsigned int)(v41 - 1) ) + { + lpuexcpt = (struct _Unwind_Exception *)(v41 + 3); + v5 = -1; + if ( (unsigned int)(v41 + 3) < 0x20000000 ) + v5 = 4 * (v41 + 3); + v4 = (void *)a1[1]; + v46 = v5; + v44 = (_DWORD *)operator new[](v5); + v6 = a1[2]; + if ( v6 ) + { + v7 = a1[1]; + for ( i = 0; i != v6; ++i ) + v44[i] = *(_DWORD *)(v7 + 4 * i); + } + if ( (unsigned int)lpuexcpt > v6 ) + memset(&v44[v6], 0, 4 * ((_DWORD)lpuexcpt - v6)); + v47 = (void *)a1[3]; + v42 = operator new[](v46); + v9 = a1[2]; + if ( v9 ) + { + v10 = a1[3]; + for ( j = 0; j != v9; ++j ) + *(_DWORD *)(v42 + 4 * j) = *(_DWORD *)(v10 + 4 * j); + } + if ( (unsigned int)lpuexcpt > v9 ) + memset((void *)(v42 + 4 * v9), 0, 4 * ((_DWORD)lpuexcpt - v9)); + a1[2] = lpuexcpt; + a1[1] = v44; + a1[3] = v42; + if ( v4 ) + operator delete[](v4); + if ( v47 ) + operator delete[](v47); + } + if ( _CRT_MT ) + _InterlockedAdd((volatile signed __int32 *)a3 + 1, 1u); + else + ++*((_DWORD *)a3 + 1); + v12 = *(volatile signed __int32 **)(a1[1] + 4 * v45); + v43 = (volatile signed __int32 **)(a1[1] + 4 * v45); + if ( !v12 ) + { + *v43 = (volatile signed __int32 *)a3; + goto LABEL_49; + } + v13 = (volatile signed __int32 *)std::locale::_S_twinned_facets[0]; + if ( !std::locale::_S_twinned_facets[0] ) + goto LABEL_46; + v14 = (std::locale::facet **)std::locale::_S_twinned_facets; + while ( 1 ) + { + v15 = *v13; + if ( *v13 ) + goto LABEL_28; + if ( !_CRT_MT ) + { + v15 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v15; + *v13 = v15; +LABEL_28: + v16 = (volatile signed __int32 *)v14[1]; + v17 = *v16; + if ( v41 == v15 ) + goto LABEL_37; + goto LABEL_29; + } + _InterlockedCompareExchange(v13, _InterlockedIncrement(&std::locale::id::_S_refcount), 0); + v18 = *v13; + v16 = (volatile signed __int32 *)v14[1]; + v17 = *v16; + if ( v41 == v18 ) + { +LABEL_37: + v19 = a1[1]; + if ( !v17 ) + { + if ( _CRT_MT ) + { + _InterlockedCompareExchange(v16, _InterlockedIncrement(&std::locale::id::_S_refcount), 0); + v17 = *v16; + } + else + { + v17 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v17; + *v16 = v17; + } + } + v48 = v19 + 4 * v17 - 4; + if ( *(_DWORD *)v48 ) + { + v20 = std::locale::facet::_M_sso_shim((volatile signed __int32 *)a3, v14[1], Val); + v51 = v20; + if ( _CRT_MT ) + { + _InterlockedAdd(v20 + 1, 1u); + v21 = *(_DWORD **)v48; + if ( _CRT_MT ) + { + v22 = _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)v48 + 4), 0xFFFFFFFF); + goto LABEL_44; + } + } + else + { + ++v20[1]; + v21 = *(_DWORD **)v48; + } + v22 = v21[1]; + v21[1] = v22 - 1; +LABEL_44: + if ( v22 == 1 ) + { + v35 = *(void (**)(void))(*v21 + 4); + if ( (char *)v35 == (char *)std::locale::facet::~facet ) + operator delete(v21); + else + v35(); + } + *(_DWORD *)v48 = v51; + v12 = *v43; + goto LABEL_46; + } + goto LABEL_71; + } +LABEL_29: + if ( v17 ) + goto LABEL_32; + if ( !_CRT_MT ) + { + v17 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v17; + *v16 = v17; +LABEL_32: + if ( v41 == v17 ) + break; + goto LABEL_33; + } + _InterlockedCompareExchange(v16, _InterlockedIncrement(&std::locale::id::_S_refcount), 0); + if ( v41 == *v16 ) + break; +LABEL_33: + v13 = (volatile signed __int32 *)v14[2]; + v14 += 2; + if ( !v13 ) + goto LABEL_71; + } + v28 = (volatile signed __int32 *)*v14; + v29 = a1[1]; + v30 = *(_DWORD *)*v14; + if ( !v30 ) + { + if ( _CRT_MT ) + { + _InterlockedCompareExchange(v28, _InterlockedIncrement(&std::locale::id::_S_refcount), 0); + v30 = *v28; + } + else + { + v30 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v30; + *v28 = v30; + } + } + v49 = v29 + 4 * v30 - 4; + if ( !*(_DWORD *)v49 ) + { +LABEL_71: + v12 = *v43; + if ( !_CRT_MT ) + goto LABEL_47; + goto LABEL_72; + } + v31 = std::locale::facet::_M_cow_shim((volatile signed __int32 *)a3, *v14, Val); + v50 = v31; + if ( !_CRT_MT ) + { + ++v31[1]; + v32 = *(_DWORD **)v49; + goto LABEL_67; + } + _InterlockedAdd(v31 + 1, 1u); + v32 = *(_DWORD **)v49; + if ( _CRT_MT ) + { + v33 = _InterlockedExchangeAdd((volatile signed __int32 *)(*(_DWORD *)v49 + 4), 0xFFFFFFFF); + } + else + { +LABEL_67: + v33 = v32[1]; + v32[1] = v33 - 1; + } + if ( v33 == 1 ) + { + v36 = *(void (**)(void))(*v32 + 4); + if ( (char *)v36 == (char *)std::locale::facet::~facet ) + operator delete(v32); + else + v36(); + } + *(_DWORD *)v49 = v50; + v12 = *v43; +LABEL_46: + if ( _CRT_MT ) + { +LABEL_72: + if ( _InterlockedExchangeAdd(v12 + 1, 0xFFFFFFFF) == 1 ) + goto LABEL_73; + goto LABEL_48; + } +LABEL_47: + v23 = *((_DWORD *)v12 + 1); + *((_DWORD *)v12 + 1) = v23 - 1; + if ( v23 != 1 ) + goto LABEL_48; +LABEL_73: + v34 = *(void (**)(void))(*v12 + 4); + if ( (char *)v34 == (char *)std::locale::facet::~facet ) + operator delete((void *)v12); + else + v34(); +LABEL_48: + *v43 = (volatile signed __int32 *)a3; +LABEL_49: + if ( a1[2] ) + { + v38 = 0; + v24 = a1[3]; + do + { + v25 = *(volatile signed __int32 **)(v24 + 4 * v38); + if ( v25 ) + { + if ( _CRT_MT ) + { + v26 = _InterlockedExchangeAdd(v25 + 1, 0xFFFFFFFF); + } + else + { + v26 = *((_DWORD *)v25 + 1); + *((_DWORD *)v25 + 1) = v26 - 1; + } + if ( v26 == 1 ) + { + v27 = *(void (**)(void))(*v25 + 4); + if ( (char *)v27 == (char *)std::locale::facet::~facet ) + operator delete((void *)v25); + else + v27(); + } + v24 = a1[3]; + *(_DWORD *)(v24 + 4 * v38) = 0; + } + ++v38; + } + while ( a1[2] > v38 ); + } +} +// 4D53BF: variable 'Val' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C5EC: using guessed type int std::locale::id::_S_refcount; +// 5154C0: using guessed type int std::locale::_S_twinned_facets[24]; + +//----- (004D5850) -------------------------------------------------------- +void __userpurge std::locale::_Impl::_M_replace_facet( + _DWORD *a1@, + std::locale::_Impl *this, + const std::locale::_Impl *a3, + const std::locale::id *a4) +{ + int v4; // eax + unsigned int v5; // eax + const std::locale::id *v6; // eax + + v4 = *(_DWORD *)a3; + if ( !*(_DWORD *)a3 ) + { + if ( _CRT_MT ) + { + _InterlockedCompareExchange( + (volatile signed __int32 *)a3, + _InterlockedIncrement(&std::locale::id::_S_refcount), + 0); + v4 = *(_DWORD *)a3; + } + else + { + v4 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v4; + *(_DWORD *)a3 = v4; + } + } + v5 = v4 - 1; + if ( *((_DWORD *)this + 2) - 1 < v5 || (v6 = *(const std::locale::id **)(*((_DWORD *)this + 1) + 4 * v5)) == 0 ) + std::__throw_runtime_error((std::runtime_error *)"locale::_Impl::_M_replace_facet"); + std::locale::_Impl::_M_install_facet(a1, a3, v6, a4); +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C5EC: using guessed type int std::locale::id::_S_refcount; + +//----- (004D58D0) -------------------------------------------------------- +int __userpurge std::locale::_Impl::_M_replace_category@( + int result@, + _DWORD *a2@, + std::locale::_Impl *this, + volatile signed __int32 **a4, + const std::locale::id *const *a5) +{ + volatile signed __int32 **v5; // ebx + volatile signed __int32 *i; // edx + int v8; // eax + unsigned int v9; // eax + const std::locale::id *v10; // eax + const std::locale::facet *v11; // [esp+8h] [ebp-14h] + + v5 = a4; + for ( i = *a4; *v5; i = *v5 ) + { + v8 = *i; + if ( !*i ) + { + if ( _CRT_MT ) + { + _InterlockedCompareExchange(i, _InterlockedIncrement(&std::locale::id::_S_refcount), 0); + v8 = *i; + } + else + { + v8 = std::locale::id::_S_refcount + 1; + std::locale::id::_S_refcount = v8; + *i = v8; + } + } + v9 = v8 - 1; + if ( *((_DWORD *)this + 2) - 1 < v9 || (v10 = *(const std::locale::id **)(*((_DWORD *)this + 1) + 4 * v9)) == 0 ) + std::__throw_runtime_error((std::runtime_error *)"locale::_Impl::_M_replace_facet"); + ++v5; + std::locale::_Impl::_M_install_facet(a2, (std::locale::_Impl *)i, v10, v11); + } + return result; +} +// 4D5922: variable 'v11' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C5EC: using guessed type int std::locale::id::_S_refcount; + +//----- (004D5980) -------------------------------------------------------- +void __userpurge std::locale::_Impl::_Impl( + _DWORD *a1@, + std::locale::_Impl *this, + const std::locale::_Impl *a3, + unsigned int a4) +{ + unsigned int v4; // edx + unsigned int v5; // eax + int v6; // ecx + unsigned int v7; // ebx + unsigned int v8; // eax + int v9; // eax + int v10; // edx + int v11; // ecx + int v12; // ebx + int v13; // eax + int v14; // edx + _DWORD *v15; // eax + unsigned int v16; // edx + unsigned int v17; // ecx + unsigned int v18; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+20h] [ebp-4Ch] + _DWORD *v21; // [esp+24h] [ebp-48h] + unsigned int Size; // [esp+28h] [ebp-44h] + + a1[1] = 0; + *a1 = a3; + a1[3] = 0; + v4 = *((_DWORD *)this + 2); + a1[4] = 0; + a1[2] = v4; + v5 = 4 * v4; + if ( v4 >= 0x20000000 ) + v5 = -1; + v6 = operator new[](v5); + v7 = a1[2]; + a1[1] = v6; + v8 = v7; + if ( v7 ) + { + v9 = 0; + while ( 1 ) + { + v10 = *(_DWORD *)(*((_DWORD *)this + 1) + 4 * v9); + *(_DWORD *)(v6 + 4 * v9) = v10; + if ( v10 ) + { + if ( _CRT_MT ) + _InterlockedAdd((volatile signed __int32 *)(v10 + 4), 1u); + else + ++*(_DWORD *)(v10 + 4); + v7 = a1[2]; + } + if ( v7 <= ++v9 ) + break; + v6 = a1[1]; + } + v8 = 4 * v7; + if ( v7 >= 0x20000000 ) + v8 = -1; + } + v11 = operator new[](v8); + v12 = a1[2]; + a1[3] = v11; + if ( v12 ) + { + v13 = 0; + while ( 1 ) + { + v14 = *(_DWORD *)(*((_DWORD *)this + 3) + 4 * v13); + *(_DWORD *)(v11 + 4 * v13) = v14; + if ( v14 ) + { + if ( _CRT_MT ) + _InterlockedAdd((volatile signed __int32 *)(v14 + 4), 1u); + else + ++*(_DWORD *)(v14 + 4); + } + if ( a1[2] <= (unsigned int)++v13 ) + break; + v11 = a1[3]; + } + } + v15 = (_DWORD *)operator new[](0x18u); + v16 = 0; + v17 = (unsigned int)(v15 + 1) & 0xFFFFFFFC; + a1[4] = v15; + *v15 = 0; + v15[5] = 0; + v18 = ((unsigned int)v15 - v17 + 24) & 0xFFFFFFFC; + do + { + *(_DWORD *)(v17 + v16) = 0; + v16 += 4; + } + while ( v16 < v18 ); + for ( lpuexcpt = 0; + lpuexcpt != (struct _Unwind_Exception *)24; + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 4) ) + { + if ( !*(_DWORD *)((char *)lpuexcpt + *((_DWORD *)this + 4)) ) + break; + Size = strlen(*(const char **)((char *)lpuexcpt + *((_DWORD *)this + 4))) + 1; + v21 = (_DWORD *)((char *)lpuexcpt + a1[4]); + *v21 = operator new[](Size); + memcpy(*(void **)((char *)lpuexcpt + a1[4]), *(const void **)((char *)lpuexcpt + *((_DWORD *)this + 4)), Size); + } +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004D5C40) -------------------------------------------------------- +void __userpurge std::locale::_Impl::_Impl(_DWORD *a1@, std::locale::_Impl *this, unsigned int a3) +{ + std::locale::facet **v4; // [esp+4h] [ebp-74h] + const std::locale::facet *v5; // [esp+8h] [ebp-70h] + const std::locale::facet *v6; // [esp+8h] [ebp-70h] + const std::locale::facet *v7; // [esp+8h] [ebp-70h] + const std::locale::facet *v8; // [esp+8h] [ebp-70h] + const std::locale::facet *v9; // [esp+8h] [ebp-70h] + const std::locale::facet *v10; // [esp+8h] [ebp-70h] + const std::locale::facet *v11; // [esp+8h] [ebp-70h] + const std::locale::facet *v12; // [esp+8h] [ebp-70h] + const std::locale::facet *v13; // [esp+8h] [ebp-70h] + const std::locale::facet *v14; // [esp+8h] [ebp-70h] + const std::locale::facet *v15; // [esp+8h] [ebp-70h] + const std::locale::facet *v16; // [esp+8h] [ebp-70h] + const std::locale::facet *v17; // [esp+8h] [ebp-70h] + const std::locale::facet *v18; // [esp+8h] [ebp-70h] + const std::locale::facet *v19; // [esp+8h] [ebp-70h] + const std::locale::facet *v20; // [esp+8h] [ebp-70h] + const std::locale::facet *v21; // [esp+8h] [ebp-70h] + const std::locale::facet *v22; // [esp+8h] [ebp-70h] + const std::locale::facet *v23; // [esp+8h] [ebp-70h] + const std::locale::facet *v24; // [esp+8h] [ebp-70h] + const std::locale::facet *v25; // [esp+8h] [ebp-70h] + const std::locale::facet *v26; // [esp+8h] [ebp-70h] + const std::locale::facet *v27; // [esp+8h] [ebp-70h] + const std::locale::facet *v28; // [esp+8h] [ebp-70h] + const std::locale::facet *v29; // [esp+8h] [ebp-70h] + const std::locale::facet *v30; // [esp+8h] [ebp-70h] + const std::locale::facet *v31; // [esp+8h] [ebp-70h] + const std::locale::facet *v32; // [esp+8h] [ebp-70h] + const std::locale::facet *v33; // [esp+8h] [ebp-70h] + const std::locale::facet *v34; // [esp+8h] [ebp-70h] + const std::locale::facet *v35; // [esp+8h] [ebp-70h] + const std::locale::facet *v36; // [esp+8h] [ebp-70h] + int v37; // [esp+14h] [ebp-64h] + int v38; // [esp+14h] [ebp-64h] + int v39; // [esp+14h] [ebp-64h] + int v40; // [esp+14h] [ebp-64h] + int v41; // [esp+14h] [ebp-64h] + int v42; // [esp+14h] [ebp-64h] + int v43; // [esp+14h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + int v45[8]; // [esp+58h] [ebp-20h] BYREF + + dword_50BDC8 = 0; + *a1 = this; + memset(&`anonymous namespace'::facet_vec, 0, 0xC0u); + a1[1] = &`anonymous namespace'::facet_vec; + a1[2] = 48; + memset(&`anonymous namespace'::cache_vec, 0, 0xC0u); + a1[3] = &`anonymous namespace'::cache_vec; + a1[4] = &`anonymous namespace'::name_vec; + dword_50BDCC = 0; + dword_50BDD0 = 0; + dword_50BDD4 = 0; + dword_50BDD8 = 0; + `anonymous namespace'::name_vec = (int)&`anonymous namespace'::name_c; + `anonymous namespace'::name_c = *(_WORD *)std::locale::facet::_S_get_c_name(); + std::ctype::ctype(`anonymous namespace'::ctype_c, 0, 0, 1); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::ctype::id, + (const std::locale::id *)`anonymous namespace'::ctype_c, + v5); + std::codecvt::codecvt(`anonymous namespace'::codecvt_c, 1); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::codecvt::id, + (const std::locale::id *)`anonymous namespace'::codecvt_c, + v6); + dword_50B424 = 1; + word_50B444 = 0; + `anonymous namespace'::numpunct_cache_c = (int)&off_51AF60; + dword_50B428 = 0; + dword_50B42C = 0; + byte_50B430 = 0; + dword_50B434 = 0; + dword_50B438 = 0; + dword_50B43C = 0; + dword_50B440 = 0; + byte_50B484 = 0; + dword_50B324 = 1; + `anonymous namespace'::numpunct_c = &off_51A688; + dword_50B328 = (int)&`anonymous namespace'::numpunct_cache_c; + std::numpunct::_M_initialize_numpunct(&`anonymous namespace'::numpunct_c, 0); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::numpunct::id, + (const std::locale::id *)&`anonymous namespace'::numpunct_c, + v7); + dword_50BFA4 = 1; + `anonymous namespace'::num_get_c = &off_51B5C8; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::num_get>::id, + (const std::locale::id *)&`anonymous namespace'::num_get_c, + v8); + dword_50BFB4 = 1; + `anonymous namespace'::num_put_c = &off_51B640; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::num_put>::id, + (const std::locale::id *)&`anonymous namespace'::num_put_c, + v9); + dword_50BEBC = 1; + `anonymous namespace'::collate_c = &off_51A618; + dword_50BEC0 = std::locale::facet::_S_get_c_locale(); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::collate::id, + (const std::locale::id *)&`anonymous namespace'::collate_c, + v10); + dword_50B724 = 1; + `anonymous namespace'::moneypunct_cache_cf = (int)&off_51B084; + dword_50B728 = 0; + dword_50B72C = 0; + word_50B730 = 0; + byte_50B732 = 0; + dword_50B734 = 0; + dword_50B738 = 0; + dword_50B73C = 0; + dword_50B740 = 0; + dword_50B744 = 0; + dword_50B748 = 0; + dword_50B74C = 0; + dword_50B750 = 0; + dword_50B754 = 0; + byte_50B763 = 0; + dword_50B3CC = 1; + `anonymous namespace'::moneypunct_cf = &off_51A1D0; + dword_50B3D0 = (int)&`anonymous namespace'::moneypunct_cache_cf; + std::moneypunct::_M_initialize_moneypunct(&`anonymous namespace'::moneypunct_cf, 0, 0); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::moneypunct::id, + (const std::locale::id *)&`anonymous namespace'::moneypunct_cf, + v11); + dword_50B784 = 1; + `anonymous namespace'::moneypunct_cache_ct = (int)&off_51B094; + dword_50B788 = 0; + dword_50B78C = 0; + word_50B790 = 0; + byte_50B792 = 0; + dword_50B794 = 0; + dword_50B798 = 0; + dword_50B79C = 0; + dword_50B7A0 = 0; + dword_50B7A4 = 0; + dword_50B7A8 = 0; + dword_50B7AC = 0; + dword_50B7B0 = 0; + dword_50B7B4 = 0; + byte_50B7C3 = 0; + dword_50B3D8 = 1; + `anonymous namespace'::moneypunct_ct = &off_51A204; + dword_50B3DC = (int)&`anonymous namespace'::moneypunct_cache_ct; + std::moneypunct::_M_initialize_moneypunct(&`anonymous namespace'::moneypunct_ct, 0, 0); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::moneypunct::id, + (const std::locale::id *)&`anonymous namespace'::moneypunct_ct, + v12); + dword_50B36C = 1; + `anonymous namespace'::money_get_c = &off_51A728; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::money_get>::id, + (const std::locale::id *)&`anonymous namespace'::money_get_c, + v13); + dword_50B37C = 1; + `anonymous namespace'::money_put_c = &off_51A758; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::money_put>::id, + (const std::locale::id *)&`anonymous namespace'::money_put_c, + v14); + dword_50B564 = 1; + `anonymous namespace'::timepunct_cache_c = (int)&off_51AF94; + dword_50B568 = 0; + dword_50B56C = 0; + dword_50B570 = 0; + dword_50B574 = 0; + dword_50B578 = 0; + dword_50B57C = 0; + dword_50B580 = 0; + dword_50B584 = 0; + dword_50B588 = 0; + dword_50B58C = 0; + dword_50B590 = 0; + dword_50B594 = 0; + dword_50B598 = 0; + dword_50B59C = 0; + dword_50B5A0 = 0; + dword_50B5A4 = 0; + dword_50B5A8 = 0; + dword_50B5AC = 0; + dword_50B5B0 = 0; + dword_50B5B4 = 0; + dword_50B5B8 = 0; + dword_50B5BC = 0; + dword_50B5C0 = 0; + dword_50B5C4 = 0; + dword_50B5C8 = 0; + dword_50B5CC = 0; + dword_50B5D0 = 0; + dword_50B5D4 = 0; + dword_50B5D8 = 0; + dword_50B5DC = 0; + dword_50B5E0 = 0; + dword_50B5E4 = 0; + dword_50B5E8 = 0; + dword_50B5EC = 0; + dword_50B5F0 = 0; + dword_50B5F4 = 0; + dword_50B5F8 = 0; + dword_50B5FC = 0; + dword_50B600 = 0; + dword_50B604 = 0; + dword_50B608 = 0; + dword_50B60C = 0; + dword_50B610 = 0; + dword_50B614 = 0; + dword_50B618 = 0; + dword_50B61C = 0; + dword_50B620 = 0; + byte_50B624 = 0; + std::__timepunct::__timepunct( + `anonymous namespace'::timepunct_c, + (int)&`anonymous namespace'::timepunct_cache_c, + 1); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::__timepunct::id, + (const std::locale::id *)`anonymous namespace'::timepunct_c, + v15); + dword_50B33C = 1; + `anonymous namespace'::time_get_c = &off_51A6D0; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::time_get>::id, + (const std::locale::id *)&`anonymous namespace'::time_get_c, + v16); + dword_50B34C = 1; + `anonymous namespace'::time_put_c = &off_51B794; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::time_put>::id, + (const std::locale::id *)&`anonymous namespace'::time_put_c, + v17); + std::messages::messages(`anonymous namespace'::messages_c, 1); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::messages::id, + (const std::locale::id *)`anonymous namespace'::messages_c, + v18); + std::ctype::ctype(`anonymous namespace'::ctype_w, 1); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::ctype::id, + (const std::locale::id *)`anonymous namespace'::ctype_w, + v19); + std::codecvt::codecvt(`anonymous namespace'::codecvt_w, 1); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::codecvt::id, + (const std::locale::id *)`anonymous namespace'::codecvt_w, + v20); + dword_50B4A4 = 1; + `anonymous namespace'::numpunct_cache_w = (int)&off_51AF70; + dword_50B4A8 = 0; + dword_50B4AC = 0; + byte_50B4B0 = 0; + dword_50B4B4 = 0; + dword_50B4B8 = 0; + dword_50B4BC = 0; + dword_50B4C0 = 0; + dword_50B4C4 = 0; + byte_50B544 = 0; + dword_50B330 = 1; + `anonymous namespace'::numpunct_w = &off_51A6AC; + dword_50B334 = (int)&`anonymous namespace'::numpunct_cache_w; + std::numpunct::_M_initialize_numpunct(&`anonymous namespace'::numpunct_w, 0); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::numpunct::id, + (const std::locale::id *)&`anonymous namespace'::numpunct_w, + v21); + dword_50BFAC = 1; + `anonymous namespace'::num_get_w = &off_51B604; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::num_get>::id, + (const std::locale::id *)&`anonymous namespace'::num_get_w, + v22); + dword_50BFBC = 1; + `anonymous namespace'::num_put_w = &off_51B670; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::num_put>::id, + (const std::locale::id *)&`anonymous namespace'::num_put_w, + v23); + dword_50BEC8 = 1; + `anonymous namespace'::collate_w = &off_51A634; + dword_50BECC = std::locale::facet::_S_get_c_locale(); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::collate::id, + (const std::locale::id *)&`anonymous namespace'::collate_w, + v24); + dword_50B7E4 = 1; + `anonymous namespace'::moneypunct_cache_wf = (int)&off_51B0A4; + dword_50B7E8 = 0; + dword_50B7EC = 0; + byte_50B7F0 = 0; + dword_50B7F2 = 0; + dword_50B7F8 = 0; + dword_50B7FC = 0; + dword_50B800 = 0; + dword_50B804 = 0; + dword_50B808 = 0; + dword_50B80C = 0; + dword_50B810 = 0; + dword_50B814 = 0; + dword_50B818 = 0; + byte_50B832 = 0; + dword_50B3E4 = 1; + `anonymous namespace'::moneypunct_wf = &off_51A238; + dword_50B3E8 = (int)&`anonymous namespace'::moneypunct_cache_wf; + std::moneypunct::_M_initialize_moneypunct(&`anonymous namespace'::moneypunct_wf, 0, 0); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::moneypunct::id, + (const std::locale::id *)&`anonymous namespace'::moneypunct_wf, + v25); + dword_50B844 = 1; + `anonymous namespace'::moneypunct_cache_wt = (int)&off_51B0B4; + dword_50B848 = 0; + dword_50B84C = 0; + byte_50B850 = 0; + dword_50B852 = 0; + dword_50B858 = 0; + dword_50B85C = 0; + dword_50B860 = 0; + dword_50B864 = 0; + dword_50B868 = 0; + dword_50B86C = 0; + dword_50B870 = 0; + dword_50B874 = 0; + dword_50B878 = 0; + byte_50B892 = 0; + dword_50B3F0 = 1; + `anonymous namespace'::moneypunct_wt = &off_51A26C; + dword_50B3F4 = (int)&`anonymous namespace'::moneypunct_cache_wt; + std::moneypunct::_M_initialize_moneypunct(&`anonymous namespace'::moneypunct_wt, 0, 0); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::moneypunct::id, + (const std::locale::id *)&`anonymous namespace'::moneypunct_wt, + v26); + dword_50B374 = 1; + `anonymous namespace'::money_get_w = &off_51A740; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::money_get>::id, + (const std::locale::id *)&`anonymous namespace'::money_get_w, + v27); + dword_50B384 = 1; + `anonymous namespace'::money_put_w = &off_51A770; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::money_put>::id, + (const std::locale::id *)&`anonymous namespace'::money_put_w, + v28); + dword_50B644 = 1; + `anonymous namespace'::timepunct_cache_w = (int)&off_51AFA4; + dword_50B648 = 0; + dword_50B64C = 0; + dword_50B650 = 0; + dword_50B654 = 0; + dword_50B658 = 0; + dword_50B65C = 0; + dword_50B660 = 0; + dword_50B664 = 0; + dword_50B668 = 0; + dword_50B66C = 0; + dword_50B670 = 0; + dword_50B674 = 0; + dword_50B678 = 0; + dword_50B67C = 0; + dword_50B680 = 0; + dword_50B684 = 0; + dword_50B688 = 0; + dword_50B68C = 0; + dword_50B690 = 0; + dword_50B694 = 0; + dword_50B698 = 0; + dword_50B69C = 0; + dword_50B6A0 = 0; + dword_50B6A4 = 0; + dword_50B6A8 = 0; + dword_50B6AC = 0; + dword_50B6B0 = 0; + dword_50B6B4 = 0; + dword_50B6B8 = 0; + dword_50B6BC = 0; + dword_50B6C0 = 0; + dword_50B6C4 = 0; + dword_50B6C8 = 0; + dword_50B6CC = 0; + dword_50B6D0 = 0; + dword_50B6D4 = 0; + dword_50B6D8 = 0; + dword_50B6DC = 0; + dword_50B6E0 = 0; + dword_50B6E4 = 0; + dword_50B6E8 = 0; + dword_50B6EC = 0; + dword_50B6F0 = 0; + dword_50B6F4 = 0; + dword_50B6F8 = 0; + dword_50B6FC = 0; + dword_50B700 = 0; + byte_50B704 = 0; + std::__timepunct::__timepunct( + `anonymous namespace'::timepunct_w, + (int)&`anonymous namespace'::timepunct_cache_w, + 1); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::__timepunct::id, + (const std::locale::id *)`anonymous namespace'::timepunct_w, + v29); + dword_50B344 = 1; + `anonymous namespace'::time_get_w = &off_51A6FC; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::time_get>::id, + (const std::locale::id *)&`anonymous namespace'::time_get_w, + v30); + dword_50B354 = 1; + `anonymous namespace'::time_put_w = &off_51B7A8; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::time_put>::id, + (const std::locale::id *)&`anonymous namespace'::time_put_w, + v31); + std::messages::messages(`anonymous namespace'::messages_w, 1); + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::messages::id, + (const std::locale::id *)`anonymous namespace'::messages_w, + v32); + dword_50B35C = 1; + `anonymous namespace'::codecvt_c16 = &off_51B50C; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::codecvt::id, + (const std::locale::id *)&`anonymous namespace'::codecvt_c16, + v33); + dword_50B364 = 1; + `anonymous namespace'::codecvt_c32 = &off_51B4B4; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::codecvt::id, + (const std::locale::id *)&`anonymous namespace'::codecvt_c32, + v34); + dword_50B3FC = 1; + `anonymous namespace'::codecvt_c16_c8 = &off_51B4E0; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::codecvt::id, + (const std::locale::id *)&`anonymous namespace'::codecvt_c16_c8, + v35); + dword_50B404 = 1; + `anonymous namespace'::codecvt_c32_c8 = &off_51B488; + std::locale::_Impl::_M_install_facet( + a1, + (std::locale::_Impl *)&std::codecvt::id, + (const std::locale::id *)&`anonymous namespace'::codecvt_c32_c8, + v36); + v45[0] = (int)&`anonymous namespace'::numpunct_cache_c; + v45[1] = (int)&`anonymous namespace'::moneypunct_cache_cf; + v45[2] = (int)&`anonymous namespace'::moneypunct_cache_ct; + v45[3] = (int)&`anonymous namespace'::numpunct_cache_w; + v45[4] = (int)&`anonymous namespace'::moneypunct_cache_wf; + v45[5] = (int)&`anonymous namespace'::moneypunct_cache_wt; + std::locale::_Impl::_M_init_extra((int)a1, (std::locale::_Impl *)v45, v4); + v37 = a1[3]; + *(_DWORD *)(v37 + 4 * std::locale::id::_M_id(&std::numpunct::id)) = &`anonymous namespace'::numpunct_cache_c; + v38 = a1[3]; + *(_DWORD *)(v38 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = &`anonymous namespace'::moneypunct_cache_cf; + v39 = a1[3]; + *(_DWORD *)(v39 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = &`anonymous namespace'::moneypunct_cache_ct; + v40 = a1[3]; + *(_DWORD *)(v40 + 4 * std::locale::id::_M_id(&std::__timepunct::id)) = &`anonymous namespace'::timepunct_cache_c; + v41 = a1[3]; + *(_DWORD *)(v41 + 4 * std::locale::id::_M_id(&std::numpunct::id)) = &`anonymous namespace'::numpunct_cache_w; + v42 = a1[3]; + *(_DWORD *)(v42 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = &`anonymous namespace'::moneypunct_cache_wf; + v43 = a1[3]; + *(_DWORD *)(v43 + 4 * std::locale::id::_M_id(&std::moneypunct::id)) = &`anonymous namespace'::moneypunct_cache_wt; + lpuexcpt = (struct _Unwind_Exception *)a1[3]; + *((_DWORD *)lpuexcpt + std::locale::id::_M_id(&std::__timepunct::id)) = &`anonymous namespace'::timepunct_cache_w; +} +// 4D5D32: variable 'v5' is possibly undefined +// 4D5D60: variable 'v6' is possibly undefined +// 4D5E21: variable 'v7' is possibly undefined +// 4D5E4F: variable 'v8' is possibly undefined +// 4D5E7D: variable 'v9' is possibly undefined +// 4D5EC3: variable 'v10' is possibly undefined +// 4D5FBE: variable 'v11' is possibly undefined +// 4D60B8: variable 'v12' is possibly undefined +// 4D60E6: variable 'v13' is possibly undefined +// 4D6114: variable 'v14' is possibly undefined +// 4D633B: variable 'v15' is possibly undefined +// 4D6369: variable 'v16' is possibly undefined +// 4D6397: variable 'v17' is possibly undefined +// 4D63C5: variable 'v18' is possibly undefined +// 4D63F3: variable 'v19' is possibly undefined +// 4D6421: variable 'v20' is possibly undefined +// 4D64E3: variable 'v21' is possibly undefined +// 4D6511: variable 'v22' is possibly undefined +// 4D653F: variable 'v23' is possibly undefined +// 4D6585: variable 'v24' is possibly undefined +// 4D6681: variable 'v25' is possibly undefined +// 4D677D: variable 'v26' is possibly undefined +// 4D67AB: variable 'v27' is possibly undefined +// 4D67D9: variable 'v28' is possibly undefined +// 4D6A00: variable 'v29' is possibly undefined +// 4D6A2E: variable 'v30' is possibly undefined +// 4D6A5C: variable 'v31' is possibly undefined +// 4D6A8A: variable 'v32' is possibly undefined +// 4D6AB8: variable 'v33' is possibly undefined +// 4D6AE6: variable 'v34' is possibly undefined +// 4D6B14: variable 'v35' is possibly undefined +// 4D6B42: variable 'v36' is possibly undefined +// 4D6B7D: variable 'v4' is possibly undefined +// 50B300: using guessed type _DWORD `anonymous namespace'::messages_c[4]; +// 50B310: using guessed type _DWORD `anonymous namespace'::messages_w[4]; +// 50B324: using guessed type int dword_50B324; +// 50B328: using guessed type int dword_50B328; +// 50B330: using guessed type int dword_50B330; +// 50B334: using guessed type int dword_50B334; +// 50B33C: using guessed type int dword_50B33C; +// 50B344: using guessed type int dword_50B344; +// 50B34C: using guessed type int dword_50B34C; +// 50B354: using guessed type int dword_50B354; +// 50B35C: using guessed type int dword_50B35C; +// 50B364: using guessed type int dword_50B364; +// 50B36C: using guessed type int dword_50B36C; +// 50B374: using guessed type int dword_50B374; +// 50B37C: using guessed type int dword_50B37C; +// 50B384: using guessed type int dword_50B384; +// 50B388: using guessed type _DWORD `anonymous namespace'::timepunct_c[5]; +// 50B39C: using guessed type _DWORD `anonymous namespace'::timepunct_w[5]; +// 50B3CC: using guessed type int dword_50B3CC; +// 50B3D0: using guessed type int dword_50B3D0; +// 50B3D8: using guessed type int dword_50B3D8; +// 50B3DC: using guessed type int dword_50B3DC; +// 50B3E4: using guessed type int dword_50B3E4; +// 50B3E8: using guessed type int dword_50B3E8; +// 50B3F0: using guessed type int dword_50B3F0; +// 50B3F4: using guessed type int dword_50B3F4; +// 50B3FC: using guessed type int dword_50B3FC; +// 50B404: using guessed type int dword_50B404; +// 50B420: using guessed type int `anonymous namespace'::numpunct_cache_c; +// 50B424: using guessed type int dword_50B424; +// 50B428: using guessed type int dword_50B428; +// 50B42C: using guessed type int dword_50B42C; +// 50B430: using guessed type char byte_50B430; +// 50B434: using guessed type int dword_50B434; +// 50B438: using guessed type int dword_50B438; +// 50B43C: using guessed type int dword_50B43C; +// 50B440: using guessed type int dword_50B440; +// 50B444: using guessed type __int16 word_50B444; +// 50B484: using guessed type char byte_50B484; +// 50B4A0: using guessed type int `anonymous namespace'::numpunct_cache_w; +// 50B4A4: using guessed type int dword_50B4A4; +// 50B4A8: using guessed type int dword_50B4A8; +// 50B4AC: using guessed type int dword_50B4AC; +// 50B4B0: using guessed type char byte_50B4B0; +// 50B4B4: using guessed type int dword_50B4B4; +// 50B4B8: using guessed type int dword_50B4B8; +// 50B4BC: using guessed type int dword_50B4BC; +// 50B4C0: using guessed type int dword_50B4C0; +// 50B4C4: using guessed type int dword_50B4C4; +// 50B544: using guessed type char byte_50B544; +// 50B560: using guessed type int `anonymous namespace'::timepunct_cache_c; +// 50B564: using guessed type int dword_50B564; +// 50B568: using guessed type int dword_50B568; +// 50B56C: using guessed type int dword_50B56C; +// 50B570: using guessed type int dword_50B570; +// 50B574: using guessed type int dword_50B574; +// 50B578: using guessed type int dword_50B578; +// 50B57C: using guessed type int dword_50B57C; +// 50B580: using guessed type int dword_50B580; +// 50B584: using guessed type int dword_50B584; +// 50B588: using guessed type int dword_50B588; +// 50B58C: using guessed type int dword_50B58C; +// 50B590: using guessed type int dword_50B590; +// 50B594: using guessed type int dword_50B594; +// 50B598: using guessed type int dword_50B598; +// 50B59C: using guessed type int dword_50B59C; +// 50B5A0: using guessed type int dword_50B5A0; +// 50B5A4: using guessed type int dword_50B5A4; +// 50B5A8: using guessed type int dword_50B5A8; +// 50B5AC: using guessed type int dword_50B5AC; +// 50B5B0: using guessed type int dword_50B5B0; +// 50B5B4: using guessed type int dword_50B5B4; +// 50B5B8: using guessed type int dword_50B5B8; +// 50B5BC: using guessed type int dword_50B5BC; +// 50B5C0: using guessed type int dword_50B5C0; +// 50B5C4: using guessed type int dword_50B5C4; +// 50B5C8: using guessed type int dword_50B5C8; +// 50B5CC: using guessed type int dword_50B5CC; +// 50B5D0: using guessed type int dword_50B5D0; +// 50B5D4: using guessed type int dword_50B5D4; +// 50B5D8: using guessed type int dword_50B5D8; +// 50B5DC: using guessed type int dword_50B5DC; +// 50B5E0: using guessed type int dword_50B5E0; +// 50B5E4: using guessed type int dword_50B5E4; +// 50B5E8: using guessed type int dword_50B5E8; +// 50B5EC: using guessed type int dword_50B5EC; +// 50B5F0: using guessed type int dword_50B5F0; +// 50B5F4: using guessed type int dword_50B5F4; +// 50B5F8: using guessed type int dword_50B5F8; +// 50B5FC: using guessed type int dword_50B5FC; +// 50B600: using guessed type int dword_50B600; +// 50B604: using guessed type int dword_50B604; +// 50B608: using guessed type int dword_50B608; +// 50B60C: using guessed type int dword_50B60C; +// 50B610: using guessed type int dword_50B610; +// 50B614: using guessed type int dword_50B614; +// 50B618: using guessed type int dword_50B618; +// 50B61C: using guessed type int dword_50B61C; +// 50B620: using guessed type int dword_50B620; +// 50B624: using guessed type char byte_50B624; +// 50B640: using guessed type int `anonymous namespace'::timepunct_cache_w; +// 50B644: using guessed type int dword_50B644; +// 50B648: using guessed type int dword_50B648; +// 50B64C: using guessed type int dword_50B64C; +// 50B650: using guessed type int dword_50B650; +// 50B654: using guessed type int dword_50B654; +// 50B658: using guessed type int dword_50B658; +// 50B65C: using guessed type int dword_50B65C; +// 50B660: using guessed type int dword_50B660; +// 50B664: using guessed type int dword_50B664; +// 50B668: using guessed type int dword_50B668; +// 50B66C: using guessed type int dword_50B66C; +// 50B670: using guessed type int dword_50B670; +// 50B674: using guessed type int dword_50B674; +// 50B678: using guessed type int dword_50B678; +// 50B67C: using guessed type int dword_50B67C; +// 50B680: using guessed type int dword_50B680; +// 50B684: using guessed type int dword_50B684; +// 50B688: using guessed type int dword_50B688; +// 50B68C: using guessed type int dword_50B68C; +// 50B690: using guessed type int dword_50B690; +// 50B694: using guessed type int dword_50B694; +// 50B698: using guessed type int dword_50B698; +// 50B69C: using guessed type int dword_50B69C; +// 50B6A0: using guessed type int dword_50B6A0; +// 50B6A4: using guessed type int dword_50B6A4; +// 50B6A8: using guessed type int dword_50B6A8; +// 50B6AC: using guessed type int dword_50B6AC; +// 50B6B0: using guessed type int dword_50B6B0; +// 50B6B4: using guessed type int dword_50B6B4; +// 50B6B8: using guessed type int dword_50B6B8; +// 50B6BC: using guessed type int dword_50B6BC; +// 50B6C0: using guessed type int dword_50B6C0; +// 50B6C4: using guessed type int dword_50B6C4; +// 50B6C8: using guessed type int dword_50B6C8; +// 50B6CC: using guessed type int dword_50B6CC; +// 50B6D0: using guessed type int dword_50B6D0; +// 50B6D4: using guessed type int dword_50B6D4; +// 50B6D8: using guessed type int dword_50B6D8; +// 50B6DC: using guessed type int dword_50B6DC; +// 50B6E0: using guessed type int dword_50B6E0; +// 50B6E4: using guessed type int dword_50B6E4; +// 50B6E8: using guessed type int dword_50B6E8; +// 50B6EC: using guessed type int dword_50B6EC; +// 50B6F0: using guessed type int dword_50B6F0; +// 50B6F4: using guessed type int dword_50B6F4; +// 50B6F8: using guessed type int dword_50B6F8; +// 50B6FC: using guessed type int dword_50B6FC; +// 50B700: using guessed type int dword_50B700; +// 50B704: using guessed type char byte_50B704; +// 50B720: using guessed type int `anonymous namespace'::moneypunct_cache_cf; +// 50B724: using guessed type int dword_50B724; +// 50B728: using guessed type int dword_50B728; +// 50B72C: using guessed type int dword_50B72C; +// 50B730: using guessed type __int16 word_50B730; +// 50B732: using guessed type char byte_50B732; +// 50B734: using guessed type int dword_50B734; +// 50B738: using guessed type int dword_50B738; +// 50B73C: using guessed type int dword_50B73C; +// 50B740: using guessed type int dword_50B740; +// 50B744: using guessed type int dword_50B744; +// 50B748: using guessed type int dword_50B748; +// 50B74C: using guessed type int dword_50B74C; +// 50B750: using guessed type int dword_50B750; +// 50B754: using guessed type int dword_50B754; +// 50B763: using guessed type char byte_50B763; +// 50B780: using guessed type int `anonymous namespace'::moneypunct_cache_ct; +// 50B784: using guessed type int dword_50B784; +// 50B788: using guessed type int dword_50B788; +// 50B78C: using guessed type int dword_50B78C; +// 50B790: using guessed type __int16 word_50B790; +// 50B792: using guessed type char byte_50B792; +// 50B794: using guessed type int dword_50B794; +// 50B798: using guessed type int dword_50B798; +// 50B79C: using guessed type int dword_50B79C; +// 50B7A0: using guessed type int dword_50B7A0; +// 50B7A4: using guessed type int dword_50B7A4; +// 50B7A8: using guessed type int dword_50B7A8; +// 50B7AC: using guessed type int dword_50B7AC; +// 50B7B0: using guessed type int dword_50B7B0; +// 50B7B4: using guessed type int dword_50B7B4; +// 50B7C3: using guessed type char byte_50B7C3; +// 50B7E0: using guessed type int `anonymous namespace'::moneypunct_cache_wf; +// 50B7E4: using guessed type int dword_50B7E4; +// 50B7E8: using guessed type int dword_50B7E8; +// 50B7EC: using guessed type int dword_50B7EC; +// 50B7F0: using guessed type char byte_50B7F0; +// 50B7F2: using guessed type int dword_50B7F2; +// 50B7F8: using guessed type int dword_50B7F8; +// 50B7FC: using guessed type int dword_50B7FC; +// 50B800: using guessed type int dword_50B800; +// 50B804: using guessed type int dword_50B804; +// 50B808: using guessed type int dword_50B808; +// 50B80C: using guessed type int dword_50B80C; +// 50B810: using guessed type int dword_50B810; +// 50B814: using guessed type int dword_50B814; +// 50B818: using guessed type int dword_50B818; +// 50B832: using guessed type char byte_50B832; +// 50B840: using guessed type int `anonymous namespace'::moneypunct_cache_wt; +// 50B844: using guessed type int dword_50B844; +// 50B848: using guessed type int dword_50B848; +// 50B84C: using guessed type int dword_50B84C; +// 50B850: using guessed type char byte_50B850; +// 50B852: using guessed type int dword_50B852; +// 50B858: using guessed type int dword_50B858; +// 50B85C: using guessed type int dword_50B85C; +// 50B860: using guessed type int dword_50B860; +// 50B864: using guessed type int dword_50B864; +// 50B868: using guessed type int dword_50B868; +// 50B86C: using guessed type int dword_50B86C; +// 50B870: using guessed type int dword_50B870; +// 50B874: using guessed type int dword_50B874; +// 50B878: using guessed type int dword_50B878; +// 50B892: using guessed type char byte_50B892; +// 50B8A0: using guessed type __int16 `anonymous namespace'::name_c; +// 50B8C0: using guessed type _DWORD `anonymous namespace'::ctype_c[136]; +// 50BAE0: using guessed type _DWORD `anonymous namespace'::ctype_w[184]; +// 50BDC4: using guessed type int `anonymous namespace'::name_vec; +// 50BDC8: using guessed type int dword_50BDC8; +// 50BDCC: using guessed type int dword_50BDCC; +// 50BDD0: using guessed type int dword_50BDD0; +// 50BDD4: using guessed type int dword_50BDD4; +// 50BDD8: using guessed type int dword_50BDD8; +// 50BEA0: using guessed type _DWORD `anonymous namespace'::codecvt_c[3]; +// 50BEAC: using guessed type _DWORD `anonymous namespace'::codecvt_w[3]; +// 50BEBC: using guessed type int dword_50BEBC; +// 50BEC0: using guessed type int dword_50BEC0; +// 50BEC8: using guessed type int dword_50BEC8; +// 50BECC: using guessed type int dword_50BECC; +// 50BFA4: using guessed type int dword_50BFA4; +// 50BFAC: using guessed type int dword_50BFAC; +// 50BFB4: using guessed type int dword_50BFB4; +// 50BFBC: using guessed type int dword_50BFBC; +// 50C49C: using guessed type signed __int32 std::__timepunct::id; +// 50C4A0: using guessed type signed __int32 std::__timepunct::id; +// 50C5E0: using guessed type signed __int32 std::ctype::id; +// 50C5E4: using guessed type signed __int32 std::ctype::id; +// 50C608: using guessed type signed __int32 std::moneypunct::id; +// 50C60C: using guessed type signed __int32 std::moneypunct::id; +// 50C610: using guessed type signed __int32 std::moneypunct::id; +// 50C614: using guessed type signed __int32 std::moneypunct::id; +// 50C618: using guessed type signed __int32 std::collate::id; +// 50C61C: using guessed type signed __int32 std::collate::id; +// 50C620: using guessed type signed __int32 std::messages::id; +// 50C624: using guessed type signed __int32 std::messages::id; +// 50C628: using guessed type signed __int32 std::numpunct::id; +// 50C62C: using guessed type signed __int32 std::numpunct::id; +// 50C630: using guessed type signed __int32 std::time_get>::id; +// 50C634: using guessed type signed __int32 std::time_get>::id; +// 50C638: using guessed type signed __int32 std::money_get>::id; +// 50C63C: using guessed type signed __int32 std::money_get>::id; +// 50C640: using guessed type signed __int32 std::money_put>::id; +// 50C644: using guessed type signed __int32 std::money_put>::id; +// 50C658: using guessed type signed __int32 std::codecvt::id; +// 50C65C: using guessed type signed __int32 std::codecvt::id; +// 50C668: using guessed type signed __int32 std::num_get>::id; +// 50C66C: using guessed type signed __int32 std::num_get>::id; +// 50C670: using guessed type signed __int32 std::num_put>::id; +// 50C674: using guessed type signed __int32 std::num_put>::id; +// 50C698: using guessed type signed __int32 std::time_put>::id; +// 50C69C: using guessed type signed __int32 std::time_put>::id; +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A618: using guessed type int (*off_51A618)(); +// 51A634: using guessed type int (*off_51A634)(); +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A6D0: using guessed type int (*off_51A6D0)(); +// 51A6FC: using guessed type int (*off_51A6FC)(); +// 51A728: using guessed type int (*off_51A728)(); +// 51A740: using guessed type int (*off_51A740)(); +// 51A758: using guessed type int (*off_51A758)(); +// 51A770: using guessed type int (*off_51A770)(); +// 51AF60: using guessed type int (*off_51AF60)(); +// 51AF70: using guessed type int (*off_51AF70)(); +// 51AF94: using guessed type int (*off_51AF94)(); +// 51AFA4: using guessed type int (*off_51AFA4)(); +// 51B084: using guessed type int (*off_51B084)(); +// 51B094: using guessed type int (*off_51B094)(); +// 51B0A4: using guessed type int (*off_51B0A4)(); +// 51B0B4: using guessed type int (*off_51B0B4)(); +// 51B488: using guessed type int (*off_51B488)(); +// 51B4B4: using guessed type int (*off_51B4B4)(); +// 51B4E0: using guessed type int (*off_51B4E0)(); +// 51B50C: using guessed type int (*off_51B50C)(); +// 51B5C8: using guessed type int (*off_51B5C8)(); +// 51B604: using guessed type int (*off_51B604)(); +// 51B640: using guessed type int (*off_51B640)(); +// 51B670: using guessed type int (*off_51B670)(); +// 51B794: using guessed type int (*off_51B794)(); +// 51B7A8: using guessed type int (*off_51B7A8)(); + +//----- (004D6D20) -------------------------------------------------------- +void __fastcall std::locale::_Impl::~_Impl(_DWORD *a1) +{ + _DWORD *v1; // eax + volatile signed __int32 *v2; // ecx + signed __int32 v3; // eax + void (*v4)(void); // eax + _DWORD *v5; // eax + volatile signed __int32 *v6; // ecx + signed __int32 v7; // eax + void (*v8)(void); // eax + char *v9; // edx + unsigned int v11; // [esp+14h] [ebp-58h] + int v12; // [esp+14h] [ebp-58h] + unsigned int v13; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)a1[1]; + if ( v1 ) + { + if ( !a1[2] ) + goto LABEL_13; + v11 = 0; + do + { + v2 = (volatile signed __int32 *)v1[v11]; + if ( v2 ) + { + if ( _CRT_MT ) + { + v3 = _InterlockedExchangeAdd(v2 + 1, 0xFFFFFFFF); + } + else + { + v3 = *((_DWORD *)v2 + 1); + *((_DWORD *)v2 + 1) = v3 - 1; + } + if ( v3 == 1 ) + { + v4 = *(void (**)(void))(*v2 + 4); + if ( (char *)v4 == (char *)std::locale::facet::~facet ) + operator delete((void *)v2); + else + v4(); + } + v1 = (_DWORD *)a1[1]; + } + ++v11; + } + while ( a1[2] > v11 ); + if ( v1 ) +LABEL_13: + operator delete[](v1); + } + v5 = (_DWORD *)a1[3]; + if ( v5 ) + { + if ( !a1[2] ) + goto LABEL_26; + v13 = 0; + do + { + v6 = (volatile signed __int32 *)v5[v13]; + if ( v6 ) + { + if ( _CRT_MT ) + { + v7 = _InterlockedExchangeAdd(v6 + 1, 0xFFFFFFFF); + } + else + { + v7 = *((_DWORD *)v6 + 1); + *((_DWORD *)v6 + 1) = v7 - 1; + } + if ( v7 == 1 ) + { + v8 = *(void (**)(void))(*v6 + 4); + if ( (char *)v8 == (char *)std::locale::facet::~facet ) + operator delete((void *)v6); + else + v8(); + } + v5 = (_DWORD *)a1[3]; + } + ++v13; + } + while ( a1[2] > v13 ); + if ( v5 ) +LABEL_26: + operator delete[](v5); + } + v12 = 0; + v9 = (char *)a1[4]; + if ( v9 ) + { + do + { + if ( *(_DWORD *)&v9[v12] ) + { + operator delete[](*(void **)&v9[v12]); + v9 = (char *)a1[4]; + } + v12 += 4; + } + while ( v12 != 24 ); + if ( v9 ) + operator delete[](v9); + } +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004D6F90) -------------------------------------------------------- +int *const *std::locale::facet::_S_get_c_name() +{ + return &std::locale::facet::_S_c_name; +} + +//----- (004D6FA0) -------------------------------------------------------- +int std::locale::facet::_S_get_c_locale() +{ + int result; // eax + + if ( _CRT_MT ) + { + __gthr_win32_once((int)&std::locale::facet::_S_once, (void (*)(void))std::locale::facet::_S_initialize_once); + return std::locale::facet::_S_c_locale; + } + else + { + result = std::locale::facet::_S_c_locale; + if ( !std::locale::facet::_S_c_locale ) + { + std::locale::facet::_S_create_c_locale( + (std::locale::facet *)&std::locale::facet::_S_c_locale, + (int **)&std::locale::facet::_S_c_name); + return std::locale::facet::_S_c_locale; + } + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C5F0: using guessed type int std::locale::facet::_S_c_locale; + +//----- (004D7010) -------------------------------------------------------- +int __cdecl std::locale::facet::_S_clone_c_locale() +{ + return 0; +} + +//----- (004D7020) -------------------------------------------------------- +int **__cdecl std::locale::facet::_S_create_c_locale(std::locale::facet *this, int **a2) +{ + int **result; // eax + + result = a2; + *(_DWORD *)this = 0; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + std::__throw_runtime_error((std::runtime_error *)"locale::facet::_S_create_c_locale name not valid"); + return result; +} + +//----- (004D7060) -------------------------------------------------------- +int **std::locale::facet::_S_initialize_once() +{ + return std::locale::facet::_S_create_c_locale( + (std::locale::facet *)&std::locale::facet::_S_c_locale, + (int **)&std::locale::facet::_S_c_name); +} +// 50C5F0: using guessed type int std::locale::facet::_S_c_locale; + +//----- (004D7090) -------------------------------------------------------- +std::locale::facet *__cdecl std::locale::facet::_S_destroy_c_locale(std::locale::facet *this) +{ + std::locale::facet *result; // eax + + result = this; + *(_DWORD *)this = 0; + return result; +} + +//----- (004D70A0) -------------------------------------------------------- +int __cdecl std::locale::facet::_S_lc_ctype_c_locale() +{ + return 0; +} + +//----- (004D70B0) -------------------------------------------------------- +void __fastcall std::locale::facet::~facet(void *Block) +{ + operator delete(Block); +} + +//----- (004D70D0) -------------------------------------------------------- +std::locale *__cdecl std::locale::global(std::locale *this, volatile signed __int32 **a2) +{ + _DWORD *locale_mutex; // eax + volatile signed __int32 *v3; // edx + int v4; // eax + _DWORD *exception; // eax + std::locale::_Impl *v7; // [esp+4h] [ebp-74h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-60h] + int v9; // [esp+54h] [ebp-24h] + void *Block[2]; // [esp+58h] [ebp-20h] BYREF + char v11; // [esp+60h] [ebp-18h] BYREF + + std::locale::_S_initialize(); + locale_mutex = `anonymous namespace'::get_locale_mutex(); + v9 = (int)locale_mutex; + if ( !_CRT_MT ) + { + lpuexcpt = (struct _Unwind_Exception *)std::locale::_S_global; + v3 = *a2; + v4 = std::locale::_S_classic; + if ( *a2 == (volatile signed __int32 *)std::locale::_S_classic ) + goto LABEL_4; + goto LABEL_3; + } + if ( __gthr_win32_mutex_lock((int)locale_mutex) ) + __gnu_cxx::__throw_concurrence_lock_error(); + lpuexcpt = (struct _Unwind_Exception *)std::locale::_S_global; + v3 = *a2; + v4 = std::locale::_S_classic; + if ( *a2 != (volatile signed __int32 *)std::locale::_S_classic ) + { + if ( !_CRT_MT ) + { +LABEL_3: + ++*v3; + v4 = (int)v3; + goto LABEL_4; + } + _InterlockedAdd(v3, 1u); + v4 = (int)*a2; + } +LABEL_4: + std::locale::_S_global = v4; + std::locale::name[abi:cxx11]((int *)Block, (int)a2); + if ( std::string::compare((int)Block, "*") ) + setlocale(0, (const char *)Block[0]); + if ( Block[0] != &v11 ) + operator delete(Block[0]); + if ( _CRT_MT && __gthr_win32_mutex_unlock(v9) ) + { + exception = __cxa_allocate_exception(4u); + *exception = &off_519D0C; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'__gnu_cxx::__concurrence_unlock_error, + (void (__cdecl *)(void *))__gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error); + } + std::locale::locale(this, lpuexcpt, v7); + return this; +} +// 4D7194: variable 'v7' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50C5E8: using guessed type int std::locale::_S_classic; +// 50C604: using guessed type int std::locale::_S_global; +// 515CD4: using guessed type int *`typeinfo for'__gnu_cxx::__concurrence_unlock_error; +// 519D0C: using guessed type void (__cdecl *off_519D0C)(__gnu_cxx::__concurrence_unlock_error *__hidden this); + +//----- (004D72B0) -------------------------------------------------------- +_DWORD *std::locale::classic() +{ + std::locale::_Impl *v1; // [esp+4h] [ebp-18h] + std::locale::_Impl *v2; // [esp+4h] [ebp-18h] + + if ( _CRT_MT ) + { + __gthr_win32_once((int)&std::locale::_S_once, (void (*)(void))std::locale::_S_initialize_once); + if ( std::locale::_S_classic ) + return &`anonymous namespace'::c_locale; + } + else if ( std::locale::_S_classic ) + { + return &`anonymous namespace'::c_locale; + } + std::locale::_Impl::_Impl(`anonymous namespace'::c_locale_impl, (std::locale::_Impl *)2, (unsigned int)v1); + std::locale::_S_classic = (int)`anonymous namespace'::c_locale_impl; + std::locale::_S_global = (int)`anonymous namespace'::c_locale_impl; + std::locale::locale(&`anonymous namespace'::c_locale, (std::locale *)`anonymous namespace'::c_locale_impl, v2); + return &`anonymous namespace'::c_locale; +} +// 4D72F9: variable 'v1' is possibly undefined +// 4D7321: variable 'v2' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 50B3B4: using guessed type _DWORD `anonymous namespace'::c_locale_impl[5]; +// 50BDC0: using guessed type _DWORD `anonymous namespace'::c_locale; +// 50C5E8: using guessed type int std::locale::_S_classic; +// 50C604: using guessed type int std::locale::_S_global; + +//----- (004D7340) -------------------------------------------------------- +std::locale *__userpurge std::locale::locale@(_DWORD *a1@, std::locale *this, std::locale::_Impl *a3) +{ + std::locale *result; // eax + + result = this; + *a1 = this; + return result; +} + +//----- (004D7350) -------------------------------------------------------- +volatile signed __int32 *__userpurge std::locale::locale@( + volatile signed __int32 **a1@, + volatile signed __int32 **this, + const std::locale *a3) +{ + volatile signed __int32 *result; // eax + + result = *this; + *a1 = *this; + if ( result != (volatile signed __int32 *)std::locale::_S_classic ) + { + if ( _CRT_MT ) + _InterlockedAdd(result, 1u); + else + ++*result; + } + return result; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C5E8: using guessed type int std::locale::_S_classic; + +//----- (004D7380) -------------------------------------------------------- +void __fastcall std::locale::locale(_DWORD *a1) +{ + int v1; // eax + _DWORD *v2; // eax + _DWORD *exception; // eax + _DWORD *locale_mutex; // [esp+18h] [ebp-44h] + + *a1 = 0; + std::locale::_S_initialize(); + v1 = std::locale::_S_global; + *a1 = std::locale::_S_global; + if ( v1 != std::locale::_S_classic ) + { + locale_mutex = `anonymous namespace'::get_locale_mutex(); + v2 = (_DWORD *)std::locale::_S_global; + if ( !_CRT_MT ) + goto LABEL_3; + if ( __gthr_win32_mutex_lock((int)locale_mutex) ) + __gnu_cxx::__throw_concurrence_lock_error(); + v2 = (_DWORD *)std::locale::_S_global; + if ( _CRT_MT ) + { + _InterlockedAdd((volatile signed __int32 *)std::locale::_S_global, 1u); + v2 = (_DWORD *)std::locale::_S_global; + } + else + { +LABEL_3: + ++*v2; + } + *a1 = v2; + if ( _CRT_MT ) + { + if ( __gthr_win32_mutex_unlock((int)locale_mutex) ) + { + exception = __cxa_allocate_exception(4u); + *exception = &off_519D0C; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'__gnu_cxx::__concurrence_unlock_error, + (void (__cdecl *)(void *))__gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error); + } + } + } +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C5E8: using guessed type int std::locale::_S_classic; +// 50C604: using guessed type int std::locale::_S_global; +// 515CD4: using guessed type int *`typeinfo for'__gnu_cxx::__concurrence_unlock_error; +// 519D0C: using guessed type void (__cdecl *off_519D0C)(__gnu_cxx::__concurrence_unlock_error *__hidden this); + +//----- (004D74D0) -------------------------------------------------------- +void __fastcall std::locale::~locale(_DWORD **a1) +{ + _DWORD *Block; // ebx + int v2; // eax + + Block = *a1; + if ( *a1 != (_DWORD *)std::locale::_S_classic ) + { + if ( !_CRT_MT ) + { + v2 = (*Block)--; + if ( v2 != 1 ) + return; +LABEL_6: + std::locale::_Impl::~_Impl(Block); + operator delete(Block); + return; + } + if ( _InterlockedExchangeAdd(Block, 0xFFFFFFFF) == 1 ) + goto LABEL_6; + } +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C5E8: using guessed type int std::locale::_S_classic; + +//----- (004D7530) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::locale::operator=( + volatile signed __int32 **this, + volatile signed __int32 **a2) +{ + volatile signed __int32 **result; // eax + volatile signed __int32 *v3; // edx + volatile signed __int32 *v4; // ecx + volatile signed __int32 *Block; // ebx + volatile signed __int32 v6; // edx + volatile signed __int32 **v7; // [esp+1Ch] [ebp-10h] + + result = this; + v3 = (volatile signed __int32 *)std::locale::_S_classic; + v4 = *a2; + if ( *a2 != (volatile signed __int32 *)std::locale::_S_classic ) + { + if ( _CRT_MT ) + { + _InterlockedAdd(v4, 1u); + v3 = (volatile signed __int32 *)std::locale::_S_classic; + } + else + { + ++*v4; + } + } + Block = *result; + if ( *result == v3 ) + goto LABEL_7; + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd(Block, 0xFFFFFFFF) != 1 ) + goto LABEL_7; + } + else + { + v6 = (*Block)--; + if ( v6 != 1 ) + { +LABEL_7: + *result = *a2; + return result; + } + } + v7 = result; + std::locale::_Impl::~_Impl(Block); + operator delete((void *)Block); + result = v7; + *v7 = *a2; + return result; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C5E8: using guessed type int std::locale::_S_classic; + +//----- (004D75D0) -------------------------------------------------------- +char *__thiscall std::vector>::_M_realloc_insert const&>( + void **this, + char *a2, + _DWORD *a3) +{ + int v3; // edx + int v4; // eax + unsigned int v5; // ebx + _DWORD *v6; // edi + char *i; // esi + volatile signed __int32 **v8; // ecx + _DWORD *v9; // ecx + volatile signed __int32 **v10; // ecx + char *result; // eax + char *v12; // [esp+10h] [ebp-28h] + char *Block; // [esp+18h] [ebp-20h] + char *v15; // [esp+1Ch] [ebp-1Ch] + + v12 = (char *)this[1]; + Block = (char *)*this; + v3 = (v12 - (_BYTE *)*this) >> 3; + if ( v3 == 0xFFFFFFF ) + std::__throw_length_error((std::length_error *)"vector::_M_realloc_insert"); + v4 = 1; + if ( v3 ) + v4 = (v12 - (_BYTE *)*this) >> 3; + v5 = v3 + v4; + if ( __CFADD__(v3, v4) ) + { + v5 = 0xFFFFFFF; +LABEL_11: + v15 = (char *)operator new(8 * v5); + goto LABEL_12; + } + v15 = 0; + if ( v5 ) + { + if ( v5 > 0xFFFFFFF ) + v5 = 0xFFFFFFF; + goto LABEL_11; + } +LABEL_12: + std::__shared_ptr::__shared_ptr(&v15[a2 - Block], a3); + v6 = v15; + for ( i = Block; ; i += 8 ) + { + v6 += 2; + if ( a2 == i ) + break; + std::__shared_ptr::__shared_ptr(v6 - 2, i); + v8 = (volatile signed __int32 **)(i + 4); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8); + } + while ( i != v12 ) + { + v9 = v6; + v6 += 2; + std::__shared_ptr::__shared_ptr(v9, i); + v10 = (volatile signed __int32 **)(i + 4); + i += 8; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10); + } + if ( Block ) + operator delete(Block); + this[1] = v6; + *this = v15; + result = &v15[8 * v5]; + this[2] = result; + return result; +} + +//----- (004D76DC) -------------------------------------------------------- +void __thiscall std::vector>::push_back(void **this, _DWORD *a2) +{ + char *v3; // ecx + + v3 = (char *)this[1]; + if ( v3 == this[2] ) + { + std::vector>::_M_realloc_insert const&>( + this, + v3, + a2); + } + else + { + std::__shared_ptr::__shared_ptr(v3, a2); + this[1] = (char *)this[1] + 8; + } +} + +//----- (004D7718) -------------------------------------------------------- +char *__thiscall std::vector>::_M_realloc_insert const&>( + void **this, + char *a2, + _DWORD *a3) +{ + int v3; // edx + int v4; // eax + unsigned int v5; // ebx + _DWORD *v6; // edi + char *i; // esi + volatile signed __int32 **v8; // ecx + _DWORD *v9; // ecx + volatile signed __int32 **v10; // ecx + char *result; // eax + char *v12; // [esp+10h] [ebp-28h] + char *Block; // [esp+18h] [ebp-20h] + char *v15; // [esp+1Ch] [ebp-1Ch] + + v12 = (char *)this[1]; + Block = (char *)*this; + v3 = (v12 - (_BYTE *)*this) >> 3; + if ( v3 == 0xFFFFFFF ) + std::__throw_length_error((std::length_error *)"vector::_M_realloc_insert"); + v4 = 1; + if ( v3 ) + v4 = (v12 - (_BYTE *)*this) >> 3; + v5 = v3 + v4; + if ( __CFADD__(v3, v4) ) + { + v5 = 0xFFFFFFF; +LABEL_11: + v15 = (char *)operator new(8 * v5); + goto LABEL_12; + } + v15 = 0; + if ( v5 ) + { + if ( v5 > 0xFFFFFFF ) + v5 = 0xFFFFFFF; + goto LABEL_11; + } +LABEL_12: + std::__shared_ptr::__shared_ptr(&v15[a2 - Block], a3); + v6 = v15; + for ( i = Block; ; i += 8 ) + { + v6 += 2; + if ( a2 == i ) + break; + std::__shared_ptr::__shared_ptr(v6 - 2, i); + v8 = (volatile signed __int32 **)(i + 4); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8); + } + while ( i != v12 ) + { + v9 = v6; + v6 += 2; + std::__shared_ptr::__shared_ptr(v9, i); + v10 = (volatile signed __int32 **)(i + 4); + i += 8; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10); + } + if ( Block ) + operator delete(Block); + this[1] = v6; + *this = v15; + result = &v15[8 * v5]; + this[2] = result; + return result; +} + +//----- (004D7824) -------------------------------------------------------- +char *__thiscall std::vector>::push_back(void **this, _DWORD *a2) +{ + char *v3; // ecx + char *result; // eax + + v3 = (char *)this[1]; + if ( v3 == this[2] ) + return std::vector>::_M_realloc_insert const&>( + this, + v3, + a2); + result = (char *)std::__shared_ptr::__shared_ptr(v3, a2); + this[1] = (char *)this[1] + 8; + return result; +} + +//----- (004D7860) -------------------------------------------------------- +void __thiscall std::vector>::vector(_DWORD *this, _DWORD *a2) +{ + size_t v3; // esi + _DWORD *v4; // ecx + _DWORD *v5; // esi + _DWORD *i; // edi + int v7; // ecx + _DWORD *v8; // [esp+0h] [ebp-28h] + + v3 = a2[1] - *a2; + *this = 0; + this[1] = 0; + this[2] = 0; + if ( v3 ) + { + if ( v3 > 0x7FFFFFF8 ) + std::__throw_bad_alloc(); + v4 = operator new(v3); + } + else + { + v4 = 0; + } + *this = v4; + this[1] = v4; + this[2] = (char *)v4 + v3; + v5 = (_DWORD *)a2[1]; + for ( i = (_DWORD *)*a2; i != v5; i += 2 ) + { + v8 = i; + std::__shared_ptr::__shared_ptr(v4, v8); + v4 = (_DWORD *)(v7 + 8); + } + this[1] = v4; +} +// 4D78C2: variable 'v7' is possibly undefined + +//----- (004D78D8) -------------------------------------------------------- +void __fastcall std::vector>::~vector(void **a1) +{ + char *v2; // edi + char *i; // esi + volatile signed __int32 **v4; // ecx + + v2 = (char *)a1[1]; + for ( i = (char *)*a1; v2 != i; i += 8 ) + { + v4 = (volatile signed __int32 **)(i + 4); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v4); + } + if ( *a1 ) + operator delete(*a1); +} + +//----- (004D7910) -------------------------------------------------------- +char *__thiscall std::vector>::_M_realloc_insert const&>( + void **this, + char *a2, + _DWORD *a3) +{ + int v3; // edx + int v4; // eax + unsigned int v5; // ebx + _DWORD *v6; // edi + char *i; // esi + volatile signed __int32 **v8; // ecx + _DWORD *v9; // ecx + volatile signed __int32 **v10; // ecx + char *result; // eax + char *v12; // [esp+10h] [ebp-28h] + char *Block; // [esp+18h] [ebp-20h] + char *v15; // [esp+1Ch] [ebp-1Ch] + + v12 = (char *)this[1]; + Block = (char *)*this; + v3 = (v12 - (_BYTE *)*this) >> 3; + if ( v3 == 0xFFFFFFF ) + std::__throw_length_error((std::length_error *)"vector::_M_realloc_insert"); + v4 = 1; + if ( v3 ) + v4 = (v12 - (_BYTE *)*this) >> 3; + v5 = v3 + v4; + if ( __CFADD__(v3, v4) ) + { + v5 = 0xFFFFFFF; +LABEL_11: + v15 = (char *)operator new(8 * v5); + goto LABEL_12; + } + v15 = 0; + if ( v5 ) + { + if ( v5 > 0xFFFFFFF ) + v5 = 0xFFFFFFF; + goto LABEL_11; + } +LABEL_12: + std::__shared_ptr::__shared_ptr(&v15[a2 - Block], a3); + v6 = v15; + for ( i = Block; ; i += 8 ) + { + v6 += 2; + if ( a2 == i ) + break; + std::__shared_ptr::__shared_ptr(v6 - 2, i); + v8 = (volatile signed __int32 **)(i + 4); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8); + } + while ( i != v12 ) + { + v9 = v6; + v6 += 2; + std::__shared_ptr::__shared_ptr(v9, i); + v10 = (volatile signed __int32 **)(i + 4); + i += 8; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10); + } + if ( Block ) + operator delete(Block); + this[1] = v6; + *this = v15; + result = &v15[8 * v5]; + this[2] = result; + return result; +} + +//----- (004D7A1C) -------------------------------------------------------- +void __thiscall std::vector>::push_back(void **this, _DWORD *a2) +{ + char *v3; // ecx + + v3 = (char *)this[1]; + if ( v3 == this[2] ) + { + std::vector>::_M_realloc_insert const&>( + this, + v3, + a2); + } + else + { + std::__shared_ptr::__shared_ptr(v3, a2); + this[1] = (char *)this[1] + 8; + } +} + +//----- (004D7A58) -------------------------------------------------------- +void __fastcall std::vector>::~vector(void **a1) +{ + char *v2; // edi + char *i; // esi + volatile signed __int32 **v4; // ecx + + v2 = (char *)a1[1]; + for ( i = (char *)*a1; v2 != i; i += 8 ) + { + v4 = (volatile signed __int32 **)(i + 4); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v4); + } + if ( *a1 ) + operator delete(*a1); +} + +//----- (004D7A90) -------------------------------------------------------- +void __thiscall std::vector::_M_realloc_insert( + struct _Unwind_Exception **this, + void **a2, + _DWORD *a3) +{ + int v3; // eax + int v4; // edx + int v5; // eax + struct _Unwind_Exception *v6; // [esp+10h] [ebp-58h] + struct _Unwind_Exception *Block; // [esp+18h] [ebp-50h] + unsigned int v9; // [esp+1Ch] [ebp-4Ch] + struct _Unwind_Exception *v10; // [esp+20h] [ebp-48h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-44h] + struct _Unwind_Exception *i; // [esp+28h] [ebp-40h] + + v6 = this[1]; + Block = *this; + v3 = -1431655765 * ((v6 - *this) >> 2); + if ( v3 == 178956970 ) + std::__throw_length_error((std::length_error *)"vector::_M_realloc_insert"); + v4 = 1; + if ( v3 ) + v4 = -1431655765 * ((v6 - Block) >> 2); + v9 = v4 - 1431655765 * ((v6 - Block) >> 2); + if ( __CFADD__(v4, v3) ) + { + v9 = 178956970; +LABEL_11: + v10 = (struct _Unwind_Exception *)operator new(12 * v9); + goto LABEL_12; + } + v10 = 0; + if ( v9 ) + { + v5 = 178956970; + if ( v9 <= 0xAAAAAAA ) + v5 = v4 - 1431655765 * ((v6 - Block) >> 2); + v9 = v5; + goto LABEL_11; + } +LABEL_12: + std::vector>::vector( + (struct _Unwind_Exception *)((char *)v10 + (char *)a2 - (char *)Block), + a3); + lpuexcpt = v10; + for ( i = Block; ; i = (struct _Unwind_Exception *)((char *)i + 12) ) + { + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 12); + if ( a2 == (void **)i ) + break; + *((_DWORD *)lpuexcpt - 3) = *(_DWORD *)i; + *((_DWORD *)lpuexcpt - 2) = *((_DWORD *)i + 1); + *((_DWORD *)lpuexcpt - 1) = *((_DWORD *)i + 2); + *((_DWORD *)i + 2) = 0; + *((_DWORD *)i + 1) = 0; + *(_DWORD *)i = 0; + std::vector>::~vector((void **)i); + } + while ( v6 != i ) + { + *(_DWORD *)lpuexcpt = *(_DWORD *)i; + *((_DWORD *)lpuexcpt + 1) = *((_DWORD *)i + 1); + *((_DWORD *)lpuexcpt + 2) = *((_DWORD *)i + 2); + *((_DWORD *)i + 2) = 0; + *((_DWORD *)i + 1) = 0; + *(_DWORD *)i = 0; + std::vector>::~vector((void **)i); + i = (struct _Unwind_Exception *)((char *)i + 12); + lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 12); + } + if ( Block ) + operator delete(Block); + *this = v10; + this[1] = lpuexcpt; + this[2] = (struct _Unwind_Exception *)((char *)v10 + 12 * v9); +} + +//----- (004D7CB4) -------------------------------------------------------- +void __thiscall std::vector::push_back(int this, _DWORD *a2) +{ + void **v3; // ecx + + v3 = *(void ***)(this + 4); + if ( v3 == *(void ***)(this + 8) ) + { + std::vector::_M_realloc_insert( + (struct _Unwind_Exception **)this, + v3, + a2); + } + else + { + std::vector>::vector(v3, a2); + *(_DWORD *)(this + 4) += 12; + } +} + +//----- (004D7CF0) -------------------------------------------------------- +void __fastcall std::vector::~vector(void ***a1) +{ + void **v2; // edi + void **i; // esi + void **v4; // ecx + + v2 = a1[1]; + for ( i = *a1; v2 != i; i += 3 ) + { + v4 = i; + std::vector>::~vector(v4); + } + if ( *a1 ) + operator delete(*a1); +} + +//----- (004D7D28) -------------------------------------------------------- +char *__thiscall std::vector::_M_realloc_insert(char **this, char *a2, int *a3) +{ + int v3; // eax + int v4; // edx + bool v6; // cf + unsigned int v7; // eax + bool v8; // cc + int v9; // eax + char *v10; // edi + int *v11; // ecx + _DWORD *v12; // eax + char *v13; // esi + char *result; // eax + char *v15; // [esp+10h] [ebp-28h] + char *Block; // [esp+14h] [ebp-24h] + char *v17; // [esp+18h] [ebp-20h] + int v18; // [esp+1Ch] [ebp-1Ch] + + v15 = this[1]; + Block = *this; + v3 = -373475417 * ((v15 - *this) >> 2); + if ( v3 == 23342213 ) + std::__throw_length_error((std::length_error *)"vector::_M_realloc_insert"); + v4 = 1; + if ( v3 ) + v4 = -373475417 * ((v15 - Block) >> 2); + v6 = __CFADD__(v4, v3); + v7 = v4 - 373475417 * ((v15 - Block) >> 2); + v18 = v7; + if ( v6 ) + { + v18 = 23342213; + } + else + { + v17 = 0; + if ( !v7 ) + goto LABEL_12; + v8 = v7 <= 0x1642C85; + v9 = 23342213; + if ( v8 ) + v9 = v4 - 373475417 * ((v15 - Block) >> 2); + v18 = v9; + } + v17 = (char *)operator new(92 * v18); +LABEL_12: + v10 = &v17[a2 - Block]; + v11 = (int *)(v10 + 8); + v10 += 28; + *((_DWORD *)v10 - 7) = *a3; + *((_DWORD *)v10 - 6) = a3[1]; + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(v11, a3[2]); + *((_DWORD *)v10 - 4) = a3[3]; + *((_DWORD *)v10 - 3) = a3[4]; + *((_DWORD *)v10 - 2) = a3[5]; + *((_DWORD *)v10 - 1) = a3[6]; + qmemcpy(v10, a3 + 7, 0x40u); + v12 = std::__relocate_a_1>(Block, a2, v17); + v13 = (char *)std::__relocate_a_1>(a2, v15, v12 + 23); + if ( Block ) + operator delete(Block); + this[1] = v13; + *this = v17; + result = &v17[92 * v18]; + this[2] = result; + return result; +} + +//----- (004D7E44) -------------------------------------------------------- +char *__thiscall std::vector::push_back(int this, int *a2) +{ + int v3; // edi + int v4; // ecx + int v5; // eax + int *v6; // edi + char *result; // eax + + v3 = *(_DWORD *)(this + 4); + if ( v3 == *(_DWORD *)(this + 8) ) + return std::vector::_M_realloc_insert((char **)this, (char *)v3, a2); + v4 = a2[2]; + *(_DWORD *)v3 = *a2; + v5 = a2[1]; + *(_DWORD *)(v3 + 8) = v4; + *(_DWORD *)(v3 + 4) = v5; + if ( v4 ) + std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy(v4); + v6 = (int *)(v3 + 28); + *(v6 - 4) = a2[3]; + *(v6 - 3) = a2[4]; + *(v6 - 2) = a2[5]; + result = (char *)a2[6]; + *(v6 - 1) = (int)result; + qmemcpy(v6, a2 + 7, 0x40u); + *(_DWORD *)(this + 4) += 92; + return result; +} + +//----- (004D7EB8) -------------------------------------------------------- +void __fastcall std::vector::~vector(void **a1) +{ + char *v2; // edi + char *i; // esi + volatile signed __int32 **v4; // ecx + + v2 = (char *)a1[1]; + for ( i = (char *)*a1; v2 != i; i += 92 ) + { + v4 = (volatile signed __int32 **)(i + 8); + std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v4); + } + if ( *a1 ) + operator delete(*a1); +} + +//----- (004D7EF0) -------------------------------------------------------- +_DWORD *__thiscall std::vector::emplace_back(char **this, _DWORD *a2) +{ + char *v3; // ecx + _DWORD *result; // eax + + v3 = this[1]; + if ( v3 == this[2] ) + return (_DWORD *)std::vector::_M_realloc_insert(this, v3, a2); + result = std::string::basic_string(v3, a2); + this[1] += 24; + return result; +} + +//----- (004D7F2C) -------------------------------------------------------- +void __thiscall std::vector::_M_realloc_insert(char **this, char *a2, int a3) +{ + char *v3; // ecx + char *v4; // [esp+10h] [ebp-58h] + char *v5; // [esp+14h] [ebp-54h] + unsigned int v6; // [esp+18h] [ebp-50h] + char *Block; // [esp+1Ch] [ebp-4Ch] + char *v9; // [esp+24h] [ebp-44h] + int v10; // [esp+28h] [ebp-40h] + char *i; // [esp+28h] [ebp-40h] + + v6 = std::vector::_M_check_len(this, 1u, (std::length_error *)"vector::_M_realloc_insert"); + Block = *this; + v4 = this[1]; + v10 = a2 - *this; + if ( v6 ) + { + if ( v6 > 0x5555555 ) + std::__throw_bad_alloc(); + v9 = (char *)operator new(24 * v6); + } + else + { + v9 = 0; + } + std::string::basic_string(&v9[v10], a3); + v3 = v9; + for ( i = Block; ; i += 24 ) + { + v5 = v3 + 24; + if ( a2 == i ) + break; + std::string::basic_string(v3, i); + std::string::_M_dispose((void **)i); + v3 = v5; + } + while ( v4 != i ) + { + std::string::basic_string(v5, i); + std::string::_M_dispose((void **)i); + i += 24; + v5 += 24; + } + if ( Block ) + operator delete(Block); + *this = v9; + this[1] = v5; + this[2] = &v9[24 * v6]; +} + +//----- (004D80E0) -------------------------------------------------------- +unsigned int __thiscall std::vector::_M_realloc_insert(char **this, char *a2, _DWORD *a3) +{ + int v4; // edi + _DWORD *v5; // ebx + char *v6; // edi + _DWORD *i; // ecx + void **v8; // ecx + void **v9; // ecx + unsigned int result; // eax + char *v11; // [esp+10h] [ebp-28h] + _DWORD *v12; // [esp+14h] [ebp-24h] + char *Block; // [esp+18h] [ebp-20h] + unsigned int v14; // [esp+1Ch] [ebp-1Ch] + + v14 = std::vector::_M_check_len(this, 1u, (std::length_error *)"vector::_M_realloc_insert"); + Block = *this; + v4 = a2 - *this; + v11 = this[1]; + if ( v14 ) + { + if ( v14 > 0x5555555 ) + std::__throw_bad_alloc(); + v5 = operator new(24 * v14); + } + else + { + v5 = 0; + } + std::string::basic_string((_DWORD *)((char *)v5 + v4), a3); + v6 = Block; + for ( i = v5; ; i = v12 ) + { + v12 = i + 6; + if ( a2 == v6 ) + break; + std::string::basic_string(i, v6); + v8 = (void **)v6; + v6 += 24; + std::string::_M_dispose(v8); + } + while ( v11 != v6 ) + { + std::string::basic_string(v12, v6); + v9 = (void **)v6; + v6 += 24; + std::string::_M_dispose(v9); + v12 += 6; + } + if ( Block ) + operator delete(Block); + *this = (char *)v5; + this[1] = (char *)v12; + result = 24 * v14; + this[2] = (char *)&v5[6 * v14]; + return result; +} + +//----- (004D81C0) -------------------------------------------------------- +void __thiscall std::vector::push_back(char **this, int a2) +{ + char *v3; // ecx + + v3 = this[1]; + if ( v3 == this[2] ) + { + std::vector::_M_realloc_insert(this, v3, a2); + } + else + { + std::string::basic_string(v3, a2); + this[1] += 24; + } +} + +//----- (004D81FC) -------------------------------------------------------- +void __fastcall std::vector::~vector(void ***a1) +{ + void **v2; // edi + void **i; // esi + void **v4; // ecx + + v2 = a1[1]; + for ( i = *a1; v2 != i; i += 6 ) + { + v4 = i; + std::string::_M_dispose(v4); + } + if ( *a1 ) + operator delete(*a1); +} + +//----- (004D8234) -------------------------------------------------------- +char *__thiscall std::vector>::emplace_back>( + void **this, + _DWORD *a2) +{ + char *v3; // ecx + _DWORD *v4; // ecx + char *result; // eax + + v3 = (char *)this[1]; + if ( v3 == this[2] ) + return std::vector>::_M_realloc_insert>( + this, + v3, + a2); + v4 = v3 + 4; + *(v4 - 1) = *a2; + result = (char *)std::string::basic_string(v4, a2 + 1); + this[1] = (char *)this[1] + 28; + return result; +} + +//----- (004D827C) -------------------------------------------------------- +char *__thiscall std::vector>::_M_realloc_insert>( + void **this, + char *a2, + _DWORD *a3) +{ + int v3; // ebx + int v4; // eax + bool v6; // cf + unsigned int v7; // ebx + char *v8; // eax + char *v9; // esi + char *result; // eax + void **v11; // edx + void **v12; // edx + char *v13; // [esp+1Ch] [ebp-2Ch] + char *v14; // [esp+1Ch] [ebp-2Ch] + char *v15; // [esp+20h] [ebp-28h] + void **v16; // [esp+20h] [ebp-28h] + void **v17; // [esp+20h] [ebp-28h] + char *v18; // [esp+24h] [ebp-24h] + char *v19; // [esp+24h] [ebp-24h] + char *Block; // [esp+28h] [ebp-20h] + char *v21; // [esp+2Ch] [ebp-1Ch] + + v18 = (char *)this[1]; + Block = (char *)*this; + v3 = -1227133513 * ((v18 - (_BYTE *)*this) >> 2); + if ( v3 == 76695844 ) + std::__throw_length_error((std::length_error *)"vector::_M_realloc_insert"); + v4 = 1; + if ( v3 ) + v4 = -1227133513 * ((v18 - (_BYTE *)*this) >> 2); + v6 = __CFADD__(v4, v3); + v7 = v4 - 1227133513 * ((v18 - (_BYTE *)*this) >> 2); + v15 = (char *)(a2 - Block); + if ( v6 ) + { + v7 = 76695844; +LABEL_11: + v21 = (char *)operator new(28 * v7); + goto LABEL_12; + } + v21 = 0; + if ( v7 ) + { + if ( v7 > 0x4924924 ) + v7 = 76695844; + goto LABEL_11; + } +LABEL_12: + *(_DWORD *)&v15[(_DWORD)v21] = *a3; + std::string::basic_string(&v15[(_DWORD)v21 + 4], a3 + 1); + v8 = v21; + v9 = Block; + while ( 1 ) + { + result = v8 + 28; + if ( a2 == v9 ) + break; + v13 = result; + *((_DWORD *)result - 7) = *(_DWORD *)v9; + v11 = (void **)(v9 + 4); + v9 += 28; + v16 = v11; + std::string::basic_string((_DWORD *)result - 6, v11); + std::string::_M_dispose(v16); + v8 = v13; + } + while ( v9 != v18 ) + { + v14 = result; + *(_DWORD *)result = *(_DWORD *)v9; + v12 = (void **)(v9 + 4); + v9 += 28; + v17 = v12; + std::string::basic_string((_DWORD *)result + 1, v12); + std::string::_M_dispose(v17); + result = v14 + 28; + } + if ( Block ) + { + v19 = result; + operator delete(Block); + result = v19; + } + this[1] = result; + *this = v21; + this[2] = &v21[28 * v7]; + return result; +} + +//----- (004D83BC) -------------------------------------------------------- +void __fastcall std::vector>::~vector(void **a1) +{ + char *v2; // edi + char *i; // esi + void **v4; // ecx + + v2 = (char *)a1[1]; + for ( i = (char *)*a1; v2 != i; i += 28 ) + { + v4 = (void **)(i + 4); + std::string::_M_dispose(v4); + } + if ( *a1 ) + operator delete(*a1); +} + +//----- (004D83F4) -------------------------------------------------------- +void __thiscall std::vector>>::emplace_back>>( + char **this, + _DWORD *a2) +{ + char *v3; // ecx + + v3 = this[1]; + if ( v3 == this[2] ) + { + std::vector>>::_M_realloc_insert>>( + this, + v3, + a2); + } + else + { + std::pair>::pair(v3, a2); + this[1] += 32; + } +} + +//----- (004D8430) -------------------------------------------------------- +char *__thiscall std::vector>>::_M_realloc_insert>>( + char **this, + char *a2, + _DWORD *a3) +{ + int v3; // edx + int v4; // eax + unsigned int v6; // ebx + char *v7; // edi + char *i; // ecx + int v9; // ecx + int v10; // ecx + char *result; // eax + char *v12; // [esp+10h] [ebp-28h] + char *v13; // [esp+14h] [ebp-24h] + char *Block; // [esp+18h] [ebp-20h] + char *v15; // [esp+1Ch] [ebp-1Ch] + + v12 = this[1]; + Block = *this; + v3 = (v12 - *this) >> 5; + if ( v3 == 0x3FFFFFF ) + std::__throw_length_error((std::length_error *)"vector::_M_realloc_insert"); + v4 = 1; + if ( v3 ) + v4 = (v12 - *this) >> 5; + v6 = v3 + v4; + if ( __CFADD__(v3, v4) ) + { + v6 = 0x3FFFFFF; +LABEL_11: + v15 = (char *)operator new(32 * v6); + goto LABEL_12; + } + v15 = 0; + if ( v6 ) + { + if ( v6 > 0x3FFFFFF ) + v6 = 0x3FFFFFF; + goto LABEL_11; + } +LABEL_12: + std::pair>::pair(&v15[a2 - Block], a3); + v7 = Block; + for ( i = v15; ; i = v13 ) + { + v13 = i + 32; + if ( a2 == v7 ) + break; + std::pair>::pair(i, v7); + v9 = (int)v7; + v7 += 32; + std::pair>::~pair(v9); + } + while ( v7 != v12 ) + { + std::pair>::pair(v13, v7); + v10 = (int)v7; + v7 += 32; + std::pair>::~pair(v10); + v13 += 32; + } + if ( Block ) + operator delete(Block); + this[2] = &v15[32 * v6]; + *this = v15; + result = v13; + this[1] = v13; + return result; +} + +//----- (004D853C) -------------------------------------------------------- +char *__thiscall std::vector>::_M_realloc_insert>( + void **this, + char *a2, + _DWORD *a3) +{ + int v3; // ebx + int v4; // eax + bool v6; // cf + unsigned int v7; // ebx + char *v8; // eax + char *v9; // esi + char *result; // eax + void **v11; // edx + void **v12; // edx + char *v13; // [esp+1Ch] [ebp-2Ch] + char *v14; // [esp+1Ch] [ebp-2Ch] + char *v15; // [esp+20h] [ebp-28h] + void **v16; // [esp+20h] [ebp-28h] + void **v17; // [esp+20h] [ebp-28h] + char *v18; // [esp+24h] [ebp-24h] + char *v19; // [esp+24h] [ebp-24h] + char *Block; // [esp+28h] [ebp-20h] + char *v21; // [esp+2Ch] [ebp-1Ch] + + v18 = (char *)this[1]; + Block = (char *)*this; + v3 = -1227133513 * ((v18 - (_BYTE *)*this) >> 2); + if ( v3 == 76695844 ) + std::__throw_length_error((std::length_error *)"vector::_M_realloc_insert"); + v4 = 1; + if ( v3 ) + v4 = -1227133513 * ((v18 - (_BYTE *)*this) >> 2); + v6 = __CFADD__(v4, v3); + v7 = v4 - 1227133513 * ((v18 - (_BYTE *)*this) >> 2); + v15 = (char *)(a2 - Block); + if ( v6 ) + { + v7 = 76695844; +LABEL_11: + v21 = (char *)operator new(28 * v7); + goto LABEL_12; + } + v21 = 0; + if ( v7 ) + { + if ( v7 > 0x4924924 ) + v7 = 76695844; + goto LABEL_11; + } +LABEL_12: + *(_DWORD *)&v15[(_DWORD)v21] = *a3; + std::string::basic_string(&v15[(_DWORD)v21 + 4], a3 + 1); + v8 = v21; + v9 = Block; + while ( 1 ) + { + result = v8 + 28; + if ( a2 == v9 ) + break; + v13 = result; + *((_DWORD *)result - 7) = *(_DWORD *)v9; + v11 = (void **)(v9 + 4); + v9 += 28; + v16 = v11; + std::string::basic_string((_DWORD *)result - 6, v11); + std::string::_M_dispose(v16); + v8 = v13; + } + while ( v9 != v18 ) + { + v14 = result; + *(_DWORD *)result = *(_DWORD *)v9; + v12 = (void **)(v9 + 4); + v9 += 28; + v17 = v12; + std::string::basic_string((_DWORD *)result + 1, v12); + std::string::_M_dispose(v17); + result = v14 + 28; + } + if ( Block ) + { + v19 = result; + operator delete(Block); + result = v19; + } + this[1] = result; + *this = v21; + this[2] = &v21[28 * v7]; + return result; +} + +//----- (004D867C) -------------------------------------------------------- +void __fastcall std::vector>::~vector(void **a1) +{ + char *v2; // edi + char *i; // esi + void **v4; // ecx + + v2 = (char *)a1[1]; + for ( i = (char *)*a1; v2 != i; i += 28 ) + { + v4 = (void **)(i + 4); + std::string::_M_dispose(v4); + } + if ( *a1 ) + operator delete(*a1); +} + +//----- (004D86C0) -------------------------------------------------------- +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int a2, int a3) +{ + _DWORD *v4; // eax + char *v5; // esi + _DWORD *v6; // eax + int result; // eax + + v4 = (_DWORD *)this[2]; + if ( !v4 ) + { + v4 = operator new(0x44u); + *v4 = &off_51B084; + v4[1] = 0; + v4[2] = 0; + v4[3] = 0; + *((_WORD *)v4 + 8) = 0; + *((_BYTE *)v4 + 18) = 0; + v4[5] = 0; + v4[6] = 0; + v4[7] = 0; + v4[8] = 0; + v4[9] = 0; + v4[10] = 0; + v4[11] = 0; + v4[12] = 0; + v4[13] = 0; + *((_BYTE *)v4 + 67) = 0; + this[2] = v4; + } + *((_BYTE *)v4 + 17) = 46; + v5 = std::money_base::_S_atoms; + *(_BYTE *)(this[2] + 18) = 44; + v6 = (_DWORD *)this[2]; + v6[2] = &unk_5110A4; + v6[3] = 0; + v6[5] = &unk_5110A4; + v6[6] = 0; + v6[7] = &unk_5110A4; + v6[8] = 0; + v6[9] = &unk_5110A4; + v6[10] = 0; + v6[11] = 0; + v6[12] = std::money_base::_S_default_pattern; + *(_DWORD *)(this[2] + 52) = std::money_base::_S_default_pattern; + for ( result = 0; result != 11; ++result ) + *(_BYTE *)(this[2] + result + 56) = v5[result]; + return result; +} +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 515480: using guessed type int std::money_base::_S_default_pattern; +// 51B084: using guessed type int (*off_51B084)(); + +//----- (004D87E0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A1D0; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D8880) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A1D0; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D8920) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A1D0; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D89C0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A1D0; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D8A60) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A1D0; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D8B00) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A1D0; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D8BA0) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A1D0; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4D8C00: variable 'lpfctx' is possibly undefined +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D8C70) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A1D0; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4D8CD0: variable 'lpfctx' is possibly undefined +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D8D20) -------------------------------------------------------- +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int a2, int a3) +{ + _DWORD *v4; // eax + char *v5; // esi + _DWORD *v6; // eax + int result; // eax + + v4 = (_DWORD *)this[2]; + if ( !v4 ) + { + v4 = operator new(0x44u); + *v4 = &off_51B094; + v4[1] = 0; + v4[2] = 0; + v4[3] = 0; + *((_WORD *)v4 + 8) = 0; + *((_BYTE *)v4 + 18) = 0; + v4[5] = 0; + v4[6] = 0; + v4[7] = 0; + v4[8] = 0; + v4[9] = 0; + v4[10] = 0; + v4[11] = 0; + v4[12] = 0; + v4[13] = 0; + *((_BYTE *)v4 + 67) = 0; + this[2] = v4; + } + *((_BYTE *)v4 + 17) = 46; + v5 = std::money_base::_S_atoms; + *(_BYTE *)(this[2] + 18) = 44; + v6 = (_DWORD *)this[2]; + v6[2] = &unk_5110A4; + v6[3] = 0; + v6[5] = &unk_5110A4; + v6[6] = 0; + v6[7] = &unk_5110A4; + v6[8] = 0; + v6[9] = &unk_5110A4; + v6[10] = 0; + v6[11] = 0; + v6[12] = std::money_base::_S_default_pattern; + *(_DWORD *)(this[2] + 52) = std::money_base::_S_default_pattern; + for ( result = 0; result != 11; ++result ) + *(_BYTE *)(this[2] + result + 56) = v5[result]; + return result; +} +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 515480: using guessed type int std::money_base::_S_default_pattern; +// 51B094: using guessed type int (*off_51B094)(); + +//----- (004D8E40) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A204; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D8EE0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A204; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D8F80) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A204; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9020) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A204; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D90C0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A204; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9160) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A204; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9200) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A204; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4D9260: variable 'lpfctx' is possibly undefined +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D92D0) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A204; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4D9330: variable 'lpfctx' is possibly undefined +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9380) -------------------------------------------------------- +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int a2, int a3) +{ + _DWORD *v4; // eax + char *v5; // ebx + int v6; // ecx + int result; // eax + + v4 = (_DWORD *)this[2]; + if ( !v4 ) + { + v4 = operator new(0x54u); + v4[1] = 0; + *v4 = &off_51B0A4; + v4[2] = 0; + v4[3] = 0; + *((_BYTE *)v4 + 16) = 0; + *(_DWORD *)((char *)v4 + 18) = 0; + v4[6] = 0; + v4[7] = 0; + v4[8] = 0; + v4[9] = 0; + v4[10] = 0; + v4[11] = 0; + v4[12] = 0; + v4[13] = 0; + v4[14] = 0; + *((_BYTE *)v4 + 82) = 0; + this[2] = v4; + } + *(_DWORD *)((char *)v4 + 18) = 2883630; + v4[2] = &unk_5110A4; + v5 = std::money_base::_S_atoms; + v4[13] = std::money_base::_S_default_pattern; + v4[3] = 0; + v4[6] = &unk_5110A6; + v4[7] = 0; + v4[8] = &unk_5110A6; + v4[9] = 0; + v4[10] = &unk_5110A6; + v4[11] = 0; + v4[12] = 0; + *(_DWORD *)(this[2] + 56) = std::money_base::_S_default_pattern; + v6 = this[2]; + for ( result = 0; result != 11; ++result ) + *(_WORD *)(v6 + 2 * result + 60) = v5[result]; + return result; +} +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 515480: using guessed type int std::money_base::_S_default_pattern; +// 51B0A4: using guessed type int (*off_51B0A4)(); + +//----- (004D94A0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A238; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9540) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A238; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D95E0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A238; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9680) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A238; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9720) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A238; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D97C0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A238; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9860) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A238; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4D98C0: variable 'lpfctx' is possibly undefined +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9930) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A238; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4D9990: variable 'lpfctx' is possibly undefined +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D99E0) -------------------------------------------------------- +int __thiscall std::moneypunct::_M_initialize_moneypunct(_DWORD *this, int a2, int a3) +{ + _DWORD *v4; // eax + char *v5; // ebx + int v6; // ecx + int result; // eax + + v4 = (_DWORD *)this[2]; + if ( !v4 ) + { + v4 = operator new(0x54u); + v4[1] = 0; + *v4 = &off_51B0B4; + v4[2] = 0; + v4[3] = 0; + *((_BYTE *)v4 + 16) = 0; + *(_DWORD *)((char *)v4 + 18) = 0; + v4[6] = 0; + v4[7] = 0; + v4[8] = 0; + v4[9] = 0; + v4[10] = 0; + v4[11] = 0; + v4[12] = 0; + v4[13] = 0; + v4[14] = 0; + *((_BYTE *)v4 + 82) = 0; + this[2] = v4; + } + *(_DWORD *)((char *)v4 + 18) = 2883630; + v4[2] = &unk_5110A4; + v5 = std::money_base::_S_atoms; + v4[13] = std::money_base::_S_default_pattern; + v4[3] = 0; + v4[6] = &unk_5110A6; + v4[7] = 0; + v4[8] = &unk_5110A6; + v4[9] = 0; + v4[10] = &unk_5110A6; + v4[11] = 0; + v4[12] = 0; + *(_DWORD *)(this[2] + 56) = std::money_base::_S_default_pattern; + v6 = this[2]; + for ( result = 0; result != 11; ++result ) + *(_WORD *)(v6 + 2 * result + 60) = v5[result]; + return result; +} +// 50C488: using guessed type char *std::money_base::_S_atoms; +// 515480: using guessed type int std::money_base::_S_default_pattern; +// 51B0B4: using guessed type int (*off_51B0B4)(); + +//----- (004D9B00) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A26C; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9BA0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A26C; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9C40) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A26C; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9CE0) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A26C; + this[2] = a2; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9D80) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2, int a3, int a4) +{ + *this = &off_51A26C; + this[2] = 0; + this[1] = a4 != 0; + std::moneypunct::_M_initialize_moneypunct(this, a2, a3); +} +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9E20) -------------------------------------------------------- +void __thiscall std::moneypunct::moneypunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A26C; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); +} +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9EC0) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A26C; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4D9F20: variable 'lpfctx' is possibly undefined +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004D9F90) -------------------------------------------------------- +void __fastcall std::moneypunct::~moneypunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A26C; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4D9FF0: variable 'lpfctx' is possibly undefined +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004DA040) -------------------------------------------------------- +void __thiscall std::string::_M_destroy(void **this, int a2) +{ + operator delete(*this); +} + +//----- (004DA060) -------------------------------------------------------- +void __fastcall std::string::_M_dispose(void **a1) +{ + if ( *a1 != a1 + 2 ) + operator delete(*a1); +} + +//----- (004DA090) -------------------------------------------------------- +unsigned int **__thiscall std::string::_M_replace(unsigned int **this, size_t a2, size_t a3, char *Src, size_t a5) +{ + unsigned int v5; // eax + unsigned int v7; // edi + unsigned int v8; // ecx + bool v9; // cl + unsigned int *v10; // eax + unsigned int v12; // eax + size_t v13; // eax + size_t v14; // ebp + size_t v15; // edx + _BYTE *v16; // esi + unsigned int *v17; // [esp+1Ch] [ebp-30h] + _BYTE *v18; // [esp+20h] [ebp-2Ch] + bool v19; // [esp+27h] [ebp-25h] + size_t Size; // [esp+28h] [ebp-24h] + size_t v21; // [esp+2Ch] [ebp-20h] + + v5 = (unsigned int)this[1]; + if ( a5 > a3 + 0x3FFFFFFF - v5 ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace"); + v21 = a5 - a3; + v7 = v5 + a5 - a3; + v17 = *this; + if ( *this == (unsigned int *)(this + 2) ) + v8 = 15; + else + v8 = (unsigned int)this[2]; + if ( v8 < v7 ) + { + std::string::_M_mutate((int)this, a2, a3, Src, a5); + goto LABEL_12; + } + v18 = (char *)v17 + a2; + v19 = v5 != a3 + a2; + Size = v5 - (a3 + a2); + v9 = v19 && a3 != a5; + if ( v17 <= (unsigned int *)Src && Src <= (char *)v17 + v5 ) + { + if ( a5 && a3 >= a5 ) + { + if ( a5 != 1 ) + { + memmove(v18, Src, a5); + if ( !v19 || a3 == a5 ) + goto LABEL_12; +LABEL_18: + if ( Size == 1 ) + v18[a5] = v18[a3]; + else + memmove(&v18[a5], &v18[a3], Size); +LABEL_20: + if ( a3 >= a5 ) + goto LABEL_12; + v12 = (unsigned int)&v18[a3]; + if ( &v18[a3] < &Src[a5] ) + { + if ( v12 > (unsigned int)Src ) + { + v13 = v12 - (_DWORD)Src; + v14 = v13; + if ( v13 == 1 ) + { + *v18 = *Src; + } + else if ( v13 ) + { + memmove(v18, Src, v13); + } + v15 = a5 - v14; + v16 = &v18[a5]; + if ( a5 - v14 == 1 ) + { + v18[v14] = *v16; + } + else if ( v15 ) + { + memcpy(&v18[v14], v16, v15); + } + } + else if ( a5 == 1 ) + { + *v18 = Src[v21]; + } + else if ( a5 ) + { + memcpy(v18, &Src[v21], a5); + } + goto LABEL_12; + } + if ( a5 != 1 ) + { + if ( a5 ) + memmove(v18, Src, a5); + goto LABEL_12; + } +LABEL_27: + *v18 = *Src; + goto LABEL_12; + } + *v18 = *Src; + } + if ( !v9 ) + goto LABEL_20; + goto LABEL_18; + } + if ( v9 ) + { + if ( Size == 1 ) + v18[a5] = v18[a3]; + else + memmove(&v18[a5], &v18[a3], Size); + } + if ( a5 ) + { + if ( a5 != 1 ) + { + memcpy(v18, Src, a5); + goto LABEL_12; + } + goto LABEL_27; + } +LABEL_12: + v10 = *this; + this[1] = (unsigned int *)v7; + *((_BYTE *)v10 + v7) = 0; + return this; +} + +//----- (004DA3A0) -------------------------------------------------------- +int __cdecl std::string::_S_compare(int a1, int a2) +{ + return a1 - a2; +} + +//----- (004DA3B0) -------------------------------------------------------- +int __thiscall std::string::_M_capacity(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[2] = a2; + return result; +} + +//----- (004DA3C0) -------------------------------------------------------- +int __thiscall std::string::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004DA3D0) -------------------------------------------------------- +int __thiscall std::string::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004DA3E0) -------------------------------------------------------- +int __thiscall std::string::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004DA3F0) -------------------------------------------------------- +int __thiscall std::string::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004DA400) -------------------------------------------------------- +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, size_t Size, char a3) +{ + _BYTE *result; // eax + int Val; // edi + + if ( Size > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + this[2] = Size; + *this = result; + Val = a3; + goto LABEL_6; + } + result = (_BYTE *)*this; + if ( !Size ) + { + this[1] = 0; + *result = 0; + return result; + } + if ( Size != 1 ) + { + Val = a3; +LABEL_6: + memset(result, Val, Size); + result = (_BYTE *)*this; + this[1] = Size; + result[Size] = 0; + return result; + } + *result = a3; + result = (_BYTE *)*this; + this[1] = 1; + result[1] = 0; + return result; +} + +//----- (004DA4A0) -------------------------------------------------------- +_BYTE *__thiscall std::string::_M_construct<__gnu_cxx::__normal_iterator>( + _DWORD *this, + _BYTE *Src, + int a3, + int a4) +{ + size_t Size; // ebx + _BYTE *result; // eax + + Size = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + this[2] = Size; + *this = result; + } + else + { + result = (_BYTE *)*this; + if ( Size == 1 ) + { + *result = *Src; + result = (_BYTE *)*this; + this[1] = 1; + result[1] = 0; + return result; + } + if ( !Size ) + { + this[1] = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = (_BYTE *)*this; + this[1] = Size; + result[Size] = 0; + return result; +} + +//----- (004DA540) -------------------------------------------------------- +_BYTE *__thiscall std::string::_M_construct<__gnu_cxx::__normal_iterator>( + _DWORD *this, + _BYTE *Src, + int a3, + int a4) +{ + size_t Size; // ebx + _BYTE *result; // eax + + Size = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + this[2] = Size; + *this = result; + } + else + { + result = (_BYTE *)*this; + if ( Size == 1 ) + { + *result = *Src; + result = (_BYTE *)*this; + this[1] = 1; + result[1] = 0; + return result; + } + if ( !Size ) + { + this[1] = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = (_BYTE *)*this; + this[1] = Size; + result[Size] = 0; + return result; +} + +//----- (004DA5E0) -------------------------------------------------------- +int __thiscall std::string::_M_construct(void **this, unsigned __int8 *Src, size_t Size) +{ + int result; // eax + int v5; // edx + int v6[7]; // [esp+1Ch] [ebp-1Ch] BYREF + + if ( !Src && Size ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v6[0] = Size - (_DWORD)Src; + if ( Size - (unsigned int)Src > 0xF ) + { + *this = std::string::_M_create((unsigned int *)v6, 0); + this[2] = (void *)v6[0]; + } + std::string::_S_copy_chars(*this, Src, Size); + result = v6[0]; + v5 = (int)*this; + this[1] = (void *)v6[0]; + *(_BYTE *)(v5 + result) = 0; + return result; +} +// 4DA5E0: using guessed type unsigned int var_1C[7]; + +//----- (004DA660) -------------------------------------------------------- +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int a3, int a4) +{ + size_t Size; // ebx + _BYTE *result; // eax + + if ( a3 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + Size = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + this[2] = Size; + *this = result; + } + else + { + result = (_BYTE *)*this; + if ( Size == 1 ) + { + *result = *Src; + result = (_BYTE *)*this; + this[1] = 1; + result[1] = 0; + return result; + } + if ( !Size ) + { + this[1] = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = (_BYTE *)*this; + this[1] = Size; + result[Size] = 0; + return result; +} + +//----- (004DA710) -------------------------------------------------------- +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int a3) +{ + size_t Size; // ebx + _BYTE *result; // eax + int v6; // ebx + int v7; // ebx + int v8[4]; // [esp+1Ch] [ebp-10h] BYREF + + if ( a3 ) + { + if ( !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + } + Size = a3 - (_DWORD)Src; + v8[0] = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + result = std::string::_M_create((unsigned int *)v8, 0); + *this = result; + this[2] = v8[0]; + } + else + { + result = (_BYTE *)*this; + if ( Size == 1 ) + { + *result = *Src; + v6 = v8[0]; + result = (_BYTE *)*this; + this[1] = v8[0]; + result[v6] = 0; + return result; + } + if ( !Size ) + { + this[1] = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + v7 = v8[0]; + result = (_BYTE *)*this; + this[1] = v8[0]; + result[v7] = 0; + return result; +} +// 4DA710: using guessed type unsigned int var_10[4]; + +//----- (004DA7D0) -------------------------------------------------------- +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int a3) +{ + size_t Size; // ebx + _BYTE *result; // eax + int v6; // ebx + int v7; // ebx + int v8[4]; // [esp+1Ch] [ebp-10h] BYREF + + if ( a3 ) + { + if ( !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + } + Size = a3 - (_DWORD)Src; + v8[0] = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + result = std::string::_M_create((unsigned int *)v8, 0); + *this = result; + this[2] = v8[0]; + } + else + { + result = (_BYTE *)*this; + if ( Size == 1 ) + { + *result = *Src; + v6 = v8[0]; + result = (_BYTE *)*this; + this[1] = v8[0]; + result[v6] = 0; + return result; + } + if ( !Size ) + { + this[1] = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + v7 = v8[0]; + result = (_BYTE *)*this; + this[1] = v8[0]; + result[v7] = 0; + return result; +} +// 4DA7D0: using guessed type unsigned int var_10[4]; + +//----- (004DA890) -------------------------------------------------------- +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int a3) +{ + size_t Size; // ebx + _BYTE *result; // eax + int v6; // ebx + int v7; // ebx + int v8[4]; // [esp+1Ch] [ebp-10h] BYREF + + if ( a3 ) + { + if ( !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + } + Size = a3 - (_DWORD)Src; + v8[0] = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + result = std::string::_M_create((unsigned int *)v8, 0); + *this = result; + this[2] = v8[0]; + } + else + { + result = (_BYTE *)*this; + if ( Size == 1 ) + { + *result = *Src; + v6 = v8[0]; + result = (_BYTE *)*this; + this[1] = v8[0]; + result[v6] = 0; + return result; + } + if ( !Size ) + { + this[1] = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + v7 = v8[0]; + result = (_BYTE *)*this; + this[1] = v8[0]; + result[v7] = 0; + return result; +} +// 4DA890: using guessed type unsigned int var_10[4]; + +//----- (004DA950) -------------------------------------------------------- +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int a3) +{ + size_t Size; // ebx + _BYTE *result; // eax + int v6; // ebx + int v7; // ebx + int v8[4]; // [esp+1Ch] [ebp-10h] BYREF + + if ( a3 ) + { + if ( !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + } + Size = a3 - (_DWORD)Src; + v8[0] = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + result = std::string::_M_create((unsigned int *)v8, 0); + *this = result; + this[2] = v8[0]; + } + else + { + result = (_BYTE *)*this; + if ( Size == 1 ) + { + *result = *Src; + v6 = v8[0]; + result = (_BYTE *)*this; + this[1] = v8[0]; + result[v6] = 0; + return result; + } + if ( !Size ) + { + this[1] = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + v7 = v8[0]; + result = (_BYTE *)*this; + this[1] = v8[0]; + result[v7] = 0; + return result; +} +// 4DA950: using guessed type unsigned int var_10[4]; + +//----- (004DAA10) -------------------------------------------------------- +_BYTE *__thiscall std::string::_M_construct(_DWORD *this, _BYTE *Src, int a3, int a4) +{ + size_t Size; // ebx + _BYTE *result; // eax + + if ( a3 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + Size = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + this[2] = Size; + *this = result; + } + else + { + result = (_BYTE *)*this; + if ( Size == 1 ) + { + *result = *Src; + result = (_BYTE *)*this; + this[1] = 1; + result[1] = 0; + return result; + } + if ( !Size ) + { + this[1] = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = (_BYTE *)*this; + this[1] = Size; + result[Size] = 0; + return result; +} + +//----- (004DAAC0) -------------------------------------------------------- +int __fastcall std::string::_M_local_data(int a1) +{ + return a1 + 8; +} + +//----- (004DAAD0) -------------------------------------------------------- +int __thiscall std::string::_M_set_length(int *this, int a2) +{ + int result; // eax + int v3; // edx + + result = a2; + v3 = *this; + this[1] = a2; + *(_BYTE *)(v3 + a2) = 0; + return result; +} + +//----- (004DAAE0) -------------------------------------------------------- +int __cdecl std::string::_S_copy_chars(_BYTE *a1, unsigned __int8 *Src, size_t Size) +{ + int result; // eax + + result = Size - (_DWORD)Src; + if ( Size - (_DWORD)Src == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( result ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004DAB20) -------------------------------------------------------- +int __cdecl std::string::_S_copy_chars(_BYTE *a1, unsigned __int8 *Src, size_t Size) +{ + int result; // eax + + result = Size - (_DWORD)Src; + if ( Size - (_DWORD)Src == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( result ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004DAB60) -------------------------------------------------------- +int __cdecl std::string::_S_copy_chars(_BYTE *a1, unsigned __int8 *Src, size_t Size) +{ + int result; // eax + + result = Size - (_DWORD)Src; + if ( Size - (_DWORD)Src == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( result ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004DABA0) -------------------------------------------------------- +int __cdecl std::string::_S_copy_chars(_BYTE *a1, unsigned __int8 *Src, size_t Size) +{ + int result; // eax + + result = Size - (_DWORD)Src; + if ( Size - (_DWORD)Src == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( result ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004DABE0) -------------------------------------------------------- +void __fastcall std::string::shrink_to_fit(_DWORD *a1) +{ + unsigned int v1; // eax + + if ( (_DWORD *)*a1 == a1 + 2 ) + v1 = 15; + else + v1 = a1[2]; + if ( a1[1] < v1 ) + std::string::reserve(a1, 0); +} + +//----- (004DAC80) -------------------------------------------------------- +_DWORD *__thiscall std::string::_M_replace_aux(_DWORD *this, size_t a2, int a3, size_t a4, char a5) +{ + int v6; // edx + _DWORD *v7; // eax + unsigned int v8; // esi + unsigned int v9; // ebp + size_t Size; // edx + size_t v11; // eax + _BYTE *Src; // ecx + _BYTE *v13; // eax + _BYTE *v14; // eax + + v6 = this[1]; + if ( a4 > a3 + 0x3FFFFFFF - v6 ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + v7 = (_DWORD *)*this; + v8 = v6 + a4 - a3; + if ( (_DWORD *)*this == this + 2 ) + v9 = 15; + else + v9 = this[2]; + if ( v9 < v8 ) + { + std::string::_M_mutate((int)this, a2, a3, 0, a4); + v7 = (_DWORD *)*this; + if ( !a4 ) + goto LABEL_13; + } + else + { + Size = v6 - (a3 + a2); + if ( !Size || a3 == a4 ) + { +LABEL_9: + if ( !a4 ) + goto LABEL_13; + goto LABEL_10; + } + v11 = (size_t)v7 + a2; + Src = (_BYTE *)(v11 + a3); + v13 = (_BYTE *)(a4 + v11); + if ( Size != 1 ) + { + memmove(v13, Src, Size); + v7 = (_DWORD *)*this; + goto LABEL_9; + } + *v13 = *Src; + v7 = (_DWORD *)*this; + if ( !a4 ) + goto LABEL_13; + } +LABEL_10: + v14 = (char *)v7 + a2; + if ( a4 == 1 ) + *v14 = a5; + else + memset(v14, a5, a4); + v7 = (_DWORD *)*this; +LABEL_13: + this[1] = v8; + *((_BYTE *)v7 + v8) = 0; + return this; +} + +//----- (004DADA0) -------------------------------------------------------- +int __fastcall std::string::_M_get_allocator(int a1) +{ + return a1; +} + +//----- (004DADB0) -------------------------------------------------------- +_BYTE *__thiscall std::string::_M_construct_aux_2(_DWORD *this, size_t Size, char a3) +{ + _BYTE *result; // eax + + if ( Size > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + this[2] = Size; + *this = result; +LABEL_6: + memset(result, a3, Size); + result = (_BYTE *)*this; + this[1] = Size; + result[Size] = 0; + return result; + } + result = (_BYTE *)*this; + if ( !Size ) + { + this[1] = 0; + *result = 0; + return result; + } + if ( Size != 1 ) + goto LABEL_6; + *result = a3; + result = (_BYTE *)*this; + this[1] = 1; + result[1] = 0; + return result; +} + +//----- (004DAE50) -------------------------------------------------------- +unsigned int __thiscall std::string::at(_DWORD *this, unsigned int a2) +{ + if ( a2 >= this[1] ) + std::__throw_out_of_range_fmt("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", a2, this[1]); + return *this + a2; +} + +//----- (004DAE80) -------------------------------------------------------- +int __fastcall std::string::end(_DWORD *a1) +{ + return a1[1] + *a1; +} + +//----- (004DAE90) -------------------------------------------------------- +int __fastcall std::string::back(_DWORD *a1) +{ + return *a1 + a1[1] - 1; +} + +//----- (004DAEA0) -------------------------------------------------------- +_DWORD *__thiscall std::string::rend(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2; + return result; +} + +//----- (004DAEB0) -------------------------------------------------------- +_BYTE *__thiscall std::string::swap(_DWORD *this, _DWORD *a2) +{ + _BYTE *result; // eax + _BYTE *v3; // edi + _DWORD *v4; // esi + _DWORD *v5; // edx + int v6; // ebp + int v7; // edx + int v8; // esi + int v9; // edx + int v10; // edi + int v11; // ebp + int v12; // edi + int v13; // [esp+0h] [ebp-28h] + int v14; // [esp+4h] [ebp-24h] + + result = a2; + if ( this != a2 ) + { + v3 = (_BYTE *)*this; + v4 = (_DWORD *)*a2; + v5 = a2 + 2; + if ( this + 2 == (_DWORD *)*this ) + { + if ( v5 == v4 ) + { + v8 = a2[1]; + if ( this[1] ) + { + if ( !v8 ) + { + a2[2] = this[2]; + a2[3] = this[3]; + a2[4] = this[4]; + a2[5] = this[5]; + a2[1] = this[1]; + result = (_BYTE *)*this; + this[1] = 0; + *result = 0; + return result; + } + v11 = a2[2]; + v12 = a2[3]; + v13 = a2[4]; + v14 = a2[5]; + a2[2] = this[2]; + a2[3] = this[3]; + a2[4] = this[4]; + a2[5] = this[5]; + v9 = this[1]; + this[3] = v12; + this[2] = v11; + this[4] = v13; + this[5] = v14; + v8 = a2[1]; + } + else + { + if ( v8 ) + { + this[2] = a2[2]; + this[3] = a2[3]; + this[4] = a2[4]; + this[5] = a2[5]; + this[1] = a2[1]; + a2[1] = 0; + result = (_BYTE *)*a2; + *(_BYTE *)*a2 = 0; + return result; + } + v9 = 0; + } + } + else + { + v10 = a2[2]; + a2[2] = this[2]; + a2[3] = this[3]; + a2[4] = this[4]; + a2[5] = this[5]; + *this = v4; + *a2 = v5; + v9 = this[1]; + this[2] = v10; + v8 = a2[1]; + } + } + else + { + v6 = this[2]; + if ( v5 == v4 ) + { + this[2] = a2[2]; + this[3] = a2[3]; + this[4] = a2[4]; + this[5] = a2[5]; + *a2 = v3; + *this = this + 2; + } + else + { + *this = v4; + v7 = a2[2]; + *a2 = v3; + this[2] = v7; + } + a2[2] = v6; + v8 = a2[1]; + v9 = this[1]; + } + this[1] = v8; + a2[1] = v9; + } + return result; +} + +//----- (004DB020) -------------------------------------------------------- +int __fastcall std::string::begin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (004DB030) -------------------------------------------------------- +_BYTE *__fastcall std::string::clear(int a1) +{ + _BYTE *result; // eax + + result = *(_BYTE **)a1; + *(_DWORD *)(a1 + 4) = 0; + *result = 0; + return result; +} + +//----- (004DB040) -------------------------------------------------------- +char *__thiscall std::string::erase(int *this, char *a2) +{ + int v3; // edx + int v4; // eax + char *v5; // esi + size_t Size; // edi + + v3 = *this; + v4 = this[1] - 1; + v5 = &a2[-*this]; + Size = v4 - (_DWORD)v5; + if ( (char *)v4 != v5 ) + { + if ( Size == 1 ) + *a2 = a2[1]; + else + memmove(a2, a2 + 1, Size); + v3 = *this; + v4 = this[1] - 1; + } + this[1] = v4; + *(_BYTE *)(v3 + v4) = 0; + return &v5[*this]; +} + +//----- (004DB0B0) -------------------------------------------------------- +_BYTE *__thiscall std::string::erase(int *this, _BYTE *a2, int a3) +{ + _BYTE *v4; // esi + + v4 = &a2[-*this]; + if ( a3 == this[1] + *this ) + { + this[1] = (int)v4; + *a2 = 0; + } + else + { + std::string::_M_erase(this, (int)v4, a3 - (_DWORD)a2); + } + return &v4[*this]; +} + +//----- (004DB110) -------------------------------------------------------- +int __thiscall std::string::erase(int *this, int a2) +{ + int v3; // ebx + + v3 = a2 - *this; + std::string::_M_erase(this, v3, 1); + return v3 + *this; +} + +//----- (004DB140) -------------------------------------------------------- +_BYTE *__thiscall std::string::erase(int *this, _BYTE *a2, int a3) +{ + _BYTE *v4; // esi + + v4 = &a2[-*this]; + if ( a3 == this[1] + *this ) + { + this[1] = (int)v4; + *a2 = 0; + } + else + { + std::string::_M_erase(this, (int)v4, a3 - (_DWORD)a2); + } + return &v4[*this]; +} + +//----- (004DB1A0) -------------------------------------------------------- +int *__thiscall std::string::erase(int *this, unsigned int a2, unsigned int a3) +{ + int *result; // eax + unsigned int v4; // edx + unsigned int v5; // edx + int v6; // edx + + result = this; + v4 = this[1]; + if ( a2 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + a2, + v4); + if ( a3 == -1 ) + { + v6 = *this; + this[1] = a2; + *(_BYTE *)(v6 + a2) = 0; + } + else if ( a3 ) + { + v5 = v4 - a2; + if ( v5 > a3 ) + v5 = a3; + std::string::_M_erase(this, a2, v5); + return this; + } + return result; +} + +//----- (004DB220) -------------------------------------------------------- +int __fastcall std::string::front(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (004DB230) -------------------------------------------------------- +_DWORD *__thiscall std::string::append(_DWORD *this, char *Str) +{ + unsigned int Size; // eax + size_t v4; // ebp + _DWORD *v5; // edx + unsigned int v6; // edi + unsigned int v7; // ecx + _BYTE *v8; // edx + _DWORD *result; // eax + + Size = strlen(Str); + v4 = this[1]; + if ( 0x3FFFFFFF - v4 < Size ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v5 = (_DWORD *)*this; + v6 = v4 + Size; + if ( (_DWORD *)*this == this + 2 ) + v7 = 15; + else + v7 = this[2]; + if ( v6 > v7 ) + { + std::string::_M_mutate((int)this, v4, 0, Str, Size); + v5 = (_DWORD *)*this; + } + else if ( Size ) + { + v8 = (char *)v5 + v4; + if ( Size == 1 ) + *v8 = *Str; + else + memcpy(v8, Str, Size); + v5 = (_DWORD *)*this; + } + this[1] = v6; + result = this; + *((_BYTE *)v5 + v6) = 0; + return result; +} + +//----- (004DB2F0) -------------------------------------------------------- +_DWORD *__thiscall std::string::append(_DWORD *this, _BYTE *Src, size_t Size) +{ + size_t v4; // edi + _DWORD *v5; // eax + unsigned int v6; // esi + unsigned int v7; // ecx + _BYTE *v8; // eax + + v4 = this[1]; + if ( Size > 0x3FFFFFFF - v4 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v5 = (_DWORD *)*this; + v6 = Size + v4; + if ( (_DWORD *)*this == this + 2 ) + v7 = 15; + else + v7 = this[2]; + if ( v6 > v7 ) + { + std::string::_M_mutate((int)this, v4, 0, Src, Size); + v5 = (_DWORD *)*this; + } + else if ( Size ) + { + v8 = (char *)v5 + v4; + if ( Size == 1 ) + *v8 = *Src; + else + memcpy(v8, Src, Size); + v5 = (_DWORD *)*this; + } + this[1] = v6; + *((_BYTE *)v5 + v6) = 0; + return this; +} + +//----- (004DB3B0) -------------------------------------------------------- +_DWORD *__thiscall std::string::append(_DWORD *this, int a2) +{ + _DWORD *v3; // edi + size_t v4; // ecx + size_t v5; // edx + _BYTE *Src; // ebp + _DWORD *v7; // eax + unsigned int v8; // esi + unsigned int v9; // edi + _BYTE *v10; // eax + + v3 = this + 2; + v4 = this[1]; + v5 = *(_DWORD *)(a2 + 4); + Src = *(_BYTE **)a2; + v7 = (_DWORD *)*this; + v8 = v5 + v4; + if ( (_DWORD *)*this == v3 ) + v9 = 15; + else + v9 = this[2]; + if ( v8 > v9 ) + { + std::string::_M_mutate((int)this, v4, 0, Src, v5); + v7 = (_DWORD *)*this; + } + else if ( v5 ) + { + v10 = (char *)v7 + v4; + if ( v5 == 1 ) + *v10 = *Src; + else + memcpy(v10, Src, *(_DWORD *)(a2 + 4)); + v7 = (_DWORD *)*this; + } + this[1] = v8; + *((_BYTE *)v7 + v8) = 0; + return this; +} + +//----- (004DB450) -------------------------------------------------------- +_DWORD *__thiscall std::string::append(_DWORD *this, _DWORD *a2, unsigned int a3, size_t a4) +{ + size_t Size; // eax + _BYTE *Src; // edi + int v7; // ecx + _DWORD *v8; // edx + unsigned int v9; // esi + unsigned int v10; // ebp + _BYTE *v11; // edx + _DWORD *result; // eax + + Size = a4; + if ( a2[1] - a3 <= a4 ) + Size = a2[1] - a3; + if ( a3 > a2[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::append", + a3, + a2[1]); + Src = (_BYTE *)(*a2 + a3); + v7 = this[1]; + v8 = (_DWORD *)*this; + v9 = Size + v7; + if ( (_DWORD *)*this == this + 2 ) + v10 = 15; + else + v10 = this[2]; + if ( v9 > v10 ) + { + std::string::_M_mutate((int)this, this[1], 0, Src, Size); + v8 = (_DWORD *)*this; + } + else if ( Size ) + { + v11 = (char *)v8 + v7; + if ( Size == 1 ) + *v11 = *Src; + else + memcpy(v11, Src, Size); + v8 = (_DWORD *)*this; + } + this[1] = v9; + result = this; + *((_BYTE *)v8 + v9) = 0; + return result; +} + +//----- (004DB530) -------------------------------------------------------- +_DWORD *__thiscall std::string::append(_DWORD *this, _BYTE *Src, size_t Size) +{ + size_t v4; // edi + _DWORD *v5; // eax + unsigned int v6; // esi + unsigned int v7; // ecx + _BYTE *v8; // eax + + v4 = this[1]; + if ( Size > 0x3FFFFFFF - v4 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v5 = (_DWORD *)*this; + v6 = Size + v4; + if ( (_DWORD *)*this == this + 2 ) + v7 = 15; + else + v7 = this[2]; + if ( v6 > v7 ) + { + std::string::_M_mutate((int)this, v4, 0, Src, Size); + v5 = (_DWORD *)*this; + } + else if ( Size ) + { + v8 = (char *)v5 + v4; + if ( Size == 1 ) + *v8 = *Src; + else + memcpy(v8, Src, Size); + v5 = (_DWORD *)*this; + } + this[1] = v6; + *((_BYTE *)v5 + v6) = 0; + return this; +} + +//----- (004DB5F0) -------------------------------------------------------- +_DWORD *__thiscall std::string::append(_DWORD *this, size_t a2, char a3) +{ + return std::string::_M_replace_aux(this, this[1], 0, a2, a3); +} + +//----- (004DB620) -------------------------------------------------------- +_DWORD *__thiscall std::string::assign(_DWORD *this, int a2) +{ + _DWORD *v3; // eax + _DWORD *Src; // ecx + int v5; // edx + int v6; // ebp + + v3 = (_DWORD *)*this; + Src = *(_DWORD **)a2; + v5 = *(_DWORD *)(a2 + 4); + if ( *(_DWORD *)a2 != a2 + 8 ) + { + if ( v3 == this + 2 ) + { + *this = Src; + this[1] = v5; + this[2] = *(_DWORD *)(a2 + 8); + } + else + { + *this = Src; + v6 = this[2]; + this[1] = v5; + this[2] = *(_DWORD *)(a2 + 8); + if ( v3 ) + { + *(_DWORD *)a2 = v3; + *(_DWORD *)(a2 + 8) = v6; + goto LABEL_5; + } + } + *(_DWORD *)a2 = a2 + 8; + v3 = (_DWORD *)(a2 + 8); + goto LABEL_5; + } + if ( v5 ) + { + if ( v5 == 1 ) + *(_BYTE *)v3 = *(_BYTE *)(a2 + 8); + else + memcpy(v3, Src, *(_DWORD *)(a2 + 4)); + v5 = *(_DWORD *)(a2 + 4); + v3 = (_DWORD *)*this; + } + this[1] = v5; + *((_BYTE *)v3 + v5) = 0; + v3 = *(_DWORD **)a2; +LABEL_5: + *(_DWORD *)(a2 + 4) = 0; + *(_BYTE *)v3 = 0; + return this; +} + +//----- (004DB6D0) -------------------------------------------------------- +unsigned int **__thiscall std::string::assign(unsigned int **this, char *Str) +{ + size_t v3; // eax + + v3 = strlen(Str); + return std::string::_M_replace(this, 0, (size_t)this[1], Str, v3); +} + +//----- (004DB710) -------------------------------------------------------- +unsigned int **__thiscall std::string::assign(unsigned int **this, char *a2, size_t a3) +{ + return std::string::_M_replace(this, 0, (size_t)this[1], a2, a3); +} + +//----- (004DB740) -------------------------------------------------------- +void *__thiscall std::string::assign(void *this, int a2) +{ + std::string::_M_assign((int)this, a2); + return this; +} + +//----- (004DB760) -------------------------------------------------------- +unsigned int **__thiscall std::string::assign(unsigned int **this, _DWORD *a2, unsigned int a3, size_t a4) +{ + size_t v4; // eax + + v4 = a2[1] - a3; + if ( v4 > a4 ) + v4 = a4; + if ( a3 > a2[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::assign", + a3, + a2[1]); + return std::string::_M_replace(this, 0, (size_t)this[1], (char *)(*a2 + a3), v4); +} + +//----- (004DB7D0) -------------------------------------------------------- +unsigned int **__thiscall std::string::assign(unsigned int **this, char *a2, size_t a3) +{ + return std::string::_M_replace(this, 0, (size_t)this[1], a2, a3); +} + +//----- (004DB800) -------------------------------------------------------- +_DWORD *__thiscall std::string::assign(_DWORD *this, size_t a2, char a3) +{ + return std::string::_M_replace_aux(this, 0, this[1], a2, a3); +} + +//----- (004DB830) -------------------------------------------------------- +size_t __thiscall std::string::insert(unsigned int **this, int a2, char *a3, size_t a4) +{ + unsigned int v5; // eax + size_t v6; // ebx + + v5 = (unsigned int)this[1]; + v6 = a2 - (_DWORD)*this; + if ( v6 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + v5); + std::string::_M_replace(this, v6, 0, a3, a4); + return (size_t)*this + v6; +} + +//----- (004DB8A0) -------------------------------------------------------- +size_t __thiscall std::string::insert(_DWORD *this, int a2, char a3) +{ + size_t v4; // ebx + + v4 = a2 - *this; + std::string::_M_replace_aux(this, v4, 0, 1u, a3); + return v4 + *this; +} + +//----- (004DB8E0) -------------------------------------------------------- +size_t __thiscall std::string::insert(_DWORD *this, int a2, size_t a3, char a4) +{ + size_t v5; // ebx + + v5 = a2 - *this; + std::string::_M_replace_aux(this, v5, 0, a3, a4); + return v5 + *this; +} + +//----- (004DB920) -------------------------------------------------------- +unsigned int **__thiscall std::string::insert(unsigned int **this, int a2, char *a3, size_t a4) +{ + size_t v4; // eax + + v4 = a2 - (_DWORD)*this; + if ( v4 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v4, + (size_t)this[1]); + return std::string::_M_replace(this, v4, 0, a3, a4); +} + +//----- (004DB980) -------------------------------------------------------- +size_t __thiscall std::string::insert(_DWORD *this, int a2, char a3) +{ + size_t v4; // ebx + + v4 = a2 - *this; + std::string::_M_replace_aux(this, v4, 0, 1u, a3); + return v4 + *this; +} + +//----- (004DB9C0) -------------------------------------------------------- +_DWORD *__thiscall std::string::insert(_DWORD *this, int a2, size_t a3, char a4) +{ + return std::string::_M_replace_aux(this, a2 - *this, 0, a3, a4); +} + +//----- (004DBA00) -------------------------------------------------------- +unsigned int **__thiscall std::string::insert(unsigned int **this, unsigned int a2, char *Str) +{ + size_t v4; // eax + + v4 = strlen(Str); + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::string::_M_replace(this, a2, 0, Str, v4); +} + +//----- (004DBA70) -------------------------------------------------------- +unsigned int **__thiscall std::string::insert(unsigned int **this, unsigned int a2, char *a3, size_t a4) +{ + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::string::_M_replace(this, a2, 0, a3, a4); +} + +//----- (004DBAD0) -------------------------------------------------------- +unsigned int **__thiscall std::string::insert(unsigned int **this, unsigned int a2, int a3) +{ + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::string::_M_replace(this, a2, 0, *(char **)a3, *(_DWORD *)(a3 + 4)); +} + +//----- (004DBB30) -------------------------------------------------------- +unsigned int **__thiscall std::string::insert(unsigned int **this, unsigned int a2, _DWORD *a3, char *a4, size_t a5) +{ + size_t v5; // eax + + v5 = a5; + if ( a3[1] - (int)a4 <= a5 ) + v5 = a3[1] - (_DWORD)a4; + if ( (unsigned int)a4 > a3[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::insert", + (size_t)a4, + a3[1]); + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::string::_M_replace(this, a2, 0, &a4[*a3], v5); +} + +//----- (004DBBC0) -------------------------------------------------------- +_DWORD *__thiscall std::string::insert(_DWORD *this, unsigned int a2, size_t a3, char a4) +{ + if ( a2 > this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::insert", + a2, + this[1]); + return std::string::_M_replace_aux(this, a2, 0, a3, a4); +} + +//----- (004DBC20) -------------------------------------------------------- +unsigned int **__thiscall std::string::insert<__gnu_cxx::__normal_iterator>( + unsigned int **this, + int a2, + char *a3, + int a4) +{ + size_t v4; // eax + + v4 = a2 - (_DWORD)*this; + if ( v4 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v4, + (size_t)this[1]); + return std::string::_M_replace(this, v4, 0, a3, a4 - (_DWORD)a3); +} + +//----- (004DBC80) -------------------------------------------------------- +_DWORD *__thiscall std::string::rbegin(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2 + a2[1]; + return result; +} + +//----- (004DBC90) -------------------------------------------------------- +_DWORD *__thiscall std::string::resize(int *this, _DWORD *a2) +{ + size_t v2; // edx + _DWORD *result; // eax + int v4; // edx + + v2 = this[1]; + result = a2; + if ( (unsigned int)a2 > v2 ) + return std::string::_M_replace_aux(this, v2, 0, (size_t)a2 - v2, 0); + if ( (unsigned int)a2 < v2 ) + { + v4 = *this; + this[1] = (int)a2; + *((_BYTE *)a2 + v4) = 0; + } + return result; +} + +//----- (004DBCE0) -------------------------------------------------------- +_DWORD *__thiscall std::string::resize(int *this, _DWORD *a2, char a3) +{ + size_t v3; // edx + _DWORD *result; // eax + int v5; // edx + + v3 = this[1]; + result = a2; + if ( v3 < (unsigned int)a2 ) + return std::string::_M_replace_aux(this, v3, 0, (size_t)a2 - v3, a3); + if ( v3 > (unsigned int)a2 ) + { + v5 = *this; + this[1] = (int)a2; + *((_BYTE *)a2 + v5) = 0; + } + return result; +} + +//----- (004DBD30) -------------------------------------------------------- +int __thiscall std::string::_M_data(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004DBD40) -------------------------------------------------------- +int __cdecl std::string::_S_copy(_BYTE *a1, unsigned __int8 *Src, int Size) +{ + int result; // eax + + result = Size; + if ( Size == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( Size ) + { + return (int)memcpy(a1, Src, Size); + } + return result; +} + +//----- (004DBD80) -------------------------------------------------------- +int __cdecl std::string::_S_move(_BYTE *a1, unsigned __int8 *Src, int Size) +{ + int result; // eax + + result = Size; + if ( Size == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( Size ) + { + return (int)memmove(a1, Src, Size); + } + return result; +} + +//----- (004DBDC0) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5 - (_DWORD)a4); +} + +//----- (004DBE30) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5 - (_DWORD)a4); +} + +//----- (004DBEA0) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, int a4) +{ + size_t v4; // edx + size_t v5; // eax + + v4 = a2 - (_DWORD)*this; + v5 = a3 - a2; + if ( a3 - a2 > (unsigned int)this[1] - v4 ) + v5 = (size_t)this[1] - v4; + if ( v4 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v4, + (size_t)this[1]); + return std::string::_M_replace(this, v4, v5, *(char **)a4, *(_DWORD *)(a4 + 4)); +} + +//----- (004DBF10) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *Str) +{ + size_t v5; // eax + size_t v6; // edx + size_t v7; // ecx + size_t v8; // eax + + v5 = strlen(Str); + v6 = a2 - (_DWORD)*this; + v7 = v5; + v8 = a3 - a2; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v8 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v8, Str, v7); +} + +//----- (004DBF90) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5 - (_DWORD)a4); +} + +//----- (004DC000) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5); +} + +//----- (004DC070) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5 - (_DWORD)a4); +} + +//----- (004DC0E0) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5); +} + +//----- (004DC150) -------------------------------------------------------- +_DWORD *__thiscall std::string::replace(_DWORD *this, int a2, int a3, size_t a4, char a5) +{ + return std::string::_M_replace_aux(this, a2 - *this, a3 - a2, a4, a5); +} + +//----- (004DC170) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5 - (_DWORD)a4); +} + +//----- (004DC1E0) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *Str) +{ + size_t v5; // eax + size_t v6; // edx + size_t v7; // ecx + size_t v8; // eax + + v5 = strlen(Str); + v6 = a2 - (_DWORD)*this; + v7 = v5; + v8 = a3 - a2; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v8 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v8, Str, v7); +} + +//----- (004DC260) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5 - (_DWORD)a4); +} + +//----- (004DC2D0) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5); +} + +//----- (004DC340) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, int a4) +{ + size_t v4; // edx + size_t v5; // eax + + v4 = a2 - (_DWORD)*this; + v5 = a3 - a2; + if ( a3 - a2 > (unsigned int)this[1] - v4 ) + v5 = (size_t)this[1] - v4; + if ( v4 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v4, + (size_t)this[1]); + return std::string::_M_replace(this, v4, v5, *(char **)a4, *(_DWORD *)(a4 + 4)); +} + +//----- (004DC3B0) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5 - (_DWORD)a4); +} + +//----- (004DC420) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, int a2, int a3, char *a4, size_t a5) +{ + size_t v5; // eax + size_t v6; // edx + + v5 = a3 - a2; + v6 = a2 - (_DWORD)*this; + if ( a3 - a2 > (unsigned int)this[1] - v6 ) + v5 = (size_t)this[1] - v6; + if ( v6 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v6, + (size_t)this[1]); + return std::string::_M_replace(this, v6, v5, a4, a5 - (_DWORD)a4); +} + +//----- (004DC490) -------------------------------------------------------- +_DWORD *__thiscall std::string::replace(_DWORD *this, int a2, int a3, size_t a4, char a5) +{ + return std::string::_M_replace_aux(this, a2 - *this, a3 - a2, a4, a5); +} + +//----- (004DC4B0) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, unsigned int a2, unsigned int a3, char *Str) +{ + size_t v5; // edx + size_t v6; // eax + + v5 = strlen(Str); + v6 = (size_t)this[1] - a2; + if ( v6 > a3 ) + v6 = a3; + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::string::_M_replace(this, a2, v6, Str, v5); +} + +//----- (004DC520) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace( + unsigned int **this, + unsigned int a2, + unsigned int a3, + char *a4, + size_t a5) +{ + size_t v5; // eax + + v5 = (size_t)this[1] - a2; + if ( v5 > a3 ) + v5 = a3; + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::string::_M_replace(this, a2, v5, a4, a5); +} + +//----- (004DC580) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace(unsigned int **this, unsigned int a2, unsigned int a3, int a4) +{ + size_t v4; // eax + + v4 = (size_t)this[1] - a2; + if ( v4 > a3 ) + v4 = a3; + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::string::_M_replace(this, a2, v4, *(char **)a4, *(_DWORD *)(a4 + 4)); +} + +//----- (004DC5F0) -------------------------------------------------------- +unsigned int **__thiscall std::string::replace( + unsigned int **this, + unsigned int a2, + unsigned int a3, + _DWORD *a4, + unsigned int a5, + size_t a6) +{ + size_t v6; // eax + size_t v7; // esi + + v6 = a6; + if ( a4[1] - a5 <= a6 ) + v6 = a4[1] - a5; + if ( a5 > a4[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a5, + a4[1]); + v7 = (size_t)this[1] - a2; + if ( v7 > a3 ) + v7 = a3; + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::string::_M_replace(this, a2, v7, (char *)(*a4 + a5), v6); +} + +//----- (004DC690) -------------------------------------------------------- +_DWORD *__thiscall std::string::replace(_DWORD *this, unsigned int a2, unsigned int a3, size_t a4, char a5) +{ + unsigned int v5; // eax + + v5 = this[1] - a2; + if ( v5 > a3 ) + v5 = a3; + if ( a2 > this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + this[1]); + return std::string::_M_replace_aux(this, a2, v5, a4, a5); +} + +//----- (004DC6F0) -------------------------------------------------------- +void __thiscall std::string::reserve(_DWORD *this, unsigned int a2) +{ + unsigned int v3; // ecx + unsigned int v4; // eax + _BYTE *Block; // edi + _DWORD *v6; // esi + unsigned int v7; // edx + unsigned int v8; // ebp + _BYTE *v9; // eax + _BYTE *Src; // ebp + _BYTE *v11; // edi + int v12; // eax + unsigned int v13; // eax + + v3 = this[1]; + v4 = a2; + if ( a2 < v3 ) + { + a2 = v3; + v4 = v3; + } + Block = (_BYTE *)*this; + v6 = this + 2; + if ( this + 2 == (_DWORD *)*this ) + v7 = 15; + else + v7 = this[2]; + if ( v7 != v4 ) + { + v8 = 15; + if ( v7 <= 0xF ) + v8 = v7; + if ( v8 >= v4 ) + { + if ( v6 != (_DWORD *)Block ) + { + if ( v3 ) + { + if ( v3 != -1 ) + memcpy(this + 2, Block, v3 + 1); + } + else + { + *((_BYTE *)this + 8) = *Block; + } + operator delete(Block); + *this = v6; + } + } + else + { + v9 = std::string::_M_create(&a2, v7); + Src = (_BYTE *)*this; + v11 = v9; + v12 = this[1]; + if ( v12 ) + { + if ( v12 != -1 ) + memcpy(v11, Src, v12 + 1); + } + else + { + *v11 = *Src; + } + if ( Src != (_BYTE *)v6 ) + operator delete(Src); + v13 = a2; + *this = v11; + this[2] = v13; + } + } +} + +//----- (004DC800) -------------------------------------------------------- +int __thiscall std::string::_M_erase(int *this, int a2, int a3) +{ + int v4; // eax + int v5; // ecx + _BYTE *Src; // edx + _BYTE *v7; // ecx + int result; // eax + + v4 = this[1]; + v5 = *this; + if ( v4 != a3 + a2 && a3 ) + { + Src = (_BYTE *)(v5 + a3 + a2); + v7 = (_BYTE *)(a2 + v5); + if ( v4 - (a3 + a2) == 1 ) + *v7 = *Src; + else + memmove(v7, Src, v4 - (a3 + a2)); + v5 = *this; + v4 = this[1]; + } + result = v4 - a3; + this[1] = result; + *(_BYTE *)(v5 + result) = 0; + return result; +} + +//----- (004DC870) -------------------------------------------------------- +int __fastcall std::string::pop_back(_DWORD *a1) +{ + int result; // eax + + result = a1[1]; + a1[1] = result - 1; + *(_BYTE *)(*a1 + result - 1) = 0; + return result; +} + +//----- (004DC890) -------------------------------------------------------- +_DWORD *__thiscall std::string::_M_append(_DWORD *this, _BYTE *Src, size_t Size) +{ + _DWORD *v4; // edi + size_t v5; // ecx + _DWORD *v6; // eax + unsigned int v7; // esi + unsigned int v8; // edi + _BYTE *v9; // eax + + v4 = this + 2; + v5 = this[1]; + v6 = (_DWORD *)*this; + v7 = v5 + Size; + if ( (_DWORD *)*this == v4 ) + v8 = 15; + else + v8 = this[2]; + if ( v7 > v8 ) + { + std::string::_M_mutate((int)this, v5, 0, Src, Size); + v6 = (_DWORD *)*this; + } + else if ( Size ) + { + v9 = (char *)v6 + v5; + if ( Size == 1 ) + *v9 = *Src; + else + memcpy(v9, Src, Size); + v6 = (_DWORD *)*this; + } + this[1] = v7; + *((_BYTE *)v6 + v7) = 0; + return this; +} + +//----- (004DC930) -------------------------------------------------------- +void __thiscall std::string::_M_assign(int this, int a2) +{ + _BYTE *v2; // esi + size_t Size; // edi + unsigned int v5; // eax + _BYTE *Src; // eax + int v7; // eax + int v8; // [esp+1Ch] [ebp-30h] + int v9[8]; // [esp+2Ch] [ebp-20h] BYREF + + if ( this != a2 ) + { + v2 = *(_BYTE **)this; + Size = *(_DWORD *)(a2 + 4); + if ( this + 8 == *(_DWORD *)this ) + v5 = 15; + else + v5 = *(_DWORD *)(this + 8); + if ( v5 < Size ) + { + v8 = this + 8; + v9[0] = *(_DWORD *)(a2 + 4); + v2 = std::string::_M_create((unsigned int *)v9, v5); + if ( v8 != *(_DWORD *)this ) + operator delete(*(void **)this); + v7 = v9[0]; + *(_DWORD *)this = v2; + *(_DWORD *)(this + 8) = v7; + if ( !Size ) + goto LABEL_9; + } + else if ( !Size ) + { +LABEL_9: + *(_DWORD *)(this + 4) = Size; + v2[Size] = 0; + return; + } + Src = *(_BYTE **)a2; + if ( Size == 1 ) + *v2 = *Src; + else + memcpy(v2, Src, Size); + v2 = *(_BYTE **)this; + goto LABEL_9; + } +} +// 4DC930: using guessed type unsigned int var_20[8]; + +//----- (004DC9F0) -------------------------------------------------------- +void *__stdcall std::string::_M_create(unsigned int *a1, unsigned int a2) +{ + unsigned int v2; // eax + unsigned int v3; // edx + + v2 = *a1; + if ( *a1 > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + if ( v2 > a2 ) + { + v3 = 2 * a2; + if ( v2 < 2 * a2 ) + { + if ( v3 > 0x3FFFFFFF ) + { + *a1 = 0x3FFFFFFF; + return operator new(0x40000000u); + } + *a1 = v3; + v2 = 2 * a2; + } + } + return operator new(v2 + 1); +} + +//----- (004DCA60) -------------------------------------------------------- +int __thiscall std::string::_M_length(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[1] = a2; + return result; +} + +//----- (004DCA70) -------------------------------------------------------- +int __thiscall std::string::_M_mutate(int this, size_t Size, int a3, _BYTE *a4, size_t a5) +{ + _BYTE *v6; // edi + unsigned int v7; // eax + _BYTE *v8; // eax + _BYTE *Block; // ecx + _BYTE *v10; // ebp + _BYTE *v11; // esi + int result; // eax + _BYTE *Src; // [esp+4h] [ebp-48h] + size_t v14; // [esp+14h] [ebp-38h] + size_t v15; // [esp+18h] [ebp-34h] + _BYTE *v16; // [esp+18h] [ebp-34h] + _BYTE *v17; // [esp+1Ch] [ebp-30h] + _BYTE *v18; // [esp+1Ch] [ebp-30h] + int v19[8]; // [esp+2Ch] [ebp-20h] BYREF + + v15 = Size + a3; + v14 = *(_DWORD *)(this + 4) - (Size + a3); + v6 = (_BYTE *)(this + 8); + v19[0] = *(_DWORD *)(this + 4) + a5 - a3; + if ( this + 8 == *(_DWORD *)this ) + v7 = 15; + else + v7 = *(_DWORD *)(this + 8); + v8 = std::string::_M_create((unsigned int *)v19, v7); + Block = *(_BYTE **)this; + v10 = v8; + if ( Size ) + { + if ( Size == 1 ) + { + *v8 = *Block; + } + else + { + v17 = *(_BYTE **)this; + memcpy(v8, *(const void **)this, Size); + Block = v17; + } + } + if ( a4 && a5 ) + { + if ( a5 == 1 ) + { + v10[Size] = *a4; + } + else + { + v18 = Block; + memcpy(&v10[Size], a4, a5); + Block = v18; + } + } + if ( v14 ) + { + v11 = &v10[a5 + Size]; + if ( v14 == 1 ) + { + *v11 = Block[v15]; + } + else + { + Src = &Block[v15]; + v16 = Block; + memcpy(v11, Src, v14); + Block = v16; + } + } + if ( v6 != Block ) + operator delete(Block); + result = v19[0]; + *(_DWORD *)this = v10; + *(_DWORD *)(this + 8) = result; + return result; +} +// 4DCA70: using guessed type size_t var_20[8]; + +//----- (004DCBC0) -------------------------------------------------------- +void *__cdecl std::string::_S_assign(_BYTE *a1, void *Val, size_t Size) +{ + void *result; // eax + + result = Val; + if ( Val == (void *)1 ) + { + *a1 = Size; + } + else if ( Val ) + { + return memset(a1, (char)Size, (size_t)Val); + } + return result; +} + +//----- (004DCC00) -------------------------------------------------------- +_DWORD *__thiscall std::string::push_back(_DWORD *this, char a2) +{ + size_t v3; // esi + _DWORD *v4; // eax + unsigned int v5; // edi + unsigned int v6; // edx + _DWORD *result; // eax + + v3 = this[1]; + v4 = (_DWORD *)*this; + v5 = v3 + 1; + if ( (_DWORD *)*this == this + 2 ) + v6 = 15; + else + v6 = this[2]; + if ( v5 > v6 ) + { + std::string::_M_mutate((int)this, v3, 0, 0, 1u); + v4 = (_DWORD *)*this; + } + *((_BYTE *)v4 + v3) = a2; + result = (_DWORD *)*this; + this[1] = v5; + *((_BYTE *)result + v3 + 1) = 0; + return result; +} + +//----- (004DCC80) -------------------------------------------------------- +_DWORD *__thiscall std::string::basic_string(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + int v3; // ebx + + result = a2; + *this = this + 2; + if ( result + 2 == (_DWORD *)*result ) + { + this[2] = a2[2]; + this[3] = a2[3]; + this[4] = a2[4]; + this[5] = a2[5]; + } + else + { + *this = *a2; + this[2] = a2[2]; + } + v3 = a2[1]; + *a2 = a2 + 2; + a2[1] = 0; + *((_BYTE *)a2 + 8) = 0; + this[1] = v3; + return result; +} + +//----- (004DCCE0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, int a2, int a3) +{ + _BYTE *result; // eax + int v4; // ebx + int v5; // ebx + int v6; // edx + + result = (_BYTE *)a2; + *this = this + 2; + if ( result + 8 == *(_BYTE **)result ) + { + this[2] = *(_DWORD *)(a2 + 8); + this[3] = *(_DWORD *)(a2 + 12); + this[4] = *(_DWORD *)(a2 + 16); + this[5] = *(_DWORD *)(a2 + 20); + v6 = *(_DWORD *)(a2 + 4); + *(_DWORD *)(a2 + 4) = 0; + result = *(_BYTE **)a2; + this[1] = v6; + *result = 0; + } + else + { + *this = *(_DWORD *)a2; + v4 = *(_DWORD *)(a2 + 4); + *(_DWORD *)a2 = a2 + 8; + this[1] = v4; + v5 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a2 + 4) = 0; + *(_BYTE *)(a2 + 8) = 0; + this[2] = v5; + } + return result; +} + +//----- (004DCD50) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, char *Str, int a3) +{ + int v4; // eax + int v6; // [esp+8h] [ebp-14h] + + *this = this + 2; + v4 = -1; + if ( Str ) + v4 = (int)&Str[strlen(Str)]; + LOBYTE(v6) = 0; + return std::string::_M_construct(this, Str, v4, v6); +} +// 4DCD81: variable 'v6' is possibly undefined + +//----- (004DCDA0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _BYTE *a2, int a3, int a4) +{ + *this = this + 2; + LOBYTE(a4) = 0; + return std::string::_M_construct(this, a2, (int)&a2[a3], a4); +} + +//----- (004DCDC0) -------------------------------------------------------- +char *__thiscall std::string::basic_string(_DWORD *this, int a2) +{ + char *result; // eax + + result = (char *)(this + 2); + this[1] = 0; + *this = this + 2; + *((_BYTE *)this + 8) = 0; + return result; +} + +//----- (004DCDE0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(char *this, int a2) +{ + _BYTE *result; // eax + char *Src; // edi + size_t Size; // esi + char v6; // dl + + result = this + 8; + *(_DWORD *)this = this + 8; + Src = *(char **)a2; + Size = *(_DWORD *)(a2 + 4); + if ( Size + *(_DWORD *)a2 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + if ( Size > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + *((_DWORD *)this + 2) = Size; + *(_DWORD *)this = result; + } + else + { + if ( Size == 1 ) + { + v6 = *Src; + *((_DWORD *)this + 1) = 1; + this[8] = v6; + this[9] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = Size; + result[Size] = 0; + return result; +} + +//----- (004DCE90) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(char *this, int a2, int a3) +{ + _BYTE *result; // eax + size_t Size; // esi + char *Src; // edi + + result = this + 8; + *(_DWORD *)this = this + 8; + Size = *(_DWORD *)(a2 + 4); + Src = *(char **)a2; + if ( Size > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + *((_DWORD *)this + 2) = Size; + *(_DWORD *)this = result; + } + else + { + if ( Size == 1 ) + { + this[8] = *Src; + *((_DWORD *)this + 1) = 1; + this[9] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = Size; + result[Size] = 0; + return result; +} + +//----- (004DCF30) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // eax + + *this = this + 2; + v4 = a2[1]; + if ( a3 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + a2[1]); + LOBYTE(a4) = 0; + return std::string::_M_construct(this, (_BYTE *)(a3 + *a2), *a2 + v4, a4); +} + +//----- (004DCF80) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // edi + unsigned int v5; // eax + unsigned int v6; // eax + + *this = this + 2; + v4 = a4; + v5 = a2[1]; + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + v5); + v6 = v5 - a3; + LOBYTE(a4) = 0; + if ( v6 > v4 ) + v6 = v4; + return std::string::_M_construct(this, (_BYTE *)(a3 + *a2), a3 + *a2 + v6, a4); +} + +//----- (004DCFE0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, unsigned int a4, int a5) +{ + unsigned int v5; // eax + unsigned int v6; // eax + int v8; // [esp+8h] [ebp-14h] + + *this = this + 2; + v5 = a2[1]; + if ( a3 > v5 ) + std::__throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)", "string::string", a3, v5); + v6 = v5 - a3; + LOBYTE(v8) = 0; + if ( v6 > a4 ) + v6 = a4; + return std::string::_M_construct(this, (_BYTE *)(a3 + *a2), a3 + *a2 + v6, v8); +} +// 4DD017: variable 'v8' is possibly undefined + +//----- (004DD050) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _BYTE *a2, int a3, int a4) +{ + *this = this + 2; + LOBYTE(a4) = 0; + return std::string::_M_construct(this, a2, (int)&a2[a3], a4); +} + +//----- (004DD070) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(char *this, size_t Size, char a3, int a4) +{ + _BYTE *result; // eax + + result = this + 8; + *(_DWORD *)this = this + 8; + if ( Size > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + *((_DWORD *)this + 2) = Size; + *(_DWORD *)this = result; +LABEL_6: + memset(result, a3, Size); + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = Size; + result[Size] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + if ( Size != 1 ) + goto LABEL_6; + this[8] = a3; + *((_DWORD *)this + 1) = 1; + this[9] = 0; + return result; +} + +//----- (004DD110) -------------------------------------------------------- +int __fastcall std::string::basic_string(int a1) +{ + int result; // eax + + result = a1 + 8; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + *(_BYTE *)(a1 + 8) = 0; + return result; +} + +//----- (004DD130) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string<__gnu_cxx::__normal_iterator,void>( + char *this, + char *Src, + int a3, + int a4) +{ + _BYTE *result; // eax + size_t Size; // ebx + + result = this + 8; + *(_DWORD *)this = this + 8; + Size = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + *((_DWORD *)this + 2) = Size; + *(_DWORD *)this = result; + } + else + { + if ( Size == 1 ) + { + this[8] = *Src; + *((_DWORD *)this + 1) = 1; + this[9] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = Size; + result[Size] = 0; + return result; +} + +//----- (004DD1D0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _BYTE *a2, int a3, int a4) +{ + LOBYTE(a4) = 0; + *this = this + 2; + return std::string::_M_construct(this, a2, a3, a4); +} + +//----- (004DD1E0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(char *this, char *Src, int a3, int a4) +{ + _BYTE *result; // eax + size_t Size; // ebx + char v7; // dl + + result = this + 8; + *(_DWORD *)this = this + 8; + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + Size = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + *((_DWORD *)this + 2) = Size; + *(_DWORD *)this = result; + } + else + { + if ( Size == 1 ) + { + v7 = *Src; + *((_DWORD *)this + 1) = 1; + this[8] = v7; + this[9] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = Size; + result[Size] = 0; + return result; +} + +//----- (004DD290) -------------------------------------------------------- +_DWORD *__thiscall std::string::basic_string(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + int v3; // ebx + + result = a2; + *this = this + 2; + if ( result + 2 == (_DWORD *)*result ) + { + this[2] = a2[2]; + this[3] = a2[3]; + this[4] = a2[4]; + this[5] = a2[5]; + } + else + { + *this = *a2; + this[2] = a2[2]; + } + v3 = a2[1]; + *a2 = a2 + 2; + a2[1] = 0; + *((_BYTE *)a2 + 8) = 0; + this[1] = v3; + return result; +} + +//----- (004DD2F0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, int a2, int a3) +{ + _BYTE *result; // eax + int v4; // ebx + int v5; // ebx + int v6; // edx + + result = (_BYTE *)a2; + *this = this + 2; + if ( result + 8 == *(_BYTE **)result ) + { + this[2] = *(_DWORD *)(a2 + 8); + this[3] = *(_DWORD *)(a2 + 12); + this[4] = *(_DWORD *)(a2 + 16); + this[5] = *(_DWORD *)(a2 + 20); + v6 = *(_DWORD *)(a2 + 4); + *(_DWORD *)(a2 + 4) = 0; + result = *(_BYTE **)a2; + this[1] = v6; + *result = 0; + } + else + { + *this = *(_DWORD *)a2; + v4 = *(_DWORD *)(a2 + 4); + *(_DWORD *)a2 = a2 + 8; + this[1] = v4; + v5 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a2 + 4) = 0; + *(_BYTE *)(a2 + 8) = 0; + this[2] = v5; + } + return result; +} + +//----- (004DD360) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, char *Str, int a3) +{ + int v4; // eax + int v6; // [esp+8h] [ebp-14h] + + *this = this + 2; + v4 = -1; + if ( Str ) + v4 = (int)&Str[strlen(Str)]; + LOBYTE(v6) = 0; + return std::string::_M_construct(this, Str, v4, v6); +} +// 4DD391: variable 'v6' is possibly undefined + +//----- (004DD3B0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _BYTE *a2, int a3, int a4) +{ + *this = this + 2; + LOBYTE(a4) = 0; + return std::string::_M_construct(this, a2, (int)&a2[a3], a4); +} + +//----- (004DD3D0) -------------------------------------------------------- +char *__thiscall std::string::basic_string(_DWORD *this, int a2) +{ + char *result; // eax + + result = (char *)(this + 2); + this[1] = 0; + *this = this + 2; + *((_BYTE *)this + 8) = 0; + return result; +} + +//----- (004DD3F0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(char *this, int a2) +{ + _BYTE *result; // eax + char *Src; // edi + size_t Size; // esi + char v6; // dl + + result = this + 8; + *(_DWORD *)this = this + 8; + Src = *(char **)a2; + Size = *(_DWORD *)(a2 + 4); + if ( Size + *(_DWORD *)a2 && !Src ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + if ( Size > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + *((_DWORD *)this + 2) = Size; + *(_DWORD *)this = result; + } + else + { + if ( Size == 1 ) + { + v6 = *Src; + *((_DWORD *)this + 1) = 1; + this[8] = v6; + this[9] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = Size; + result[Size] = 0; + return result; +} + +//----- (004DD4A0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(char *this, int a2, int a3) +{ + _BYTE *result; // eax + size_t Size; // esi + char *Src; // edi + + result = this + 8; + *(_DWORD *)this = this + 8; + Size = *(_DWORD *)(a2 + 4); + Src = *(char **)a2; + if ( Size > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + *((_DWORD *)this + 2) = Size; + *(_DWORD *)this = result; + } + else + { + if ( Size == 1 ) + { + this[8] = *Src; + *((_DWORD *)this + 1) = 1; + this[9] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = Size; + result[Size] = 0; + return result; +} + +//----- (004DD540) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // eax + + *this = this + 2; + v4 = a2[1]; + if ( a3 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + a2[1]); + LOBYTE(a4) = 0; + return std::string::_M_construct(this, (_BYTE *)(a3 + *a2), *a2 + v4, a4); +} + +//----- (004DD590) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // edi + unsigned int v5; // eax + unsigned int v6; // eax + + *this = this + 2; + v4 = a4; + v5 = a2[1]; + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + v5); + v6 = v5 - a3; + LOBYTE(a4) = 0; + if ( v6 > v4 ) + v6 = v4; + return std::string::_M_construct(this, (_BYTE *)(a3 + *a2), a3 + *a2 + v6, a4); +} + +//----- (004DD5F0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, unsigned int a4, int a5) +{ + unsigned int v5; // eax + unsigned int v6; // eax + int v8; // [esp+8h] [ebp-14h] + + *this = this + 2; + v5 = a2[1]; + if ( a3 > v5 ) + std::__throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)", "string::string", a3, v5); + v6 = v5 - a3; + LOBYTE(v8) = 0; + if ( v6 > a4 ) + v6 = a4; + return std::string::_M_construct(this, (_BYTE *)(a3 + *a2), a3 + *a2 + v6, v8); +} +// 4DD627: variable 'v8' is possibly undefined + +//----- (004DD660) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _BYTE *a2, int a3, int a4) +{ + *this = this + 2; + LOBYTE(a4) = 0; + return std::string::_M_construct(this, a2, (int)&a2[a3], a4); +} + +//----- (004DD680) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(char *this, size_t Size, char a3, int a4) +{ + _BYTE *result; // eax + + result = this + 8; + *(_DWORD *)this = this + 8; + if ( Size > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + *((_DWORD *)this + 2) = Size; + *(_DWORD *)this = result; +LABEL_6: + memset(result, a3, Size); + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = Size; + result[Size] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + if ( Size != 1 ) + goto LABEL_6; + this[8] = a3; + *((_DWORD *)this + 1) = 1; + this[9] = 0; + return result; +} + +//----- (004DD720) -------------------------------------------------------- +int __fastcall std::string::basic_string(int a1) +{ + int result; // eax + + result = a1 + 8; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + *(_BYTE *)(a1 + 8) = 0; + return result; +} + +//----- (004DD740) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string<__gnu_cxx::__normal_iterator,void>( + char *this, + char *Src, + int a3, + int a4) +{ + _BYTE *result; // eax + size_t Size; // ebx + + result = this + 8; + *(_DWORD *)this = this + 8; + Size = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + *((_DWORD *)this + 2) = Size; + *(_DWORD *)this = result; + } + else + { + if ( Size == 1 ) + { + this[8] = *Src; + *((_DWORD *)this + 1) = 1; + this[9] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = Size; + result[Size] = 0; + return result; +} + +//----- (004DD7E0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(_DWORD *this, _BYTE *a2, int a3, int a4) +{ + LOBYTE(a4) = 0; + *this = this + 2; + return std::string::_M_construct(this, a2, a3, a4); +} + +//----- (004DD7F0) -------------------------------------------------------- +_BYTE *__thiscall std::string::basic_string(char *this, char *Src, int a3, int a4) +{ + _BYTE *result; // eax + size_t Size; // ebx + char v7; // dl + + result = this + 8; + *(_DWORD *)this = this + 8; + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + Size = a3 - (_DWORD)Src; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xF ) + { + if ( Size > 0x3FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + result = operator new(Size + 1); + *((_DWORD *)this + 2) = Size; + *(_DWORD *)this = result; + } + else + { + if ( Size == 1 ) + { + v7 = *Src; + *((_DWORD *)this + 1) = 1; + this[8] = v7; + this[9] = 0; + return result; + } + if ( !Size ) + { + *((_DWORD *)this + 1) = 0; + *result = 0; + return result; + } + } + memcpy(result, Src, Size); + result = *(_BYTE **)this; + *((_DWORD *)this + 1) = Size; + result[Size] = 0; + return result; +} + +//----- (004DD8A0) -------------------------------------------------------- +void __fastcall std::string::~string(void **a1) +{ + if ( *a1 != a1 + 2 ) + operator delete(*a1); +} + +//----- (004DD8D0) -------------------------------------------------------- +void __fastcall std::string::~string(void **a1) +{ + if ( *a1 != a1 + 2 ) + operator delete(*a1); +} + +//----- (004DD900) -------------------------------------------------------- +_DWORD *__thiscall std::string::operator=(_DWORD *this, _DWORD *a2) +{ + _DWORD *v3; // eax + _DWORD *v4; // ecx + int v5; // edx + int v6; // ebp + + v3 = (_DWORD *)*this; + v4 = (_DWORD *)*a2; + v5 = a2[1]; + if ( a2 + 2 != (_DWORD *)*a2 ) + { + if ( v3 == this + 2 ) + { + *this = v4; + this[1] = v5; + this[2] = a2[2]; + } + else + { + *this = v4; + v6 = this[2]; + this[1] = v5; + this[2] = a2[2]; + if ( v3 ) + { + *a2 = v3; + a2[2] = v6; + goto LABEL_5; + } + } + *a2 = a2 + 2; + v3 = a2 + 2; + goto LABEL_5; + } + if ( v5 ) + { + if ( v5 == 1 ) + *(_BYTE *)v3 = *((_BYTE *)a2 + 8); + else + memcpy(v3, a2 + 2, a2[1]); + v3 = (_DWORD *)*this; + v5 = a2[1]; + } + this[1] = v5; + *((_BYTE *)v3 + v5) = 0; + v3 = (_DWORD *)*a2; +LABEL_5: + a2[1] = 0; + *(_BYTE *)v3 = 0; + return this; +} + +//----- (004DD9B0) -------------------------------------------------------- +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *Str) +{ + size_t v3; // eax + + v3 = strlen(Str); + return std::string::_M_replace(this, 0, (size_t)this[1], Str, v3); +} + +//----- (004DD9F0) -------------------------------------------------------- +void *__thiscall std::string::operator=(void *this, int a2) +{ + std::string::_M_assign((int)this, a2); + return this; +} + +//----- (004DDA10) -------------------------------------------------------- +unsigned int **__thiscall std::string::operator=(unsigned int **this, char *a2, size_t a3) +{ + std::string::_M_replace(this, 0, (size_t)this[1], a2, a3); + return this; +} + +//----- (004DDA50) -------------------------------------------------------- +_DWORD *__thiscall std::string::operator=(_DWORD *this, char a2) +{ + std::string::_M_replace_aux(this, 0, this[1], 1u, a2); + return this; +} + +//----- (004DDA90) -------------------------------------------------------- +int __thiscall std::string::operator[](_DWORD *this, int a2) +{ + return a2 + *this; +} + +//----- (004DDAA0) -------------------------------------------------------- +_DWORD *__thiscall std::string::operator+=(_DWORD *this, char *Str) +{ + unsigned int Size; // eax + size_t v4; // ebp + _DWORD *v5; // edx + unsigned int v6; // edi + unsigned int v7; // ecx + _BYTE *v8; // edx + _DWORD *result; // eax + + Size = strlen(Str); + v4 = this[1]; + if ( Size > 0x3FFFFFFF - v4 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v5 = (_DWORD *)*this; + v6 = Size + v4; + if ( (_DWORD *)*this == this + 2 ) + v7 = 15; + else + v7 = this[2]; + if ( v6 > v7 ) + { + std::string::_M_mutate((int)this, v4, 0, Str, Size); + v5 = (_DWORD *)*this; + } + else if ( Size ) + { + v8 = (char *)v5 + v4; + if ( Size == 1 ) + *v8 = *Str; + else + memcpy(v8, Str, Size); + v5 = (_DWORD *)*this; + } + this[1] = v6; + result = this; + *((_BYTE *)v5 + v6) = 0; + return result; +} + +//----- (004DDB60) -------------------------------------------------------- +_DWORD *__thiscall std::string::operator+=(_DWORD *this, int a2) +{ + _DWORD *v3; // edi + size_t v4; // ecx + size_t v5; // edx + _BYTE *Src; // ebp + _DWORD *v7; // eax + unsigned int v8; // esi + unsigned int v9; // edi + _BYTE *v10; // eax + + v3 = this + 2; + v4 = this[1]; + v5 = *(_DWORD *)(a2 + 4); + Src = *(_BYTE **)a2; + v7 = (_DWORD *)*this; + v8 = v5 + v4; + if ( (_DWORD *)*this == v3 ) + v9 = 15; + else + v9 = this[2]; + if ( v8 > v9 ) + { + std::string::_M_mutate((int)this, v4, 0, Src, v5); + v7 = (_DWORD *)*this; + } + else if ( v5 ) + { + v10 = (char *)v7 + v4; + if ( v5 == 1 ) + *v10 = *Src; + else + memcpy(v10, Src, *(_DWORD *)(a2 + 4)); + v7 = (_DWORD *)*this; + } + this[1] = v8; + *((_BYTE *)v7 + v8) = 0; + return this; +} + +//----- (004DDC00) -------------------------------------------------------- +_DWORD *__thiscall std::string::operator+=(_DWORD *this, _BYTE *Src, size_t Size) +{ + size_t v4; // edi + _DWORD *v5; // eax + unsigned int v6; // esi + unsigned int v7; // ecx + _BYTE *v8; // eax + + v4 = this[1]; + if ( Size > 0x3FFFFFFF - v4 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v5 = (_DWORD *)*this; + v6 = Size + v4; + if ( (_DWORD *)*this == this + 2 ) + v7 = 15; + else + v7 = this[2]; + if ( v6 > v7 ) + { + std::string::_M_mutate((int)this, v4, 0, Src, Size); + v5 = (_DWORD *)*this; + } + else if ( Size ) + { + v8 = (char *)v5 + v4; + if ( Size == 1 ) + *v8 = *Src; + else + memcpy(v8, Src, Size); + v5 = (_DWORD *)*this; + } + this[1] = v6; + *((_BYTE *)v5 + v6) = 0; + return this; +} + +//----- (004DDCC0) -------------------------------------------------------- +_DWORD *__thiscall std::string::operator+=(_DWORD *this, char a2) +{ + _DWORD *result; // eax + _DWORD *v3; // ecx + size_t v4; // ebx + _DWORD *v5; // edx + unsigned int v6; // esi + unsigned int v7; // ecx + int v8; // edx + _DWORD *v9; // [esp+1Ch] [ebp-10h] + + result = this; + v3 = this + 2; + v4 = *(v3 - 1); + v5 = (_DWORD *)*(v3 - 2); + v6 = v4 + 1; + if ( v5 == v3 ) + v7 = 15; + else + v7 = result[2]; + if ( v6 > v7 ) + { + v9 = result; + std::string::_M_mutate((int)result, v4, 0, 0, 1u); + result = v9; + v5 = (_DWORD *)*v9; + } + *((_BYTE *)v5 + v4) = a2; + v8 = *result; + result[1] = v6; + *(_BYTE *)(v8 + v4 + 1) = 0; + return result; +} + +//----- (004DDD40) -------------------------------------------------------- +void __thiscall std::wstring::_M_destroy(void **this, int a2) +{ + operator delete(*this); +} + +//----- (004DDD60) -------------------------------------------------------- +void __fastcall std::wstring::_M_dispose(void **a1) +{ + if ( *a1 != a1 + 2 ) + operator delete(*a1); +} + +//----- (004DDD90) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::_M_replace( + unsigned int **this, + int a2, + unsigned int a3, + char *Src, + unsigned int a5) +{ + unsigned int v5; // eax + unsigned int v7; // edi + unsigned int v8; // ecx + bool v9; // cl + unsigned int *v10; // eax + unsigned int v12; // ecx + char *v13; // eax + signed int Size; // eax + signed int v15; // edx + int v16; // esi + unsigned int *v17; // [esp+1Ch] [ebp-30h] + unsigned int v18; // [esp+1Ch] [ebp-30h] + int v19; // [esp+1Ch] [ebp-30h] + _WORD *v20; // [esp+20h] [ebp-2Ch] + bool v21; // [esp+24h] [ebp-28h] + signed int v22; // [esp+24h] [ebp-28h] + unsigned int v23; // [esp+28h] [ebp-24h] + int v24; // [esp+2Ch] [ebp-20h] + + v5 = (unsigned int)this[1]; + if ( a5 > a3 + 0x1FFFFFFF - v5 ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace"); + v24 = a5 - a3; + v7 = v5 + a5 - a3; + v17 = *this; + if ( *this == (unsigned int *)(this + 2) ) + v8 = 7; + else + v8 = (unsigned int)this[2]; + if ( v8 < v7 ) + { + std::wstring::_M_mutate((int)this, a2, a3, Src, a5); + goto LABEL_12; + } + v20 = (_WORD *)v17 + a2; + v23 = v5 - (a3 + a2); + v9 = a3 != a5 && v5 != a3 + a2; + if ( v17 <= (unsigned int *)Src && Src <= (char *)v17 + 2 * v5 ) + { + if ( a5 && a3 >= a5 ) + { + if ( a5 != 1 ) + { + v21 = a3 != a5 && v5 != a3 + a2; + v18 = a5; + memmove(v20, Src, 2 * a5); + if ( !v21 ) + goto LABEL_12; + goto LABEL_18; + } + *v20 = *(_WORD *)Src; + } + if ( !v9 ) + goto LABEL_20; + v18 = a5; +LABEL_18: + if ( v23 == 1 ) + v20[v18] = v20[a3]; + else + memmove(&v20[v18], &v20[a3], 2 * v23); +LABEL_20: + if ( a3 >= a5 ) + goto LABEL_12; + v12 = a5; + v13 = (char *)&v20[a3]; + if ( v13 < &Src[2 * a5] ) + { + if ( v13 > Src ) + { + Size = v13 - Src; + v15 = Size; + v19 = Size >> 1; + if ( Size >> 1 == 1 ) + { + *v20 = *(_WORD *)Src; + } + else if ( v19 ) + { + v22 = Size; + memmove(v20, Src, Size); + v12 = a5; + v15 = v22; + } + v16 = a5 - v19; + if ( a5 - v19 == 1 ) + { + *(_WORD *)((char *)v20 + v15) = v20[v12]; + } + else if ( v16 ) + { + memcpy((char *)v20 + v15, &v20[v12], 2 * v16); + } + } + else if ( a5 == 1 ) + { + *v20 = *(_WORD *)&Src[2 * v24]; + } + else if ( a5 ) + { + memcpy(v20, &Src[2 * v24], 2 * a5); + } + goto LABEL_12; + } + if ( a5 != 1 ) + { + if ( a5 ) + memmove(v20, Src, 2 * a5); + goto LABEL_12; + } +LABEL_27: + *v20 = *(_WORD *)Src; + goto LABEL_12; + } + if ( v9 ) + { + if ( v23 == 1 ) + v20[a5] = v20[a3]; + else + memmove(&v20[a5], &v20[a3], 2 * v23); + } + if ( a5 ) + { + if ( a5 != 1 ) + { + memcpy(v20, Src, 2 * a5); + goto LABEL_12; + } + goto LABEL_27; + } +LABEL_12: + v10 = *this; + this[1] = (unsigned int *)v7; + *((_WORD *)v10 + v7) = 0; + return this; +} + +//----- (004DE0E0) -------------------------------------------------------- +int __cdecl std::wstring::_S_compare(int a1, int a2) +{ + return a1 - a2; +} + +//----- (004DE0F0) -------------------------------------------------------- +int __thiscall std::wstring::_M_capacity(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[2] = a2; + return result; +} + +//----- (004DE100) -------------------------------------------------------- +int __thiscall std::wstring::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004DE110) -------------------------------------------------------- +int __thiscall std::wstring::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004DE120) -------------------------------------------------------- +int __thiscall std::wstring::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004DE130) -------------------------------------------------------- +int __thiscall std::wstring::_Alloc_hider::_Alloc_hider(_DWORD *this, int a2, int a3) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004DE140) -------------------------------------------------------- +int __thiscall std::wstring::_M_construct(_DWORD *this, unsigned int a2, __int16 a3) +{ + _WORD *v4; // ecx + int result; // eax + _WORD *v6; // eax + _WORD *v7; // edx + unsigned int v8; // eax + + if ( a2 > 7 ) + { + if ( a2 > 0x1FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + v6 = operator new(2 * a2 + 2); + this[2] = a2; + *this = v6; + v4 = v6; + } + else + { + v4 = (_WORD *)*this; + if ( !a2 ) + goto LABEL_3; + if ( a2 == 1 ) + { + *v4 = a3; + goto LABEL_3; + } + } + v7 = v4; + v8 = a2; + do + { + *v7++ = a3; + --v8; + } + while ( v8 ); +LABEL_3: + result = 0; + this[1] = a2; + v4[a2] = 0; + return result; +} + +//----- (004DE1C0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::_M_construct<__gnu_cxx::__normal_iterator>( + _DWORD *this, + _WORD *Src, + int a3, + int a4) +{ + size_t Size; // ebx + int v6; // edi + _WORD *result; // eax + + Size = a3 - (_DWORD)Src; + v6 = (a3 - (int)Src) >> 1; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xE ) + { + if ( Size > 0x3FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + if ( (unsigned int)(v6 + 1) > 0x3FFFFFFF ) + std::__throw_bad_alloc(); + result = operator new(Size + 2); + this[2] = v6; + *this = result; + } + else + { + result = (_WORD *)*this; + } + if ( v6 == 1 ) + { + *result = *Src; + } + else if ( v6 ) + { + memcpy(result, Src, Size); + result = (_WORD *)*this; + } + this[1] = v6; + *(_WORD *)((char *)result + Size) = 0; + return result; +} + +//----- (004DE260) -------------------------------------------------------- +_WORD *__thiscall std::wstring::_M_construct<__gnu_cxx::__normal_iterator>( + _DWORD *this, + _WORD *Src, + int a3, + int a4) +{ + size_t Size; // ebx + int v6; // edi + _WORD *result; // eax + + Size = a3 - (_DWORD)Src; + v6 = (a3 - (int)Src) >> 1; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xE ) + { + if ( Size > 0x3FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + if ( (unsigned int)(v6 + 1) > 0x3FFFFFFF ) + std::__throw_bad_alloc(); + result = operator new(Size + 2); + this[2] = v6; + *this = result; + } + else + { + result = (_WORD *)*this; + } + if ( v6 == 1 ) + { + *result = *Src; + } + else if ( v6 ) + { + memcpy(result, Src, Size); + result = (_WORD *)*this; + } + this[1] = v6; + *(_WORD *)((char *)result + Size) = 0; + return result; +} + +//----- (004DE300) -------------------------------------------------------- +_WORD *__thiscall std::wstring::_M_construct(_DWORD *this, _WORD *Src, int a3, int a4) +{ + size_t Size; // ebx + int v6; // ebp + _WORD *result; // eax + + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + Size = a3 - (_DWORD)Src; + v6 = (a3 - (int)Src) >> 1; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xE ) + { + if ( Size > 0x3FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + if ( (unsigned int)(v6 + 1) > 0x3FFFFFFF ) + std::__throw_bad_alloc(); + result = operator new(Size + 2); + this[2] = v6; + *this = result; + } + else + { + result = (_WORD *)*this; + } + if ( v6 == 1 ) + { + *result = *Src; + } + else if ( v6 ) + { + memcpy(result, Src, Size); + result = (_WORD *)*this; + } + this[1] = v6; + *(_WORD *)((char *)result + Size) = 0; + return result; +} + +//----- (004DE3C0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::_M_construct(_DWORD *this, _WORD *Src, int a3) +{ + int v4; // ebp + _WORD *result; // eax + int v6; // edx + int v7[8]; // [esp+1Ch] [ebp-20h] BYREF + + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v4 = (a3 - (int)Src) >> 1; + v7[0] = v4; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xE ) + { + result = std::wstring::_M_create((unsigned int *)v7, 0); + *this = result; + this[2] = v7[0]; + } + else + { + result = (_WORD *)*this; + } + if ( v4 == 1 ) + { + *result = *Src; + } + else if ( v4 ) + { + memcpy(result, Src, a3 - (_DWORD)Src); + result = (_WORD *)*this; + } + v6 = v7[0]; + this[1] = v7[0]; + result[v6] = 0; + return result; +} +// 4DE3C0: using guessed type unsigned int var_20[8]; + +//----- (004DE460) -------------------------------------------------------- +_WORD *__thiscall std::wstring::_M_construct(_DWORD *this, _WORD *Src, int a3) +{ + int v4; // ebp + _WORD *result; // eax + int v6; // edx + int v7[8]; // [esp+1Ch] [ebp-20h] BYREF + + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v4 = (a3 - (int)Src) >> 1; + v7[0] = v4; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xE ) + { + result = std::wstring::_M_create((unsigned int *)v7, 0); + *this = result; + this[2] = v7[0]; + } + else + { + result = (_WORD *)*this; + } + if ( v4 == 1 ) + { + *result = *Src; + } + else if ( v4 ) + { + memcpy(result, Src, a3 - (_DWORD)Src); + result = (_WORD *)*this; + } + v6 = v7[0]; + this[1] = v7[0]; + result[v6] = 0; + return result; +} +// 4DE460: using guessed type unsigned int var_20[8]; + +//----- (004DE500) -------------------------------------------------------- +_WORD *__thiscall std::wstring::_M_construct(_DWORD *this, _WORD *Src, int a3, int a4) +{ + size_t Size; // ebx + int v6; // ebp + _WORD *result; // eax + + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + Size = a3 - (_DWORD)Src; + v6 = (a3 - (int)Src) >> 1; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xE ) + { + if ( Size > 0x3FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + if ( (unsigned int)(v6 + 1) > 0x3FFFFFFF ) + std::__throw_bad_alloc(); + result = operator new(Size + 2); + this[2] = v6; + *this = result; + } + else + { + result = (_WORD *)*this; + } + if ( v6 == 1 ) + { + *result = *Src; + } + else if ( v6 ) + { + memcpy(result, Src, Size); + result = (_WORD *)*this; + } + this[1] = v6; + *(_WORD *)((char *)result + Size) = 0; + return result; +} + +//----- (004DE5C0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::_M_construct(_DWORD *this, _WORD *Src, int a3) +{ + int v4; // ebp + _WORD *result; // eax + int v6; // edx + int v7[8]; // [esp+1Ch] [ebp-20h] BYREF + + if ( !Src && a3 ) + std::__throw_logic_error((std::logic_error *)"basic_string::_M_construct null not valid"); + v4 = (a3 - (int)Src) >> 1; + v7[0] = v4; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xE ) + { + result = std::wstring::_M_create((unsigned int *)v7, 0); + *this = result; + this[2] = v7[0]; + } + else + { + result = (_WORD *)*this; + } + if ( v4 == 1 ) + { + *result = *Src; + } + else if ( v4 ) + { + memcpy(result, Src, a3 - (_DWORD)Src); + result = (_WORD *)*this; + } + v6 = v7[0]; + this[1] = v7[0]; + result[v6] = 0; + return result; +} +// 4DE5C0: using guessed type unsigned int var_20[8]; + +//----- (004DE660) -------------------------------------------------------- +int __fastcall std::wstring::_M_local_data(int a1) +{ + return a1 + 8; +} + +//----- (004DE670) -------------------------------------------------------- +int __thiscall std::wstring::_M_set_length(int *this, int a2) +{ + int result; // eax + int v3; // edx + + result = a2; + v3 = *this; + this[1] = a2; + *(_WORD *)(v3 + 2 * a2) = 0; + return result; +} + +//----- (004DE690) -------------------------------------------------------- +int __cdecl std::wstring::_S_copy_chars(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + int v4; // ecx + + result = Size - (_DWORD)Src; + v4 = (int)(Size - (_DWORD)Src) >> 1; + if ( v4 == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( v4 ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004DE6D0) -------------------------------------------------------- +int __cdecl std::wstring::_S_copy_chars(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + int v4; // ecx + + result = Size - (_DWORD)Src; + v4 = (int)(Size - (_DWORD)Src) >> 1; + if ( v4 == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( v4 ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004DE710) -------------------------------------------------------- +int __cdecl std::wstring::_S_copy_chars(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + int v4; // ecx + + result = Size - (_DWORD)Src; + v4 = (int)(Size - (_DWORD)Src) >> 1; + if ( v4 == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( v4 ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004DE750) -------------------------------------------------------- +int __cdecl std::wstring::_S_copy_chars(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + int v4; // ecx + + result = Size - (_DWORD)Src; + v4 = (int)(Size - (_DWORD)Src) >> 1; + if ( v4 == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( v4 ) + { + return (int)memcpy(a1, Src, Size - (_DWORD)Src); + } + return result; +} + +//----- (004DE790) -------------------------------------------------------- +void __fastcall std::wstring::shrink_to_fit(_DWORD *a1) +{ + unsigned int v1; // eax + + if ( (_DWORD *)*a1 == a1 + 2 ) + v1 = 7; + else + v1 = a1[2]; + if ( a1[1] < v1 ) + std::wstring::reserve((int)a1, 0); +} + +//----- (004DE830) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::_M_replace_aux(_DWORD *this, int a2, int a3, unsigned int a4, __int16 a5) +{ + int v6; // edx + unsigned int v7; // ebx + _DWORD *v8; // ecx + unsigned int v9; // edi + unsigned int v10; // ebp + int v11; // edx + char *v12; // ebp + char *Src; // eax + char *v14; // ebp + _WORD *v15; // eax + + v6 = this[1]; + v7 = a4; + if ( a4 > a3 + 0x1FFFFFFF - v6 ) + std::__throw_length_error((std::length_error *)"basic_string::_M_replace_aux"); + v8 = (_DWORD *)*this; + v9 = v6 + a4 - a3; + if ( (_DWORD *)*this == this + 2 ) + v10 = 7; + else + v10 = this[2]; + if ( v10 < v9 ) + { + std::wstring::_M_mutate((int)this, a2, a3, 0, a4); + v8 = (_DWORD *)*this; + if ( !a4 ) + goto LABEL_12; + } + else + { + v11 = v6 - (a3 + a2); + if ( !v11 || a3 == a4 ) + { +LABEL_9: + if ( !a4 ) + goto LABEL_12; + goto LABEL_10; + } + v12 = (char *)v8 + 2 * a2; + Src = &v12[2 * a3]; + v14 = &v12[2 * a4]; + if ( v11 != 1 ) + { + memmove(v14, Src, 2 * v11); + v8 = (_DWORD *)*this; + goto LABEL_9; + } + *(_WORD *)v14 = *(_WORD *)Src; + if ( !a4 ) + goto LABEL_12; + } +LABEL_10: + v15 = (_WORD *)v8 + a2; + if ( a4 == 1 ) + { + *v15 = a5; + } + else + { + do + { + *v15++ = a5; + --v7; + } + while ( v7 ); + } +LABEL_12: + this[1] = v9; + *((_WORD *)v8 + v9) = 0; + return this; +} + +//----- (004DE960) -------------------------------------------------------- +int __fastcall std::wstring::_M_get_allocator(int a1) +{ + return a1; +} + +//----- (004DE970) -------------------------------------------------------- +int __thiscall std::wstring::_M_construct_aux_2(_DWORD *this, unsigned int a2, __int16 a3) +{ + _WORD *v4; // ecx + int result; // eax + _WORD *v6; // eax + _WORD *v7; // edx + unsigned int v8; // eax + + if ( a2 > 7 ) + { + if ( a2 > 0x1FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + v6 = operator new(2 * a2 + 2); + this[2] = a2; + *this = v6; + v4 = v6; + } + else + { + v4 = (_WORD *)*this; + if ( !a2 ) + goto LABEL_3; + if ( a2 == 1 ) + { + *v4 = a3; + goto LABEL_3; + } + } + v7 = v4; + v8 = a2; + do + { + *v7++ = a3; + --v8; + } + while ( v8 ); +LABEL_3: + result = 0; + this[1] = a2; + v4[a2] = 0; + return result; +} + +//----- (004DE9F0) -------------------------------------------------------- +unsigned int __thiscall std::wstring::at(_DWORD *this, unsigned int a2) +{ + if ( a2 >= this[1] ) + std::__throw_out_of_range_fmt("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", a2, this[1]); + return *this + 2 * a2; +} + +//----- (004DEA20) -------------------------------------------------------- +int __fastcall std::wstring::end(_DWORD *a1) +{ + return *a1 + 2 * a1[1]; +} + +//----- (004DEA30) -------------------------------------------------------- +int __fastcall std::wstring::back(_DWORD *a1) +{ + return *a1 + 2 * a1[1] - 2; +} + +//----- (004DEA40) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::rend(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2; + return result; +} + +//----- (004DEA50) -------------------------------------------------------- +_WORD *__thiscall std::wstring::swap(_DWORD *this, _DWORD *a2) +{ + _WORD *result; // eax + _WORD *v3; // edi + _DWORD *v4; // esi + _DWORD *v5; // edx + int v6; // ebp + int v7; // edx + int v8; // edi + int v9; // edx + int v10; // ebp + int v11; // edi + int v12; // [esp+0h] [ebp-28h] + int v13; // [esp+0h] [ebp-28h] + int v14; // [esp+4h] [ebp-24h] + + result = a2; + if ( this != a2 ) + { + v3 = (_WORD *)*this; + v4 = (_DWORD *)*a2; + v5 = a2 + 2; + if ( this + 2 == (_DWORD *)*this ) + { + v8 = a2[1]; + if ( v5 == v4 ) + { + if ( this[1] ) + { + if ( !v8 ) + { + a2[2] = this[2]; + a2[3] = this[3]; + a2[4] = this[4]; + a2[5] = this[5]; + a2[1] = this[1]; + result = (_WORD *)*this; + this[1] = 0; + *result = 0; + return result; + } + v10 = a2[2]; + v11 = a2[3]; + v13 = a2[4]; + v14 = a2[5]; + a2[2] = this[2]; + a2[3] = this[3]; + a2[4] = this[4]; + a2[5] = this[5]; + this[2] = v10; + this[4] = v13; + this[3] = v11; + this[5] = v14; + v8 = a2[1]; + v9 = this[1]; + } + else + { + if ( v8 ) + { + this[2] = a2[2]; + this[3] = a2[3]; + this[4] = a2[4]; + this[5] = a2[5]; + this[1] = a2[1]; + a2[1] = 0; + result = (_WORD *)*a2; + *(_WORD *)*a2 = 0; + return result; + } + v9 = 0; + } + } + else + { + v12 = a2[2]; + a2[2] = this[2]; + a2[3] = this[3]; + a2[4] = this[4]; + a2[5] = this[5]; + *this = v4; + *a2 = v5; + v9 = this[1]; + this[2] = v12; + } + } + else + { + v6 = this[2]; + if ( v5 == v4 ) + { + this[2] = a2[2]; + this[3] = a2[3]; + this[4] = a2[4]; + this[5] = a2[5]; + *a2 = v3; + *this = this + 2; + } + else + { + v7 = a2[2]; + *this = v4; + *a2 = v3; + this[2] = v7; + } + v8 = a2[1]; + v9 = this[1]; + a2[2] = v6; + } + this[1] = v8; + a2[1] = v9; + } + return result; +} + +//----- (004DEBD0) -------------------------------------------------------- +int __fastcall std::wstring::begin(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (004DEBE0) -------------------------------------------------------- +_WORD *__fastcall std::wstring::clear(int a1) +{ + _WORD *result; // eax + + result = *(_WORD **)a1; + *(_DWORD *)(a1 + 4) = 0; + *result = 0; + return result; +} + +//----- (004DEBF0) -------------------------------------------------------- +char *__thiscall std::wstring::erase(int *this, char *a2) +{ + int v3; // edx + int v4; // eax + char *v5; // ecx + int v6; // eax + char *v7; // edi + int v8; // esi + int v9; // ebp + + v3 = *this; + v4 = this[1]; + v5 = a2; + v6 = v4 - 1; + v7 = &a2[-v3]; + v8 = (int)&a2[-v3] >> 1; + v9 = v6 - v8; + if ( v6 != v8 ) + { + if ( v9 == 1 ) + { + *(_WORD *)a2 = *((_WORD *)a2 + 1); + } + else + { + memmove(a2, a2 + 2, 2 * v9); + v3 = *this; + v6 = this[1] - 1; + v5 = &v7[*this]; + } + } + this[1] = v6; + *(_WORD *)(v3 + 2 * v6) = 0; + return v5; +} + +//----- (004DEC60) -------------------------------------------------------- +_WORD *__thiscall std::wstring::erase(int *this, _WORD *a2, int a3) +{ + int v4; // esi + int v5; // edi + int v6; // ecx + + v4 = (int)a2 - *this; + v5 = *this + 2 * this[1]; + v6 = v4 >> 1; + if ( a3 == v5 ) + { + this[1] = v6; + *a2 = 0; + return a2; + } + else + { + std::wstring::_M_erase(this, v6, (a3 - (int)a2) >> 1); + return (_WORD *)(v4 + *this); + } +} + +//----- (004DECD0) -------------------------------------------------------- +int __thiscall std::wstring::erase(int *this, int a2) +{ + int v3; // ebx + + v3 = a2 - *this; + std::wstring::_M_erase(this, v3 >> 1, 1); + return v3 + *this; +} + +//----- (004DED00) -------------------------------------------------------- +_WORD *__thiscall std::wstring::erase(int *this, _WORD *a2, int a3) +{ + int v4; // esi + int v5; // edi + int v6; // ecx + + v4 = (int)a2 - *this; + v5 = *this + 2 * this[1]; + v6 = v4 >> 1; + if ( a3 == v5 ) + { + this[1] = v6; + *a2 = 0; + return a2; + } + else + { + std::wstring::_M_erase(this, v6, (a3 - (int)a2) >> 1); + return (_WORD *)(v4 + *this); + } +} + +//----- (004DED70) -------------------------------------------------------- +int *__thiscall std::wstring::erase(int *this, unsigned int a2, unsigned int a3) +{ + int *result; // eax + unsigned int v4; // edx + unsigned int v5; // edx + int v6; // edx + + result = this; + v4 = this[1]; + if ( a2 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::erase", + a2, + v4); + if ( a3 == -1 ) + { + v6 = *this; + this[1] = a2; + *(_WORD *)(v6 + 2 * a2) = 0; + } + else if ( a3 ) + { + v5 = v4 - a2; + if ( v5 > a3 ) + v5 = a3; + std::wstring::_M_erase(this, a2, v5); + return this; + } + return result; +} + +//----- (004DEDF0) -------------------------------------------------------- +int __fastcall std::wstring::front(int a1) +{ + return *(_DWORD *)a1; +} + +//----- (004DEE00) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::append(_DWORD *this, wchar_t *String) +{ + unsigned int v3; // eax + int v4; // ecx + _DWORD *v5; // edx + unsigned int v6; // edi + unsigned int v7; // ebp + _WORD *v8; // ecx + + v3 = wcslen(String); + v4 = this[1]; + if ( v3 > 0x1FFFFFFF - v4 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v5 = (_DWORD *)*this; + v6 = v4 + v3; + if ( (_DWORD *)*this == this + 2 ) + v7 = 7; + else + v7 = this[2]; + if ( v6 > v7 ) + { + std::wstring::_M_mutate((int)this, this[1], 0, String, v3); + v5 = (_DWORD *)*this; + } + else if ( v3 ) + { + v8 = (_WORD *)v5 + v4; + if ( v3 == 1 ) + { + *v8 = *String; + } + else + { + memcpy(v8, String, 2 * v3); + v5 = (_DWORD *)*this; + } + } + this[1] = v6; + *((_WORD *)v5 + v6) = 0; + return this; +} + +//----- (004DEEC0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::append(_DWORD *this, _WORD *Src, unsigned int a3) +{ + int v4; // ecx + _DWORD *v5; // edx + unsigned int v6; // esi + unsigned int v7; // edi + _WORD *v8; // ecx + + v4 = this[1]; + if ( a3 > 0x1FFFFFFF - v4 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v5 = (_DWORD *)*this; + v6 = a3 + v4; + if ( (_DWORD *)*this == this + 2 ) + v7 = 7; + else + v7 = this[2]; + if ( v6 > v7 ) + { + std::wstring::_M_mutate((int)this, v4, 0, Src, a3); + v5 = (_DWORD *)*this; + } + else if ( a3 ) + { + v8 = (_WORD *)v5 + v4; + if ( a3 == 1 ) + { + *v8 = *Src; + } + else + { + memcpy(v8, Src, 2 * a3); + v5 = (_DWORD *)*this; + } + } + this[1] = v6; + *((_WORD *)v5 + v6) = 0; + return this; +} + +//----- (004DEF80) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::append(_DWORD *this, int a2) +{ + _DWORD *v3; // edi + int v4; // ecx + int v5; // eax + _WORD *v6; // ebp + _DWORD *v7; // edx + unsigned int v8; // esi + unsigned int v9; // edi + _WORD *v10; // ecx + + v3 = this + 2; + v4 = this[1]; + v5 = *(_DWORD *)(a2 + 4); + v6 = *(_WORD **)a2; + v7 = (_DWORD *)*this; + v8 = v5 + v4; + if ( (_DWORD *)*this == v3 ) + v9 = 7; + else + v9 = this[2]; + if ( v8 > v9 ) + { + std::wstring::_M_mutate((int)this, v4, 0, v6, v5); + v7 = (_DWORD *)*this; + } + else if ( v5 ) + { + v10 = (_WORD *)v7 + v4; + if ( v5 == 1 ) + { + *v10 = *v6; + } + else + { + memcpy(v10, *(const void **)a2, 2 * v5); + v7 = (_DWORD *)*this; + } + } + this[1] = v8; + *((_WORD *)v7 + v8) = 0; + return this; +} + +//----- (004DF020) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::append(_DWORD *this, _DWORD *a2, unsigned int a3, unsigned int a4) +{ + int v5; // eax + _WORD *Src; // ebp + int v7; // ecx + _DWORD *v8; // edx + unsigned int v9; // esi + unsigned int v10; // edi + _WORD *v11; // ecx + + v5 = a4; + if ( a2[1] - a3 <= a4 ) + v5 = a2[1] - a3; + if ( a3 > a2[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::append", + a3, + a2[1]); + Src = (_WORD *)(*a2 + 2 * a3); + v7 = this[1]; + v8 = (_DWORD *)*this; + v9 = v5 + v7; + if ( (_DWORD *)*this == this + 2 ) + v10 = 7; + else + v10 = this[2]; + if ( v9 > v10 ) + { + std::wstring::_M_mutate((int)this, this[1], 0, Src, v5); + v8 = (_DWORD *)*this; + } + else if ( v5 ) + { + v11 = (_WORD *)v8 + v7; + if ( v5 == 1 ) + { + *v11 = *Src; + } + else + { + memcpy(v11, Src, 2 * v5); + v8 = (_DWORD *)*this; + } + } + this[1] = v9; + *((_WORD *)v8 + v9) = 0; + return this; +} + +//----- (004DF100) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::append(_DWORD *this, _WORD *Src, unsigned int a3) +{ + int v4; // ecx + _DWORD *v5; // edx + unsigned int v6; // esi + unsigned int v7; // ebp + _WORD *v8; // ecx + + v4 = this[1]; + if ( a3 > 0x1FFFFFFF - v4 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v5 = (_DWORD *)*this; + v6 = a3 + v4; + if ( (_DWORD *)*this == this + 2 ) + v7 = 7; + else + v7 = this[2]; + if ( v6 > v7 ) + { + std::wstring::_M_mutate((int)this, v4, 0, Src, a3); + v5 = (_DWORD *)*this; + } + else if ( a3 ) + { + v8 = (_WORD *)v5 + v4; + if ( a3 == 1 ) + { + *v8 = *Src; + } + else + { + memcpy(v8, Src, 2 * a3); + v5 = (_DWORD *)*this; + } + } + this[1] = v6; + *((_WORD *)v5 + v6) = 0; + return this; +} + +//----- (004DF1C0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::append(_DWORD *this, unsigned int a2, __int16 a3) +{ + return std::wstring::_M_replace_aux(this, this[1], 0, a2, a3); +} + +//----- (004DF1F0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::assign(_DWORD *this, _DWORD *a2) +{ + _DWORD *v3; // eax + _DWORD *v4; // edi + _DWORD *v5; // ecx + int v6; // edx + int v7; // ebp + int v9; // edi + int v10; // [esp+1Ch] [ebp-20h] + + v3 = (_DWORD *)*this; + v4 = (_DWORD *)*a2; + v5 = a2 + 2; + v6 = a2[1]; + if ( (_DWORD *)*a2 != a2 + 2 ) + { + v10 = a2[2]; + if ( v3 == this + 2 ) + { + *this = v4; + this[1] = v6; + this[2] = v10; + } + else + { + this[1] = v6; + v7 = this[2]; + *this = v4; + this[2] = v10; + if ( v3 ) + { + *a2 = v3; + a2[2] = v7; + goto LABEL_5; + } + } + *a2 = v5; + v3 = a2 + 2; + goto LABEL_5; + } + v9 = 2 * v6; + if ( v6 ) + { + if ( v6 == 1 ) + { + *(_WORD *)v3 = *((_WORD *)a2 + 4); + v9 = 2; + } + else + { + memcpy(v3, a2 + 2, 2 * v6); + v6 = a2[1]; + v3 = (_DWORD *)*this; + v5 = (_DWORD *)*a2; + v9 = 2 * v6; + } + } + this[1] = v6; + *(_WORD *)((char *)v3 + v9) = 0; + v3 = v5; +LABEL_5: + a2[1] = 0; + *(_WORD *)v3 = 0; + return this; +} + +//----- (004DF2B0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::assign(unsigned int **this, wchar_t *String) +{ + unsigned int v3; // eax + + v3 = wcslen(String); + return std::wstring::_M_replace(this, 0, (unsigned int)this[1], (char *)String, v3); +} + +//----- (004DF2F0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::assign(unsigned int **this, char *a2, int a3) +{ + return std::wstring::_M_replace(this, 0, (unsigned int)this[1], a2, a3); +} + +//----- (004DF320) -------------------------------------------------------- +void *__thiscall std::wstring::assign(void *this, int a2) +{ + std::wstring::_M_assign((int)this, a2); + return this; +} + +//----- (004DF340) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::assign(unsigned int **this, _DWORD *a2, unsigned int a3, unsigned int a4) +{ + unsigned int v4; // eax + + v4 = a2[1] - a3; + if ( v4 > a4 ) + v4 = a4; + if ( a3 > a2[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::assign", + a3, + a2[1]); + return std::wstring::_M_replace(this, 0, (unsigned int)this[1], (char *)(*a2 + 2 * a3), v4); +} + +//----- (004DF3B0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::assign(unsigned int **this, char *a2, int a3) +{ + return std::wstring::_M_replace(this, 0, (unsigned int)this[1], a2, a3); +} + +//----- (004DF3E0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::assign(_DWORD *this, unsigned int a2, __int16 a3) +{ + return std::wstring::_M_replace_aux(this, 0, this[1], a2, a3); +} + +//----- (004DF410) -------------------------------------------------------- +unsigned int __thiscall std::wstring::insert(unsigned int **this, int a2, char *a3, int a4) +{ + int v5; // esi + unsigned int v6; // ecx + + v5 = a2 - (_DWORD)*this; + v6 = (unsigned int)this[1]; + if ( v5 >> 1 > v6 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5 >> 1, + v6); + std::wstring::_M_replace(this, v5 >> 1, 0, a3, (2 * a4) >> 1); + return (unsigned int)*this + v5; +} + +//----- (004DF480) -------------------------------------------------------- +int __thiscall std::wstring::insert(_DWORD *this, int a2, unsigned int a3, __int16 a4) +{ + int v5; // ebx + + v5 = a2 - *this; + std::wstring::_M_replace_aux(this, v5 >> 1, 0, a3, a4); + return v5 + *this; +} + +//----- (004DF4D0) -------------------------------------------------------- +int __thiscall std::wstring::insert(_DWORD *this, int a2, __int16 a3) +{ + int v4; // ebx + + v4 = a2 - *this; + std::wstring::_M_replace_aux(this, v4 >> 1, 0, 1u, a3); + return v4 + *this; +} + +//----- (004DF520) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::insert(unsigned int **this, int a2, char *a3, int a4) +{ + unsigned int v4; // eax + + v4 = (a2 - (int)*this) >> 1; + if ( v4 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v4, + (size_t)this[1]); + return std::wstring::_M_replace(this, v4, 0, a3, a4); +} + +//----- (004DF580) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::insert(_DWORD *this, int a2, unsigned int a3, __int16 a4) +{ + return std::wstring::_M_replace_aux(this, (a2 - *this) >> 1, 0, a3, a4); +} + +//----- (004DF5C0) -------------------------------------------------------- +int __thiscall std::wstring::insert(_DWORD *this, int a2, __int16 a3) +{ + int v4; // ebx + + v4 = a2 - *this; + std::wstring::_M_replace_aux(this, v4 >> 1, 0, 1u, a3); + return v4 + *this; +} + +//----- (004DF610) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::insert(unsigned int **this, unsigned int a2, wchar_t *String) +{ + unsigned int v4; // eax + + v4 = wcslen(String); + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::wstring::_M_replace(this, a2, 0, (char *)String, v4); +} + +//----- (004DF680) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::insert(unsigned int **this, unsigned int a2, char *a3, int a4) +{ + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::wstring::_M_replace(this, a2, 0, a3, a4); +} + +//----- (004DF6E0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::insert(unsigned int **this, unsigned int a2, int a3) +{ + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::wstring::_M_replace(this, a2, 0, *(char **)a3, *(_DWORD *)(a3 + 4)); +} + +//----- (004DF740) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::insert( + unsigned int **this, + unsigned int a2, + _DWORD *a3, + unsigned int a4, + unsigned int a5) +{ + unsigned int v5; // eax + + v5 = a5; + if ( a3[1] - a4 <= a5 ) + v5 = a3[1] - a4; + if ( a4 > a3[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::insert", + a4, + a3[1]); + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::wstring::_M_replace(this, a2, 0, (char *)(*a3 + 2 * a4), v5); +} + +//----- (004DF7D0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::insert(_DWORD *this, unsigned int a2, unsigned int a3, __int16 a4) +{ + if ( a2 > this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::insert", + a2, + this[1]); + return std::wstring::_M_replace_aux(this, a2, 0, a3, a4); +} + +//----- (004DF830) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::insert<__gnu_cxx::__normal_iterator>( + unsigned int **this, + int a2, + char *a3, + int a4) +{ + unsigned int v4; // eax + + v4 = (a2 - (int)*this) >> 1; + if ( v4 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v4, + (size_t)this[1]); + return std::wstring::_M_replace(this, v4, 0, a3, (a4 - (int)a3) >> 1); +} + +//----- (004DF8A0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::rbegin(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + + result = this; + *this = *a2 + 2 * a2[1]; + return result; +} + +//----- (004DF8C0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::resize(int *this, unsigned int a2) +{ + unsigned int v2; // edx + _DWORD *result; // eax + int v4; // edx + + v2 = this[1]; + result = (_DWORD *)a2; + if ( a2 > v2 ) + return std::wstring::_M_replace_aux(this, v2, 0, a2 - v2, 0); + if ( a2 < v2 ) + { + v4 = *this; + this[1] = a2; + *(_WORD *)(v4 + 2 * a2) = 0; + } + return result; +} + +//----- (004DF910) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::resize(int *this, unsigned int a2, __int16 a3) +{ + unsigned int v3; // edx + _DWORD *result; // eax + int v5; // edx + + v3 = this[1]; + result = (_DWORD *)a2; + if ( v3 < a2 ) + return std::wstring::_M_replace_aux(this, v3, 0, a2 - v3, a3); + if ( v3 > a2 ) + { + v5 = *this; + this[1] = a2; + *(_WORD *)(v5 + 2 * a2) = 0; + } + return result; +} + +//----- (004DF970) -------------------------------------------------------- +int __thiscall std::wstring::_M_data(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + *this = a2; + return result; +} + +//----- (004DF980) -------------------------------------------------------- +int __cdecl std::wstring::_S_copy(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + + result = Size; + if ( Size == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( Size ) + { + return (int)memcpy(a1, Src, 2 * Size); + } + return result; +} + +//----- (004DF9C0) -------------------------------------------------------- +int __cdecl std::wstring::_S_move(_WORD *a1, unsigned __int16 *Src, size_t Size) +{ + int result; // eax + + result = Size; + if ( Size == 1 ) + { + result = *Src; + *a1 = result; + } + else if ( Size ) + { + return (int)memmove(a1, Src, 2 * Size); + } + return result; +} + +//----- (004DFA00) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, (a5 - (int)a4) >> 1); +} + +//----- (004DFA70) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, (a5 - (int)a4) >> 1); +} + +//----- (004DFAE0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, int a4) +{ + unsigned int v4; // edx + unsigned int v5; // eax + + v4 = (a2 - (int)*this) >> 1; + v5 = (a3 - a2) >> 1; + if ( v5 > (unsigned int)this[1] - v4 ) + v5 = (unsigned int)this[1] - v4; + if ( v4 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v4, + (size_t)this[1]); + return std::wstring::_M_replace(this, v4, v5, *(char **)a4, *(_DWORD *)(a4 + 4)); +} + +//----- (004DFB50) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, wchar_t *String) +{ + unsigned int v5; // ebp + unsigned int v6; // ecx + unsigned int v7; // edx + unsigned int v8; // eax + + v5 = (unsigned int)this[1]; + v6 = wcslen(String); + v7 = (a2 - (int)*this) >> 1; + v8 = (a3 - a2) >> 1; + if ( v8 > (unsigned int)this[1] - v7 ) + v8 = (unsigned int)this[1] - v7; + if ( v7 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v7, + (size_t)this[1]); + return std::wstring::_M_replace(this, v7, v8, (char *)String, v6); +} + +//----- (004DFBD0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, (a5 - (int)a4) >> 1); +} + +//----- (004DFC40) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, a5); +} + +//----- (004DFCB0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, (a5 - (int)a4) >> 1); +} + +//----- (004DFD20) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, a5); +} + +//----- (004DFD90) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::replace(_DWORD *this, int a2, int a3, unsigned int a4, __int16 a5) +{ + return std::wstring::_M_replace_aux(this, (a2 - *this) >> 1, (a3 - a2) >> 1, a4, a5); +} + +//----- (004DFDC0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, (a5 - (int)a4) >> 1); +} + +//----- (004DFE30) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, wchar_t *String) +{ + unsigned int v5; // ebp + unsigned int v6; // ecx + unsigned int v7; // edx + unsigned int v8; // eax + + v5 = (unsigned int)this[1]; + v6 = wcslen(String); + v7 = (a2 - (int)*this) >> 1; + v8 = (a3 - a2) >> 1; + if ( v8 > (unsigned int)this[1] - v7 ) + v8 = (unsigned int)this[1] - v7; + if ( v7 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v7, + (size_t)this[1]); + return std::wstring::_M_replace(this, v7, v8, (char *)String, v6); +} + +//----- (004DFEB0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, (a5 - (int)a4) >> 1); +} + +//----- (004DFF20) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, a5); +} + +//----- (004DFF90) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, int a4) +{ + unsigned int v4; // edx + unsigned int v5; // eax + + v4 = (a2 - (int)*this) >> 1; + v5 = (a3 - a2) >> 1; + if ( v5 > (unsigned int)this[1] - v4 ) + v5 = (unsigned int)this[1] - v4; + if ( v4 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v4, + (size_t)this[1]); + return std::wstring::_M_replace(this, v4, v5, *(char **)a4, *(_DWORD *)(a4 + 4)); +} + +//----- (004E0000) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, (a5 - (int)a4) >> 1); +} + +//----- (004E0070) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, int a2, int a3, char *a4, int a5) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = (a2 - (int)*this) >> 1; + v6 = (a3 - a2) >> 1; + if ( v6 > (unsigned int)this[1] - v5 ) + v6 = (unsigned int)this[1] - v5; + if ( v5 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + v5, + (size_t)this[1]); + return std::wstring::_M_replace(this, v5, v6, a4, (a5 - (int)a4) >> 1); +} + +//----- (004E00E0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::replace(_DWORD *this, int a2, int a3, unsigned int a4, __int16 a5) +{ + return std::wstring::_M_replace_aux(this, (a2 - *this) >> 1, (a3 - a2) >> 1, a4, a5); +} + +//----- (004E0110) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, unsigned int a2, unsigned int a3, wchar_t *String) +{ + unsigned int v5; // edx + unsigned int v6; // eax + + v5 = wcslen(String); + v6 = (unsigned int)this[1] - a2; + if ( v6 > a3 ) + v6 = a3; + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::wstring::_M_replace(this, a2, v6, (char *)String, v5); +} + +//----- (004E0180) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace( + unsigned int **this, + unsigned int a2, + unsigned int a3, + char *a4, + int a5) +{ + unsigned int v5; // eax + + v5 = (unsigned int)this[1] - a2; + if ( v5 > a3 ) + v5 = a3; + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::wstring::_M_replace(this, a2, v5, a4, a5); +} + +//----- (004E01E0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace(unsigned int **this, unsigned int a2, unsigned int a3, int a4) +{ + unsigned int v4; // eax + + v4 = (unsigned int)this[1] - a2; + if ( v4 > a3 ) + v4 = a3; + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::wstring::_M_replace(this, a2, v4, *(char **)a4, *(_DWORD *)(a4 + 4)); +} + +//----- (004E0250) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::replace( + unsigned int **this, + unsigned int a2, + unsigned int a3, + _DWORD *a4, + unsigned int a5, + unsigned int a6) +{ + unsigned int v6; // eax + unsigned int v7; // edx + + v6 = a6; + if ( a4[1] - a5 <= a6 ) + v6 = a4[1] - a5; + if ( a5 > a4[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a5, + a4[1]); + v7 = (unsigned int)this[1] - a2; + if ( v7 > a3 ) + v7 = a3; + if ( a2 > (unsigned int)this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + (size_t)this[1]); + return std::wstring::_M_replace(this, a2, v7, (char *)(*a4 + 2 * a5), v6); +} + +//----- (004E02F0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::replace(_DWORD *this, unsigned int a2, unsigned int a3, unsigned int a4, __int16 a5) +{ + unsigned int v5; // eax + + v5 = this[1] - a2; + if ( v5 > a3 ) + v5 = a3; + if ( a2 > this[1] ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::replace", + a2, + this[1]); + return std::wstring::_M_replace_aux(this, a2, v5, a4, a5); +} + +//----- (004E0350) -------------------------------------------------------- +void __thiscall std::wstring::reserve(int this, unsigned int a2) +{ + unsigned int v3; // ecx + unsigned int v4; // eax + _WORD *v5; // edi + _WORD *v6; // esi + unsigned int v7; // edx + unsigned int v8; // ebp + _WORD *v9; // eax + _WORD *Block; // ebp + _WORD *v11; // edi + int v12; // eax + unsigned int v13; // eax + + v3 = *(_DWORD *)(this + 4); + v4 = a2; + if ( a2 < v3 ) + { + a2 = v3; + v4 = v3; + } + v5 = *(_WORD **)this; + v6 = (_WORD *)(this + 8); + if ( this + 8 == *(_DWORD *)this ) + v7 = 7; + else + v7 = *(_DWORD *)(this + 8); + if ( v7 != v4 ) + { + v8 = 7; + if ( v7 <= 7 ) + v8 = v7; + if ( v4 <= v8 ) + { + if ( v6 != v5 ) + { + if ( v3 ) + { + if ( v3 != -1 ) + memcpy((void *)(this + 8), *(const void **)this, 2 * (v3 + 1)); + } + else + { + *(_WORD *)(this + 8) = *v5; + } + operator delete(v5); + *(_DWORD *)this = v6; + } + } + else + { + v9 = std::wstring::_M_create(&a2, v7); + Block = *(_WORD **)this; + v11 = v9; + v12 = *(_DWORD *)(this + 4); + if ( v12 ) + { + if ( v12 != -1 ) + memcpy(v11, *(const void **)this, 2 * (v12 + 1)); + } + else + { + *v11 = *Block; + } + if ( Block != v6 ) + operator delete(Block); + v13 = a2; + *(_DWORD *)this = v11; + *(_DWORD *)(this + 8) = v13; + } + } +} + +//----- (004E0460) -------------------------------------------------------- +int __thiscall std::wstring::_M_erase(int *this, int a2, int a3) +{ + int v4; // eax + int v5; // ecx + int v6; // ebp + _WORD *v7; // edi + int result; // eax + + v4 = this[1]; + v5 = *this; + v6 = v4 - (a2 + a3); + if ( v4 != a2 + a3 && a3 ) + { + v7 = (_WORD *)(v5 + 2 * a2); + if ( v6 == 1 ) + { + *v7 = *(_WORD *)(v5 + 2 * (a2 + a3)); + } + else + { + memmove(v7, (const void *)(v5 + 2 * (a2 + a3)), 2 * v6); + v5 = *this; + v4 = this[1]; + } + } + result = v4 - a3; + this[1] = result; + *(_WORD *)(v5 + 2 * result) = 0; + return result; +} + +//----- (004E04D0) -------------------------------------------------------- +int __fastcall std::wstring::pop_back(int *a1) +{ + int v1; // edx + int result; // eax + + v1 = *a1; + result = a1[1] - 1; + a1[1] = result; + *(_WORD *)(v1 + 2 * result) = 0; + return result; +} + +//----- (004E04F0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::_M_append(_DWORD *this, _WORD *Src, int a3) +{ + _DWORD *v4; // edi + int v5; // ecx + _DWORD *v6; // edx + unsigned int v7; // esi + unsigned int v8; // edi + _WORD *v9; // ecx + + v4 = this + 2; + v5 = this[1]; + v6 = (_DWORD *)*this; + v7 = v5 + a3; + if ( (_DWORD *)*this == v4 ) + v8 = 7; + else + v8 = this[2]; + if ( v7 > v8 ) + { + std::wstring::_M_mutate((int)this, v5, 0, Src, a3); + v6 = (_DWORD *)*this; + } + else if ( a3 ) + { + v9 = (_WORD *)v6 + v5; + if ( a3 == 1 ) + { + *v9 = *Src; + } + else + { + memcpy(v9, Src, 2 * a3); + v6 = (_DWORD *)*this; + } + } + this[1] = v7; + *((_WORD *)v6 + v7) = 0; + return this; +} + +//----- (004E0590) -------------------------------------------------------- +void __thiscall std::wstring::_M_assign(int this, int a2) +{ + _WORD *v2; // esi + unsigned int v3; // edi + unsigned int v5; // eax + size_t Size; // eax + _WORD *Src; // edx + int v8; // eax + int v9; // [esp+1Ch] [ebp-30h] + int v10[8]; // [esp+2Ch] [ebp-20h] BYREF + + if ( this != a2 ) + { + v2 = *(_WORD **)this; + v3 = *(_DWORD *)(a2 + 4); + if ( this + 8 == *(_DWORD *)this ) + v5 = 7; + else + v5 = *(_DWORD *)(this + 8); + if ( v5 < v3 ) + { + v9 = this + 8; + v10[0] = *(_DWORD *)(a2 + 4); + v2 = std::wstring::_M_create((unsigned int *)v10, v5); + if ( v9 != *(_DWORD *)this ) + operator delete(*(void **)this); + v8 = v10[0]; + *(_DWORD *)this = v2; + *(_DWORD *)(this + 8) = v8; + Size = 2 * v3; + if ( !v3 ) + goto LABEL_8; + } + else + { + Size = 2 * v3; + if ( !v3 ) + { +LABEL_8: + *(_DWORD *)(this + 4) = v3; + v2[v3] = 0; + return; + } + } + Src = *(_WORD **)a2; + if ( v3 == 1 ) + { + *v2 = *Src; + } + else + { + memcpy(v2, Src, Size); + v2 = *(_WORD **)this; + } + goto LABEL_8; + } +} +// 4E0590: using guessed type unsigned int var_20[8]; + +//----- (004E0650) -------------------------------------------------------- +void *__stdcall std::wstring::_M_create(unsigned int *a1, unsigned int a2) +{ + unsigned int v2; // eax + unsigned int v3; // edx + + v2 = *a1; + if ( *a1 > 0x1FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + if ( v2 > a2 ) + { + v3 = 2 * a2; + if ( v2 < 2 * a2 ) + { + if ( v3 > 0x1FFFFFFF ) + { + *a1 = 0x1FFFFFFF; + return operator new(0x40000000u); + } + *a1 = v3; + v2 = 2 * a2; + } + } + return operator new(2 * v2 + 2); +} + +//----- (004E06C0) -------------------------------------------------------- +int __thiscall std::wstring::_M_length(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[1] = a2; + return result; +} + +//----- (004E06D0) -------------------------------------------------------- +int __thiscall std::wstring::_M_mutate(int this, int a2, int a3, _WORD *a4, int a5) +{ + _WORD *v5; // ebp + unsigned int v7; // eax + _WORD *v8; // eax + _WORD *Block; // edx + _WORD *v10; // edi + _WORD *v11; // ecx + int result; // eax + _WORD *Src; // [esp+4h] [ebp-48h] + int v14; // [esp+14h] [ebp-38h] + int v15; // [esp+18h] [ebp-34h] + _WORD *v16; // [esp+18h] [ebp-34h] + _WORD *v17; // [esp+1Ch] [ebp-30h] + _WORD *v18; // [esp+1Ch] [ebp-30h] + int v19[8]; // [esp+2Ch] [ebp-20h] BYREF + + v5 = (_WORD *)(this + 8); + v15 = a2 + a3; + v14 = *(_DWORD *)(this + 4) - (a2 + a3); + v19[0] = *(_DWORD *)(this + 4) + a5 - a3; + if ( this + 8 == *(_DWORD *)this ) + v7 = 7; + else + v7 = *(_DWORD *)(this + 8); + v8 = std::wstring::_M_create((unsigned int *)v19, v7); + Block = *(_WORD **)this; + v10 = v8; + if ( a2 ) + { + if ( a2 == 1 ) + { + *v8 = *Block; + } + else + { + v17 = *(_WORD **)this; + memcpy(v8, *(const void **)this, 2 * a2); + Block = v17; + } + } + if ( a4 && a5 ) + { + if ( a5 == 1 ) + { + v10[a2] = *a4; + } + else + { + v18 = Block; + memcpy(&v10[a2], a4, 2 * a5); + Block = v18; + } + } + if ( v14 ) + { + v11 = &v10[a5 + a2]; + if ( v14 == 1 ) + { + *v11 = Block[v15]; + } + else + { + Src = &Block[v15]; + v16 = Block; + memcpy(v11, Src, 2 * v14); + Block = v16; + } + } + if ( v5 != Block ) + operator delete(Block); + result = v19[0]; + *(_DWORD *)this = v10; + *(_DWORD *)(this + 8) = result; + return result; +} +// 4E06D0: using guessed type unsigned int var_20[8]; + +//----- (004E0830) -------------------------------------------------------- +int __cdecl std::wstring::_S_assign(_WORD *a1, int a2, __int16 a3) +{ + int result; // eax + _WORD *v4; // edx + + result = a2; + v4 = a1; + if ( a2 == 1 ) + { + *a1 = a3; + } + else if ( a2 ) + { + do + { + *v4++ = a3; + --result; + } + while ( result ); + } + return result; +} + +//----- (004E0870) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::push_back(_DWORD *this, __int16 a2) +{ + int v3; // esi + _DWORD *result; // eax + unsigned int v5; // edi + unsigned int v6; // edx + + v3 = this[1]; + result = (_DWORD *)*this; + v5 = v3 + 1; + if ( (_DWORD *)*this == this + 2 ) + v6 = 7; + else + v6 = this[2]; + if ( v5 > v6 ) + { + std::wstring::_M_mutate((int)this, v3, 0, 0, 1); + result = (_DWORD *)*this; + } + *((_WORD *)result + v3) = a2; + this[1] = v5; + *((_WORD *)result + v3 + 1) = 0; + return result; +} + +//----- (004E08F0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + int v3; // ebx + + result = a2; + *this = this + 2; + if ( result + 2 == (_DWORD *)*result ) + { + this[2] = a2[2]; + this[3] = a2[3]; + this[4] = a2[4]; + this[5] = a2[5]; + } + else + { + *this = *a2; + this[2] = a2[2]; + } + v3 = a2[1]; + *a2 = a2 + 2; + a2[1] = 0; + *((_WORD *)a2 + 4) = 0; + this[1] = v3; + return result; +} + +//----- (004E0950) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int a2, int a3) +{ + _WORD *result; // eax + int v4; // ebx + int v5; // ebx + int v6; // edx + + result = (_WORD *)a2; + *this = this + 2; + if ( result + 4 == *(_WORD **)result ) + { + this[2] = *(_DWORD *)(a2 + 8); + this[3] = *(_DWORD *)(a2 + 12); + this[4] = *(_DWORD *)(a2 + 16); + this[5] = *(_DWORD *)(a2 + 20); + v6 = *(_DWORD *)(a2 + 4); + *(_DWORD *)(a2 + 4) = 0; + result = *(_WORD **)a2; + this[1] = v6; + *result = 0; + } + else + { + *this = *(_DWORD *)a2; + v4 = *(_DWORD *)(a2 + 4); + *(_DWORD *)a2 = a2 + 8; + this[1] = v4; + v5 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a2 + 4) = 0; + this[2] = v5; + *(_WORD *)(a2 + 8) = 0; + } + return result; +} + +//----- (004E09D0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, wchar_t *String, int a3) +{ + int v3; // eax + size_t v4; // eax + int v6; // [esp+8h] [ebp-24h] + _DWORD *v7; // [esp+1Ch] [ebp-10h] + + *this = this + 2; + v3 = -2; + if ( String ) + { + v7 = this; + v4 = wcslen(String); + this = v7; + v3 = (int)&String[v4]; + } + LOBYTE(v6) = 0; + return std::wstring::_M_construct(this, String, v3, v6); +} +// 4E0A05: variable 'v6' is possibly undefined + +//----- (004E0A20) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + LOBYTE(a4) = 0; + *this = this + 2; + return std::wstring::_M_construct(this, a2, (int)&a2[a3], a4); +} + +//----- (004E0A40) -------------------------------------------------------- +int __thiscall std::wstring::basic_string(_DWORD *this, int a2) +{ + int result; // eax + + this[1] = 0; + *this = this + 2; + result = 0; + *((_WORD *)this + 4) = 0; + return result; +} + +//----- (004E0A60) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int a2) +{ + int v3; // [esp+8h] [ebp-14h] + + *this = this + 2; + LOBYTE(v3) = 0; + return std::wstring::_M_construct(this, *(_WORD **)a2, *(_DWORD *)a2 + 2 * *(_DWORD *)(a2 + 4), v3); +} +// 4E0A80: variable 'v3' is possibly undefined + +//----- (004E0A90) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int a2, int a3) +{ + _WORD *result; // eax + _WORD *Src; // ebp + int v6; // edx + size_t Size; // edi + int v8; // esi + int v9; // [esp+1Ch] [ebp-20h] + int v10; // [esp+1Ch] [ebp-20h] + + result = this + 2; + *this = this + 2; + Src = *(_WORD **)a2; + v6 = *(_DWORD *)(a2 + 4); + Size = 2 * v6; + v8 = (2 * v6) >> 1; + if ( (unsigned int)(2 * v6) > 0xE ) + { + if ( Size > 0x3FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + if ( (unsigned int)(v8 + 1) > 0x3FFFFFFF ) + std::__throw_bad_alloc(); + v10 = *(_DWORD *)(a2 + 4); + result = operator new(Size + 2); + this[2] = v8; + v6 = v10; + *this = result; + } + if ( v8 == 1 ) + { + *result = *Src; + } + else if ( v8 ) + { + v9 = v6; + memcpy(result, Src, Size); + result = (_WORD *)*this; + v6 = v9; + } + this[1] = v8; + result[v6] = 0; + return result; +} + +//----- (004E0B40) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // eax + + *this = this + 2; + v4 = a2[1]; + if ( a3 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + a2[1]); + LOBYTE(a4) = 0; + return std::wstring::_M_construct(this, (_WORD *)(*a2 + 2 * a3), *a2 + 2 * a3 + 2 * (v4 - a3), a4); +} + +//----- (004E0BA0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // esi + unsigned int v5; // eax + unsigned int v6; // eax + + *this = this + 2; + v4 = a4; + v5 = a2[1]; + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + a2[1]); + v6 = v5 - a3; + LOBYTE(a4) = 0; + if ( v6 > v4 ) + v6 = v4; + return std::wstring::_M_construct(this, (_WORD *)(*a2 + 2 * a3), *a2 + 2 * a3 + 2 * v6, a4); +} + +//----- (004E0C10) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, unsigned int a4, int a5) +{ + unsigned int v5; // eax + unsigned int v6; // eax + int v8; // [esp+8h] [ebp-14h] + + *this = this + 2; + v5 = a2[1]; + if ( a3 > v5 ) + std::__throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)", "string::string", a3, a2[1]); + v6 = v5 - a3; + LOBYTE(v8) = 0; + if ( v6 > a4 ) + v6 = a4; + return std::wstring::_M_construct(this, (_WORD *)(*a2 + 2 * a3), *a2 + 2 * a3 + 2 * v6, v8); +} +// 4E0C49: variable 'v8' is possibly undefined + +//----- (004E0C80) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + LOBYTE(a4) = 0; + *this = this + 2; + return std::wstring::_M_construct(this, a2, (int)&a2[a3], a4); +} + +//----- (004E0CA0) -------------------------------------------------------- +int __thiscall std::wstring::basic_string(_DWORD *this, unsigned int a2, __int16 a3, int a4) +{ + _DWORD *v5; // ecx + int result; // eax + _DWORD *v7; // eax + _WORD *v8; // edx + unsigned int v9; // eax + + v5 = this + 2; + *this = v5; + if ( a2 > 7 ) + { + if ( a2 > 0x1FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + v7 = operator new(2 * a2 + 2); + this[2] = a2; + *this = v7; + v5 = v7; + } + else + { + if ( !a2 ) + goto LABEL_3; + if ( a2 == 1 ) + { + *((_WORD *)this + 4) = a3; + goto LABEL_3; + } + } + v8 = v5; + v9 = a2; + do + { + *v8++ = a3; + --v9; + } + while ( v9 ); +LABEL_3: + result = 0; + this[1] = a2; + *((_WORD *)v5 + a2) = 0; + return result; +} + +//----- (004E0D30) -------------------------------------------------------- +int __fastcall std::wstring::basic_string(int a1) +{ + int result; // eax + + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + result = 0; + *(_WORD *)(a1 + 8) = 0; + return result; +} + +//----- (004E0D50) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string<__gnu_cxx::__normal_iterator,void>( + _DWORD *this, + _WORD *Src, + int a3, + int a4) +{ + _WORD *result; // eax + size_t Size; // ebx + int v7; // edi + + result = this + 2; + *this = this + 2; + Size = a3 - (_DWORD)Src; + v7 = (a3 - (int)Src) >> 1; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xE ) + { + if ( Size > 0x3FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + if ( (unsigned int)(v7 + 1) > 0x3FFFFFFF ) + std::__throw_bad_alloc(); + result = operator new(Size + 2); + this[2] = v7; + *this = result; + } + if ( v7 == 1 ) + { + *result = *Src; + } + else if ( v7 ) + { + memcpy(result, Src, Size); + result = (_WORD *)*this; + } + this[1] = v7; + *(_WORD *)((char *)result + Size) = 0; + return result; +} + +//----- (004E0DF0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + LOBYTE(a4) = 0; + *this = this + 2; + return std::wstring::_M_construct(this, a2, a3, a4); +} + +//----- (004E0E00) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + LOBYTE(a4) = 0; + *this = this + 2; + return std::wstring::_M_construct(this, a2, a3, a4); +} + +//----- (004E0E10) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2) +{ + _DWORD *result; // eax + int v3; // ebx + + result = a2; + *this = this + 2; + if ( result + 2 == (_DWORD *)*result ) + { + this[2] = a2[2]; + this[3] = a2[3]; + this[4] = a2[4]; + this[5] = a2[5]; + } + else + { + *this = *a2; + this[2] = a2[2]; + } + v3 = a2[1]; + *a2 = a2 + 2; + a2[1] = 0; + *((_WORD *)a2 + 4) = 0; + this[1] = v3; + return result; +} + +//----- (004E0E70) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int a2, int a3) +{ + _WORD *result; // eax + int v4; // ebx + int v5; // ebx + int v6; // edx + + result = (_WORD *)a2; + *this = this + 2; + if ( result + 4 == *(_WORD **)result ) + { + this[2] = *(_DWORD *)(a2 + 8); + this[3] = *(_DWORD *)(a2 + 12); + this[4] = *(_DWORD *)(a2 + 16); + this[5] = *(_DWORD *)(a2 + 20); + v6 = *(_DWORD *)(a2 + 4); + *(_DWORD *)(a2 + 4) = 0; + result = *(_WORD **)a2; + this[1] = v6; + *result = 0; + } + else + { + *this = *(_DWORD *)a2; + v4 = *(_DWORD *)(a2 + 4); + *(_DWORD *)a2 = a2 + 8; + this[1] = v4; + v5 = *(_DWORD *)(a2 + 8); + *(_DWORD *)(a2 + 4) = 0; + this[2] = v5; + *(_WORD *)(a2 + 8) = 0; + } + return result; +} + +//----- (004E0EF0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, wchar_t *String, int a3) +{ + int v3; // eax + size_t v4; // eax + int v6; // [esp+8h] [ebp-24h] + _DWORD *v7; // [esp+1Ch] [ebp-10h] + + *this = this + 2; + v3 = -2; + if ( String ) + { + v7 = this; + v4 = wcslen(String); + this = v7; + v3 = (int)&String[v4]; + } + LOBYTE(v6) = 0; + return std::wstring::_M_construct(this, String, v3, v6); +} +// 4E0F25: variable 'v6' is possibly undefined + +//----- (004E0F40) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + LOBYTE(a4) = 0; + *this = this + 2; + return std::wstring::_M_construct(this, a2, (int)&a2[a3], a4); +} + +//----- (004E0F60) -------------------------------------------------------- +int __thiscall std::wstring::basic_string(_DWORD *this, int a2) +{ + int result; // eax + + this[1] = 0; + *this = this + 2; + result = 0; + *((_WORD *)this + 4) = 0; + return result; +} + +//----- (004E0F80) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int a2) +{ + int v3; // [esp+8h] [ebp-14h] + + *this = this + 2; + LOBYTE(v3) = 0; + return std::wstring::_M_construct(this, *(_WORD **)a2, *(_DWORD *)a2 + 2 * *(_DWORD *)(a2 + 4), v3); +} +// 4E0FA0: variable 'v3' is possibly undefined + +//----- (004E0FB0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, int a2, int a3) +{ + _WORD *result; // eax + _WORD *Src; // ebp + int v6; // edx + size_t Size; // edi + int v8; // esi + int v9; // [esp+1Ch] [ebp-20h] + int v10; // [esp+1Ch] [ebp-20h] + + result = this + 2; + *this = this + 2; + Src = *(_WORD **)a2; + v6 = *(_DWORD *)(a2 + 4); + Size = 2 * v6; + v8 = (2 * v6) >> 1; + if ( (unsigned int)(2 * v6) > 0xE ) + { + if ( Size > 0x3FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + if ( (unsigned int)(v8 + 1) > 0x3FFFFFFF ) + std::__throw_bad_alloc(); + v10 = *(_DWORD *)(a2 + 4); + result = operator new(Size + 2); + this[2] = v8; + v6 = v10; + *this = result; + } + if ( v8 == 1 ) + { + *result = *Src; + } + else if ( v8 ) + { + v9 = v6; + memcpy(result, Src, Size); + result = (_WORD *)*this; + v6 = v9; + } + this[1] = v8; + result[v6] = 0; + return result; +} + +//----- (004E1060) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // eax + + *this = this + 2; + v4 = a2[1]; + if ( a3 > v4 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + a2[1]); + LOBYTE(a4) = 0; + return std::wstring::_M_construct(this, (_WORD *)(*a2 + 2 * a3), *a2 + 2 * a3 + 2 * (v4 - a3), a4); +} + +//----- (004E10C0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, int a4) +{ + unsigned int v4; // esi + unsigned int v5; // eax + unsigned int v6; // eax + + *this = this + 2; + v4 = a4; + v5 = a2[1]; + if ( a3 > v5 ) + std::__throw_out_of_range_fmt( + "%s: __pos (which is %zu) > this->size() (which is %zu)", + "basic_string::basic_string", + a3, + a2[1]); + v6 = v5 - a3; + LOBYTE(a4) = 0; + if ( v6 > v4 ) + v6 = v4; + return std::wstring::_M_construct(this, (_WORD *)(*a2 + 2 * a3), *a2 + 2 * a3 + 2 * v6, a4); +} + +//----- (004E1130) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _DWORD *a2, unsigned int a3, unsigned int a4, int a5) +{ + unsigned int v5; // eax + unsigned int v6; // eax + int v8; // [esp+8h] [ebp-14h] + + *this = this + 2; + v5 = a2[1]; + if ( a3 > v5 ) + std::__throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)", "string::string", a3, a2[1]); + v6 = v5 - a3; + LOBYTE(v8) = 0; + if ( v6 > a4 ) + v6 = a4; + return std::wstring::_M_construct(this, (_WORD *)(*a2 + 2 * a3), *a2 + 2 * a3 + 2 * v6, v8); +} +// 4E1169: variable 'v8' is possibly undefined + +//----- (004E11A0) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + LOBYTE(a4) = 0; + *this = this + 2; + return std::wstring::_M_construct(this, a2, (int)&a2[a3], a4); +} + +//----- (004E11C0) -------------------------------------------------------- +int __thiscall std::wstring::basic_string(_DWORD *this, unsigned int a2, __int16 a3, int a4) +{ + _DWORD *v5; // ecx + int result; // eax + _DWORD *v7; // eax + _WORD *v8; // edx + unsigned int v9; // eax + + v5 = this + 2; + *this = v5; + if ( a2 > 7 ) + { + if ( a2 > 0x1FFFFFFF ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + v7 = operator new(2 * a2 + 2); + this[2] = a2; + *this = v7; + v5 = v7; + } + else + { + if ( !a2 ) + goto LABEL_3; + if ( a2 == 1 ) + { + *((_WORD *)this + 4) = a3; + goto LABEL_3; + } + } + v8 = v5; + v9 = a2; + do + { + *v8++ = a3; + --v9; + } + while ( v9 ); +LABEL_3: + result = 0; + this[1] = a2; + *((_WORD *)v5 + a2) = 0; + return result; +} + +//----- (004E1250) -------------------------------------------------------- +int __fastcall std::wstring::basic_string(int a1) +{ + int result; // eax + + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + result = 0; + *(_WORD *)(a1 + 8) = 0; + return result; +} + +//----- (004E1270) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string<__gnu_cxx::__normal_iterator,void>( + _DWORD *this, + _WORD *Src, + int a3, + int a4) +{ + _WORD *result; // eax + size_t Size; // ebx + int v7; // edi + + result = this + 2; + *this = this + 2; + Size = a3 - (_DWORD)Src; + v7 = (a3 - (int)Src) >> 1; + if ( (unsigned int)(a3 - (_DWORD)Src) > 0xE ) + { + if ( Size > 0x3FFFFFFE ) + std::__throw_length_error((std::length_error *)"basic_string::_M_create"); + if ( (unsigned int)(v7 + 1) > 0x3FFFFFFF ) + std::__throw_bad_alloc(); + result = operator new(Size + 2); + this[2] = v7; + *this = result; + } + if ( v7 == 1 ) + { + *result = *Src; + } + else if ( v7 ) + { + memcpy(result, Src, Size); + result = (_WORD *)*this; + } + this[1] = v7; + *(_WORD *)((char *)result + Size) = 0; + return result; +} + +//----- (004E1310) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + LOBYTE(a4) = 0; + *this = this + 2; + return std::wstring::_M_construct(this, a2, a3, a4); +} + +//----- (004E1320) -------------------------------------------------------- +_WORD *__thiscall std::wstring::basic_string(_DWORD *this, _WORD *a2, int a3, int a4) +{ + LOBYTE(a4) = 0; + *this = this + 2; + return std::wstring::_M_construct(this, a2, a3, a4); +} + +//----- (004E1330) -------------------------------------------------------- +void __fastcall std::wstring::~wstring(void **a1) +{ + if ( *a1 != a1 + 2 ) + operator delete(*a1); +} + +//----- (004E1360) -------------------------------------------------------- +void __fastcall std::wstring::~wstring(void **a1) +{ + if ( *a1 != a1 + 2 ) + operator delete(*a1); +} + +//----- (004E1390) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::operator=(_DWORD *this, int a2) +{ + _DWORD *v3; // eax + _WORD *Src; // edx + int v5; // ecx + int v6; // ebp + int v8; // edi + int v9; // [esp+1Ch] [ebp-20h] + + v3 = (_DWORD *)*this; + Src = *(_WORD **)a2; + v5 = *(_DWORD *)(a2 + 4); + if ( a2 + 8 != *(_DWORD *)a2 ) + { + v9 = *(_DWORD *)(a2 + 8); + if ( v3 == this + 2 ) + { + *this = Src; + this[1] = v5; + this[2] = v9; + } + else + { + *this = Src; + v6 = this[2]; + this[1] = v5; + this[2] = v9; + if ( v3 ) + { + *(_DWORD *)a2 = v3; + *(_DWORD *)(a2 + 8) = v6; + goto LABEL_5; + } + } + *(_DWORD *)a2 = a2 + 8; + v3 = (_DWORD *)(a2 + 8); + goto LABEL_5; + } + v8 = 2 * v5; + if ( v5 ) + { + if ( v5 == 1 ) + { + *(_WORD *)v3 = *Src; + v8 = 2; + } + else + { + memcpy(v3, Src, 2 * v5); + v5 = *(_DWORD *)(a2 + 4); + v3 = (_DWORD *)*this; + Src = *(_WORD **)a2; + v8 = 2 * v5; + } + } + this[1] = v5; + *(_WORD *)((char *)v3 + v8) = 0; + v3 = Src; +LABEL_5: + *(_DWORD *)(a2 + 4) = 0; + *(_WORD *)v3 = 0; + return this; +} + +//----- (004E1450) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::operator=(unsigned int **this, wchar_t *String) +{ + unsigned int v3; // eax + + v3 = wcslen(String); + return std::wstring::_M_replace(this, 0, (unsigned int)this[1], (char *)String, v3); +} + +//----- (004E1490) -------------------------------------------------------- +void *__thiscall std::wstring::operator=(void *this, int a2) +{ + std::wstring::_M_assign((int)this, a2); + return this; +} + +//----- (004E14B0) -------------------------------------------------------- +unsigned int **__thiscall std::wstring::operator=(unsigned int **this, char *a2, int a3) +{ + std::wstring::_M_replace(this, 0, (unsigned int)this[1], a2, a3); + return this; +} + +//----- (004E14F0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::operator=(_DWORD *this, __int16 a2) +{ + std::wstring::_M_replace_aux(this, 0, this[1], 1u, a2); + return this; +} + +//----- (004E1530) -------------------------------------------------------- +int __thiscall std::wstring::operator[](_DWORD *this, int a2) +{ + return *this + 2 * a2; +} + +//----- (004E1540) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::operator+=(_DWORD *this, wchar_t *String) +{ + unsigned int v3; // eax + int v4; // ecx + _DWORD *v5; // edx + unsigned int v6; // edi + unsigned int v7; // ebp + _WORD *v8; // ecx + + v3 = wcslen(String); + v4 = this[1]; + if ( v3 > 0x1FFFFFFF - v4 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v5 = (_DWORD *)*this; + v6 = v3 + v4; + if ( (_DWORD *)*this == this + 2 ) + v7 = 7; + else + v7 = this[2]; + if ( v6 > v7 ) + { + std::wstring::_M_mutate((int)this, this[1], 0, String, v3); + v5 = (_DWORD *)*this; + } + else if ( v3 ) + { + v8 = (_WORD *)v5 + v4; + if ( v3 == 1 ) + { + *v8 = *String; + } + else + { + memcpy(v8, String, 2 * v3); + v5 = (_DWORD *)*this; + } + } + this[1] = v6; + *((_WORD *)v5 + v6) = 0; + return this; +} + +//----- (004E1600) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::operator+=(_DWORD *this, int a2) +{ + _DWORD *v3; // edi + int v4; // ecx + int v5; // eax + _WORD *v6; // ebp + _DWORD *v7; // edx + unsigned int v8; // esi + unsigned int v9; // edi + _WORD *v10; // ecx + + v3 = this + 2; + v4 = this[1]; + v5 = *(_DWORD *)(a2 + 4); + v6 = *(_WORD **)a2; + v7 = (_DWORD *)*this; + v8 = v5 + v4; + if ( (_DWORD *)*this == v3 ) + v9 = 7; + else + v9 = this[2]; + if ( v8 > v9 ) + { + std::wstring::_M_mutate((int)this, v4, 0, v6, v5); + v7 = (_DWORD *)*this; + } + else if ( v5 ) + { + v10 = (_WORD *)v7 + v4; + if ( v5 == 1 ) + { + *v10 = *v6; + } + else + { + memcpy(v10, *(const void **)a2, 2 * v5); + v7 = (_DWORD *)*this; + } + } + this[1] = v8; + *((_WORD *)v7 + v8) = 0; + return this; +} + +//----- (004E16A0) -------------------------------------------------------- +_DWORD *__thiscall std::wstring::operator+=(_DWORD *this, _WORD *Src, unsigned int a3) +{ + int v4; // ecx + _DWORD *v5; // edx + unsigned int v6; // esi + unsigned int v7; // ebp + _WORD *v8; // ecx + + v4 = this[1]; + if ( a3 > 0x1FFFFFFF - v4 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + v5 = (_DWORD *)*this; + v6 = a3 + v4; + if ( (_DWORD *)*this == this + 2 ) + v7 = 7; + else + v7 = this[2]; + if ( v6 > v7 ) + { + std::wstring::_M_mutate((int)this, v4, 0, Src, a3); + v5 = (_DWORD *)*this; + } + else if ( a3 ) + { + v8 = (_WORD *)v5 + v4; + if ( a3 == 1 ) + { + *v8 = *Src; + } + else + { + memcpy(v8, Src, 2 * a3); + v5 = (_DWORD *)*this; + } + } + this[1] = v6; + *((_WORD *)v5 + v6) = 0; + return this; +} + +//----- (004E1760) -------------------------------------------------------- +char *__thiscall std::wstring::operator+=(char *this, __int16 a2) +{ + char *result; // eax + char *v3; // ecx + int v4; // ebx + char *v5; // edx + unsigned int v6; // esi + unsigned int v7; // ecx + char *v8; // [esp+1Ch] [ebp-10h] + + result = this; + v3 = this + 8; + v4 = *((_DWORD *)v3 - 1); + v5 = (char *)*((_DWORD *)v3 - 2); + v6 = v4 + 1; + if ( v5 == v3 ) + v7 = 7; + else + v7 = *((_DWORD *)result + 2); + if ( v6 > v7 ) + { + v8 = result; + std::wstring::_M_mutate((int)result, v4, 0, 0, 1); + result = v8; + v5 = *(char **)v8; + } + *(_WORD *)&v5[2 * v4] = a2; + *((_DWORD *)result + 1) = v6; + *(_WORD *)&v5[2 * v4 + 2] = 0; + return result; +} + +//----- (004E17E0) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A618; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A2A0; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51A2A0: using guessed type int (*off_51A2A0)(); +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004E1920) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + this[1] = a3 != 0; + *this = &off_51A618; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A2A0; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51A2A0: using guessed type int (*off_51A2A0)(); +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004E1A70) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A618; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A2A0; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51A2A0: using guessed type int (*off_51A2A0)(); +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004E1BB0) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + this[1] = a3 != 0; + *this = &off_51A618; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A2A0; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51A2A0: using guessed type int (*off_51A2A0)(); +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004E1D00) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51A618; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4E1D3E: variable 'lpfctx' is possibly undefined +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004E1D60) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A618; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4E1D9E: variable 'lpfctx' is possibly undefined +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004E1DC0) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A618; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4E1DFE: variable 'lpfctx' is possibly undefined +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004E1E20) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A634; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A2BC; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51A2BC: using guessed type int (*off_51A2BC)(); +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004E1F60) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + this[1] = a3 != 0; + *this = &off_51A634; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A2BC; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51A2BC: using guessed type int (*off_51A2BC)(); +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004E20B0) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A634; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A2BC; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51A2BC: using guessed type int (*off_51A2BC)(); +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004E21F0) -------------------------------------------------------- +void __thiscall std::collate_byname::collate_byname(_DWORD *this, int ***a2, int a3) +{ + int **v4; // [esp+14h] [ebp-48h] + + v4 = *a2; + this[1] = a3 != 0; + *this = &off_51A634; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A2BC; + if ( *(_BYTE *)v4 != 67 || *((_BYTE *)v4 + 1) ) + { + if ( strcmp((const char *)v4, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), v4); + } + } +} +// 51A2BC: using guessed type int (*off_51A2BC)(); +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004E2340) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51A634; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4E237E: variable 'lpfctx' is possibly undefined +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004E23A0) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A634; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4E23DE: variable 'lpfctx' is possibly undefined +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004E2400) -------------------------------------------------------- +void __fastcall std::collate_byname::~collate_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A634; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4E243E: variable 'lpfctx' is possibly undefined +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004E2460) -------------------------------------------------------- +unsigned int __thiscall std::stringbuf::__xfer_bufptrs::__xfer_bufptrs(_DWORD *this, _DWORD *a2, int a3) +{ + int v3; // ebx + unsigned int result; // eax + int v5; // esi + unsigned int v6; // edi + int v7; // ebp + int v8; // esi + + this[2] = -1; + this[3] = -1; + v3 = a2[9]; + *this = a3; + result = a2[1]; + this[4] = -1; + v5 = a2[4]; + this[5] = -1; + this[6] = -1; + this[7] = -1; + this[8] = -1; + this[9] = -1; + this[10] = -1; + this[11] = -1; + this[12] = -1; + this[13] = -1; + if ( !result ) + { + if ( !v5 ) + return result; + goto LABEL_3; + } + *((_QWORD *)this + 1) = (int)(result - v3); + *((_QWORD *)this + 2) = a2[2] - v3; + result = a2[3]; + *((_QWORD *)this + 3) = (int)(result - v3); + if ( v5 ) + { +LABEL_3: + *((_QWORD *)this + 4) = v5 - v3; + v6 = a2[5]; + v7 = v6 - v5; + v8 = a2[6]; + *((_QWORD *)this + 5) = v7; + *((_QWORD *)this + 6) = v8 - v3; + if ( result < v6 ) + result = v6; + } + if ( result ) + { + result -= v3; + a2[10] = result; + } + return result; +} + +//----- (004E2550) -------------------------------------------------------- +unsigned int __thiscall std::stringbuf::__xfer_bufptrs::__xfer_bufptrs(_DWORD *this, _DWORD *a2, int a3) +{ + int v3; // ebx + unsigned int result; // eax + int v5; // esi + unsigned int v6; // edi + int v7; // ebp + int v8; // esi + + this[2] = -1; + this[3] = -1; + v3 = a2[9]; + *this = a3; + result = a2[1]; + this[4] = -1; + v5 = a2[4]; + this[5] = -1; + this[6] = -1; + this[7] = -1; + this[8] = -1; + this[9] = -1; + this[10] = -1; + this[11] = -1; + this[12] = -1; + this[13] = -1; + if ( !result ) + { + if ( !v5 ) + return result; + goto LABEL_3; + } + *((_QWORD *)this + 1) = (int)(result - v3); + *((_QWORD *)this + 2) = a2[2] - v3; + result = a2[3]; + *((_QWORD *)this + 3) = (int)(result - v3); + if ( v5 ) + { +LABEL_3: + *((_QWORD *)this + 4) = v5 - v3; + v6 = a2[5]; + v7 = v6 - v5; + v8 = a2[6]; + *((_QWORD *)this + 5) = v7; + *((_QWORD *)this + 6) = v8 - v3; + if ( result < v6 ) + result = v6; + } + if ( result ) + { + result -= v3; + a2[10] = result; + } + return result; +} + +//----- (004E2640) -------------------------------------------------------- +int __fastcall std::stringbuf::__xfer_bufptrs::~__xfer_bufptrs(int a1) +{ + int v1; // eax + _DWORD *v2; // esi + int v3; // ebx + int v4; // edx + int v5; // edi + int v6; // edi + int result; // eax + __int64 v8; // rax + int v9; // ebp + int v10; // ebx + int v11; // ecx + + v1 = *(_DWORD *)(a1 + 8); + v2 = *(_DWORD **)a1; + v3 = *(_DWORD *)(*(_DWORD *)a1 + 36); + if ( (v1 & *(_DWORD *)(a1 + 12)) != -1 ) + { + v4 = *(_DWORD *)(a1 + 24); + v5 = *(_DWORD *)(a1 + 16); + v2[1] = v3 + v1; + v2[2] = v3 + v5; + v2[3] = v3 + v4; + } + v6 = *(_DWORD *)(a1 + 32); + result = v6 & *(_DWORD *)(a1 + 36); + if ( result != -1 ) + { + v8 = *(_QWORD *)(a1 + 40); + v9 = v3 + *(_DWORD *)(a1 + 48); + v10 = v6 + v3; + v2[4] = v10; + v2[6] = v9; + if ( v8 > 0x7FFFFFFF ) + { + v11 = v10 + 0x7FFFFFFF; + do + { + v10 = v11; + v8 -= 0x7FFFFFFFLL; + v11 += 0x7FFFFFFF; + } + while ( v8 > 0x7FFFFFFF ); + } + result = v10 + v8; + v2[5] = result; + } + return result; +} + +//----- (004E26D0) -------------------------------------------------------- +int __fastcall std::stringbuf::__xfer_bufptrs::~__xfer_bufptrs(int a1) +{ + int v1; // eax + _DWORD *v2; // esi + int v3; // ebx + int v4; // edx + int v5; // edi + int v6; // edi + int result; // eax + __int64 v8; // rax + int v9; // ebp + int v10; // ebx + int v11; // ecx + + v1 = *(_DWORD *)(a1 + 8); + v2 = *(_DWORD **)a1; + v3 = *(_DWORD *)(*(_DWORD *)a1 + 36); + if ( (v1 & *(_DWORD *)(a1 + 12)) != -1 ) + { + v4 = *(_DWORD *)(a1 + 24); + v5 = *(_DWORD *)(a1 + 16); + v2[1] = v3 + v1; + v2[2] = v3 + v5; + v2[3] = v3 + v4; + } + v6 = *(_DWORD *)(a1 + 32); + result = v6 & *(_DWORD *)(a1 + 36); + if ( result != -1 ) + { + v8 = *(_QWORD *)(a1 + 40); + v9 = v3 + *(_DWORD *)(a1 + 48); + v10 = v6 + v3; + v2[4] = v10; + v2[6] = v9; + if ( v8 > 0x7FFFFFFF ) + { + v11 = v10 + 0x7FFFFFFF; + do + { + v10 = v11; + v8 -= 0x7FFFFFFFLL; + v11 += 0x7FFFFFFF; + } + while ( v8 > 0x7FFFFFFF ); + } + result = v10 + v8; + v2[5] = result; + } + return result; +} + +//----- (004E2760) -------------------------------------------------------- +unsigned int __fastcall std::stringbuf::_M_update_egptr(int a1) +{ + unsigned int result; // eax + + result = *(_DWORD *)(a1 + 20); + if ( result && *(_DWORD *)(a1 + 12) < result ) + { + if ( (*(_BYTE *)(a1 + 32) & 8) == 0 ) + { + *(_DWORD *)(a1 + 4) = result; + *(_DWORD *)(a1 + 8) = result; + } + *(_DWORD *)(a1 + 12) = result; + } + return result; +} + +//----- (004E2790) -------------------------------------------------------- +_DWORD *__thiscall std::stringbuf::_M_stringbuf_init(_DWORD *this, int a2) +{ + int v2; // esi + int v3; // edx + _DWORD *result; // eax + char *v5; // edx + int v6; // edi + int v7; // [esp+0h] [ebp-2Ch] + + v2 = 0; + v3 = this[10]; + result = (_DWORD *)this[9]; + this[8] = a2; + if ( (a2 & 3) != 0 ) + v2 = v3; + v5 = (char *)result + v3; + if ( result == this + 11 ) + v6 = 15; + else + v6 = this[11]; + if ( (a2 & 8) != 0 ) + { + this[1] = result; + this[2] = result; + this[3] = v5; + } + if ( (a2 & 0x10) != 0 ) + { + this[6] = (char *)result + v6; + this[4] = result; + if ( (unsigned int)v2 > 0x7FFFFFFFuLL ) + { + v7 = v2 - 0x7FFFFFFF; + if ( (((unsigned __int64)(unsigned int)v2 - 0x7FFFFFFF) >> 32) | (unsigned int)(v2 + 1) ) + { + result = (_DWORD *)((char *)result + 0x7FFFFFFF); + } + else + { + v7 = 1; + result = (_DWORD *)((char *)result - 2); + } + v2 = v7; + } + result = (_DWORD *)((char *)result + v2); + this[5] = result; + if ( (a2 & 8) == 0 ) + { + this[1] = v5; + this[2] = v5; + this[3] = v5; + } + } + return result; +} + +//----- (004E2890) -------------------------------------------------------- +int __thiscall std::stringbuf::str(int this, int a2) +{ + unsigned int v3; // eax + + std::string::_M_replace((unsigned int **)(this + 36), 0, *(_DWORD *)(this + 40), *(char **)a2, *(_DWORD *)(a2 + 4)); + v3 = 0; + if ( (*(_BYTE *)(this + 32) & 3) != 0 ) + v3 = *(_DWORD *)(this + 40); + return std::stringbuf::_M_sync((_DWORD *)this, *(_DWORD **)(this + 36), 0, v3); +} + +//----- (004E28F0) -------------------------------------------------------- +void __thiscall std::stringbuf::swap(volatile signed __int32 **this, _DWORD *a2) +{ + volatile signed __int32 *v2; // edx + volatile signed __int32 *v3; // esi + volatile signed __int32 *v4; // ebx + volatile signed __int32 *v5; // eax + volatile signed __int32 *v6; // ecx + volatile signed __int32 *v7; // ebx + volatile signed __int32 *v8; // esi + int v9; // ebx + int v10; // ecx + unsigned int v11; // eax + unsigned int v12; // edi + volatile signed __int32 *v13; // eax + volatile signed __int32 *v14; // edx + volatile signed __int32 *v15; // eax + volatile signed __int32 *v16; // edx + volatile signed __int32 *v17; // eax + volatile signed __int32 *v18; // edx + volatile signed __int32 *v19; // eax + volatile signed __int32 *v20; // edx + volatile signed __int32 *v21; // eax + volatile signed __int32 *v22; // eax + volatile signed __int32 **v23; // ebx + volatile signed __int32 *v24; // esi + int v25; // edx + int v26; // ecx + int v27; // edi + __int64 v28; // rax + char *v29; // ecx + _DWORD *v30; // ebx + int v31; // esi + int v32; // eax + int v33; // ecx + __int64 v34; // rax + int v35; // ecx + int v36; // esi + struct _Unwind_Exception *v37; // edi + struct _Unwind_Exception *v38; // ecx + const std::locale *v39; // [esp+4h] [ebp-E4h] + const std::locale *v40; // [esp+4h] [ebp-E4h] + const std::locale *v41; // [esp+4h] [ebp-E4h] + const std::locale *v42; // [esp+4h] [ebp-E4h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-D0h] + _DWORD *v45; // [esp+54h] [ebp-94h] BYREF + _DWORD *v46; // [esp+58h] [ebp-90h] BYREF + _DWORD *v47; // [esp+5Ch] [ebp-8Ch] BYREF + _DWORD *v48; // [esp+60h] [ebp-88h] + __int64 v49; // [esp+68h] [ebp-80h] + __int64 v50; // [esp+70h] [ebp-78h] + __int64 v51; // [esp+78h] [ebp-70h] + __int64 v52; // [esp+80h] [ebp-68h] + __int64 v53; // [esp+88h] [ebp-60h] + __int64 v54; // [esp+90h] [ebp-58h] + volatile signed __int32 **v55; // [esp+98h] [ebp-50h] + __int64 v56; // [esp+A0h] [ebp-48h] + __int64 v57; // [esp+A8h] [ebp-40h] + __int64 v58; // [esp+B0h] [ebp-38h] + __int64 v59; // [esp+B8h] [ebp-30h] + __int64 v60; // [esp+C0h] [ebp-28h] + __int64 v61; // [esp+C8h] [ebp-20h] + + v49 = -1LL; + v48 = a2; + v2 = this[1]; + v50 = -1LL; + v3 = this[9]; + v4 = this[4]; + v51 = -1LL; + v52 = -1LL; + v53 = -1LL; + v54 = -1LL; + if ( !v2 ) + { + v5 = 0; + if ( !v4 ) + goto LABEL_7; + goto LABEL_3; + } + v49 = (char *)v2 - (char *)v3; + v50 = (char *)this[2] - (char *)v3; + v5 = this[3]; + v51 = (char *)v5 - (char *)v3; + if ( v4 ) + { +LABEL_3: + v52 = (char *)v4 - (char *)v3; + v6 = this[5]; + LODWORD(v53) = (char *)this[5] - (char *)v4; + v7 = this[6]; + v53 = (int)v53; + v54 = (char *)v7 - (char *)v3; + if ( v5 < v6 ) + v5 = v6; + } + if ( v5 ) + this[10] = (volatile signed __int32 *)((char *)v5 - (char *)v3); +LABEL_7: + v56 = -1LL; + v55 = this; + v57 = -1LL; + v8 = (volatile signed __int32 *)a2[1]; + v58 = -1LL; + v9 = a2[9]; + v10 = a2[4]; + v59 = -1LL; + v60 = -1LL; + v61 = -1LL; + if ( !v8 ) + { + v11 = 0; + if ( !v10 ) + goto LABEL_13; + goto LABEL_9; + } + v56 = (int)v8 - v9; + v57 = a2[2] - v9; + v11 = a2[3]; + v58 = (int)(v11 - v9); + if ( v10 ) + { +LABEL_9: + v59 = v10 - v9; + v12 = a2[5]; + v60 = (int)(v12 - v10); + v61 = a2[6] - v9; + if ( v11 < v12 ) + v11 = v12; + } + if ( v11 ) + a2[10] = v11 - v9; +LABEL_13: + this[1] = v8; + a2[1] = v2; + v13 = this[2]; + this[2] = (volatile signed __int32 *)a2[2]; + v14 = (volatile signed __int32 *)a2[3]; + a2[2] = v13; + v15 = this[3]; + this[3] = v14; + v16 = (volatile signed __int32 *)a2[4]; + a2[3] = v15; + v17 = this[4]; + this[4] = v16; + v18 = (volatile signed __int32 *)a2[5]; + a2[4] = v17; + v19 = this[5]; + this[5] = v18; + v20 = (volatile signed __int32 *)a2[6]; + a2[5] = v19; + v21 = this[6]; + this[6] = v20; + a2[6] = v21; + std::locale::locale((volatile signed __int32 **)&v47, this + 7, v39); + std::locale::operator=(this + 7, (volatile signed __int32 **)a2 + 7); + std::locale::operator=((volatile signed __int32 **)a2 + 7, (volatile signed __int32 **)&v47); + std::locale::~locale(&v47); + std::locale::locale((volatile signed __int32 **)&v45, (volatile signed __int32 **)a2 + 7, v40); + std::locale::locale((volatile signed __int32 **)&v46, this + 7, v41); + (*((void (__thiscall **)(volatile signed __int32 **, _DWORD **))*this + 2))(this, &v45); + std::locale::operator=(this + 7, (volatile signed __int32 **)&v45); + std::locale::locale((volatile signed __int32 **)&v47, (volatile signed __int32 **)a2 + 7, v42); + (*(void (__thiscall **)(_DWORD *, _DWORD **))(*a2 + 8))(a2, &v46); + std::locale::operator=((volatile signed __int32 **)a2 + 7, (volatile signed __int32 **)&v46); + std::locale::~locale(&v47); + std::locale::~locale(&v46); + std::locale::~locale(&v45); + v22 = this[8]; + this[8] = (volatile signed __int32 *)a2[8]; + a2[8] = v22; + std::string::swap(this + 9, a2 + 9); + v23 = v55; + v24 = v55[9]; + if ( ((unsigned int)v56 & HIDWORD(v56)) != -1 ) + { + v25 = v58; + v26 = v57; + v55[1] = (volatile signed __int32 *)((char *)v24 + v56); + v23[2] = (volatile signed __int32 *)((char *)v24 + v26); + v23[3] = (volatile signed __int32 *)((char *)v24 + v25); + } + if ( ((unsigned int)v59 & HIDWORD(v59)) != -1 ) + { + v27 = v61; + v28 = v60; + v29 = (char *)v24 + v59; + v23[4] = (volatile signed __int32 *)((char *)v24 + v59); + for ( v23[6] = (volatile signed __int32 *)((char *)v24 + v27); v28 > 0x7FFFFFFF; v28 -= 0x7FFFFFFFLL ) + v29 += 0x7FFFFFFF; + v23[5] = (volatile signed __int32 *)&v29[v28]; + } + v30 = v48; + v31 = v48[9]; + if ( ((unsigned int)v49 & HIDWORD(v49)) != -1 ) + { + v32 = v51; + v33 = v50; + v48[1] = v31 + v49; + v30[2] = v31 + v33; + v30[3] = v31 + v32; + } + if ( ((unsigned int)v52 & HIDWORD(v52)) != -1 ) + { + v34 = v53; + v35 = v31 + v52; + v36 = v31 + v54; + v30[4] = v35; + v37 = (struct _Unwind_Exception *)v35; + v30[6] = v36; + if ( v34 > 0x7FFFFFFF ) + { + v38 = (struct _Unwind_Exception *)(v35 + 0x7FFFFFFF); + do + { + lpuexcpta = v38; + v34 -= 0x7FFFFFFFLL; + v38 = (struct _Unwind_Exception *)((char *)v38 + 0x7FFFFFFF); + } + while ( v34 > 0x7FFFFFFF ); + v37 = lpuexcpta; + } + v30[5] = (char *)v37 + v34; + } +} +// 4E2BBA: variable 'v39' is possibly undefined +// 4E2C02: variable 'v40' is possibly undefined +// 4E2C15: variable 'v41' is possibly undefined +// 4E2C5E: variable 'v42' is possibly undefined + +//----- (004E2EC0) -------------------------------------------------------- +_DWORD *__thiscall std::stringbuf::setbuf(int this, _DWORD *a2, int a3) +{ + _DWORD *result; // eax + int v4; // ebx + _DWORD *v5; // esi + int v6; // edi + char *v7; // ecx + int v8; // ebp + char *v9; // ebp + int v10; // [esp+0h] [ebp-14h] + + result = (_DWORD *)this; + if ( a2 && a3 >= 0 ) + { + *(_DWORD *)(this + 40) = 0; + v4 = a3; + **(_BYTE **)(this + 36) = 0; + v5 = *(_DWORD **)(this + 36); + v10 = *(_DWORD *)(this + 32) & 0x10; + v6 = *(_DWORD *)(this + 32) & 8; + v7 = (char *)a2 + *(_DWORD *)(this + 40); + if ( v5 == result + 11 ) + v8 = 15; + else + v8 = result[11]; + v9 = (char *)a2 + v8; + if ( a2 != v5 ) + { + v7 += a3; + v4 = 0; + v9 = v7; + } + if ( v6 ) + { + result[1] = a2; + result[2] = (char *)a2 + v4; + result[3] = v7; + if ( v10 ) + { + result[5] = a2; + result[4] = a2; + result[6] = v9; + } + } + else if ( v10 ) + { + result[5] = a2; + result[4] = a2; + result[6] = v9; + result[1] = v7; + result[2] = v7; + result[3] = v7; + } + } + return result; +} + +//----- (004E2F80) -------------------------------------------------------- +int __thiscall std::stringbuf::_M_sync(_DWORD *this, _DWORD *a2, int a3, unsigned int a4) +{ + _DWORD *v4; // edi + int result; // eax + int v6; // esi + int v7; // ebx + int v8; // ebp + int v9; // edx + char *v10; // ebp + __int64 v11; // rax + int v12; // [esp+4h] [ebp-18h] + + v4 = (_DWORD *)this[9]; + result = (int)a2 + this[10]; + v12 = result; + v6 = this[8] & 0x10; + v7 = this[8] & 8; + if ( v4 == this + 11 ) + v8 = 15; + else + v8 = this[11]; + if ( a2 == v4 ) + { + v10 = (char *)a2 + v8; + } + else + { + v9 = a3; + a3 = 0; + v12 = v9 + result; + result = v12; + v10 = (char *)v12; + } + if ( v7 ) + { + this[1] = a2; + this[2] = (char *)a2 + a3; + result = v12; + this[3] = v12; + } + if ( v6 ) + { + this[6] = v10; + this[4] = a2; + if ( a4 > 0x7FFFFFFFuLL ) + { + v11 = a4 - 0x7FFFFFFFLL; + if ( (a4 + 1) | HIDWORD(v11) ) + { + a2 = (_DWORD *)((char *)a2 + 0x7FFFFFFF); + } + else + { + a2 = (_DWORD *)((char *)a2 - 2); + LODWORD(v11) = 1; + } + a4 = v11; + } + result = (int)a2 + a4; + this[5] = (char *)a2 + a4; + if ( !v7 ) + { + result = v12; + this[1] = v12; + this[2] = v12; + this[3] = v12; + } + } + return result; +} + +//----- (004E3090) -------------------------------------------------------- +_DWORD *__thiscall std::stringbuf::seekoff(_DWORD *this, _DWORD *a2, __int64 a3, int a4, unsigned int a5) +{ + unsigned int v5; // edx + unsigned __int8 v6; // bp + unsigned __int8 v7; // di + unsigned int v9; // eax + _DWORD *v10; // ebx + int v11; // esi + int v12; // edi + __int64 v13; // [esp+0h] [ebp-34h] + unsigned __int8 v14; // [esp+8h] [ebp-2Ch] + __int64 v15; // [esp+8h] [ebp-2Ch] + int v16; // [esp+18h] [ebp-1Ch] + char v17; // [esp+1Fh] [ebp-15h] + + *this = -1; + this[1] = -1; + this[2] = 0; + v13 = a3; + v5 = (a5 & a2[8]) >> 4; + v6 = (a4 != 1) & v5 & (((unsigned __int8)a5 & a2[8] & 8) != 0); + v14 = ((a5 >> 3) ^ 1) & 1 & v5; + v7 = (((unsigned __int8)a5 & a2[8] & 8) != 0) & ((a5 >> 4) ^ 1); + if ( v7 ) + { + v16 = a2[1]; + if ( !v16 && a3 ) + return this; + v17 = v6 | v14; + } + else + { + v16 = a2[4]; + if ( !v16 && a3 ) + return this; + v17 = v14 | v6; + if ( !(v14 | v6) ) + return this; + } + v9 = a2[5]; + if ( v9 ) + { + v10 = a2; + if ( v9 > a2[3] ) + { + if ( (a2[8] & 8) == 0 ) + { + a2[1] = v9; + v10 = a2; + a2[2] = v9; + } + v10[3] = v9; + } + } + if ( a4 == 1 ) + { + v15 = a3 + (int)(v9 - v16); + v13 = a2[2] - v16 + a3; + } + else + { + v15 = a3; + if ( a4 == 2 ) + { + v13 = a2[3] - v16 + a3; + v15 = v13; + } + } + if ( v6 | v7 && v13 >= 0 && a2[3] - v16 >= v13 ) + { + *(_QWORD *)this = v13; + v12 = a2[1] + v13; + this[2] = 0; + a2[2] = v12; + } + if ( v15 >= 0 && v17 && a2[3] - v16 >= v15 ) + { + *(_QWORD *)this = v15; + v11 = a2[4] + v15; + this[2] = 0; + a2[5] = v11; + } + return this; +} + +//----- (004E3300) -------------------------------------------------------- +_DWORD *__thiscall std::stringbuf::seekpos(_DWORD *this, _DWORD *a2, __int64 a3, int a4, int a5, int a6) +{ + _DWORD *result; // eax + int v7; // ecx + int v8; // ebx + unsigned int v9; // ebp + int v10; // [esp+0h] [ebp-2Ch] + + result = this; + *this = -1; + this[1] = -1; + this[2] = 0; + v7 = a2[8] & 8; + v10 = a6 & a2[8]; + if ( (a6 & v7) != 0 ) + v8 = a2[1]; + else + v8 = a2[4]; + if ( (!a3 || v8) && (v10 & 0x18) != 0 ) + { + v9 = a2[5]; + if ( v9 && v9 > a2[3] ) + { + if ( !v7 ) + { + a2[1] = v9; + a2[2] = v9; + } + a2[3] = v9; + } + if ( a3 >= 0 && a2[3] - v8 >= a3 ) + { + if ( (a6 & v7) != 0 ) + a2[2] = a3 + a2[1]; + if ( (v10 & 0x10) != 0 ) + a2[5] = a2[4] + a3; + *(_QWORD *)result = a3; + result[2] = a4; + } + } + return result; +} + +//----- (004E33F0) -------------------------------------------------------- +int __thiscall std::stringbuf::_M_pbump(_DWORD *this, int a2, int a3, __int64 a4) +{ + __int64 v5; // rax + int v6; // ecx + int result; // eax + + v5 = a4; + this[6] = a3; + v6 = a2; + for ( this[4] = a2; v5 > 0x7FFFFFFF; v5 -= 0x7FFFFFFFLL ) + v6 += 0x7FFFFFFF; + result = v6 + v5; + this[5] = result; + return result; +} + +//----- (004E3450) -------------------------------------------------------- +int __thiscall std::stringbuf::overflow(_DWORD *this, int a2) +{ + int v2; // esi + _DWORD *v3; // ecx + unsigned int v4; // eax + unsigned int v5; // ebx + int v6; // edi + unsigned int v7; // eax + char *v8; // eax + _BYTE *v9; // edx + unsigned int v10; // eax + _BYTE *v12; // edx + int v13; // eax + int v14; // ebx + int v15; // eax + _BYTE *v16; // [esp+14h] [ebp-74h] + int v17; // [esp+14h] [ebp-74h] + size_t v18; // [esp+14h] [ebp-74h] + void *Block; // [esp+58h] [ebp-30h] BYREF + int v22; // [esp+5Ch] [ebp-2Ch] + int v23[10]; // [esp+60h] [ebp-28h] BYREF + + v2 = this[8]; + if ( (v2 & 0x10) == 0 ) + return -1; + if ( a2 == -1 ) + return 0; + v3 = (_DWORD *)this[9]; + if ( v3 == this + 11 ) + v4 = 15; + else + v4 = this[11]; + v5 = this[6]; + v6 = this[4]; + v16 = (_BYTE *)this[5]; + if ( v5 - v6 >= v4 ) + { + if ( v5 > (unsigned int)v16 ) + goto LABEL_21; + if ( v4 != 0x3FFFFFFF ) + { + if ( v5 <= (unsigned int)v16 ) + { + v7 = 2 * v4; + LOBYTE(v23[0]) = 0; + Block = v23; + if ( v7 > 0x3FFFFFFF ) + v7 = 0x3FFFFFFF; + v22 = 0; + if ( v7 < 0x200 ) + v7 = 512; + std::string::reserve(&Block, v7); + v8 = (char *)this[4]; + v17 = v22; + if ( v8 ) + { + std::string::_M_replace((unsigned int **)&Block, 0, v22, v8, this[6] - (_DWORD)v8); + v17 = v22; + } + v9 = Block; + v10 = 15; + if ( Block != v23 ) + v10 = v23[0]; + if ( v17 + 1 > v10 ) + { + std::string::_M_mutate((int)&Block, v17, 0, 0, 1u); + v9 = Block; + } + v9[v17] = a2; + v22 = v17 + 1; + *((_BYTE *)Block + v17 + 1) = 0; + std::string::swap(this + 9, &Block); + std::stringbuf::_M_sync(this, (_DWORD *)this[9], this[2] - this[1], this[5] - this[4]); + if ( Block != v23 ) + operator delete(Block); + goto LABEL_22; + } +LABEL_21: + *v16 = a2; +LABEL_22: + ++this[5]; + return a2; + } + return -1; + } + this[4] = v3; + v12 = &v16[(_DWORD)v3 - v6]; + this[6] = (char *)v3 + v4; + this[5] = v12; + if ( (v2 & 8) != 0 ) + { + v18 = this[1]; + v13 = this[3]; + this[1] = v3; + v14 = (int)v3 + v13 - v18 + 1; + v15 = this[2]; + this[3] = v14; + this[2] = (char *)v3 + v15 - v18; + } + *v12 = a2; + ++this[5]; + return a2; +} + +//----- (004E3710) -------------------------------------------------------- +int __thiscall std::stringbuf::pbackfail(int this, int a2) +{ + unsigned int v2; // edx + int result; // eax + char v4; // bl + + v2 = *(_DWORD *)(this + 8); + result = a2; + if ( v2 <= *(_DWORD *)(this + 4) ) + return -1; + if ( a2 == -1 ) + { + result = 0; + *(_DWORD *)(this + 8) = v2 - 1; + return result; + } + v4 = *(_BYTE *)(v2 - 1); + if ( (*(_BYTE *)(this + 32) & 0x10) == 0 && v4 != (_BYTE)a2 ) + return -1; + *(_DWORD *)(this + 8) = v2 - 1; + if ( v4 != (_BYTE)a2 ) + *(_BYTE *)(v2 - 1) = a2; + return result; +} + +//----- (004E3760) -------------------------------------------------------- +int __fastcall std::stringbuf::showmanyc(int a1) +{ + unsigned int v1; // edx + unsigned int v2; // eax + + if ( (*(_BYTE *)(a1 + 32) & 8) == 0 ) + return -1; + v1 = *(_DWORD *)(a1 + 20); + v2 = *(_DWORD *)(a1 + 12); + if ( v1 ) + { + if ( v1 > v2 ) + { + *(_DWORD *)(a1 + 12) = v1; + v2 = v1; + } + } + return v2 - *(_DWORD *)(a1 + 8); +} + +//----- (004E3790) -------------------------------------------------------- +int __fastcall std::stringbuf::underflow(int a1) +{ + unsigned int v1; // eax + unsigned int v2; // edx + unsigned __int8 *v3; // eax + + if ( (*(_BYTE *)(a1 + 32) & 8) == 0 ) + return -1; + v1 = *(_DWORD *)(a1 + 20); + v2 = *(_DWORD *)(a1 + 12); + if ( v1 ) + { + if ( v1 > v2 ) + { + *(_DWORD *)(a1 + 12) = v1; + v2 = v1; + } + } + v3 = *(unsigned __int8 **)(a1 + 8); + if ( (unsigned int)v3 < v2 ) + return *v3; + else + return -1; +} + +//----- (004E37D0) -------------------------------------------------------- +void __thiscall std::stringbuf::basic_stringbuf(_DWORD *this, std::locale *a2) +{ + int v2; // edx + unsigned int v3; // eax + int v4; // ecx + int v5; // eax + std::locale *v6; // eax + int v7; // ebx + int v8; // ecx + int v9; // ebx + char *v10; // eax + int v11; // edx + int v12; // ecx + char *v13; // ecx + const std::locale *v14; // [esp+4h] [ebp-A4h] + char *v15; // [esp+14h] [ebp-94h] + __int64 v18; // [esp+60h] [ebp-48h] + int v19; // [esp+68h] [ebp-40h] + __int64 v20; // [esp+70h] [ebp-38h] + __int64 v21; // [esp+78h] [ebp-30h] + int v22; // [esp+80h] [ebp-28h] + int v23; // [esp+88h] [ebp-20h] + + v18 = -1LL; + v19 = -1; + v2 = *((_DWORD *)a2 + 9); + v3 = *((_DWORD *)a2 + 1); + LODWORD(v20) = -1; + v21 = -1LL; + v22 = -1; + v23 = -1; + if ( !v3 ) + { + v4 = *((_DWORD *)a2 + 4); + if ( !v4 ) + goto LABEL_7; + goto LABEL_3; + } + v18 = (int)(v3 - v2); + v19 = *((_DWORD *)a2 + 2) - v2; + v3 = *((_DWORD *)a2 + 3); + v20 = (int)(v3 - v2); + v4 = *((_DWORD *)a2 + 4); + if ( v4 ) + { +LABEL_3: + v21 = v4 - v2; + v22 = *((_DWORD *)a2 + 5) - v4; + v23 = *((_DWORD *)a2 + 6) - v2; + if ( v3 < *((_DWORD *)a2 + 5) ) + v3 = *((_DWORD *)a2 + 5); + } + if ( v3 ) + *((_DWORD *)a2 + 10) = v3 - v2; +LABEL_7: + std::streambuf::basic_streambuf(this, a2, v14); + v5 = *((_DWORD *)a2 + 8); + *this = &off_51A2D8; + this[9] = this + 11; + this[8] = v5; + v15 = (char *)a2 + 44; + v6 = (std::locale *)*((_DWORD *)a2 + 9); + if ( v6 == (std::locale *)((char *)a2 + 44) ) + { + this[11] = *((_DWORD *)a2 + 11); + this[12] = *((_DWORD *)a2 + 12); + this[13] = *((_DWORD *)a2 + 13); + this[14] = *((_DWORD *)a2 + 14); + } + else + { + this[9] = v6; + this[11] = *((_DWORD *)a2 + 11); + } + this[10] = *((_DWORD *)a2 + 10); + *((_BYTE *)a2 + 44) = 0; + *((_DWORD *)a2 + 9) = v15; + *((_DWORD *)a2 + 10) = 0; + v7 = this[9]; + if ( ((unsigned int)v18 & HIDWORD(v18)) != -1 ) + { + this[1] = v7 + v18; + this[2] = v7 + v19; + this[3] = v7 + v20; + } + if ( ((unsigned int)v21 & HIDWORD(v21)) != -1 ) + { + v8 = v7 + v23; + v9 = v21 + v7; + this[6] = v8; + this[4] = v9; + this[5] = v9 + v22; + } + v10 = (char *)*((_DWORD *)a2 + 9); + v11 = *((_DWORD *)a2 + 8) & 0x10; + if ( v10 == v15 ) + v12 = 15; + else + v12 = *((_DWORD *)a2 + 11); + v13 = &v10[v12]; + if ( (*((_DWORD *)a2 + 8) & 8) != 0 ) + { + *((_DWORD *)a2 + 1) = v10; + *((_DWORD *)a2 + 2) = v10; + *((_DWORD *)a2 + 3) = v10; + if ( v11 ) + { + *((_DWORD *)a2 + 5) = v10; + *((_DWORD *)a2 + 4) = v10; + *((_DWORD *)a2 + 6) = v13; + } + } + else if ( v11 ) + { + *((_DWORD *)a2 + 5) = v10; + *((_DWORD *)a2 + 4) = v10; + *((_DWORD *)a2 + 6) = v13; + *((_DWORD *)a2 + 1) = v10; + *((_DWORD *)a2 + 2) = v10; + *((_DWORD *)a2 + 3) = v10; + } +} +// 4E39E3: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4E3918: variable 'v14' is possibly undefined +// 51A2D8: using guessed type int (*off_51A2D8)(); + +//----- (004E3B00) -------------------------------------------------------- +std::locale *__thiscall std::stringbuf::basic_stringbuf(_DWORD *this, std::locale **a2, int a3) +{ + std::locale *v4; // eax + std::locale **v5; // edx + std::locale *result; // eax + std::locale *v7; // edx + const std::locale *v8; // [esp+4h] [ebp-18h] + + std::streambuf::basic_streambuf(this, (std::locale *)a2, v8); + v4 = a2[8]; + *this = &off_51A2D8; + this[9] = this + 11; + v5 = (std::locale **)a2[9]; + this[8] = v4; + result = (std::locale *)(a2 + 11); + if ( v5 == a2 + 11 ) + { + this[11] = a2[11]; + this[12] = a2[12]; + this[13] = a2[13]; + this[14] = a2[14]; + } + else + { + this[9] = v5; + this[11] = a2[11]; + } + v7 = a2[10]; + a2[9] = result; + a2[10] = 0; + this[10] = v7; + *((_BYTE *)a2 + 44) = 0; + return result; +} +// 4E3B0E: variable 'v8' is possibly undefined +// 51A2D8: using guessed type int (*off_51A2D8)(); + +//----- (004E3B80) -------------------------------------------------------- +void __thiscall std::stringbuf::basic_stringbuf(_DWORD *this, int a2, int a3) +{ + int v3; // eax + _BYTE *v4; // edx + unsigned int v5; // eax + + *this = &off_51ADD4; + this[1] = 0; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + std::locale::locale(this + 7); + v3 = *(_DWORD *)(a2 + 4); + v4 = *(_BYTE **)a2; + *this = &off_51A2D8; + this[8] = 0; + this[9] = this + 11; + std::string::_M_construct(this + 9, v4, (int)&v4[v3]); + this[8] = a3; + v5 = 0; + if ( (a3 & 3) != 0 ) + v5 = this[10]; + std::stringbuf::_M_sync(this, (_DWORD *)this[9], 0, v5); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E3CA0) -------------------------------------------------------- +char *__thiscall std::stringbuf::basic_stringbuf(_DWORD *this, int a2) +{ + _DWORD *v3; // ecx + char *result; // eax + + v3 = this + 7; + *(v3 - 7) = &off_51ADD4; + *(v3 - 6) = 0; + *(v3 - 5) = 0; + *(v3 - 4) = 0; + *(v3 - 3) = 0; + *(v3 - 2) = 0; + *(v3 - 1) = 0; + std::locale::locale(v3); + *this = &off_51A2D8; + this[10] = 0; + this[8] = a2; + result = (char *)(this + 11); + this[9] = this + 11; + *((_BYTE *)this + 44) = 0; + return result; +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E3D10) -------------------------------------------------------- +int __fastcall std::stringbuf::basic_stringbuf(int a1) +{ + _DWORD *v2; // ecx + int result; // eax + + v2 = (_DWORD *)(a1 + 28); + *(v2 - 7) = &off_51ADD4; + *(v2 - 6) = 0; + *(v2 - 5) = 0; + *(v2 - 4) = 0; + *(v2 - 3) = 0; + *(v2 - 2) = 0; + *(v2 - 1) = 0; + std::locale::locale(v2); + result = a1 + 44; + *(_BYTE *)(a1 + 44) = 0; + *(_DWORD *)a1 = &off_51A2D8; + *(_DWORD *)(a1 + 32) = 24; + *(_DWORD *)(a1 + 36) = a1 + 44; + *(_DWORD *)(a1 + 40) = 0; + return result; +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E3D80) -------------------------------------------------------- +void __thiscall std::stringbuf::basic_stringbuf(_DWORD *this, std::locale *a2) +{ + int v2; // edx + unsigned int v3; // eax + int v4; // ecx + int v5; // eax + std::locale *v6; // eax + int v7; // ebx + int v8; // ecx + int v9; // ebx + char *v10; // eax + int v11; // edx + int v12; // ecx + char *v13; // ecx + const std::locale *v14; // [esp+4h] [ebp-A4h] + char *v15; // [esp+14h] [ebp-94h] + __int64 v18; // [esp+60h] [ebp-48h] + int v19; // [esp+68h] [ebp-40h] + __int64 v20; // [esp+70h] [ebp-38h] + __int64 v21; // [esp+78h] [ebp-30h] + int v22; // [esp+80h] [ebp-28h] + int v23; // [esp+88h] [ebp-20h] + + v18 = -1LL; + v19 = -1; + v2 = *((_DWORD *)a2 + 9); + v3 = *((_DWORD *)a2 + 1); + LODWORD(v20) = -1; + v21 = -1LL; + v22 = -1; + v23 = -1; + if ( !v3 ) + { + v4 = *((_DWORD *)a2 + 4); + if ( !v4 ) + goto LABEL_7; + goto LABEL_3; + } + v18 = (int)(v3 - v2); + v19 = *((_DWORD *)a2 + 2) - v2; + v3 = *((_DWORD *)a2 + 3); + v20 = (int)(v3 - v2); + v4 = *((_DWORD *)a2 + 4); + if ( v4 ) + { +LABEL_3: + v21 = v4 - v2; + v22 = *((_DWORD *)a2 + 5) - v4; + v23 = *((_DWORD *)a2 + 6) - v2; + if ( v3 < *((_DWORD *)a2 + 5) ) + v3 = *((_DWORD *)a2 + 5); + } + if ( v3 ) + *((_DWORD *)a2 + 10) = v3 - v2; +LABEL_7: + std::streambuf::basic_streambuf(this, a2, v14); + v5 = *((_DWORD *)a2 + 8); + *this = &off_51A2D8; + this[9] = this + 11; + this[8] = v5; + v15 = (char *)a2 + 44; + v6 = (std::locale *)*((_DWORD *)a2 + 9); + if ( v6 == (std::locale *)((char *)a2 + 44) ) + { + this[11] = *((_DWORD *)a2 + 11); + this[12] = *((_DWORD *)a2 + 12); + this[13] = *((_DWORD *)a2 + 13); + this[14] = *((_DWORD *)a2 + 14); + } + else + { + this[9] = v6; + this[11] = *((_DWORD *)a2 + 11); + } + this[10] = *((_DWORD *)a2 + 10); + *((_BYTE *)a2 + 44) = 0; + *((_DWORD *)a2 + 9) = v15; + *((_DWORD *)a2 + 10) = 0; + v7 = this[9]; + if ( ((unsigned int)v18 & HIDWORD(v18)) != -1 ) + { + this[1] = v7 + v18; + this[2] = v7 + v19; + this[3] = v7 + v20; + } + if ( ((unsigned int)v21 & HIDWORD(v21)) != -1 ) + { + v8 = v7 + v23; + v9 = v21 + v7; + this[6] = v8; + this[4] = v9; + this[5] = v9 + v22; + } + v10 = (char *)*((_DWORD *)a2 + 9); + v11 = *((_DWORD *)a2 + 8) & 0x10; + if ( v10 == v15 ) + v12 = 15; + else + v12 = *((_DWORD *)a2 + 11); + v13 = &v10[v12]; + if ( (*((_DWORD *)a2 + 8) & 8) != 0 ) + { + *((_DWORD *)a2 + 1) = v10; + *((_DWORD *)a2 + 2) = v10; + *((_DWORD *)a2 + 3) = v10; + if ( v11 ) + { + *((_DWORD *)a2 + 5) = v10; + *((_DWORD *)a2 + 4) = v10; + *((_DWORD *)a2 + 6) = v13; + } + } + else if ( v11 ) + { + *((_DWORD *)a2 + 5) = v10; + *((_DWORD *)a2 + 4) = v10; + *((_DWORD *)a2 + 6) = v13; + *((_DWORD *)a2 + 1) = v10; + *((_DWORD *)a2 + 2) = v10; + *((_DWORD *)a2 + 3) = v10; + } +} +// 4E3F93: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4E3EC8: variable 'v14' is possibly undefined +// 51A2D8: using guessed type int (*off_51A2D8)(); + +//----- (004E40B0) -------------------------------------------------------- +std::locale *__thiscall std::stringbuf::basic_stringbuf(_DWORD *this, std::locale **a2, int a3) +{ + std::locale *v4; // eax + std::locale **v5; // edx + std::locale *result; // eax + std::locale *v7; // edx + const std::locale *v8; // [esp+4h] [ebp-18h] + + std::streambuf::basic_streambuf(this, (std::locale *)a2, v8); + v4 = a2[8]; + *this = &off_51A2D8; + this[9] = this + 11; + v5 = (std::locale **)a2[9]; + this[8] = v4; + result = (std::locale *)(a2 + 11); + if ( v5 == a2 + 11 ) + { + this[11] = a2[11]; + this[12] = a2[12]; + this[13] = a2[13]; + this[14] = a2[14]; + } + else + { + this[9] = v5; + this[11] = a2[11]; + } + v7 = a2[10]; + a2[9] = result; + a2[10] = 0; + this[10] = v7; + *((_BYTE *)a2 + 44) = 0; + return result; +} +// 4E40BE: variable 'v8' is possibly undefined +// 51A2D8: using guessed type int (*off_51A2D8)(); + +//----- (004E4130) -------------------------------------------------------- +void __thiscall std::stringbuf::basic_stringbuf(_DWORD *this, int a2, int a3) +{ + int v3; // eax + _BYTE *v4; // edx + unsigned int v5; // eax + + *this = &off_51ADD4; + this[1] = 0; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + std::locale::locale(this + 7); + v3 = *(_DWORD *)(a2 + 4); + v4 = *(_BYTE **)a2; + *this = &off_51A2D8; + this[8] = 0; + this[9] = this + 11; + std::string::_M_construct(this + 9, v4, (int)&v4[v3]); + this[8] = a3; + v5 = 0; + if ( (a3 & 3) != 0 ) + v5 = this[10]; + std::stringbuf::_M_sync(this, (_DWORD *)this[9], 0, v5); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E4250) -------------------------------------------------------- +char *__thiscall std::stringbuf::basic_stringbuf(_DWORD *this, int a2) +{ + _DWORD *v3; // ecx + char *result; // eax + + v3 = this + 7; + *(v3 - 7) = &off_51ADD4; + *(v3 - 6) = 0; + *(v3 - 5) = 0; + *(v3 - 4) = 0; + *(v3 - 3) = 0; + *(v3 - 2) = 0; + *(v3 - 1) = 0; + std::locale::locale(v3); + *this = &off_51A2D8; + this[10] = 0; + this[8] = a2; + result = (char *)(this + 11); + this[9] = this + 11; + *((_BYTE *)this + 44) = 0; + return result; +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E42C0) -------------------------------------------------------- +int __fastcall std::stringbuf::basic_stringbuf(int a1) +{ + _DWORD *v2; // ecx + int result; // eax + + v2 = (_DWORD *)(a1 + 28); + *(v2 - 7) = &off_51ADD4; + *(v2 - 6) = 0; + *(v2 - 5) = 0; + *(v2 - 4) = 0; + *(v2 - 3) = 0; + *(v2 - 2) = 0; + *(v2 - 1) = 0; + std::locale::locale(v2); + result = a1 + 44; + *(_BYTE *)(a1 + 44) = 0; + *(_DWORD *)a1 = &off_51A2D8; + *(_DWORD *)(a1 + 32) = 24; + *(_DWORD *)(a1 + 36) = a1 + 44; + *(_DWORD *)(a1 + 40) = 0; + return result; +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E4330) -------------------------------------------------------- +void __fastcall std::stringbuf::~stringbuf(_DWORD *Block) +{ + _DWORD *v2; // eax + + v2 = (_DWORD *)Block[9]; + *Block = &off_51A2D8; + if ( v2 != Block + 11 ) + operator delete(v2); + *Block = &off_51ADD4; + std::locale::~locale((_DWORD **)Block + 7); + operator delete(Block); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E4370) -------------------------------------------------------- +void __fastcall std::stringbuf::~stringbuf(int a1) +{ + void *Block; // eax + + Block = *(void **)(a1 + 36); + *(_DWORD *)a1 = &off_51A2D8; + if ( Block != (void *)(a1 + 44) ) + operator delete(Block); + *(_DWORD *)a1 = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 28)); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E43A0) -------------------------------------------------------- +_DWORD *__thiscall std::stringbuf::operator=(_DWORD *this, int a2) +{ + int v2; // ecx + int v3; // ebx + unsigned int v4; // eax + unsigned int v5; // edx + int v6; // edx + _BYTE *v7; // eax + int v8; // ecx + int v9; // ebx + char *v10; // eax + char *v11; // ebx + int v12; // edx + int v13; // ecx + char *v14; // ecx + _DWORD *v15; // esi + int v16; // ecx + int v17; // edx + int v18; // ebx + int v19; // edi + __int64 v20; // rax + int v21; // ebx + int v22; // ecx + int v24; // edx + const std::locale *v25; // [esp+4h] [ebp-A4h] + const std::locale *v26; // [esp+4h] [ebp-A4h] + char *Src; // [esp+14h] [ebp-94h] + _DWORD *v29; // [esp+50h] [ebp-58h] BYREF + _DWORD *v30; // [esp+54h] [ebp-54h] BYREF + _DWORD *v31; // [esp+58h] [ebp-50h] + __int64 v32; // [esp+60h] [ebp-48h] + __int64 v33; // [esp+68h] [ebp-40h] + __int64 v34; // [esp+70h] [ebp-38h] + __int64 v35; // [esp+78h] [ebp-30h] + __int64 v36; // [esp+80h] [ebp-28h] + int v37; // [esp+88h] [ebp-20h] + int v38; // [esp+8Ch] [ebp-1Ch] + + v32 = -1LL; + v31 = this; + v33 = -1LL; + v2 = *(_DWORD *)(a2 + 16); + v3 = *(_DWORD *)(a2 + 36); + v4 = *(_DWORD *)(a2 + 4); + v34 = -1LL; + v35 = -1LL; + v36 = -1LL; + v37 = -1; + v38 = -1; + if ( !v4 ) + { + if ( !v2 ) + goto LABEL_7; + goto LABEL_3; + } + v32 = (int)(v4 - v3); + v33 = *(_DWORD *)(a2 + 8) - v3; + v4 = *(_DWORD *)(a2 + 12); + v34 = (int)(v4 - v3); + if ( v2 ) + { +LABEL_3: + v35 = v2 - v3; + v5 = *(_DWORD *)(a2 + 20); + v36 = (int)(v5 - v2); + v37 = *(_DWORD *)(a2 + 24) - v3; + v38 = v37 >> 31; + if ( v4 < v5 ) + v4 = v5; + } + if ( v4 ) + *(_DWORD *)(a2 + 40) = v4 - v3; +LABEL_7: + std::streambuf::operator=((volatile signed __int32 **)this, a2); + std::locale::locale((volatile signed __int32 **)&v29, (volatile signed __int32 **)(a2 + 28), v25); + std::locale::locale((volatile signed __int32 **)&v30, (volatile signed __int32 **)this + 7, v26); + (*(void (__thiscall **)(_DWORD *, _DWORD **))(*this + 8))(this, &v29); + std::locale::operator=((volatile signed __int32 **)this + 7, (volatile signed __int32 **)&v29); + std::locale::~locale(&v30); + std::locale::~locale(&v29); + v6 = *(_DWORD *)(a2 + 36); + this[8] = *(_DWORD *)(a2 + 32); + v7 = (_BYTE *)this[9]; + Src = (char *)(a2 + 44); + if ( v6 == a2 + 44 ) + { + v24 = *(_DWORD *)(a2 + 40); + if ( v24 ) + { + if ( v24 == 1 ) + *v7 = *(_BYTE *)(a2 + 44); + else + memcpy(v7, Src, *(_DWORD *)(a2 + 40)); + v24 = *(_DWORD *)(a2 + 40); + v7 = (_BYTE *)this[9]; + } + this[10] = v24; + v7[v24] = 0; + v7 = *(_BYTE **)(a2 + 36); + } + else + { + v8 = *(_DWORD *)(a2 + 40); + if ( v7 == (_BYTE *)(this + 11) ) + { + this[9] = v6; + this[10] = v8; + this[11] = *(_DWORD *)(a2 + 44); + } + else + { + this[9] = v6; + this[10] = v8; + v9 = this[11]; + this[11] = *(_DWORD *)(a2 + 44); + if ( v7 ) + { + *(_DWORD *)(a2 + 36) = v7; + *(_DWORD *)(a2 + 44) = v9; + goto LABEL_11; + } + } + v7 = (_BYTE *)(a2 + 44); + *(_DWORD *)(a2 + 36) = Src; + } +LABEL_11: + *(_DWORD *)(a2 + 40) = 0; + *v7 = 0; + v10 = *(char **)(a2 + 36); + v11 = &v10[*(_DWORD *)(a2 + 40)]; + v12 = *(_DWORD *)(a2 + 32) & 0x10; + if ( v10 == Src ) + v13 = 15; + else + v13 = *(_DWORD *)(a2 + 44); + v14 = &v10[v13]; + if ( (*(_DWORD *)(a2 + 32) & 8) != 0 ) + { + *(_DWORD *)(a2 + 4) = v10; + *(_DWORD *)(a2 + 8) = v10; + *(_DWORD *)(a2 + 12) = v11; + if ( v12 ) + { + *(_DWORD *)(a2 + 20) = v10; + *(_DWORD *)(a2 + 16) = v10; + *(_DWORD *)(a2 + 24) = v14; + } + } + else if ( v12 ) + { + *(_DWORD *)(a2 + 20) = v10; + *(_DWORD *)(a2 + 16) = v10; + *(_DWORD *)(a2 + 24) = v14; + *(_DWORD *)(a2 + 4) = v11; + *(_DWORD *)(a2 + 8) = v11; + *(_DWORD *)(a2 + 12) = v11; + } + v15 = v31; + v16 = v31[9]; + if ( ((unsigned int)v32 & HIDWORD(v32)) != -1 ) + { + v17 = v34; + v18 = v33; + v31[1] = v16 + v32; + v15[2] = v16 + v18; + v15[3] = v16 + v17; + } + if ( ((unsigned int)v35 & HIDWORD(v35)) != -1 ) + { + v19 = v37; + v20 = v36; + v21 = v16 + v35; + v15[4] = v16 + v35; + v15[6] = v16 + v19; + if ( v20 > 0x7FFFFFFF ) + { + v22 = v21 + 0x7FFFFFFF; + do + { + v21 = v22; + v20 -= 0x7FFFFFFFLL; + v22 += 0x7FFFFFFF; + } + while ( v20 > 0x7FFFFFFF ); + } + v15[5] = v21 + v20; + } + return this; +} +// 4E44FB: variable 'v25' is possibly undefined +// 4E4517: variable 'v26' is possibly undefined + +//----- (004E4800) -------------------------------------------------------- +unsigned int __thiscall std::wstringbuf::__xfer_bufptrs::__xfer_bufptrs(_DWORD *this, _DWORD *a2, int a3) +{ + int v3; // ebx + unsigned int result; // eax + int v5; // esi + unsigned int v6; // edi + + this[2] = -1; + this[3] = -1; + v3 = a2[9]; + *this = a3; + result = a2[1]; + this[4] = -1; + v5 = a2[4]; + this[5] = -1; + this[6] = -1; + this[7] = -1; + this[8] = -1; + this[9] = -1; + this[10] = -1; + this[11] = -1; + this[12] = -1; + this[13] = -1; + if ( !result ) + { + if ( !v5 ) + return result; + goto LABEL_3; + } + *((_QWORD *)this + 1) = (int)(result - v3) >> 1; + *((_QWORD *)this + 2) = (a2[2] - v3) >> 1; + result = a2[3]; + *((_QWORD *)this + 3) = (int)(result - v3) >> 1; + if ( v5 ) + { +LABEL_3: + *((_QWORD *)this + 4) = __PAIR64__((v5 - v3) >> 31, (v5 - v3) >> 1); + v6 = a2[5]; + *((_QWORD *)this + 5) = (int)(v6 - v5) >> 1; + *((_QWORD *)this + 6) = (a2[6] - v3) >> 1; + if ( result < v6 ) + result = v6; + } + if ( result ) + { + result = (int)(result - v3) >> 1; + a2[10] = result; + } + return result; +} + +//----- (004E4900) -------------------------------------------------------- +unsigned int __thiscall std::wstringbuf::__xfer_bufptrs::__xfer_bufptrs(_DWORD *this, _DWORD *a2, int a3) +{ + int v3; // ebx + unsigned int result; // eax + int v5; // esi + unsigned int v6; // edi + + this[2] = -1; + this[3] = -1; + v3 = a2[9]; + *this = a3; + result = a2[1]; + this[4] = -1; + v5 = a2[4]; + this[5] = -1; + this[6] = -1; + this[7] = -1; + this[8] = -1; + this[9] = -1; + this[10] = -1; + this[11] = -1; + this[12] = -1; + this[13] = -1; + if ( !result ) + { + if ( !v5 ) + return result; + goto LABEL_3; + } + *((_QWORD *)this + 1) = (int)(result - v3) >> 1; + *((_QWORD *)this + 2) = (a2[2] - v3) >> 1; + result = a2[3]; + *((_QWORD *)this + 3) = (int)(result - v3) >> 1; + if ( v5 ) + { +LABEL_3: + *((_QWORD *)this + 4) = __PAIR64__((v5 - v3) >> 31, (v5 - v3) >> 1); + v6 = a2[5]; + *((_QWORD *)this + 5) = (int)(v6 - v5) >> 1; + *((_QWORD *)this + 6) = (a2[6] - v3) >> 1; + if ( result < v6 ) + result = v6; + } + if ( result ) + { + result = (int)(result - v3) >> 1; + a2[10] = result; + } + return result; +} + +//----- (004E4A00) -------------------------------------------------------- +int __fastcall std::wstringbuf::__xfer_bufptrs::~__xfer_bufptrs(int a1) +{ + int v1; // eax + _DWORD *v2; // esi + int v3; // ebx + int v4; // edx + int v5; // edi + int v6; // edi + int result; // eax + __int64 v8; // rax + int v9; // ecx + int v10; // ebx + int v11; // ecx + + v1 = *(_DWORD *)(a1 + 8); + v2 = *(_DWORD **)a1; + v3 = *(_DWORD *)(*(_DWORD *)a1 + 36); + if ( (v1 & *(_DWORD *)(a1 + 12)) != -1 ) + { + v4 = *(_DWORD *)(a1 + 24); + v5 = *(_DWORD *)(a1 + 16); + v2[1] = v3 + 2 * v1; + v2[2] = v3 + 2 * v5; + v2[3] = v3 + 2 * v4; + } + v6 = *(_DWORD *)(a1 + 32); + result = v6 & *(_DWORD *)(a1 + 36); + if ( result != -1 ) + { + v8 = *(_QWORD *)(a1 + 40); + v9 = v3 + 2 * *(_DWORD *)(a1 + 48); + v10 = v3 + 2 * v6; + v2[6] = v9; + v2[4] = v10; + if ( v8 > 0x7FFFFFFF ) + { + v11 = v10 - 2; + do + { + v10 = v11; + v8 -= 0x7FFFFFFFLL; + v11 -= 2; + } + while ( v8 > 0x7FFFFFFF ); + } + result = v10 + 2 * v8; + v2[5] = result; + } + return result; +} + +//----- (004E4A90) -------------------------------------------------------- +int __fastcall std::wstringbuf::__xfer_bufptrs::~__xfer_bufptrs(int a1) +{ + int v1; // eax + _DWORD *v2; // esi + int v3; // ebx + int v4; // edx + int v5; // edi + int v6; // edi + int result; // eax + __int64 v8; // rax + int v9; // ecx + int v10; // ebx + int v11; // ecx + + v1 = *(_DWORD *)(a1 + 8); + v2 = *(_DWORD **)a1; + v3 = *(_DWORD *)(*(_DWORD *)a1 + 36); + if ( (v1 & *(_DWORD *)(a1 + 12)) != -1 ) + { + v4 = *(_DWORD *)(a1 + 24); + v5 = *(_DWORD *)(a1 + 16); + v2[1] = v3 + 2 * v1; + v2[2] = v3 + 2 * v5; + v2[3] = v3 + 2 * v4; + } + v6 = *(_DWORD *)(a1 + 32); + result = v6 & *(_DWORD *)(a1 + 36); + if ( result != -1 ) + { + v8 = *(_QWORD *)(a1 + 40); + v9 = v3 + 2 * *(_DWORD *)(a1 + 48); + v10 = v3 + 2 * v6; + v2[6] = v9; + v2[4] = v10; + if ( v8 > 0x7FFFFFFF ) + { + v11 = v10 - 2; + do + { + v10 = v11; + v8 -= 0x7FFFFFFFLL; + v11 -= 2; + } + while ( v8 > 0x7FFFFFFF ); + } + result = v10 + 2 * v8; + v2[5] = result; + } + return result; +} + +//----- (004E4B20) -------------------------------------------------------- +unsigned int __fastcall std::wstringbuf::_M_update_egptr(int a1) +{ + unsigned int result; // eax + + result = *(_DWORD *)(a1 + 20); + if ( result && *(_DWORD *)(a1 + 12) < result ) + { + if ( (*(_BYTE *)(a1 + 32) & 8) == 0 ) + { + *(_DWORD *)(a1 + 4) = result; + *(_DWORD *)(a1 + 8) = result; + } + *(_DWORD *)(a1 + 12) = result; + } + return result; +} + +//----- (004E4B50) -------------------------------------------------------- +_DWORD *__thiscall std::wstringbuf::_M_stringbuf_init(_DWORD *this, int a2) +{ + int v2; // ebx + int v3; // edi + _DWORD *result; // eax + int v5; // edi + _DWORD *v6; // [esp+8h] [ebp-1Ch] + + v2 = 0; + v3 = this[10]; + result = (_DWORD *)this[9]; + this[8] = a2; + if ( (a2 & 3) != 0 ) + v2 = v3; + v6 = (_DWORD *)((char *)result + 2 * v3); + if ( result == this + 11 ) + v5 = 14; + else + v5 = 2 * this[11]; + if ( (a2 & 8) != 0 ) + { + this[1] = result; + this[2] = result; + this[3] = v6; + } + if ( (a2 & 0x10) != 0 ) + { + this[6] = (char *)result + v5; + this[4] = result; + if ( (unsigned int)v2 > 0x7FFFFFFFuLL ) + { + if ( (((unsigned __int64)(unsigned int)v2 - 0x7FFFFFFF) >> 32) | (unsigned int)(v2 + 1) ) + { + result = (_DWORD *)((char *)result - 2); + v2 -= 0x7FFFFFFF; + } + else + { + --result; + v2 = 1; + } + } + result = (_DWORD *)((char *)result + 2 * v2); + this[5] = result; + if ( (a2 & 8) == 0 ) + { + result = v6; + this[1] = v6; + this[2] = v6; + this[3] = v6; + } + } + return result; +} + +//----- (004E4C40) -------------------------------------------------------- +_DWORD *__thiscall std::wstringbuf::str(int this, int a2) +{ + unsigned int v3; // eax + + std::wstring::_M_replace((unsigned int **)(this + 36), 0, *(_DWORD *)(this + 40), *(char **)a2, *(_DWORD *)(a2 + 4)); + v3 = 0; + if ( (*(_BYTE *)(this + 32) & 3) != 0 ) + v3 = *(_DWORD *)(this + 40); + return std::wstringbuf::_M_sync((_DWORD *)this, *(_DWORD **)(this + 36), 0, v3); +} + +//----- (004E4CA0) -------------------------------------------------------- +void __thiscall std::wstringbuf::swap(volatile signed __int32 **this, _DWORD *a2) +{ + std::locale *v2; // esi + volatile signed __int32 *v3; // ecx + volatile signed __int32 *v4; // ebx + volatile signed __int32 *v5; // eax + volatile signed __int32 *v6; // esi + volatile signed __int32 *v7; // esi + int v8; // ecx + int v9; // ebx + unsigned int v10; // eax + unsigned int v11; // edi + volatile signed __int32 *v12; // eax + volatile signed __int32 *v13; // edx + volatile signed __int32 *v14; // eax + volatile signed __int32 *v15; // edx + volatile signed __int32 *v16; // eax + volatile signed __int32 *v17; // edx + volatile signed __int32 *v18; // eax + volatile signed __int32 *v19; // edx + volatile signed __int32 *v20; // eax + volatile signed __int32 *v21; // eax + volatile signed __int32 **v22; // ebx + volatile signed __int32 *v23; // ecx + int v24; // edx + int v25; // esi + __int64 v26; // rax + volatile signed __int32 *v27; // edi + volatile signed __int32 *v28; // ecx + bool v29; // cf + _DWORD *v30; // esi + int v31; // ecx + int v32; // edx + int v33; // ebx + int v34; // edi + __int64 v35; // rax + int v36; // ebx + int v37; // ecx + const std::locale *v38; // [esp+4h] [ebp-E4h] + const std::locale *v39; // [esp+4h] [ebp-E4h] + const std::locale *v40; // [esp+4h] [ebp-E4h] + const std::locale *v41; // [esp+4h] [ebp-E4h] + std::locale *v42; // [esp+10h] [ebp-D8h] + std::locale *v43; // [esp+10h] [ebp-D8h] + std::locale *v44; // [esp+10h] [ebp-D8h] + std::locale *v45; // [esp+10h] [ebp-D8h] + std::locale *v46; // [esp+14h] [ebp-D4h] + _DWORD *v48; // [esp+54h] [ebp-94h] BYREF + _DWORD *v49; // [esp+58h] [ebp-90h] BYREF + _DWORD *v50; // [esp+5Ch] [ebp-8Ch] BYREF + _DWORD *v51; // [esp+60h] [ebp-88h] + int v52; // [esp+68h] [ebp-80h] + int v53; // [esp+6Ch] [ebp-7Ch] + int v54; // [esp+70h] [ebp-78h] + int v55; // [esp+74h] [ebp-74h] + __int64 v56; // [esp+78h] [ebp-70h] + int v57; // [esp+80h] [ebp-68h] + int v58; // [esp+84h] [ebp-64h] + __int64 v59; // [esp+88h] [ebp-60h] + int v60; // [esp+90h] [ebp-58h] + int v61; // [esp+94h] [ebp-54h] + volatile signed __int32 **v62; // [esp+98h] [ebp-50h] + int v63; // [esp+A0h] [ebp-48h] + int v64; // [esp+A4h] [ebp-44h] + int v65; // [esp+A8h] [ebp-40h] + int v66; // [esp+ACh] [ebp-3Ch] + __int64 v67; // [esp+B0h] [ebp-38h] + int v68; // [esp+B8h] [ebp-30h] + int v69; // [esp+BCh] [ebp-2Ch] + __int64 v70; // [esp+C0h] [ebp-28h] + int v71; // [esp+C8h] [ebp-20h] + int v72; // [esp+CCh] [ebp-1Ch] + + v52 = -1; + v53 = -1; + v2 = (std::locale *)this[1]; + v51 = a2; + v54 = -1; + v3 = this[9]; + v55 = -1; + v4 = this[4]; + v56 = -1LL; + v57 = -1; + v58 = -1; + v59 = -1LL; + v60 = -1; + v61 = -1; + v46 = v2; + if ( !v2 ) + { + v5 = 0; + if ( !v4 ) + goto LABEL_7; + goto LABEL_3; + } + v52 = (v2 - (std::locale *)v3) >> 1; + v53 = (v2 - (std::locale *)v3) >> 31; + v42 = (std::locale *)this[2]; + v54 = (v42 - (std::locale *)v3) >> 1; + v55 = (v42 - (std::locale *)v3) >> 31; + v5 = this[3]; + v56 = ((char *)v5 - (char *)v3) >> 1; + if ( v4 ) + { +LABEL_3: + v57 = ((char *)v4 - (char *)v3) >> 1; + v58 = ((char *)v4 - (char *)v3) >> 31; + v6 = this[5]; + v43 = (std::locale *)this[6]; + v59 = ((char *)v6 - (char *)v4) >> 1; + v60 = (v43 - (std::locale *)v3) >> 1; + v61 = (v43 - (std::locale *)v3) >> 31; + if ( v5 < v6 ) + v5 = v6; + } + if ( v5 ) + this[10] = (volatile signed __int32 *)(((char *)v5 - (char *)v3) >> 1); +LABEL_7: + v63 = -1; + v64 = -1; + v62 = this; + v65 = -1; + v7 = (volatile signed __int32 *)a2[1]; + v66 = -1; + v67 = -1LL; + v8 = a2[9]; + v9 = a2[4]; + v68 = -1; + v69 = -1; + v70 = -1LL; + v71 = -1; + v72 = -1; + if ( !v7 ) + { + v10 = 0; + if ( !v9 ) + goto LABEL_13; + goto LABEL_9; + } + v63 = ((int)v7 - v8) >> 1; + v64 = ((int)v7 - v8) >> 31; + v44 = (std::locale *)a2[2]; + v65 = ((int)v44 - v8) >> 1; + v66 = ((int)v44 - v8) >> 31; + v10 = a2[3]; + v67 = (int)(v10 - v8) >> 1; + if ( v9 ) + { +LABEL_9: + v68 = (v9 - v8) >> 1; + v69 = (v9 - v8) >> 31; + v11 = a2[5]; + v70 = (int)(v11 - v9) >> 1; + v45 = (std::locale *)a2[6]; + v71 = ((int)v45 - v8) >> 1; + v72 = ((int)v45 - v8) >> 31; + if ( v10 < v11 ) + v10 = v11; + } + if ( v10 ) + a2[10] = (int)(v10 - v8) >> 1; +LABEL_13: + this[1] = v7; + a2[1] = v46; + v12 = this[2]; + this[2] = (volatile signed __int32 *)a2[2]; + v13 = (volatile signed __int32 *)a2[3]; + a2[2] = v12; + v14 = this[3]; + this[3] = v13; + v15 = (volatile signed __int32 *)a2[4]; + a2[3] = v14; + v16 = this[4]; + this[4] = v15; + v17 = (volatile signed __int32 *)a2[5]; + a2[4] = v16; + v18 = this[5]; + this[5] = v17; + v19 = (volatile signed __int32 *)a2[6]; + a2[5] = v18; + v20 = this[6]; + this[6] = v19; + a2[6] = v20; + std::locale::locale((volatile signed __int32 **)&v50, this + 7, v38); + std::locale::operator=(this + 7, (volatile signed __int32 **)a2 + 7); + std::locale::operator=((volatile signed __int32 **)a2 + 7, (volatile signed __int32 **)&v50); + std::locale::~locale(&v50); + std::locale::locale((volatile signed __int32 **)&v48, (volatile signed __int32 **)a2 + 7, v39); + std::locale::locale((volatile signed __int32 **)&v49, this + 7, v40); + (*((void (__thiscall **)(volatile signed __int32 **, _DWORD **))*this + 2))(this, &v48); + std::locale::operator=(this + 7, (volatile signed __int32 **)&v48); + std::locale::locale((volatile signed __int32 **)&v50, (volatile signed __int32 **)a2 + 7, v41); + (*(void (__thiscall **)(_DWORD *, _DWORD **))(*a2 + 8))(a2, &v49); + std::locale::operator=((volatile signed __int32 **)a2 + 7, (volatile signed __int32 **)&v49); + std::locale::~locale(&v50); + std::locale::~locale(&v49); + std::locale::~locale(&v48); + v21 = this[8]; + this[8] = (volatile signed __int32 *)a2[8]; + a2[8] = v21; + std::wstring::swap(this + 9, a2 + 9); + v22 = v62; + v23 = v62[9]; + if ( (v63 & v64) != -1 ) + { + v24 = v67; + v25 = v65; + v62[1] = (volatile signed __int32 *)((char *)v23 + 2 * v63); + v22[2] = (volatile signed __int32 *)((char *)v23 + 2 * v25); + v22[3] = (volatile signed __int32 *)((char *)v23 + 2 * v24); + } + if ( (v68 & v69) != -1 ) + { + v26 = v70; + v27 = (volatile signed __int32 *)((char *)v23 + 2 * v71); + v28 = (volatile signed __int32 *)((char *)v23 + 2 * v68); + v29 = (unsigned int)v70 > 0x7FFFFFFF; + v22[4] = v28; + v22[6] = v27; + if ( v29 + HIDWORD(v26) > 0 ) + { + do + { + v28 = (volatile signed __int32 *)((char *)v28 - 2); + v26 -= 0x7FFFFFFFLL; + } + while ( v26 > 0x7FFFFFFF ); + } + v22[5] = (volatile signed __int32 *)((char *)v28 + 2 * v26); + } + v30 = v51; + v31 = v51[9]; + if ( (v52 & v53) != -1 ) + { + v32 = v56; + v33 = v54; + v51[1] = v31 + 2 * v52; + v30[2] = v31 + 2 * v33; + v30[3] = v31 + 2 * v32; + } + if ( (v57 & v58) != -1 ) + { + v34 = v60; + v35 = v59; + v36 = v31 + 2 * v57; + v30[4] = v36; + v30[6] = v31 + 2 * v34; + if ( v35 > 0x7FFFFFFF ) + { + v37 = v36 - 2; + do + { + v36 = v37; + v35 -= 0x7FFFFFFFLL; + v37 -= 2; + } + while ( v35 > 0x7FFFFFFF ); + } + v30[5] = v36 + 2 * v35; + } +} +// 4E4F81: variable 'v38' is possibly undefined +// 4E4FC9: variable 'v39' is possibly undefined +// 4E4FDC: variable 'v40' is possibly undefined +// 4E5027: variable 'v41' is possibly undefined + +//----- (004E5280) -------------------------------------------------------- +_DWORD *__thiscall std::wstringbuf::setbuf(_DWORD *this, _DWORD *a2, int a3) +{ + _WORD *v4; // eax + int v5; // ecx + + if ( !a2 || a3 < 0 ) + return this; + v4 = (_WORD *)this[9]; + this[10] = 0; + *v4 = 0; + std::wstringbuf::_M_sync(this, a2, a3, 0); + return (_DWORD *)v5; +} +// 4E52C7: variable 'v5' is possibly undefined + +//----- (004E52E0) -------------------------------------------------------- +_DWORD *__thiscall std::wstringbuf::_M_sync(_DWORD *this, _DWORD *a2, int a3, unsigned int a4) +{ + _DWORD *result; // eax + _DWORD *v5; // esi + int v6; // ebx + char *v7; // edx + int v8; // edi + char *v9; // edi + int v10; // esi + unsigned int v11; // edi + _DWORD *v12; // [esp+0h] [ebp-1Ch] + + result = a2; + v5 = (_DWORD *)this[9]; + v6 = this[8] & 0x10; + v7 = (char *)a2 + 2 * this[10]; + v12 = (_DWORD *)(this[8] & 8); + if ( v5 == this + 11 ) + v8 = 14; + else + v8 = 2 * this[11]; + v9 = (char *)a2 + v8; + if ( a2 != v5 ) + { + v10 = a3; + a3 = 0; + v7 += 2 * v10; + v9 = v7; + } + if ( v12 ) + { + this[1] = a2; + this[3] = v7; + this[2] = (char *)a2 + 2 * a3; + } + if ( v6 ) + { + this[6] = v9; + this[4] = a2; + if ( a4 > 0x7FFFFFFF ) + { + v11 = a4 - 0x7FFFFFFF; + if ( (((unsigned __int64)a4 - 0x7FFFFFFF) >> 32) | (a4 + 1) ) + { + result = (_DWORD *)((char *)a2 - 2); + } + else + { + result = a2 - 1; + v11 = 1; + } + a4 = v11; + } + this[5] = (char *)result + 2 * a4; + result = v12; + if ( !v12 ) + { + this[1] = v7; + this[2] = v7; + this[3] = v7; + } + } + return result; +} + +//----- (004E53D0) -------------------------------------------------------- +_DWORD *__thiscall std::wstringbuf::seekoff(_DWORD *this, int a2, __int64 a3, int a4, unsigned int a5) +{ + bool v5; // bl + int v6; // ebx + unsigned int v8; // eax + int v9; // edx + int v10; // edx + __int64 v11; // [esp+0h] [ebp-34h] + unsigned int v12; // [esp+8h] [ebp-2Ch] + unsigned __int8 v13; // [esp+8h] [ebp-2Ch] + __int64 v14; // [esp+8h] [ebp-2Ch] + __int16 v15; // [esp+1Dh] [ebp-17h] + char v16; // [esp+1Fh] [ebp-15h] + + *this = -1; + this[1] = -1; + this[2] = 0; + v11 = a3; + v5 = ((unsigned __int8)a5 & *(_BYTE *)(a2 + 32) & 8) != 0; + v12 = (a5 & *(_DWORD *)(a2 + 32)) >> 4; + LOBYTE(v15) = (a4 != 1) & v12 & v5; + v13 = v12 & ((a5 >> 3) ^ 1) & 1; + HIBYTE(v15) = v5 & ((a5 >> 4) ^ 1); + if ( HIBYTE(v15) ) + { + v6 = *(_DWORD *)(a2 + 4); + if ( !v6 && a3 ) + return this; + v16 = v15 | v13; + } + else + { + v6 = *(_DWORD *)(a2 + 16); + if ( !v6 && a3 ) + return this; + v16 = v13 | v15; + if ( !(v13 | (unsigned __int8)v15) ) + return this; + } + v8 = *(_DWORD *)(a2 + 20); + if ( v8 && v8 > *(_DWORD *)(a2 + 12) ) + { + if ( (*(_DWORD *)(a2 + 32) & 8) == 0 ) + { + *(_DWORD *)(a2 + 4) = v8; + *(_DWORD *)(a2 + 8) = v8; + } + *(_DWORD *)(a2 + 12) = v8; + } + if ( a4 == 1 ) + { + v14 = a3 + ((int)(v8 - v6) >> 1); + v11 = ((*(_DWORD *)(a2 + 8) - v6) >> 1) + a3; + } + else + { + v14 = a3; + if ( a4 == 2 ) + { + v11 = ((*(_DWORD *)(a2 + 12) - v6) >> 1) + a3; + v14 = v11; + } + } + if ( v15 && v11 >= 0 && (*(_DWORD *)(a2 + 12) - v6) >> 1 >= v11 ) + { + v10 = *(_DWORD *)(a2 + 4); + *(_QWORD *)this = v11; + this[2] = 0; + *(_DWORD *)(a2 + 8) = v10 + 2 * v11; + } + if ( v14 >= 0 && v16 && (*(_DWORD *)(a2 + 12) - v6) >> 1 >= v14 ) + { + v9 = *(_DWORD *)(a2 + 16); + *(_QWORD *)this = v14; + this[2] = 0; + *(_DWORD *)(a2 + 20) = v9 + 2 * v14; + } + return this; +} + +//----- (004E5610) -------------------------------------------------------- +_DWORD *__thiscall std::wstringbuf::seekpos(_DWORD *this, _DWORD *a2, __int64 a3, int a4, int a5, int a6) +{ + _DWORD *result; // eax + int v7; // ecx + int v8; // ebx + unsigned int v9; // ebp + int v10; // [esp+0h] [ebp-2Ch] + + result = this; + *this = -1; + this[1] = -1; + this[2] = 0; + v7 = a2[8] & 8; + v10 = a6 & a2[8]; + if ( (a6 & v7) != 0 ) + v8 = a2[1]; + else + v8 = a2[4]; + if ( (!a3 || v8) && (v10 & 0x18) != 0 ) + { + v9 = a2[5]; + if ( v9 && v9 > a2[3] ) + { + if ( !v7 ) + { + a2[1] = v9; + a2[2] = v9; + } + a2[3] = v9; + } + if ( a3 >= 0 && __SPAIR64__((a2[3] - v8) >> 31, (a2[3] - v8) >> 1) >= a3 ) + { + if ( (a6 & v7) != 0 ) + a2[2] = a2[1] + 2 * a3; + if ( (v10 & 0x10) != 0 ) + a2[5] = a2[4] + 2 * a3; + *(_QWORD *)result = a3; + result[2] = a4; + } + } + return result; +} + +//----- (004E5700) -------------------------------------------------------- +int __thiscall std::wstringbuf::_M_pbump(_DWORD *this, int a2, int a3, __int64 a4) +{ + __int64 v5; // rax + int v6; // ecx + int result; // eax + + v5 = a4; + this[6] = a3; + v6 = a2; + for ( this[4] = a2; v5 > 0x7FFFFFFF; v5 -= 0x7FFFFFFFLL ) + v6 -= 2; + result = v6 + 2 * v5; + this[5] = result; + return result; +} + +//----- (004E5760) -------------------------------------------------------- +int __thiscall std::wstringbuf::overflow(_DWORD *this, unsigned __int16 a2) +{ + _DWORD *v2; // ebx + unsigned int v3; // edx + unsigned int v4; // esi + _WORD *v5; // eax + unsigned int v6; // eax + char *v7; // edx + _WORD *v8; // eax + unsigned int v9; // edx + char *v11; // eax + int v12; // edx + int v13; // ecx + int v14; // edx + _DWORD *v15; // edi + char *v16; // eax + int v17; // [esp+1Ch] [ebp-7Ch] + int v18; // [esp+20h] [ebp-78h] + int v19; // [esp+20h] [ebp-78h] + int v20; // [esp+20h] [ebp-78h] + unsigned __int16 lpuexcpta; // [esp+28h] [ebp-70h] + void *Block; // [esp+68h] [ebp-30h] BYREF + int v24; // [esp+6Ch] [ebp-2Ch] + int v25[10]; // [esp+70h] [ebp-28h] BYREF + + v18 = this[8]; + if ( (v18 & 0x10) == 0 ) + return (unsigned __int16)-1; + if ( a2 == 0xFFFF ) + return 0; + v2 = (_DWORD *)this[9]; + if ( v2 == this + 11 ) + v3 = 7; + else + v3 = this[11]; + v4 = this[6]; + v5 = (_WORD *)this[5]; + v17 = this[4]; + if ( (int)(v4 - v17) >> 1 >= v3 ) + { + if ( v4 > (unsigned int)v5 ) + goto LABEL_22; + if ( v3 != 0x1FFFFFFF ) + { + if ( v4 <= (unsigned int)v5 ) + { + v24 = 0; + Block = v25; + v6 = 2 * v3; + LOWORD(v25[0]) = 0; + if ( 2 * v3 > 0x1FFFFFFF ) + v6 = 0x1FFFFFFF; + if ( v6 < 0x200 ) + v6 = 512; + std::wstring::reserve((int)&Block, v6); + v7 = (char *)this[4]; + v19 = v24; + if ( v7 ) + { + std::wstring::_M_replace((unsigned int **)&Block, 0, v24, v7, (this[6] - (int)v7) >> 1); + v19 = v24; + } + v8 = Block; + v9 = 7; + if ( Block != v25 ) + v9 = v25[0]; + if ( v19 + 1 > v9 ) + { + std::wstring::_M_mutate((int)&Block, v19, 0, 0, 1); + v8 = Block; + } + v8[v19] = a2; + v24 = v19 + 1; + v8[v19 + 1] = 0; + std::wstring::swap(this + 9, &Block); + std::wstringbuf::_M_sync(this, (_DWORD *)this[9], (this[2] - this[1]) >> 1, (this[5] - this[4]) >> 1); + if ( Block != v25 ) + operator delete(Block); + v5 = (_WORD *)this[5]; + goto LABEL_23; + } +LABEL_22: + *v5 = a2; +LABEL_23: + this[5] = v5 + 1; + return a2; + } + return (unsigned __int16)-1; + } + v11 = (char *)v5 + (_DWORD)v2 - v17; + this[4] = v2; + this[6] = (char *)v2 + 2 * v3; + this[5] = v11; + if ( (v18 & 8) != 0 ) + { + v12 = this[1]; + this[1] = v2; + v20 = v12; + v13 = (int)v2 + this[3] - v12 + 2; + v14 = this[2]; + this[3] = v13; + this[2] = (char *)v2 + v14 - v20; + } + v15 = this; + v16 = v11 + 2; + *((_WORD *)v16 - 1) = a2; + lpuexcpta = a2; + v15[5] = v16; + return lpuexcpta; +} + +//----- (004E5A50) -------------------------------------------------------- +int __thiscall std::wstringbuf::pbackfail(int this, int a2) +{ + unsigned int v2; // eax + int v3; // edx + int v4; // esi + + v2 = *(_DWORD *)(this + 8); + v3 = -1; + if ( v2 <= *(_DWORD *)(this + 4) ) + return v3; + if ( (_WORD)a2 == 0xFFFF ) + { + *(_DWORD *)(this + 8) = v2 - 2; + return 0; + } + v4 = *(unsigned __int16 *)(v2 - 2); + if ( (*(_BYTE *)(this + 32) & 0x10) == 0 && (_WORD)v4 != (_WORD)a2 ) + return v3; + *(_DWORD *)(this + 8) = v2 - 2; + v3 = v4; + if ( (_WORD)v4 == (_WORD)a2 ) + return v3; + *(_WORD *)(v2 - 2) = a2; + return a2; +} + +//----- (004E5AB0) -------------------------------------------------------- +int __fastcall std::wstringbuf::showmanyc(int a1) +{ + unsigned int v1; // edx + unsigned int v2; // eax + + if ( (*(_BYTE *)(a1 + 32) & 8) == 0 ) + return -1; + v1 = *(_DWORD *)(a1 + 20); + v2 = *(_DWORD *)(a1 + 12); + if ( v1 ) + { + if ( v1 > v2 ) + { + *(_DWORD *)(a1 + 12) = v1; + v2 = v1; + } + } + return (int)(v2 - *(_DWORD *)(a1 + 8)) >> 1; +} + +//----- (004E5AE0) -------------------------------------------------------- +int __fastcall std::wstringbuf::underflow(int a1) +{ + unsigned int v2; // eax + unsigned int v3; // edx + unsigned __int16 *v4; // eax + + if ( (*(_BYTE *)(a1 + 32) & 8) == 0 ) + return -1; + v2 = *(_DWORD *)(a1 + 20); + v3 = *(_DWORD *)(a1 + 12); + if ( v2 ) + { + if ( v2 > v3 ) + { + *(_DWORD *)(a1 + 12) = v2; + v3 = v2; + } + } + v4 = *(unsigned __int16 **)(a1 + 8); + if ( (unsigned int)v4 < v3 ) + return *v4; + else + return -1; +} + +//----- (004E5B20) -------------------------------------------------------- +void __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, std::locale *a2) +{ + int v2; // edx + unsigned int v3; // eax + int v4; // ecx + int v5; // eax + char *v6; // esi + std::locale *v7; // eax + int v8; // ecx + int v9; // ebx + char *v10; // ecx + int v11; // edx + const std::locale *v12; // [esp+4h] [ebp-A4h] + int v15; // [esp+60h] [ebp-48h] + int v16; // [esp+64h] [ebp-44h] + int v17; // [esp+68h] [ebp-40h] + __int64 v18; // [esp+70h] [ebp-38h] + int v19; // [esp+78h] [ebp-30h] + int v20; // [esp+7Ch] [ebp-2Ch] + int v21; // [esp+80h] [ebp-28h] + int v22; // [esp+88h] [ebp-20h] + + v15 = -1; + v16 = -1; + v17 = -1; + v2 = *((_DWORD *)a2 + 9); + v3 = *((_DWORD *)a2 + 1); + LODWORD(v18) = -1; + v19 = -1; + v20 = -1; + v21 = -1; + v22 = -1; + if ( !v3 ) + { + v4 = *((_DWORD *)a2 + 4); + if ( !v4 ) + goto LABEL_7; + goto LABEL_3; + } + v15 = (int)(v3 - v2) >> 1; + v16 = (int)(v3 - v2) >> 31; + v17 = (*((_DWORD *)a2 + 2) - v2) >> 1; + v3 = *((_DWORD *)a2 + 3); + v18 = (int)(v3 - v2) >> 1; + v4 = *((_DWORD *)a2 + 4); + if ( v4 ) + { +LABEL_3: + v19 = (v4 - v2) >> 1; + v20 = (v4 - v2) >> 31; + v21 = (*((_DWORD *)a2 + 5) - v4) >> 1; + v22 = (*((_DWORD *)a2 + 6) - v2) >> 1; + if ( v3 < *((_DWORD *)a2 + 5) ) + v3 = *((_DWORD *)a2 + 5); + } + if ( v3 ) + *((_DWORD *)a2 + 10) = (int)(v3 - v2) >> 1; +LABEL_7: + std::wstreambuf::basic_streambuf(this, a2, v12); + v5 = *((_DWORD *)a2 + 8); + *this = &off_51A318; + this[9] = this + 11; + this[8] = v5; + v6 = (char *)a2 + 44; + v7 = (std::locale *)*((_DWORD *)a2 + 9); + if ( v7 == (std::locale *)((char *)a2 + 44) ) + { + this[11] = *((_DWORD *)a2 + 11); + this[12] = *((_DWORD *)a2 + 12); + this[13] = *((_DWORD *)a2 + 13); + this[14] = *((_DWORD *)a2 + 14); + } + else + { + this[9] = v7; + this[11] = *((_DWORD *)a2 + 11); + } + this[10] = *((_DWORD *)a2 + 10); + *((_DWORD *)a2 + 9) = v6; + *((_WORD *)a2 + 22) = 0; + v8 = this[9]; + *((_DWORD *)a2 + 10) = 0; + if ( (v15 & v16) != -1 ) + { + this[1] = v8 + 2 * v15; + this[2] = v8 + 2 * v17; + this[3] = v8 + 2 * v18; + } + if ( (v19 & v20) != -1 ) + { + v9 = v8 + 2 * v19; + this[6] = v8 + 2 * v22; + this[4] = v9; + this[5] = v9 + 2 * v21; + } + v10 = (char *)a2 + 58; + v11 = *((_DWORD *)a2 + 8) & 0x10; + if ( (*((_DWORD *)a2 + 8) & 8) != 0 ) + { + *((_DWORD *)a2 + 1) = v6; + *((_DWORD *)a2 + 2) = v6; + *((_DWORD *)a2 + 3) = v6; + if ( v11 ) + { + *((_DWORD *)a2 + 5) = v6; + *((_DWORD *)a2 + 4) = v6; + *((_DWORD *)a2 + 6) = v10; + } + } + else if ( v11 ) + { + *((_DWORD *)a2 + 5) = v6; + *((_DWORD *)a2 + 4) = v6; + *((_DWORD *)a2 + 6) = v10; + *((_DWORD *)a2 + 1) = v6; + *((_DWORD *)a2 + 2) = v6; + *((_DWORD *)a2 + 3) = v6; + } +} +// 4E5D4C: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4E5C78: variable 'v12' is possibly undefined +// 51A318: using guessed type int (*off_51A318)(); + +//----- (004E5E50) -------------------------------------------------------- +int __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, std::locale **a2, int a3) +{ + std::locale *v4; // eax + std::locale **v5; // edx + std::locale *v6; // edx + int result; // eax + const std::locale *v8; // [esp+4h] [ebp-18h] + + std::wstreambuf::basic_streambuf(this, (std::locale *)a2, v8); + v4 = a2[8]; + *this = &off_51A318; + this[9] = this + 11; + v5 = (std::locale **)a2[9]; + this[8] = v4; + if ( v5 == a2 + 11 ) + { + this[11] = a2[11]; + this[12] = a2[12]; + this[13] = a2[13]; + this[14] = a2[14]; + } + else + { + this[9] = v5; + this[11] = a2[11]; + } + v6 = a2[10]; + a2[9] = (std::locale *)(a2 + 11); + result = 0; + a2[10] = 0; + this[10] = v6; + *((_WORD *)a2 + 22) = 0; + return result; +} +// 4E5E5E: variable 'v8' is possibly undefined +// 51A318: using guessed type int (*off_51A318)(); + +//----- (004E5ED0) -------------------------------------------------------- +void __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, int a2, int a3) +{ + int v3; // edx + _WORD *v4; // eax + unsigned int v5; // eax + + *this = &off_51AE14; + this[1] = 0; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + std::locale::locale(this + 7); + v3 = *(_DWORD *)(a2 + 4); + v4 = *(_WORD **)a2; + *this = &off_51A318; + this[8] = 0; + this[9] = this + 11; + std::wstring::_M_construct(this + 9, v4, (int)&v4[v3]); + this[8] = a3; + v5 = 0; + if ( (a3 & 3) != 0 ) + v5 = this[10]; + std::wstringbuf::_M_sync(this, (_DWORD *)this[9], 0, v5); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004E5FF0) -------------------------------------------------------- +int __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, int a2) +{ + _DWORD *v3; // ecx + int result; // eax + + v3 = this + 7; + *(v3 - 7) = &off_51AE14; + *(v3 - 6) = 0; + *(v3 - 5) = 0; + *(v3 - 4) = 0; + *(v3 - 3) = 0; + *(v3 - 2) = 0; + *(v3 - 1) = 0; + std::locale::locale(v3); + *this = &off_51A318; + this[10] = 0; + this[8] = a2; + this[9] = this + 11; + result = 0; + *((_WORD *)this + 22) = 0; + return result; +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004E6060) -------------------------------------------------------- +int __fastcall std::wstringbuf::basic_stringbuf(int a1) +{ + _DWORD *v2; // ecx + int result; // eax + + v2 = (_DWORD *)(a1 + 28); + *(v2 - 7) = &off_51AE14; + *(v2 - 6) = 0; + *(v2 - 5) = 0; + *(v2 - 4) = 0; + *(v2 - 3) = 0; + *(v2 - 2) = 0; + *(v2 - 1) = 0; + std::locale::locale(v2); + *(_DWORD *)a1 = &off_51A318; + *(_DWORD *)(a1 + 36) = a1 + 44; + result = 0; + *(_DWORD *)(a1 + 32) = 24; + *(_DWORD *)(a1 + 40) = 0; + *(_WORD *)(a1 + 44) = 0; + return result; +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004E60D0) -------------------------------------------------------- +void __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, std::locale *a2) +{ + int v2; // edx + unsigned int v3; // eax + int v4; // ecx + int v5; // eax + char *v6; // esi + std::locale *v7; // eax + int v8; // ecx + int v9; // ebx + char *v10; // ecx + int v11; // edx + const std::locale *v12; // [esp+4h] [ebp-A4h] + int v15; // [esp+60h] [ebp-48h] + int v16; // [esp+64h] [ebp-44h] + int v17; // [esp+68h] [ebp-40h] + __int64 v18; // [esp+70h] [ebp-38h] + int v19; // [esp+78h] [ebp-30h] + int v20; // [esp+7Ch] [ebp-2Ch] + int v21; // [esp+80h] [ebp-28h] + int v22; // [esp+88h] [ebp-20h] + + v15 = -1; + v16 = -1; + v17 = -1; + v2 = *((_DWORD *)a2 + 9); + v3 = *((_DWORD *)a2 + 1); + LODWORD(v18) = -1; + v19 = -1; + v20 = -1; + v21 = -1; + v22 = -1; + if ( !v3 ) + { + v4 = *((_DWORD *)a2 + 4); + if ( !v4 ) + goto LABEL_7; + goto LABEL_3; + } + v15 = (int)(v3 - v2) >> 1; + v16 = (int)(v3 - v2) >> 31; + v17 = (*((_DWORD *)a2 + 2) - v2) >> 1; + v3 = *((_DWORD *)a2 + 3); + v18 = (int)(v3 - v2) >> 1; + v4 = *((_DWORD *)a2 + 4); + if ( v4 ) + { +LABEL_3: + v19 = (v4 - v2) >> 1; + v20 = (v4 - v2) >> 31; + v21 = (*((_DWORD *)a2 + 5) - v4) >> 1; + v22 = (*((_DWORD *)a2 + 6) - v2) >> 1; + if ( v3 < *((_DWORD *)a2 + 5) ) + v3 = *((_DWORD *)a2 + 5); + } + if ( v3 ) + *((_DWORD *)a2 + 10) = (int)(v3 - v2) >> 1; +LABEL_7: + std::wstreambuf::basic_streambuf(this, a2, v12); + v5 = *((_DWORD *)a2 + 8); + *this = &off_51A318; + this[9] = this + 11; + this[8] = v5; + v6 = (char *)a2 + 44; + v7 = (std::locale *)*((_DWORD *)a2 + 9); + if ( v7 == (std::locale *)((char *)a2 + 44) ) + { + this[11] = *((_DWORD *)a2 + 11); + this[12] = *((_DWORD *)a2 + 12); + this[13] = *((_DWORD *)a2 + 13); + this[14] = *((_DWORD *)a2 + 14); + } + else + { + this[9] = v7; + this[11] = *((_DWORD *)a2 + 11); + } + this[10] = *((_DWORD *)a2 + 10); + *((_DWORD *)a2 + 9) = v6; + *((_WORD *)a2 + 22) = 0; + v8 = this[9]; + *((_DWORD *)a2 + 10) = 0; + if ( (v15 & v16) != -1 ) + { + this[1] = v8 + 2 * v15; + this[2] = v8 + 2 * v17; + this[3] = v8 + 2 * v18; + } + if ( (v19 & v20) != -1 ) + { + v9 = v8 + 2 * v19; + this[6] = v8 + 2 * v22; + this[4] = v9; + this[5] = v9 + 2 * v21; + } + v10 = (char *)a2 + 58; + v11 = *((_DWORD *)a2 + 8) & 0x10; + if ( (*((_DWORD *)a2 + 8) & 8) != 0 ) + { + *((_DWORD *)a2 + 1) = v6; + *((_DWORD *)a2 + 2) = v6; + *((_DWORD *)a2 + 3) = v6; + if ( v11 ) + { + *((_DWORD *)a2 + 5) = v6; + *((_DWORD *)a2 + 4) = v6; + *((_DWORD *)a2 + 6) = v10; + } + } + else if ( v11 ) + { + *((_DWORD *)a2 + 5) = v6; + *((_DWORD *)a2 + 4) = v6; + *((_DWORD *)a2 + 6) = v10; + *((_DWORD *)a2 + 1) = v6; + *((_DWORD *)a2 + 2) = v6; + *((_DWORD *)a2 + 3) = v6; + } +} +// 4E62FC: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4E6228: variable 'v12' is possibly undefined +// 51A318: using guessed type int (*off_51A318)(); + +//----- (004E6400) -------------------------------------------------------- +int __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, std::locale **a2, int a3) +{ + std::locale *v4; // eax + std::locale **v5; // edx + std::locale *v6; // edx + int result; // eax + const std::locale *v8; // [esp+4h] [ebp-18h] + + std::wstreambuf::basic_streambuf(this, (std::locale *)a2, v8); + v4 = a2[8]; + *this = &off_51A318; + this[9] = this + 11; + v5 = (std::locale **)a2[9]; + this[8] = v4; + if ( v5 == a2 + 11 ) + { + this[11] = a2[11]; + this[12] = a2[12]; + this[13] = a2[13]; + this[14] = a2[14]; + } + else + { + this[9] = v5; + this[11] = a2[11]; + } + v6 = a2[10]; + a2[9] = (std::locale *)(a2 + 11); + result = 0; + a2[10] = 0; + this[10] = v6; + *((_WORD *)a2 + 22) = 0; + return result; +} +// 4E640E: variable 'v8' is possibly undefined +// 51A318: using guessed type int (*off_51A318)(); + +//----- (004E6480) -------------------------------------------------------- +void __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, int a2, int a3) +{ + int v3; // edx + _WORD *v4; // eax + unsigned int v5; // eax + + *this = &off_51AE14; + this[1] = 0; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + std::locale::locale(this + 7); + v3 = *(_DWORD *)(a2 + 4); + v4 = *(_WORD **)a2; + *this = &off_51A318; + this[8] = 0; + this[9] = this + 11; + std::wstring::_M_construct(this + 9, v4, (int)&v4[v3]); + this[8] = a3; + v5 = 0; + if ( (a3 & 3) != 0 ) + v5 = this[10]; + std::wstringbuf::_M_sync(this, (_DWORD *)this[9], 0, v5); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004E65A0) -------------------------------------------------------- +int __thiscall std::wstringbuf::basic_stringbuf(_DWORD *this, int a2) +{ + _DWORD *v3; // ecx + int result; // eax + + v3 = this + 7; + *(v3 - 7) = &off_51AE14; + *(v3 - 6) = 0; + *(v3 - 5) = 0; + *(v3 - 4) = 0; + *(v3 - 3) = 0; + *(v3 - 2) = 0; + *(v3 - 1) = 0; + std::locale::locale(v3); + *this = &off_51A318; + this[10] = 0; + this[8] = a2; + this[9] = this + 11; + result = 0; + *((_WORD *)this + 22) = 0; + return result; +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004E6610) -------------------------------------------------------- +int __fastcall std::wstringbuf::basic_stringbuf(int a1) +{ + _DWORD *v2; // ecx + int result; // eax + + v2 = (_DWORD *)(a1 + 28); + *(v2 - 7) = &off_51AE14; + *(v2 - 6) = 0; + *(v2 - 5) = 0; + *(v2 - 4) = 0; + *(v2 - 3) = 0; + *(v2 - 2) = 0; + *(v2 - 1) = 0; + std::locale::locale(v2); + *(_DWORD *)a1 = &off_51A318; + *(_DWORD *)(a1 + 36) = a1 + 44; + result = 0; + *(_DWORD *)(a1 + 32) = 24; + *(_DWORD *)(a1 + 40) = 0; + *(_WORD *)(a1 + 44) = 0; + return result; +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004E6680) -------------------------------------------------------- +void __fastcall std::wstringbuf::~wstringbuf(_DWORD *Block) +{ + _DWORD *v2; // eax + + v2 = (_DWORD *)Block[9]; + *Block = &off_51A318; + if ( v2 != Block + 11 ) + operator delete(v2); + *Block = &off_51AE14; + std::locale::~locale((_DWORD **)Block + 7); + operator delete(Block); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004E66C0) -------------------------------------------------------- +void __fastcall std::wstringbuf::~wstringbuf(int a1) +{ + void *Block; // eax + + Block = *(void **)(a1 + 36); + *(_DWORD *)a1 = &off_51A318; + if ( Block != (void *)(a1 + 44) ) + operator delete(Block); + *(_DWORD *)a1 = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 28)); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004E66F0) -------------------------------------------------------- +_DWORD *__thiscall std::wstringbuf::operator=(_DWORD *this, int a2) +{ + int v2; // ecx + int v3; // edx + unsigned int v4; // eax + unsigned int v5; // ebx + int v6; // edi + _WORD *v7; // eax + int v8; // edx + int v9; // ecx + int v10; // ebx + int v11; // esi + int v12; // edx + int v13; // ebx + int v14; // ecx + int v15; // edx + _WORD *v16; // edx + _DWORD *v17; // esi + int v18; // ecx + int v19; // edx + int v20; // ebx + int v21; // edi + __int64 v22; // rax + int v23; // ebx + int v24; // ecx + _WORD *v26; // ebx + int v27; // edx + int v28; // ecx + const std::locale *v29; // [esp+4h] [ebp-A4h] + const std::locale *v30; // [esp+4h] [ebp-A4h] + void *Srca; // [esp+14h] [ebp-94h] + _WORD *Src; // [esp+14h] [ebp-94h] + _DWORD *v34; // [esp+50h] [ebp-58h] BYREF + _DWORD *v35; // [esp+54h] [ebp-54h] BYREF + _DWORD *v36; // [esp+58h] [ebp-50h] + int v37; // [esp+60h] [ebp-48h] + int v38; // [esp+64h] [ebp-44h] + int v39; // [esp+68h] [ebp-40h] + int v40; // [esp+6Ch] [ebp-3Ch] + __int64 v41; // [esp+70h] [ebp-38h] + int v42; // [esp+78h] [ebp-30h] + int v43; // [esp+7Ch] [ebp-2Ch] + __int64 v44; // [esp+80h] [ebp-28h] + int v45; // [esp+88h] [ebp-20h] + int v46; // [esp+8Ch] [ebp-1Ch] + + v37 = -1; + v38 = -1; + v36 = this; + v39 = -1; + v2 = *(_DWORD *)(a2 + 16); + v3 = *(_DWORD *)(a2 + 36); + v4 = *(_DWORD *)(a2 + 4); + v40 = -1; + v41 = -1LL; + v42 = -1; + v43 = -1; + v44 = -1LL; + v45 = -1; + v46 = -1; + if ( !v4 ) + { + if ( !v2 ) + goto LABEL_7; + goto LABEL_3; + } + v37 = (int)(v4 - v3) >> 1; + v38 = (int)(v4 - v3) >> 31; + Srca = *(void **)(a2 + 8); + v39 = ((int)Srca - v3) >> 1; + v40 = ((int)Srca - v3) >> 31; + v4 = *(_DWORD *)(a2 + 12); + v41 = (int)(v4 - v3) >> 1; + if ( v2 ) + { +LABEL_3: + v42 = (v2 - v3) >> 1; + v43 = (v2 - v3) >> 31; + v5 = *(_DWORD *)(a2 + 20); + LODWORD(v44) = (int)(v5 - v2) >> 1; + v6 = *(_DWORD *)(a2 + 24); + v44 = (int)v44; + v45 = (v6 - v3) >> 1; + v46 = (v6 - v3) >> 31; + if ( v4 < v5 ) + v4 = v5; + } + if ( v4 ) + *(_DWORD *)(a2 + 40) = (int)(v4 - v3) >> 1; +LABEL_7: + std::wstreambuf::operator=((volatile signed __int32 **)this, a2); + std::locale::locale((volatile signed __int32 **)&v34, (volatile signed __int32 **)(a2 + 28), v29); + std::locale::locale((volatile signed __int32 **)&v35, (volatile signed __int32 **)this + 7, v30); + (*(void (__thiscall **)(_DWORD *, _DWORD **))(*this + 8))(this, &v34); + std::locale::operator=((volatile signed __int32 **)this + 7, (volatile signed __int32 **)&v34); + std::locale::~locale(&v35); + std::locale::~locale(&v34); + this[8] = *(_DWORD *)(a2 + 32); + v7 = (_WORD *)this[9]; + v8 = *(_DWORD *)(a2 + 36); + Src = (_WORD *)(a2 + 44); + if ( v8 != a2 + 44 ) + { + v9 = *(_DWORD *)(a2 + 44); + v10 = *(_DWORD *)(a2 + 40); + if ( v7 == (_WORD *)(this + 11) ) + { + this[9] = v8; + this[10] = v10; + this[11] = v9; + } + else + { + v11 = this[11]; + this[9] = v8; + this[10] = v10; + this[11] = v9; + if ( v7 ) + { + *(_DWORD *)(a2 + 36) = v7; + *(_DWORD *)(a2 + 44) = v11; + goto LABEL_11; + } + } + v7 = (_WORD *)(a2 + 44); + *(_WORD *)(a2 + 44) = 0; + *(_DWORD *)(a2 + 36) = Src; + *(_DWORD *)(a2 + 40) = 0; + v14 = *(_DWORD *)(a2 + 32) & 0x10; + v16 = (_WORD *)(a2 + 58); + if ( (*(_DWORD *)(a2 + 32) & 8) != 0 ) + goto LABEL_14; + goto LABEL_26; + } + v26 = (_WORD *)(a2 + 44); + v27 = *(_DWORD *)(a2 + 40); + v28 = v27; + if ( v27 ) + { + if ( v27 == 1 ) + { + *v7 = *(_WORD *)(a2 + 44); + v28 = 1; + } + else + { + memcpy(v7, Src, 2 * v27); + v27 = *(_DWORD *)(a2 + 40); + v26 = *(_WORD **)(a2 + 36); + v7 = (_WORD *)this[9]; + v28 = v27; + } + } + this[10] = v27; + v7[v28] = 0; + v7 = v26; +LABEL_11: + *(_DWORD *)(a2 + 40) = 0; + v12 = *(_DWORD *)(a2 + 32); + *v7 = 0; + v13 = v12 & 8; + v14 = v12 & 0x10; + if ( v7 == Src ) + v15 = 7; + else + v15 = *(_DWORD *)(a2 + 44); + v16 = &v7[v15]; + if ( v13 ) + { +LABEL_14: + *(_DWORD *)(a2 + 4) = v7; + *(_DWORD *)(a2 + 8) = v7; + *(_DWORD *)(a2 + 12) = v7; + if ( v14 ) + { + *(_DWORD *)(a2 + 20) = v7; + *(_DWORD *)(a2 + 16) = v7; + *(_DWORD *)(a2 + 24) = v16; + } + goto LABEL_16; + } +LABEL_26: + if ( v14 ) + { + *(_DWORD *)(a2 + 20) = v7; + *(_DWORD *)(a2 + 16) = v7; + *(_DWORD *)(a2 + 24) = v16; + *(_DWORD *)(a2 + 4) = v7; + *(_DWORD *)(a2 + 8) = v7; + *(_DWORD *)(a2 + 12) = v7; + } +LABEL_16: + v17 = v36; + v18 = v36[9]; + if ( (v37 & v38) != -1 ) + { + v19 = v41; + v20 = v39; + v36[1] = v18 + 2 * v37; + v17[2] = v18 + 2 * v20; + v17[3] = v18 + 2 * v19; + } + if ( (v42 & v43) != -1 ) + { + v21 = v45; + v22 = v44; + v23 = v18 + 2 * v42; + v17[4] = v23; + v17[6] = v18 + 2 * v21; + if ( v22 > 0x7FFFFFFF ) + { + v24 = v23 - 2; + do + { + v23 = v24; + v22 -= 0x7FFFFFFFLL; + v24 -= 2; + } + while ( v22 > 0x7FFFFFFF ); + } + v17[5] = v23 + 2 * v22; + } + return this; +} +// 4E6858: variable 'v29' is possibly undefined +// 4E6877: variable 'v30' is possibly undefined + +//----- (004E6B80) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A650; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A358; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51A358: using guessed type int (*off_51A358)(); +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004E6CC0) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + std::messages_byname::messages_byname(this, (int **)*a2, a3); +} + +//----- (004E6CD0) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A650; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A358; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51A358: using guessed type int (*off_51A358)(); +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004E6E10) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + std::messages_byname::messages_byname(this, (int **)*a2, a3); +} + +//----- (004E6E20) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51A650; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4E6E5E: variable 'lpfctx' is possibly undefined +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004E6E80) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A650; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4E6EBE: variable 'lpfctx' is possibly undefined +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004E6EE0) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A650; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4E6F1E: variable 'lpfctx' is possibly undefined +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004E6F40) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A66C; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A374; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51A374: using guessed type int (*off_51A374)(); +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004E7080) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + std::messages_byname::messages_byname(this, (int **)*a2, a3); +} + +//----- (004E7090) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A66C; + this[2] = std::locale::facet::_S_get_c_locale(); + *this = &off_51A374; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(this + 2)); + std::locale::facet::_S_create_c_locale((std::locale::facet *)(this + 2), a2); + } + } +} +// 51A374: using guessed type int (*off_51A374)(); +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004E71D0) -------------------------------------------------------- +void __thiscall std::messages_byname::messages_byname(_DWORD *this, int **a2, int a3) +{ + std::messages_byname::messages_byname(this, (int **)*a2, a3); +} + +//----- (004E71E0) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51A66C; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4E721E: variable 'lpfctx' is possibly undefined +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004E7240) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A66C; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4E727E: variable 'lpfctx' is possibly undefined +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004E72A0) -------------------------------------------------------- +void __fastcall std::messages_byname::~messages_byname(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A66C; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4E72DE: variable 'lpfctx' is possibly undefined +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004E7300) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A688; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51A390; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::numpunct::_M_initialize_numpunct(this, v4[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A390: using guessed type int (*off_51A390)(); +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004E7440) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **a2, int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A688; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51A390; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::numpunct::_M_initialize_numpunct(this, v5[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A390: using guessed type int (*off_51A390)(); +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004E7590) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A688; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51A390; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::numpunct::_M_initialize_numpunct(this, v4[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A390: using guessed type int (*off_51A390)(); +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004E76D0) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **a2, int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A688; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51A390; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::numpunct::_M_initialize_numpunct(this, v5[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A390: using guessed type int (*off_51A390)(); +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004E7820) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *Block) +{ + *Block = &off_51A390; + std::numpunct::~numpunct(Block); + operator delete(Block); +} +// 51A390: using guessed type int (*off_51A390)(); + +//----- (004E7840) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *a1) +{ + *a1 = &off_51A390; + std::numpunct::~numpunct(a1); +} +// 51A390: using guessed type int (*off_51A390)(); + +//----- (004E7850) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *a1) +{ + *a1 = &off_51A390; + std::numpunct::~numpunct(a1); +} +// 51A390: using guessed type int (*off_51A390)(); + +//----- (004E7860) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A6AC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51A3B4; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::numpunct::_M_initialize_numpunct(this, v4[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A3B4: using guessed type int (*off_51A3B4)(); +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004E79A0) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **a2, int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A6AC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51A3B4; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::numpunct::_M_initialize_numpunct(this, v5[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A3B4: using guessed type int (*off_51A3B4)(); +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004E7AF0) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A6AC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51A3B4; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::numpunct::_M_initialize_numpunct(this, v4[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A3B4: using guessed type int (*off_51A3B4)(); +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004E7C30) -------------------------------------------------------- +void __thiscall std::numpunct_byname::numpunct_byname(_DWORD *this, struct _Unwind_Exception **a2, int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A6AC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); + *this = &off_51A3B4; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::numpunct::_M_initialize_numpunct(this, v5[0]); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A3B4: using guessed type int (*off_51A3B4)(); +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004E7D80) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *Block) +{ + *Block = &off_51A3B4; + std::numpunct::~numpunct(Block); + operator delete(Block); +} +// 51A3B4: using guessed type int (*off_51A3B4)(); + +//----- (004E7DA0) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *a1) +{ + *a1 = &off_51A3B4; + std::numpunct::~numpunct(a1); +} +// 51A3B4: using guessed type int (*off_51A3B4)(); + +//----- (004E7DB0) -------------------------------------------------------- +void __fastcall std::numpunct_byname::~numpunct_byname(_DWORD *a1) +{ + *a1 = &off_51A3B4; + std::numpunct::~numpunct(a1); +} +// 51A3B4: using guessed type int (*off_51A3B4)(); + +//----- (004E7DC0) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51A3D8; + result = a3 != 0; + this[1] = result; + return result; +} +// 51A3D8: using guessed type int (*off_51A3D8)(); + +//----- (004E7DE0) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51A3D8; + result = a3 != 0; + this[1] = result; + return result; +} +// 51A3D8: using guessed type int (*off_51A3D8)(); + +//----- (004E7E00) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51A3D8; + result = a3 != 0; + this[1] = result; + return result; +} +// 51A3D8: using guessed type int (*off_51A3D8)(); + +//----- (004E7E20) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51A3D8; + result = a3 != 0; + this[1] = result; + return result; +} +// 51A3D8: using guessed type int (*off_51A3D8)(); + +//----- (004E7E40) -------------------------------------------------------- +void __fastcall std::time_get_byname>::~time_get_byname(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51A6D0; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4E7E4C: variable 'Blocka' is possibly undefined +// 51A6D0: using guessed type int (*off_51A6D0)(); + +//----- (004E7E60) -------------------------------------------------------- +void __cdecl std::time_get_byname>::~time_get_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A6D0; + std::locale::facet::~facet(a1); +} +// 4E7E60: variable 'v1' is possibly undefined +// 51A6D0: using guessed type int (*off_51A6D0)(); + +//----- (004E7E70) -------------------------------------------------------- +void __cdecl std::time_get_byname>::~time_get_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A6D0; + std::locale::facet::~facet(a1); +} +// 4E7E70: variable 'v1' is possibly undefined +// 51A6D0: using guessed type int (*off_51A6D0)(); + +//----- (004E7E80) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51A404; + result = a3 != 0; + this[1] = result; + return result; +} +// 51A404: using guessed type int (*off_51A404)(); + +//----- (004E7EA0) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51A404; + result = a3 != 0; + this[1] = result; + return result; +} +// 51A404: using guessed type int (*off_51A404)(); + +//----- (004E7EC0) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51A404; + result = a3 != 0; + this[1] = result; + return result; +} +// 51A404: using guessed type int (*off_51A404)(); + +//----- (004E7EE0) -------------------------------------------------------- +BOOL __thiscall std::time_get_byname>::time_get_byname( + _DWORD *this, + int a2, + int a3) +{ + BOOL result; // eax + + *this = &off_51A404; + result = a3 != 0; + this[1] = result; + return result; +} +// 51A404: using guessed type int (*off_51A404)(); + +//----- (004E7F00) -------------------------------------------------------- +void __fastcall std::time_get_byname>::~time_get_byname(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51A6FC; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4E7F0C: variable 'Blocka' is possibly undefined +// 51A6FC: using guessed type int (*off_51A6FC)(); + +//----- (004E7F20) -------------------------------------------------------- +void __cdecl std::time_get_byname>::~time_get_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A6FC; + std::locale::facet::~facet(a1); +} +// 4E7F20: variable 'v1' is possibly undefined +// 51A6FC: using guessed type int (*off_51A6FC)(); + +//----- (004E7F30) -------------------------------------------------------- +void __cdecl std::time_get_byname>::~time_get_byname(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A6FC; + std::locale::facet::~facet(a1); +} +// 4E7F30: variable 'v1' is possibly undefined +// 51A6FC: using guessed type int (*off_51A6FC)(); + +//----- (004E7F40) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A1D0; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A430; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A430: using guessed type int (*off_51A430)(); + +//----- (004E8090) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A1D0; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A430; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A430: using guessed type int (*off_51A430)(); + +//----- (004E81F0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A1D0; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A430; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A430: using guessed type int (*off_51A430)(); + +//----- (004E8340) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A1D0; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A430; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A1D0: using guessed type int (__cdecl *off_51A1D0)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A430: using guessed type int (*off_51A430)(); + +//----- (004E84A0) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block) +{ + *Block = &off_51A430; + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 51A430: using guessed type int (*off_51A430)(); + +//----- (004E84C0) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51A430; + std::moneypunct::~moneypunct(a1); +} +// 51A430: using guessed type int (*off_51A430)(); + +//----- (004E84D0) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51A430; + std::moneypunct::~moneypunct(a1); +} +// 51A430: using guessed type int (*off_51A430)(); + +//----- (004E84E0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A204; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A464; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A464: using guessed type int (*off_51A464)(); + +//----- (004E8630) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A204; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A464; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A464: using guessed type int (*off_51A464)(); + +//----- (004E8790) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A204; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A464; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A464: using guessed type int (*off_51A464)(); + +//----- (004E88E0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A204; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A464; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A204: using guessed type int (__cdecl *off_51A204)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A464: using guessed type int (*off_51A464)(); + +//----- (004E8A40) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block) +{ + *Block = &off_51A464; + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 51A464: using guessed type int (*off_51A464)(); + +//----- (004E8A60) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51A464; + std::moneypunct::~moneypunct(a1); +} +// 51A464: using guessed type int (*off_51A464)(); + +//----- (004E8A70) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51A464; + std::moneypunct::~moneypunct(a1); +} +// 51A464: using guessed type int (*off_51A464)(); + +//----- (004E8A80) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A238; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A498; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A498: using guessed type int (*off_51A498)(); + +//----- (004E8BD0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A238; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A498; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A498: using guessed type int (*off_51A498)(); + +//----- (004E8D30) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A238; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A498; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A498: using guessed type int (*off_51A498)(); + +//----- (004E8E80) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A238; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A498; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A238: using guessed type int (__cdecl *off_51A238)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A498: using guessed type int (*off_51A498)(); + +//----- (004E8FE0) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block) +{ + *Block = &off_51A498; + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 51A498: using guessed type int (*off_51A498)(); + +//----- (004E9000) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51A498; + std::moneypunct::~moneypunct(a1); +} +// 51A498: using guessed type int (*off_51A498)(); + +//----- (004E9010) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51A498; + std::moneypunct::~moneypunct(a1); +} +// 51A498: using guessed type int (*off_51A498)(); + +//----- (004E9020) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A26C; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A4CC; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A4CC: using guessed type int (*off_51A4CC)(); + +//----- (004E9170) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A26C; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A4CC; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A4CC: using guessed type int (*off_51A4CC)(); + +//----- (004E92D0) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname(_DWORD *this, int **a2, int a3) +{ + int v4[3]; // [esp+5Ch] [ebp-Ch] BYREF + + this[1] = a3 != 0; + *this = &off_51A26C; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A4CC; + if ( *(_BYTE *)a2 != 67 || *((_BYTE *)a2 + 1) ) + { + if ( strcmp((const char *)a2, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v4, a2); + std::moneypunct::_M_initialize_moneypunct(this, v4[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v4); + } + } +} +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A4CC: using guessed type int (*off_51A4CC)(); + +//----- (004E9420) -------------------------------------------------------- +void __thiscall std::moneypunct_byname::moneypunct_byname( + _DWORD *this, + struct _Unwind_Exception **a2, + int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + int v5[3]; // [esp+5Ch] [ebp-Ch] BYREF + + lpuexcpt = *a2; + this[1] = a3 != 0; + *this = &off_51A26C; + this[2] = 0; + std::moneypunct::_M_initialize_moneypunct(this, 0, 0); + *this = &off_51A4CC; + if ( *(_BYTE *)lpuexcpt != 67 || *((_BYTE *)lpuexcpt + 1) ) + { + if ( strcmp((const char *)lpuexcpt, "POSIX") ) + { + std::locale::facet::_S_create_c_locale((std::locale::facet *)v5, (int **)lpuexcpt); + std::moneypunct::_M_initialize_moneypunct(this, v5[0], 0); + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)v5); + } + } +} +// 51A26C: using guessed type int (__cdecl *off_51A26C)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); +// 51A4CC: using guessed type int (*off_51A4CC)(); + +//----- (004E9580) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *Block) +{ + *Block = &off_51A4CC; + std::moneypunct::~moneypunct(Block); + operator delete(Block); +} +// 51A4CC: using guessed type int (*off_51A4CC)(); + +//----- (004E95A0) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51A4CC; + std::moneypunct::~moneypunct(a1); +} +// 51A4CC: using guessed type int (*off_51A4CC)(); + +//----- (004E95B0) -------------------------------------------------------- +void __fastcall std::moneypunct_byname::~moneypunct_byname(_DWORD *a1) +{ + *a1 = &off_51A4CC; + std::moneypunct::~moneypunct(a1); +} +// 51A4CC: using guessed type int (*off_51A4CC)(); + +//----- (004E95C0) -------------------------------------------------------- +int __thiscall std::basic_stringstream,std::allocator>::str(int this, int a2) +{ + _DWORD *v2; // esi + unsigned int v4; // eax + + v2 = (_DWORD *)(this + 12); + std::string::_M_replace((unsigned int **)(this + 48), 0, *(_DWORD *)(this + 52), *(char **)a2, *(_DWORD *)(a2 + 4)); + v4 = 0; + if ( (*(_BYTE *)(this + 44) & 3) != 0 ) + v4 = *(_DWORD *)(this + 52); + return std::stringbuf::_M_sync(v2, *(_DWORD **)(this + 48), 0, v4); +} + +//----- (004E9630) -------------------------------------------------------- +void __thiscall std::basic_stringstream,std::allocator>::swap( + volatile signed __int32 **this, + _DWORD *a2) +{ + std::ios_base **v3; // edi + std::ios_base *v4; // esi + std::ios_base *v5; // edx + char v6; // cl + char v7; // cl + volatile signed __int32 *v8; // edx + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *((_DWORD *)*this - 3)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + v8 = this[1]; + *((_BYTE *)v4 + 117) = v7; + this[1] = (volatile signed __int32 *)a2[1]; + a2[1] = v8; + std::stringbuf::swap(this + 3, a2 + 3); +} +// 4E9670: variable 'v9' is possibly undefined + +//----- (004E9700) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + _DWORD *this, + int *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // ecx + int v5; // eax + std::ios_base *v6; // [esp+0h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+10h] [ebp-48h] + _DWORD *v8; // [esp+14h] [ebp-44h] + + v8 = this + 18; + std::ios_base::ios_base(this + 18); + *((_WORD *)this + 94) = 0; + v2 = a2[1]; + *this = &unk_515784; + this[1] = v2; + this[46] = 0; + v3 = *a2; + this[48] = 0; + this[49] = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[18] = &unk_515798; + this[50] = 0; + this[51] = 0; + lpuexcpt = v4; + std::ios_base::_M_move((int)v8, v4, v6); + std::ios::_M_cache_locale(v8, (int)(this + 45)); + this[48] = 0; + v5 = *((_DWORD *)lpuexcpt + 28); + *((_DWORD *)lpuexcpt + 28) = 0; + this[46] = v5; + *((_WORD *)this + 94) = *((_WORD *)lpuexcpt + 58); + a2[1] = 0; + *this = &off_51A504; + this[18] = off_51A52C; + this[2] = off_51A518; + std::stringbuf::basic_stringbuf(this + 3, (std::locale *)(a2 + 3)); + this[48] = this + 3; +} +// 4E9892: positive sp value 4 has been found +// 4E97A5: variable 'v6' is possibly undefined +// 51A504: using guessed type int (*off_51A504)(); +// 51A518: using guessed type int (*off_51A518[2])(); +// 51A52C: using guessed type int (*off_51A52C[2])(); + +//----- (004E98A0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + _DWORD *this, + int a2, + int a3) +{ + int v3; // eax + _BYTE *v4; // edx + unsigned int v5; // eax + _DWORD *v6; // [esp+20h] [ebp-48h] + _DWORD *v7; // [esp+24h] [ebp-44h] + + v7 = this + 18; + std::ios_base::ios_base(this + 18); + this[46] = 0; + *((_WORD *)this + 94) = 0; + this[48] = 0; + this[49] = 0; + this[50] = 0; + this[51] = 0; + *this = &unk_515784; + this[18] = &unk_515798; + this[1] = 0; + std::ios::init((int)v7, 0); + this[2] = &unk_5157AC; + this[18] = &unk_5157C0; + std::ios::init((int)v7, 0); + *this = &off_51A504; + this[18] = off_51A52C; + this[2] = off_51A518; + this[3] = &off_51ADD4; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + v6 = this + 3; + std::locale::locale(this + 10); + v3 = *(_DWORD *)(a2 + 4); + v4 = *(_BYTE **)a2; + this[3] = &off_51A2D8; + this[11] = 0; + this[12] = this + 14; + std::string::_M_construct(this + 12, v4, (int)&v4[v3]); + this[11] = a3; + v5 = 0; + if ( (a3 & 3) != 0 ) + v5 = this[13]; + std::stringbuf::_M_sync(v6, (_DWORD *)this[12], 0, v5); + std::ios::init((int)v7, (int)v6); +} +// 4E9ABE: positive sp value 4 has been found +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A504: using guessed type int (*off_51A504)(); +// 51A518: using guessed type int (*off_51A518[2])(); +// 51A52C: using guessed type int (*off_51A52C[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E9B00) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + _DWORD *this, + int a2) +{ + _DWORD *v2; // [esp+24h] [ebp-44h] + + v2 = this + 18; + std::ios_base::ios_base(this + 18); + this[46] = 0; + *((_WORD *)this + 94) = 0; + this[48] = 0; + this[49] = 0; + this[50] = 0; + this[51] = 0; + *this = &unk_515784; + this[18] = &unk_515798; + this[1] = 0; + std::ios::init((int)v2, 0); + this[2] = &unk_5157AC; + this[18] = &unk_5157C0; + std::ios::init((int)v2, 0); + *this = &off_51A504; + this[18] = off_51A52C; + this[2] = off_51A518; + this[3] = &off_51ADD4; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + std::locale::locale(this + 10); + this[11] = a2; + this[3] = &off_51A2D8; + this[12] = this + 14; + this[13] = 0; + *((_BYTE *)this + 56) = 0; + std::ios::init((int)v2, (int)(this + 3)); +} +// 4E9CBD: positive sp value 4 has been found +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A504: using guessed type int (*off_51A504)(); +// 51A518: using guessed type int (*off_51A518[2])(); +// 51A52C: using guessed type int (*off_51A52C[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E9CE0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __fastcall std::basic_stringstream,std::allocator>::basic_stringstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 72; + std::ios_base::ios_base((_DWORD *)(a1 + 72)); + *(_DWORD *)(a1 + 184) = 0; + *(_WORD *)(a1 + 188) = 0; + *(_DWORD *)(a1 + 192) = 0; + *(_DWORD *)(a1 + 196) = 0; + *(_DWORD *)(a1 + 200) = 0; + *(_DWORD *)(a1 + 204) = 0; + *(_DWORD *)a1 = &unk_515784; + *(_DWORD *)(a1 + 72) = &unk_515798; + *(_DWORD *)(a1 + 4) = 0; + std::ios::init(v1, 0); + *(_DWORD *)(a1 + 8) = &unk_5157AC; + *(_DWORD *)(a1 + 72) = &unk_5157C0; + std::ios::init(v1, 0); + *(_DWORD *)a1 = &off_51A504; + *(_DWORD *)(a1 + 72) = off_51A52C; + *(_DWORD *)(a1 + 8) = off_51A518; + *(_DWORD *)(a1 + 12) = &off_51ADD4; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 24) = 0; + *(_DWORD *)(a1 + 28) = 0; + *(_DWORD *)(a1 + 32) = 0; + *(_DWORD *)(a1 + 36) = 0; + std::locale::locale((_DWORD *)(a1 + 40)); + *(_DWORD *)(a1 + 12) = &off_51A2D8; + *(_DWORD *)(a1 + 44) = 24; + *(_DWORD *)(a1 + 48) = a1 + 56; + *(_DWORD *)(a1 + 52) = 0; + *(_BYTE *)(a1 + 56) = 0; + std::ios::init(v1, a1 + 12); +} +// 4E9E9C: positive sp value 4 has been found +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A504: using guessed type int (*off_51A504)(); +// 51A518: using guessed type int (*off_51A518[2])(); +// 51A52C: using guessed type int (*off_51A52C[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004E9EC0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + int *this, + int *a2, + _DWORD *a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // eax + int v11; // edx + int v12; // eax + int v13; // edx + std::ios_base *v14; // [esp+0h] [ebp-58h] + std::ios_base *v15; // [esp+10h] [ebp-48h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-44h] + + v4 = a2[2]; + v5 = a2[3]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = a3[1]; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v4 - 12)); + v15 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)lpuexcpt, v15, v14); + std::ios::_M_cache_locale(lpuexcpt, (int)lpuexcpt + 108); + v7 = *((_DWORD *)v15 + 28); + *((_DWORD *)lpuexcpt + 30) = 0; + *((_DWORD *)v15 + 28) = 0; + *((_DWORD *)lpuexcpt + 28) = v7; + *((_WORD *)lpuexcpt + 58) = *((_WORD *)v15 + 58); + v8 = a2[5]; + a3[1] = 0; + v9 = a2[4]; + this[2] = v9; + *(int *)((char *)this + *(_DWORD *)(v9 - 12) + 8) = v8; + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = *a2; + v13 = a2[8]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v12 - 12)) = v13; + this[2] = a2[9]; + std::stringbuf::basic_stringbuf(this + 3, (std::locale *)(a3 + 3)); + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)(this + 3); +} +// 4EA00E: positive sp value 4 has been found +// 4E9F26: variable 'v14' is possibly undefined + +//----- (004EA030) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + int *this, + int *a2, + int a3, + int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + _DWORD *v9; // ecx + int v10; // eax + int v11; // edx + int v12; // edx + int v13; // eax + int v14; // eax + int v15; // eax + _BYTE *v16; // edx + unsigned int v17; // eax + int *v18; // [esp+24h] [ebp-44h] + + v5 = a2[2]; + v6 = a2[3]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = a2[4]; + this[2] = v8; + v9 = (int *)((char *)this + *(_DWORD *)(v8 - 12) + 8); + *v9 = a2[5]; + std::ios::init((int)v9, 0); + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = a2[8]; + v13 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v13 - 12)) = v12; + v14 = a2[9]; + this[3] = (int)&off_51ADD4; + this[2] = v14; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + v18 = this + 3; + std::locale::locale(this + 10); + v15 = *(_DWORD *)(a3 + 4); + v16 = *(_BYTE **)a3; + this[3] = (int)&off_51A2D8; + this[11] = 0; + this[12] = (int)(this + 14); + std::string::_M_construct(this + 12, v16, (int)&v16[v15]); + this[11] = a4; + v17 = 0; + if ( (a4 & 3) != 0 ) + v17 = this[13]; + std::stringbuf::_M_sync(v18, (_DWORD *)this[12], 0, v17); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)v18); +} +// 4EA217: positive sp value 4 has been found +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EA280) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + int *this, + int *a2, + int a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + _DWORD *v8; // ecx + int v9; // eax + int v10; // edx + int v11; // edx + int v12; // eax + int v13; // eax + int v14; // eax + + v4 = a2[2]; + v5 = a2[3]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v4 - 12), 0); + v7 = a2[4]; + this[2] = v7; + v8 = (int *)((char *)this + *(_DWORD *)(v7 - 12) + 8); + *v8 = a2[5]; + std::ios::init((int)v8, 0); + v9 = a2[1]; + v10 = a2[6]; + *this = v9; + *(int *)((char *)this + *(_DWORD *)(v9 - 12)) = v10; + this[2] = a2[7]; + v11 = a2[8]; + v12 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v12 - 12)) = v11; + v13 = a2[9]; + this[3] = (int)&off_51ADD4; + this[4] = 0; + this[2] = v13; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + std::locale::locale(this + 10); + this[11] = a3; + this[12] = (int)(this + 14); + v14 = *this; + this[3] = (int)&off_51A2D8; + this[13] = 0; + *((_BYTE *)this + 56) = 0; + std::ios::init((int)this + *(_DWORD *)(v14 - 12), (int)(this + 3)); +} +// 4EA40A: positive sp value 4 has been found +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EA460) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + int *this, + int *a2) +{ + int v3; // eax + int v4; // ecx + int v5; // edx + int v6; // eax + _DWORD *v7; // ecx + int v8; // eax + int v9; // edx + int v10; // edx + int v11; // eax + int v12; // eax + int v13; // eax + + v3 = a2[2]; + v4 = a2[3]; + v5 = *(_DWORD *)(v3 - 12); + *this = v3; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v3 - 12), 0); + v6 = a2[4]; + this[2] = v6; + v7 = (int *)((char *)this + *(_DWORD *)(v6 - 12) + 8); + *v7 = a2[5]; + std::ios::init((int)v7, 0); + v8 = a2[1]; + v9 = a2[6]; + *this = v8; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + this[2] = a2[7]; + v10 = a2[8]; + v11 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v11 - 12)) = v10; + v12 = a2[9]; + this[3] = (int)&off_51ADD4; + this[4] = 0; + this[2] = v12; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + std::locale::locale(this + 10); + this[3] = (int)&off_51A2D8; + this[12] = (int)(this + 14); + v13 = *this; + this[11] = 24; + this[13] = 0; + *((_BYTE *)this + 56) = 0; + std::ios::init((int)this + *(_DWORD *)(v13 - 12), (int)(this + 3)); +} +// 4EA5EB: positive sp value 4 has been found +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EA640) -------------------------------------------------------- +void __fastcall std::basic_stringstream,std::allocator>::~basic_stringstream( + _DWORD *Block) +{ + _DWORD *v2; // eax + + v2 = (_DWORD *)Block[12]; + *Block = &off_51A504; + Block[18] = off_51A52C; + Block[2] = off_51A518; + Block[3] = &off_51A2D8; + if ( v2 != Block + 14 ) + operator delete(v2); + Block[3] = &off_51ADD4; + std::locale::~locale((_DWORD **)Block + 10); + Block[2] = &unk_5157AC; + *Block = &unk_515784; + Block[1] = 0; + Block[18] = &off_51B7D0; + std::ios_base::~ios_base((int)(Block + 18)); + operator delete(Block); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A504: using guessed type int (*off_51A504)(); +// 51A518: using guessed type int (*off_51A518[2])(); +// 51A52C: using guessed type int (*off_51A52C[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004EA6C0) -------------------------------------------------------- +void __fastcall std::basic_stringstream,std::allocator>::~basic_stringstream(int a1) +{ + void *Block; // eax + + Block = *(void **)(a1 + 48); + *(_DWORD *)a1 = &off_51A504; + *(_DWORD *)(a1 + 72) = off_51A52C; + *(_DWORD *)(a1 + 8) = off_51A518; + *(_DWORD *)(a1 + 12) = &off_51A2D8; + if ( Block != (void *)(a1 + 56) ) + operator delete(Block); + *(_DWORD *)(a1 + 12) = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 40)); + *(_DWORD *)(a1 + 8) = &unk_5157AC; + *(_DWORD *)a1 = &unk_515784; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 72) = &off_51B7D0; + std::ios_base::~ios_base(a1 + 72); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A504: using guessed type int (*off_51A504)(); +// 51A518: using guessed type int (*off_51A518[2])(); +// 51A52C: using guessed type int (*off_51A52C[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004EA730) -------------------------------------------------------- +int __thiscall std::basic_stringstream,std::allocator>::~basic_stringstream( + char *this, + int *a2) +{ + int v3; // eax + int v4; // eax + int v5; // eax + int v6; // eax + int v7; // eax + int result; // eax + + v3 = *a2; + *(_DWORD *)this = *a2; + *(_DWORD *)&this[*(_DWORD *)(v3 - 12)] = a2[8]; + v4 = a2[9]; + *((_DWORD *)this + 3) = &off_51A2D8; + *((_DWORD *)this + 2) = v4; + if ( *((char **)this + 12) != this + 56 ) + operator delete(*((void **)this + 12)); + *((_DWORD *)this + 3) = &off_51ADD4; + std::locale::~locale((_DWORD **)this + 10); + v5 = a2[1]; + *(_DWORD *)this = v5; + *(_DWORD *)&this[*(_DWORD *)(v5 - 12)] = a2[6]; + *((_DWORD *)this + 2) = a2[7]; + v6 = a2[4]; + *((_DWORD *)this + 2) = v6; + *(_DWORD *)&this[*(_DWORD *)(v6 - 12) + 8] = a2[5]; + v7 = a2[2]; + *(_DWORD *)this = v7; + result = *(_DWORD *)(v7 - 12); + *(_DWORD *)&this[result] = a2[3]; + *((_DWORD *)this + 1) = 0; + return result; +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EA7C0) -------------------------------------------------------- +_DWORD *__thiscall std::basic_stringstream,std::allocator>::operator=( + _DWORD *this, + _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + char v6; // cl + char v7; // cl + int v8; // eax + std::ios_base *v10; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v10); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + v8 = this[1]; + *((_BYTE *)v4 + 117) = v7; + this[1] = a2[1]; + a2[1] = v8; + std::stringbuf::operator=(this + 3, (int)(a2 + 3)); + return this; +} +// 4EA800: variable 'v10' is possibly undefined + +//----- (004EA8A0) -------------------------------------------------------- +_DWORD *__thiscall std::basic_stringstream,std::allocator>::str( + int this, + int a2) +{ + _DWORD *v2; // esi + unsigned int v4; // eax + + v2 = (_DWORD *)(this + 12); + std::wstring::_M_replace((unsigned int **)(this + 48), 0, *(_DWORD *)(this + 52), *(char **)a2, *(_DWORD *)(a2 + 4)); + v4 = 0; + if ( (*(_BYTE *)(this + 44) & 3) != 0 ) + v4 = *(_DWORD *)(this + 52); + return std::wstringbuf::_M_sync(v2, *(_DWORD **)(this + 48), 0, v4); +} + +//----- (004EA910) -------------------------------------------------------- +void __thiscall std::basic_stringstream,std::allocator>::swap( + volatile signed __int32 **this, + _DWORD *a2) +{ + std::ios_base **v3; // edi + std::ios_base *v4; // esi + std::ios_base *v5; // edx + __int16 v6; // cx + volatile signed __int32 *v7; // edx + std::ios_base *v8; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *((_DWORD *)*this - 3)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = (volatile signed __int32 *)a2[1]; + a2[1] = v7; + std::wstringbuf::swap(this + 3, a2 + 3); +} +// 4EA950: variable 'v8' is possibly undefined + +//----- (004EA9F0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + _DWORD *this, + _DWORD *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // edx + int v5; // eax + int v6; // edx + unsigned int v7; // eax + int v8; // ecx + int v9; // eax + _DWORD *v10; // esi + _DWORD *v11; // eax + int v12; // ecx + int v13; // ebx + char *v14; // ecx + int v15; // edx + std::ios_base *v16; // [esp+0h] [ebp-B8h] + const std::locale *v17; // [esp+0h] [ebp-B8h] + struct _Unwind_Exception *lpuexcpta; // [esp+20h] [ebp-98h] + struct _Unwind_Exception *lpuexcpt; // [esp+20h] [ebp-98h] + _DWORD *v20; // [esp+24h] [ebp-94h] + int v22; // [esp+70h] [ebp-48h] + int v23; // [esp+74h] [ebp-44h] + int v24; // [esp+78h] [ebp-40h] + __int64 v25; // [esp+80h] [ebp-38h] + int v26; // [esp+88h] [ebp-30h] + int v27; // [esp+8Ch] [ebp-2Ch] + int v28; // [esp+90h] [ebp-28h] + int v29; // [esp+98h] [ebp-20h] + + v20 = this + 18; + std::ios_base::ios_base(this + 18); + v2 = a2[1]; + this[46] = 0; + this[1] = v2; + *((_WORD *)this + 94) = 0; + v3 = *a2; + *this = &unk_5157D4; + *((_BYTE *)this + 190) = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[48] = 0; + this[49] = 0; + this[50] = 0; + this[51] = 0; + this[18] = &unk_5157E8; + lpuexcpta = v4; + std::ios_base::_M_move((int)v20, v4, v16); + std::wios::_M_cache_locale(v20, (int)(this + 45)); + v22 = -1; + v23 = -1; + v5 = *((_DWORD *)lpuexcpta + 28); + *((_DWORD *)lpuexcpta + 28) = 0; + this[48] = 0; + this[46] = v5; + v24 = -1; + *((_WORD *)this + 94) = *((_WORD *)lpuexcpta + 58); + v6 = a2[12]; + *((_BYTE *)this + 190) = *((_BYTE *)lpuexcpta + 118); + LODWORD(v25) = -1; + a2[1] = 0; + lpuexcpt = (struct _Unwind_Exception *)(this + 3); + v7 = a2[4]; + *this = &off_51A540; + this[18] = off_51A568; + this[2] = off_51A554; + v26 = -1; + v27 = -1; + v28 = -1; + v29 = -1; + if ( !v7 ) + { + v8 = a2[7]; + if ( !v8 ) + goto LABEL_7; + goto LABEL_3; + } + v22 = (int)(v7 - v6) >> 1; + v23 = (int)(v7 - v6) >> 31; + v24 = (a2[5] - v6) >> 1; + v7 = a2[6]; + v25 = (int)(v7 - v6) >> 1; + v8 = a2[7]; + if ( v8 ) + { +LABEL_3: + v26 = (v8 - v6) >> 1; + v27 = (v8 - v6) >> 31; + v28 = (a2[8] - v8) >> 1; + v29 = (a2[9] - v6) >> 1; + if ( v7 < a2[8] ) + v7 = a2[8]; + } + if ( v7 ) + a2[13] = (int)(v7 - v6) >> 1; +LABEL_7: + std::wstreambuf::basic_streambuf(lpuexcpt, (std::locale *)(a2 + 3), v17); + v9 = a2[11]; + this[3] = &off_51A318; + this[12] = this + 14; + v10 = a2 + 14; + this[11] = v9; + v11 = (_DWORD *)a2[12]; + if ( v11 == a2 + 14 ) + { + this[14] = a2[14]; + this[15] = a2[15]; + this[16] = a2[16]; + this[17] = a2[17]; + } + else + { + this[12] = v11; + this[14] = a2[14]; + } + this[13] = a2[13]; + a2[12] = v10; + *((_WORD *)a2 + 28) = 0; + v12 = this[12]; + a2[13] = 0; + if ( (v22 & v23) != -1 ) + { + this[4] = v12 + 2 * v22; + this[5] = v12 + 2 * v24; + this[6] = v12 + 2 * v25; + } + if ( (v26 & v27) != -1 ) + { + v13 = v12 + 2 * v26; + this[9] = v12 + 2 * v29; + this[7] = v13; + this[8] = v13 + 2 * v28; + } + v14 = (char *)a2 + 70; + v15 = a2[11] & 0x10; + if ( (a2[11] & 8) != 0 ) + { + a2[4] = v10; + a2[5] = v10; + a2[6] = v10; + if ( v15 ) + { + a2[8] = v10; + a2[7] = v10; + a2[9] = v14; + } + } + else if ( v15 ) + { + a2[8] = v10; + a2[7] = v10; + a2[9] = v14; + a2[4] = v10; + a2[5] = v10; + a2[6] = v10; + } + this[48] = lpuexcpt; +} +// 4EAE75: positive sp value 4 has been found +// 4EAD34: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4EAAB9: variable 'v16' is possibly undefined +// 4EAC5F: variable 'v17' is possibly undefined +// 51A318: using guessed type int (*off_51A318)(); +// 51A540: using guessed type int (*off_51A540)(); +// 51A554: using guessed type int (*off_51A554[2])(); +// 51A568: using guessed type int (*off_51A568[2])(); + +//----- (004EAE80) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + _DWORD *this, + int a2, + int a3) +{ + int v3; // edx + _WORD *v4; // eax + unsigned int v5; // eax + _DWORD *v6; // [esp+20h] [ebp-48h] + _DWORD *v7; // [esp+24h] [ebp-44h] + + v7 = this + 18; + std::ios_base::ios_base(this + 18); + this[46] = 0; + *((_WORD *)this + 94) = 0; + *((_BYTE *)this + 190) = 0; + this[48] = 0; + this[49] = 0; + this[50] = 0; + this[51] = 0; + *this = &unk_5157D4; + this[18] = &unk_5157E8; + this[1] = 0; + std::wios::init((int)v7, 0); + this[2] = &unk_515838; + this[18] = &unk_51584C; + std::wios::init((int)v7, 0); + *this = &off_51A540; + this[18] = off_51A568; + this[2] = off_51A554; + this[3] = &off_51AE14; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + v6 = this + 3; + std::locale::locale(this + 10); + v3 = *(_DWORD *)(a2 + 4); + v4 = *(_WORD **)a2; + this[3] = &off_51A318; + this[11] = 0; + this[12] = this + 14; + std::wstring::_M_construct(this + 12, v4, (int)&v4[v3]); + this[11] = a3; + v5 = 0; + if ( (a3 & 3) != 0 ) + v5 = this[13]; + std::wstringbuf::_M_sync(v6, (_DWORD *)this[12], 0, v5); + std::wios::init((int)v7, (int)v6); +} +// 4EB0A3: positive sp value 4 has been found +// 51A318: using guessed type int (*off_51A318)(); +// 51A540: using guessed type int (*off_51A540)(); +// 51A554: using guessed type int (*off_51A554[2])(); +// 51A568: using guessed type int (*off_51A568[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EB0E0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + _DWORD *this, + int a2) +{ + _DWORD *v2; // [esp+24h] [ebp-44h] + + v2 = this + 18; + std::ios_base::ios_base(this + 18); + this[46] = 0; + *((_WORD *)this + 94) = 0; + *((_BYTE *)this + 190) = 0; + this[48] = 0; + this[49] = 0; + this[50] = 0; + this[51] = 0; + *this = &unk_5157D4; + this[18] = &unk_5157E8; + this[1] = 0; + std::wios::init((int)v2, 0); + this[2] = &unk_515838; + this[18] = &unk_51584C; + std::wios::init((int)v2, 0); + *this = &off_51A540; + this[18] = off_51A568; + this[2] = off_51A554; + this[3] = &off_51AE14; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + std::locale::locale(this + 10); + this[11] = a2; + *((_WORD *)this + 28) = 0; + this[3] = &off_51A318; + this[12] = this + 14; + this[13] = 0; + std::wios::init((int)v2, (int)(this + 3)); +} +// 4EB2A6: positive sp value 4 has been found +// 51A318: using guessed type int (*off_51A318)(); +// 51A540: using guessed type int (*off_51A540)(); +// 51A554: using guessed type int (*off_51A554[2])(); +// 51A568: using guessed type int (*off_51A568[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EB2D0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __fastcall std::basic_stringstream,std::allocator>::basic_stringstream( + int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 72; + std::ios_base::ios_base((_DWORD *)(a1 + 72)); + *(_DWORD *)(a1 + 184) = 0; + *(_WORD *)(a1 + 188) = 0; + *(_BYTE *)(a1 + 190) = 0; + *(_DWORD *)(a1 + 192) = 0; + *(_DWORD *)(a1 + 196) = 0; + *(_DWORD *)(a1 + 200) = 0; + *(_DWORD *)(a1 + 204) = 0; + *(_DWORD *)a1 = &unk_5157D4; + *(_DWORD *)(a1 + 72) = &unk_5157E8; + *(_DWORD *)(a1 + 4) = 0; + std::wios::init(v1, 0); + *(_DWORD *)(a1 + 8) = &unk_515838; + *(_DWORD *)(a1 + 72) = &unk_51584C; + std::wios::init(v1, 0); + *(_DWORD *)a1 = &off_51A540; + *(_DWORD *)(a1 + 72) = off_51A568; + *(_DWORD *)(a1 + 8) = off_51A554; + *(_DWORD *)(a1 + 12) = &off_51AE14; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 24) = 0; + *(_DWORD *)(a1 + 28) = 0; + *(_DWORD *)(a1 + 32) = 0; + *(_DWORD *)(a1 + 36) = 0; + std::locale::locale((_DWORD *)(a1 + 40)); + *(_WORD *)(a1 + 56) = 0; + *(_DWORD *)(a1 + 12) = &off_51A318; + *(_DWORD *)(a1 + 44) = 24; + *(_DWORD *)(a1 + 48) = a1 + 56; + *(_DWORD *)(a1 + 52) = 0; + std::wios::init(v1, a1 + 12); +} +// 4EB495: positive sp value 4 has been found +// 51A318: using guessed type int (*off_51A318)(); +// 51A540: using guessed type int (*off_51A540)(); +// 51A554: using guessed type int (*off_51A554[2])(); +// 51A568: using guessed type int (*off_51A568[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EB4C0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + int *this, + int *a2, + _DWORD *a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // eax + int v11; // edx + int v12; // eax + int v13; // edx + int v14; // edx + unsigned int v15; // eax + int v16; // ecx + int v17; // eax + _DWORD *v18; // esi + _DWORD *v19; // eax + int v20; // ecx + int v21; // ebx + char *v22; // ecx + int v23; // edx + std::ios_base *v24; // [esp+0h] [ebp-A8h] + const std::locale *v25; // [esp+0h] [ebp-A8h] + std::ios_base *v26; // [esp+10h] [ebp-98h] + int *v27; // [esp+10h] [ebp-98h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-94h] + int v30; // [esp+60h] [ebp-48h] + int v31; // [esp+64h] [ebp-44h] + int v32; // [esp+68h] [ebp-40h] + __int64 v33; // [esp+70h] [ebp-38h] + int v34; // [esp+78h] [ebp-30h] + int v35; // [esp+7Ch] [ebp-2Ch] + int v36; // [esp+80h] [ebp-28h] + int v37; // [esp+88h] [ebp-20h] + + v4 = a2[2]; + v5 = a2[3]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = a3[1]; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v4 - 12)); + v26 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)lpuexcpt, v26, v24); + std::wios::_M_cache_locale(lpuexcpt, (int)lpuexcpt + 108); + v7 = *((_DWORD *)v26 + 28); + *((_DWORD *)lpuexcpt + 30) = 0; + *((_DWORD *)v26 + 28) = 0; + *((_DWORD *)lpuexcpt + 28) = v7; + *((_WORD *)lpuexcpt + 58) = *((_WORD *)v26 + 58); + *((_BYTE *)lpuexcpt + 118) = *((_BYTE *)v26 + 118); + a3[1] = 0; + v8 = a2[5]; + v9 = a2[4]; + this[2] = v9; + *(int *)((char *)this + *(_DWORD *)(v9 - 12) + 8) = v8; + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = *a2; + v13 = a2[8]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v12 - 12)) = v13; + v30 = -1; + this[2] = a2[9]; + v27 = this + 3; + v31 = -1; + v14 = a3[12]; + v15 = a3[4]; + v32 = -1; + LODWORD(v33) = -1; + v34 = -1; + v35 = -1; + v36 = -1; + v37 = -1; + if ( !v15 ) + { + v16 = a3[7]; + if ( !v16 ) + goto LABEL_7; + goto LABEL_3; + } + v30 = (int)(v15 - v14) >> 1; + v31 = (int)(v15 - v14) >> 31; + v32 = (a3[5] - v14) >> 1; + v15 = a3[6]; + v33 = (int)(v15 - v14) >> 1; + v16 = a3[7]; + if ( v16 ) + { +LABEL_3: + v34 = (v16 - v14) >> 1; + v35 = (v16 - v14) >> 31; + v36 = (a3[8] - v16) >> 1; + v37 = (a3[9] - v14) >> 1; + if ( v15 < a3[8] ) + v15 = a3[8]; + } + if ( v15 ) + a3[13] = (int)(v15 - v14) >> 1; +LABEL_7: + std::wstreambuf::basic_streambuf(v27, (std::locale *)(a3 + 3), v25); + v17 = a3[11]; + this[3] = (int)&off_51A318; + this[12] = (int)(this + 14); + v18 = a3 + 14; + this[11] = v17; + v19 = (_DWORD *)a3[12]; + if ( v19 == a3 + 14 ) + { + this[14] = a3[14]; + this[15] = a3[15]; + this[16] = a3[16]; + this[17] = a3[17]; + } + else + { + this[12] = (int)v19; + this[14] = a3[14]; + } + this[13] = a3[13]; + a3[12] = v18; + *((_WORD *)a3 + 28) = 0; + v20 = this[12]; + a3[13] = 0; + if ( (v30 & v31) != -1 ) + { + this[4] = v20 + 2 * v30; + this[5] = v20 + 2 * v32; + this[6] = v20 + 2 * v33; + } + if ( (v34 & v35) != -1 ) + { + v21 = v20 + 2 * v34; + this[9] = v20 + 2 * v37; + this[7] = v21; + this[8] = v21 + 2 * v36; + } + v22 = (char *)a3 + 70; + v23 = a3[11] & 0x10; + if ( (a3[11] & 8) != 0 ) + { + a3[4] = v18; + a3[5] = v18; + a3[6] = v18; + if ( v23 ) + { + a3[8] = v18; + a3[7] = v18; + a3[9] = v22; + } + } + else if ( v23 ) + { + a3[8] = v18; + a3[7] = v18; + a3[9] = v22; + a3[4] = v18; + a3[5] = v18; + a3[6] = v18; + } + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)v27; +} +// 4EB8E8: positive sp value 4 has been found +// 4EB7D5: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4EB53B: variable 'v24' is possibly undefined +// 4EB700: variable 'v25' is possibly undefined +// 51A318: using guessed type int (*off_51A318)(); + +//----- (004EB910) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + int *this, + int *a2, + int a3, + int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + _DWORD *v9; // ecx + int v10; // eax + int v11; // edx + int v12; // edx + int v13; // eax + int v14; // eax + int v15; // edx + _WORD *v16; // eax + unsigned int v17; // eax + int *v18; // [esp+24h] [ebp-44h] + + v5 = a2[2]; + v6 = a2[3]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = a2[4]; + this[2] = v8; + v9 = (int *)((char *)this + *(_DWORD *)(v8 - 12) + 8); + *v9 = a2[5]; + std::wios::init((int)v9, 0); + v10 = a2[1]; + v11 = a2[6]; + *this = v10; + *(int *)((char *)this + *(_DWORD *)(v10 - 12)) = v11; + this[2] = a2[7]; + v12 = a2[8]; + v13 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v13 - 12)) = v12; + v14 = a2[9]; + this[3] = (int)&off_51AE14; + this[2] = v14; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + v18 = this + 3; + std::locale::locale(this + 10); + v15 = *(_DWORD *)(a3 + 4); + v16 = *(_WORD **)a3; + this[3] = (int)&off_51A318; + this[11] = 0; + this[12] = (int)(this + 14); + std::wstring::_M_construct(this + 12, v16, (int)&v16[v15]); + this[11] = a4; + v17 = 0; + if ( (a4 & 3) != 0 ) + v17 = this[13]; + std::wstringbuf::_M_sync(v18, (_DWORD *)this[12], 0, v17); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)v18); +} +// 4EBAF3: positive sp value 4 has been found +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EBB60) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + int *this, + int *a2, + int a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + _DWORD *v8; // ecx + int v9; // eax + int v10; // edx + int v11; // edx + int v12; // eax + int v13; // eax + int v14; // eax + + v4 = a2[2]; + v5 = a2[3]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v4 - 12), 0); + v7 = a2[4]; + this[2] = v7; + v8 = (int *)((char *)this + *(_DWORD *)(v7 - 12) + 8); + *v8 = a2[5]; + std::wios::init((int)v8, 0); + v9 = a2[1]; + v10 = a2[6]; + *this = v9; + *(int *)((char *)this + *(_DWORD *)(v9 - 12)) = v10; + this[2] = a2[7]; + v11 = a2[8]; + v12 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v12 - 12)) = v11; + v13 = a2[9]; + this[3] = (int)&off_51AE14; + this[4] = 0; + this[2] = v13; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + std::locale::locale(this + 10); + this[11] = a3; + this[12] = (int)(this + 14); + v14 = *this; + *((_WORD *)this + 28) = 0; + this[3] = (int)&off_51A318; + this[13] = 0; + std::wios::init((int)this + *(_DWORD *)(v14 - 12), (int)(this + 3)); +} +// 4EBCEC: positive sp value 4 has been found +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EBD40) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +void __thiscall std::basic_stringstream,std::allocator>::basic_stringstream( + int *this, + int *a2) +{ + int v3; // eax + int v4; // ecx + int v5; // edx + int v6; // eax + _DWORD *v7; // ecx + int v8; // eax + int v9; // edx + int v10; // edx + int v11; // eax + int v12; // eax + int v13; // eax + + v3 = a2[2]; + v4 = a2[3]; + v5 = *(_DWORD *)(v3 - 12); + *this = v3; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v3 - 12), 0); + v6 = a2[4]; + this[2] = v6; + v7 = (int *)((char *)this + *(_DWORD *)(v6 - 12) + 8); + *v7 = a2[5]; + std::wios::init((int)v7, 0); + v8 = a2[1]; + v9 = a2[6]; + *this = v8; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + this[2] = a2[7]; + v10 = a2[8]; + v11 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v11 - 12)) = v10; + v12 = a2[9]; + this[3] = (int)&off_51AE14; + this[4] = 0; + this[2] = v12; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + this[9] = 0; + std::locale::locale(this + 10); + *((_WORD *)this + 28) = 0; + this[12] = (int)(this + 14); + v13 = *this; + this[3] = (int)&off_51A318; + this[11] = 24; + this[13] = 0; + std::wios::init((int)this + *(_DWORD *)(v13 - 12), (int)(this + 3)); +} +// 4EBECD: positive sp value 4 has been found +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EBF20) -------------------------------------------------------- +void __fastcall std::basic_stringstream,std::allocator>::~basic_stringstream( + _DWORD *Block) +{ + _DWORD *v2; // eax + + v2 = (_DWORD *)Block[12]; + *Block = &off_51A540; + Block[18] = off_51A568; + Block[2] = off_51A554; + Block[3] = &off_51A318; + if ( v2 != Block + 14 ) + operator delete(v2); + Block[3] = &off_51AE14; + std::locale::~locale((_DWORD **)Block + 10); + Block[2] = &unk_515838; + *Block = &unk_5157D4; + Block[1] = 0; + Block[18] = &off_51B7E0; + std::ios_base::~ios_base((int)(Block + 18)); + operator delete(Block); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A540: using guessed type int (*off_51A540)(); +// 51A554: using guessed type int (*off_51A554[2])(); +// 51A568: using guessed type int (*off_51A568[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004EBFA0) -------------------------------------------------------- +void __fastcall std::basic_stringstream,std::allocator>::~basic_stringstream( + int a1) +{ + void *Block; // eax + + Block = *(void **)(a1 + 48); + *(_DWORD *)a1 = &off_51A540; + *(_DWORD *)(a1 + 72) = off_51A568; + *(_DWORD *)(a1 + 8) = off_51A554; + *(_DWORD *)(a1 + 12) = &off_51A318; + if ( Block != (void *)(a1 + 56) ) + operator delete(Block); + *(_DWORD *)(a1 + 12) = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 40)); + *(_DWORD *)(a1 + 8) = &unk_515838; + *(_DWORD *)a1 = &unk_5157D4; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 72) = &off_51B7E0; + std::ios_base::~ios_base(a1 + 72); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A540: using guessed type int (*off_51A540)(); +// 51A554: using guessed type int (*off_51A554[2])(); +// 51A568: using guessed type int (*off_51A568[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004EC010) -------------------------------------------------------- +int __thiscall std::basic_stringstream,std::allocator>::~basic_stringstream( + char *this, + int *a2) +{ + int v3; // eax + int v4; // eax + int v5; // eax + int v6; // eax + int v7; // eax + int result; // eax + + v3 = *a2; + *(_DWORD *)this = *a2; + *(_DWORD *)&this[*(_DWORD *)(v3 - 12)] = a2[8]; + v4 = a2[9]; + *((_DWORD *)this + 3) = &off_51A318; + *((_DWORD *)this + 2) = v4; + if ( *((char **)this + 12) != this + 56 ) + operator delete(*((void **)this + 12)); + *((_DWORD *)this + 3) = &off_51AE14; + std::locale::~locale((_DWORD **)this + 10); + v5 = a2[1]; + *(_DWORD *)this = v5; + *(_DWORD *)&this[*(_DWORD *)(v5 - 12)] = a2[6]; + *((_DWORD *)this + 2) = a2[7]; + v6 = a2[4]; + *((_DWORD *)this + 2) = v6; + *(_DWORD *)&this[*(_DWORD *)(v6 - 12) + 8] = a2[5]; + v7 = a2[2]; + *(_DWORD *)this = v7; + result = *(_DWORD *)(v7 - 12); + *(_DWORD *)&this[result] = a2[3]; + *((_DWORD *)this + 1) = 0; + return result; +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EC0A0) -------------------------------------------------------- +_DWORD *__thiscall std::basic_stringstream,std::allocator>::operator=( + _DWORD *this, + _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + __int16 v6; // cx + int v7; // eax + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = a2[1]; + a2[1] = v7; + std::wstringbuf::operator=(this + 3, (int)(a2 + 3)); + return this; +} +// 4EC0E0: variable 'v9' is possibly undefined + +//----- (004EC180) -------------------------------------------------------- +int __thiscall std::istringstream::str(int this, int a2) +{ + _DWORD *v2; // esi + unsigned int v4; // eax + + v2 = (_DWORD *)(this + 8); + std::string::_M_replace((unsigned int **)(this + 44), 0, *(_DWORD *)(this + 48), *(char **)a2, *(_DWORD *)(a2 + 4)); + v4 = 0; + if ( (*(_BYTE *)(this + 40) & 3) != 0 ) + v4 = *(_DWORD *)(this + 48); + return std::stringbuf::_M_sync(v2, *(_DWORD **)(this + 44), 0, v4); +} + +//----- (004EC1F0) -------------------------------------------------------- +void __thiscall std::istringstream::swap(volatile signed __int32 **this, _DWORD *a2) +{ + std::ios_base **v3; // edi + std::ios_base *v4; // esi + std::ios_base *v5; // edx + char v6; // cl + char v7; // cl + volatile signed __int32 *v8; // edx + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *((_DWORD *)*this - 3)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + v8 = this[1]; + *((_BYTE *)v4 + 117) = v7; + this[1] = (volatile signed __int32 *)a2[1]; + a2[1] = v8; + std::stringbuf::swap(this + 2, a2 + 2); +} +// 4EC230: variable 'v9' is possibly undefined + +//----- (004EC2C0) -------------------------------------------------------- +void __thiscall std::istringstream::basic_istringstream(_DWORD *this, _DWORD *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // esi + int v5; // eax + int v6; // edx + unsigned int v7; // eax + int v8; // ecx + int v9; // eax + _DWORD *v10; // eax + int v11; // ebx + int v12; // ecx + int v13; // ebx + _DWORD *v14; // eax + int v15; // edx + int v16; // ecx + char *v17; // ecx + std::ios_base *v18; // [esp+4h] [ebp-B4h] + const std::locale *v19; // [esp+4h] [ebp-B4h] + struct _Unwind_Exception *lpuexcpt; // [esp+20h] [ebp-98h] + _DWORD *v21; // [esp+24h] [ebp-94h] + _DWORD *v22; // [esp+24h] [ebp-94h] + __int64 v24; // [esp+70h] [ebp-48h] + int v25; // [esp+78h] [ebp-40h] + __int64 v26; // [esp+80h] [ebp-38h] + __int64 v27; // [esp+88h] [ebp-30h] + int v28; // [esp+90h] [ebp-28h] + int v29; // [esp+98h] [ebp-20h] + + v21 = this + 17; + std::ios_base::ios_base(this + 17); + *((_WORD *)this + 92) = 0; + v2 = a2[1]; + this[45] = 0; + this[1] = v2; + this[47] = 0; + v3 = *a2; + *this = &unk_515860; + this[48] = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[17] = &unk_515874; + this[49] = 0; + this[50] = 0; + std::ios_base::_M_move((int)v21, v4, v18); + std::ios::_M_cache_locale(v21, (int)(this + 44)); + v24 = -1LL; + v5 = *((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = 0; + this[47] = 0; + this[45] = v5; + v25 = -1; + *((_WORD *)this + 92) = *((_WORD *)v4 + 58); + a2[1] = 0; + lpuexcpt = (struct _Unwind_Exception *)(this + 2); + v6 = a2[11]; + v7 = a2[3]; + *this = &off_51A57C; + this[17] = off_51A590; + LODWORD(v26) = -1; + v27 = -1LL; + v28 = -1; + v29 = -1; + if ( !v7 ) + { + v8 = a2[6]; + if ( !v8 ) + goto LABEL_7; + goto LABEL_3; + } + v24 = (int)(v7 - v6); + v25 = a2[4] - v6; + v7 = a2[5]; + v26 = (int)(v7 - v6); + v8 = a2[6]; + if ( v8 ) + { +LABEL_3: + v27 = v8 - v6; + v28 = a2[7] - v8; + v29 = a2[8] - v6; + if ( v7 < a2[7] ) + v7 = a2[7]; + } + if ( v7 ) + a2[12] = v7 - v6; +LABEL_7: + std::streambuf::basic_streambuf(lpuexcpt, (std::locale *)(a2 + 2), v19); + v9 = a2[10]; + this[2] = &off_51A2D8; + this[11] = this + 13; + this[10] = v9; + v22 = a2 + 13; + v10 = (_DWORD *)a2[11]; + if ( v10 == a2 + 13 ) + { + this[13] = a2[13]; + this[14] = a2[14]; + this[15] = a2[15]; + this[16] = a2[16]; + } + else + { + this[11] = v10; + this[13] = a2[13]; + } + this[12] = a2[12]; + *((_BYTE *)a2 + 52) = 0; + a2[11] = v22; + a2[12] = 0; + v11 = this[11]; + if ( ((unsigned int)v24 & HIDWORD(v24)) != -1 ) + { + this[3] = v11 + v24; + this[4] = v11 + v25; + this[5] = v11 + v26; + } + if ( ((unsigned int)v27 & HIDWORD(v27)) != -1 ) + { + v12 = v11 + v29; + v13 = v27 + v11; + this[8] = v12; + this[6] = v13; + this[7] = v13 + v28; + } + v14 = (_DWORD *)a2[11]; + v15 = a2[10] & 0x10; + if ( v14 == v22 ) + v16 = 15; + else + v16 = a2[13]; + v17 = (char *)v14 + v16; + if ( (a2[10] & 8) != 0 ) + { + a2[3] = v14; + a2[4] = v14; + a2[5] = v14; + if ( v15 ) + { + a2[7] = v14; + a2[6] = v14; + a2[8] = v17; + } + } + else if ( v15 ) + { + a2[7] = v14; + a2[6] = v14; + a2[8] = v17; + a2[3] = v14; + a2[4] = v14; + a2[5] = v14; + } + this[47] = lpuexcpt; +} +// 4EC5D5: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4EC382: variable 'v18' is possibly undefined +// 4EC509: variable 'v19' is possibly undefined +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A57C: using guessed type int (*off_51A57C)(); +// 51A590: using guessed type int (*off_51A590[2])(); + +//----- (004EC750) -------------------------------------------------------- +void __thiscall std::istringstream::basic_istringstream(_DWORD *this, int a2, int a3) +{ + int v3; // eax + _BYTE *v4; // edx + unsigned int v5; // eax + _DWORD *v6; // [esp+20h] [ebp-48h] + _DWORD *v7; // [esp+24h] [ebp-44h] + + v6 = this + 17; + std::ios_base::ios_base(this + 17); + this[45] = 0; + *((_WORD *)this + 92) = 0; + this[47] = 0; + this[48] = 0; + this[49] = 0; + this[50] = 0; + *this = &unk_515860; + this[17] = &unk_515874; + this[1] = 0; + std::ios::init((int)v6, 0); + *this = &off_51A57C; + this[17] = off_51A590; + this[2] = &off_51ADD4; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + v7 = this + 2; + std::locale::locale(this + 9); + v3 = *(_DWORD *)(a2 + 4); + v4 = *(_BYTE **)a2; + this[2] = &off_51A2D8; + this[10] = 0; + this[11] = this + 13; + std::string::_M_construct(this + 11, v4, (int)&v4[v3]); + v5 = 0; + this[10] = a3 | 8; + if ( (a3 & 3) != 0 ) + v5 = this[12]; + std::stringbuf::_M_sync(v7, (_DWORD *)this[11], 0, v5); + std::ios::init((int)v6, (int)v7); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A57C: using guessed type int (*off_51A57C)(); +// 51A590: using guessed type int (*off_51A590[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EC970) -------------------------------------------------------- +void __thiscall std::istringstream::basic_istringstream(_DWORD *this, int a2) +{ + _DWORD *v2; // [esp+24h] [ebp-44h] + + v2 = this + 17; + std::ios_base::ios_base(this + 17); + this[45] = 0; + *((_WORD *)this + 92) = 0; + this[47] = 0; + this[48] = 0; + this[49] = 0; + this[50] = 0; + *this = &unk_515860; + this[17] = &unk_515874; + this[1] = 0; + std::ios::init((int)v2, 0); + *this = &off_51A57C; + this[17] = off_51A590; + this[2] = &off_51ADD4; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + std::locale::locale(this + 9); + this[2] = &off_51A2D8; + this[10] = a2 | 8; + this[11] = this + 13; + this[12] = 0; + *((_BYTE *)this + 52) = 0; + std::ios::init((int)v2, (int)(this + 2)); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A57C: using guessed type int (*off_51A57C)(); +// 51A590: using guessed type int (*off_51A590[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004ECB10) -------------------------------------------------------- +void __fastcall std::istringstream::basic_istringstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 68; + std::ios_base::ios_base((_DWORD *)(a1 + 68)); + *(_DWORD *)(a1 + 180) = 0; + *(_WORD *)(a1 + 184) = 0; + *(_DWORD *)(a1 + 188) = 0; + *(_DWORD *)(a1 + 192) = 0; + *(_DWORD *)(a1 + 196) = 0; + *(_DWORD *)(a1 + 200) = 0; + *(_DWORD *)a1 = &unk_515860; + *(_DWORD *)(a1 + 68) = &unk_515874; + *(_DWORD *)(a1 + 4) = 0; + std::ios::init(v1, 0); + *(_DWORD *)a1 = &off_51A57C; + *(_DWORD *)(a1 + 68) = off_51A590; + *(_DWORD *)(a1 + 8) = &off_51ADD4; + *(_DWORD *)(a1 + 12) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 24) = 0; + *(_DWORD *)(a1 + 28) = 0; + *(_DWORD *)(a1 + 32) = 0; + std::locale::locale((_DWORD *)(a1 + 36)); + *(_DWORD *)(a1 + 8) = &off_51A2D8; + *(_DWORD *)(a1 + 40) = 8; + *(_DWORD *)(a1 + 44) = a1 + 52; + *(_DWORD *)(a1 + 48) = 0; + *(_BYTE *)(a1 + 52) = 0; + std::ios::init(v1, a1 + 8); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A57C: using guessed type int (*off_51A57C)(); +// 51A590: using guessed type int (*off_51A590[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004ECCA0) -------------------------------------------------------- +void __thiscall std::istringstream::basic_istringstream(int *this, int *a2, _DWORD *a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + std::ios_base *v10; // [esp+4h] [ebp-54h] + std::ios_base *v11; // [esp+10h] [ebp-48h] + char *v12; // [esp+14h] [ebp-44h] + + v4 = a2[1]; + v5 = a2[2]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = a3[1]; + v12 = (char *)this + *(_DWORD *)(v4 - 12); + v11 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)v12, v11, v10); + std::ios::_M_cache_locale(v12, (int)(v12 + 108)); + v7 = *((_DWORD *)v11 + 28); + *((_DWORD *)v12 + 30) = 0; + *((_DWORD *)v11 + 28) = 0; + v8 = a2[3]; + *((_DWORD *)v12 + 28) = v7; + *((_WORD *)v12 + 58) = *((_WORD *)v11 + 58); + a3[1] = 0; + v9 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v9 - 12)) = v8; + std::stringbuf::basic_stringbuf(this + 2, (std::locale *)(a3 + 2)); + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)(this + 2); +} +// 4ECD07: variable 'v10' is possibly undefined + +//----- (004ECDE0) -------------------------------------------------------- +void __thiscall std::istringstream::basic_istringstream(int *this, int *a2, int a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + int v9; // edx + _BYTE *v10; // edx + int v11; // eax + unsigned int v12; // eax + int *v13; // [esp+24h] [ebp-44h] + + v5 = a2[1]; + v6 = a2[2]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = *a2; + v9 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + v13 = this + 2; + this[2] = (int)&off_51ADD4; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + std::locale::locale(this + 9); + v10 = *(_BYTE **)a3; + v11 = *(_DWORD *)(a3 + 4); + this[2] = (int)&off_51A2D8; + this[10] = 0; + this[11] = (int)(this + 13); + std::string::_M_construct(this + 11, v10, (int)&v10[v11]); + v12 = 0; + this[10] = a4 | 8; + if ( (a4 & 3) != 0 ) + v12 = this[12]; + std::stringbuf::_M_sync(v13, (_DWORD *)this[11], 0, v12); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)v13); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004ECFC0) -------------------------------------------------------- +void __thiscall std::istringstream::basic_istringstream(int *this, int *a2, int a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + + v4 = a2[1]; + v5 = a2[2]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v4 - 12), 0); + v7 = *a2; + v8 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v7 - 12)) = v8; + this[2] = (int)&off_51ADD4; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + std::locale::locale(this + 9); + this[12] = 0; + this[10] = a3 | 8; + this[11] = (int)(this + 13); + v9 = *this; + *((_BYTE *)this + 52) = 0; + this[2] = (int)&off_51A2D8; + std::ios::init((int)this + *(_DWORD *)(v9 - 12), (int)(this + 2)); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004ED110) -------------------------------------------------------- +void __thiscall std::istringstream::basic_istringstream(int *this, int *a2) +{ + int v3; // eax + int v4; // ecx + int v5; // edx + int v6; // eax + int v7; // edx + int v8; // eax + int v9; // ecx + + v3 = a2[1]; + v4 = a2[2]; + v5 = *(_DWORD *)(v3 - 12); + *this = v3; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + std::ios::init((int)this + *(_DWORD *)(v3 - 12), 0); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + this[2] = (int)&off_51ADD4; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + std::locale::locale(this + 9); + this[12] = 0; + this[11] = (int)(this + 13); + v8 = *this; + *((_BYTE *)this + 52) = 0; + this[2] = (int)&off_51A2D8; + v9 = *(_DWORD *)(v8 - 12); + this[10] = 8; + std::ios::init((int)this + v9, (int)(this + 2)); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004ED260) -------------------------------------------------------- +void __fastcall std::istringstream::~istringstream(_DWORD *Block) +{ + _DWORD *v2; // eax + + v2 = (_DWORD *)Block[11]; + *Block = &off_51A57C; + Block[17] = off_51A590; + Block[2] = &off_51A2D8; + if ( v2 != Block + 13 ) + operator delete(v2); + Block[2] = &off_51ADD4; + std::locale::~locale((_DWORD **)Block + 9); + *Block = &unk_515860; + Block[1] = 0; + Block[17] = &off_51B7D0; + std::ios_base::~ios_base((int)(Block + 17)); + operator delete(Block); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A57C: using guessed type int (*off_51A57C)(); +// 51A590: using guessed type int (*off_51A590[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004ED2D0) -------------------------------------------------------- +void __fastcall std::istringstream::~istringstream(int a1) +{ + void *Block; // eax + + Block = *(void **)(a1 + 44); + *(_DWORD *)a1 = &off_51A57C; + *(_DWORD *)(a1 + 68) = off_51A590; + *(_DWORD *)(a1 + 8) = &off_51A2D8; + if ( Block != (void *)(a1 + 52) ) + operator delete(Block); + *(_DWORD *)(a1 + 8) = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 36)); + *(_DWORD *)a1 = &unk_515860; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 68) = &off_51B7D0; + std::ios_base::~ios_base(a1 + 68); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A57C: using guessed type int (*off_51A57C)(); +// 51A590: using guessed type int (*off_51A590[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004ED330) -------------------------------------------------------- +int __thiscall std::istringstream::~istringstream(int *this, int *a2) +{ + int v3; // eax + int *Block; // eax + int v5; // eax + int result; // eax + + v3 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = a2[3]; + Block = (int *)this[11]; + this[2] = (int)&off_51A2D8; + if ( Block != this + 13 ) + operator delete(Block); + this[2] = (int)&off_51ADD4; + std::locale::~locale((_DWORD **)this + 9); + v5 = a2[1]; + *this = v5; + result = *(_DWORD *)(v5 - 12); + *(int *)((char *)this + result) = a2[2]; + this[1] = 0; + return result; +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004ED390) -------------------------------------------------------- +_DWORD *__thiscall std::istringstream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + char v6; // cl + char v7; // cl + int v8; // eax + std::ios_base *v10; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v10); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + v8 = this[1]; + *((_BYTE *)v4 + 117) = v7; + this[1] = a2[1]; + a2[1] = v8; + std::stringbuf::operator=(this + 2, (int)(a2 + 2)); + return this; +} +// 4ED3D0: variable 'v10' is possibly undefined + +//----- (004ED470) -------------------------------------------------------- +_DWORD *__thiscall std::wistringstream::str(int this, int a2) +{ + _DWORD *v2; // esi + unsigned int v4; // eax + + v2 = (_DWORD *)(this + 8); + std::wstring::_M_replace((unsigned int **)(this + 44), 0, *(_DWORD *)(this + 48), *(char **)a2, *(_DWORD *)(a2 + 4)); + v4 = 0; + if ( (*(_BYTE *)(this + 40) & 3) != 0 ) + v4 = *(_DWORD *)(this + 48); + return std::wstringbuf::_M_sync(v2, *(_DWORD **)(this + 44), 0, v4); +} + +//----- (004ED4E0) -------------------------------------------------------- +void __thiscall std::wistringstream::swap(volatile signed __int32 **this, _DWORD *a2) +{ + std::ios_base **v3; // edi + std::ios_base *v4; // esi + std::ios_base *v5; // edx + __int16 v6; // cx + volatile signed __int32 *v7; // edx + std::ios_base *v8; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *((_DWORD *)*this - 3)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = (volatile signed __int32 *)a2[1]; + a2[1] = v7; + std::wstringbuf::swap(this + 2, a2 + 2); +} +// 4ED520: variable 'v8' is possibly undefined + +//----- (004ED5C0) -------------------------------------------------------- +void __thiscall std::wistringstream::basic_istringstream(_DWORD *this, _DWORD *a2) +{ + int v2; // eax + int v3; // eax + std::ios_base *v4; // edx + int v5; // eax + int v6; // edx + unsigned int v7; // eax + int v8; // ecx + int v9; // eax + _DWORD *v10; // esi + _DWORD *v11; // eax + int v12; // ecx + int v13; // ebx + char *v14; // ecx + int v15; // edx + std::ios_base *v16; // [esp+4h] [ebp-B4h] + const std::locale *v17; // [esp+4h] [ebp-B4h] + struct _Unwind_Exception *lpuexcpta; // [esp+20h] [ebp-98h] + struct _Unwind_Exception *lpuexcpt; // [esp+20h] [ebp-98h] + _DWORD *v20; // [esp+24h] [ebp-94h] + int v22; // [esp+70h] [ebp-48h] + int v23; // [esp+74h] [ebp-44h] + int v24; // [esp+78h] [ebp-40h] + __int64 v25; // [esp+80h] [ebp-38h] + int v26; // [esp+88h] [ebp-30h] + int v27; // [esp+8Ch] [ebp-2Ch] + int v28; // [esp+90h] [ebp-28h] + int v29; // [esp+98h] [ebp-20h] + + v20 = this + 17; + std::ios_base::ios_base(this + 17); + v2 = a2[1]; + this[45] = 0; + this[1] = v2; + *((_WORD *)this + 92) = 0; + v3 = *a2; + *this = &unk_515888; + *((_BYTE *)this + 186) = 0; + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(v3 - 12)); + this[47] = 0; + this[48] = 0; + this[49] = 0; + this[50] = 0; + this[17] = &unk_51589C; + lpuexcpta = v4; + std::ios_base::_M_move((int)v20, v4, v16); + std::wios::_M_cache_locale(v20, (int)(this + 44)); + v22 = -1; + v23 = -1; + v5 = *((_DWORD *)lpuexcpta + 28); + *((_DWORD *)lpuexcpta + 28) = 0; + this[47] = 0; + this[45] = v5; + v24 = -1; + *((_WORD *)this + 92) = *((_WORD *)lpuexcpta + 58); + v6 = a2[11]; + *((_BYTE *)this + 186) = *((_BYTE *)lpuexcpta + 118); + LODWORD(v25) = -1; + a2[1] = 0; + lpuexcpt = (struct _Unwind_Exception *)(this + 2); + v7 = a2[3]; + *this = &off_51A5A4; + this[17] = off_51A5B8; + v26 = -1; + v27 = -1; + v28 = -1; + v29 = -1; + if ( !v7 ) + { + v8 = a2[6]; + if ( !v8 ) + goto LABEL_7; + goto LABEL_3; + } + v22 = (int)(v7 - v6) >> 1; + v23 = (int)(v7 - v6) >> 31; + v24 = (a2[4] - v6) >> 1; + v7 = a2[5]; + v25 = (int)(v7 - v6) >> 1; + v8 = a2[6]; + if ( v8 ) + { +LABEL_3: + v26 = (v8 - v6) >> 1; + v27 = (v8 - v6) >> 31; + v28 = (a2[7] - v8) >> 1; + v29 = (a2[8] - v6) >> 1; + if ( v7 < a2[7] ) + v7 = a2[7]; + } + if ( v7 ) + a2[12] = (int)(v7 - v6) >> 1; +LABEL_7: + std::wstreambuf::basic_streambuf(lpuexcpt, (std::locale *)(a2 + 2), v17); + v9 = a2[10]; + this[2] = &off_51A318; + this[11] = this + 13; + v10 = a2 + 13; + this[10] = v9; + v11 = (_DWORD *)a2[11]; + if ( v11 == a2 + 13 ) + { + this[13] = a2[13]; + this[14] = a2[14]; + this[15] = a2[15]; + this[16] = a2[16]; + } + else + { + this[11] = v11; + this[13] = a2[13]; + } + this[12] = a2[12]; + a2[11] = v10; + *((_WORD *)a2 + 26) = 0; + v12 = this[11]; + a2[12] = 0; + if ( (v22 & v23) != -1 ) + { + this[3] = v12 + 2 * v22; + this[4] = v12 + 2 * v24; + this[5] = v12 + 2 * v25; + } + if ( (v26 & v27) != -1 ) + { + v13 = v12 + 2 * v26; + this[8] = v12 + 2 * v29; + this[6] = v13; + this[7] = v13 + 2 * v28; + } + v14 = (char *)a2 + 66; + v15 = a2[10] & 0x10; + if ( (a2[10] & 8) != 0 ) + { + a2[3] = v10; + a2[4] = v10; + a2[5] = v10; + if ( v15 ) + { + a2[7] = v10; + a2[6] = v10; + a2[8] = v14; + } + } + else if ( v15 ) + { + a2[7] = v10; + a2[6] = v10; + a2[8] = v14; + a2[3] = v10; + a2[4] = v10; + a2[5] = v10; + } + this[47] = lpuexcpt; +} +// 4ED8FD: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4ED689: variable 'v16' is possibly undefined +// 4ED828: variable 'v17' is possibly undefined +// 51A318: using guessed type int (*off_51A318)(); +// 51A5A4: using guessed type int (*off_51A5A4)(); +// 51A5B8: using guessed type int (*off_51A5B8[2])(); + +//----- (004EDA50) -------------------------------------------------------- +void __thiscall std::wistringstream::basic_istringstream(_DWORD *this, int a2, int a3) +{ + int v3; // edx + _WORD *v4; // eax + unsigned int v5; // eax + _DWORD *v6; // [esp+20h] [ebp-48h] + _DWORD *v7; // [esp+24h] [ebp-44h] + + v6 = this + 17; + std::ios_base::ios_base(this + 17); + this[45] = 0; + *((_WORD *)this + 92) = 0; + *((_BYTE *)this + 186) = 0; + this[47] = 0; + this[48] = 0; + this[49] = 0; + this[50] = 0; + *this = &unk_515888; + this[17] = &unk_51589C; + this[1] = 0; + std::wios::init((int)v6, 0); + *this = &off_51A5A4; + this[17] = off_51A5B8; + this[2] = &off_51AE14; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + v7 = this + 2; + std::locale::locale(this + 9); + v3 = *(_DWORD *)(a2 + 4); + v4 = *(_WORD **)a2; + this[2] = &off_51A318; + this[10] = 0; + this[11] = this + 13; + std::wstring::_M_construct(this + 11, v4, (int)&v4[v3]); + v5 = 0; + this[10] = a3 | 8; + if ( (a3 & 3) != 0 ) + v5 = this[12]; + std::wstringbuf::_M_sync(v7, (_DWORD *)this[11], 0, v5); + std::wios::init((int)v6, (int)v7); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5A4: using guessed type int (*off_51A5A4)(); +// 51A5B8: using guessed type int (*off_51A5B8[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EDC70) -------------------------------------------------------- +void __thiscall std::wistringstream::basic_istringstream(_DWORD *this, int a2) +{ + _DWORD *v2; // [esp+24h] [ebp-44h] + + v2 = this + 17; + std::ios_base::ios_base(this + 17); + this[45] = 0; + *((_WORD *)this + 92) = 0; + *((_BYTE *)this + 186) = 0; + this[47] = 0; + this[48] = 0; + this[49] = 0; + this[50] = 0; + *this = &unk_515888; + this[17] = &unk_51589C; + this[1] = 0; + std::wios::init((int)v2, 0); + *this = &off_51A5A4; + this[17] = off_51A5B8; + this[2] = &off_51AE14; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + std::locale::locale(this + 9); + this[2] = &off_51A318; + this[10] = a2 | 8; + this[11] = this + 13; + this[12] = 0; + *((_WORD *)this + 26) = 0; + std::wios::init((int)v2, (int)(this + 2)); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5A4: using guessed type int (*off_51A5A4)(); +// 51A5B8: using guessed type int (*off_51A5B8[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EDE10) -------------------------------------------------------- +void __fastcall std::wistringstream::basic_istringstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 68; + std::ios_base::ios_base((_DWORD *)(a1 + 68)); + *(_DWORD *)(a1 + 180) = 0; + *(_WORD *)(a1 + 184) = 0; + *(_BYTE *)(a1 + 186) = 0; + *(_DWORD *)(a1 + 188) = 0; + *(_DWORD *)(a1 + 192) = 0; + *(_DWORD *)(a1 + 196) = 0; + *(_DWORD *)(a1 + 200) = 0; + *(_DWORD *)a1 = &unk_515888; + *(_DWORD *)(a1 + 68) = &unk_51589C; + *(_DWORD *)(a1 + 4) = 0; + std::wios::init(v1, 0); + *(_DWORD *)a1 = &off_51A5A4; + *(_DWORD *)(a1 + 68) = off_51A5B8; + *(_DWORD *)(a1 + 8) = &off_51AE14; + *(_DWORD *)(a1 + 12) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 24) = 0; + *(_DWORD *)(a1 + 28) = 0; + *(_DWORD *)(a1 + 32) = 0; + std::locale::locale((_DWORD *)(a1 + 36)); + *(_DWORD *)(a1 + 8) = &off_51A318; + *(_DWORD *)(a1 + 44) = a1 + 52; + *(_DWORD *)(a1 + 40) = 8; + *(_DWORD *)(a1 + 48) = 0; + *(_WORD *)(a1 + 52) = 0; + std::wios::init(v1, a1 + 8); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5A4: using guessed type int (*off_51A5A4)(); +// 51A5B8: using guessed type int (*off_51A5B8[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EDFB0) -------------------------------------------------------- +void __thiscall std::wistringstream::basic_istringstream(int *this, int *a2, _DWORD *a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + int v10; // edx + unsigned int v11; // eax + int v12; // ecx + int v13; // eax + _DWORD *v14; // esi + _DWORD *v15; // eax + int v16; // ecx + int v17; // ebx + char *v18; // ecx + int v19; // edx + std::ios_base *v20; // [esp+4h] [ebp-A4h] + const std::locale *v21; // [esp+4h] [ebp-A4h] + std::ios_base *v22; // [esp+10h] [ebp-98h] + int *v23; // [esp+10h] [ebp-98h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-94h] + int v26; // [esp+60h] [ebp-48h] + int v27; // [esp+64h] [ebp-44h] + int v28; // [esp+68h] [ebp-40h] + __int64 v29; // [esp+70h] [ebp-38h] + int v30; // [esp+78h] [ebp-30h] + int v31; // [esp+7Ch] [ebp-2Ch] + int v32; // [esp+80h] [ebp-28h] + int v33; // [esp+88h] [ebp-20h] + + v4 = a2[1]; + v5 = a2[2]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = a3[1]; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v4 - 12)); + v22 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)lpuexcpt, v22, v20); + std::wios::_M_cache_locale(lpuexcpt, (int)lpuexcpt + 108); + v7 = *((_DWORD *)v22 + 28); + *((_DWORD *)lpuexcpt + 30) = 0; + *((_DWORD *)v22 + 28) = 0; + *((_DWORD *)lpuexcpt + 28) = v7; + *((_WORD *)lpuexcpt + 58) = *((_WORD *)v22 + 58); + *((_BYTE *)lpuexcpt + 118) = *((_BYTE *)v22 + 118); + a3[1] = 0; + v8 = a2[3]; + v9 = *a2; + *this = *a2; + v26 = -1; + *(int *)((char *)this + *(_DWORD *)(v9 - 12)) = v8; + v23 = this + 2; + v27 = -1; + v28 = -1; + LODWORD(v29) = -1; + v30 = -1; + v31 = -1; + v32 = -1; + v33 = -1; + v10 = a3[11]; + v11 = a3[3]; + if ( !v11 ) + { + v12 = a3[6]; + if ( !v12 ) + goto LABEL_7; + goto LABEL_3; + } + v26 = (int)(v11 - v10) >> 1; + v27 = (int)(v11 - v10) >> 31; + v28 = (a3[4] - v10) >> 1; + v11 = a3[5]; + v29 = (int)(v11 - v10) >> 1; + v12 = a3[6]; + if ( v12 ) + { +LABEL_3: + v30 = (v12 - v10) >> 1; + v31 = (v12 - v10) >> 31; + v32 = (a3[7] - v12) >> 1; + v33 = (a3[8] - v10) >> 1; + if ( v11 < a3[7] ) + v11 = a3[7]; + } + if ( v11 ) + a3[12] = (int)(v11 - v10) >> 1; +LABEL_7: + std::wstreambuf::basic_streambuf(v23, (std::locale *)(a3 + 2), v21); + v13 = a3[10]; + this[2] = (int)&off_51A318; + this[11] = (int)(this + 13); + v14 = a3 + 13; + this[10] = v13; + v15 = (_DWORD *)a3[11]; + if ( v15 == a3 + 13 ) + { + this[13] = a3[13]; + this[14] = a3[14]; + this[15] = a3[15]; + this[16] = a3[16]; + } + else + { + this[11] = (int)v15; + this[13] = a3[13]; + } + this[12] = a3[12]; + a3[11] = v14; + *((_WORD *)a3 + 26) = 0; + v16 = this[11]; + a3[12] = 0; + if ( (v26 & v27) != -1 ) + { + this[3] = v16 + 2 * v26; + this[4] = v16 + 2 * v28; + this[5] = v16 + 2 * v29; + } + if ( (v30 & v31) != -1 ) + { + v17 = v16 + 2 * v30; + this[8] = v16 + 2 * v33; + this[6] = v17; + this[7] = v17 + 2 * v32; + } + v18 = (char *)a3 + 66; + v19 = a3[10] & 0x10; + if ( (a3[10] & 8) != 0 ) + { + a3[3] = v14; + a3[4] = v14; + a3[5] = v14; + if ( v19 ) + { + a3[7] = v14; + a3[6] = v14; + a3[8] = v18; + } + } + else if ( v19 ) + { + a3[7] = v14; + a3[6] = v14; + a3[8] = v18; + a3[3] = v14; + a3[4] = v14; + a3[5] = v14; + } + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)v23; +} +// 4EE29B: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4EE02B: variable 'v20' is possibly undefined +// 4EE1C6: variable 'v21' is possibly undefined +// 51A318: using guessed type int (*off_51A318)(); + +//----- (004EE3D0) -------------------------------------------------------- +void __thiscall std::wistringstream::basic_istringstream(int *this, int *a2, int a3, int a4) +{ + int v5; // eax + int v6; // ecx + int v7; // edx + int v8; // eax + int v9; // edx + int v10; // edx + _WORD *v11; // eax + unsigned int v12; // eax + int *v13; // [esp+24h] [ebp-44h] + + v5 = a2[1]; + v6 = a2[2]; + v7 = *(_DWORD *)(v5 - 12); + *this = v5; + *(int *)((char *)this + v7) = v6; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v5 - 12), 0); + v8 = *a2; + v9 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v8 - 12)) = v9; + v13 = this + 2; + this[2] = (int)&off_51AE14; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + std::locale::locale(this + 9); + v10 = *(_DWORD *)(a3 + 4); + v11 = *(_WORD **)a3; + this[2] = (int)&off_51A318; + this[10] = 0; + this[11] = (int)(this + 13); + std::wstring::_M_construct(this + 11, v11, (int)&v11[v10]); + v12 = 0; + this[10] = a4 | 8; + if ( (a4 & 3) != 0 ) + v12 = this[12]; + std::wstringbuf::_M_sync(v13, (_DWORD *)this[11], 0, v12); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)v13); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EE5A0) -------------------------------------------------------- +void __thiscall std::wistringstream::basic_istringstream(int *this, int *a2, int a3) +{ + int v4; // eax + int v5; // ecx + int v6; // edx + int v7; // eax + int v8; // edx + int v9; // eax + + v4 = a2[1]; + v5 = a2[2]; + v6 = *(_DWORD *)(v4 - 12); + *this = v4; + *(int *)((char *)this + v6) = v5; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v4 - 12), 0); + v7 = *a2; + v8 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v7 - 12)) = v8; + this[2] = (int)&off_51AE14; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + std::locale::locale(this + 9); + this[12] = 0; + this[10] = a3 | 8; + this[11] = (int)(this + 13); + *((_WORD *)this + 26) = 0; + v9 = *this; + this[2] = (int)&off_51A318; + std::wios::init((int)this + *(_DWORD *)(v9 - 12), (int)(this + 2)); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EE700) -------------------------------------------------------- +void __thiscall std::wistringstream::basic_istringstream(int *this, int *a2) +{ + int v3; // eax + int v4; // ecx + int v5; // edx + int v6; // eax + int v7; // edx + int v8; // eax + int v9; // ecx + + v3 = a2[1]; + v4 = a2[2]; + v5 = *(_DWORD *)(v3 - 12); + *this = v3; + *(int *)((char *)this + v5) = v4; + this[1] = 0; + std::wios::init((int)this + *(_DWORD *)(v3 - 12), 0); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + this[2] = (int)&off_51AE14; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + this[8] = 0; + std::locale::locale(this + 9); + this[12] = 0; + this[11] = (int)(this + 13); + *((_WORD *)this + 26) = 0; + v8 = *this; + this[2] = (int)&off_51A318; + v9 = *(_DWORD *)(v8 - 12); + this[10] = 8; + std::wios::init((int)this + v9, (int)(this + 2)); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EE850) -------------------------------------------------------- +void __fastcall std::wistringstream::~wistringstream(_DWORD *Block) +{ + _DWORD *v2; // eax + + v2 = (_DWORD *)Block[11]; + *Block = &off_51A5A4; + Block[17] = off_51A5B8; + Block[2] = &off_51A318; + if ( v2 != Block + 13 ) + operator delete(v2); + Block[2] = &off_51AE14; + std::locale::~locale((_DWORD **)Block + 9); + *Block = &unk_515888; + Block[1] = 0; + Block[17] = &off_51B7E0; + std::ios_base::~ios_base((int)(Block + 17)); + operator delete(Block); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5A4: using guessed type int (*off_51A5A4)(); +// 51A5B8: using guessed type int (*off_51A5B8[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004EE8C0) -------------------------------------------------------- +void __fastcall std::wistringstream::~wistringstream(int a1) +{ + void *Block; // eax + + Block = *(void **)(a1 + 44); + *(_DWORD *)a1 = &off_51A5A4; + *(_DWORD *)(a1 + 68) = off_51A5B8; + *(_DWORD *)(a1 + 8) = &off_51A318; + if ( Block != (void *)(a1 + 52) ) + operator delete(Block); + *(_DWORD *)(a1 + 8) = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 36)); + *(_DWORD *)a1 = &unk_515888; + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)(a1 + 68) = &off_51B7E0; + std::ios_base::~ios_base(a1 + 68); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5A4: using guessed type int (*off_51A5A4)(); +// 51A5B8: using guessed type int (*off_51A5B8[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004EE920) -------------------------------------------------------- +int __thiscall std::wistringstream::~wistringstream(int *this, int *a2) +{ + int v3; // eax + int *Block; // eax + int v5; // eax + int result; // eax + + v3 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = a2[3]; + Block = (int *)this[11]; + this[2] = (int)&off_51A318; + if ( Block != this + 13 ) + operator delete(Block); + this[2] = (int)&off_51AE14; + std::locale::~locale((_DWORD **)this + 9); + v5 = a2[1]; + *this = v5; + result = *(_DWORD *)(v5 - 12); + *(int *)((char *)this + result) = a2[2]; + this[1] = 0; + return result; +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004EE980) -------------------------------------------------------- +_DWORD *__thiscall std::wistringstream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + __int16 v6; // cx + int v7; // eax + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + v7 = this[1]; + *((_BYTE *)v4 + 118) = v6; + this[1] = a2[1]; + a2[1] = v7; + std::wstringbuf::operator=(this + 2, (int)(a2 + 2)); + return this; +} +// 4EE9C0: variable 'v9' is possibly undefined + +//----- (004EEA60) -------------------------------------------------------- +int __thiscall std::ostringstream::str(int this, int a2) +{ + _DWORD *v2; // esi + unsigned int v4; // eax + + v2 = (_DWORD *)(this + 4); + std::string::_M_replace((unsigned int **)(this + 40), 0, *(_DWORD *)(this + 44), *(char **)a2, *(_DWORD *)(a2 + 4)); + v4 = 0; + if ( (*(_BYTE *)(this + 36) & 3) != 0 ) + v4 = *(_DWORD *)(this + 44); + return std::stringbuf::_M_sync(v2, *(_DWORD **)(this + 40), 0, v4); +} + +//----- (004EEAD0) -------------------------------------------------------- +void __thiscall std::ostringstream::swap(volatile signed __int32 **this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // edx + char v6; // cl + char v7; // cl + std::ios_base *v8; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *((_DWORD *)*this - 3)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + *((_BYTE *)v4 + 117) = v7; + std::stringbuf::swap(this + 1, a2 + 1); +} +// 4EEB10: variable 'v8' is possibly undefined + +//----- (004EEBA0) -------------------------------------------------------- +void __thiscall std::ostringstream::basic_ostringstream(_DWORD *this, _DWORD *a2) +{ + int v2; // eax + int v3; // edx + unsigned int v4; // eax + int v5; // ecx + int v6; // eax + _DWORD *v7; // eax + int v8; // ebx + int v9; // ecx + int v10; // ebx + _DWORD *v11; // eax + int v12; // edx + int v13; // ecx + char *v14; // ecx + std::ios_base *v15; // [esp+4h] [ebp-B4h] + const std::locale *v16; // [esp+4h] [ebp-B4h] + struct _Unwind_Exception *lpuexcpta; // [esp+20h] [ebp-98h] + struct _Unwind_Exception *lpuexcpt; // [esp+20h] [ebp-98h] + _DWORD *v19; // [esp+24h] [ebp-94h] + _DWORD *v20; // [esp+24h] [ebp-94h] + __int64 v22; // [esp+70h] [ebp-48h] + int v23; // [esp+78h] [ebp-40h] + __int64 v24; // [esp+80h] [ebp-38h] + __int64 v25; // [esp+88h] [ebp-30h] + int v26; // [esp+90h] [ebp-28h] + int v27; // [esp+98h] [ebp-20h] + + v19 = this + 16; + std::ios_base::ios_base(this + 16); + this[44] = 0; + *((_WORD *)this + 90) = 0; + this[46] = 0; + this[47] = 0; + this[48] = 0; + this[49] = 0; + *this = &unk_5158B0; + this[16] = &unk_5158C4; + lpuexcpta = (struct _Unwind_Exception *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_move((int)v19, lpuexcpta, v15); + std::ios::_M_cache_locale(v19, (int)(this + 43)); + v22 = -1LL; + v2 = *((_DWORD *)lpuexcpta + 28); + *this = &off_51A5CC; + *((_DWORD *)lpuexcpta + 28) = 0; + this[44] = v2; + LOWORD(v2) = *((_WORD *)lpuexcpta + 58); + this[46] = 0; + *((_WORD *)this + 90) = v2; + lpuexcpt = (struct _Unwind_Exception *)(this + 1); + v3 = a2[10]; + v4 = a2[2]; + this[16] = off_51A5E0; + v23 = -1; + LODWORD(v24) = -1; + v25 = -1LL; + v26 = -1; + v27 = -1; + if ( !v4 ) + { + v5 = a2[5]; + if ( !v5 ) + goto LABEL_7; + goto LABEL_3; + } + v22 = (int)(v4 - v3); + v23 = a2[3] - v3; + v4 = a2[4]; + v24 = (int)(v4 - v3); + v5 = a2[5]; + if ( v5 ) + { +LABEL_3: + v25 = v5 - v3; + v26 = a2[6] - v5; + v27 = a2[7] - v3; + if ( v4 < a2[6] ) + v4 = a2[6]; + } + if ( v4 ) + a2[11] = v4 - v3; +LABEL_7: + std::streambuf::basic_streambuf(lpuexcpt, (std::locale *)(a2 + 1), v16); + v6 = a2[9]; + this[1] = &off_51A2D8; + this[10] = this + 12; + this[9] = v6; + v20 = a2 + 12; + v7 = (_DWORD *)a2[10]; + if ( v7 == a2 + 12 ) + { + this[12] = a2[12]; + this[13] = a2[13]; + this[14] = a2[14]; + this[15] = a2[15]; + } + else + { + this[10] = v7; + this[12] = a2[12]; + } + this[11] = a2[11]; + *((_BYTE *)a2 + 48) = 0; + a2[10] = v20; + a2[11] = 0; + v8 = this[10]; + if ( ((unsigned int)v22 & HIDWORD(v22)) != -1 ) + { + this[2] = v8 + v22; + this[3] = v8 + v23; + this[4] = v8 + v24; + } + if ( ((unsigned int)v25 & HIDWORD(v25)) != -1 ) + { + v9 = v8 + v27; + v10 = v25 + v8; + this[7] = v9; + this[5] = v10; + this[6] = v10 + v26; + } + v11 = (_DWORD *)a2[10]; + v12 = a2[9] & 0x10; + if ( v11 == v20 ) + v13 = 15; + else + v13 = a2[12]; + v14 = (char *)v11 + v13; + if ( (a2[9] & 8) != 0 ) + { + a2[2] = v11; + a2[3] = v11; + a2[4] = v11; + if ( v12 ) + { + a2[6] = v11; + a2[5] = v11; + a2[7] = v14; + } + } + else if ( v12 ) + { + a2[6] = v11; + a2[5] = v11; + a2[7] = v14; + a2[2] = v11; + a2[3] = v11; + a2[4] = v11; + } + this[46] = lpuexcpt; +} +// 4EEE9F: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4EEC56: variable 'v15' is possibly undefined +// 4EEDD3: variable 'v16' is possibly undefined +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A5CC: using guessed type int (*off_51A5CC)(); +// 51A5E0: using guessed type int (*off_51A5E0[2])(); + +//----- (004EF020) -------------------------------------------------------- +void __thiscall std::ostringstream::basic_ostringstream(_DWORD *this, int a2, int a3) +{ + int v3; // eax + _BYTE *v4; // edx + unsigned int v5; // eax + _DWORD *v6; // [esp+20h] [ebp-48h] + _DWORD *v7; // [esp+24h] [ebp-44h] + + v6 = this + 16; + std::ios_base::ios_base(this + 16); + this[44] = 0; + *((_WORD *)this + 90) = 0; + this[46] = 0; + this[47] = 0; + this[48] = 0; + this[49] = 0; + *this = &unk_5158B0; + this[16] = &unk_5158C4; + std::ios::init((int)v6, 0); + *this = &off_51A5CC; + this[16] = off_51A5E0; + this[1] = &off_51ADD4; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + v7 = this + 1; + std::locale::locale(this + 8); + v3 = *(_DWORD *)(a2 + 4); + v4 = *(_BYTE **)a2; + this[1] = &off_51A2D8; + this[9] = 0; + this[10] = this + 12; + std::string::_M_construct(this + 10, v4, (int)&v4[v3]); + v5 = 0; + this[9] = a3 | 0x10; + if ( (a3 & 3) != 0 ) + v5 = this[11]; + std::stringbuf::_M_sync(v7, (_DWORD *)this[10], 0, v5); + std::ios::init((int)v6, (int)v7); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A5CC: using guessed type int (*off_51A5CC)(); +// 51A5E0: using guessed type int (*off_51A5E0[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EF230) -------------------------------------------------------- +void __thiscall std::ostringstream::basic_ostringstream(_DWORD *this, int a2) +{ + _DWORD *v2; // [esp+24h] [ebp-44h] + + v2 = this + 16; + std::ios_base::ios_base(this + 16); + this[44] = 0; + *((_WORD *)this + 90) = 0; + this[46] = 0; + this[47] = 0; + this[48] = 0; + this[49] = 0; + *this = &unk_5158B0; + this[16] = &unk_5158C4; + std::ios::init((int)v2, 0); + *this = &off_51A5CC; + this[16] = off_51A5E0; + this[1] = &off_51ADD4; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + std::locale::locale(this + 8); + this[1] = &off_51A2D8; + this[9] = a2 | 0x10; + this[10] = this + 12; + this[11] = 0; + *((_BYTE *)this + 48) = 0; + std::ios::init((int)v2, (int)(this + 1)); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A5CC: using guessed type int (*off_51A5CC)(); +// 51A5E0: using guessed type int (*off_51A5E0[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EF3C0) -------------------------------------------------------- +void __fastcall std::ostringstream::basic_ostringstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 64; + std::ios_base::ios_base((_DWORD *)(a1 + 64)); + *(_DWORD *)(a1 + 176) = 0; + *(_WORD *)(a1 + 180) = 0; + *(_DWORD *)(a1 + 184) = 0; + *(_DWORD *)(a1 + 188) = 0; + *(_DWORD *)(a1 + 192) = 0; + *(_DWORD *)(a1 + 196) = 0; + *(_DWORD *)a1 = &unk_5158B0; + *(_DWORD *)(a1 + 64) = &unk_5158C4; + std::ios::init(v1, 0); + *(_DWORD *)a1 = &off_51A5CC; + *(_DWORD *)(a1 + 64) = off_51A5E0; + *(_DWORD *)(a1 + 4) = &off_51ADD4; + *(_DWORD *)(a1 + 8) = 0; + *(_DWORD *)(a1 + 12) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 24) = 0; + *(_DWORD *)(a1 + 28) = 0; + std::locale::locale((_DWORD *)(a1 + 32)); + *(_DWORD *)(a1 + 4) = &off_51A2D8; + *(_DWORD *)(a1 + 36) = 16; + *(_DWORD *)(a1 + 40) = a1 + 48; + *(_DWORD *)(a1 + 44) = 0; + *(_BYTE *)(a1 + 48) = 0; + std::ios::init(v1, a1 + 4); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A5CC: using guessed type int (*off_51A5CC)(); +// 51A5E0: using guessed type int (*off_51A5E0[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EF550) -------------------------------------------------------- +void __thiscall std::ostringstream::basic_ostringstream(int *this, int *a2, _DWORD *a3) +{ + int v4; // eax + int v5; // eax + int v6; // eax + int v7; // edx + int v8; // edx + unsigned int v9; // eax + int v10; // ecx + int v11; // eax + _DWORD *v12; // eax + int v13; // ebx + int v14; // ecx + int v15; // ebx + struct _Unwind_Exception *v16; // eax + int v17; // edx + int v18; // ecx + char *v19; // ecx + std::ios_base *v20; // [esp+4h] [ebp-A4h] + const std::locale *v21; // [esp+4h] [ebp-A4h] + std::ios_base *v22; // [esp+10h] [ebp-98h] + int *v23; // [esp+10h] [ebp-98h] + struct _Unwind_Exception *lpuexcpta; // [esp+14h] [ebp-94h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-94h] + __int64 v27; // [esp+60h] [ebp-48h] + int v28; // [esp+68h] [ebp-40h] + __int64 v29; // [esp+70h] [ebp-38h] + __int64 v30; // [esp+78h] [ebp-30h] + int v31; // [esp+80h] [ebp-28h] + int v32; // [esp+88h] [ebp-20h] + + v4 = a2[1]; + *this = v4; + lpuexcpta = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v4 - 12)); + *(_DWORD *)lpuexcpta = a2[2]; + v22 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)lpuexcpta, v22, v20); + std::ios::_M_cache_locale(lpuexcpta, (int)lpuexcpta + 108); + v5 = *((_DWORD *)v22 + 28); + *((_DWORD *)lpuexcpta + 30) = 0; + *((_DWORD *)v22 + 28) = 0; + *((_DWORD *)lpuexcpta + 28) = v5; + *((_WORD *)lpuexcpta + 58) = *((_WORD *)v22 + 58); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + v27 = -1LL; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + v23 = this + 1; + v28 = -1; + LODWORD(v29) = -1; + v30 = -1LL; + v31 = -1; + v32 = -1; + v8 = a3[10]; + v9 = a3[2]; + if ( !v9 ) + { + v10 = a3[5]; + if ( !v10 ) + goto LABEL_7; + goto LABEL_3; + } + v27 = (int)(v9 - v8); + v28 = a3[3] - v8; + v9 = a3[4]; + v29 = (int)(v9 - v8); + v10 = a3[5]; + if ( v10 ) + { +LABEL_3: + v30 = v10 - v8; + v31 = a3[6] - v10; + v32 = a3[7] - v8; + if ( v9 < a3[6] ) + v9 = a3[6]; + } + if ( v9 ) + a3[11] = v9 - v8; +LABEL_7: + std::streambuf::basic_streambuf(v23, (std::locale *)(a3 + 1), v21); + v11 = a3[9]; + this[1] = (int)&off_51A2D8; + this[10] = (int)(this + 12); + this[9] = v11; + lpuexcpt = (struct _Unwind_Exception *)(a3 + 12); + v12 = (_DWORD *)a3[10]; + if ( v12 == a3 + 12 ) + { + this[12] = a3[12]; + this[13] = a3[13]; + this[14] = a3[14]; + this[15] = a3[15]; + } + else + { + this[10] = (int)v12; + this[12] = a3[12]; + } + this[11] = a3[11]; + a3[10] = lpuexcpt; + *((_BYTE *)a3 + 48) = 0; + v13 = this[10]; + a3[11] = 0; + if ( ((unsigned int)v27 & HIDWORD(v27)) != -1 ) + { + this[2] = v13 + v27; + this[3] = v13 + v28; + this[4] = v13 + v29; + } + if ( ((unsigned int)v30 & HIDWORD(v30)) != -1 ) + { + v14 = v13 + v32; + v15 = v30 + v13; + this[7] = v14; + this[5] = v15; + this[6] = v15 + v31; + } + v16 = (struct _Unwind_Exception *)a3[10]; + v17 = a3[9] & 0x10; + if ( v16 == lpuexcpt ) + v18 = 15; + else + v18 = a3[12]; + v19 = (char *)v16 + v18; + if ( (a3[9] & 8) != 0 ) + { + a3[2] = v16; + a3[3] = v16; + a3[4] = v16; + if ( v17 ) + { + a3[6] = v16; + a3[5] = v16; + a3[7] = v19; + } + } + else if ( v17 ) + { + a3[6] = v16; + a3[5] = v16; + a3[7] = v19; + a3[2] = v16; + a3[3] = v16; + a3[4] = v16; + } + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)v23; +} +// 4EF80A: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4EF5C2: variable 'v20' is possibly undefined +// 4EF73E: variable 'v21' is possibly undefined +// 51A2D8: using guessed type int (*off_51A2D8)(); + +//----- (004EF960) -------------------------------------------------------- +void __thiscall std::ostringstream::basic_ostringstream(int *this, int *a2, int a3, int a4) +{ + int v5; // eax + _DWORD *v6; // ecx + int v7; // eax + int v8; // edx + _BYTE *v9; // edx + int v10; // eax + unsigned int v11; // eax + int *v12; // [esp+24h] [ebp-44h] + + v5 = a2[1]; + *this = v5; + v6 = (int *)((char *)this + *(_DWORD *)(v5 - 12)); + *v6 = a2[2]; + std::ios::init((int)v6, 0); + v7 = *a2; + v8 = a2[3]; + *this = *a2; + v12 = this + 1; + *(int *)((char *)this + *(_DWORD *)(v7 - 12)) = v8; + this[1] = (int)&off_51ADD4; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + std::locale::locale(this + 8); + v9 = *(_BYTE **)a3; + v10 = *(_DWORD *)(a3 + 4); + this[1] = (int)&off_51A2D8; + this[9] = 0; + this[10] = (int)(this + 12); + std::string::_M_construct(this + 10, v9, (int)&v9[v10]); + v11 = 0; + this[9] = a4 | 0x10; + if ( (a4 & 3) != 0 ) + v11 = this[11]; + std::stringbuf::_M_sync(v12, (_DWORD *)this[10], 0, v11); + std::ios::init((int)this + *(_DWORD *)(*this - 12), (int)v12); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EFB20) -------------------------------------------------------- +void __thiscall std::ostringstream::basic_ostringstream(int *this, int *a2, int a3) +{ + int v3; // eax + _DWORD *v4; // ecx + int v5; // eax + int v6; // edx + int v7; // eax + int v8; // ecx + + v3 = a2[1]; + *this = v3; + v4 = (int *)((char *)this + *(_DWORD *)(v3 - 12)); + *v4 = a2[2]; + std::ios::init((int)v4, 0); + v5 = *a2; + v6 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v5 - 12)) = v6; + this[1] = (int)&off_51ADD4; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + std::locale::locale(this + 8); + this[11] = 0; + this[9] = a3 | 0x10; + this[10] = (int)(this + 12); + v7 = *this; + *((_BYTE *)this + 48) = 0; + v8 = *(_DWORD *)(v7 - 12); + this[1] = (int)&off_51A2D8; + std::ios::init((int)this + v8, (int)(this + 1)); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EFC60) -------------------------------------------------------- +void __thiscall std::ostringstream::basic_ostringstream(int *this, int *a2) +{ + int v2; // eax + _DWORD *v3; // ecx + int v4; // eax + int v5; // edx + int v6; // eax + + v2 = a2[1]; + *this = v2; + v3 = (int *)((char *)this + *(_DWORD *)(v2 - 12)); + *v3 = a2[2]; + std::ios::init((int)v3, 0); + v4 = *a2; + v5 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v4 - 12)) = v5; + this[1] = (int)&off_51ADD4; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + std::locale::locale(this + 8); + this[1] = (int)&off_51A2D8; + this[10] = (int)(this + 12); + v6 = *this; + this[9] = 16; + this[11] = 0; + *((_BYTE *)this + 48) = 0; + std::ios::init((int)this + *(_DWORD *)(v6 - 12), (int)(this + 1)); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EFD90) -------------------------------------------------------- +void __fastcall std::ostringstream::~ostringstream(_DWORD *Block) +{ + _DWORD *v2; // eax + + v2 = (_DWORD *)Block[10]; + *Block = &off_51A5CC; + Block[16] = off_51A5E0; + Block[1] = &off_51A2D8; + if ( v2 != Block + 12 ) + operator delete(v2); + Block[1] = &off_51ADD4; + std::locale::~locale((_DWORD **)Block + 8); + *Block = &unk_5158B0; + Block[16] = &off_51B7D0; + std::ios_base::~ios_base((int)(Block + 16)); + operator delete(Block); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A5CC: using guessed type int (*off_51A5CC)(); +// 51A5E0: using guessed type int (*off_51A5E0[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004EFDF0) -------------------------------------------------------- +void __fastcall std::ostringstream::~ostringstream(int a1) +{ + void *Block; // eax + + Block = *(void **)(a1 + 40); + *(_DWORD *)a1 = &off_51A5CC; + *(_DWORD *)(a1 + 64) = off_51A5E0; + *(_DWORD *)(a1 + 4) = &off_51A2D8; + if ( Block != (void *)(a1 + 48) ) + operator delete(Block); + *(_DWORD *)(a1 + 4) = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_5158B0; + *(_DWORD *)(a1 + 64) = &off_51B7D0; + std::ios_base::~ios_base(a1 + 64); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A5CC: using guessed type int (*off_51A5CC)(); +// 51A5E0: using guessed type int (*off_51A5E0[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004EFE50) -------------------------------------------------------- +int __thiscall std::ostringstream::~ostringstream(int *this, int *a2) +{ + int v3; // eax + int *Block; // eax + int v5; // eax + int result; // eax + + v3 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = a2[3]; + Block = (int *)this[10]; + this[1] = (int)&off_51A2D8; + if ( Block != this + 12 ) + operator delete(Block); + this[1] = (int)&off_51ADD4; + std::locale::~locale((_DWORD **)this + 8); + v5 = a2[1]; + *this = v5; + result = *(_DWORD *)(v5 - 12); + *(int *)((char *)this + result) = a2[2]; + return result; +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51ADD4: using guessed type int (*off_51ADD4)(); + +//----- (004EFEB0) -------------------------------------------------------- +_DWORD *__thiscall std::ostringstream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + char v6; // cl + char v7; // cl + std::ios_base *v9; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v9); + std::ios::_M_cache_locale(v3, (int)(v3 + 27)); + std::ios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + *((_DWORD *)v4 + 28) = v5; + v6 = *((_BYTE *)v3 + 116); + *((_BYTE *)v3 + 116) = *((_BYTE *)v4 + 116); + LOBYTE(v5) = *((_BYTE *)v4 + 117); + *((_BYTE *)v4 + 116) = v6; + v7 = *((_BYTE *)v3 + 117); + *((_BYTE *)v3 + 117) = (_BYTE)v5; + *((_BYTE *)v4 + 117) = v7; + std::stringbuf::operator=(this + 1, (int)(a2 + 1)); + return this; +} +// 4EFEF0: variable 'v9' is possibly undefined + +//----- (004EFF80) -------------------------------------------------------- +_DWORD *__thiscall std::wostringstream::str(int this, int a2) +{ + _DWORD *v2; // esi + unsigned int v4; // eax + + v2 = (_DWORD *)(this + 4); + std::wstring::_M_replace((unsigned int **)(this + 40), 0, *(_DWORD *)(this + 44), *(char **)a2, *(_DWORD *)(a2 + 4)); + v4 = 0; + if ( (*(_BYTE *)(this + 36) & 3) != 0 ) + v4 = *(_DWORD *)(this + 44); + return std::wstringbuf::_M_sync(v2, *(_DWORD **)(this + 40), 0, v4); +} + +//----- (004EFFF0) -------------------------------------------------------- +void __thiscall std::wostringstream::swap(volatile signed __int32 **this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // edx + __int16 v6; // cx + std::ios_base *v7; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *((_DWORD *)*this - 3)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v7); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + *((_BYTE *)v4 + 118) = v6; + std::wstringbuf::swap(this + 1, a2 + 1); +} +// 4F0030: variable 'v7' is possibly undefined + +//----- (004F00C0) -------------------------------------------------------- +void __thiscall std::wostringstream::basic_ostringstream(_DWORD *this, _DWORD *a2) +{ + int v2; // eax + int v3; // edx + unsigned int v4; // eax + int v5; // ecx + int v6; // eax + _DWORD *v7; // esi + _DWORD *v8; // eax + int v9; // ecx + int v10; // ebx + char *v11; // ecx + int v12; // edx + std::ios_base *v13; // [esp+4h] [ebp-B4h] + const std::locale *v14; // [esp+4h] [ebp-B4h] + struct _Unwind_Exception *lpuexcpta; // [esp+20h] [ebp-98h] + struct _Unwind_Exception *lpuexcpt; // [esp+20h] [ebp-98h] + _DWORD *v17; // [esp+24h] [ebp-94h] + int v19; // [esp+70h] [ebp-48h] + int v20; // [esp+74h] [ebp-44h] + int v21; // [esp+78h] [ebp-40h] + __int64 v22; // [esp+80h] [ebp-38h] + int v23; // [esp+88h] [ebp-30h] + int v24; // [esp+8Ch] [ebp-2Ch] + int v25; // [esp+90h] [ebp-28h] + int v26; // [esp+98h] [ebp-20h] + + v17 = this + 16; + std::ios_base::ios_base(this + 16); + *((_WORD *)this + 90) = 0; + this[44] = 0; + *((_BYTE *)this + 182) = 0; + this[46] = 0; + this[47] = 0; + this[48] = 0; + this[49] = 0; + *this = &unk_5158D8; + this[16] = &unk_5158EC; + lpuexcpta = (struct _Unwind_Exception *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_move((int)v17, lpuexcpta, v13); + std::wios::_M_cache_locale(v17, (int)(this + 43)); + v19 = -1; + v20 = -1; + v2 = *((_DWORD *)lpuexcpta + 28); + *this = &off_51A5F4; + *((_DWORD *)lpuexcpta + 28) = 0; + this[44] = v2; + LOWORD(v2) = *((_WORD *)lpuexcpta + 58); + this[46] = 0; + *((_WORD *)this + 90) = v2; + LOBYTE(v2) = *((_BYTE *)lpuexcpta + 118); + this[16] = off_51A608; + v3 = a2[10]; + *((_BYTE *)this + 182) = v2; + lpuexcpt = (struct _Unwind_Exception *)(this + 1); + v4 = a2[2]; + v21 = -1; + LODWORD(v22) = -1; + v23 = -1; + v24 = -1; + v25 = -1; + v26 = -1; + if ( !v4 ) + { + v5 = a2[5]; + if ( !v5 ) + goto LABEL_7; + goto LABEL_3; + } + v19 = (int)(v4 - v3) >> 1; + v20 = (int)(v4 - v3) >> 31; + v21 = (a2[3] - v3) >> 1; + v4 = a2[4]; + v22 = (int)(v4 - v3) >> 1; + v5 = a2[5]; + if ( v5 ) + { +LABEL_3: + v23 = (v5 - v3) >> 1; + v24 = (v5 - v3) >> 31; + v25 = (a2[6] - v5) >> 1; + v26 = (a2[7] - v3) >> 1; + if ( v4 < a2[6] ) + v4 = a2[6]; + } + if ( v4 ) + a2[11] = (int)(v4 - v3) >> 1; +LABEL_7: + std::wstreambuf::basic_streambuf(lpuexcpt, (std::locale *)(a2 + 1), v14); + v6 = a2[9]; + this[1] = &off_51A318; + this[10] = this + 12; + v7 = a2 + 12; + this[9] = v6; + v8 = (_DWORD *)a2[10]; + if ( v8 == a2 + 12 ) + { + this[12] = a2[12]; + this[13] = a2[13]; + this[14] = a2[14]; + this[15] = a2[15]; + } + else + { + this[10] = v8; + this[12] = a2[12]; + } + this[11] = a2[11]; + a2[10] = v7; + *((_WORD *)a2 + 24) = 0; + v9 = this[10]; + a2[11] = 0; + if ( (v19 & v20) != -1 ) + { + this[2] = v9 + 2 * v19; + this[3] = v9 + 2 * v21; + this[4] = v9 + 2 * v22; + } + if ( (v23 & v24) != -1 ) + { + v10 = v9 + 2 * v23; + this[7] = v9 + 2 * v26; + this[5] = v10; + this[6] = v10 + 2 * v25; + } + v11 = (char *)a2 + 62; + v12 = a2[9] & 0x10; + if ( (a2[9] & 8) != 0 ) + { + a2[2] = v7; + a2[3] = v7; + a2[4] = v7; + if ( v12 ) + { + a2[6] = v7; + a2[5] = v7; + a2[7] = v11; + } + } + else if ( v12 ) + { + a2[6] = v7; + a2[5] = v7; + a2[7] = v11; + a2[2] = v7; + a2[3] = v7; + a2[4] = v7; + } + this[46] = lpuexcpt; +} +// 4F03E9: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4F017F: variable 'v13' is possibly undefined +// 4F0314: variable 'v14' is possibly undefined +// 51A318: using guessed type int (*off_51A318)(); +// 51A5F4: using guessed type int (*off_51A5F4)(); +// 51A608: using guessed type int (*off_51A608[2])(); + +//----- (004F0530) -------------------------------------------------------- +void __thiscall std::wostringstream::basic_ostringstream(_DWORD *this, int a2, int a3) +{ + int v3; // edx + _WORD *v4; // eax + unsigned int v5; // eax + _DWORD *v6; // [esp+20h] [ebp-48h] + _DWORD *v7; // [esp+24h] [ebp-44h] + + v6 = this + 16; + std::ios_base::ios_base(this + 16); + this[44] = 0; + *((_WORD *)this + 90) = 0; + *((_BYTE *)this + 182) = 0; + this[46] = 0; + this[47] = 0; + this[48] = 0; + this[49] = 0; + *this = &unk_5158D8; + this[16] = &unk_5158EC; + std::wios::init((int)v6, 0); + *this = &off_51A5F4; + this[16] = off_51A608; + this[1] = &off_51AE14; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + v7 = this + 1; + std::locale::locale(this + 8); + v3 = *(_DWORD *)(a2 + 4); + v4 = *(_WORD **)a2; + this[1] = &off_51A318; + this[9] = 0; + this[10] = this + 12; + std::wstring::_M_construct(this + 10, v4, (int)&v4[v3]); + v5 = 0; + this[9] = a3 | 0x10; + if ( (a3 & 3) != 0 ) + v5 = this[11]; + std::wstringbuf::_M_sync(v7, (_DWORD *)this[10], 0, v5); + std::wios::init((int)v6, (int)v7); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5F4: using guessed type int (*off_51A5F4)(); +// 51A608: using guessed type int (*off_51A608[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004F0740) -------------------------------------------------------- +void __thiscall std::wostringstream::basic_ostringstream(_DWORD *this, int a2) +{ + _DWORD *v2; // [esp+24h] [ebp-44h] + + v2 = this + 16; + std::ios_base::ios_base(this + 16); + this[44] = 0; + *((_WORD *)this + 90) = 0; + *((_BYTE *)this + 182) = 0; + this[46] = 0; + this[47] = 0; + this[48] = 0; + this[49] = 0; + *this = &unk_5158D8; + this[16] = &unk_5158EC; + std::wios::init((int)v2, 0); + *this = &off_51A5F4; + this[16] = off_51A608; + this[1] = &off_51AE14; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + std::locale::locale(this + 8); + this[1] = &off_51A318; + this[9] = a2 | 0x10; + this[10] = this + 12; + this[11] = 0; + *((_WORD *)this + 24) = 0; + std::wios::init((int)v2, (int)(this + 1)); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5F4: using guessed type int (*off_51A5F4)(); +// 51A608: using guessed type int (*off_51A608[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004F08D0) -------------------------------------------------------- +void __fastcall std::wostringstream::basic_ostringstream(int a1) +{ + int v1; // [esp+24h] [ebp-44h] + + v1 = a1 + 64; + std::ios_base::ios_base((_DWORD *)(a1 + 64)); + *(_DWORD *)(a1 + 176) = 0; + *(_WORD *)(a1 + 180) = 0; + *(_BYTE *)(a1 + 182) = 0; + *(_DWORD *)(a1 + 184) = 0; + *(_DWORD *)(a1 + 188) = 0; + *(_DWORD *)(a1 + 192) = 0; + *(_DWORD *)(a1 + 196) = 0; + *(_DWORD *)a1 = &unk_5158D8; + *(_DWORD *)(a1 + 64) = &unk_5158EC; + std::wios::init(v1, 0); + *(_DWORD *)a1 = &off_51A5F4; + *(_DWORD *)(a1 + 64) = off_51A608; + *(_DWORD *)(a1 + 4) = &off_51AE14; + *(_DWORD *)(a1 + 8) = 0; + *(_DWORD *)(a1 + 12) = 0; + *(_DWORD *)(a1 + 16) = 0; + *(_DWORD *)(a1 + 20) = 0; + *(_DWORD *)(a1 + 24) = 0; + *(_DWORD *)(a1 + 28) = 0; + std::locale::locale((_DWORD *)(a1 + 32)); + *(_DWORD *)(a1 + 4) = &off_51A318; + *(_DWORD *)(a1 + 40) = a1 + 48; + *(_DWORD *)(a1 + 36) = 16; + *(_DWORD *)(a1 + 44) = 0; + *(_WORD *)(a1 + 48) = 0; + std::wios::init(v1, a1 + 4); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5F4: using guessed type int (*off_51A5F4)(); +// 51A608: using guessed type int (*off_51A608[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004F0A60) -------------------------------------------------------- +void __thiscall std::wostringstream::basic_ostringstream(int *this, int *a2, _DWORD *a3) +{ + int v4; // eax + int v5; // eax + int v6; // eax + int v7; // edx + unsigned int v8; // eax + int v9; // edx + int v10; // ecx + int v11; // eax + _DWORD *v12; // esi + _DWORD *v13; // eax + int v14; // ecx + int v15; // ebx + char *v16; // ecx + int v17; // edx + std::ios_base *v18; // [esp+4h] [ebp-A4h] + const std::locale *v19; // [esp+4h] [ebp-A4h] + std::ios_base *v20; // [esp+10h] [ebp-98h] + int *v21; // [esp+10h] [ebp-98h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-94h] + int v24; // [esp+60h] [ebp-48h] + int v25; // [esp+64h] [ebp-44h] + int v26; // [esp+68h] [ebp-40h] + __int64 v27; // [esp+70h] [ebp-38h] + int v28; // [esp+78h] [ebp-30h] + int v29; // [esp+7Ch] [ebp-2Ch] + int v30; // [esp+80h] [ebp-28h] + int v31; // [esp+88h] [ebp-20h] + + v4 = a2[1]; + *this = v4; + lpuexcpt = (struct _Unwind_Exception *)((char *)this + *(_DWORD *)(v4 - 12)); + *(_DWORD *)lpuexcpt = a2[2]; + v20 = (std::ios_base *)((char *)a3 + *(_DWORD *)(*a3 - 12)); + std::ios_base::_M_move((int)lpuexcpt, v20, v18); + std::wios::_M_cache_locale(lpuexcpt, (int)lpuexcpt + 108); + v5 = *((_DWORD *)v20 + 28); + *((_DWORD *)lpuexcpt + 30) = 0; + *((_DWORD *)v20 + 28) = 0; + *((_DWORD *)lpuexcpt + 28) = v5; + *((_WORD *)lpuexcpt + 58) = *((_WORD *)v20 + 58); + *((_BYTE *)lpuexcpt + 118) = *((_BYTE *)v20 + 118); + v6 = *a2; + v7 = a2[3]; + *this = *a2; + v24 = -1; + *(int *)((char *)this + *(_DWORD *)(v6 - 12)) = v7; + v21 = this + 1; + v25 = -1; + v26 = -1; + LODWORD(v27) = -1; + v28 = -1; + v29 = -1; + v30 = -1; + v31 = -1; + v8 = a3[2]; + v9 = a3[10]; + if ( !v8 ) + { + v10 = a3[5]; + if ( !v10 ) + goto LABEL_7; + goto LABEL_3; + } + v24 = (int)(v8 - v9) >> 1; + v25 = (int)(v8 - v9) >> 31; + v26 = (a3[3] - v9) >> 1; + v8 = a3[4]; + v27 = (int)(v8 - v9) >> 1; + v10 = a3[5]; + if ( v10 ) + { +LABEL_3: + v28 = (v10 - v9) >> 1; + v29 = (v10 - v9) >> 31; + v30 = (a3[6] - v10) >> 1; + v31 = (a3[7] - v9) >> 1; + if ( v8 < a3[6] ) + v8 = a3[6]; + } + if ( v8 ) + a3[11] = (int)(v8 - v9) >> 1; +LABEL_7: + std::wstreambuf::basic_streambuf(v21, (std::locale *)(a3 + 1), v19); + v11 = a3[9]; + this[1] = (int)&off_51A318; + v12 = a3 + 12; + this[9] = v11; + this[10] = (int)(this + 12); + v13 = (_DWORD *)a3[10]; + if ( v13 == a3 + 12 ) + { + this[12] = a3[12]; + this[13] = a3[13]; + this[14] = a3[14]; + this[15] = a3[15]; + } + else + { + this[10] = (int)v13; + this[12] = a3[12]; + } + this[11] = a3[11]; + a3[10] = v12; + *((_WORD *)a3 + 24) = 0; + v14 = this[10]; + a3[11] = 0; + if ( (v24 & v25) != -1 ) + { + this[2] = v14 + 2 * v24; + this[3] = v14 + 2 * v26; + this[4] = v14 + 2 * v27; + } + if ( (v28 & v29) != -1 ) + { + v15 = v14 + 2 * v28; + this[7] = v14 + 2 * v31; + this[5] = v15; + this[6] = v15 + 2 * v30; + } + v16 = (char *)a3 + 62; + v17 = a3[9] & 0x10; + if ( (a3[9] & 8) != 0 ) + { + a3[2] = v12; + a3[3] = v12; + a3[4] = v12; + if ( v17 ) + { + a3[6] = v12; + a3[5] = v12; + a3[7] = v16; + } + } + else if ( v17 ) + { + a3[6] = v12; + a3[5] = v12; + a3[7] = v16; + a3[2] = v12; + a3[3] = v12; + a3[4] = v12; + } + *(int *)((char *)this + *(_DWORD *)(*this - 12) + 120) = (int)v21; +} +// 4F0D37: conditional instruction was optimized away because rax.8 is in (<80000000u|>=FFFFFFFF80000000u) +// 4F0AD2: variable 'v18' is possibly undefined +// 4F0C60: variable 'v19' is possibly undefined +// 51A318: using guessed type int (*off_51A318)(); + +//----- (004F0E70) -------------------------------------------------------- +void __thiscall std::wostringstream::basic_ostringstream(int *this, int *a2, int a3, int a4) +{ + int v5; // eax + _DWORD *v6; // ecx + int v7; // eax + int v8; // edx + int v9; // edx + _WORD *v10; // eax + unsigned int v11; // eax + int *v12; // [esp+24h] [ebp-44h] + + v5 = a2[1]; + *this = v5; + v6 = (int *)((char *)this + *(_DWORD *)(v5 - 12)); + *v6 = a2[2]; + std::wios::init((int)v6, 0); + v7 = *a2; + v8 = a2[3]; + *this = *a2; + v12 = this + 1; + *(int *)((char *)this + *(_DWORD *)(v7 - 12)) = v8; + this[1] = (int)&off_51AE14; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + std::locale::locale(this + 8); + v9 = *(_DWORD *)(a3 + 4); + v10 = *(_WORD **)a3; + this[1] = (int)&off_51A318; + this[9] = 0; + this[10] = (int)(this + 12); + std::wstring::_M_construct(this + 10, v10, (int)&v10[v9]); + v11 = 0; + this[9] = a4 | 0x10; + if ( (a4 & 3) != 0 ) + v11 = this[11]; + std::wstringbuf::_M_sync(v12, (_DWORD *)this[10], 0, v11); + std::wios::init((int)this + *(_DWORD *)(*this - 12), (int)v12); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004F1030) -------------------------------------------------------- +void __thiscall std::wostringstream::basic_ostringstream(int *this, int *a2, int a3) +{ + int v3; // eax + _DWORD *v4; // ecx + int v5; // eax + int v6; // edx + int v7; // eax + + v3 = a2[1]; + *this = v3; + v4 = (int *)((char *)this + *(_DWORD *)(v3 - 12)); + *v4 = a2[2]; + std::wios::init((int)v4, 0); + v5 = *a2; + v6 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v5 - 12)) = v6; + this[1] = (int)&off_51AE14; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + std::locale::locale(this + 8); + this[11] = 0; + this[9] = a3 | 0x10; + this[10] = (int)(this + 12); + *((_WORD *)this + 24) = 0; + v7 = *this; + this[1] = (int)&off_51A318; + std::wios::init((int)this + *(_DWORD *)(v7 - 12), (int)(this + 1)); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004F1170) -------------------------------------------------------- +void __thiscall std::wostringstream::basic_ostringstream(int *this, int *a2) +{ + int v2; // eax + _DWORD *v3; // ecx + int v4; // eax + int v5; // edx + int v6; // eax + + v2 = a2[1]; + *this = v2; + v3 = (int *)((char *)this + *(_DWORD *)(v2 - 12)); + *v3 = a2[2]; + std::wios::init((int)v3, 0); + v4 = *a2; + v5 = a2[3]; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v4 - 12)) = v5; + this[1] = (int)&off_51AE14; + this[2] = 0; + this[3] = 0; + this[4] = 0; + this[5] = 0; + this[6] = 0; + this[7] = 0; + std::locale::locale(this + 8); + this[1] = (int)&off_51A318; + this[10] = (int)(this + 12); + *((_WORD *)this + 24) = 0; + v6 = *this; + this[9] = 16; + this[11] = 0; + std::wios::init((int)this + *(_DWORD *)(v6 - 12), (int)(this + 1)); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004F12B0) -------------------------------------------------------- +void __fastcall std::wostringstream::~wostringstream(_DWORD *Block) +{ + _DWORD *v2; // eax + + v2 = (_DWORD *)Block[10]; + *Block = &off_51A5F4; + Block[16] = off_51A608; + Block[1] = &off_51A318; + if ( v2 != Block + 12 ) + operator delete(v2); + Block[1] = &off_51AE14; + std::locale::~locale((_DWORD **)Block + 8); + *Block = &unk_5158D8; + Block[16] = &off_51B7E0; + std::ios_base::~ios_base((int)(Block + 16)); + operator delete(Block); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5F4: using guessed type int (*off_51A5F4)(); +// 51A608: using guessed type int (*off_51A608[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004F1310) -------------------------------------------------------- +void __fastcall std::wostringstream::~wostringstream(int a1) +{ + void *Block; // eax + + Block = *(void **)(a1 + 40); + *(_DWORD *)a1 = &off_51A5F4; + *(_DWORD *)(a1 + 64) = off_51A608; + *(_DWORD *)(a1 + 4) = &off_51A318; + if ( Block != (void *)(a1 + 48) ) + operator delete(Block); + *(_DWORD *)(a1 + 4) = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_5158D8; + *(_DWORD *)(a1 + 64) = &off_51B7E0; + std::ios_base::~ios_base(a1 + 64); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5F4: using guessed type int (*off_51A5F4)(); +// 51A608: using guessed type int (*off_51A608[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004F1370) -------------------------------------------------------- +int __thiscall std::wostringstream::~wostringstream(int *this, int *a2) +{ + int v3; // eax + int *Block; // eax + int v5; // eax + int result; // eax + + v3 = *a2; + *this = *a2; + *(int *)((char *)this + *(_DWORD *)(v3 - 12)) = a2[3]; + Block = (int *)this[10]; + this[1] = (int)&off_51A318; + if ( Block != this + 12 ) + operator delete(Block); + this[1] = (int)&off_51AE14; + std::locale::~locale((_DWORD **)this + 8); + v5 = a2[1]; + *this = v5; + result = *(_DWORD *)(v5 - 12); + *(int *)((char *)this + result) = a2[2]; + return result; +} +// 51A318: using guessed type int (*off_51A318)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004F13D0) -------------------------------------------------------- +_DWORD *__thiscall std::wostringstream::operator=(_DWORD *this, _DWORD *a2) +{ + std::ios_base **v3; // esi + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + __int16 v6; // cx + std::ios_base *v8; // [esp+4h] [ebp-68h] + + v3 = (std::ios_base **)((char *)this + *(_DWORD *)(*this - 12)); + v4 = (std::ios_base *)((char *)a2 + *(_DWORD *)(*a2 - 12)); + std::ios_base::_M_swap(v3, v4, v8); + std::wios::_M_cache_locale(v3, (int)(v3 + 27)); + std::wios::_M_cache_locale(v4, (int)v4 + 108); + v5 = v3[28]; + v3[28] = (std::ios_base *)*((_DWORD *)v4 + 28); + v6 = *((_WORD *)v4 + 58); + *((_DWORD *)v4 + 28) = v5; + LOWORD(v5) = *((_WORD *)v3 + 58); + *((_WORD *)v3 + 58) = v6; + LOBYTE(v6) = *((_BYTE *)v3 + 118); + *((_WORD *)v4 + 58) = (_WORD)v5; + *((_BYTE *)v3 + 118) = *((_BYTE *)v4 + 118); + *((_BYTE *)v4 + 118) = v6; + std::wstringbuf::operator=(this + 1, (int)(a2 + 1)); + return this; +} +// 4F1410: variable 'v8' is possibly undefined + +//----- (004F14A0) -------------------------------------------------------- +int __thiscall std::collate::collate(_DWORD *this, char a2, int a3) +{ + int result; // eax + + *this = &off_51A618; + this[1] = a3 != 0; + result = std::locale::facet::_S_clone_c_locale(); + this[2] = result; + return result; +} +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004F14D0) -------------------------------------------------------- +void __thiscall std::collate::collate(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A618; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004F1570) -------------------------------------------------------- +int __thiscall std::collate::collate(_DWORD *this, char a2, int a3) +{ + int result; // eax + + *this = &off_51A618; + this[1] = a3 != 0; + result = std::locale::facet::_S_clone_c_locale(); + this[2] = result; + return result; +} +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004F15A0) -------------------------------------------------------- +void __thiscall std::collate::collate(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A618; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004F1640) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51A618; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4F167E: variable 'lpfctx' is possibly undefined +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004F16A0) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A618; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F16DE: variable 'lpfctx' is possibly undefined +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004F1700) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A618; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F173E: variable 'lpfctx' is possibly undefined +// 51A618: using guessed type int (*off_51A618)(); + +//----- (004F1760) -------------------------------------------------------- +int __thiscall std::collate::collate(_DWORD *this, char a2, int a3) +{ + int result; // eax + + *this = &off_51A634; + this[1] = a3 != 0; + result = std::locale::facet::_S_clone_c_locale(); + this[2] = result; + return result; +} +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004F1790) -------------------------------------------------------- +void __thiscall std::collate::collate(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A634; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004F1830) -------------------------------------------------------- +int __thiscall std::collate::collate(_DWORD *this, char a2, int a3) +{ + int result; // eax + + *this = &off_51A634; + this[1] = a3 != 0; + result = std::locale::facet::_S_clone_c_locale(); + this[2] = result; + return result; +} +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004F1860) -------------------------------------------------------- +void __thiscall std::collate::collate(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A634; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004F1900) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51A634; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4F193E: variable 'lpfctx' is possibly undefined +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004F1960) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A634; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F199E: variable 'lpfctx' is possibly undefined +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004F19C0) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A634; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F19FE: variable 'lpfctx' is possibly undefined +// 51A634: using guessed type int (*off_51A634)(); + +//----- (004F1A20) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2, int a3, int a4) +{ + this[1] = a4 != 0; + *this = &off_51A650; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004F1AC0) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A650; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004F1B60) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2, int a3, int a4) +{ + this[1] = a4 != 0; + *this = &off_51A650; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004F1C00) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A650; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004F1CA0) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51A650; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4F1CDE: variable 'lpfctx' is possibly undefined +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004F1D00) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A650; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F1D3E: variable 'lpfctx' is possibly undefined +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004F1D60) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A650; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F1D9E: variable 'lpfctx' is possibly undefined +// 51A650: using guessed type int (*off_51A650)(); + +//----- (004F1DC0) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2, int a3, int a4) +{ + this[1] = a4 != 0; + *this = &off_51A66C; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004F1E60) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A66C; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004F1F00) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2, int a3, int a4) +{ + this[1] = a4 != 0; + *this = &off_51A66C; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004F1FA0) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A66C; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004F2040) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51A66C; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4F207E: variable 'lpfctx' is possibly undefined +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004F20A0) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A66C; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F20DE: variable 'lpfctx' is possibly undefined +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004F2100) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51A66C; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F213E: variable 'lpfctx' is possibly undefined +// 51A66C: using guessed type int (*off_51A66C)(); + +//----- (004F2160) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::_M_initialize_numpunct(_DWORD *this, int a2) +{ + _DWORD *v2; // eax + char *v3; // esi + int i; // eax + char *v5; // esi + int j; // eax + _DWORD *result; // eax + _DWORD *v8; // [esp+1Ch] [ebp-10h] + + v2 = (_DWORD *)this[2]; + if ( !v2 ) + { + v8 = this; + v2 = operator new(0x68u); + this = v8; + v2[1] = 0; + *v2 = &off_51AF60; + v2[2] = 0; + v2[3] = 0; + *((_BYTE *)v2 + 16) = 0; + v2[5] = 0; + v2[6] = 0; + v2[7] = 0; + v2[8] = 0; + *((_WORD *)v2 + 18) = 0; + *((_BYTE *)v2 + 100) = 0; + v8[2] = v2; + } + v2[2] = &unk_5110AC; + v3 = std::__num_base::_S_atoms_out[0]; + v2[3] = 0; + *((_BYTE *)v2 + 16) = 0; + *((_BYTE *)v2 + 36) = 46; + *(_BYTE *)(this[2] + 37) = 44; + for ( i = 0; i != 36; ++i ) + *(_BYTE *)(this[2] + i + 38) = v3[i]; + v5 = std::__num_base::_S_atoms_in[0]; + for ( j = 0; j != 26; ++j ) + *(_BYTE *)(this[2] + j + 74) = v5[j]; + result = (_DWORD *)this[2]; + result[5] = "true"; + result[6] = 4; + result[7] = "false"; + result[8] = 5; + return result; +} +// 50C480: using guessed type char *std::__num_base::_S_atoms_in[3]; +// 50C484: using guessed type char *std::__num_base::_S_atoms_out[2]; +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (004F2260) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A688; + this[2] = a2; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2300) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + *this = &off_51A688; + this[2] = 0; + this[1] = a3 != 0; + std::numpunct::_M_initialize_numpunct(this, a2); +} +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2390) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A688; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2430) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A688; + this[2] = a2; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F24D0) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + *this = &off_51A688; + this[2] = 0; + this[1] = a3 != 0; + std::numpunct::_M_initialize_numpunct(this, a2); +} +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2560) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A688; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2600) -------------------------------------------------------- +void __fastcall std::numpunct::~numpunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A688; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4F2660: variable 'lpfctx' is possibly undefined +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F26D0) -------------------------------------------------------- +void __fastcall std::numpunct::~numpunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A688; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F2730: variable 'lpfctx' is possibly undefined +// 51A688: using guessed type int (__cdecl *off_51A688)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2780) -------------------------------------------------------- +int __thiscall std::numpunct::_M_initialize_numpunct(_DWORD *this, int a2) +{ + _DWORD *v2; // edx + char *v3; // ebx + int v4; // eax + char *v5; // ebx + int result; // eax + _DWORD *v7; // eax + + v2 = (_DWORD *)this[2]; + if ( !v2 ) + { + v7 = operator new(0xA8u); + v7[1] = 0; + v2 = v7; + *v7 = &off_51AF70; + v7[2] = 0; + v7[3] = 0; + *((_BYTE *)v7 + 16) = 0; + v7[5] = 0; + v7[6] = 0; + v7[7] = 0; + v7[8] = 0; + v7[9] = 0; + *((_BYTE *)v7 + 164) = 0; + this[2] = v7; + } + v2[2] = &unk_5110AC; + v3 = std::__num_base::_S_atoms_out[0]; + v4 = 0; + v2[3] = 0; + *((_BYTE *)v2 + 16) = 0; + v2[9] = 2883630; + do + { + *((_WORD *)v2 + v4 + 20) = v3[v4]; + ++v4; + } + while ( v4 != 36 ); + v5 = std::__num_base::_S_atoms_in[0]; + for ( result = 0; result != 26; ++result ) + *((_WORD *)v2 + result + 56) = v5[result]; + v2[5] = &off_5110B8; + v2[6] = 4; + v2[7] = &off_5110C2; + v2[8] = 5; + return result; +} +// 50C480: using guessed type char *std::__num_base::_S_atoms_in[3]; +// 50C484: using guessed type char *std::__num_base::_S_atoms_out[2]; +// 5110B8: using guessed type void *off_5110B8; +// 5110C2: using guessed type void *off_5110C2; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (004F2870) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A6AC; + this[2] = a2; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2910) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + *this = &off_51A6AC; + this[2] = 0; + this[1] = a3 != 0; + std::numpunct::_M_initialize_numpunct(this, a2); +} +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F29A0) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A6AC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2A40) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51A6AC; + this[2] = a2; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2AE0) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + *this = &off_51A6AC; + this[2] = 0; + this[1] = a3 != 0; + std::numpunct::_M_initialize_numpunct(this, a2); +} +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2B70) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51A6AC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2C10) -------------------------------------------------------- +void __fastcall std::numpunct::~numpunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A6AC; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4F2C70: variable 'lpfctx' is possibly undefined +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2CE0) -------------------------------------------------------- +void __fastcall std::numpunct::~numpunct(_DWORD *a1) +{ + int v1; // ecx + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + v1 = a1[2]; + *a1 = &off_51A6AC; + if ( v1 ) + (*(void (__fastcall **)(int))(*(_DWORD *)v1 + 4))(v1); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F2D40: variable 'lpfctx' is possibly undefined +// 51A6AC: using guessed type int (__cdecl *off_51A6AC)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F2D90) -------------------------------------------------------- +BOOL __thiscall std::time_get>::time_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A6D0; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A6D0: using guessed type int (*off_51A6D0)(); + +//----- (004F2DB0) -------------------------------------------------------- +BOOL __thiscall std::time_get>::time_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A6D0; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A6D0: using guessed type int (*off_51A6D0)(); + +//----- (004F2DD0) -------------------------------------------------------- +void __fastcall std::time_get>::~time_get(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51A6D0; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F2DDC: variable 'Blocka' is possibly undefined +// 51A6D0: using guessed type int (*off_51A6D0)(); + +//----- (004F2DF0) -------------------------------------------------------- +void __cdecl std::time_get>::~time_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A6D0; + std::locale::facet::~facet(a1); +} +// 4F2DF0: variable 'v1' is possibly undefined +// 51A6D0: using guessed type int (*off_51A6D0)(); + +//----- (004F2E00) -------------------------------------------------------- +void __cdecl std::time_get>::~time_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A6D0; + std::locale::facet::~facet(a1); +} +// 4F2E00: variable 'v1' is possibly undefined +// 51A6D0: using guessed type int (*off_51A6D0)(); + +//----- (004F2E10) -------------------------------------------------------- +BOOL __thiscall std::time_get>::time_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A6FC; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A6FC: using guessed type int (*off_51A6FC)(); + +//----- (004F2E30) -------------------------------------------------------- +BOOL __thiscall std::time_get>::time_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A6FC; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A6FC: using guessed type int (*off_51A6FC)(); + +//----- (004F2E50) -------------------------------------------------------- +void __fastcall std::time_get>::~time_get(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51A6FC; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F2E5C: variable 'Blocka' is possibly undefined +// 51A6FC: using guessed type int (*off_51A6FC)(); + +//----- (004F2E70) -------------------------------------------------------- +void __cdecl std::time_get>::~time_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A6FC; + std::locale::facet::~facet(a1); +} +// 4F2E70: variable 'v1' is possibly undefined +// 51A6FC: using guessed type int (*off_51A6FC)(); + +//----- (004F2E80) -------------------------------------------------------- +void __cdecl std::time_get>::~time_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A6FC; + std::locale::facet::~facet(a1); +} +// 4F2E80: variable 'v1' is possibly undefined +// 51A6FC: using guessed type int (*off_51A6FC)(); + +//----- (004F2E90) -------------------------------------------------------- +BOOL __thiscall std::money_get>::money_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A728; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A728: using guessed type int (*off_51A728)(); + +//----- (004F2EB0) -------------------------------------------------------- +BOOL __thiscall std::money_get>::money_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A728; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A728: using guessed type int (*off_51A728)(); + +//----- (004F2ED0) -------------------------------------------------------- +void __fastcall std::money_get>::~money_get(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51A728; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F2EDC: variable 'Blocka' is possibly undefined +// 51A728: using guessed type int (*off_51A728)(); + +//----- (004F2EF0) -------------------------------------------------------- +void __cdecl std::money_get>::~money_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A728; + std::locale::facet::~facet(a1); +} +// 4F2EF0: variable 'v1' is possibly undefined +// 51A728: using guessed type int (*off_51A728)(); + +//----- (004F2F00) -------------------------------------------------------- +void __cdecl std::money_get>::~money_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A728; + std::locale::facet::~facet(a1); +} +// 4F2F00: variable 'v1' is possibly undefined +// 51A728: using guessed type int (*off_51A728)(); + +//----- (004F2F10) -------------------------------------------------------- +BOOL __thiscall std::money_get>::money_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A740; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A740: using guessed type int (*off_51A740)(); + +//----- (004F2F30) -------------------------------------------------------- +BOOL __thiscall std::money_get>::money_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A740; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A740: using guessed type int (*off_51A740)(); + +//----- (004F2F50) -------------------------------------------------------- +void __fastcall std::money_get>::~money_get(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51A740; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F2F5C: variable 'Blocka' is possibly undefined +// 51A740: using guessed type int (*off_51A740)(); + +//----- (004F2F70) -------------------------------------------------------- +void __cdecl std::money_get>::~money_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A740; + std::locale::facet::~facet(a1); +} +// 4F2F70: variable 'v1' is possibly undefined +// 51A740: using guessed type int (*off_51A740)(); + +//----- (004F2F80) -------------------------------------------------------- +void __cdecl std::money_get>::~money_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A740; + std::locale::facet::~facet(a1); +} +// 4F2F80: variable 'v1' is possibly undefined +// 51A740: using guessed type int (*off_51A740)(); + +//----- (004F2F90) -------------------------------------------------------- +BOOL __thiscall std::money_put>::money_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A758; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A758: using guessed type int (*off_51A758)(); + +//----- (004F2FB0) -------------------------------------------------------- +BOOL __thiscall std::money_put>::money_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A758; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A758: using guessed type int (*off_51A758)(); + +//----- (004F2FD0) -------------------------------------------------------- +void __fastcall std::money_put>::~money_put(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51A758; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F2FDC: variable 'Blocka' is possibly undefined +// 51A758: using guessed type int (*off_51A758)(); + +//----- (004F2FF0) -------------------------------------------------------- +void __cdecl std::money_put>::~money_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A758; + std::locale::facet::~facet(a1); +} +// 4F2FF0: variable 'v1' is possibly undefined +// 51A758: using guessed type int (*off_51A758)(); + +//----- (004F3000) -------------------------------------------------------- +void __cdecl std::money_put>::~money_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A758; + std::locale::facet::~facet(a1); +} +// 4F3000: variable 'v1' is possibly undefined +// 51A758: using guessed type int (*off_51A758)(); + +//----- (004F3010) -------------------------------------------------------- +BOOL __thiscall std::money_put>::money_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A770; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A770: using guessed type int (*off_51A770)(); + +//----- (004F3030) -------------------------------------------------------- +BOOL __thiscall std::money_put>::money_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51A770; + result = a2 != 0; + this[1] = result; + return result; +} +// 51A770: using guessed type int (*off_51A770)(); + +//----- (004F3050) -------------------------------------------------------- +void __fastcall std::money_put>::~money_put(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51A770; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F305C: variable 'Blocka' is possibly undefined +// 51A770: using guessed type int (*off_51A770)(); + +//----- (004F3070) -------------------------------------------------------- +void __cdecl std::money_put>::~money_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A770; + std::locale::facet::~facet(a1); +} +// 4F3070: variable 'v1' is possibly undefined +// 51A770: using guessed type int (*off_51A770)(); + +//----- (004F3080) -------------------------------------------------------- +void __cdecl std::money_put>::~money_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A770; + std::locale::facet::~facet(a1); +} +// 4F3080: variable 'v1' is possibly undefined +// 51A770: using guessed type int (*off_51A770)(); + +//----- (004F3090) -------------------------------------------------------- +void __fastcall std::codecvt::~codecvt(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &unk_51B28C; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F309C: variable 'Blocka' is possibly undefined + +//----- (004F30B0) -------------------------------------------------------- +void __cdecl std::codecvt::~codecvt(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &unk_51B28C; + std::locale::facet::~facet(a1); +} +// 4F30B0: variable 'v1' is possibly undefined + +//----- (004F30C0) -------------------------------------------------------- +void __fastcall std::codecvt::~codecvt(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &unk_51B2B8; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F30CC: variable 'Blocka' is possibly undefined + +//----- (004F30E0) -------------------------------------------------------- +void __cdecl std::codecvt::~codecvt(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &unk_51B2B8; + std::locale::facet::~facet(a1); +} +// 4F30E0: variable 'v1' is possibly undefined + +//----- (004F30F0) -------------------------------------------------------- +void __fastcall std::codecvt::~codecvt(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &unk_51B2E4; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F30FC: variable 'Blocka' is possibly undefined + +//----- (004F3110) -------------------------------------------------------- +void __cdecl std::codecvt::~codecvt(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &unk_51B2E4; + std::locale::facet::~facet(a1); +} +// 4F3110: variable 'v1' is possibly undefined + +//----- (004F3120) -------------------------------------------------------- +void __fastcall std::codecvt::~codecvt(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &unk_51B310; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F312C: variable 'Blocka' is possibly undefined + +//----- (004F3140) -------------------------------------------------------- +void __cdecl std::codecvt::~codecvt(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &unk_51B310; + std::locale::facet::~facet(a1); +} +// 4F3140: variable 'v1' is possibly undefined + +//----- (004F3150) -------------------------------------------------------- +int __thiscall std::codecvt::codecvt(_DWORD *this, char a2, int a3) +{ + int result; // eax + + *this = &off_51B538; + this[1] = a3 != 0; + result = std::locale::facet::_S_clone_c_locale(); + this[2] = result; + return result; +} +// 51B538: using guessed type int (__cdecl *off_51B538)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F3180) -------------------------------------------------------- +void __thiscall std::codecvt::codecvt(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B538; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B538: using guessed type int (__cdecl *off_51B538)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F3230) -------------------------------------------------------- +void __fastcall std::codecvt::~codecvt(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B538; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + *a1 = &unk_51B33C; + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4F3295: variable 'lpfctx' is possibly undefined +// 51B538: using guessed type int (__cdecl *off_51B538)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F3310) -------------------------------------------------------- +void __fastcall std::codecvt::~codecvt(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B538; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + *a1 = &unk_51B33C; + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F3375: variable 'lpfctx' is possibly undefined +// 51B538: using guessed type int (__cdecl *off_51B538)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F33C0) -------------------------------------------------------- +int __thiscall std::codecvt::codecvt(_DWORD *this, char a2, int a3) +{ + int result; // eax + + *this = &off_51B564; + this[1] = a3 != 0; + result = std::locale::facet::_S_clone_c_locale(); + this[2] = result; + return result; +} +// 51B564: using guessed type int (__cdecl *off_51B564)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F33F0) -------------------------------------------------------- +void __thiscall std::codecvt::codecvt(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B564; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B564: using guessed type int (__cdecl *off_51B564)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F34A0) -------------------------------------------------------- +void __fastcall std::codecvt::~codecvt(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B564; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + *a1 = &unk_51B368; + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(a1); +} +// 4F3505: variable 'lpfctx' is possibly undefined +// 51B564: using guessed type int (__cdecl *off_51B564)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F3580) -------------------------------------------------------- +void __fastcall std::codecvt::~codecvt(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B564; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + *a1 = &unk_51B368; + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F35E5: variable 'lpfctx' is possibly undefined +// 51B564: using guessed type int (__cdecl *off_51B564)(int, int, int, int, int, struct _Unwind_Exception *lpuexcpt, int, int, int); + +//----- (004F3630) -------------------------------------------------------- +int __thiscall std::collate::collate(_DWORD *this, char a2, int a3) +{ + int result; // eax + + *this = &off_51B590; + this[1] = a3 != 0; + result = std::locale::facet::_S_clone_c_locale(); + this[2] = result; + return result; +} +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004F3660) -------------------------------------------------------- +void __thiscall std::collate::collate(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B590; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004F3700) -------------------------------------------------------- +int __thiscall std::collate::collate(_DWORD *this, char a2, int a3) +{ + int result; // eax + + *this = &off_51B590; + this[1] = a3 != 0; + result = std::locale::facet::_S_clone_c_locale(); + this[2] = result; + return result; +} +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004F3730) -------------------------------------------------------- +void __thiscall std::collate::collate(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B590; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004F37D0) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B590; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4F380E: variable 'lpfctx' is possibly undefined +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004F3830) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B590; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F386E: variable 'lpfctx' is possibly undefined +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004F3890) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B590; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F38CE: variable 'lpfctx' is possibly undefined +// 51B590: using guessed type int (*off_51B590)(); + +//----- (004F38F0) -------------------------------------------------------- +int __thiscall std::collate::collate(_DWORD *this, char a2, int a3) +{ + int result; // eax + + *this = &off_51B5AC; + this[1] = a3 != 0; + result = std::locale::facet::_S_clone_c_locale(); + this[2] = result; + return result; +} +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004F3920) -------------------------------------------------------- +void __thiscall std::collate::collate(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B5AC; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004F39C0) -------------------------------------------------------- +int __thiscall std::collate::collate(_DWORD *this, char a2, int a3) +{ + int result; // eax + + *this = &off_51B5AC; + this[1] = a3 != 0; + result = std::locale::facet::_S_clone_c_locale(); + this[2] = result; + return result; +} +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004F39F0) -------------------------------------------------------- +void __thiscall std::collate::collate(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B5AC; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004F3A90) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B5AC; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4F3ACE: variable 'lpfctx' is possibly undefined +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004F3AF0) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B5AC; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F3B2E: variable 'lpfctx' is possibly undefined +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004F3B50) -------------------------------------------------------- +void __fastcall std::collate::~collate(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B5AC; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F3B8E: variable 'lpfctx' is possibly undefined +// 51B5AC: using guessed type int (*off_51B5AC)(); + +//----- (004F3BB0) -------------------------------------------------------- +BOOL __thiscall std::num_get>::num_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B5C8; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B5C8: using guessed type int (*off_51B5C8)(); + +//----- (004F3BD0) -------------------------------------------------------- +BOOL __thiscall std::num_get>::num_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B5C8; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B5C8: using guessed type int (*off_51B5C8)(); + +//----- (004F3BF0) -------------------------------------------------------- +void __fastcall std::num_get>::~num_get(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B5C8; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F3BFC: variable 'Blocka' is possibly undefined +// 51B5C8: using guessed type int (*off_51B5C8)(); + +//----- (004F3C10) -------------------------------------------------------- +void __cdecl std::num_get>::~num_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B5C8; + std::locale::facet::~facet(a1); +} +// 4F3C10: variable 'v1' is possibly undefined +// 51B5C8: using guessed type int (*off_51B5C8)(); + +//----- (004F3C20) -------------------------------------------------------- +void __cdecl std::num_get>::~num_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B5C8; + std::locale::facet::~facet(a1); +} +// 4F3C20: variable 'v1' is possibly undefined +// 51B5C8: using guessed type int (*off_51B5C8)(); + +//----- (004F3C30) -------------------------------------------------------- +BOOL __thiscall std::num_get>::num_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B604; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B604: using guessed type int (*off_51B604)(); + +//----- (004F3C50) -------------------------------------------------------- +BOOL __thiscall std::num_get>::num_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B604; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B604: using guessed type int (*off_51B604)(); + +//----- (004F3C70) -------------------------------------------------------- +void __fastcall std::num_get>::~num_get(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B604; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F3C7C: variable 'Blocka' is possibly undefined +// 51B604: using guessed type int (*off_51B604)(); + +//----- (004F3C90) -------------------------------------------------------- +void __cdecl std::num_get>::~num_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B604; + std::locale::facet::~facet(a1); +} +// 4F3C90: variable 'v1' is possibly undefined +// 51B604: using guessed type int (*off_51B604)(); + +//----- (004F3CA0) -------------------------------------------------------- +void __cdecl std::num_get>::~num_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B604; + std::locale::facet::~facet(a1); +} +// 4F3CA0: variable 'v1' is possibly undefined +// 51B604: using guessed type int (*off_51B604)(); + +//----- (004F3CB0) -------------------------------------------------------- +BOOL __thiscall std::num_put>::num_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B640; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B640: using guessed type int (*off_51B640)(); + +//----- (004F3CD0) -------------------------------------------------------- +BOOL __thiscall std::num_put>::num_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B640; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B640: using guessed type int (*off_51B640)(); + +//----- (004F3CF0) -------------------------------------------------------- +void __fastcall std::num_put>::~num_put(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B640; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F3CFC: variable 'Blocka' is possibly undefined +// 51B640: using guessed type int (*off_51B640)(); + +//----- (004F3D10) -------------------------------------------------------- +void __cdecl std::num_put>::~num_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B640; + std::locale::facet::~facet(a1); +} +// 4F3D10: variable 'v1' is possibly undefined +// 51B640: using guessed type int (*off_51B640)(); + +//----- (004F3D20) -------------------------------------------------------- +void __cdecl std::num_put>::~num_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B640; + std::locale::facet::~facet(a1); +} +// 4F3D20: variable 'v1' is possibly undefined +// 51B640: using guessed type int (*off_51B640)(); + +//----- (004F3D30) -------------------------------------------------------- +BOOL __thiscall std::num_put>::num_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B670; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B670: using guessed type int (*off_51B670)(); + +//----- (004F3D50) -------------------------------------------------------- +BOOL __thiscall std::num_put>::num_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B670; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B670: using guessed type int (*off_51B670)(); + +//----- (004F3D70) -------------------------------------------------------- +void __fastcall std::num_put>::~num_put(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B670; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F3D7C: variable 'Blocka' is possibly undefined +// 51B670: using guessed type int (*off_51B670)(); + +//----- (004F3D90) -------------------------------------------------------- +void __cdecl std::num_put>::~num_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B670; + std::locale::facet::~facet(a1); +} +// 4F3D90: variable 'v1' is possibly undefined +// 51B670: using guessed type int (*off_51B670)(); + +//----- (004F3DA0) -------------------------------------------------------- +void __cdecl std::num_put>::~num_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B670; + std::locale::facet::~facet(a1); +} +// 4F3DA0: variable 'v1' is possibly undefined +// 51B670: using guessed type int (*off_51B670)(); + +//----- (004F3DB0) -------------------------------------------------------- +char *__thiscall std::_Rb_tree,std::less,std::allocator>::_M_insert_unique( + _DWORD *this, + int a2) +{ + char v2; // al + struct _Unwind_Exception *v3; // edx + int v4; // eax + char v6; // [esp+1Bh] [ebp-4Dh] + struct _Unwind_Exception *v7; // [esp+1Ch] [ebp-4Ch] + struct _Unwind_Exception *Block; // [esp+24h] [ebp-44h] + void *Blocka; // [esp+24h] [ebp-44h] + char *Blockb; // [esp+24h] [ebp-44h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-40h] + + Block = (struct _Unwind_Exception *)this[2]; + v7 = (struct _Unwind_Exception *)(this + 1); + lpuexcpt = (struct _Unwind_Exception *)(this + 1); + v2 = 1; + while ( Block ) + { + v2 = std::operator<(a2, (int)Block + 16); + v3 = (struct _Unwind_Exception *)*((_DWORD *)Block + 3); + if ( v2 ) + v3 = (struct _Unwind_Exception *)*((_DWORD *)Block + 2); + lpuexcpt = Block; + Block = v3; + } + if ( v2 ) + { + if ( (struct _Unwind_Exception *)this[3] == lpuexcpt ) + goto LABEL_12; + v4 = std::_Rb_tree_decrement(lpuexcpt); + } + else + { + v4 = (int)lpuexcpt; + } + Blocka = (void *)v4; + if ( !(unsigned __int8)std::operator<(v4 + 16, a2) ) + return (char *)Blocka; +LABEL_12: + v6 = 1; + if ( v7 != lpuexcpt ) + v6 = std::operator<(a2, (int)lpuexcpt + 16); + Blockb = (char *)operator new(0x28u); + std::string::basic_string(Blockb + 16, a2); + std::_Rb_tree_insert_and_rebalance(v6, Blockb, lpuexcpt, v7); + ++this[5]; + return Blockb; +} + +//----- (004F3F5C) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_insert_node( + _DWORD *this, + int a2, + _DWORD *a3, + _DWORD *a4) +{ + char v4; // al + _DWORD *v6; // ebx + _DWORD *result; // eax + + v4 = 1; + v6 = this + 1; + if ( !a2 && a3 != v6 ) + v4 = std::operator<((int)(a4 + 4), (int)(a3 + 4)); + std::_Rb_tree_insert_and_rebalance(v4, a4, a3, v6); + result = a4; + ++this[5]; + return result; +} + +//----- (004F3FB8) -------------------------------------------------------- +int __thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + _DWORD *this, + int a2) +{ + char v2; // al + _DWORD *v3; // ebx + _DWORD *i; // esi + _DWORD *v5; // edx + int result; // eax + int v7; // esi + bool v8; // zf + _DWORD *v9; // [esp+1Ch] [ebp-1Ch] + + v2 = 1; + v3 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v5 ) + { + v3 = i; + v9 = this; + v2 = std::operator<(a2, (int)(i + 4)); + v5 = (_DWORD *)i[3]; + this = v9; + if ( v2 ) + v5 = (_DWORD *)i[2]; + } + if ( v2 ) + { + if ( (_DWORD *)this[3] == v3 ) + return 0; + v7 = std::_Rb_tree_decrement(v3); + } + else + { + v7 = (int)v3; + } + v8 = (unsigned __int8)std::operator<(v7 + 16, a2) == 0; + result = v7; + if ( !v8 ) + return 0; + return result; +} +// 4F4029: conditional instruction was optimized away because zf.1==0 + +//----- (004F4038) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_hint_unique_pos( + _DWORD *this, + _DWORD *a2, + int a3) +{ + _DWORD *result; // eax + int v5; // [esp+1Ch] [ebp-1Ch] + int v6; // [esp+1Ch] [ebp-1Ch] + + if ( a2 == this + 1 ) + { + if ( this[5] && (unsigned __int8)std::operator<(this[4] + 16, a3) ) + return 0; + return (_DWORD *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + this, + a3); + } + if ( !(unsigned __int8)std::operator<(a3, (int)(a2 + 4)) ) + { + if ( !(unsigned __int8)std::operator<((int)(a2 + 4), a3) ) + return a2; + if ( (_DWORD *)this[4] == a2 ) + return 0; + v6 = std::_Rb_tree_increment((int)a2); + if ( (unsigned __int8)std::operator<(a3, v6 + 16) ) + { + if ( !a2[3] ) + return 0; + return (_DWORD *)v6; + } + return (_DWORD *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + this, + a3); + } + result = (_DWORD *)this[3]; + if ( result == a2 ) + return result; + v5 = std::_Rb_tree_decrement(a2); + if ( !(unsigned __int8)std::operator<(v5 + 16, a3) ) + return (_DWORD *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + this, + a3); + result = a2; + if ( !*(_DWORD *)(v5 + 12) ) + return 0; + return result; +} + +//----- (004F4134) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::find( + _DWORD *this, + int a2) +{ + _DWORD *v2; // esi + _DWORD *v3; // ebx + _DWORD *i; // edi + char v5; // al + _DWORD *v6; // edx + + v2 = this + 1; + v3 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v6 ) + { + v5 = std::operator<((int)(i + 4), a2); + v6 = (_DWORD *)i[3]; + if ( !v5 ) + v6 = (_DWORD *)i[2]; + if ( !v5 ) + v3 = i; + } + if ( v2 != v3 && (unsigned __int8)std::operator<(a2, (int)(v3 + 4)) ) + return v2; + return v3; +} + +//----- (004F4194) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_insert_node( + _DWORD *this, + int a2, + _DWORD *a3, + _DWORD *a4) +{ + char v4; // al + _DWORD *v6; // ebx + _DWORD *result; // eax + + v4 = 1; + v6 = this + 1; + if ( !a2 && a3 != v6 ) + v4 = std::operator<((int)(a4 + 4), (int)(a3 + 4)); + std::_Rb_tree_insert_and_rebalance(v4, a4, a3, v6); + result = a4; + ++this[5]; + return result; +} + +//----- (004F41F0) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_emplace_unique>( + _DWORD *this, + _DWORD *a2) +{ + void **v3; // ebx + int insert_unique_pos; // eax + _DWORD *v5; // edx + int v7; // [esp+1Ch] [ebp-1Ch] + + v3 = (void **)operator new(0x40u); + std::string::basic_string(v3 + 4, a2); + std::string::basic_string(v3 + 10, a2 + 6); + insert_unique_pos = std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + this, + (int)(v3 + 4)); + if ( v5 ) + return std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_insert_node( + this, + insert_unique_pos, + v5, + v3); + v7 = insert_unique_pos; + std::string::_M_dispose(v3 + 10); + std::string::_M_dispose(v3 + 4); + operator delete(v3); + return (_DWORD *)v7; +} +// 4F423F: variable 'v5' is possibly undefined + +//----- (004F4288) -------------------------------------------------------- +int __thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + _DWORD *this, + int a2) +{ + char v2; // al + _DWORD *v3; // ebx + _DWORD *i; // esi + _DWORD *v5; // edx + int result; // eax + int v7; // esi + bool v8; // zf + _DWORD *v9; // [esp+1Ch] [ebp-1Ch] + + v2 = 1; + v3 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v5 ) + { + v3 = i; + v9 = this; + v2 = std::operator<(a2, (int)(i + 4)); + v5 = (_DWORD *)i[3]; + this = v9; + if ( v2 ) + v5 = (_DWORD *)i[2]; + } + if ( v2 ) + { + if ( (_DWORD *)this[3] == v3 ) + return 0; + v7 = std::_Rb_tree_decrement(v3); + } + else + { + v7 = (int)v3; + } + v8 = (unsigned __int8)std::operator<(v7 + 16, a2) == 0; + result = v7; + if ( !v8 ) + return 0; + return result; +} +// 4F42F9: conditional instruction was optimized away because zf.1==0 + +//----- (004F4308) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos( + _DWORD *this, + _DWORD *a2, + int a3) +{ + _DWORD *result; // eax + int v5; // [esp+1Ch] [ebp-1Ch] + int v6; // [esp+1Ch] [ebp-1Ch] + + if ( a2 == this + 1 ) + { + if ( this[5] && (unsigned __int8)std::operator<(this[4] + 16, a3) ) + return 0; + return (_DWORD *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + this, + a3); + } + if ( !(unsigned __int8)std::operator<(a3, (int)(a2 + 4)) ) + { + if ( !(unsigned __int8)std::operator<((int)(a2 + 4), a3) ) + return a2; + if ( (_DWORD *)this[4] == a2 ) + return 0; + v6 = std::_Rb_tree_increment((int)a2); + if ( (unsigned __int8)std::operator<(a3, v6 + 16) ) + { + if ( !a2[3] ) + return 0; + return (_DWORD *)v6; + } + return (_DWORD *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + this, + a3); + } + result = (_DWORD *)this[3]; + if ( result == a2 ) + return result; + v5 = std::_Rb_tree_decrement(a2); + if ( !(unsigned __int8)std::operator<(v5 + 16, a3) ) + return (_DWORD *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + this, + a3); + result = a2; + if ( !*(_DWORD *)(v5 + 12) ) + return 0; + return result; +} + +//----- (004F4404) -------------------------------------------------------- +void __fastcall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree( + int a1) +{ + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(*(_DWORD *)(a1 + 8)); +} + +//----- (004F440C) -------------------------------------------------------- +int __thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + _DWORD *this, + int a2) +{ + char v2; // al + _DWORD *v3; // ebx + _DWORD *i; // esi + _DWORD *v5; // edx + int result; // eax + int v7; // esi + bool v8; // zf + _DWORD *v9; // [esp+1Ch] [ebp-1Ch] + + v2 = 1; + v3 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v5 ) + { + v3 = i; + v9 = this; + v2 = std::operator<(a2, (int)(i + 4)); + v5 = (_DWORD *)i[3]; + this = v9; + if ( v2 ) + v5 = (_DWORD *)i[2]; + } + if ( v2 ) + { + if ( (_DWORD *)this[3] == v3 ) + return 0; + v7 = std::_Rb_tree_decrement(v3); + } + else + { + v7 = (int)v3; + } + v8 = (unsigned __int8)std::operator<(v7 + 16, a2) == 0; + result = v7; + if ( !v8 ) + return 0; + return result; +} +// 4F447D: conditional instruction was optimized away because zf.1==0 + +//----- (004F448C) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_hint_unique_pos( + _DWORD *this, + _DWORD *a2, + int a3) +{ + _DWORD *result; // eax + int v5; // [esp+1Ch] [ebp-1Ch] + int v6; // [esp+1Ch] [ebp-1Ch] + + if ( a2 == this + 1 ) + { + if ( this[5] && (unsigned __int8)std::operator<(this[4] + 16, a3) ) + return 0; + return (_DWORD *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + this, + a3); + } + if ( !(unsigned __int8)std::operator<(a3, (int)(a2 + 4)) ) + { + if ( !(unsigned __int8)std::operator<((int)(a2 + 4), a3) ) + return a2; + if ( (_DWORD *)this[4] == a2 ) + return 0; + v6 = std::_Rb_tree_increment((int)a2); + if ( (unsigned __int8)std::operator<(a3, v6 + 16) ) + { + if ( !a2[3] ) + return 0; + return (_DWORD *)v6; + } + return (_DWORD *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + this, + a3); + } + result = (_DWORD *)this[3]; + if ( result == a2 ) + return result; + v5 = std::_Rb_tree_decrement(a2); + if ( !(unsigned __int8)std::operator<(v5 + 16, a3) ) + return (_DWORD *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + this, + a3); + result = a2; + if ( !*(_DWORD *)(v5 + 12) ) + return 0; + return result; +} + +//----- (004F4588) -------------------------------------------------------- +void __fastcall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::~_Rb_tree( + int a1) +{ + std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_erase(*(_DWORD *)(a1 + 8)); +} + +//----- (004F4590) -------------------------------------------------------- +int __thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + _DWORD *this, + int a2) +{ + char v2; // al + _DWORD *v3; // ebx + _DWORD *i; // esi + _DWORD *v5; // edx + int result; // eax + int v7; // esi + bool v8; // zf + _DWORD *v9; // [esp+1Ch] [ebp-1Ch] + + v2 = 1; + v3 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v5 ) + { + v3 = i; + v9 = this; + v2 = std::operator<(a2, (int)(i + 4)); + v5 = (_DWORD *)i[3]; + this = v9; + if ( v2 ) + v5 = (_DWORD *)i[2]; + } + if ( v2 ) + { + if ( (_DWORD *)this[3] == v3 ) + return 0; + v7 = std::_Rb_tree_decrement(v3); + } + else + { + v7 = (int)v3; + } + v8 = (unsigned __int8)std::operator<(v7 + 16, a2) == 0; + result = v7; + if ( !v8 ) + return 0; + return result; +} +// 4F4601: conditional instruction was optimized away because zf.1==0 + +//----- (004F4610) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_hint_unique_pos( + _DWORD *this, + _DWORD *a2, + int a3) +{ + _DWORD *result; // eax + int v5; // [esp+1Ch] [ebp-1Ch] + int v6; // [esp+1Ch] [ebp-1Ch] + + if ( a2 == this + 1 ) + { + if ( this[5] && (unsigned __int8)std::operator<(this[4] + 16, a3) ) + return 0; + return (_DWORD *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + this, + a3); + } + if ( !(unsigned __int8)std::operator<(a3, (int)(a2 + 4)) ) + { + if ( !(unsigned __int8)std::operator<((int)(a2 + 4), a3) ) + return a2; + if ( (_DWORD *)this[4] == a2 ) + return 0; + v6 = std::_Rb_tree_increment((int)a2); + if ( (unsigned __int8)std::operator<(a3, v6 + 16) ) + { + if ( !a2[3] ) + return 0; + return (_DWORD *)v6; + } + return (_DWORD *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + this, + a3); + } + result = (_DWORD *)this[3]; + if ( result == a2 ) + return result; + v5 = std::_Rb_tree_decrement(a2); + if ( !(unsigned __int8)std::operator<(v5 + 16, a3) ) + return (_DWORD *)std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::_M_get_insert_unique_pos( + this, + a3); + result = a2; + if ( !*(_DWORD *)(v5 + 12) ) + return 0; + return result; +} + +//----- (004F470C) -------------------------------------------------------- +int __thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + _DWORD *this, + int a2) +{ + char v2; // al + _DWORD *v3; // ebx + _DWORD *i; // esi + _DWORD *v5; // edx + int result; // eax + int v7; // esi + bool v8; // zf + _DWORD *v9; // [esp+1Ch] [ebp-1Ch] + + v2 = 1; + v3 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v5 ) + { + v3 = i; + v9 = this; + v2 = std::operator<(a2, (int)(i + 4)); + v5 = (_DWORD *)i[3]; + this = v9; + if ( v2 ) + v5 = (_DWORD *)i[2]; + } + if ( v2 ) + { + if ( (_DWORD *)this[3] == v3 ) + return 0; + v7 = std::_Rb_tree_decrement(v3); + } + else + { + v7 = (int)v3; + } + v8 = (unsigned __int8)std::operator<(v7 + 16, a2) == 0; + result = v7; + if ( !v8 ) + return 0; + return result; +} +// 4F477D: conditional instruction was optimized away because zf.1==0 + +//----- (004F478C) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos( + _DWORD *this, + _DWORD *a2, + int a3) +{ + _DWORD *result; // eax + int v5; // [esp+1Ch] [ebp-1Ch] + int v6; // [esp+1Ch] [ebp-1Ch] + + if ( a2 == this + 1 ) + { + if ( this[5] && (unsigned __int8)std::operator<(this[4] + 16, a3) ) + return 0; + return (_DWORD *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + this, + a3); + } + if ( !(unsigned __int8)std::operator<(a3, (int)(a2 + 4)) ) + { + if ( !(unsigned __int8)std::operator<((int)(a2 + 4), a3) ) + return a2; + if ( (_DWORD *)this[4] == a2 ) + return 0; + v6 = std::_Rb_tree_increment((int)a2); + if ( (unsigned __int8)std::operator<(a3, v6 + 16) ) + { + if ( !a2[3] ) + return 0; + return (_DWORD *)v6; + } + return (_DWORD *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + this, + a3); + } + result = (_DWORD *)this[3]; + if ( result == a2 ) + return result; + v5 = std::_Rb_tree_decrement(a2); + if ( !(unsigned __int8)std::operator<(v5 + 16, a3) ) + return (_DWORD *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + this, + a3); + result = a2; + if ( !*(_DWORD *)(v5 + 12) ) + return 0; + return result; +} + +//----- (004F4888) -------------------------------------------------------- +int __thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + _DWORD *this, + int a2) +{ + char v2; // al + _DWORD *v3; // ebx + _DWORD *i; // esi + _DWORD *v5; // edx + int result; // eax + int v7; // esi + bool v8; // zf + _DWORD *v9; // [esp+1Ch] [ebp-1Ch] + + v2 = 1; + v3 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v5 ) + { + v3 = i; + v9 = this; + v2 = std::operator<(a2, (int)(i + 4)); + v5 = (_DWORD *)i[3]; + this = v9; + if ( v2 ) + v5 = (_DWORD *)i[2]; + } + if ( v2 ) + { + if ( (_DWORD *)this[3] == v3 ) + return 0; + v7 = std::_Rb_tree_decrement(v3); + } + else + { + v7 = (int)v3; + } + v8 = (unsigned __int8)std::operator<(v7 + 16, a2) == 0; + result = v7; + if ( !v8 ) + return 0; + return result; +} +// 4F48F9: conditional instruction was optimized away because zf.1==0 + +//----- (004F4908) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos( + _DWORD *this, + _DWORD *a2, + int a3) +{ + _DWORD *result; // eax + int v5; // [esp+1Ch] [ebp-1Ch] + int v6; // [esp+1Ch] [ebp-1Ch] + + if ( a2 == this + 1 ) + { + if ( this[5] && (unsigned __int8)std::operator<(this[4] + 16, a3) ) + return 0; + return (_DWORD *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + this, + a3); + } + if ( !(unsigned __int8)std::operator<(a3, (int)(a2 + 4)) ) + { + if ( !(unsigned __int8)std::operator<((int)(a2 + 4), a3) ) + return a2; + if ( (_DWORD *)this[4] == a2 ) + return 0; + v6 = std::_Rb_tree_increment((int)a2); + if ( (unsigned __int8)std::operator<(a3, v6 + 16) ) + { + if ( !a2[3] ) + return 0; + return (_DWORD *)v6; + } + return (_DWORD *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + this, + a3); + } + result = (_DWORD *)this[3]; + if ( result == a2 ) + return result; + v5 = std::_Rb_tree_decrement(a2); + if ( !(unsigned __int8)std::operator<(v5 + 16, a3) ) + return (_DWORD *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos( + this, + a3); + result = a2; + if ( !*(_DWORD *)(v5 + 12) ) + return 0; + return result; +} + +//----- (004F4A04) -------------------------------------------------------- +void __fastcall std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree( + int a1) +{ + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(*(_DWORD *)(a1 + 8)); +} + +//----- (004F4A0C) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_get_insert_unique_pos( + _DWORD *this, + _DWORD *a2) +{ + bool v2; // dl + _DWORD *v3; // ebx + _DWORD *i; // eax + _DWORD *v5; // edi + _DWORD *result; // eax + + v2 = 1; + v3 = this + 1; + for ( i = (_DWORD *)this[2]; i; i = v5 ) + { + v3 = i; + v5 = (_DWORD *)i[3]; + if ( i[4] > *a2 ) + v5 = (_DWORD *)i[2]; + v2 = i[4] > *a2; + } + if ( v2 ) + { + if ( (_DWORD *)this[3] == v3 ) + return 0; + result = (_DWORD *)std::_Rb_tree_decrement(v3); + } + else + { + result = v3; + } + if ( result[4] < *a2 ) + return 0; + return result; +} + +//----- (004F4A6C) -------------------------------------------------------- +_DWORD *__thiscall std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_get_insert_hint_unique_pos( + _DWORD *this, + _DWORD *a2, + int *a3) +{ + int v3; // edi + _DWORD *result; // eax + int v5; // eax + int v6; // edx + _DWORD *v7; // [esp+1Ch] [ebp-1Ch] + _DWORD *v8; // [esp+1Ch] [ebp-1Ch] + + if ( a2 == this + 1 ) + { + if ( this[5] && *a3 > *(_DWORD *)(this[4] + 16) ) + return 0; + return std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_get_insert_unique_pos( + this, + a3); + } + v3 = *a3; + if ( a2[4] <= *a3 ) + { + if ( a2[4] >= *a3 ) + return a2; + if ( (_DWORD *)this[4] == a2 ) + return 0; + v8 = this; + result = (_DWORD *)std::_Rb_tree_increment((int)a2); + this = v8; + if ( v3 < result[4] ) + { + if ( !a2[3] ) + return 0; + return result; + } + return std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_get_insert_unique_pos( + this, + a3); + } + result = (_DWORD *)this[3]; + if ( result == a2 ) + return result; + v7 = this; + v5 = std::_Rb_tree_decrement(a2); + this = v7; + v6 = v5; + if ( *(_DWORD *)(v5 + 16) >= v3 ) + return std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_get_insert_unique_pos( + this, + a3); + result = a2; + if ( !*(_DWORD *)(v6 + 12) ) + return 0; + return result; +} + +//----- (004F4B10) -------------------------------------------------------- +void __fastcall std::bad_cast::~bad_cast(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51B6A0; + std::exception::~exception(Block); + operator delete(a1); +} +// 4F4B1C: variable 'Block' is possibly undefined +// 51B6A0: using guessed type void (__cdecl *off_51B6A0)(std::bad_cast *__hidden this); + +//----- (004F4B40) -------------------------------------------------------- +void __cdecl std::bad_cast::~bad_cast(std::exception *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B6A0; + std::exception::~exception(a1); +} +// 4F4B40: variable 'v1' is possibly undefined +// 51B6A0: using guessed type void (__cdecl *off_51B6A0)(std::bad_cast *__hidden this); + +//----- (004F4B50) -------------------------------------------------------- +int *__userpurge std::ios_base::_M_grow_words@(_DWORD *a1@, unsigned int this, char a3, bool a4) +{ + unsigned int v4; // eax + _DWORD *v5; // eax + int v6; // edx + int v7; // esi + int *v8; // ebx + int *v9; // eax + int v10; // edi + int v11; // ebp + char *v12; // edx + int v13; // eax + int *v17; // [esp+1Ch] [ebp-60h] + int v18; // [esp+20h] [ebp-5Ch] + int v19; // [esp+24h] [ebp-58h] + int v20; // [esp+28h] [ebp-54h] + + if ( this > 0x7FFFFFFE ) + { + v12 = "ios_base::_M_grow_words is not valid"; + } + else + { + v17 = a1 + 9; + if ( (int)this <= 7 ) + { + v18 = 8; +LABEL_21: + a1[26] = v17; + a1[25] = v18; + return &v17[2 * this]; + } + v4 = this + 1; + v18 = this + 1; + if ( (int)(this + 1) > 0xFFFFFFF ) + __cxa_throw_bad_array_new_length(); + v20 = 8 * v4; + v19 = operator new[](8 * v4); + if ( v19 ) + { + v5 = (_DWORD *)v19; + v6 = v19; + do + { + *v5 = 0; + v5 += 2; + *(v5 - 1) = 0; + } + while ( (_DWORD *)(v19 + v20) != v5 ); + v7 = a1[25]; + v8 = (int *)a1[26]; + v9 = v8; + if ( v7 > 0 ) + { + do + { + v10 = *v9; + v11 = v9[1]; + v9 += 2; + v6 += 8; + *(_DWORD *)(v6 - 8) = v10; + *(_DWORD *)(v6 - 4) = v11; + } + while ( &v8[2 * v7] != v9 ); + } + if ( v17 != v8 && v8 ) + operator delete[](v8); + v17 = (int *)v19; + goto LABEL_21; + } + v12 = "ios_base::_M_grow_words allocation failed"; + } + v13 = a1[5] | 1; + a1[5] = v13; + if ( (a1[4] & v13) != 0 ) + std::__throw_ios_failure(v12); + if ( a3 ) + a1[8] = 0; + else + a1[7] = 0; + return a1 + 7; +} + +//----- (004F4D50) -------------------------------------------------------- +int __cdecl std::ios_base::sync_with_stdio(std::ios_base *this) +{ + FILE *v3; // eax + FILE *v4; // eax + FILE *v5; // eax + FILE *v6; // eax + FILE *v7; // eax + FILE *v8; // eax + FILE *(__cdecl *v9)(unsigned int); // [esp+14h] [ebp-54h] + unsigned __int8 lpuexcpt; // [esp+18h] [ebp-50h] + + lpuexcpt = std::ios_base::Init::_S_synced_with_stdio; + if ( (_BYTE)this != 1 && std::ios_base::Init::_S_synced_with_stdio ) + { + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd(&std::ios_base::Init::_S_refcount, 1u) ) + goto LABEL_6; + } + else if ( std::ios_base::Init::_S_refcount++ ) + { +LABEL_6: + std::ios_base::Init::_S_synced_with_stdio = 0; + __gnu_internal::buf_cout_sync = &off_51ADD4; + std::locale::~locale((_DWORD **)&dword_50C07C); + __gnu_internal::buf_cin_sync = &off_51ADD4; + std::locale::~locale((_DWORD **)&dword_50BFFC); + __gnu_internal::buf_cerr_sync = &off_51ADD4; + std::locale::~locale((_DWORD **)&dword_50C03C); + __gnu_internal::buf_wcout_sync = &off_51AE14; + std::locale::~locale((_DWORD **)&dword_50C13C); + __gnu_internal::buf_wcin_sync = &off_51AE14; + std::locale::~locale((_DWORD **)&dword_50C0BC); + __gnu_internal::buf_wcerr_sync = &off_51AE14; + std::locale::~locale((_DWORD **)&dword_50C0FC); + v9 = ___acrt_iob_func; + v3 = ___acrt_iob_func(1u); + __gnu_cxx::stdio_filebuf::stdio_filebuf(__gnu_internal::buf_cout, v3, 16, 512); + v4 = v9(0); + __gnu_cxx::stdio_filebuf::stdio_filebuf(__gnu_internal::buf_cin, v4, 8, 512); + v5 = v9(2u); + __gnu_cxx::stdio_filebuf::stdio_filebuf(__gnu_internal::buf_cerr, v5, 16, 512); + std::ios::rdbuf(dword_50C8A4, (int)__gnu_internal::buf_cout); + std::ios::rdbuf(dword_50C6C8, (int)__gnu_internal::buf_cin); + std::ios::rdbuf(&dword_50C764, (int)__gnu_internal::buf_cerr); + std::ios::rdbuf(dword_50C804, (int)__gnu_internal::buf_cerr); + v6 = v9(1u); + __gnu_cxx::stdio_filebuf::stdio_filebuf(__gnu_internal::buf_wcout, v6, 16, 512); + v7 = v9(0); + __gnu_cxx::stdio_filebuf::stdio_filebuf(__gnu_internal::buf_wcin, v7, 8, 512); + v8 = v9(2u); + __gnu_cxx::stdio_filebuf::stdio_filebuf(__gnu_internal::buf_wcerr, v8, 16, 512); + std::wios::rdbuf(dword_50CB24, (int)__gnu_internal::buf_wcout); + std::wios::rdbuf(dword_50C948, (int)__gnu_internal::buf_wcin); + std::wios::rdbuf(&dword_50C9E4, (int)__gnu_internal::buf_wcerr); + std::wios::rdbuf(dword_50CA84, (int)__gnu_internal::buf_wcerr); + std::ios_base::Init::~Init(); + return lpuexcpt; + } + std::ios_base::Init::Init(); + goto LABEL_6; + } + return lpuexcpt; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50BFFC: using guessed type _DWORD dword_50BFFC; +// 50C03C: using guessed type _DWORD dword_50C03C; +// 50C07C: using guessed type _DWORD dword_50C07C; +// 50C0BC: using guessed type _DWORD dword_50C0BC; +// 50C0FC: using guessed type _DWORD dword_50C0FC; +// 50C13C: using guessed type _DWORD dword_50C13C; +// 50C678: using guessed type int std::ios_base::Init::_S_refcount; +// 50C67C: using guessed type char std::ios_base::Init::_S_synced_with_stdio; +// 50C6C8: using guessed type int dword_50C6C8[28]; +// 50C764: using guessed type int dword_50C764; +// 50C804: using guessed type int dword_50C804[28]; +// 50C8A4: using guessed type int dword_50C8A4[28]; +// 50C948: using guessed type int dword_50C948[28]; +// 50C9E4: using guessed type int dword_50C9E4; +// 50CA84: using guessed type int dword_50CA84[28]; +// 50CB24: using guessed type int dword_50CB24[28]; +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004F5070) -------------------------------------------------------- +void __thiscall std::ios_base::_M_call_callbacks(_DWORD *this, int a2) +{ + int **i; // [esp+14h] [ebp-58h] + + for ( i = (int **)this[6]; i; i = (int **)*i ) + ((void (__cdecl *)(int, _DWORD *, int *))i[1])(a2, this, i[2]); +} + +//----- (004F5160) -------------------------------------------------------- +_DWORD *__thiscall std::ios_base::register_callback(_DWORD *this, int a2, int a3) +{ + _DWORD *result; // eax + int v5; // edx + + result = operator new(0x10u); + v5 = this[6]; + result[3] = 0; + *result = v5; + this[6] = result; + result[1] = a2; + result[2] = a3; + return result; +} + +//----- (004F51A0) -------------------------------------------------------- +void __fastcall std::ios_base::_M_dispose_callbacks(int a1) +{ + volatile signed __int32 *Block; // eax + int v3; // edx + volatile signed __int32 *v4; // esi + + Block = *(volatile signed __int32 **)(a1 + 24); + if ( Block ) + { + while ( 1 ) + { + if ( _CRT_MT ) + { + if ( _InterlockedExchangeAdd(Block + 3, 0xFFFFFFFF) ) + break; + } + else + { + v3 = *((_DWORD *)Block + 3); + *((_DWORD *)Block + 3) = v3 - 1; + if ( v3 ) + break; + } + v4 = (volatile signed __int32 *)*Block; + operator delete((void *)Block); + if ( !v4 ) + break; + Block = v4; + } + } + *(_DWORD *)(a1 + 24) = 0; +} +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004F5200) -------------------------------------------------------- +void std::ios_base::Init::Init() +{ + if ( !_CRT_MT ) + { + if ( std::ios_base::Init::_S_refcount++ ) + return; +LABEL_5: + std::ios_base::Init::Init(); + return; + } + if ( !_InterlockedExchangeAdd(&std::ios_base::Init::_S_refcount, 1u) ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C678: using guessed type int std::ios_base::Init::_S_refcount; + +//----- (004F5240) -------------------------------------------------------- +void std::ios_base::Init::Init() +{ + FILE *v0; // eax + int v1; // eax + int v2; // eax + int v3; // eax + int v4; // eax + int v5; // eax + int v6; // [esp+14h] [ebp-44h] + int v7; // [esp+14h] [ebp-44h] + int v8; // [esp+14h] [ebp-44h] + int v9; // [esp+14h] [ebp-44h] + int v10; // [esp+14h] [ebp-44h] + FILE *(__cdecl *lpuexcpt)(unsigned int); // [esp+18h] [ebp-40h] + struct _Unwind_Exception *lpuexcpta; // [esp+18h] [ebp-40h] + + std::ios_base::Init::_S_synced_with_stdio = 1; + lpuexcpt = ___acrt_iob_func; + v0 = ___acrt_iob_func(1u); + __gnu_internal::buf_cout_sync = &off_51ADD4; + v6 = (int)v0; + dword_50C064 = 0; + dword_50C068 = 0; + dword_50C06C = 0; + dword_50C070 = 0; + dword_50C074 = 0; + dword_50C078 = 0; + std::locale::locale(&dword_50C07C); + __gnu_internal::buf_cout_sync = &off_519C64; + dword_50C080 = v6; + dword_50C084 = -1; + v1 = (int)lpuexcpt(0); + __gnu_internal::buf_cin_sync = &off_51ADD4; + v7 = v1; + dword_50BFE4 = 0; + dword_50BFE8 = 0; + dword_50BFEC = 0; + dword_50BFF0 = 0; + dword_50BFF4 = 0; + dword_50BFF8 = 0; + std::locale::locale(&dword_50BFFC); + __gnu_internal::buf_cin_sync = &off_519C64; + dword_50C000 = v7; + dword_50C004 = -1; + v2 = (int)lpuexcpt(2u); + __gnu_internal::buf_cerr_sync = &off_51ADD4; + v8 = v2; + dword_50C024 = 0; + dword_50C028 = 0; + dword_50C02C = 0; + dword_50C030 = 0; + dword_50C034 = 0; + dword_50C038 = 0; + std::locale::locale(&dword_50C03C); + __gnu_internal::buf_cerr_sync = &off_519C64; + dword_50C044 = -1; + dword_50C040 = v8; + std::ios_base::ios_base(dword_50C8A4); + dword_50C914 = 0; + word_50C918 = 0; + dword_50C91C = 0; + dword_50C920 = 0; + dword_50C924 = 0; + dword_50C928 = 0; + std::cout = (int)&off_51A818; + dword_50C8A4[0] = (int)off_51A82C; + std::ios::init((int)dword_50C8A4, (int)&__gnu_internal::buf_cout_sync); + std::ios_base::ios_base(dword_50C6C8); + dword_50C738 = 0; + word_50C73C = 0; + dword_50C740 = 0; + dword_50C744 = 0; + dword_50C748 = 0; + dword_50C74C = 0; + std::cin = (int)&off_51A7F0; + dword_50C6C8[0] = (int)off_51A804; + dword_50C6C4 = 0; + std::ios::init((int)dword_50C6C8, (int)&__gnu_internal::buf_cin_sync); + std::ios_base::ios_base(&dword_50C764); + word_50C7D8 = 0; + dword_50C7D4 = 0; + dword_50C7DC = 0; + dword_50C7E0 = 0; + dword_50C7E4 = 0; + dword_50C7E8 = 0; + std::cerr = (int)&off_51A818; + dword_50C764 = (int)off_51A82C; + std::ios::init((int)&dword_50C764, (int)&__gnu_internal::buf_cerr_sync); + std::ios_base::ios_base(dword_50C804); + dword_50C874 = 0; + word_50C878 = 0; + dword_50C87C = 0; + dword_50C880 = 0; + dword_50C884 = 0; + dword_50C888 = 0; + std::clog = (int)&off_51A818; + dword_50C804[0] = (int)off_51A82C; + std::ios::init((int)dword_50C804, (int)&__gnu_internal::buf_cerr_sync); + dword_50C770 |= 0x2000u; + dword_50C738 = (int)&std::cout; + dword_50C7D4 = (int)&std::cout; + v3 = (int)lpuexcpt(1u); + __gnu_internal::buf_wcout_sync = &off_51AE14; + v9 = v3; + dword_50C124 = 0; + dword_50C128 = 0; + dword_50C12C = 0; + dword_50C130 = 0; + dword_50C134 = 0; + dword_50C138 = 0; + std::locale::locale(&dword_50C13C); + __gnu_internal::buf_wcout_sync = &off_519CA4; + word_50C144 = -1; + dword_50C140 = v9; + v4 = (int)lpuexcpt(0); + __gnu_internal::buf_wcin_sync = &off_51AE14; + v10 = v4; + dword_50C0A4 = 0; + dword_50C0A8 = 0; + dword_50C0AC = 0; + dword_50C0B0 = 0; + dword_50C0B4 = 0; + dword_50C0B8 = 0; + std::locale::locale(&dword_50C0BC); + __gnu_internal::buf_wcin_sync = &off_519CA4; + word_50C0C4 = -1; + dword_50C0C0 = v10; + v5 = (int)lpuexcpt(2u); + __gnu_internal::buf_wcerr_sync = &off_51AE14; + lpuexcpta = (struct _Unwind_Exception *)v5; + dword_50C0E4 = 0; + dword_50C0E8 = 0; + dword_50C0EC = 0; + dword_50C0F0 = 0; + dword_50C0F4 = 0; + dword_50C0F8 = 0; + std::locale::locale(&dword_50C0FC); + __gnu_internal::buf_wcerr_sync = &off_519CA4; + dword_50C100 = (int)lpuexcpta; + word_50C104 = -1; + std::ios_base::ios_base(dword_50CB24); + dword_50CB94 = 0; + word_50CB98 = 0; + byte_50CB9A = 0; + dword_50CB9C = 0; + dword_50CBA0 = 0; + dword_50CBA4 = 0; + dword_50CBA8 = 0; + std::wcout = (int)&off_51AB74; + dword_50CB24[0] = (int)off_51AB88; + std::wios::init((int)dword_50CB24, (int)&__gnu_internal::buf_wcout_sync); + std::ios_base::ios_base(dword_50C948); + dword_50C9B8 = 0; + word_50C9BC = 0; + byte_50C9BE = 0; + dword_50C9C0 = 0; + dword_50C9C4 = 0; + dword_50C9C8 = 0; + dword_50C9CC = 0; + std::wcin = (int)&off_51AB4C; + dword_50C948[0] = (int)off_51AB60; + dword_50C944 = 0; + std::wios::init((int)dword_50C948, (int)&__gnu_internal::buf_wcin_sync); + std::ios_base::ios_base(&dword_50C9E4); + word_50CA58 = 0; + dword_50CA54 = 0; + byte_50CA5A = 0; + dword_50CA5C = 0; + dword_50CA60 = 0; + dword_50CA64 = 0; + dword_50CA68 = 0; + std::wcerr = (int)&off_51AB74; + dword_50C9E4 = (int)off_51AB88; + std::wios::init((int)&dword_50C9E4, (int)&__gnu_internal::buf_wcerr_sync); + std::ios_base::ios_base(dword_50CA84); + dword_50CAF4 = 0; + word_50CAF8 = 0; + byte_50CAFA = 0; + dword_50CAFC = 0; + dword_50CB00 = 0; + dword_50CB04 = 0; + dword_50CB08 = 0; + std::wclog = (int)&off_51AB74; + dword_50CA84[0] = (int)off_51AB88; + std::wios::init((int)dword_50CA84, (int)&__gnu_internal::buf_wcerr_sync); + dword_50C9F0 |= 0x2000u; + dword_50C9B8 = (int)&std::wcout; + dword_50CA54 = (int)&std::wcout; + if ( _CRT_MT ) + _InterlockedAdd(&std::ios_base::Init::_S_refcount, 1u); + else + ++std::ios_base::Init::_S_refcount; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50BFE4: using guessed type int dword_50BFE4; +// 50BFE8: using guessed type int dword_50BFE8; +// 50BFEC: using guessed type int dword_50BFEC; +// 50BFF0: using guessed type int dword_50BFF0; +// 50BFF4: using guessed type int dword_50BFF4; +// 50BFF8: using guessed type int dword_50BFF8; +// 50BFFC: using guessed type _DWORD dword_50BFFC; +// 50C000: using guessed type int dword_50C000; +// 50C004: using guessed type int dword_50C004; +// 50C024: using guessed type int dword_50C024; +// 50C028: using guessed type int dword_50C028; +// 50C02C: using guessed type int dword_50C02C; +// 50C030: using guessed type int dword_50C030; +// 50C034: using guessed type int dword_50C034; +// 50C038: using guessed type int dword_50C038; +// 50C03C: using guessed type _DWORD dword_50C03C; +// 50C040: using guessed type int dword_50C040; +// 50C044: using guessed type int dword_50C044; +// 50C064: using guessed type int dword_50C064; +// 50C068: using guessed type int dword_50C068; +// 50C06C: using guessed type int dword_50C06C; +// 50C070: using guessed type int dword_50C070; +// 50C074: using guessed type int dword_50C074; +// 50C078: using guessed type int dword_50C078; +// 50C07C: using guessed type _DWORD dword_50C07C; +// 50C080: using guessed type int dword_50C080; +// 50C084: using guessed type int dword_50C084; +// 50C0A4: using guessed type int dword_50C0A4; +// 50C0A8: using guessed type int dword_50C0A8; +// 50C0AC: using guessed type int dword_50C0AC; +// 50C0B0: using guessed type int dword_50C0B0; +// 50C0B4: using guessed type int dword_50C0B4; +// 50C0B8: using guessed type int dword_50C0B8; +// 50C0BC: using guessed type _DWORD dword_50C0BC; +// 50C0C0: using guessed type int dword_50C0C0; +// 50C0C4: using guessed type __int16 word_50C0C4; +// 50C0E4: using guessed type int dword_50C0E4; +// 50C0E8: using guessed type int dword_50C0E8; +// 50C0EC: using guessed type int dword_50C0EC; +// 50C0F0: using guessed type int dword_50C0F0; +// 50C0F4: using guessed type int dword_50C0F4; +// 50C0F8: using guessed type int dword_50C0F8; +// 50C0FC: using guessed type _DWORD dword_50C0FC; +// 50C100: using guessed type int dword_50C100; +// 50C104: using guessed type __int16 word_50C104; +// 50C124: using guessed type int dword_50C124; +// 50C128: using guessed type int dword_50C128; +// 50C12C: using guessed type int dword_50C12C; +// 50C130: using guessed type int dword_50C130; +// 50C134: using guessed type int dword_50C134; +// 50C138: using guessed type int dword_50C138; +// 50C13C: using guessed type _DWORD dword_50C13C; +// 50C140: using guessed type int dword_50C140; +// 50C144: using guessed type __int16 word_50C144; +// 50C678: using guessed type int std::ios_base::Init::_S_refcount; +// 50C67C: using guessed type char std::ios_base::Init::_S_synced_with_stdio; +// 50C6C0: using guessed type int std::cin; +// 50C6C4: using guessed type int dword_50C6C4; +// 50C6C8: using guessed type int dword_50C6C8[28]; +// 50C738: using guessed type int dword_50C738; +// 50C73C: using guessed type __int16 word_50C73C; +// 50C740: using guessed type int dword_50C740; +// 50C744: using guessed type int dword_50C744; +// 50C748: using guessed type int dword_50C748; +// 50C74C: using guessed type int dword_50C74C; +// 50C760: using guessed type int std::cerr; +// 50C764: using guessed type int dword_50C764; +// 50C770: using guessed type int dword_50C770; +// 50C7D4: using guessed type int dword_50C7D4; +// 50C7D8: using guessed type __int16 word_50C7D8; +// 50C7DC: using guessed type int dword_50C7DC; +// 50C7E0: using guessed type int dword_50C7E0; +// 50C7E4: using guessed type int dword_50C7E4; +// 50C7E8: using guessed type int dword_50C7E8; +// 50C800: using guessed type int std::clog; +// 50C804: using guessed type int dword_50C804[28]; +// 50C874: using guessed type int dword_50C874; +// 50C878: using guessed type __int16 word_50C878; +// 50C87C: using guessed type int dword_50C87C; +// 50C880: using guessed type int dword_50C880; +// 50C884: using guessed type int dword_50C884; +// 50C888: using guessed type int dword_50C888; +// 50C8A0: using guessed type int std::cout; +// 50C8A4: using guessed type int dword_50C8A4[28]; +// 50C914: using guessed type int dword_50C914; +// 50C918: using guessed type __int16 word_50C918; +// 50C91C: using guessed type int dword_50C91C; +// 50C920: using guessed type int dword_50C920; +// 50C924: using guessed type int dword_50C924; +// 50C928: using guessed type int dword_50C928; +// 50C940: using guessed type int std::wcin; +// 50C944: using guessed type int dword_50C944; +// 50C948: using guessed type int dword_50C948[28]; +// 50C9B8: using guessed type int dword_50C9B8; +// 50C9BC: using guessed type __int16 word_50C9BC; +// 50C9BE: using guessed type char byte_50C9BE; +// 50C9C0: using guessed type int dword_50C9C0; +// 50C9C4: using guessed type int dword_50C9C4; +// 50C9C8: using guessed type int dword_50C9C8; +// 50C9CC: using guessed type int dword_50C9CC; +// 50C9E0: using guessed type int std::wcerr; +// 50C9E4: using guessed type int dword_50C9E4; +// 50C9F0: using guessed type int dword_50C9F0; +// 50CA54: using guessed type int dword_50CA54; +// 50CA58: using guessed type __int16 word_50CA58; +// 50CA5A: using guessed type char byte_50CA5A; +// 50CA5C: using guessed type int dword_50CA5C; +// 50CA60: using guessed type int dword_50CA60; +// 50CA64: using guessed type int dword_50CA64; +// 50CA68: using guessed type int dword_50CA68; +// 50CA80: using guessed type int std::wclog; +// 50CA84: using guessed type int dword_50CA84[28]; +// 50CAF4: using guessed type int dword_50CAF4; +// 50CAF8: using guessed type __int16 word_50CAF8; +// 50CAFA: using guessed type char byte_50CAFA; +// 50CAFC: using guessed type int dword_50CAFC; +// 50CB00: using guessed type int dword_50CB00; +// 50CB04: using guessed type int dword_50CB04; +// 50CB08: using guessed type int dword_50CB08; +// 50CB20: using guessed type int std::wcout; +// 50CB24: using guessed type int dword_50CB24[28]; +// 50CB94: using guessed type int dword_50CB94; +// 50CB98: using guessed type __int16 word_50CB98; +// 50CB9A: using guessed type char byte_50CB9A; +// 50CB9C: using guessed type int dword_50CB9C; +// 50CBA0: using guessed type int dword_50CBA0; +// 50CBA4: using guessed type int dword_50CBA4; +// 50CBA8: using guessed type int dword_50CBA8; +// 519C64: using guessed type int (*off_519C64)(); +// 519CA4: using guessed type int (*off_519CA4)(); +// 51A7F0: using guessed type void (__cdecl *off_51A7F0)(std::istream *__hidden this); +// 51A804: using guessed type void (__cdecl *off_51A804[2])(std::istream *__hidden this); +// 51A818: using guessed type void (__cdecl *off_51A818)(std::ostream *__hidden this); +// 51A82C: using guessed type void (__cdecl *off_51A82C[2])(std::ostream *__hidden this); +// 51AB4C: using guessed type int (*off_51AB4C)(); +// 51AB60: using guessed type int (*off_51AB60[2])(); +// 51AB74: using guessed type int (*off_51AB74)(); +// 51AB88: using guessed type int (*off_51AB88[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51AE14: using guessed type int (*off_51AE14)(); + +//----- (004F5B30) -------------------------------------------------------- +void __cdecl std::ios_base::Init::~Init() +{ + int v0; // eax + + if ( !_CRT_MT ) + { + v0 = std::ios_base::Init::_S_refcount--; + if ( v0 != 2 ) + return; +LABEL_5: + std::ostream::flush(&std::cout); + std::ostream::flush(&std::cerr); + std::ostream::flush(&std::clog); + std::wostream::flush(&std::wcout); + std::wostream::flush(&std::wcerr); + std::wostream::flush(&std::wclog); + return; + } + if ( _InterlockedExchangeAdd(&std::ios_base::Init::_S_refcount, 0xFFFFFFFF) == 2 ) + goto LABEL_5; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50C678: using guessed type int std::ios_base::Init::_S_refcount; +// 50C760: using guessed type int std::cerr; +// 50C800: using guessed type int std::clog; +// 50C8A0: using guessed type int std::cout; +// 50C9E0: using guessed type int std::wcerr; +// 50CA80: using guessed type int std::wclog; +// 50CB20: using guessed type int std::wcout; + +//----- (004F5C10) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::ios_base::imbue( + volatile signed __int32 **ecx0, + volatile signed __int32 **this, + volatile signed __int32 **a3) +{ + const std::locale *v5; // [esp+4h] [ebp-18h] + + std::locale::locale(ecx0, this + 27, v5); + std::locale::operator=(this + 27, a3); + std::ios_base::_M_call_callbacks(this, 1); + return ecx0; +} +// 4F5C22: variable 'v5' is possibly undefined + +//----- (004F5C60) -------------------------------------------------------- +int std::ios_base::xalloc() +{ + int result; // eax + + if ( _CRT_MT ) + return _InterlockedExchangeAdd(&std::ios_base::xalloc(void)::_S_top, 1u) + 4; + result = std::ios_base::xalloc(void)::_S_top + 4; + ++std::ios_base::xalloc(void)::_S_top; + return result; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50CC14: using guessed type int std::ios_base::xalloc(void)::_S_top; + +//----- (004F5CA0) -------------------------------------------------------- +void __fastcall std::ios_base::_M_init(int a1) +{ + _DWORD *v2[4]; // [esp+1Ch] [ebp-10h] BYREF + + *(_DWORD *)(a1 + 4) = 6; + *(_DWORD *)(a1 + 8) = 0; + *(_DWORD *)(a1 + 12) = 4098; + std::locale::locale(v2); + std::locale::operator=((volatile signed __int32 **)(a1 + 108), (volatile signed __int32 **)v2); + std::locale::~locale(v2); +} + +//----- (004F5CF0) -------------------------------------------------------- +volatile signed __int32 **__userpurge std::ios_base::_M_move@( + int a1@, + std::ios_base *this, + std::ios_base *a3) +{ + int v3; // edi + int v5; // eax + int v6; // eax + std::ios_base *v7; // eax + int v8; // eax + int v10; // edx + _DWORD *v11; // eax + int *v12; // ecx + int v13; // ebp + int v14; // edi + + v3 = a1 + 36; + *(_DWORD *)(a1 + 4) = *((_DWORD *)this + 1); + *(_DWORD *)(a1 + 8) = *((_DWORD *)this + 2); + *(_DWORD *)(a1 + 12) = *((_DWORD *)this + 3); + *(_DWORD *)(a1 + 16) = *((_DWORD *)this + 4); + *(_DWORD *)(a1 + 20) = *((_DWORD *)this + 5); + v5 = *((_DWORD *)this + 6); + *((_DWORD *)this + 6) = 0; + *(_DWORD *)(a1 + 24) = v5; + v6 = *(_DWORD *)(a1 + 104); + if ( v6 != a1 + 36 && v6 ) + operator delete[](*(void **)(a1 + 104)); + v7 = (std::ios_base *)*((_DWORD *)this + 26); + if ( v7 == (std::ios_base *)((char *)this + 36) ) + { + *(_DWORD *)(a1 + 104) = v3; + v10 = 0; + *(_DWORD *)(a1 + 100) = 8; + while ( 1 ) + { + v11 = (_DWORD *)(v3 + v10); + v12 = (int *)(v10 + *((_DWORD *)this + 26)); + v10 += 8; + v13 = *v12; + v14 = v12[1]; + *v12 = 0; + v12[1] = 0; + *v11 = v13; + v11[1] = v14; + if ( v10 == 64 ) + break; + v3 = *(_DWORD *)(a1 + 104); + } + } + else + { + *((_DWORD *)this + 26) = (char *)this + 36; + *(_DWORD *)(a1 + 104) = v7; + v8 = *((_DWORD *)this + 25); + *((_DWORD *)this + 25) = 8; + *(_DWORD *)(a1 + 100) = v8; + } + return std::locale::operator=((volatile signed __int32 **)(a1 + 108), (volatile signed __int32 **)this + 27); +} + +//----- (004F5DC0) -------------------------------------------------------- +void __userpurge std::ios_base::_M_swap(std::ios_base **a1@, std::ios_base *this, std::ios_base *a3) +{ + std::ios_base *v3; // ebp + std::ios_base *v4; // ebx + std::ios_base *v5; // eax + std::ios_base *v6; // edi + std::ios_base *v7; // edx + std::ios_base *v8; // eax + std::ios_base *v9; // edx + std::ios_base *v10; // eax + std::ios_base *v11; // edx + std::ios_base *v12; // eax + std::ios_base *v13; // edx + std::ios_base *v14; // eax + std::ios_base *v15; // edx + std::ios_base *v16; // eax + char *v17; // edx + char *v18; // eax + std::ios_base *v19; // edx + int v20; // eax + volatile signed __int32 **v21; // ebx + int i; // ecx + int v23; // ebp + int v24; // edi + int v25; // edx + const std::locale *Src; // [esp+4h] [ebp-48h] + std::ios_base *v27; // [esp+18h] [ebp-34h] + std::ios_base *v28; // [esp+1Ch] [ebp-30h] + _DWORD *v29[8]; // [esp+2Ch] [ebp-20h] BYREF + + v3 = (std::ios_base *)(a1 + 9); + v4 = (std::ios_base *)a1; + v5 = a1[1]; + v6 = a1[26]; + a1[1] = (std::ios_base *)*((_DWORD *)this + 1); + v7 = (std::ios_base *)*((_DWORD *)this + 2); + *((_DWORD *)this + 1) = v5; + v8 = a1[2]; + a1[2] = v7; + v9 = (std::ios_base *)*((_DWORD *)this + 3); + *((_DWORD *)this + 2) = v8; + v10 = a1[3]; + a1[3] = v9; + v11 = (std::ios_base *)*((_DWORD *)this + 4); + *((_DWORD *)this + 3) = v10; + v12 = a1[4]; + a1[4] = v11; + v13 = (std::ios_base *)*((_DWORD *)this + 5); + *((_DWORD *)this + 4) = v12; + v14 = a1[5]; + a1[5] = v13; + v15 = (std::ios_base *)*((_DWORD *)this + 6); + *((_DWORD *)this + 5) = v14; + v16 = a1[6]; + a1[6] = v15; + v17 = (char *)this + 36; + *((_DWORD *)this + 6) = v16; + v18 = (char *)*((_DWORD *)this + 26); + if ( v6 != (std::ios_base *)(a1 + 9) ) + { +LABEL_6: + if ( v18 != v17 ) + { + a1[26] = (std::ios_base *)v18; + *((_DWORD *)this + 26) = v6; + goto LABEL_8; + } + if ( v6 != v3 ) + { + v19 = (std::ios_base *)a1; + a1 = (std::ios_base **)this; + goto LABEL_5; + } +LABEL_4: + v3 = (std::ios_base *)((char *)this + 36); + v6 = (std::ios_base *)*((_DWORD *)this + 26); + v19 = this; +LABEL_5: + v28 = (std::ios_base *)a1; + v27 = v19; + memmove((char *)v19 + 36, a1 + 9, 0x40u); + *((_DWORD *)v28 + 26) = v6; + *((_DWORD *)v27 + 26) = v3; +LABEL_8: + v20 = *((_DWORD *)v4 + 25); + *((_DWORD *)v4 + 25) = *((_DWORD *)this + 25); + *((_DWORD *)this + 25) = v20; + goto LABEL_9; + } + if ( v18 != v17 ) + { + if ( v6 == v3 ) + goto LABEL_4; + goto LABEL_6; + } + for ( i = 0; i != 8; ++i ) + { + v23 = *((_DWORD *)v4 + 2 * i + 9); + v24 = *((_DWORD *)v4 + 2 * i + 10); + v25 = *((_DWORD *)this + 2 * i + 10); + *((_DWORD *)v4 + 2 * i + 9) = *((_DWORD *)this + 2 * i + 9); + *((_DWORD *)v4 + 2 * i + 10) = v25; + *((_DWORD *)this + 2 * i + 9) = v23; + *((_DWORD *)this + 2 * i + 10) = v24; + } +LABEL_9: + v21 = (volatile signed __int32 **)((char *)v4 + 108); + std::locale::locale((volatile signed __int32 **)v29, v21, Src); + std::locale::operator=(v21, (volatile signed __int32 **)this + 27); + std::locale::operator=((volatile signed __int32 **)this + 27, (volatile signed __int32 **)v29); + std::locale::~locale(v29); +} +// 4F5E99: variable 'Src' is possibly undefined + +//----- (004F5F20) -------------------------------------------------------- +void __thiscall std::ios_base::failure[abi:cxx11]::failure(_DWORD *this, char *a2, int *a3) +{ + std::system_error::system_error(this, *a3, a3[1], a2); + *this = &off_51A788; +} +// 51A788: using guessed type int (*off_51A788)(); + +//----- (004F5F60) -------------------------------------------------------- +void __thiscall std::ios_base::failure[abi:cxx11]::failure(_DWORD *this, int a2) +{ + if ( !(_BYTE)`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec + && __cxa_guard_acquire(&`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec) ) + { + __cxa_guard_release(&`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec); + atexit((_PVFV)__tcf_0_4); + } + std::system_error::system_error(this, 1, (int)&`anonymous namespace'::__io_category_instance(void)::__ec, a2); + *this = &off_51A788; +} +// 50CBD0: using guessed type void (__cdecl **`anonymous namespace'::__io_category_instance(void)::__ec)(_anonymous_namespace_::io_error_category *__hidden this); +// 51A788: using guessed type int (*off_51A788)(); + +//----- (004F5FD0) -------------------------------------------------------- +void __thiscall std::ios_base::failure[abi:cxx11]::failure(_DWORD *this, int a2, int *a3) +{ + std::system_error::system_error(this, *a3, a3[1], a2); + *this = &off_51A788; +} +// 51A788: using guessed type int (*off_51A788)(); + +//----- (004F6010) -------------------------------------------------------- +void __fastcall std::ios_base::failure[abi:cxx11]::~failure(_DWORD *Block) +{ + std::exception *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51A788; + std::system_error::~system_error(Blocka); + operator delete(Block); +} +// 4F601C: variable 'Blocka' is possibly undefined +// 51A788: using guessed type int (*off_51A788)(); + +//----- (004F6030) -------------------------------------------------------- +void __cdecl std::ios_base::failure[abi:cxx11]::~failure(std::exception *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51A788; + std::system_error::~system_error(a1); +} +// 4F6030: variable 'v1' is possibly undefined +// 51A788: using guessed type int (*off_51A788)(); + +//----- (004F6040) -------------------------------------------------------- +void __userpurge std::ios_base::failure::failure(_DWORD *a1@, std::ios_base::failure *this, const std::string *a3) +{ + const std::string *v3; // [esp+4h] [ebp-54h] + + *a1 = &off_51A79C; + std::string::string(a1 + 1, this, v3); +} +// 4F6088: variable 'v3' is possibly undefined +// 51A79C: using guessed type void (__cdecl *off_51A79C)(std::ios_base::failure *__hidden this); + +//----- (004F60D0) -------------------------------------------------------- +void __fastcall std::ios_base::failure::~failure(_DWORD *a1) +{ + int v2; // eax + int v3; // ecx + int v4; // eax + std::exception *Block; // [esp+0h] [ebp-2Ch] + int v6[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *a1 = &off_51A79C; + v3 = a1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; +LABEL_5: + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v6); + goto LABEL_3; + } + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 <= 0 ) + goto LABEL_5; +LABEL_3: + std::exception::~exception(Block); + operator delete(a1); +} +// 4F60F7: variable 'Block' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51A79C: using guessed type void (__cdecl *off_51A79C)(std::ios_base::failure *__hidden this); +// 4F60D0: using guessed type int var_D[3]; + +//----- (004F6140) -------------------------------------------------------- +void __cdecl std::ios_base::failure::~failure(std::ios_base::failure *this) +{ + _DWORD *v1; // ecx + int v2; // eax + int v3; // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v2 = _CRT_MT; + *v1 = &off_51A79C; + v3 = v1[1]; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 - 4), 0xFFFFFFFF) > 0 ) + goto LABEL_3; + } + else + { + v4 = *(_DWORD *)(v3 - 4); + *(_DWORD *)(v3 - 4) = v4 - 1; + if ( v4 > 0 ) + { +LABEL_3: + std::exception::~exception(this); + return; + } + } + std::string::_Rep::_M_destroy((void *)(v3 - 12), (int)v5); + std::exception::~exception(this); +} +// 4F614B: variable 'v1' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; +// 51A79C: using guessed type void (__cdecl *off_51A79C)(std::ios_base::failure *__hidden this); +// 4F6140: using guessed type int var_D[3]; + +//----- (004F61A0) -------------------------------------------------------- +void __fastcall std::ios_base::ios_base(_DWORD *a1) +{ + _DWORD *v1; // ebx + _DWORD *v2; // eax + _DWORD *v3; // ecx + + v1 = a1 + 9; + *a1 = &off_51B6B4; + v2 = a1 + 9; + a1[1] = 0; + a1[2] = 0; + a1[3] = 0; + a1[4] = 0; + a1[5] = 0; + a1[6] = 0; + a1[7] = 0; + a1[8] = 0; + do + { + *v2 = 0; + v2 += 2; + *(v2 - 1) = 0; + } + while ( a1 + 25 != v2 ); + a1[25] = 8; + v3 = a1 + 27; + *(v3 - 1) = v1; + std::locale::locale(v3); +} +// 51B6B4: using guessed type void (__cdecl *off_51B6B4)(std::ios_base *__hidden this); + +//----- (004F6220) -------------------------------------------------------- +void __fastcall std::ios_base::~ios_base(int a1) +{ + void *Block; // eax + + *(_DWORD *)a1 = &off_51B6B4; + std::ios_base::_M_call_callbacks((_DWORD *)a1, 0); + std::ios_base::_M_dispose_callbacks(a1); + Block = *(void **)(a1 + 104); + if ( Block != (void *)(a1 + 36) ) + { + if ( Block ) + operator delete[](Block); + *(_DWORD *)(a1 + 104) = 0; + } + std::locale::~locale((_DWORD **)(a1 + 108)); + operator delete((void *)a1); +} +// 51B6B4: using guessed type void (__cdecl *off_51B6B4)(std::ios_base *__hidden this); + +//----- (004F6280) -------------------------------------------------------- +void __fastcall std::ios_base::~ios_base(int a1) +{ + void *Block; // eax + + *(_DWORD *)a1 = &off_51B6B4; + std::ios_base::_M_call_callbacks((_DWORD *)a1, 0); + std::ios_base::_M_dispose_callbacks(a1); + Block = *(void **)(a1 + 104); + if ( Block != (void *)(a1 + 36) ) + { + if ( Block ) + operator delete[](Block); + *(_DWORD *)(a1 + 104) = 0; + } + std::locale::~locale((_DWORD **)(a1 + 108)); +} +// 51B6B4: using guessed type void (__cdecl *off_51B6B4)(std::ios_base *__hidden this); + +//----- (004F62D0) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2, int a3, int a4) +{ + this[1] = a4 != 0; + *this = &off_51B6C4; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004F6370) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B6C4; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004F6410) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2, int a3, int a4) +{ + this[1] = a4 != 0; + *this = &off_51B6C4; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004F64B0) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B6C4; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004F6550) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B6C4; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4F658E: variable 'lpfctx' is possibly undefined +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004F65B0) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B6C4; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F65EE: variable 'lpfctx' is possibly undefined +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004F6610) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B6C4; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F664E: variable 'lpfctx' is possibly undefined +// 51B6C4: using guessed type int (*off_51B6C4)(); + +//----- (004F6670) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2, int a3, int a4) +{ + this[1] = a4 != 0; + *this = &off_51B6E0; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004F6710) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B6E0; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004F67B0) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2, int a3, int a4) +{ + this[1] = a4 != 0; + *this = &off_51B6E0; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004F6850) -------------------------------------------------------- +void __thiscall std::messages::messages(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B6E0; + this[2] = std::locale::facet::_S_get_c_locale(); +} +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004F68F0) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *Block) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *Block = &off_51B6E0; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(Block + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); + operator delete(Block); +} +// 4F692E: variable 'lpfctx' is possibly undefined +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004F6950) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B6E0; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F698E: variable 'lpfctx' is possibly undefined +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004F69B0) -------------------------------------------------------- +void __fastcall std::messages::~messages(_DWORD *a1) +{ + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + + *a1 = &off_51B6E0; + std::locale::facet::_S_destroy_c_locale((std::locale::facet *)(a1 + 2)); + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F69EE: variable 'lpfctx' is possibly undefined +// 51B6E0: using guessed type int (*off_51B6E0)(); + +//----- (004F6A10) -------------------------------------------------------- +_DWORD *__thiscall std::numpunct::_M_initialize_numpunct(_DWORD *this, int a2) +{ + _DWORD *v2; // eax + char *v3; // esi + int i; // eax + char *v5; // esi + int j; // eax + _DWORD *result; // eax + _DWORD *v8; // [esp+1Ch] [ebp-10h] + + v2 = (_DWORD *)this[2]; + if ( !v2 ) + { + v8 = this; + v2 = operator new(0x68u); + this = v8; + v2[1] = 0; + *v2 = &off_51AF60; + v2[2] = 0; + v2[3] = 0; + *((_BYTE *)v2 + 16) = 0; + v2[5] = 0; + v2[6] = 0; + v2[7] = 0; + v2[8] = 0; + *((_WORD *)v2 + 18) = 0; + *((_BYTE *)v2 + 100) = 0; + v8[2] = v2; + } + v2[2] = &unk_5110D0; + v3 = std::__num_base::_S_atoms_out[0]; + v2[3] = 0; + *((_BYTE *)v2 + 16) = 0; + *((_BYTE *)v2 + 36) = 46; + *(_BYTE *)(this[2] + 37) = 44; + for ( i = 0; i != 36; ++i ) + *(_BYTE *)(this[2] + i + 38) = v3[i]; + v5 = std::__num_base::_S_atoms_in[0]; + for ( j = 0; j != 26; ++j ) + *(_BYTE *)(this[2] + j + 74) = v5[j]; + result = (_DWORD *)this[2]; + result[5] = "true"; + result[6] = 4; + result[7] = "false"; + result[8] = 5; + return result; +} +// 50C480: using guessed type char *std::__num_base::_S_atoms_in[3]; +// 50C484: using guessed type char *std::__num_base::_S_atoms_out[2]; +// 51AF60: using guessed type int (*off_51AF60)(); + +//----- (004F6B10) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B6FC; + this[2] = a2; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004F6BB0) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + *this = &off_51B6FC; + this[2] = 0; + this[1] = a3 != 0; + std::numpunct::_M_initialize_numpunct(this, a2); +} +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004F6C40) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B6FC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004F6CE0) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B6FC; + this[2] = a2; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004F6D80) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + *this = &off_51B6FC; + this[2] = 0; + this[1] = a3 != 0; + std::numpunct::_M_initialize_numpunct(this, a2); +} +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004F6E10) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B6FC; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004F6EB0) -------------------------------------------------------- +void __fastcall std::numpunct::~numpunct(_DWORD *a1) +{ + std::numpunct::~numpunct(a1); + operator delete(a1); +} + +//----- (004F6F40) -------------------------------------------------------- +void __fastcall std::numpunct::~numpunct(_DWORD *a1) +{ + void *v1; // edx + void (__fastcall *v2)(void *); // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + void *Block; // [esp+14h] [ebp-48h] + + v1 = (void *)a1[2]; + *a1 = &off_51B6FC; + Block = v1; + if ( v1 ) + { + v2 = *(void (__fastcall **)(void *))(*(_DWORD *)v1 + 4); + if ( v2 == std::__numpunct_cache::~__numpunct_cache ) + { + std::__numpunct_cache::~__numpunct_cache((std::locale::facet *)lpfctx); + operator delete(Block); + } + else + { + v2(v1); + } + } + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F6F9F: variable 'lpfctx' is possibly undefined +// 51B6FC: using guessed type int (*off_51B6FC)(); + +//----- (004F7040) -------------------------------------------------------- +int __thiscall std::numpunct::_M_initialize_numpunct(_DWORD *this, int a2) +{ + _DWORD *v2; // edx + char *v3; // ebx + int v4; // eax + char *v5; // ebx + int result; // eax + _DWORD *v7; // eax + + v2 = (_DWORD *)this[2]; + if ( !v2 ) + { + v7 = operator new(0xA8u); + v7[1] = 0; + v2 = v7; + *v7 = &off_51AF70; + v7[2] = 0; + v7[3] = 0; + *((_BYTE *)v7 + 16) = 0; + v7[5] = 0; + v7[6] = 0; + v7[7] = 0; + v7[8] = 0; + v7[9] = 0; + *((_BYTE *)v7 + 164) = 0; + this[2] = v7; + } + v2[2] = &unk_5110D0; + v3 = std::__num_base::_S_atoms_out[0]; + v4 = 0; + v2[3] = 0; + *((_BYTE *)v2 + 16) = 0; + v2[9] = 2883630; + do + { + *((_WORD *)v2 + v4 + 20) = v3[v4]; + ++v4; + } + while ( v4 != 36 ); + v5 = std::__num_base::_S_atoms_in[0]; + for ( result = 0; result != 26; ++result ) + *((_WORD *)v2 + result + 56) = v5[result]; + v2[5] = &off_5110DC; + v2[6] = 4; + v2[7] = &off_5110E6; + v2[8] = 5; + return result; +} +// 50C480: using guessed type char *std::__num_base::_S_atoms_in[3]; +// 50C484: using guessed type char *std::__num_base::_S_atoms_out[2]; +// 5110DC: using guessed type void *off_5110DC; +// 5110E6: using guessed type void *off_5110E6; +// 51AF70: using guessed type int (*off_51AF70)(); + +//----- (004F7130) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B720; + this[2] = a2; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004F71D0) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + *this = &off_51B720; + this[2] = 0; + this[1] = a3 != 0; + std::numpunct::_M_initialize_numpunct(this, a2); +} +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004F7260) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B720; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004F7300) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + this[1] = a3 != 0; + *this = &off_51B720; + this[2] = a2; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004F73A0) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2, int a3) +{ + *this = &off_51B720; + this[2] = 0; + this[1] = a3 != 0; + std::numpunct::_M_initialize_numpunct(this, a2); +} +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004F7430) -------------------------------------------------------- +void __thiscall std::numpunct::numpunct(_DWORD *this, int a2) +{ + this[1] = a2 != 0; + *this = &off_51B720; + this[2] = 0; + std::numpunct::_M_initialize_numpunct(this, 0); +} +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004F74D0) -------------------------------------------------------- +void __fastcall std::numpunct::~numpunct(_DWORD *a1) +{ + std::numpunct::~numpunct(a1); + operator delete(a1); +} + +//----- (004F7560) -------------------------------------------------------- +void __fastcall std::numpunct::~numpunct(_DWORD *a1) +{ + void *v1; // edx + void (__fastcall *v2)(void *); // eax + struct SjLj_Function_Context *lpfctx; // [esp+0h] [ebp-5Ch] + void *Block; // [esp+14h] [ebp-48h] + + v1 = (void *)a1[2]; + *a1 = &off_51B720; + Block = v1; + if ( v1 ) + { + v2 = *(void (__fastcall **)(void *))(*(_DWORD *)v1 + 4); + if ( v2 == std::__numpunct_cache::~__numpunct_cache ) + { + std::__numpunct_cache::~__numpunct_cache((std::locale::facet *)lpfctx); + operator delete(Block); + } + else + { + v2(v1); + } + } + std::locale::facet::~facet((std::locale::facet *)lpfctx); +} +// 4F75BF: variable 'lpfctx' is possibly undefined +// 51B720: using guessed type int (*off_51B720)(); + +//----- (004F7660) -------------------------------------------------------- +BOOL __thiscall std::time_get>::time_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B744; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B744: using guessed type int (*off_51B744)(); + +//----- (004F7680) -------------------------------------------------------- +BOOL __thiscall std::time_get>::time_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B744; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B744: using guessed type int (*off_51B744)(); + +//----- (004F76A0) -------------------------------------------------------- +void __fastcall std::time_get>::~time_get(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B744; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F76AC: variable 'Blocka' is possibly undefined +// 51B744: using guessed type int (*off_51B744)(); + +//----- (004F76C0) -------------------------------------------------------- +void __cdecl std::time_get>::~time_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B744; + std::locale::facet::~facet(a1); +} +// 4F76C0: variable 'v1' is possibly undefined +// 51B744: using guessed type int (*off_51B744)(); + +//----- (004F76D0) -------------------------------------------------------- +void __cdecl std::time_get>::~time_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B744; + std::locale::facet::~facet(a1); +} +// 4F76D0: variable 'v1' is possibly undefined +// 51B744: using guessed type int (*off_51B744)(); + +//----- (004F76E0) -------------------------------------------------------- +BOOL __thiscall std::time_get>::time_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B76C; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B76C: using guessed type int (*off_51B76C)(); + +//----- (004F7700) -------------------------------------------------------- +BOOL __thiscall std::time_get>::time_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B76C; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B76C: using guessed type int (*off_51B76C)(); + +//----- (004F7720) -------------------------------------------------------- +void __fastcall std::time_get>::~time_get(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B76C; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F772C: variable 'Blocka' is possibly undefined +// 51B76C: using guessed type int (*off_51B76C)(); + +//----- (004F7740) -------------------------------------------------------- +void __cdecl std::time_get>::~time_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B76C; + std::locale::facet::~facet(a1); +} +// 4F7740: variable 'v1' is possibly undefined +// 51B76C: using guessed type int (*off_51B76C)(); + +//----- (004F7750) -------------------------------------------------------- +void __cdecl std::time_get>::~time_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B76C; + std::locale::facet::~facet(a1); +} +// 4F7750: variable 'v1' is possibly undefined +// 51B76C: using guessed type int (*off_51B76C)(); + +//----- (004F7760) -------------------------------------------------------- +BOOL __thiscall std::time_put>::time_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B794; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B794: using guessed type int (*off_51B794)(); + +//----- (004F7780) -------------------------------------------------------- +BOOL __thiscall std::time_put>::time_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B794; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B794: using guessed type int (*off_51B794)(); + +//----- (004F77A0) -------------------------------------------------------- +void __fastcall std::time_put>::~time_put(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B794; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F77AC: variable 'Blocka' is possibly undefined +// 51B794: using guessed type int (*off_51B794)(); + +//----- (004F77C0) -------------------------------------------------------- +void __cdecl std::time_put>::~time_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B794; + std::locale::facet::~facet(a1); +} +// 4F77C0: variable 'v1' is possibly undefined +// 51B794: using guessed type int (*off_51B794)(); + +//----- (004F77D0) -------------------------------------------------------- +void __cdecl std::time_put>::~time_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B794; + std::locale::facet::~facet(a1); +} +// 4F77D0: variable 'v1' is possibly undefined +// 51B794: using guessed type int (*off_51B794)(); + +//----- (004F77E0) -------------------------------------------------------- +BOOL __thiscall std::time_put>::time_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B7A8; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B7A8: using guessed type int (*off_51B7A8)(); + +//----- (004F7800) -------------------------------------------------------- +BOOL __thiscall std::time_put>::time_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B7A8; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B7A8: using guessed type int (*off_51B7A8)(); + +//----- (004F7820) -------------------------------------------------------- +void __fastcall std::time_put>::~time_put(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B7A8; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F782C: variable 'Blocka' is possibly undefined +// 51B7A8: using guessed type int (*off_51B7A8)(); + +//----- (004F7840) -------------------------------------------------------- +void __cdecl std::time_put>::~time_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B7A8; + std::locale::facet::~facet(a1); +} +// 4F7840: variable 'v1' is possibly undefined +// 51B7A8: using guessed type int (*off_51B7A8)(); + +//----- (004F7850) -------------------------------------------------------- +void __cdecl std::time_put>::~time_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B7A8; + std::locale::facet::~facet(a1); +} +// 4F7850: variable 'v1' is possibly undefined +// 51B7A8: using guessed type int (*off_51B7A8)(); + +//----- (004F7860) -------------------------------------------------------- +void __fastcall std::bad_alloc::~bad_alloc(_DWORD *a1) +{ + std::exception *Block; // [esp+0h] [ebp-1Ch] + + *a1 = &off_51B7BC; + std::exception::~exception(Block); + operator delete(a1); +} +// 4F786C: variable 'Block' is possibly undefined +// 51B7BC: using guessed type void (__cdecl *off_51B7BC)(std::bad_alloc *__hidden this); + +//----- (004F7890) -------------------------------------------------------- +void __cdecl std::bad_alloc::~bad_alloc(std::exception *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B7BC; + std::exception::~exception(a1); +} +// 4F7890: variable 'v1' is possibly undefined +// 51B7BC: using guessed type void (__cdecl *off_51B7BC)(std::bad_alloc *__hidden this); + +//----- (004F78A0) -------------------------------------------------------- +int __thiscall std::ios::exceptions(_DWORD *this, int a2) +{ + bool v2; // zf + int v3; // edx + int result; // eax + + v2 = this[30] == 0; + v3 = this[5]; + result = a2; + this[4] = a2; + if ( v2 ) + { + v3 |= 1u; + this[5] = v3; + } + if ( (v3 & a2) != 0 ) + std::__throw_ios_failure("basic_ios::clear"); + return result; +} + +//----- (004F78E0) -------------------------------------------------------- +int __thiscall std::ios::_M_setstate(_DWORD *this, int a2) +{ + int result; // eax + + this[5] |= a2; + result = this[4] & a2; + if ( result ) + __cxa_rethrow(); + return result; +} + +//----- (004F7900) -------------------------------------------------------- +void *__thiscall std::ios::_M_cache_locale(_DWORD *this, int a2) +{ + void *result; // eax + + if ( (unsigned __int8)std::has_facet>(a2) ) + { + this[31] = std::use_facet>(a2); + if ( (unsigned __int8)std::has_facet>>(a2) ) + goto LABEL_3; +LABEL_6: + this[32] = 0; + result = (void *)std::has_facet>>(a2); + if ( (_BYTE)result ) + goto LABEL_4; + goto LABEL_7; + } + this[31] = 0; + if ( !(unsigned __int8)std::has_facet>>(a2) ) + goto LABEL_6; +LABEL_3: + this[32] = std::use_facet>>(a2); + result = (void *)std::has_facet>>(a2); + if ( (_BYTE)result ) + { +LABEL_4: + result = std::use_facet>>(a2); + this[33] = result; + return result; + } +LABEL_7: + this[33] = 0; + return result; +} + +//----- (004F79A0) -------------------------------------------------------- +int __thiscall std::ios::tie(_DWORD *this, int a2) +{ + int result; // eax + + result = this[28]; + this[28] = a2; + return result; +} + +//----- (004F79B0) -------------------------------------------------------- +int __thiscall std::ios::fill(int this, char a2) +{ + int result; // eax + _BYTE *v4; // edi + int (__stdcall *v5)(unsigned __int8); // edx + + if ( *(_BYTE *)(this + 117) ) + { + result = *(unsigned __int8 *)(this + 116); + *(_BYTE *)(this + 116) = a2; + } + else + { + v4 = *(_BYTE **)(this + 124); + if ( !v4 ) + std::__throw_bad_cast(); + if ( v4[28] ) + { + result = (unsigned __int8)v4[61]; + } + else + { + std::ctype::_M_widen_init(*(_DWORD *)(this + 124)); + v5 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v4 + 24); + result = 32; + if ( v5 != std::ctype::do_widen ) + result = ((int (__thiscall *)(_BYTE *, int))v5)(v4, 32); + } + *(_BYTE *)(this + 117) = 1; + *(_BYTE *)(this + 116) = a2; + } + return result; +} + +//----- (004F7A30) -------------------------------------------------------- +BOOL __thiscall std::ios::init(int this, int a2) +{ + BOOL result; // eax + + std::ios_base::_M_init(this); + std::ios::_M_cache_locale((_DWORD *)this, this + 108); + *(_DWORD *)(this + 120) = a2; + *(_WORD *)(this + 116) = 0; + result = a2 == 0; + *(_DWORD *)(this + 112) = 0; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 20) = result; + return result; +} + +//----- (004F7A80) -------------------------------------------------------- +int __thiscall std::ios::move(int this, std::ios_base *a2) +{ + int v3; // eax + int result; // eax + std::ios_base *v5; // [esp+4h] [ebp-18h] + + std::ios_base::_M_move(this, a2, v5); + std::ios::_M_cache_locale((_DWORD *)this, this + 108); + v3 = *((_DWORD *)a2 + 28); + *((_DWORD *)a2 + 28) = 0; + *(_DWORD *)(this + 112) = v3; + *(_BYTE *)(this + 116) = *((_BYTE *)a2 + 116); + result = *((unsigned __int8 *)a2 + 117); + *(_DWORD *)(this + 120) = 0; + *(_BYTE *)(this + 117) = result; + return result; +} +// 4F7A8E: variable 'v5' is possibly undefined + +//----- (004F7AD0) -------------------------------------------------------- +int __thiscall std::ios::move(int this, std::ios_base *a2) +{ + int v3; // eax + int result; // eax + std::ios_base *v5; // [esp+4h] [ebp-18h] + + std::ios_base::_M_move(this, a2, v5); + std::ios::_M_cache_locale((_DWORD *)this, this + 108); + v3 = *((_DWORD *)a2 + 28); + *((_DWORD *)a2 + 28) = 0; + *(_DWORD *)(this + 112) = v3; + *(_BYTE *)(this + 116) = *((_BYTE *)a2 + 116); + result = *((unsigned __int8 *)a2 + 117); + *(_DWORD *)(this + 120) = 0; + *(_BYTE *)(this + 117) = result; + return result; +} +// 4F7ADE: variable 'v5' is possibly undefined + +//----- (004F7B20) -------------------------------------------------------- +void __thiscall std::ios::swap(int this, std::ios_base *a2) +{ + int v3; // eax + char v4; // dl + char v5; // dl + std::ios_base *v6; // [esp+4h] [ebp-58h] + + std::ios_base::_M_swap((std::ios_base **)this, a2, v6); + std::ios::_M_cache_locale((_DWORD *)this, this + 108); + std::ios::_M_cache_locale(a2, (int)a2 + 108); + v3 = *(_DWORD *)(this + 112); + *(_DWORD *)(this + 112) = *((_DWORD *)a2 + 28); + *((_DWORD *)a2 + 28) = v3; + v4 = *(_BYTE *)(this + 116); + *(_BYTE *)(this + 116) = *((_BYTE *)a2 + 116); + LOBYTE(v3) = *((_BYTE *)a2 + 117); + *((_BYTE *)a2 + 116) = v4; + v5 = *(_BYTE *)(this + 117); + *(_BYTE *)(this + 117) = v3; + *((_BYTE *)a2 + 117) = v5; +} +// 4F7B4D: variable 'v6' is possibly undefined + +//----- (004F7BC0) -------------------------------------------------------- +int __thiscall std::ios::clear(_DWORD *this, int a2) +{ + int v2; // eax + int result; // eax + + v2 = a2; + if ( !this[30] ) + v2 = a2 | 1; + this[5] = v2; + result = this[4] & v2; + if ( result ) + std::__throw_ios_failure("basic_ios::clear"); + return result; +} + +//----- (004F7C00) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::ios::imbue( + volatile signed __int32 **this, + volatile signed __int32 **a2, + volatile signed __int32 **a3) +{ + volatile signed __int32 *v3; // edx + const std::locale *v5; // [esp+4h] [ebp-64h] + const std::locale *v6; // [esp+4h] [ebp-64h] + volatile signed __int32 **v7; // [esp+10h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + _DWORD *v10[3]; // [esp+5Ch] [ebp-Ch] BYREF + + std::locale::locale(this, a2 + 27, v5); + std::ios_base::imbue((volatile signed __int32 **)v10, a2, a3); + std::locale::~locale(v10); + std::ios::_M_cache_locale(a2, (int)a3); + v3 = a2[30]; + if ( v3 ) + { + lpuexcpt = (struct _Unwind_Exception *)a2[30]; + v7 = (volatile signed __int32 **)(v3 + 7); + std::locale::locale((volatile signed __int32 **)v10, (volatile signed __int32 **)v3 + 7, v6); + (*(void (__thiscall **)(struct _Unwind_Exception *, volatile signed __int32 **))(*(_DWORD *)lpuexcpt + 8))( + lpuexcpt, + a3); + std::locale::operator=(v7, a3); + std::locale::~locale(v10); + } + return this; +} +// 4F7C3B: variable 'v5' is possibly undefined +// 4F7C94: variable 'v6' is possibly undefined + +//----- (004F7D20) -------------------------------------------------------- +int __thiscall std::ios::rdbuf(_DWORD *this, int a2) +{ + int v2; // edx + + v2 = this[30]; + this[30] = a2; + this[5] = a2 == 0; + if ( (this[4] & (a2 == 0)) != 0 ) + std::__throw_ios_failure("basic_ios::clear"); + return v2; +} + +//----- (004F7D60) -------------------------------------------------------- +int __thiscall std::ios::copyfmt(int this, _DWORD *a2) +{ + _DWORD *v3; // esi + int v4; // eax + _DWORD *v5; // edx + void *v6; // ebp + int v7; // edi + void *Block; // eax + _DWORD *v9; // edx + int v10; // ebp + int v11; // ecx + int v12; // eax + int v13; // esi + int v14; // eax + bool v15; // zf + char v16; // dl + int v17; // eax + int v18; // ecx + int v19; // edx + _DWORD *v21; // eax + int v22; // ecx + _BYTE *v24; // edi + _BYTE *v25; // edi + int (__stdcall *v26)(unsigned __int8); // eax + int (__stdcall *v27)(unsigned __int8); // eax + const std::locale *v28; // [esp+4h] [ebp-48h] + _DWORD *v29; // [esp+1Ch] [ebp-30h] + _DWORD *v30; // [esp+1Ch] [ebp-30h] + unsigned __int8 v31; // [esp+1Ch] [ebp-30h] + _DWORD *v32[8]; // [esp+2Ch] [ebp-20h] BYREF + + v3 = a2; + if ( (_DWORD *)this == a2 ) + return this; + v4 = a2[25]; + if ( v4 > 8 ) + { + if ( v4 > 0xFFFFFFF ) + __cxa_throw_bad_array_new_length(); + v6 = (void *)(this + 36); + v21 = (_DWORD *)operator new[](8 * v4); + v5 = v21; + v22 = a2[25] - 1; + if ( v22 >= 0 ) + { + do + { + *v21 = 0; + v21 += 2; + *(v21 - 1) = 0; + } + while ( v22-- != 0 ); + } + } + else + { + v5 = (_DWORD *)(this + 36); + v6 = (void *)(this + 36); + } + v7 = a2[6]; + if ( v7 ) + { + if ( _CRT_MT ) + _InterlockedAdd((volatile signed __int32 *)(v7 + 12), 1u); + else + ++*(_DWORD *)(v7 + 12); + } + v29 = v5; + std::ios_base::_M_call_callbacks((_DWORD *)this, 0); + Block = *(void **)(this + 104); + v9 = v29; + if ( Block != v6 ) + { + if ( Block ) + { + operator delete[](Block); + v9 = v29; + } + *(_DWORD *)(this + 104) = 0; + } + v30 = v9; + std::ios_base::_M_dispose_callbacks(this); + v10 = a2[25]; + *(_DWORD *)(this + 24) = v7; + if ( v10 > 0 ) + { + v11 = a2[26]; + v12 = 0; + do + { + v13 = *(_DWORD *)(v11 + v12 * 4 + 4); + v30[v12] = *(_DWORD *)(v11 + v12 * 4); + v30[v12 + 1] = v13; + v12 += 2; + } + while ( v12 != 2 * v10 ); + v3 = a2; + } + v14 = v3[3]; + v15 = *((_BYTE *)v3 + 117) == 0; + *(_DWORD *)(this + 104) = v30; + *(_DWORD *)(this + 100) = v10; + *(_DWORD *)(this + 12) = v14; + *(_DWORD *)(this + 8) = v3[2]; + *(_DWORD *)(this + 4) = v3[1]; + *(_DWORD *)(this + 112) = v3[28]; + if ( v15 ) + { + v24 = (_BYTE *)v3[31]; + if ( !v24 ) + goto LABEL_38; + if ( v24[28] ) + { + v16 = v24[61]; + } + else + { + std::ctype::_M_widen_init(v3[31]); + v16 = 32; + v27 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v24 + 24); + if ( v27 != std::ctype::do_widen ) + v16 = ((int (__fastcall *)(_BYTE *, int, int))v27)(v24, 32, 32); + } + *((_BYTE *)v3 + 116) = v16; + *((_BYTE *)v3 + 117) = 1; + if ( *(_BYTE *)(this + 117) ) + goto LABEL_17; +LABEL_29: + v25 = *(_BYTE **)(this + 124); + if ( v25 ) + { + if ( !v25[28] ) + { + v31 = v16; + std::ctype::_M_widen_init(*(_DWORD *)(this + 124)); + v16 = v31; + v26 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v25 + 24); + if ( v26 != std::ctype::do_widen ) + { + ((void (__fastcall *)(_BYTE *, _DWORD, int))v26)(v25, v31, 32); + v16 = v31; + } + } + *(_BYTE *)(this + 117) = 1; + goto LABEL_17; + } +LABEL_38: + std::__throw_bad_cast(); + } + v16 = *((_BYTE *)v3 + 116); + if ( !*(_BYTE *)(this + 117) ) + goto LABEL_29; +LABEL_17: + *(_BYTE *)(this + 116) = v16; + std::locale::locale((volatile signed __int32 **)v32, (volatile signed __int32 **)v3 + 27, v28); + std::locale::operator=((volatile signed __int32 **)(this + 108), (volatile signed __int32 **)v32); + std::locale::~locale(v32); + std::ios::_M_cache_locale((_DWORD *)this, this + 108); + std::ios_base::_M_call_callbacks((_DWORD *)this, 2); + v17 = v3[4]; + v18 = *(_DWORD *)(this + 120); + v19 = *(_DWORD *)(this + 20); + *(_DWORD *)(this + 16) = v17; + if ( !v18 ) + { + v19 |= 1u; + *(_DWORD *)(this + 20) = v19; + } + if ( (v17 & v19) != 0 ) + std::__throw_ios_failure("basic_ios::clear"); + return this; +} +// 4F7E6D: variable 'v28' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004F8000) -------------------------------------------------------- +int __thiscall std::ios::setstate(_DWORD *this, int a2) +{ + int v2; // eax + int result; // eax + + v2 = this[5] | a2; + if ( !this[30] ) + v2 |= 1u; + this[5] = v2; + result = this[4] & v2; + if ( result ) + std::__throw_ios_failure("basic_ios::clear"); + return result; +} + +//----- (004F8040) -------------------------------------------------------- +int __thiscall std::ios::set_rdbuf(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[30] = a2; + return result; +} + +//----- (004F8050) -------------------------------------------------------- +void __thiscall std::ios::basic_ios(int this, int a2) +{ + std::ios_base::ios_base((_DWORD *)this); + *(_WORD *)(this + 116) = 0; + *(_DWORD *)this = &off_51B7D0; + *(_DWORD *)(this + 112) = 0; + *(_DWORD *)(this + 120) = 0; + *(_DWORD *)(this + 124) = 0; + *(_DWORD *)(this + 128) = 0; + *(_DWORD *)(this + 132) = 0; + std::ios_base::_M_init(this); + std::ios::_M_cache_locale((_DWORD *)this, this + 108); + *(_WORD *)(this + 116) = 0; + *(_DWORD *)(this + 112) = 0; + *(_DWORD *)(this + 120) = a2; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 20) = a2 == 0; +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004F8140) -------------------------------------------------------- +int __fastcall std::ios::basic_ios(int a1) +{ + int result; // eax + + std::ios_base::ios_base((_DWORD *)a1); + result = 0; + *(_DWORD *)a1 = &off_51B7D0; + *(_DWORD *)(a1 + 112) = 0; + *(_WORD *)(a1 + 116) = 0; + *(_DWORD *)(a1 + 120) = 0; + *(_DWORD *)(a1 + 124) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + return result; +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004F8190) -------------------------------------------------------- +void __thiscall std::ios::basic_ios(int this, int a2) +{ + std::ios_base::ios_base((_DWORD *)this); + *(_WORD *)(this + 116) = 0; + *(_DWORD *)this = &off_51B7D0; + *(_DWORD *)(this + 112) = 0; + *(_DWORD *)(this + 120) = 0; + *(_DWORD *)(this + 124) = 0; + *(_DWORD *)(this + 128) = 0; + *(_DWORD *)(this + 132) = 0; + std::ios_base::_M_init(this); + std::ios::_M_cache_locale((_DWORD *)this, this + 108); + *(_WORD *)(this + 116) = 0; + *(_DWORD *)(this + 112) = 0; + *(_DWORD *)(this + 120) = a2; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 20) = a2 == 0; +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004F8280) -------------------------------------------------------- +int __fastcall std::ios::basic_ios(int a1) +{ + int result; // eax + + std::ios_base::ios_base((_DWORD *)a1); + result = 0; + *(_DWORD *)a1 = &off_51B7D0; + *(_DWORD *)(a1 + 112) = 0; + *(_WORD *)(a1 + 116) = 0; + *(_DWORD *)(a1 + 120) = 0; + *(_DWORD *)(a1 + 124) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + return result; +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004F82D0) -------------------------------------------------------- +void __fastcall std::ios::~ios(_DWORD *Block) +{ + *Block = &off_51B7D0; + std::ios_base::~ios_base((int)Block); + operator delete(Block); +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004F82F0) -------------------------------------------------------- +void __fastcall std::ios::~ios(int a1) +{ + *(_DWORD *)a1 = &off_51B7D0; + std::ios_base::~ios_base(a1); +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004F8300) -------------------------------------------------------- +void __fastcall std::ios::~ios(int a1) +{ + *(_DWORD *)a1 = &off_51B7D0; + std::ios_base::~ios_base(a1); +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (004F8310) -------------------------------------------------------- +int __thiscall std::wios::exceptions(_DWORD *this, int a2) +{ + bool v2; // zf + int v3; // edx + int result; // eax + + v2 = this[30] == 0; + v3 = this[5]; + result = a2; + this[4] = a2; + if ( v2 ) + { + v3 |= 1u; + this[5] = v3; + } + if ( (v3 & a2) != 0 ) + std::__throw_ios_failure("basic_ios::clear"); + return result; +} + +//----- (004F8350) -------------------------------------------------------- +int __thiscall std::wios::_M_setstate(_DWORD *this, int a2) +{ + int result; // eax + + this[5] |= a2; + result = this[4] & a2; + if ( result ) + __cxa_rethrow(); + return result; +} + +//----- (004F8370) -------------------------------------------------------- +void *__thiscall std::wios::_M_cache_locale(_DWORD *this, int a2) +{ + void *result; // eax + + if ( (unsigned __int8)std::has_facet>(a2) ) + { + this[31] = std::use_facet>(a2); + if ( (unsigned __int8)std::has_facet>>(a2) ) + goto LABEL_3; +LABEL_6: + this[32] = 0; + result = (void *)std::has_facet>>(a2); + if ( (_BYTE)result ) + goto LABEL_4; + goto LABEL_7; + } + this[31] = 0; + if ( !(unsigned __int8)std::has_facet>>(a2) ) + goto LABEL_6; +LABEL_3: + this[32] = std::use_facet>>(a2); + result = (void *)std::has_facet>>(a2); + if ( (_BYTE)result ) + { +LABEL_4: + result = std::use_facet>>(a2); + this[33] = result; + return result; + } +LABEL_7: + this[33] = 0; + return result; +} + +//----- (004F8410) -------------------------------------------------------- +int __thiscall std::wios::tie(_DWORD *this, int a2) +{ + int result; // eax + + result = this[28]; + this[28] = a2; + return result; +} + +//----- (004F8420) -------------------------------------------------------- +int __thiscall std::wios::fill(int this, __int16 a2) +{ + int result; // eax + int v4; // ecx + + if ( *(_BYTE *)(this + 118) ) + { + result = *(unsigned __int16 *)(this + 116); + *(_WORD *)(this + 116) = a2; + } + else + { + v4 = *(_DWORD *)(this + 124); + if ( !v4 ) + std::__throw_bad_cast(); + result = (*(int (__thiscall **)(int, int))(*(_DWORD *)v4 + 40))(v4, 32); + *(_WORD *)(this + 116) = a2; + *(_BYTE *)(this + 118) = 1; + } + return result; +} + +//----- (004F8480) -------------------------------------------------------- +BOOL __thiscall std::wios::init(int this, int a2) +{ + BOOL result; // eax + + std::ios_base::_M_init(this); + std::wios::_M_cache_locale((_DWORD *)this, this + 108); + *(_DWORD *)(this + 120) = a2; + *(_WORD *)(this + 116) = 0; + result = a2 == 0; + *(_BYTE *)(this + 118) = 0; + *(_DWORD *)(this + 112) = 0; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 20) = result; + return result; +} + +//----- (004F84D0) -------------------------------------------------------- +int __thiscall std::wios::move(int this, std::ios_base *a2) +{ + int v3; // eax + int result; // eax + std::ios_base *v5; // [esp+4h] [ebp-18h] + + std::ios_base::_M_move(this, a2, v5); + std::wios::_M_cache_locale((_DWORD *)this, this + 108); + v3 = *((_DWORD *)a2 + 28); + *((_DWORD *)a2 + 28) = 0; + *(_DWORD *)(this + 112) = v3; + *(_WORD *)(this + 116) = *((_WORD *)a2 + 58); + result = *((unsigned __int8 *)a2 + 118); + *(_DWORD *)(this + 120) = 0; + *(_BYTE *)(this + 118) = result; + return result; +} +// 4F84DE: variable 'v5' is possibly undefined + +//----- (004F8530) -------------------------------------------------------- +int __thiscall std::wios::move(int this, std::ios_base *a2) +{ + int v3; // eax + int result; // eax + std::ios_base *v5; // [esp+4h] [ebp-18h] + + std::ios_base::_M_move(this, a2, v5); + std::wios::_M_cache_locale((_DWORD *)this, this + 108); + v3 = *((_DWORD *)a2 + 28); + *((_DWORD *)a2 + 28) = 0; + *(_DWORD *)(this + 112) = v3; + *(_WORD *)(this + 116) = *((_WORD *)a2 + 58); + result = *((unsigned __int8 *)a2 + 118); + *(_DWORD *)(this + 120) = 0; + *(_BYTE *)(this + 118) = result; + return result; +} +// 4F853E: variable 'v5' is possibly undefined + +//----- (004F8590) -------------------------------------------------------- +void __thiscall std::wios::swap(int this, std::ios_base *a2) +{ + int v3; // eax + __int16 v4; // dx + std::ios_base *v5; // [esp+4h] [ebp-58h] + + std::ios_base::_M_swap((std::ios_base **)this, a2, v5); + std::wios::_M_cache_locale((_DWORD *)this, this + 108); + std::wios::_M_cache_locale(a2, (int)a2 + 108); + v3 = *(_DWORD *)(this + 112); + *(_DWORD *)(this + 112) = *((_DWORD *)a2 + 28); + v4 = *((_WORD *)a2 + 58); + *((_DWORD *)a2 + 28) = v3; + LOWORD(v3) = *(_WORD *)(this + 116); + *(_WORD *)(this + 116) = v4; + LOBYTE(v4) = *(_BYTE *)(this + 118); + *((_WORD *)a2 + 58) = v3; + *(_BYTE *)(this + 118) = *((_BYTE *)a2 + 118); + *((_BYTE *)a2 + 118) = v4; +} +// 4F85BD: variable 'v5' is possibly undefined + +//----- (004F8630) -------------------------------------------------------- +int __thiscall std::wios::clear(_DWORD *this, int a2) +{ + int v2; // eax + int result; // eax + + v2 = a2; + if ( !this[30] ) + v2 = a2 | 1; + this[5] = v2; + result = this[4] & v2; + if ( result ) + std::__throw_ios_failure("basic_ios::clear"); + return result; +} + +//----- (004F8670) -------------------------------------------------------- +volatile signed __int32 **__thiscall std::wios::imbue( + volatile signed __int32 **this, + volatile signed __int32 **a2, + volatile signed __int32 **a3) +{ + volatile signed __int32 *v3; // edx + const std::locale *v5; // [esp+4h] [ebp-64h] + const std::locale *v6; // [esp+4h] [ebp-64h] + volatile signed __int32 **v7; // [esp+10h] [ebp-58h] + struct _Unwind_Exception *lpuexcpt; // [esp+14h] [ebp-54h] + _DWORD *v10[3]; // [esp+5Ch] [ebp-Ch] BYREF + + std::locale::locale(this, a2 + 27, v5); + std::ios_base::imbue((volatile signed __int32 **)v10, a2, a3); + std::locale::~locale(v10); + std::wios::_M_cache_locale(a2, (int)a3); + v3 = a2[30]; + if ( v3 ) + { + lpuexcpt = (struct _Unwind_Exception *)a2[30]; + v7 = (volatile signed __int32 **)(v3 + 7); + std::locale::locale((volatile signed __int32 **)v10, (volatile signed __int32 **)v3 + 7, v6); + (*(void (__thiscall **)(struct _Unwind_Exception *, volatile signed __int32 **))(*(_DWORD *)lpuexcpt + 8))( + lpuexcpt, + a3); + std::locale::operator=(v7, a3); + std::locale::~locale(v10); + } + return this; +} +// 4F86AB: variable 'v5' is possibly undefined +// 4F8704: variable 'v6' is possibly undefined + +//----- (004F8790) -------------------------------------------------------- +int __thiscall std::wios::rdbuf(_DWORD *this, int a2) +{ + int v2; // edx + + v2 = this[30]; + this[30] = a2; + this[5] = a2 == 0; + if ( (this[4] & (a2 == 0)) != 0 ) + std::__throw_ios_failure("basic_ios::clear"); + return v2; +} + +//----- (004F87D0) -------------------------------------------------------- +int __thiscall std::wios::copyfmt(int this, _DWORD *a2) +{ + _DWORD *v3; // esi + int v4; // eax + _DWORD *v5; // edx + void *v6; // ebp + int v7; // edi + void *Block; // eax + _DWORD *v9; // edx + int v10; // ebp + int v11; // ecx + int v12; // eax + int v13; // esi + int v14; // eax + bool v15; // zf + __int16 v16; // di + int v17; // eax + int v18; // ecx + int v19; // edx + _DWORD *v21; // eax + int v22; // ecx + int v23; // ecx + __int16 v24; // ax + int v25; // ecx + const std::locale *v26; // [esp+8h] [ebp-48h] + _DWORD *v27; // [esp+20h] [ebp-30h] + _DWORD *v28; // [esp+20h] [ebp-30h] + _DWORD *v29[8]; // [esp+30h] [ebp-20h] BYREF + + v3 = a2; + if ( (_DWORD *)this == a2 ) + return this; + v4 = a2[25]; + if ( v4 > 8 ) + { + if ( v4 > 0xFFFFFFF ) + __cxa_throw_bad_array_new_length(); + v6 = (void *)(this + 36); + v21 = (_DWORD *)operator new[](8 * v4); + v5 = v21; + v22 = a2[25] - 1; + if ( v22 >= 0 ) + { + do + { + --v22; + *v21 = 0; + v21 += 2; + *(v21 - 1) = 0; + } + while ( v22 != -1 ); + } + } + else + { + v5 = (_DWORD *)(this + 36); + v6 = (void *)(this + 36); + } + v7 = a2[6]; + if ( v7 ) + { + if ( _CRT_MT ) + _InterlockedAdd((volatile signed __int32 *)(v7 + 12), 1u); + else + ++*(_DWORD *)(v7 + 12); + } + v27 = v5; + std::ios_base::_M_call_callbacks((_DWORD *)this, 0); + Block = *(void **)(this + 104); + v9 = v27; + if ( Block != v6 ) + { + if ( Block ) + { + operator delete[](Block); + v9 = v27; + } + *(_DWORD *)(this + 104) = 0; + } + v28 = v9; + std::ios_base::_M_dispose_callbacks(this); + v10 = a2[25]; + *(_DWORD *)(this + 24) = v7; + if ( v10 > 0 ) + { + v11 = a2[26]; + v12 = 0; + do + { + v13 = *(_DWORD *)(v11 + v12 * 4 + 4); + v28[v12] = *(_DWORD *)(v11 + v12 * 4); + v28[v12 + 1] = v13; + v12 += 2; + } + while ( v12 != 2 * v10 ); + v3 = a2; + } + v14 = v3[3]; + v15 = *((_BYTE *)v3 + 118) == 0; + *(_DWORD *)(this + 104) = v28; + *(_DWORD *)(this + 100) = v10; + *(_DWORD *)(this + 12) = v14; + *(_DWORD *)(this + 8) = v3[2]; + *(_DWORD *)(this + 4) = v3[1]; + *(_DWORD *)(this + 112) = v3[28]; + if ( v15 ) + { + v23 = v3[31]; + if ( !v23 ) + goto LABEL_30; + v24 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v23 + 40))(v23, 32); + *((_BYTE *)v3 + 118) = 1; + v15 = *(_BYTE *)(this + 118) == 0; + *((_WORD *)v3 + 58) = v24; + v16 = v24; + if ( !v15 ) + goto LABEL_17; +LABEL_27: + v25 = *(_DWORD *)(this + 124); + if ( v25 ) + { + (*(void (__thiscall **)(int, int))(*(_DWORD *)v25 + 40))(v25, 32); + *(_BYTE *)(this + 118) = 1; + goto LABEL_17; + } +LABEL_30: + std::__throw_bad_cast(); + } + v16 = *((_WORD *)v3 + 58); + if ( !*(_BYTE *)(this + 118) ) + goto LABEL_27; +LABEL_17: + *(_WORD *)(this + 116) = v16; + std::locale::locale((volatile signed __int32 **)v29, (volatile signed __int32 **)v3 + 27, v26); + std::locale::operator=((volatile signed __int32 **)(this + 108), (volatile signed __int32 **)v29); + std::locale::~locale(v29); + std::wios::_M_cache_locale((_DWORD *)this, this + 108); + std::ios_base::_M_call_callbacks((_DWORD *)this, 2); + v17 = v3[4]; + v18 = *(_DWORD *)(this + 120); + v19 = *(_DWORD *)(this + 20); + *(_DWORD *)(this + 16) = v17; + if ( !v18 ) + { + v19 |= 1u; + *(_DWORD *)(this + 20) = v19; + } + if ( (v19 & v17) != 0 ) + std::__throw_ios_failure("basic_ios::clear"); + return this; +} +// 4F88DE: variable 'v26' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004F8A10) -------------------------------------------------------- +int __thiscall std::wios::setstate(_DWORD *this, int a2) +{ + int v2; // eax + int result; // eax + + v2 = this[5] | a2; + if ( !this[30] ) + v2 |= 1u; + this[5] = v2; + result = this[4] & v2; + if ( result ) + std::__throw_ios_failure("basic_ios::clear"); + return result; +} + +//----- (004F8A50) -------------------------------------------------------- +int __thiscall std::wios::set_rdbuf(_DWORD *this, int a2) +{ + int result; // eax + + result = a2; + this[30] = a2; + return result; +} + +//----- (004F8A60) -------------------------------------------------------- +void __thiscall std::wios::basic_ios(int this, int a2) +{ + std::ios_base::ios_base((_DWORD *)this); + *(_WORD *)(this + 116) = 0; + *(_DWORD *)this = &off_51B7E0; + *(_DWORD *)(this + 112) = 0; + *(_BYTE *)(this + 118) = 0; + *(_DWORD *)(this + 120) = 0; + *(_DWORD *)(this + 124) = 0; + *(_DWORD *)(this + 128) = 0; + *(_DWORD *)(this + 132) = 0; + std::ios_base::_M_init(this); + std::wios::_M_cache_locale((_DWORD *)this, this + 108); + *(_WORD *)(this + 116) = 0; + *(_BYTE *)(this + 118) = 0; + *(_DWORD *)(this + 120) = a2; + *(_DWORD *)(this + 112) = 0; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 20) = a2 == 0; +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004F8B50) -------------------------------------------------------- +int __fastcall std::wios::basic_ios(int a1) +{ + int result; // eax + + std::ios_base::ios_base((_DWORD *)a1); + result = 0; + *(_DWORD *)a1 = &off_51B7E0; + *(_DWORD *)(a1 + 112) = 0; + *(_WORD *)(a1 + 116) = 0; + *(_BYTE *)(a1 + 118) = 0; + *(_DWORD *)(a1 + 120) = 0; + *(_DWORD *)(a1 + 124) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + return result; +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004F8BA0) -------------------------------------------------------- +void __thiscall std::wios::basic_ios(int this, int a2) +{ + std::ios_base::ios_base((_DWORD *)this); + *(_WORD *)(this + 116) = 0; + *(_DWORD *)this = &off_51B7E0; + *(_DWORD *)(this + 112) = 0; + *(_BYTE *)(this + 118) = 0; + *(_DWORD *)(this + 120) = 0; + *(_DWORD *)(this + 124) = 0; + *(_DWORD *)(this + 128) = 0; + *(_DWORD *)(this + 132) = 0; + std::ios_base::_M_init(this); + std::wios::_M_cache_locale((_DWORD *)this, this + 108); + *(_WORD *)(this + 116) = 0; + *(_BYTE *)(this + 118) = 0; + *(_DWORD *)(this + 120) = a2; + *(_DWORD *)(this + 112) = 0; + *(_DWORD *)(this + 16) = 0; + *(_DWORD *)(this + 20) = a2 == 0; +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004F8C90) -------------------------------------------------------- +int __fastcall std::wios::basic_ios(int a1) +{ + int result; // eax + + std::ios_base::ios_base((_DWORD *)a1); + result = 0; + *(_DWORD *)a1 = &off_51B7E0; + *(_DWORD *)(a1 + 112) = 0; + *(_WORD *)(a1 + 116) = 0; + *(_BYTE *)(a1 + 118) = 0; + *(_DWORD *)(a1 + 120) = 0; + *(_DWORD *)(a1 + 124) = 0; + *(_DWORD *)(a1 + 128) = 0; + *(_DWORD *)(a1 + 132) = 0; + return result; +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004F8CE0) -------------------------------------------------------- +void __fastcall std::wios::~wios(_DWORD *Block) +{ + *Block = &off_51B7E0; + std::ios_base::~ios_base((int)Block); + operator delete(Block); +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004F8D00) -------------------------------------------------------- +void __fastcall std::wios::~wios(int a1) +{ + *(_DWORD *)a1 = &off_51B7E0; + std::ios_base::~ios_base(a1); +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004F8D10) -------------------------------------------------------- +void __fastcall std::wios::~wios(int a1) +{ + *(_DWORD *)a1 = &off_51B7E0; + std::ios_base::~ios_base(a1); +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (004F8D20) -------------------------------------------------------- +void __fastcall std::exception::~exception(void *Block) +{ + operator delete(Block); +} + +//----- (004F8D50) -------------------------------------------------------- +BOOL __thiscall std::money_get>::money_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B804; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B804: using guessed type int (*off_51B804)(); + +//----- (004F8D70) -------------------------------------------------------- +BOOL __thiscall std::money_get>::money_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B804; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B804: using guessed type int (*off_51B804)(); + +//----- (004F8D90) -------------------------------------------------------- +void __fastcall std::money_get>::~money_get(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B804; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F8D9C: variable 'Blocka' is possibly undefined +// 51B804: using guessed type int (*off_51B804)(); + +//----- (004F8DB0) -------------------------------------------------------- +void __cdecl std::money_get>::~money_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B804; + std::locale::facet::~facet(a1); +} +// 4F8DB0: variable 'v1' is possibly undefined +// 51B804: using guessed type int (*off_51B804)(); + +//----- (004F8DC0) -------------------------------------------------------- +void __cdecl std::money_get>::~money_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B804; + std::locale::facet::~facet(a1); +} +// 4F8DC0: variable 'v1' is possibly undefined +// 51B804: using guessed type int (*off_51B804)(); + +//----- (004F8DD0) -------------------------------------------------------- +BOOL __thiscall std::money_get>::money_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B81C; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B81C: using guessed type int (*off_51B81C)(); + +//----- (004F8DF0) -------------------------------------------------------- +BOOL __thiscall std::money_get>::money_get(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B81C; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B81C: using guessed type int (*off_51B81C)(); + +//----- (004F8E10) -------------------------------------------------------- +void __fastcall std::money_get>::~money_get(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B81C; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F8E1C: variable 'Blocka' is possibly undefined +// 51B81C: using guessed type int (*off_51B81C)(); + +//----- (004F8E30) -------------------------------------------------------- +void __cdecl std::money_get>::~money_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B81C; + std::locale::facet::~facet(a1); +} +// 4F8E30: variable 'v1' is possibly undefined +// 51B81C: using guessed type int (*off_51B81C)(); + +//----- (004F8E40) -------------------------------------------------------- +void __cdecl std::money_get>::~money_get(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B81C; + std::locale::facet::~facet(a1); +} +// 4F8E40: variable 'v1' is possibly undefined +// 51B81C: using guessed type int (*off_51B81C)(); + +//----- (004F8E50) -------------------------------------------------------- +BOOL __thiscall std::money_put>::money_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B834; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B834: using guessed type int (*off_51B834)(); + +//----- (004F8E70) -------------------------------------------------------- +BOOL __thiscall std::money_put>::money_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B834; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B834: using guessed type int (*off_51B834)(); + +//----- (004F8E90) -------------------------------------------------------- +void __fastcall std::money_put>::~money_put(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B834; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F8E9C: variable 'Blocka' is possibly undefined +// 51B834: using guessed type int (*off_51B834)(); + +//----- (004F8EB0) -------------------------------------------------------- +void __cdecl std::money_put>::~money_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B834; + std::locale::facet::~facet(a1); +} +// 4F8EB0: variable 'v1' is possibly undefined +// 51B834: using guessed type int (*off_51B834)(); + +//----- (004F8EC0) -------------------------------------------------------- +void __cdecl std::money_put>::~money_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B834; + std::locale::facet::~facet(a1); +} +// 4F8EC0: variable 'v1' is possibly undefined +// 51B834: using guessed type int (*off_51B834)(); + +//----- (004F8ED0) -------------------------------------------------------- +BOOL __thiscall std::money_put>::money_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B84C; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B84C: using guessed type int (*off_51B84C)(); + +//----- (004F8EF0) -------------------------------------------------------- +BOOL __thiscall std::money_put>::money_put(_DWORD *this, int a2) +{ + BOOL result; // eax + + *this = &off_51B84C; + result = a2 != 0; + this[1] = result; + return result; +} +// 51B84C: using guessed type int (*off_51B84C)(); + +//----- (004F8F10) -------------------------------------------------------- +void __fastcall std::money_put>::~money_put(_DWORD *Block) +{ + std::locale::facet *Blocka; // [esp+0h] [ebp-1Ch] + + *Block = &off_51B84C; + std::locale::facet::~facet(Blocka); + operator delete(Block); +} +// 4F8F1C: variable 'Blocka' is possibly undefined +// 51B84C: using guessed type int (*off_51B84C)(); + +//----- (004F8F30) -------------------------------------------------------- +void __cdecl std::money_put>::~money_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B84C; + std::locale::facet::~facet(a1); +} +// 4F8F30: variable 'v1' is possibly undefined +// 51B84C: using guessed type int (*off_51B84C)(); + +//----- (004F8F40) -------------------------------------------------------- +void __cdecl std::money_put>::~money_put(std::locale::facet *a1) +{ + _DWORD *v1; // ecx + + *v1 = &off_51B84C; + std::locale::facet::~facet(a1); +} +// 4F8F40: variable 'v1' is possibly undefined +// 51B84C: using guessed type int (*off_51B84C)(); + +//----- (004F8F50) -------------------------------------------------------- +void __fastcall std::type_info::~type_info(void *Block) +{ + operator delete(Block); +} + +//----- (004F8F80) -------------------------------------------------------- +void __noreturn std::unexpected(void) +{ + __cxxabiv1::__unexpected(__cxxabiv1::__unexpected_handler); +} + +//----- (004F8F90) -------------------------------------------------------- +_BYTE *__cdecl std::__int_to_char(_BYTE *a1, unsigned int a2, int a3, __int16 a4, char a5) +{ + _BYTE *v6; // ebx + unsigned int v7; // eax + unsigned int v9; // eax + unsigned int v10; // eax + + if ( a5 ) + { + v6 = a1; + do + { + *--v6 = *(_BYTE *)(a3 + a2 % 0xA + 4); + v7 = a2; + a2 /= 0xAu; + } + while ( v7 > 9 ); + } + else if ( (a4 & 0x4A) == 64 ) + { + v6 = a1; + do + { + --v6; + v10 = a2 & 7; + a2 >>= 3; + *v6 = *(_BYTE *)(a3 + v10 + 4); + } + while ( a2 ); + } + else + { + v6 = a1; + do + { + --v6; + v9 = a2 & 0xF; + a2 >>= 4; + *v6 = *(_BYTE *)(a3 + ((a4 & 0x4000) == 0 ? 0xFFFFFFF0 : 0) + 20 + v9); + } + while ( a2 ); + } + return (_BYTE *)(a1 - v6); +} + +//----- (004F9040) -------------------------------------------------------- +_BYTE *__cdecl std::__int_to_char( + _BYTE *a1, + unsigned int a2, + unsigned int a3, + int a4, + __int16 a5, + char a6) +{ + unsigned __int64 v6; // rdi + _BYTE *v7; // ebx + unsigned __int64 v8; // kr00_8 + char v10; // al + char v11; // al + unsigned __int64 v12; // [esp+18h] [ebp-24h] + + v6 = __PAIR64__(a2, a3); + if ( a6 ) + { + v7 = a1; + do + { + --v7; + v12 = __PAIR64__(v6, HIDWORD(v6)); + *v7 = *(_BYTE *)(a4 + __PAIR64__(v6, HIDWORD(v6)) % 0xA + 4); + v8 = __PAIR64__(v6, HIDWORD(v6)) / 0xA; + LODWORD(v6) = (__PAIR64__(v6, HIDWORD(v6)) / 0xA) >> 32; + HIDWORD(v6) = v8; + } + while ( v12 > 9 ); + } + else if ( (a5 & 0x4A) == 64 ) + { + v7 = a1; + do + { + v11 = BYTE4(v6); + HIDWORD(v6) = __PAIR64__(v6, HIDWORD(v6)) >> 3; + --v7; + LODWORD(v6) = (unsigned int)v6 >> 3; + *v7 = *(_BYTE *)(a4 + (v11 & 7) + 4); + } + while ( v6 ); + } + else + { + v7 = a1; + do + { + v10 = BYTE4(v6); + HIDWORD(v6) = __PAIR64__(v6, HIDWORD(v6)) >> 4; + --v7; + LODWORD(v6) = (unsigned int)v6 >> 4; + *v7 = *(_BYTE *)(a4 + ((a5 & 0x4000) == 0 ? 0xFFFFFFF0 : 0) + 20 + (v10 & 0xF)); + } + while ( v6 ); + } + return (_BYTE *)(a1 - v7); +} + +//----- (004F9140) -------------------------------------------------------- +int __cdecl std::__int_to_char(_WORD *a1, unsigned int a2, int a3, __int16 a4, char a5) +{ + _WORD *v6; // ebx + unsigned int v7; // eax + unsigned int v9; // eax + unsigned int v10; // eax + + if ( a5 ) + { + v6 = a1; + do + { + *--v6 = *(_WORD *)(a3 + 2 * (a2 % 0xA) + 8); + v7 = a2; + a2 /= 0xAu; + } + while ( v7 > 9 ); + } + else if ( (a4 & 0x4A) == 64 ) + { + v6 = a1; + do + { + --v6; + v10 = a2 & 7; + a2 >>= 3; + *v6 = *(_WORD *)(a3 + 2 * v10 + 8); + } + while ( a2 ); + } + else + { + v6 = a1; + do + { + --v6; + v9 = ((a4 & 0x4000) == 0 ? 4 : 20) + (a2 & 0xF); + a2 >>= 4; + *v6 = *(_WORD *)(a3 + 2 * v9); + } + while ( a2 ); + } + return a1 - v6; +} + +//----- (004F9200) -------------------------------------------------------- +int __cdecl std::__int_to_char( + _WORD *a1, + unsigned int a2, + unsigned int a3, + int a4, + __int16 a5, + char a6) +{ + unsigned __int64 v6; // rdi + _WORD *v7; // ebx + unsigned __int64 v8; // kr00_8 + char v10; // al + char v11; // al + unsigned __int64 v12; // [esp+18h] [ebp-24h] + + v6 = __PAIR64__(a2, a3); + if ( a6 ) + { + v7 = a1; + do + { + --v7; + v12 = __PAIR64__(v6, HIDWORD(v6)); + *v7 = *(_WORD *)(a4 + 2 * (__PAIR64__(v6, HIDWORD(v6)) % 0xA) + 8); + v8 = __PAIR64__(v6, HIDWORD(v6)) / 0xA; + LODWORD(v6) = (__PAIR64__(v6, HIDWORD(v6)) / 0xA) >> 32; + HIDWORD(v6) = v8; + } + while ( v12 > 9 ); + } + else if ( (a5 & 0x4A) == 64 ) + { + v7 = a1; + do + { + v11 = BYTE4(v6); + HIDWORD(v6) = __PAIR64__(v6, HIDWORD(v6)) >> 3; + --v7; + LODWORD(v6) = (unsigned int)v6 >> 3; + *v7 = *(_WORD *)(a4 + 2 * (v11 & 7) + 8); + } + while ( v6 ); + } + else + { + v7 = a1; + do + { + v10 = BYTE4(v6); + HIDWORD(v6) = __PAIR64__(v6, HIDWORD(v6)) >> 4; + --v7; + LODWORD(v6) = (unsigned int)v6 >> 4; + *v7 = *(_WORD *)(a4 + 2 * (((a5 & 0x4000) == 0 ? 4 : 20) + (v10 & 0xF))); + } + while ( v6 ); + } + return a1 - v7; +} + +//----- (004F9310) -------------------------------------------------------- +void (*std::get_terminate(void))(void) +{ + return __cxxabiv1::__terminate_handler; +} + +//----- (004F9320) -------------------------------------------------------- +__int32 __cdecl std::set_terminate(void (__noreturn *a1)(void)) +{ + void (__noreturn *v1)(void); // eax + + v1 = a1; + if ( !a1 ) + v1 = __gnu_cxx::__verbose_terminate_handler; + return _InterlockedExchange((volatile __int32 *)&__cxxabiv1::__terminate_handler, (__int32)v1); +} + +//----- (004F9340) -------------------------------------------------------- +_BYTE *__cdecl std::__add_grouping(_BYTE *a1, char a2, char *a3, int a4, _BYTE *a5, _BYTE *a6) +{ + _BYTE *v6; // edi + _BYTE *v7; // esi + _BYTE *v8; // edx + int v9; // ecx + unsigned int v10; // ebx + char *v11; // edi + int v12; // ebx + int v13; // ebp + _BYTE *result; // eax + _BYTE *v15; // edi + int v16; // ecx + _BYTE *v17; // esi + bool v18; // cf + _BYTE *v19; // edi + int v20; // ecx + _BYTE *v21; // esi + char *v22; // [esp+0h] [ebp-20h] + int v23; // [esp+8h] [ebp-18h] + unsigned int v24; // [esp+Ch] [ebp-14h] + _BYTE *v25; // [esp+38h] [ebp+18h] + + v6 = a1; + v7 = a5; + v8 = a6; + v9 = *a3; + if ( (unsigned __int8)(v9 - 1) > 0x7Du || a6 - a5 <= v9 ) + { + if ( a6 == a5 ) + return a1; + v12 = -1; + v13 = -1; + v23 = 0; + v24 = 0; + v22 = a3; + goto LABEL_10; + } + v23 = 0; + v10 = 0; + do + { + v8 -= v9; + if ( a4 - 1 > v10 ) + ++v10; + else + ++v23; + v11 = &a3[v10]; + v9 = a3[v10]; + } + while ( v8 - a5 > v9 && (unsigned __int8)(v9 - 1) <= 0x7Du ); + v24 = v10; + v12 = v10 - 1; + v22 = v11; + v6 = a1; + v13 = v23 - 1; + if ( a5 != v8 ) + { +LABEL_10: + result = &v6[v8 - a5]; + do + *v6++ = *v7++; + while ( v6 != result ); + goto LABEL_12; + } + result = a1; +LABEL_12: + if ( v23 ) + { + do + { + v15 = result + 1; + *result = a2; + v16 = (unsigned __int8)*v22; + if ( (char)v16 <= 0 ) + { + ++result; + } + else + { + result += (unsigned __int8)(v16 + 1); + v17 = v8; + do + *v15++ = *v17++; + while ( v15 != result ); + v8 += v16; + } + v18 = v13-- == 0; + } + while ( !v18 ); + } + if ( v24 ) + { + v25 = v8; + do + { + v19 = result + 1; + *result = a2; + v20 = (unsigned __int8)a3[v12]; + if ( (char)v20 <= 0 ) + { + ++result; + } + else + { + result += (unsigned __int8)(v20 + 1); + v21 = v25; + do + *v19++ = *v21++; + while ( v19 != result ); + v25 += v20; + } + v18 = v12-- == 0; + } + while ( !v18 ); + } + return result; +} + +//----- (004F94F0) -------------------------------------------------------- +_WORD *__cdecl std::__add_grouping(_WORD *a1, __int16 a2, char *a3, int a4, char *a5, char *a6) +{ + char *v6; // edx + char *v7; // esi + _WORD *v8; // edi + int v9; // eax + unsigned int v10; // edi + unsigned int v11; // eax + int v12; // ebp + int v13; // ebx + _WORD *result; // eax + _WORD *v15; // edi + int v16; // ecx + char *v17; // esi + bool v18; // cf + _WORD *v19; // edi + int v20; // ecx + char *v21; // esi + char *v22; // [esp+0h] [ebp-20h] + int v23; // [esp+8h] [ebp-18h] + unsigned int v24; // [esp+Ch] [ebp-14h] + char *v25; // [esp+38h] [ebp+18h] + + v6 = a6; + v7 = a5; + v8 = a1; + v9 = *a3; + if ( (a6 - a5) >> 1 <= v9 || (unsigned __int8)(v9 - 1) > 0x7Du ) + { + if ( a6 == a5 ) + return a1; + v13 = -1; + v12 = -1; + v23 = 0; + v24 = 0; + v22 = a3; + goto LABEL_10; + } + v23 = 0; + v10 = 0; + do + { + v6 -= 2 * v9; + if ( a4 - 1 > v10 ) + ++v10; + else + ++v23; + v9 = a3[v10]; + } + while ( (v6 - a5) >> 1 > v9 && (unsigned __int8)(v9 - 1) <= 0x7Du ); + v11 = v10; + v24 = v10; + v22 = &a3[v10]; + v8 = a1; + v12 = v23 - 1; + v13 = v11 - 1; + if ( a5 != v6 ) + { +LABEL_10: + result = (_WORD *)((char *)v8 + v6 - a5); + do + { + *v8 = *(_WORD *)v7; + v7 += 2; + ++v8; + } + while ( v8 != result ); + goto LABEL_12; + } + result = a1; +LABEL_12: + if ( v23 ) + { + do + { + v15 = result + 1; + *result = a2; + v16 = (unsigned __int8)*v22; + if ( (char)v16 <= 0 ) + { + ++result; + } + else + { + result += (unsigned __int8)(v16 + 1); + v17 = v6; + do + { + *v15 = *(_WORD *)v17; + v17 += 2; + ++v15; + } + while ( v15 != result ); + v6 += 2 * v16; + } + v18 = v12-- == 0; + } + while ( !v18 ); + } + if ( v24 ) + { + v25 = v6; + do + { + v19 = result + 1; + *result = a2; + v20 = (unsigned __int8)a3[v13]; + if ( (char)v20 <= 0 ) + { + ++result; + } + else + { + result += (unsigned __int8)(v20 + 1); + v21 = v25; + do + { + *v19 = *(_WORD *)v21; + v21 += 2; + ++v19; + } + while ( v19 != result ); + v25 += 2 * v20; + } + v18 = v13-- == 0; + } + while ( !v18 ); + } + return result; +} + +//----- (004F96B0) -------------------------------------------------------- +void __cdecl std::__convert_to_v(unsigned __int8 *a1, double *a2, _DWORD *a3) +{ + long double v3; // fst7 + char *Locale; // [esp+10h] [ebp-5Ch] + char *Src; // [esp+14h] [ebp-58h] + unsigned int Size; // [esp+18h] [ebp-54h] + unsigned __int8 *v7; // [esp+5Ch] [ebp-10h] BYREF + + Src = setlocale(0, 0); + Size = strlen(Src) + 1; + Locale = (char *)operator new[](Size); + memcpy(Locale, Src, Size); + setlocale(0, "C"); + v3 = __mingw_strtod(a1, &v7); + *a2 = v3; + if ( v7 == a1 || *v7 ) + { + *a2 = 0.0; + *a3 = 4; + } + else if ( v3 < -1.797693134862316e308 || v3 > 1.797693134862316e308 ) + { + if ( v3 <= 0.0 ) + *a2 = -1.797693134862316e308; + else + *a2 = 1.797693134862316e308; + *a3 = 4; + } + setlocale(0, Locale); + operator delete[](Locale); +} + +//----- (004F9860) -------------------------------------------------------- +void __cdecl std::__convert_to_v(char *String, long double *a2, _DWORD *a3) +{ + long double v3; // fst7 + long double v4; // fst7 + char *Locale; // [esp+10h] [ebp-5Ch] + char *Src; // [esp+14h] [ebp-58h] + unsigned int Size; // [esp+18h] [ebp-54h] + char *EndPtr; // [esp+5Ch] [ebp-10h] BYREF + + Src = setlocale(0, 0); + Size = strlen(Src) + 1; + Locale = (char *)operator new[](Size); + memcpy(Locale, Src, Size); + setlocale(0, "C"); + v3 = strtold(String, &EndPtr); + *a2 = v3; + if ( EndPtr == String || *EndPtr ) + { + *a2 = 0.0; + *a3 = 4; + } + else if ( v3 < -1.189731495357231765e4932 || v3 > 1.189731495357231765e4932 ) + { + if ( v3 <= 0.0 ) + v4 = -1.189731495357231765e4932; + else + v4 = 1.189731495357231765e4932; + *a2 = v4; + *a3 = 4; + } + setlocale(0, Locale); + operator delete[](Locale); +} + +//----- (004F99F0) -------------------------------------------------------- +void __cdecl std::__convert_to_v(unsigned __int8 *a1, float *a2, _DWORD *a3) +{ + long double v3; // fst7 + int v4; // eax + char *Locale; // [esp+10h] [ebp-5Ch] + char *Src; // [esp+14h] [ebp-58h] + unsigned int Size; // [esp+18h] [ebp-54h] + unsigned __int8 *v8; // [esp+5Ch] [ebp-10h] BYREF + + Src = setlocale(0, 0); + Size = strlen(Src) + 1; + Locale = (char *)operator new[](Size); + memcpy(Locale, Src, Size); + setlocale(0, "C"); + v3 = __mingw_strtof(a1, &v8); + *a2 = v3; + if ( v8 == a1 || *v8 ) + { + *a2 = 0.0; + *a3 = 4; + } + else if ( v3 < -3.4028235e38 || v3 > 3.4028235e38 ) + { + v4 = -8388609; + if ( v3 > 0.0 ) + v4 = 2139095039; + *(_DWORD *)a2 = v4; + *a3 = 4; + } + setlocale(0, Locale); + operator delete[](Locale); +} + +//----- (004F9B80) -------------------------------------------------------- +void (*std::get_unexpected(void))(void) +{ + return __cxxabiv1::__unexpected_handler; +} + +//----- (004F9B90) -------------------------------------------------------- +__int32 __cdecl std::set_unexpected(void (__noreturn *a1)(void)) +{ + void (__noreturn *v1)(void); // eax + + v1 = a1; + if ( !a1 ) + v1 = std::terminate; + return _InterlockedExchange((volatile __int32 *)&__cxxabiv1::__unexpected_handler, (__int32)v1); +} + +//----- (004F9BB0) -------------------------------------------------------- +int std::get_new_handler(void) +{ + return `anonymous namespace'::__new_handler; +} +// 50B3B0: using guessed type int `anonymous namespace'::__new_handler; + +//----- (004F9BC0) -------------------------------------------------------- +__int32 __cdecl std::set_new_handler(void (*a1)(void)) +{ + return _InterlockedExchange(&`anonymous namespace'::__new_handler, (__int32)a1); +} +// 50B3B0: using guessed type int `anonymous namespace'::__new_handler; + +//----- (004F9BD0) -------------------------------------------------------- +int std::__convert_from_v(int *const *a1, char *a2, int a3, char *a4, ...) +{ + char *v4; // ebx + unsigned int Size; // edi + void *Locale; // esi + int v8; // ebx + va_list va; // [esp+30h] [ebp+14h] BYREF + + va_start(va, a4); + v4 = setlocale(4, 0); + if ( *v4 == 67 && !v4[1] ) + return __mingw_vsnprintf((FILE *)a2, a3, a4, (int *)va); + Size = strlen(v4) + 1; + Locale = (void *)operator new[](Size); + memcpy(Locale, v4, Size); + setlocale(4, "C"); + v8 = __mingw_vsnprintf((FILE *)a2, a3, a4, (int *)va); + setlocale(4, (const char *)Locale); + operator delete[](Locale); + return v8; +} + +//----- (004F9CB0) -------------------------------------------------------- +std::ostream::sentry *__cdecl std::__ostream_insert>( + std::ostream::sentry *a1, + int a2, + int a3) +{ + int v3; // eax + char *v4; // edi + int v5; // ebx + bool v6; // zf + _DWORD *v7; // ecx + unsigned __int8 *v8; // eax + int v9; // ecx + int v11; // eax + int v12; // edx + int v13; // eax + _DWORD *v14; // ecx + unsigned __int8 *v15; // eax + int (__stdcall *v16)(unsigned __int8); // eax + int (__stdcall *v17)(unsigned __int8); // eax + int v18; // [esp+0h] [ebp-88h] + std::ostream *v19; // [esp+4h] [ebp-84h] + _BYTE *v20; // [esp+14h] [ebp-74h] + int v21; // [esp+18h] [ebp-70h] + _BYTE *v22; // [esp+1Ch] [ebp-6Ch] + int v23; // [esp+20h] [ebp-68h] + int v24; // [esp+20h] [ebp-68h] + unsigned __int8 v25; // [esp+24h] [ebp-64h] + unsigned __int8 v26; // [esp+24h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-60h] + struct _Unwind_Exception *lpuexcpta; // [esp+28h] [ebp-60h] + char v29[4]; // [esp+68h] [ebp-20h] BYREF + _DWORD *v30; // [esp+6Ch] [ebp-1Ch] + + std::ostream::sentry::sentry((int)v29, a1, v19); + if ( v29[0] ) + { + v3 = *(_DWORD *)(*(_DWORD *)a1 - 12); + v4 = (char *)a1 + v3; + v5 = *(_DWORD *)((char *)a1 + v3 + 8); + lpuexcpt = (std::ostream::sentry *)((char *)a1 + v3); + if ( a3 >= v5 ) + { + v11 = (*(int (__thiscall **)(_DWORD, int, int))(**((_DWORD **)lpuexcpt + 30) + 48))( + *((_DWORD *)lpuexcpt + 30), + a2, + a3); + lpuexcpt = (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)); + if ( a3 != v11 ) + { + std::ios::clear( + (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 1); + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 8) = 0; + goto LABEL_12; + } + goto LABEL_11; + } + v21 = *((_DWORD *)v4 + 3) & 0xB0; + if ( v21 == 32 ) + { + if ( *((_DWORD *)lpuexcpt + 5) ) + { +LABEL_11: + *((_DWORD *)lpuexcpt + 2) = 0; + goto LABEL_12; + } + } + else + { + v23 = v5 - a3; + if ( v4[117] ) + { + v25 = v4[116]; + } + else + { + v20 = (_BYTE *)*((_DWORD *)lpuexcpt + 31); + if ( !v20 ) + std::__throw_bad_cast(); + if ( v20[28] ) + { + v25 = v20[61]; + } + else + { + std::ctype::_M_widen_init((int)v20); + v25 = 32; + v16 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v20 + 24); + if ( v16 != std::ctype::do_widen ) + v25 = ((int (__thiscall *)(_BYTE *, int))v16)(v20, 32); + } + *((_BYTE *)lpuexcpt + 116) = v25; + *((_BYTE *)lpuexcpt + 117) = 1; + v3 = *(_DWORD *)(*(_DWORD *)a1 - 12); + } + do + { + v7 = *(_DWORD **)((char *)a1 + v3 + 120); + v8 = (unsigned __int8 *)v7[5]; + if ( (unsigned int)v8 < v7[6] ) + { + *v8 = v25; + ++v7[5]; + } + else if ( (*(int (__thiscall **)(_DWORD *, _DWORD))(*v7 + 52))(v7, v25) == -1 ) + { + std::ios::clear( + (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 1); + lpuexcpt = (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)); + if ( !*((_DWORD *)lpuexcpt + 5) ) + goto LABEL_21; + goto LABEL_11; + } + v6 = v23-- == 1; + v3 = *(_DWORD *)(*(_DWORD *)a1 - 12); + } + while ( !v6 ); + lpuexcpt = (std::ostream::sentry *)((char *)a1 + v3); + if ( *(_DWORD *)((char *)a1 + v3 + 20) ) + goto LABEL_11; + } +LABEL_21: + v12 = (*(int (__thiscall **)(_DWORD, int, int))(**((_DWORD **)lpuexcpt + 30) + 48))( + *((_DWORD *)lpuexcpt + 30), + a2, + a3); + v13 = *(_DWORD *)(*(_DWORD *)a1 - 12); + lpuexcpt = (std::ostream::sentry *)((char *)a1 + v13); + if ( a3 != v12 ) + { + std::ios::clear((std::ostream::sentry *)((char *)a1 + v13), *(_DWORD *)((char *)a1 + v13 + 20) | 1); + v13 = *(_DWORD *)(*(_DWORD *)a1 - 12); + lpuexcpt = (std::ostream::sentry *)((char *)a1 + v13); + } + if ( v21 == 32 && !*((_DWORD *)lpuexcpt + 5) ) + { + v24 = v5 - a3; + if ( *((_BYTE *)lpuexcpt + 117) ) + { + v26 = *((_BYTE *)lpuexcpt + 116); + } + else + { + v22 = (_BYTE *)*((_DWORD *)lpuexcpt + 31); + if ( !v22 ) + std::__throw_bad_cast(); + if ( v22[28] ) + { + v26 = v22[61]; + } + else + { + std::ctype::_M_widen_init((int)v22); + v26 = 32; + v17 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v22 + 24); + if ( v17 != std::ctype::do_widen ) + v26 = ((int (__thiscall *)(_BYTE *, int))v17)(v22, 32); + } + *((_BYTE *)lpuexcpt + 116) = v26; + *((_BYTE *)lpuexcpt + 117) = 1; + v13 = *(_DWORD *)(*(_DWORD *)a1 - 12); + } + do + { + v14 = *(_DWORD **)((char *)a1 + v13 + 120); + v15 = (unsigned __int8 *)v14[5]; + if ( (unsigned int)v15 < v14[6] ) + { + *v15 = v26; + ++v14[5]; + } + else if ( (*(int (__thiscall **)(_DWORD *, _DWORD))(*v14 + 52))(v14, v26) == -1 ) + { + std::ios::clear( + (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 1); + lpuexcpt = (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)); + goto LABEL_11; + } + v6 = v24-- == 1; + v13 = *(_DWORD *)(*(_DWORD *)a1 - 12); + } + while ( !v6 ); + lpuexcpt = (std::ostream::sentry *)((char *)a1 + v13); + } + goto LABEL_11; + } +LABEL_12: + lpuexcpta = (struct _Unwind_Exception *)((char *)v30 + *(_DWORD *)(*v30 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v9 = *((_DWORD *)lpuexcpta + 30); + if ( v9 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v9 + 24))(v9, v18) == -1 ) + std::ios::clear( + (_DWORD *)((char *)v30 + *(_DWORD *)(*v30 - 12)), + *(_DWORD *)((char *)v30 + *(_DWORD *)(*v30 - 12) + 20) | 1); + } + } + return a1; +} +// 4F9CEF: variable 'v19' is possibly undefined +// 4F9E1A: variable 'v18' is possibly undefined +// 4F9CB0: using guessed type char var_20[4]; + +//----- (004FA1F0) -------------------------------------------------------- +int *__cdecl std::__ostream_insert>(int *a1, int a2, int a3) +{ + char *v3; // esi + int v4; // edi + struct _Unwind_Exception *v5; // edx + unsigned int v6; // eax + _DWORD *v7; // ecx + unsigned int v8; // eax + __int16 v9; // ax + int v10; // ecx + int v12; // eax + int v13; // eax + unsigned int v14; // eax + unsigned __int16 v15; // ax + _DWORD *v16; // ecx + unsigned int v17; // eax + int v18; // ecx + int v19; // ecx + int v20; // [esp+0h] [ebp-88h] + int v21; // [esp+18h] [ebp-70h] + int v22; // [esp+20h] [ebp-68h] + int v23; // [esp+20h] [ebp-68h] + unsigned __int16 v24; // [esp+24h] [ebp-64h] + unsigned __int16 v25; // [esp+24h] [ebp-64h] + struct _Unwind_Exception *lpuexcpt; // [esp+28h] [ebp-60h] + struct _Unwind_Exception *lpuexcpta; // [esp+28h] [ebp-60h] + struct _Unwind_Exception *lpuexcptb; // [esp+28h] [ebp-60h] + int v29; // [esp+68h] [ebp-20h] BYREF + _DWORD *v30; // [esp+6Ch] [ebp-1Ch] + + std::wostream::sentry::sentry(&v29, a1); + if ( (_BYTE)v29 ) + { + v3 = (char *)a1 + *(_DWORD *)(*a1 - 12); + v4 = *((_DWORD *)v3 + 2); + lpuexcpt = (struct _Unwind_Exception *)v3; + v5 = (struct _Unwind_Exception *)v3; + if ( a3 >= v4 ) + { + v12 = (*(int (__thiscall **)(_DWORD, int, int))(**((_DWORD **)v3 + 30) + 48))(*((_DWORD *)v3 + 30), a2, a3); + v5 = (struct _Unwind_Exception *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + if ( a3 != v12 ) + { + std::wios::clear( + (int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 1); +LABEL_20: + *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 8) = 0; + goto LABEL_12; + } + goto LABEL_11; + } + v21 = *((_DWORD *)v3 + 3) & 0xB0; + if ( v21 == 32 ) + { + if ( *((_DWORD *)v3 + 5) ) + { +LABEL_11: + *((_DWORD *)v5 + 2) = 0; + goto LABEL_12; + } + } + else + { + v22 = v4 - a3; + if ( v3[118] ) + { + v24 = *((_WORD *)v3 + 58); + } + else + { + v18 = *((_DWORD *)v3 + 31); + if ( !v18 ) + std::__throw_bad_cast(); + v24 = (*(int (__fastcall **)(int, char *, int))(*(_DWORD *)v18 + 40))(v18, v3, 32); + *((_WORD *)v3 + 58) = v24; + v3[118] = 1; + lpuexcpt = (struct _Unwind_Exception *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + } + do + { + v7 = (_DWORD *)*((_DWORD *)lpuexcpt + 30); + v5 = lpuexcpt; + v8 = v7[5]; + if ( v8 < v7[6] ) + { + v6 = v8 + 2; + *(_WORD *)(v6 - 2) = v24; + v7[5] = v6; + if ( v24 == 0xFFFF ) + goto LABEL_10; + } + else + { + v9 = (*(int (__fastcall **)(_DWORD *, struct _Unwind_Exception *, _DWORD))(*v7 + 52))(v7, lpuexcpt, v24); + lpuexcpt = (struct _Unwind_Exception *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + v5 = lpuexcpt; + if ( v9 == -1 ) + { +LABEL_10: + std::wios::clear(lpuexcpt, *((_DWORD *)lpuexcpt + 5) | 1); + v5 = (struct _Unwind_Exception *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + if ( !*((_DWORD *)v5 + 5) ) + goto LABEL_22; + goto LABEL_11; + } + } + --v22; + } + while ( v22 ); + if ( *((_DWORD *)lpuexcpt + 5) ) + goto LABEL_11; + } +LABEL_22: + v13 = (*(int (__thiscall **)(_DWORD, int, int))(**((_DWORD **)v5 + 30) + 48))(*((_DWORD *)v5 + 30), a2, a3); + lpuexcptb = (struct _Unwind_Exception *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + v5 = lpuexcptb; + if ( a3 != v13 ) + { + std::wios::clear( + (int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 1); + lpuexcptb = (struct _Unwind_Exception *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + v5 = lpuexcptb; + } + if ( v21 == 32 && !*((_DWORD *)lpuexcptb + 5) ) + { + v23 = v4 - a3; + if ( *((_BYTE *)lpuexcptb + 118) ) + { + v25 = *((_WORD *)lpuexcptb + 58); + } + else + { + v19 = *((_DWORD *)lpuexcptb + 31); + if ( !v19 ) + std::__throw_bad_cast(); + v25 = (*(int (__fastcall **)(int, struct _Unwind_Exception *, int))(*(_DWORD *)v19 + 40))(v19, v5, 32); + *((_WORD *)lpuexcptb + 58) = v25; + *((_BYTE *)lpuexcptb + 118) = 1; + lpuexcptb = (struct _Unwind_Exception *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + } + while ( 1 ) + { + v16 = (_DWORD *)*((_DWORD *)lpuexcptb + 30); + v5 = lpuexcptb; + v17 = v16[5]; + if ( v17 < v16[6] ) + { + v14 = v17 + 2; + *(_WORD *)(v14 - 2) = v25; + v16[5] = v14; + v15 = v25; + } + else + { + v15 = (*(int (__thiscall **)(_DWORD *, _DWORD))(*v16 + 52))(v16, v25); + lpuexcptb = (struct _Unwind_Exception *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + v5 = lpuexcptb; + } + if ( v15 == 0xFFFF ) + break; + if ( !--v23 ) + goto LABEL_11; + } + std::wios::clear(lpuexcptb, *((_DWORD *)lpuexcptb + 5) | 1); + goto LABEL_20; + } + goto LABEL_11; + } +LABEL_12: + lpuexcpta = (struct _Unwind_Exception *)((char *)v30 + *(_DWORD *)(*v30 - 12)); + if ( (*((_BYTE *)lpuexcpta + 13) & 0x20) != 0 && !std::uncaught_exception() ) + { + v10 = *((_DWORD *)lpuexcpta + 30); + if ( v10 ) + { + if ( (*(int (__thiscall **)(int, int))(*(_DWORD *)v10 + 24))(v10, v20) == -1 ) + std::wios::clear( + (_DWORD *)((char *)v30 + *(_DWORD *)(*v30 - 12)), + *(_DWORD *)((char *)v30 + *(_DWORD *)(*v30 - 12) + 20) | 1); + } + } + return a1; +} +// 4FA36F: variable 'v20' is possibly undefined + +//----- (004FA6D0) -------------------------------------------------------- +int __cdecl std::__copy_streambufs>(_DWORD *a1, _DWORD *a2) +{ + char v3[13]; // [esp+1Fh] [ebp-Dh] BYREF + + return std::__copy_streambufs_eof>(a1, a2, v3); +} +// 4FA6D0: using guessed type char var_D[13]; + +//----- (004FA700) -------------------------------------------------------- +int __cdecl std::__copy_streambufs>(_DWORD *a1, _DWORD *a2) +{ + char v3[13]; // [esp+1Fh] [ebp-Dh] BYREF + + return std::__copy_streambufs_eof>(a1, a2, v3); +} +// 4FA700: using guessed type char var_D[13]; + +//----- (004FA730) -------------------------------------------------------- +int __cdecl std::__verify_grouping(char *a1, unsigned int a2, int a3) +{ + return (unsigned __int8)std::__verify_grouping_impl(a1, a2, *(const char **)a3, *(_DWORD *)(a3 + 4)); +} + +//----- (004FA7D0) -------------------------------------------------------- +int __cdecl std::__verify_grouping(char *a1, unsigned int a2, const char **a3) +{ + return std::__verify_grouping_impl(a1, a2, *a3, *((_DWORD *)*a3 - 3)); +} + +//----- (004FA800) -------------------------------------------------------- +void (__cdecl ***std::iostream_category(void))(_anonymous_namespace_::io_error_category *__hidden) +{ + if ( (_BYTE)`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec ) + return &`anonymous namespace'::__io_category_instance(void)::__ec; + if ( __cxa_guard_acquire(&`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec) ) + { + __cxa_guard_release(&`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec); + atexit((_PVFV)__tcf_0_4); + } + return &`anonymous namespace'::__io_category_instance(void)::__ec; +} +// 50CBD0: using guessed type void (__cdecl **`anonymous namespace'::__io_category_instance(void)::__ec)(_anonymous_namespace_::io_error_category *__hidden this); + +//----- (004FA860) -------------------------------------------------------- +int __cdecl std::_Rb_tree_decrement(_DWORD *a1) +{ + int v1; // eax + int v2; // edx + int v4; // eax + + if ( !*a1 && a1 == *(_DWORD **)(a1[1] + 4) ) + return a1[3]; + v1 = a1[2]; + if ( v1 ) + { + do + { + v2 = v1; + v1 = *(_DWORD *)(v1 + 12); + } + while ( v1 ); + return v2; + } + v2 = a1[1]; + if ( a1 != *(_DWORD **)(v2 + 8) ) + return v2; + do + { + v4 = v2; + v2 = *(_DWORD *)(v2 + 4); + } + while ( v4 == *(_DWORD *)(v2 + 8) ); + return v2; +} + +//----- (004FA8C0) -------------------------------------------------------- +int __cdecl std::_Rb_tree_decrement(_DWORD *a1) +{ + int v1; // eax + int v2; // edx + int v4; // eax + + if ( !*a1 && a1 == *(_DWORD **)(a1[1] + 4) ) + return a1[3]; + v1 = a1[2]; + if ( v1 ) + { + do + { + v2 = v1; + v1 = *(_DWORD *)(v1 + 12); + } + while ( v1 ); + return v2; + } + v2 = a1[1]; + if ( a1 != *(_DWORD **)(v2 + 8) ) + return v2; + do + { + v4 = v2; + v2 = *(_DWORD *)(v2 + 4); + } + while ( *(_DWORD *)(v2 + 8) == v4 ); + return v2; +} + +//----- (004FA920) -------------------------------------------------------- +int __cdecl std::_Rb_tree_increment(int a1) +{ + int v1; // eax + int v2; // edx + int v4; // eax + int v5; // edx + + v1 = *(_DWORD *)(a1 + 12); + if ( v1 ) + { + do + { + v2 = v1; + v1 = *(_DWORD *)(v1 + 8); + } + while ( v1 ); + return v2; + } + v4 = *(_DWORD *)(a1 + 4); + if ( a1 != *(_DWORD *)(v4 + 12) ) + return *(_DWORD *)(a1 + 4); + do + { + v5 = v4; + v4 = *(_DWORD *)(v4 + 4); + } + while ( *(_DWORD *)(v4 + 12) == v5 ); + if ( v4 != *(_DWORD *)(v5 + 12) ) + return v4; + return v5; +} + +//----- (004FA970) -------------------------------------------------------- +int __cdecl std::_Rb_tree_increment(int a1) +{ + int v1; // eax + int v2; // edx + int v4; // eax + int v5; // edx + + v1 = *(_DWORD *)(a1 + 12); + if ( v1 ) + { + do + { + v2 = v1; + v1 = *(_DWORD *)(v1 + 8); + } + while ( v1 ); + return v2; + } + v4 = *(_DWORD *)(a1 + 4); + if ( a1 != *(_DWORD *)(v4 + 12) ) + return *(_DWORD *)(a1 + 4); + do + { + v5 = v4; + v4 = *(_DWORD *)(v4 + 4); + } + while ( *(_DWORD *)(v4 + 12) == v5 ); + if ( v4 != *(_DWORD *)(v5 + 12) ) + return v4; + return v5; +} + +//----- (004FA9C0) -------------------------------------------------------- +bool std::uncaught_exception(void) +{ + return __cxa_get_globals()[1] != 0; +} + +//----- (004FA9E0) -------------------------------------------------------- +int std::uncaught_exceptions(void) +{ + return __cxa_get_globals()[1]; +} + +//----- (004FA9F0) -------------------------------------------------------- +int __cdecl std::_Rb_tree_black_count(_DWORD *a1, _DWORD *a2) +{ + _DWORD *v2; // eax + int v3; // edx + + v2 = a1; + v3 = 0; + if ( a1 ) + { + while ( 1 ) + { + v3 += *v2 == 1; + if ( v2 == a2 ) + break; + v2 = (_DWORD *)v2[1]; + } + } + return v3; +} + +//----- (004FAA20) -------------------------------------------------------- +int __cdecl std::_Rb_tree_rotate_left(int a1, _DWORD *a2) +{ + int result; // eax + int v3; // edx + int v4; // ecx + int v5; // ecx + + result = a1; + v3 = *(_DWORD *)(a1 + 12); + v4 = *(_DWORD *)(v3 + 8); + *(_DWORD *)(a1 + 12) = v4; + if ( v4 ) + *(_DWORD *)(v4 + 4) = a1; + v5 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v3 + 4) = v5; + if ( a1 == *a2 ) + { + *a2 = v3; + *(_DWORD *)(v3 + 8) = a1; + *(_DWORD *)(a1 + 4) = v3; + } + else + { + if ( a1 == *(_DWORD *)(v5 + 8) ) + *(_DWORD *)(v5 + 8) = v3; + else + *(_DWORD *)(v5 + 12) = v3; + *(_DWORD *)(v3 + 8) = a1; + *(_DWORD *)(a1 + 4) = v3; + } + return result; +} + +//----- (004FAA80) -------------------------------------------------------- +int __cdecl std::_Rb_tree_rotate_right(int a1, _DWORD *a2) +{ + int result; // eax + int v3; // edx + int v4; // ecx + int v5; // ecx + + result = a1; + v3 = *(_DWORD *)(a1 + 8); + v4 = *(_DWORD *)(v3 + 12); + *(_DWORD *)(a1 + 8) = v4; + if ( v4 ) + *(_DWORD *)(v4 + 4) = a1; + v5 = *(_DWORD *)(a1 + 4); + *(_DWORD *)(v3 + 4) = v5; + if ( a1 == *a2 ) + { + *a2 = v3; + *(_DWORD *)(v3 + 12) = a1; + *(_DWORD *)(a1 + 4) = v3; + } + else + { + if ( a1 == *(_DWORD *)(v5 + 12) ) + *(_DWORD *)(v5 + 12) = v3; + else + *(_DWORD *)(v5 + 8) = v3; + *(_DWORD *)(v3 + 12) = a1; + *(_DWORD *)(a1 + 4) = v3; + } + return result; +} + +//----- (004FAAE0) -------------------------------------------------------- +int __cdecl std::__copy_streambufs_eof>(_DWORD *a1, _DWORD *a2, _BYTE *a3) +{ + _BYTE *v3; // ecx + unsigned int v4; // ebx + int v5; // eax + int v6; // edi + int v7; // ebx + int v8; // eax + _BYTE *v9; // ecx + unsigned int v10; // ecx + + v3 = (_BYTE *)a1[2]; + v4 = a1[3]; + *a3 = 1; + if ( (unsigned int)v3 >= v4 ) + { + v6 = 0; + v5 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + if ( v5 == -1 ) + return v6; + v4 = a1[3]; + v3 = (_BYTE *)a1[2]; + } + else + { + LOBYTE(v5) = *v3; + } + v6 = 0; + while ( 1 ) + { + v7 = v4 - (_DWORD)v3; + if ( v7 > 1 ) + break; + while ( 1 ) + { + v9 = (_BYTE *)a2[5]; + if ( (unsigned int)v9 >= a2[6] ) + { + if ( (*(int (__thiscall **)(_DWORD *, _DWORD))(*a2 + 52))(a2, (unsigned __int8)v5) == -1 ) + goto LABEL_15; + } + else + { + *v9 = v5; + ++a2[5]; + } + v10 = a1[2]; + v4 = a1[3]; + ++v6; + if ( v10 >= v4 ) + { + if ( (*(int (__fastcall **)(_DWORD *))(*a1 + 40))(a1) == -1 ) + return v6; + v3 = (_BYTE *)a1[2]; + v4 = a1[3]; + } + else + { + v3 = (_BYTE *)(v10 + 1); + a1[2] = v3; + } + if ( v4 > (unsigned int)v3 ) + break; +LABEL_6: + v5 = (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + if ( v5 == -1 ) + return v6; + v3 = (_BYTE *)a1[2]; + v7 = a1[3] - (_DWORD)v3; + if ( v7 > 1 ) + goto LABEL_5; + } + LOBYTE(v5) = *v3; + } +LABEL_5: + v8 = (*(int (__thiscall **)(_DWORD *, _BYTE *, int))(*a2 + 48))(a2, v3, v7); + a1[2] += v8; + v6 += v8; + if ( v8 >= v7 ) + goto LABEL_6; +LABEL_15: + *a3 = 0; + return v6; +} + +//----- (004FABE0) -------------------------------------------------------- +int __cdecl std::__copy_streambufs_eof>(_DWORD *a1, _DWORD *a2, _BYTE *a3) +{ + unsigned __int16 *v3; // eax + int v4; // ecx + int v5; // edi + int v6; // esi + int v7; // eax + unsigned int v8; // edx + __int16 *v9; // eax + _WORD *v10; // esi + __int16 v11; // dx + unsigned __int16 *v12; // eax + + *a3 = 1; + v3 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v3 >= a1[3] ) + v4 = (*(unsigned __int16 (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + else + v4 = *v3; + v5 = 0; + while ( (_WORD)v4 != 0xFFFF ) + { + v8 = a1[3]; + v9 = (__int16 *)a1[2]; + if ( (int)(v8 - (_DWORD)v9) > 2 ) + { + v6 = (int)(v8 - (_DWORD)v9) >> 1; + v7 = (*(int (__thiscall **)(_DWORD *, _DWORD, int))(*a2 + 48))(a2, a1[2], v6); + a1[2] += 2 * v7; + v5 += v7; + if ( v7 < v6 ) + goto LABEL_15; + goto LABEL_6; + } + v10 = (_WORD *)a2[5]; + if ( (unsigned int)v10 >= a2[6] ) + { + if ( (*(unsigned __int16 (__thiscall **)(_DWORD *, int))(*a2 + 52))(a2, v4) == 0xFFFF ) + { +LABEL_15: + *a3 = 0; + return v5; + } + v9 = (__int16 *)a1[2]; + ++v5; + if ( (unsigned int)v9 < a1[3] ) + { +LABEL_11: + v11 = *v9; + a1[2] = v9 + 1; + goto LABEL_12; + } + } + else + { + *v10 = v4; + ++v5; + a2[5] = v10 + 1; + if ( (unsigned int)v9 < v8 ) + goto LABEL_11; + } + v11 = (*(int (__fastcall **)(_DWORD *))(*a1 + 40))(a1); +LABEL_12: + if ( v11 == -1 ) + return v5; + v12 = (unsigned __int16 *)a1[2]; + if ( (unsigned int)v12 < a1[3] ) + { + v4 = *v12; + continue; + } +LABEL_6: + v4 = (*(unsigned __int16 (__fastcall **)(_DWORD *))(*a1 + 36))(a1); + } + return v5; +} + +//----- (004FACF0) -------------------------------------------------------- +void __cdecl std::__destroy_ios_failure(void (__cdecl ***a1)(std::ios_base::failure *__hidden this)) +{ + void (__cdecl *v1)(std::ios_base::failure *__hidden); // eax + int v2; // eax + void (__cdecl **v3)(std::ios_base::failure *__hidden); // ecx + int v4; // eax + int v5[3]; // [esp+1Fh] [ebp-Dh] BYREF + + v1 = **a1; + if ( v1 == std::ios_base::failure::~failure ) + { + v2 = _CRT_MT; + v3 = a1[1]; + *a1 = &off_51A79C; + if ( v2 ) + { + if ( _InterlockedExchangeAdd((volatile signed __int32 *)v3 - 1, 0xFFFFFFFF) > 0 ) + goto LABEL_4; + } + else + { + v4 = (int)*(v3 - 1); + *(v3 - 1) = (void (__cdecl *)(std::ios_base::failure *__hidden))(v4 - 1); + if ( v4 > 0 ) + { +LABEL_4: + std::exception::~exception((std::exception *)a1); + return; + } + } + std::string::_Rep::_M_destroy(v3 - 3, (int)v5); + std::exception::~exception((std::exception *)a1); + } + else + { + ((void (__fastcall *)(void (__cdecl ***)(std::ios_base::failure *__hidden)))v1)(a1); + } +} +// 50B0F0: using guessed type int _CRT_MT; +// 51A79C: using guessed type void (__cdecl *off_51A79C)(std::ios_base::failure *__hidden this); +// 4FACF0: using guessed type int var_D[3]; + +//----- (004FAD70) -------------------------------------------------------- +int __cdecl std::__verify_grouping_impl(const char *a1, unsigned int a2, const char *a3, unsigned int a4) +{ + const char *v4; // ecx + int v5; // eax + unsigned int v6; // ebp + unsigned int v7; // edx + char v8; // bl + char v9; // cl + bool v10; // cl + bool v11; // di + char v12; // bl + char v13; // dl + char v15; // [esp+3h] [ebp-11h] + unsigned __int8 v16; // [esp+3h] [ebp-11h] + + v4 = a3; + v5 = a4 - 1; + v6 = a2 - 1; + if ( a2 - 1 > a4 - 1 ) + v6 = a4 - 1; + if ( v6 ) + { + v7 = 0; + do + { + v8 = a3[v5--]; + v9 = a1[v7++]; + v15 = v9; + v10 = v8 != v9; + v11 = v10; + } + while ( v7 < v6 && !v10 ); + v4 = a3; + v16 = v8 == v15; + } + else + { + v16 = 1; + v11 = 0; + } + v12 = a1[v6]; + if ( v5 && !v11 ) + { + do + v13 = v4[v5--]; + while ( v5 && v13 == v12 ); + v16 = v13 == v12; + } + if ( (unsigned __int8)(v12 - 1) <= 0x7Du ) + v16 &= *v4 <= (unsigned __int8)v12; + return v16; +} + +//----- (004FAE40) -------------------------------------------------------- +void __cdecl std::__construct_ios_failure(_DWORD *a1, char *a2) +{ + int v2; // ecx + int v3; // eax + const std::string *v4; // [esp+4h] [ebp-28h] + int v5; // [esp+1Ah] [ebp-12h] BYREF + _DWORD v6[4]; // [esp+1Ch] [ebp-10h] BYREF + + std::string::string(v6, a2, (int)&v5); + std::ios_base::failure::failure(a1, (std::ios_base::failure *)v6, v4); + v2 = v6[0]; + if ( !_CRT_MT ) + { + v3 = *(_DWORD *)(v6[0] - 4); + *(_DWORD *)(v6[0] - 4) = v3 - 1; + if ( v3 > 0 ) + return; +LABEL_5: + std::string::_Rep::_M_destroy((void *)(v2 - 12), (int)&v5 + 1); + return; + } + if ( _InterlockedExchangeAdd((volatile signed __int32 *)(v6[0] - 4), 0xFFFFFFFF) <= 0 ) + goto LABEL_5; +} +// 4FAE68: variable 'v4' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004FAEC0) -------------------------------------------------------- +bool __cdecl std::__is_ios_failure_handler(const __cxxabiv1::__class_type_info *a1) +{ + return std::type_info::operator==(a1, (int)&`typeinfo for'std::ios_base::failure); +} +// 516354: using guessed type int *`typeinfo for'std::ios_base::failure; + +//----- (004FAEE0) -------------------------------------------------------- +void __noreturn std::__throw_out_of_range_fmt(char *Str, ...) +{ + size_t v1; // eax + unsigned int v2; // edx + int v3; // eax + void *v4; // esp + void *v5; // esp + std::out_of_range *exception; // eax + std::out_of_range *v7; // ecx + const char *v8; // [esp+4h] [ebp-54h] + char v9[4]; // [esp+10h] [ebp-48h] BYREF + std::out_of_range *v10; // [esp+18h] [ebp-40h] + va_list va; // [esp+64h] [ebp+Ch] BYREF + + va_start(va, Str); + v1 = strlen(Str); + v2 = v1 + 512; + v3 = 16 * ((v1 + 539) >> 4); + v4 = alloca(v3); + v5 = alloca(v3); + v10 = (std::out_of_range *)v9; + __gnu_cxx::__snprintf_lite(v9, v2, Str, va); + exception = (std::out_of_range *)__cxa_allocate_exception(8u); + v7 = v10; + v10 = exception; + std::out_of_range::out_of_range(exception, v7, v8); + __cxa_throw( + v10, + (struct type_info *)&`typeinfo for'std::out_of_range, + (void (__cdecl *)(void *))std::out_of_range::~out_of_range); +} +// 4FAF7D: variable 'v8' is possibly undefined +// 5164BC: using guessed type int *`typeinfo for'std::out_of_range; +// 4FAEE0: using guessed type char anonymous_0[4]; + +//----- (004FAFD0) -------------------------------------------------------- +int *__cdecl std::_Rb_tree_rebalance_for_erase(int *a1, _DWORD *a2) +{ + int v2; // ebp + int v3; // edi + int v4; // eax + int *v5; // ecx + _DWORD *v6; // edx + _DWORD *v7; // eax + _DWORD *v8; // ebp + int v9; // edi + int v10; // edi + _DWORD *v11; // ebp + _DWORD *v12; // edi + _DWORD *v13; // ecx + _DWORD *v14; // ebp + _DWORD *v15; // edi + _DWORD *v16; // ebp + int v17; // ecx + int v18; // ecx + int v20; // ecx + _DWORD *v21; // ecx + _DWORD *v22; // ebp + int v23; // edi + _DWORD *v24; // edi + int v25; // edi + _DWORD *v26; // edi + _DWORD *v27; // ecx + _DWORD *v28; // edi + _DWORD *v29; // edi + int v30; // edi + int v31; // edi + _DWORD *v32; // ebp + _DWORD *v33; // edi + int v34; // ecx + int v35; // ecx + _DWORD *v36; // edi + int v37; // edi + int v38; // edi + _DWORD *v39; // edi + _DWORD *v40; // [esp+0h] [ebp-14h] + _DWORD *v41; // [esp+0h] [ebp-14h] + + v2 = a1[2]; + v3 = a1[3]; + if ( !v2 ) + goto LABEL_76; + if ( !v3 ) + { + v7 = (_DWORD *)a1[1]; + goto LABEL_44; + } + v4 = a1[3]; + do + { + v5 = (int *)v4; + v4 = *(_DWORD *)(v4 + 8); + } + while ( v4 ); + v6 = (_DWORD *)v5[3]; + if ( v5 == a1 ) + { + v3 = v5[3]; +LABEL_76: + v7 = (_DWORD *)a1[1]; + if ( !v3 ) + { + v6 = 0; + goto LABEL_45; + } + v2 = v3; +LABEL_44: + *(_DWORD *)(v2 + 4) = v7; + v6 = (_DWORD *)v2; +LABEL_45: + if ( (int *)a2[1] == a1 ) + { + a2[1] = v6; + } + else + { + v20 = a1[1]; + if ( *(int **)(v20 + 8) == a1 ) + *(_DWORD *)(v20 + 8) = v6; + else + *(_DWORD *)(v20 + 12) = v6; + } + if ( (int *)a2[2] == a1 ) + { + v27 = v6; + if ( a1[3] ) + { + do + { + v28 = v27; + v27 = (_DWORD *)v27[2]; + } + while ( v27 ); + a2[2] = v28; + } + else + { + a2[2] = a1[1]; + } + } + v10 = *a1; + if ( (int *)a2[3] == a1 ) + { + v21 = v6; + if ( a1[2] ) + { + do + { + v22 = v21; + v21 = (_DWORD *)v21[3]; + } + while ( v21 ); + a2[3] = v22; + } + else + { + a2[3] = a1[1]; + } + } + goto LABEL_14; + } + *(_DWORD *)(v2 + 4) = v5; + v7 = (_DWORD *)v3; + v5[2] = v2; + if ( v5 != (int *)v3 ) + { + v7 = (_DWORD *)v5[1]; + v8 = v7; + if ( v6 ) + { + v6[1] = v7; + v8 = (_DWORD *)v5[1]; + } + v8[2] = v6; + v5[3] = v3; + *(_DWORD *)(a1[3] + 4) = v5; + } + if ( (int *)a2[1] == a1 ) + { + a2[1] = v5; + v9 = a1[1]; + } + else + { + v9 = a1[1]; + if ( *(int **)(v9 + 8) == a1 ) + *(_DWORD *)(v9 + 8) = v5; + else + *(_DWORD *)(v9 + 12) = v5; + } + v5[1] = v9; + v10 = *v5; + *v5 = *a1; + *a1 = v10; +LABEL_14: + if ( !v10 ) + return a1; + if ( (_DWORD *)a2[1] == v6 ) + { +LABEL_41: + if ( v6 ) + goto LABEL_67; + return a1; + } + while ( 1 ) + { + if ( v6 && *v6 != 1 ) + goto LABEL_67; + v13 = (_DWORD *)v7[2]; + if ( v13 != v6 ) + break; + v13 = (_DWORD *)v7[3]; + v14 = (_DWORD *)v13[2]; + if ( !*v13 ) + { + *v13 = 1; + *v7 = 0; + v7[3] = v14; + if ( v14 ) + v14[1] = v7; + v25 = v7[1]; + v13[1] = v25; + if ( v7 == (_DWORD *)a2[1] ) + { + a2[1] = v13; + v26 = (_DWORD *)v7[3]; + } + else if ( v7 == *(_DWORD **)(v25 + 8) ) + { + *(_DWORD *)(v25 + 8) = v13; + v26 = v14; + } + else + { + *(_DWORD *)(v25 + 12) = v13; + v26 = (_DWORD *)v7[3]; + } + v13[2] = v7; + v14 = (_DWORD *)v26[2]; + v7[1] = v13; + v13 = v26; + } + if ( v14 && *v14 != 1 ) + { + v36 = (_DWORD *)v13[3]; + v40 = v36; + if ( !v36 || *v36 == 1 ) + { + v37 = v14[3]; + *v14 = 1; + *v13 = 0; + v13[2] = v37; + if ( v37 ) + *(_DWORD *)(v37 + 4) = v13; + v38 = v13[1]; + v14[1] = v38; + if ( v13 == (_DWORD *)a2[1] ) + { + a2[1] = v14; + } + else if ( v13 == *(_DWORD **)(v38 + 12) ) + { + *(_DWORD *)(v38 + 12) = v14; + } + else + { + *(_DWORD *)(v38 + 8) = v14; + } + v14[3] = v13; + v13[1] = v14; + v16 = (_DWORD *)v7[3]; + v39 = (_DWORD *)v16[3]; + *v16 = *v7; + v40 = v39; + *v7 = 1; + if ( !v39 ) + goto LABEL_35; + goto LABEL_34; + } +LABEL_33: + v16 = (_DWORD *)v7[3]; + *v13 = *v7; + *v7 = 1; +LABEL_34: + *v40 = 1; +LABEL_35: + v17 = v16[2]; + v7[3] = v17; + if ( v17 ) + *(_DWORD *)(v17 + 4) = v7; + v18 = v7[1]; + v16[1] = v18; + if ( v7 == (_DWORD *)a2[1] ) + { + a2[1] = v16; + } + else if ( v7 == *(_DWORD **)(v18 + 8) ) + { + *(_DWORD *)(v18 + 8) = v16; + } + else + { + *(_DWORD *)(v18 + 12) = v16; + } + v16[2] = v7; + v7[1] = v16; + goto LABEL_41; + } + v15 = (_DWORD *)v13[3]; + if ( v15 && *v15 != 1 ) + { + v40 = (_DWORD *)v13[3]; + goto LABEL_33; + } +LABEL_22: + *v13 = 0; + v6 = v7; + if ( (_DWORD *)a2[1] == v7 ) + goto LABEL_68; + v7 = (_DWORD *)v7[1]; + } + v11 = (_DWORD *)v13[3]; + if ( !*v13 ) + { + *v13 = 1; + *v7 = 0; + v7[2] = v11; + if ( v11 ) + v11[1] = v7; + v23 = v7[1]; + v13[1] = v23; + if ( v7 == (_DWORD *)a2[1] ) + { + a2[1] = v13; + v24 = (_DWORD *)v7[2]; + } + else if ( v7 == *(_DWORD **)(v23 + 12) ) + { + *(_DWORD *)(v23 + 12) = v13; + v24 = v11; + } + else + { + *(_DWORD *)(v23 + 8) = v13; + v24 = (_DWORD *)v7[2]; + } + v13[3] = v7; + v11 = (_DWORD *)v24[3]; + v7[1] = v13; + v13 = v24; + } + if ( !v11 || *v11 == 1 ) + { + v12 = (_DWORD *)v13[2]; + if ( !v12 || *v12 == 1 ) + goto LABEL_22; + v41 = (_DWORD *)v13[2]; +LABEL_91: + v32 = (_DWORD *)v7[2]; + *v13 = *v7; + *v7 = 1; + goto LABEL_92; + } + v29 = (_DWORD *)v13[2]; + v41 = v29; + if ( v29 && *v29 != 1 ) + goto LABEL_91; + v30 = v11[2]; + *v11 = 1; + *v13 = 0; + v13[3] = v30; + if ( v30 ) + *(_DWORD *)(v30 + 4) = v13; + v31 = v13[1]; + v11[1] = v31; + if ( v13 == (_DWORD *)a2[1] ) + { + a2[1] = v11; + } + else if ( v13 == *(_DWORD **)(v31 + 8) ) + { + *(_DWORD *)(v31 + 8) = v11; + } + else + { + *(_DWORD *)(v31 + 12) = v11; + } + v11[2] = v13; + v13[1] = v11; + v32 = (_DWORD *)v7[2]; + v33 = (_DWORD *)v32[2]; + *v32 = *v7; + v41 = v33; + *v7 = 1; + if ( v33 ) +LABEL_92: + *v41 = 1; + v34 = v32[3]; + v7[2] = v34; + if ( v34 ) + *(_DWORD *)(v34 + 4) = v7; + v35 = v7[1]; + v32[1] = v35; + if ( v7 == (_DWORD *)a2[1] ) + { + a2[1] = v32; + } + else if ( v7 == *(_DWORD **)(v35 + 12) ) + { + *(_DWORD *)(v35 + 12) = v32; + } + else + { + *(_DWORD *)(v35 + 8) = v32; + } + v32[3] = v7; + v7[1] = v32; + if ( !v6 ) + return a1; +LABEL_67: + v7 = v6; +LABEL_68: + *v7 = 1; + return a1; +} + +//----- (004FB460) -------------------------------------------------------- +_DWORD *__cdecl std::_Rb_tree_insert_and_rebalance(char a1, _DWORD *a2, _DWORD *a3, _DWORD *a4) +{ + _DWORD *v4; // ecx + _DWORD *v5; // esi + _DWORD *result; // eax + _DWORD *v7; // edx + _DWORD *v8; // eax + _DWORD *v9; // ebx + _DWORD *v10; // ebp + int v11; // edx + int v12; // ebx + int v13; // ebx + int v14; // edx + int v15; // edx + int v16; // esi + int v17; // ebx + _DWORD *v18; // ebx + int v19; // ebx + _DWORD *v20; // ebx + _DWORD *v21; // esi + + v4 = a2; + a2[1] = a3; + a2[2] = 0; + a2[3] = 0; + *a2 = 0; + if ( !a1 ) + { + a3[3] = a2; + if ( (_DWORD *)a4[3] == a3 ) + { + v5 = (_DWORD *)a4[1]; + a4[3] = a2; + result = v5; +LABEL_6: + if ( a2 == v5 ) + { +LABEL_17: + *result = 1; + return result; + } + while ( 1 ) + { + while ( 1 ) + { + v7 = (_DWORD *)v4[1]; + if ( *v7 ) + goto LABEL_17; + v8 = (_DWORD *)v7[1]; + v9 = (_DWORD *)v8[2]; + if ( v7 != v9 ) + { + if ( !v9 || *v9 ) + { + if ( (_DWORD *)v7[2] == v4 ) + { + v16 = v4[3]; + v17 = v7[1]; + v7[2] = v16; + if ( v16 ) + { + *(_DWORD *)(v16 + 4) = v7; + v17 = v7[1]; + } + v4[1] = v17; + if ( v7 == (_DWORD *)a4[1] ) + { + a4[1] = v4; + } + else if ( v7 == *(_DWORD **)(v17 + 12) ) + { + *(_DWORD *)(v17 + 12) = v4; + } + else + { + *(_DWORD *)(v17 + 8) = v4; + } + v18 = v4; + v4[3] = v7; + v7[1] = v4; + v4 = v7; + v7 = v18; + } + *v7 = 1; + v11 = v8[3]; + *v8 = 0; + v12 = *(_DWORD *)(v11 + 8); + v8[3] = v12; + if ( v12 ) + *(_DWORD *)(v12 + 4) = v8; + v13 = v8[1]; + *(_DWORD *)(v11 + 4) = v13; + if ( v8 == (_DWORD *)a4[1] ) + { + a4[1] = v11; + } + else if ( v8 == *(_DWORD **)(v13 + 8) ) + { + *(_DWORD *)(v13 + 8) = v11; + } + else + { + *(_DWORD *)(v13 + 12) = v11; + } + *(_DWORD *)(v11 + 8) = v8; + v8[1] = v11; + v5 = (_DWORD *)a4[1]; + } + else + { + *v7 = 1; + v4 = v8; + *v9 = 1; + *v8 = 0; + } + goto LABEL_11; + } + v10 = (_DWORD *)v8[3]; + if ( !v10 || *v10 ) + break; + v4 = (_DWORD *)v7[1]; + *v7 = 1; + *v10 = 1; + *v8 = 0; + result = v5; + if ( v5 == v4 ) + goto LABEL_17; + } + if ( (_DWORD *)v7[3] == v4 ) + break; +LABEL_28: + *v7 = 1; + v14 = v9[3]; + *v8 = 0; + v8[2] = v14; + if ( v14 ) + *(_DWORD *)(v14 + 4) = v8; + v15 = v8[1]; + v9[1] = v15; + if ( v8 == (_DWORD *)a4[1] ) + { + a4[1] = v9; + } + else if ( v8 == *(_DWORD **)(v15 + 12) ) + { + *(_DWORD *)(v15 + 12) = v9; + } + else + { + *(_DWORD *)(v15 + 8) = v9; + } + v9[3] = v8; + v8[1] = v9; + v5 = (_DWORD *)a4[1]; +LABEL_11: + result = v5; + if ( v5 == v4 ) + goto LABEL_17; + } + v19 = v4[2]; + v7[3] = v19; + if ( v19 ) + { + *(_DWORD *)(v19 + 4) = v7; + v20 = (_DWORD *)v7[1]; + v4[1] = v20; + if ( v7 != (_DWORD *)a4[1] ) + { + if ( v7 != (_DWORD *)v20[2] ) + { + v20[3] = v4; +LABEL_48: + v21 = v4; + v4[2] = v7; + v9 = (_DWORD *)v8[2]; + v7[1] = v4; + v4 = v7; + v7 = v21; + goto LABEL_28; + } +LABEL_52: + v20[2] = v4; + goto LABEL_48; + } + } + else + { + v4[1] = v8; + v20 = v8; + if ( v7 != (_DWORD *)a4[1] ) + goto LABEL_52; + } + a4[1] = v4; + goto LABEL_48; + } +LABEL_5: + v5 = (_DWORD *)a4[1]; + result = v5; + goto LABEL_6; + } + a3[2] = a2; + if ( a4 != a3 ) + { + if ( (_DWORD *)a4[2] == a3 ) + a4[2] = a2; + goto LABEL_5; + } + result = a2; + a4[1] = a2; + a4[3] = a2; + *a2 = 1; + return result; +} + +//----- (004FB6C0) -------------------------------------------------------- +_DWORD *__cdecl std::ws>(_DWORD *a1) +{ + _BYTE *v1; // eax + unsigned int v2; // eax + unsigned int v3; // edx + const std::locale *v5; // [esp+4h] [ebp-68h] + _DWORD *v6; // [esp+14h] [ebp-58h] + _DWORD *v7; // [esp+18h] [ebp-54h] + _DWORD *v8[4]; // [esp+5Ch] [ebp-10h] BYREF + + std::locale::locale( + (volatile signed __int32 **)v8, + (volatile signed __int32 **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 108), + v5); + v7 = std::use_facet>((int)v8); + std::locale::~locale(v8); + v6 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + v1 = (_BYTE *)v6[2]; + if ( (unsigned int)v1 < v6[3] ) + goto LABEL_5; +LABEL_11: + v1 = (_BYTE *)(*(int (__fastcall **)(_DWORD *))(*v6 + 36))(v6); + if ( v1 == (_BYTE *)-1 ) + { +LABEL_9: + std::ios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 2); + } + else + { + while ( (*(_BYTE *)(v7[6] + 2 * (unsigned __int8)v1) & 0x20) != 0 ) + { + v2 = v6[2]; + v3 = v6[3]; + if ( v2 < v3 ) + { + v1 = (_BYTE *)(v2 + 1); + v6[2] = v1; + } + else + { + if ( (*(int (__fastcall **)(_DWORD *))(*v6 + 40))(v6) == -1 ) + goto LABEL_9; + v1 = (_BYTE *)v6[2]; + v3 = v6[3]; + } + if ( (unsigned int)v1 >= v3 ) + goto LABEL_11; +LABEL_5: + LOBYTE(v1) = *v1; + } + } + return a1; +} +// 4FB709: variable 'v5' is possibly undefined + +//----- (004FB840) -------------------------------------------------------- +_DWORD *__cdecl std::ws>(_DWORD *a1) +{ + unsigned __int16 *v1; // eax + __int16 v2; // dx + unsigned __int16 i; // ax + __int16 *v4; // eax + const std::locale *v6; // [esp+Ch] [ebp-68h] + _DWORD *v7; // [esp+1Ch] [ebp-58h] + void *v8; // [esp+20h] [ebp-54h] + _DWORD *v9[4]; // [esp+64h] [ebp-10h] BYREF + + std::locale::locale( + (volatile signed __int32 **)v9, + (volatile signed __int32 **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 108), + v6); + v8 = std::use_facet>((int)v9); + std::locale::~locale(v9); + v7 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + v1 = (unsigned __int16 *)v7[2]; + if ( (unsigned int)v1 < v7[3] ) + goto LABEL_5; +LABEL_12: + for ( i = (*(int (__fastcall **)(_DWORD *))(*v7 + 36))(v7); i != 0xFFFF; i = *v1 ) + { + if ( !(*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v8 + 8))(v8, 32, i) ) + return a1; + v4 = (__int16 *)v7[2]; + if ( (unsigned int)v4 < v7[3] ) + { + v2 = *v4; + v7[2] = v4 + 1; + if ( v2 == -1 ) + break; + } + else if ( (*(unsigned __int16 (__fastcall **)(_DWORD *))(*v7 + 40))(v7) == 0xFFFF ) + { + break; + } + v1 = (unsigned __int16 *)v7[2]; + if ( (unsigned int)v1 >= v7[3] ) + goto LABEL_12; +LABEL_5: + ; + } + std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 2); + return a1; +} +// 4FB889: variable 'v6' is possibly undefined + +//----- (004FB9D0) -------------------------------------------------------- +std::ios_base *__cdecl std::hex(std::ios_base *a1) +{ + *((_DWORD *)a1 + 3) = *((_DWORD *)a1 + 3) & 0xFFFFFFB5 | 8; + return a1; +} + +//----- (004FB9F0) -------------------------------------------------------- +_DWORD *__cdecl std::endl>(std::ostream::sentry *a1) +{ + int v1; // eax + _BYTE *v2; // ebx + int v3; // eax + std::ostream::sentry *v4; // eax + int (__stdcall *v6)(unsigned __int8); // edx + char v7; // [esp+4h] [ebp-18h] + + v1 = *(_DWORD *)(*(_DWORD *)a1 - 12); + v2 = *(_BYTE **)((char *)a1 + v1 + 124); + if ( !v2 ) + std::__throw_bad_cast(); + if ( v2[28] ) + { + v3 = (char)v2[39]; + } + else + { + std::ctype::_M_widen_init(*(_DWORD *)((char *)a1 + v1 + 124)); + v6 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v2 + 24); + v3 = 10; + if ( v6 != std::ctype::do_widen ) + v3 = ((char (__thiscall *)(_BYTE *, int))v6)(v2, 10); + } + v4 = std::ostream::put(a1, (std::ostream *)v3, v7); + return std::ostream::flush(v4); +} +// 4FBA15: variable 'v7' is possibly undefined + +//----- (004FBA70) -------------------------------------------------------- +_DWORD *__cdecl std::endl>(int *a1) +{ + int v1; // ecx + unsigned __int16 v2; // ax + int *v3; // eax + + v1 = *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 124); + if ( !v1 ) + std::__throw_bad_cast(); + v2 = (*(int (__thiscall **)(int, int))(*(_DWORD *)v1 + 40))(v1, 10); + v3 = std::wostream::put(a1, v2); + return std::wostream::flush(v3); +} + +//----- (004FBAC0) -------------------------------------------------------- +std::ostream::sentry *__cdecl std::ends>(std::ostream::sentry *a1) +{ + char v2; // [esp+4h] [ebp-18h] + + return std::ostream::put(a1, 0, v2); +} +// 4FBACE: variable 'v2' is possibly undefined + +//----- (004FBAE0) -------------------------------------------------------- +int *__cdecl std::ends>(int *a1) +{ + return std::wostream::put(a1, 0); +} + +//----- (004FBB00) -------------------------------------------------------- +_DWORD *__cdecl std::flush>(_DWORD *a1) +{ + return std::ostream::flush(a1); +} + +//----- (004FBB10) -------------------------------------------------------- +_DWORD *__cdecl std::flush>(_DWORD *a1) +{ + return std::wostream::flush(a1); +} + +//----- (004FBB20) -------------------------------------------------------- +std::istream::sentry *__cdecl std::getline,std::allocator>( + std::istream::sentry *a1, + _DWORD *a2) +{ + int v2; // eax + _BYTE *v3; // ebx + char v4; // al + int (__stdcall *v6)(unsigned __int8); // edx + + v2 = *(_DWORD *)(*(_DWORD *)a1 - 12); + v3 = *(_BYTE **)((char *)a1 + v2 + 124); + if ( !v3 ) + std::__throw_bad_cast(); + if ( v3[28] ) + { + v4 = v3[39]; + } + else + { + std::ctype::_M_widen_init(*(_DWORD *)((char *)a1 + v2 + 124)); + v6 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v3 + 24); + v4 = 10; + if ( v6 != std::ctype::do_widen ) + v4 = ((int (__thiscall *)(_BYTE *, int))v6)(v3, 10); + } + return std::getline,std::allocator>(a1, a2, v4); +} + +//----- (004FBBA0) -------------------------------------------------------- +std::istream::sentry *__cdecl std::getline,std::allocator>( + std::istream::sentry *a1, + _DWORD *a2, + char a3) +{ + int v3; // eax + unsigned __int8 *v5; // eax + int v6; // edx + _BYTE *v7; // eax + size_t v8; // edx + unsigned __int8 *v9; // eax + unsigned int v10; // eax + signed int v11; // eax + _BYTE *v12; // eax + unsigned int v13; // edx + unsigned int v14; // eax + unsigned int v15; // edx + bool v16; // [esp+8h] [ebp-90h] + _DWORD *v17; // [esp+28h] [ebp-70h] + size_t v18; // [esp+2Ch] [ebp-6Ch] + size_t MaxCount; // [esp+30h] [ebp-68h] + size_t MaxCounta; // [esp+30h] [ebp-68h] + char MaxCountb; // [esp+30h] [ebp-68h] + unsigned int v22; // [esp+34h] [ebp-64h] + unsigned int v23; // [esp+34h] [ebp-64h] + char *Buf; // [esp+38h] [ebp-60h] + void *Bufa; // [esp+38h] [ebp-60h] + char v26[25]; // [esp+7Fh] [ebp-19h] BYREF + + std::istream::sentry::sentry(v26, a1, (std::istream *)1, v16); + if ( !v26[0] ) + { +LABEL_2: + v3 = 4; +LABEL_3: + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | v3); + return a1; + } + a2[1] = 0; + *(_BYTE *)*a2 = 0; + v17 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v5 = (unsigned __int8 *)v17[2]; + if ( (unsigned int)v5 >= v17[3] ) + v6 = (*(int (__fastcall **)(_DWORD *))(*v17 + 36))(v17); + else + v6 = *v5; + v22 = 0; + do + { + while ( 1 ) + { + if ( v6 == -1 ) + { + if ( !v22 ) + { + v3 = 6; + goto LABEL_3; + } +LABEL_34: + v3 = 2; + goto LABEL_3; + } + v10 = v17[3]; + Buf = (char *)v17[2]; + if ( (unsigned __int8)a3 == v6 ) + goto LABEL_29; + v11 = v10 - v17[2]; + if ( (int)(0x3FFFFFFF - v22) <= v11 ) + v11 = 0x3FFFFFFF - v22; + MaxCounta = v11; + v18 = a2[1]; + if ( v11 <= 1 ) + break; + v7 = memchr(Buf, a3, v11); + v8 = v7 - Buf; + if ( !v7 ) + v8 = MaxCounta; + MaxCount = v8; + if ( v8 > 0x3FFFFFFF - v18 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(a2, Buf, v8); + v22 += MaxCount; + v9 = (unsigned __int8 *)(MaxCount + v17[2]); + v17[2] = v9; + if ( (unsigned int)v9 >= v17[3] ) + goto LABEL_25; +LABEL_12: + v6 = *v9; + if ( v22 > 0x3FFFFFFE ) + goto LABEL_26; + } + MaxCountb = v6; + Bufa = (void *)(v18 + 1); + v12 = (_BYTE *)*a2; + if ( (_DWORD *)*a2 == a2 + 2 ) + v13 = 15; + else + v13 = a2[2]; + if ( (unsigned int)Bufa > v13 ) + { + std::string::_M_mutate((int)a2, v18, 0, 0, 1u); + v12 = (_BYTE *)*a2; + } + v12[v18] = MaxCountb; + ++v22; + a2[1] = Bufa; + *(_BYTE *)(*a2 + v18 + 1) = 0; + v14 = v17[2]; + v15 = v17[3]; + if ( v14 >= v15 ) + { + if ( (*(int (__fastcall **)(_DWORD *))(*v17 + 40))(v17) == -1 ) + goto LABEL_34; + v9 = (unsigned __int8 *)v17[2]; + v15 = v17[3]; + } + else + { + v9 = (unsigned __int8 *)(v14 + 1); + v17[2] = v9; + } + if ( v15 > (unsigned int)v9 ) + goto LABEL_12; +LABEL_25: + v6 = (*(int (__fastcall **)(_DWORD *))(*v17 + 36))(v17); + } + while ( v22 <= 0x3FFFFFFE ); +LABEL_26: + if ( v6 == -1 ) + goto LABEL_34; + v3 = 4; + if ( v6 != (unsigned __int8)a3 ) + goto LABEL_3; + v10 = v17[3]; + Buf = (char *)v17[2]; +LABEL_29: + v23 = v22 + 1; + if ( v10 <= (unsigned int)Buf ) + { + (*(void (__fastcall **)(_DWORD *))(*v17 + 40))(v17); + if ( v23 ) + return a1; + goto LABEL_2; + } + v17[2] = Buf + 1; + if ( !v23 ) + goto LABEL_2; + return a1; +} +// 4FBBF3: variable 'v16' is possibly undefined +// 4FBBA0: using guessed type char var_19[25]; + +//----- (004FBFF0) -------------------------------------------------------- +_DWORD *__cdecl std::getline,std::allocator>( + _DWORD *a1, + _DWORD *a2, + __int16 a3) +{ + int v3; // eax + __int16 *v5; // eax + unsigned int v6; // ebx + __int16 *v7; // ecx + int v8; // eax + int v9; // edx + _WORD *v10; // eax + __int16 *v11; // eax + __int16 v12; // ax + _WORD *v13; // eax + unsigned int v14; // edx + __int16 v15; // ax + unsigned int v16; // [esp+24h] [ebp-74h] + int v17; // [esp+2Ch] [ebp-6Ch] + _DWORD *v18; // [esp+30h] [ebp-68h] + unsigned int v19; // [esp+34h] [ebp-64h] + unsigned int v20; // [esp+34h] [ebp-64h] + __int16 lpuexcpt; // [esp+38h] [ebp-60h] + unsigned int lpuexcpta; // [esp+38h] [ebp-60h] + char v23[25]; // [esp+7Fh] [ebp-19h] BYREF + + std::wistream::sentry::sentry(v23, a1, 1); + if ( !v23[0] ) + { +LABEL_2: + v3 = 4; +LABEL_3: + std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | v3); + return a1; + } + a2[1] = 0; + *(_WORD *)*a2 = 0; + v18 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + v5 = (__int16 *)v18[2]; + if ( (unsigned int)v5 >= v18[3] ) + lpuexcpt = (*(int (__fastcall **)(_DWORD *))(*v18 + 36))(v18); + else + lpuexcpt = *v5; + v19 = 0; + do + { + if ( lpuexcpt == -1 ) + { + if ( !v19 ) + { + v3 = 6; + goto LABEL_3; + } +LABEL_39: + v3 = 2; + goto LABEL_3; + } + v6 = v18[3]; + v7 = (__int16 *)v18[2]; + if ( a3 == lpuexcpt ) + goto LABEL_24; + v8 = (int)(v6 - (_DWORD)v7) >> 1; + if ( v8 > (int)(0x1FFFFFFF - v19) ) + v8 = 0x1FFFFFFF - v19; + v17 = a2[1]; + if ( v8 <= 1 ) + { + v16 = v17 + 1; + v13 = (_WORD *)*a2; + if ( (_DWORD *)*a2 == a2 + 2 ) + v14 = 7; + else + v14 = a2[2]; + if ( v16 > v14 ) + { + std::wstring::_M_mutate((int)a2, v17, 0, 0, 1); + v7 = (__int16 *)v18[2]; + v13 = (_WORD *)*a2; + v6 = v18[3]; + } + ++v19; + v13[v17] = lpuexcpt; + a2[1] = v16; + v13[v17 + 1] = 0; + if ( v6 <= (unsigned int)v7 ) + { + v15 = (*(int (__fastcall **)(_DWORD *))(*v18 + 40))(v18); + } + else + { + v15 = *v7; + v18[2] = v7 + 1; + } + if ( v15 == -1 ) + goto LABEL_39; + v11 = (__int16 *)v18[2]; + if ( (unsigned int)v11 < v18[3] ) + { +LABEL_19: + v12 = *v11; + goto LABEL_20; + } + } + else + { + lpuexcpta = v8; + v9 = v8; + if ( v7 ) + { + v10 = (_WORD *)v18[2]; + while ( *v10 != a3 ) + { + ++v10; + if ( !--v9 ) + goto LABEL_17; + } + lpuexcpta = v10 - v7; + } +LABEL_17: + if ( lpuexcpta > 0x1FFFFFFF - v17 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append(a2, v7, lpuexcpta); + v19 += lpuexcpta; + v11 = (__int16 *)(v18[2] + 2 * lpuexcpta); + v18[2] = v11; + if ( (unsigned int)v11 < v18[3] ) + goto LABEL_19; + } + v12 = (*(int (__fastcall **)(_DWORD *))(*v18 + 36))(v18); +LABEL_20: + lpuexcpt = v12; + } + while ( v19 <= 0x1FFFFFFE ); + if ( v12 == -1 ) + goto LABEL_39; + v3 = 4; + if ( lpuexcpt != a3 ) + goto LABEL_3; + v7 = (__int16 *)v18[2]; + v6 = v18[3]; +LABEL_24: + v20 = v19 + 1; + if ( (unsigned int)v7 >= v6 ) + { + (*(void (__fastcall **)(_DWORD *))(*v18 + 40))(v18); + if ( v20 ) + return a1; + goto LABEL_2; + } + v18[2] = v7 + 1; + if ( !v20 ) + goto LABEL_2; + return a1; +} +// 4FBFF0: using guessed type char var_19[25]; + +//----- (004FC430) -------------------------------------------------------- +int __cdecl std::setfill(unsigned __int8 a1) +{ + return a1; +} + +//----- (004FC440) -------------------------------------------------------- +int __cdecl std::setfill(unsigned __int16 a1) +{ + return a1; +} + +//----- (004FC450) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0) != 0; + } + return v2; +} +// 4FC499: variable 'v2' is possibly undefined +// 50C608: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5160F8: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FC4A0) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0) != 0; + } + return v2; +} +// 4FC4E9: variable 'v2' is possibly undefined +// 50C610: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516138: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FC4F0) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::collate::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::collate, + 0) != 0; + } + return v2; +} +// 4FC539: variable 'v2' is possibly undefined +// 50C618: using guessed type signed __int32 std::collate::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516268: using guessed type int *`typeinfo for'std::collate; + +//----- (004FC540) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::collate::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::collate, + 0) != 0; + } + return v2; +} +// 4FC589: variable 'v2' is possibly undefined +// 50C61C: using guessed type signed __int32 std::collate::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516274: using guessed type int *`typeinfo for'std::collate; + +//----- (004FC590) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::messages::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::messages, + 0) != 0; + } + return v2; +} +// 4FC5D9: variable 'v2' is possibly undefined +// 50C620: using guessed type signed __int32 std::messages::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516280: using guessed type int *`typeinfo for'std::messages; + +//----- (004FC5E0) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::messages::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::messages, + 0) != 0; + } + return v2; +} +// 4FC629: variable 'v2' is possibly undefined +// 50C624: using guessed type signed __int32 std::messages::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5162A0: using guessed type int *`typeinfo for'std::messages; + +//----- (004FC630) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::numpunct::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::numpunct, + 0) != 0; + } + return v2; +} +// 4FC679: variable 'v2' is possibly undefined +// 50C628: using guessed type signed __int32 std::numpunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5162C0: using guessed type int *`typeinfo for'std::numpunct; + +//----- (004FC680) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::numpunct::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::numpunct, + 0) != 0; + } + return v2; +} +// 4FC6C9: variable 'v2' is possibly undefined +// 50C62C: using guessed type signed __int32 std::numpunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5162CC: using guessed type int *`typeinfo for'std::numpunct; + +//----- (004FC6D0) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::time_get>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_get>, + 0) != 0; + } + return v2; +} +// 4FC719: variable 'v2' is possibly undefined +// 50C630: using guessed type signed __int32 std::time_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5162D8: using guessed type int *`typeinfo for'std::time_get>; + +//----- (004FC720) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::time_get>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_get>, + 0) != 0; + } + return v2; +} +// 4FC769: variable 'v2' is possibly undefined +// 50C634: using guessed type signed __int32 std::time_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5162F8: using guessed type int *`typeinfo for'std::time_get>; + +//----- (004FC770) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::money_get>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_get>, + 0) != 0; + } + return v2; +} +// 4FC7B9: variable 'v2' is possibly undefined +// 50C638: using guessed type signed __int32 std::money_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516318: using guessed type int *`typeinfo for'std::money_get>; + +//----- (004FC7C0) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::money_get>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_get>, + 0) != 0; + } + return v2; +} +// 4FC809: variable 'v2' is possibly undefined +// 50C63C: using guessed type signed __int32 std::money_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516324: using guessed type int *`typeinfo for'std::money_get>; + +//----- (004FC810) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::money_put>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_put>, + 0) != 0; + } + return v2; +} +// 4FC859: variable 'v2' is possibly undefined +// 50C640: using guessed type signed __int32 std::money_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516330: using guessed type int *`typeinfo for'std::money_put>; + +//----- (004FC860) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::money_put>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_put>, + 0) != 0; + } + return v2; +} +// 4FC8A9: variable 'v2' is possibly undefined +// 50C644: using guessed type signed __int32 std::money_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 51633C: using guessed type int *`typeinfo for'std::money_put>; + +//----- (004FC8B0) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0) != 0; + } + return v2; +} +// 4FC8F9: variable 'v2' is possibly undefined +// 50C48C: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5163CC: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FC900) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0) != 0; + } + return v2; +} +// 4FC949: variable 'v2' is possibly undefined +// 50C494: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 51640C: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FC950) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::__timepunct::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::__timepunct, + 0) != 0; + } + return v2; +} +// 4FC999: variable 'v2' is possibly undefined +// 50C49C: using guessed type signed __int32 std::__timepunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516454: using guessed type int *`typeinfo for'std::__timepunct; + +//----- (004FC9A0) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::__timepunct::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::__timepunct, + 0) != 0; + } + return v2; +} +// 4FC9E9: variable 'v2' is possibly undefined +// 50C4A0: using guessed type signed __int32 std::__timepunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516460: using guessed type int *`typeinfo for'std::__timepunct; + +//----- (004FC9F0) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::ctype::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::ctype, + 0) != 0; + } + return v2; +} +// 4FCA39: variable 'v2' is possibly undefined +// 50C5E0: using guessed type signed __int32 std::ctype::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5168E8: using guessed type int *`typeinfo for'std::ctype; + +//----- (004FCA40) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::ctype::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::ctype, + 0) != 0; + } + return v2; +} +// 4FCA89: variable 'v2' is possibly undefined +// 50C5E4: using guessed type signed __int32 std::ctype::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516908: using guessed type int *`typeinfo for'std::ctype; + +//----- (004FCA90) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::codecvt::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::codecvt, + 0) != 0; + } + return v2; +} +// 4FCAD9: variable 'v2' is possibly undefined +// 50C658: using guessed type signed __int32 std::codecvt::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516944: using guessed type int *`typeinfo for'std::codecvt; + +//----- (004FCAE0) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::codecvt::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::codecvt, + 0) != 0; + } + return v2; +} +// 4FCB29: variable 'v2' is possibly undefined +// 50C65C: using guessed type signed __int32 std::codecvt::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516950: using guessed type int *`typeinfo for'std::codecvt; + +//----- (004FCB30) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::collate::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::collate, + 0) != 0; + } + return v2; +} +// 4FCB79: variable 'v2' is possibly undefined +// 50C660: using guessed type signed __int32 std::collate::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 51695C: using guessed type int *`typeinfo for'std::collate; + +//----- (004FCB80) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::collate::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::collate, + 0) != 0; + } + return v2; +} +// 4FCBC9: variable 'v2' is possibly undefined +// 50C664: using guessed type signed __int32 std::collate::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516968: using guessed type int *`typeinfo for'std::collate; + +//----- (004FCBD0) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::num_get>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::num_get>, + 0) != 0; + } + return v2; +} +// 4FCC19: variable 'v2' is possibly undefined +// 50C668: using guessed type signed __int32 std::num_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516974: using guessed type int *`typeinfo for'std::num_get>; + +//----- (004FCC20) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::num_get>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::num_get>, + 0) != 0; + } + return v2; +} +// 4FCC69: variable 'v2' is possibly undefined +// 50C66C: using guessed type signed __int32 std::num_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516980: using guessed type int *`typeinfo for'std::num_get>; + +//----- (004FCC70) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::num_put>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::num_put>, + 0) != 0; + } + return v2; +} +// 4FCCB9: variable 'v2' is possibly undefined +// 50C670: using guessed type signed __int32 std::num_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 51698C: using guessed type int *`typeinfo for'std::num_put>; + +//----- (004FCCC0) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::num_put>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::num_put>, + 0) != 0; + } + return v2; +} +// 4FCD09: variable 'v2' is possibly undefined +// 50C674: using guessed type signed __int32 std::num_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516998: using guessed type int *`typeinfo for'std::num_put>; + +//----- (004FCD10) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::messages::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::messages, + 0) != 0; + } + return v2; +} +// 4FCD59: variable 'v2' is possibly undefined +// 50C680: using guessed type signed __int32 std::messages::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5169B8: using guessed type int *`typeinfo for'std::messages; + +//----- (004FCD60) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::messages::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::messages, + 0) != 0; + } + return v2; +} +// 4FCDA9: variable 'v2' is possibly undefined +// 50C684: using guessed type signed __int32 std::messages::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5169D8: using guessed type int *`typeinfo for'std::messages; + +//----- (004FCDB0) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::numpunct::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::numpunct, + 0) != 0; + } + return v2; +} +// 4FCDF9: variable 'v2' is possibly undefined +// 50C688: using guessed type signed __int32 std::numpunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5169F8: using guessed type int *`typeinfo for'std::numpunct; + +//----- (004FCE00) -------------------------------------------------------- +int __cdecl std::has_facet>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::numpunct::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::numpunct, + 0) != 0; + } + return v2; +} +// 4FCE49: variable 'v2' is possibly undefined +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A04: using guessed type int *`typeinfo for'std::numpunct; + +//----- (004FCE50) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::time_get>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_get>, + 0) != 0; + } + return v2; +} +// 4FCE99: variable 'v2' is possibly undefined +// 50C690: using guessed type signed __int32 std::time_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A10: using guessed type int *`typeinfo for'std::time_get>; + +//----- (004FCEA0) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::time_get>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_get>, + 0) != 0; + } + return v2; +} +// 4FCEE9: variable 'v2' is possibly undefined +// 50C694: using guessed type signed __int32 std::time_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A30: using guessed type int *`typeinfo for'std::time_get>; + +//----- (004FCEF0) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::time_put>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_put>, + 0) != 0; + } + return v2; +} +// 4FCF39: variable 'v2' is possibly undefined +// 50C698: using guessed type signed __int32 std::time_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A50: using guessed type int *`typeinfo for'std::time_put>; + +//----- (004FCF40) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::time_put>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_put>, + 0) != 0; + } + return v2; +} +// 4FCF89: variable 'v2' is possibly undefined +// 50C69C: using guessed type signed __int32 std::time_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A5C: using guessed type int *`typeinfo for'std::time_put>; + +//----- (004FCF90) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::money_get>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_get>, + 0) != 0; + } + return v2; +} +// 4FCFD9: variable 'v2' is possibly undefined +// 50C6A0: using guessed type signed __int32 std::money_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A94: using guessed type int *`typeinfo for'std::money_get>; + +//----- (004FCFE0) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::money_get>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_get>, + 0) != 0; + } + return v2; +} +// 4FD029: variable 'v2' is possibly undefined +// 50C6A4: using guessed type signed __int32 std::money_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516AA0: using guessed type int *`typeinfo for'std::money_get>; + +//----- (004FD030) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(&std::money_put>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_put>, + 0) != 0; + } + return v2; +} +// 4FD079: variable 'v2' is possibly undefined +// 50C6A8: using guessed type signed __int32 std::money_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516AAC: using guessed type int *`typeinfo for'std::money_put>; + +//----- (004FD080) -------------------------------------------------------- +int __cdecl std::has_facet>>(int a1) +{ + unsigned int v1; // eax + int v2; // ecx + const void *lpsrc; // eax + + v1 = std::locale::id::_M_id(std::money_put>::id); + v2 = 0; + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) > v1 ) + { + lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1); + if ( lpsrc ) + LOBYTE(v2) = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_put>, + 0) != 0; + } + return v2; +} +// 4FD0C9: variable 'v2' is possibly undefined +// 50C6AC: using guessed type signed __int32 std::money_put>::id[5]; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516AB8: using guessed type int *`typeinfo for'std::money_put>; + +//----- (004FD0D0) -------------------------------------------------------- +void __noreturn std::terminate(void) +{ + __cxxabiv1::__terminate(__cxxabiv1::__terminate_handler); +} + +//----- (004FD0E0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C608: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5160F8: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FD140) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C60C: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516118: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FD1A0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C610: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516138: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FD200) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C614: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516158: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FD260) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::collate::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::collate, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C618: using guessed type signed __int32 std::collate::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516268: using guessed type int *`typeinfo for'std::collate; + +//----- (004FD2C0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::collate::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::collate, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C61C: using guessed type signed __int32 std::collate::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516274: using guessed type int *`typeinfo for'std::collate; + +//----- (004FD320) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::messages::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::messages, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C620: using guessed type signed __int32 std::messages::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516280: using guessed type int *`typeinfo for'std::messages; + +//----- (004FD380) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::messages::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::messages, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C624: using guessed type signed __int32 std::messages::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5162A0: using guessed type int *`typeinfo for'std::messages; + +//----- (004FD3E0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::numpunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::numpunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C628: using guessed type signed __int32 std::numpunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5162C0: using guessed type int *`typeinfo for'std::numpunct; + +//----- (004FD440) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::numpunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::numpunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C62C: using guessed type signed __int32 std::numpunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5162CC: using guessed type int *`typeinfo for'std::numpunct; + +//----- (004FD4A0) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::time_get>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_get>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C630: using guessed type signed __int32 std::time_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5162D8: using guessed type int *`typeinfo for'std::time_get>; + +//----- (004FD500) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::time_get>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_get>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C634: using guessed type signed __int32 std::time_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5162F8: using guessed type int *`typeinfo for'std::time_get>; + +//----- (004FD560) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::money_get>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_get>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C638: using guessed type signed __int32 std::money_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516318: using guessed type int *`typeinfo for'std::money_get>; + +//----- (004FD5C0) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::money_get>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_get>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C63C: using guessed type signed __int32 std::money_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516324: using guessed type int *`typeinfo for'std::money_get>; + +//----- (004FD620) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::money_put>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_put>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C640: using guessed type signed __int32 std::money_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516330: using guessed type int *`typeinfo for'std::money_put>; + +//----- (004FD680) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::money_put>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_put>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C644: using guessed type signed __int32 std::money_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 51633C: using guessed type int *`typeinfo for'std::money_put>; + +//----- (004FD6E0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C48C: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5163CC: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FD740) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C490: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5163EC: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FD7A0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C494: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 51640C: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FD800) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::moneypunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::moneypunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C498: using guessed type signed __int32 std::moneypunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 51642C: using guessed type int *`typeinfo for'std::moneypunct; + +//----- (004FD860) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::__timepunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::__timepunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C49C: using guessed type signed __int32 std::__timepunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516454: using guessed type int *`typeinfo for'std::__timepunct; + +//----- (004FD8C0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::__timepunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::__timepunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C4A0: using guessed type signed __int32 std::__timepunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516460: using guessed type int *`typeinfo for'std::__timepunct; + +//----- (004FD920) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::ctype::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::ctype, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C5E0: using guessed type signed __int32 std::ctype::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5168E8: using guessed type int *`typeinfo for'std::ctype; + +//----- (004FD980) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::ctype::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::ctype, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C5E4: using guessed type signed __int32 std::ctype::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516908: using guessed type int *`typeinfo for'std::ctype; + +//----- (004FD9E0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::codecvt::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::codecvt, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C658: using guessed type signed __int32 std::codecvt::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516944: using guessed type int *`typeinfo for'std::codecvt; + +//----- (004FDA40) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::codecvt::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::codecvt, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C65C: using guessed type signed __int32 std::codecvt::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516950: using guessed type int *`typeinfo for'std::codecvt; + +//----- (004FDAA0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::collate::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::collate, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C660: using guessed type signed __int32 std::collate::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 51695C: using guessed type int *`typeinfo for'std::collate; + +//----- (004FDB00) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::collate::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::collate, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C664: using guessed type signed __int32 std::collate::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516968: using guessed type int *`typeinfo for'std::collate; + +//----- (004FDB60) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::num_get>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::num_get>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C668: using guessed type signed __int32 std::num_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516974: using guessed type int *`typeinfo for'std::num_get>; + +//----- (004FDBC0) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::num_get>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::num_get>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C66C: using guessed type signed __int32 std::num_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516980: using guessed type int *`typeinfo for'std::num_get>; + +//----- (004FDC20) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::num_put>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::num_put>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C670: using guessed type signed __int32 std::num_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 51698C: using guessed type int *`typeinfo for'std::num_put>; + +//----- (004FDC80) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::num_put>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::num_put>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C674: using guessed type signed __int32 std::num_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516998: using guessed type int *`typeinfo for'std::num_put>; + +//----- (004FDCE0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::messages::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::messages, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C680: using guessed type signed __int32 std::messages::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5169B8: using guessed type int *`typeinfo for'std::messages; + +//----- (004FDD40) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::messages::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::messages, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C684: using guessed type signed __int32 std::messages::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5169D8: using guessed type int *`typeinfo for'std::messages; + +//----- (004FDDA0) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::numpunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::numpunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C688: using guessed type signed __int32 std::numpunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 5169F8: using guessed type int *`typeinfo for'std::numpunct; + +//----- (004FDE00) -------------------------------------------------------- +void *__cdecl std::use_facet>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::numpunct::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::numpunct, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C68C: using guessed type signed __int32 std::numpunct::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A04: using guessed type int *`typeinfo for'std::numpunct; + +//----- (004FDE60) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::time_get>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_get>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C690: using guessed type signed __int32 std::time_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A10: using guessed type int *`typeinfo for'std::time_get>; + +//----- (004FDEC0) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::time_get>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_get>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C694: using guessed type signed __int32 std::time_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A30: using guessed type int *`typeinfo for'std::time_get>; + +//----- (004FDF20) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::time_put>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_put>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C698: using guessed type signed __int32 std::time_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A50: using guessed type int *`typeinfo for'std::time_put>; + +//----- (004FDF80) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::time_put>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::time_put>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C69C: using guessed type signed __int32 std::time_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A5C: using guessed type int *`typeinfo for'std::time_put>; + +//----- (004FDFE0) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::money_get>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_get>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C6A0: using guessed type signed __int32 std::money_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516A94: using guessed type int *`typeinfo for'std::money_get>; + +//----- (004FE040) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::money_get>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_get>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C6A4: using guessed type signed __int32 std::money_get>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516AA0: using guessed type int *`typeinfo for'std::money_get>; + +//----- (004FE0A0) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(&std::money_put>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_put>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C6A8: using guessed type signed __int32 std::money_put>::id; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516AAC: using guessed type int *`typeinfo for'std::money_put>; + +//----- (004FE100) -------------------------------------------------------- +void *__cdecl std::use_facet>>(int a1) +{ + unsigned int v1; // eax + const void *lpsrc; // eax + void *result; // eax + + v1 = std::locale::id::_M_id(std::money_put>::id); + if ( *(_DWORD *)(*(_DWORD *)a1 + 8) <= v1 || (lpsrc = *(const void **)(*(_DWORD *)(*(_DWORD *)a1 + 4) + 4 * v1)) == 0 ) + std::__throw_bad_cast(); + result = __dynamic_cast( + lpsrc, + (const struct __class_type_info *)&`typeinfo for'std::locale::facet, + (const struct __class_type_info *)&`typeinfo for'std::money_put>, + 0); + if ( !result ) + __cxa_bad_cast(); + return result; +} +// 50C6AC: using guessed type signed __int32 std::money_put>::id[5]; +// 5160F0: using guessed type int *`typeinfo for'std::locale::facet; +// 516AB8: using guessed type int *`typeinfo for'std::money_put>; + +//----- (004FE160) -------------------------------------------------------- +bool __cdecl std::operator==(int a1, int a2) +{ + bool result; // al + int v3; // edx + + result = 0; + v3 = *(_DWORD *)(a1 + 4); + if ( v3 == *(_DWORD *)(a2 + 4) ) + { + result = 1; + if ( v3 ) + return memcmp(*(const void **)a1, *(const void **)a2, *(_DWORD *)(a1 + 4)) == 0; + } + return result; +} + +//----- (004FE19C) -------------------------------------------------------- +bool __cdecl std::operator==(int a1, char *a2) +{ + return std::string::compare(a1, a2) == 0; +} + +//----- (004FE1C0) -------------------------------------------------------- +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *a1, char *Str) +{ + int v2; // eax + + if ( Str ) + { + v2 = strlen(Str); + std::__ostream_insert>(a1, (int)Str, v2); + } + else + { + std::ios::clear( + (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 1); + } + return a1; +} + +//----- (004FE220) -------------------------------------------------------- +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *a1, char *Str) +{ + int v2; // eax + + if ( Str ) + { + v2 = strlen(Str); + std::__ostream_insert>(a1, (int)Str, v2); + } + else + { + std::ios::clear( + (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 1); + } + return a1; +} + +//----- (004FE280) -------------------------------------------------------- +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *a1, char *Str) +{ + int v2; // eax + + if ( Str ) + { + v2 = strlen(Str); + std::__ostream_insert>(a1, (int)Str, v2); + } + else + { + std::ios::clear( + (std::ostream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 1); + } + return a1; +} + +//----- (004FE2E0) -------------------------------------------------------- +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *a1, char a2) +{ + int v3[3]; // [esp+1Fh] [ebp-Dh] BYREF + + LOBYTE(v3[0]) = a2; + return std::__ostream_insert>(a1, (int)v3, 1); +} +// 4FE2E0: using guessed type int var_D[3]; + +//----- (004FE310) -------------------------------------------------------- +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *a1, char a2) +{ + int v3[4]; // [esp+1Ch] [ebp-10h] BYREF + + LOBYTE(v3[0]) = a2; + return std::__ostream_insert>(a1, (int)v3, 1); +} +// 4FE310: using guessed type int var_10[4]; + +//----- (004FE340) -------------------------------------------------------- +std::ostream::sentry *__cdecl std::operator<<>(std::ostream::sentry *a1, char a2) +{ + int v3[3]; // [esp+1Fh] [ebp-Dh] BYREF + + LOBYTE(v3[0]) = a2; + return std::__ostream_insert>(a1, (int)v3, 1); +} +// 4FE340: using guessed type int var_D[3]; + +//----- (004FE370) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) |= a2; + return result; +} + +//----- (004FE390) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 4) = a2; + return result; +} + +//----- (004FE3B0) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) &= ~a2; + return result; +} + +//----- (004FE3D0) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 8) = a2; + return result; +} + +//----- (004FE3F0) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, int a2) +{ + int v2; // ecx + + v2 = 64; + if ( a2 != 8 ) + { + v2 = 2; + if ( a2 != 10 ) + v2 = 8 * (a2 == 16); + } + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) = v2 | *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) & 0xFFFFFFB5; + return a1; +} + +//----- (004FE430) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, char a2) +{ + char *v2; // esi + _BYTE *v4; // edi + int (__stdcall *v5)(unsigned __int8); // eax + + v2 = (char *)a1 + *(_DWORD *)(*a1 - 12); + if ( !v2[117] ) + { + v4 = (_BYTE *)*((_DWORD *)v2 + 31); + if ( !v4 ) + std::__throw_bad_cast(); + if ( !v4[28] ) + { + std::ctype::_M_widen_init(*((_DWORD *)v2 + 31)); + v5 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v4 + 24); + if ( v5 != std::ctype::do_widen ) + ((void (__thiscall *)(_BYTE *, int))v5)(v4, 32); + } + v2[117] = 1; + } + v2[116] = a2; + return a1; +} + +//----- (004FE4A0) -------------------------------------------------------- +std::ostream::sentry *__cdecl std::operator<<(std::ostream::sentry *a1, int *a2) +{ + return std::__ostream_insert>(a1, *a2, a2[1]); +} + +//----- (004FE4D0) -------------------------------------------------------- +int *__cdecl std::operator<<>(int *a1, wchar_t *String) +{ + int v2; // eax + + if ( String ) + { + v2 = wcslen(String); + std::__ostream_insert>(a1, (int)String, v2); + } + else + { + std::wios::clear((int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 1); + } + return a1; +} + +//----- (004FE530) -------------------------------------------------------- +int *__cdecl std::operator<<>(int *a1, char *Str) +{ + size_t v2; // eax + int v3; // ecx + __int16 v4; // ax + int v6; // [esp+18h] [ebp-60h] + _WORD *Block; // [esp+1Ch] [ebp-5Ch] + _WORD *v8; // [esp+24h] [ebp-54h] + char *lpuexcpt; // [esp+28h] [ebp-50h] + + if ( Str ) + { + v2 = strlen(Str); + if ( v2 > 0x3FFFFFFE ) + __cxa_throw_bad_array_new_length(); + v6 = v2; + Block = (_WORD *)operator new[](2 * v2); + v8 = Block; + lpuexcpt = Str; + if ( v6 ) + { + do + { + v3 = *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 124); + if ( !v3 ) + std::__throw_bad_cast(); + v4 = (*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)v3 + 40))(v3, *lpuexcpt++); + *v8++ = v4; + } + while ( &Str[v6] != lpuexcpt ); + } + std::__ostream_insert>(a1, (int)Block, v6); + operator delete[](Block); + } + else + { + std::wios::clear((int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 1); + } + return a1; +} + +//----- (004FE760) -------------------------------------------------------- +int *__cdecl std::operator<<>(int *a1, __int16 a2) +{ + __int16 v3[8]; // [esp+1Ch] [ebp-10h] BYREF + + v3[0] = a2; + return std::__ostream_insert>(a1, (int)v3, 1); +} +// 4FE760: using guessed type __int16 var_10[8]; + +//----- (004FE790) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) |= a2; + return result; +} + +//----- (004FE7B0) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 4) = a2; + return result; +} + +//----- (004FE7D0) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) &= ~a2; + return result; +} + +//----- (004FE7F0) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 8) = a2; + return result; +} + +//----- (004FE810) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, int a2) +{ + int v2; // ecx + + v2 = 64; + if ( a2 != 8 ) + { + v2 = 2; + if ( a2 != 10 ) + v2 = 8 * (a2 == 16); + } + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) = v2 | *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) & 0xFFFFFFB5; + return a1; +} + +//----- (004FE850) -------------------------------------------------------- +_DWORD *__cdecl std::operator<<>(_DWORD *a1, __int16 a2) +{ + char *v2; // esi + int v4; // ecx + + v2 = (char *)a1 + *(_DWORD *)(*a1 - 12); + if ( !v2[118] ) + { + v4 = *((_DWORD *)v2 + 31); + if ( !v4 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, int))(*(_DWORD *)v4 + 40))(v4, 32); + v2[118] = 1; + } + *((_WORD *)v2 + 58) = a2; + return a1; +} + +//----- (004FE8B0) -------------------------------------------------------- +int *__cdecl std::operator<<>(int *a1, char a2) +{ + int v2; // ecx + __int16 v4[7]; // [esp+22h] [ebp-Eh] BYREF + + v2 = *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 124); + if ( !v2 ) + std::__throw_bad_cast(); + v4[0] = (*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)v2 + 40))(v2, a2); + return std::__ostream_insert>(a1, (int)v4, 1); +} +// 4FE8B0: using guessed type __int16 var_E[7]; + +//----- (004FE900) -------------------------------------------------------- +unsigned int __cdecl std::operator<(int a1, int a2) +{ + return (unsigned int)std::string::compare(a1, a2) >> 31; +} + +//----- (004FE91C) -------------------------------------------------------- +int __cdecl std::operator+(int a1, char *Str, int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-40h] + + lpuexcpt = (struct _Unwind_Exception *)strlen(Str); + *(_DWORD *)(a1 + 4) = 0; + *(_BYTE *)(a1 + 8) = 0; + *(_DWORD *)a1 = a1 + 8; + std::string::reserve((_DWORD *)a1, (unsigned int)lpuexcpt + *(_DWORD *)(a3 + 4)); + if ( (unsigned int)lpuexcpt > 0x3FFFFFFF - *(_DWORD *)(a1 + 4) ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append((_DWORD *)a1, Str, (size_t)lpuexcpt); + std::string::append((_DWORD *)a1, a3); + return a1; +} + +//----- (004FEA10) -------------------------------------------------------- +_DWORD *__cdecl std::operator+(_DWORD *a1, int a2, int a3) +{ + size_t v3; // edx + size_t v4; // ecx + _BYTE *v5; // esi + _DWORD *v6; // eax + unsigned int v7; // ebx + _BYTE *v8; // eax + int v10; // [esp+8h] [ebp-60h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + + *a1 = a1 + 2; + LOBYTE(v10) = 0; + std::string::_M_construct(a1, *(_BYTE **)a2, *(_DWORD *)a2 + *(_DWORD *)(a2 + 4), v10); + v3 = *(_DWORD *)(a3 + 4); + v4 = a1[1]; + v5 = *(_BYTE **)a3; + lpuexcpt = (struct _Unwind_Exception *)(v3 + v4); + v6 = (_DWORD *)*a1; + if ( (_DWORD *)*a1 == a1 + 2 ) + v7 = 15; + else + v7 = a1[2]; + if ( (unsigned int)lpuexcpt > v7 ) + { + std::string::_M_mutate((int)a1, v4, 0, v5, v3); + v6 = (_DWORD *)*a1; + } + else if ( v3 ) + { + v8 = (char *)v6 + v4; + if ( v3 == 1 ) + *v8 = *v5; + else + memcpy(v8, v5, v3); + v6 = (_DWORD *)*a1; + } + a1[1] = lpuexcpt; + *((_BYTE *)lpuexcpt + (_DWORD)v6) = 0; + return a1; +} +// 4FEA6D: variable 'v10' is possibly undefined + +//----- (004FEB60) -------------------------------------------------------- +int __cdecl std::operator+(int a1, char a2, int a3) +{ + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + *(_BYTE *)(a1 + 8) = 0; + std::string::reserve((_DWORD *)a1, *(_DWORD *)(a3 + 4) + 1); + std::string::_M_replace_aux((_DWORD *)a1, *(_DWORD *)(a1 + 4), 0, 1u, a2); + std::string::_M_append((_DWORD *)a1, *(_BYTE **)a3, *(_DWORD *)(a3 + 4)); + return a1; +} + +//----- (004FEC50) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +int *__cdecl std::operator+(int *a1, char *Str, std::string *a3) +{ + _DWORD *v3; // eax + unsigned int v5; // [esp+0h] [ebp-68h] + const std::string *v6; // [esp+0h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + unsigned int v8; // [esp+5Fh] [ebp-9h] BYREF + + lpuexcpt = (struct _Unwind_Exception *)strlen(Str); + v3 = std::string::_Rep::_S_create(0, 0); + v3[2] = 0; + v3 += 3; + *(v3 - 3) = 0; + *(_BYTE *)v3 = 0; + *a1 = (int)v3; + std::string::reserve(a1, (struct _Unwind_Exception *)((char *)lpuexcpt + *(_DWORD *)(*(_DWORD *)a3 - 12)), v5); + std::string::append((unsigned int *)a1, (std::string *)Str, (size_t)lpuexcpt, (unsigned int)&v8); + std::string::append(a1, a3, v6); + return a1; +} +// 4FED37: positive sp value 4 has been found +// 4FECDD: variable 'v5' is possibly undefined +// 4FED06: variable 'v6' is possibly undefined + +//----- (004FED50) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +int *__cdecl std::operator+(int *a1, _DWORD *a2, std::string *a3) +{ + _DWORD *v3; // eax + const std::string *v5; // [esp+0h] [ebp-68h] + int v6; // [esp+5Fh] [ebp-9h] BYREF + + v3 = (_DWORD *)*a2; + if ( *(int *)(*a2 - 4) < 0 ) + { + v3 = std::string::_Rep::_M_clone((int)(v3 - 3), (int)&v6, 0); + } + else if ( _CRT_MT ) + { + _InterlockedAdd(v3 - 1, 1u); + } + else + { + ++*(v3 - 1); + } + *a1 = (int)v3; + std::string::append(a1, a3, v5); + return a1; +} +// 4FEE1A: positive sp value 4 has been found +// 4FEDAB: variable 'v5' is possibly undefined +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004FEE30) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +int *__cdecl std::operator+(int *a1, char a2, std::string *a3) +{ + _DWORD *v3; // eax + unsigned int v5; // [esp+0h] [ebp-68h] + const std::string *v6; // [esp+0h] [ebp-68h] + char v7[4]; // [esp+5Fh] [ebp-9h] BYREF + + v3 = std::string::_Rep::_S_create(0, 0); + v3[2] = 0; + v3 += 3; + *(v3 - 3) = 0; + *(_BYTE *)v3 = 0; + *a1 = (int)v3; + std::string::reserve(a1, (std::string *)(*(_DWORD *)(*(_DWORD *)a3 - 12) + 1), v5); + std::string::append(a1, 1u, a2, (char)v7); + std::string::append(a1, a3, v6); + return a1; +} +// 4FEF0E: positive sp value 4 has been found +// 4FEEB2: variable 'v5' is possibly undefined +// 4FEEDD: variable 'v6' is possibly undefined + +//----- (004FEF30) -------------------------------------------------------- +int __cdecl std::operator+(int a1, wchar_t *String, int a3) +{ + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-40h] + + lpuexcpt = (struct _Unwind_Exception *)wcslen(String); + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + *(_WORD *)(a1 + 8) = 0; + std::wstring::reserve(a1, (unsigned int)lpuexcpt + *(_DWORD *)(a3 + 4)); + if ( (unsigned int)lpuexcpt > 0x1FFFFFFF - *(_DWORD *)(a1 + 4) ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::wstring::_M_append((_DWORD *)a1, String, (int)lpuexcpt); + std::wstring::_M_append((_DWORD *)a1, *(_WORD **)a3, *(_DWORD *)(a3 + 4)); + return a1; +} + +//----- (004FF030) -------------------------------------------------------- +_DWORD *__cdecl std::operator+(_DWORD *a1, int a2, int a3) +{ + int v4; // [esp+8h] [ebp-50h] + + *a1 = a1 + 2; + LOBYTE(v4) = 0; + std::wstring::_M_construct(a1, *(_WORD **)a2, *(_DWORD *)a2 + 2 * *(_DWORD *)(a2 + 4), v4); + std::wstring::_M_append(a1, *(_WORD **)a3, *(_DWORD *)(a3 + 4)); + return a1; +} +// 4FF08B: variable 'v4' is possibly undefined + +//----- (004FF100) -------------------------------------------------------- +int __cdecl std::operator+(int a1, __int16 a2, int a3) +{ + *(_DWORD *)(a1 + 4) = 0; + *(_DWORD *)a1 = a1 + 8; + *(_WORD *)(a1 + 8) = 0; + std::wstring::reserve(a1, *(_DWORD *)(a3 + 4) + 1); + std::wstring::_M_replace_aux((_DWORD *)a1, *(_DWORD *)(a1 + 4), 0, 1u, a2); + std::wstring::_M_append((_DWORD *)a1, *(_WORD **)a3, *(_DWORD *)(a3 + 4)); + return a1; +} + +//----- (004FF1F0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +int *__cdecl std::operator+(int *a1, wchar_t *String, _DWORD *a3) +{ + _DWORD *v3; // eax + struct _Unwind_Exception *lpuexcpt; // [esp+18h] [ebp-50h] + + lpuexcpt = (struct _Unwind_Exception *)wcslen(String); + v3 = std::wstring::_Rep::_S_create(0, 0); + *((_WORD *)v3 + 6) = 0; + v3 += 3; + *(v3 - 1) = 0; + *(v3 - 3) = 0; + *a1 = (int)v3; + std::wstring::reserve(a1, (unsigned int)lpuexcpt + *(_DWORD *)(*a3 - 12)); + std::wstring::append((unsigned int *)a1, (char *)String, (unsigned int)lpuexcpt); + std::wstring::append(a1, a3); + return a1; +} +// 4FF2DA: positive sp value 4 has been found + +//----- (004FF2F0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +int *__cdecl std::operator+(int *a1, _DWORD *a2, _DWORD *a3) +{ + _DWORD *v3; // eax + int v5; // [esp+5Fh] [ebp-9h] BYREF + + v3 = (_DWORD *)*a2; + if ( *(int *)(*a2 - 4) < 0 ) + { + v3 = std::wstring::_Rep::_M_clone(v3 - 3, (int)&v5, 0); + } + else if ( _CRT_MT ) + { + _InterlockedAdd(v3 - 1, 1u); + } + else + { + ++*(v3 - 1); + } + *a1 = (int)v3; + std::wstring::append(a1, a3); + return a1; +} +// 4FF3BA: positive sp value 4 has been found +// 50B0F0: using guessed type int _CRT_MT; + +//----- (004FF3D0) -------------------------------------------------------- +// positive sp value has been detected, the output may be wrong! +int *__cdecl std::operator+(int *a1, __int16 a2, _DWORD *a3) +{ + _DWORD *v3; // eax + + v3 = std::wstring::_Rep::_S_create(0, 0); + *((_WORD *)v3 + 6) = 0; + v3 += 3; + *(v3 - 1) = 0; + *(v3 - 3) = 0; + *a1 = (int)v3; + std::wstring::reserve(a1, *(_DWORD *)(*a3 - 12) + 1); + std::wstring::append(a1, 1u, a2); + std::wstring::append(a1, a3); + return a1; +} +// 4FF4B1: positive sp value 4 has been found + +//----- (004FF510) -------------------------------------------------------- +std::istream::sentry *__cdecl std::operator>>>(std::istream::sentry *a1, char *a2) +{ + int v2; // edx + char *v3; // eax + _BYTE *v4; // eax + int v5; // ecx + unsigned int v6; // esi + char *v7; // ebx + int v8; // edx + unsigned int v9; // edx + int v11; // edx + int v12; // eax + unsigned int v13; // eax + unsigned int v14; // edx + const std::locale *v15; // [esp+4h] [ebp-84h] + bool v16; // [esp+8h] [ebp-80h] + int v17; // [esp+10h] [ebp-78h] + _DWORD *v18; // [esp+14h] [ebp-74h] + int v19; // [esp+18h] [ebp-70h] + int v20; // [esp+1Ch] [ebp-6Ch] + char *Sizea; // [esp+20h] [ebp-68h] + size_t Size; // [esp+20h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+24h] [ebp-64h] + int v24; // [esp+28h] [ebp-60h] + char v25; // [esp+6Bh] [ebp-1Dh] BYREF + _DWORD *v26[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v25, a1, 0, v16); + if ( !v25 ) + { + v11 = *(_DWORD *)a1; + v12 = 4; + goto LABEL_23; + } + v2 = 0x7FFFFFFF; + v3 = (char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12); + if ( *((int *)v3 + 2) > 0 ) + v2 = *((_DWORD *)v3 + 2); + v19 = v2; + std::locale::locale((volatile signed __int32 **)v26, (volatile signed __int32 **)v3 + 27, v15); + v18 = std::use_facet>((int)v26); + std::locale::~locale(v26); + lpuexcpt = *(struct _Unwind_Exception **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v4 = (_BYTE *)*((_DWORD *)lpuexcpt + 2); + if ( (unsigned int)v4 >= *((_DWORD *)lpuexcpt + 3) ) + { + v4 = (_BYTE *)(*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + v17 = v19 - 1; + if ( v19 == 1 ) + { + if ( v4 != (_BYTE *)-1 ) + goto LABEL_43; + } + else if ( v4 != (_BYTE *)-1 ) + { + goto LABEL_6; + } + *a2 = 0; + v11 = *(_DWORD *)a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 8) = 0; + v12 = 6; + goto LABEL_23; + } + LOBYTE(v4) = *v4; + v17 = v19 - 1; + if ( v19 == 1 ) + { +LABEL_43: + *a2 = 0; + v11 = *(_DWORD *)a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 8) = 0; + v12 = 4; + goto LABEL_23; + } +LABEL_6: + v24 = 0; + while ( 1 ) + { + v5 = v18[6]; + if ( (*(_BYTE *)(v5 + 2 * (unsigned __int8)v4) & 0x20) != 0 ) + break; + v6 = *((_DWORD *)lpuexcpt + 3); + v7 = (char *)*((_DWORD *)lpuexcpt + 2); + v8 = v19 - v24 - 1; + if ( v8 > (int)(v6 - (_DWORD)v7) ) + v8 = *((_DWORD *)lpuexcpt + 3) - (_DWORD)v7; + if ( v8 <= 1 ) + { + ++v24; + *a2 = (char)v4; + Sizea = a2 + 1; + v13 = *((_DWORD *)lpuexcpt + 2); + v14 = *((_DWORD *)lpuexcpt + 3); + if ( v13 >= v14 ) + { + if ( (*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 40))(lpuexcpt) == -1 ) + goto LABEL_35; + v4 = (_BYTE *)*((_DWORD *)lpuexcpt + 2); + v14 = *((_DWORD *)lpuexcpt + 3); + } + else + { + v4 = (_BYTE *)(v13 + 1); + *((_DWORD *)lpuexcpt + 2) = v4; + } + if ( (unsigned int)v4 < v14 ) + { + LOBYTE(v4) = *v4; + ++a2; + goto LABEL_19; + } + v4 = (_BYTE *)(*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + ++a2; +LABEL_31: + if ( v24 >= v17 ) + { + if ( v4 != (_BYTE *)-1 ) + { +LABEL_20: + *a2 = 0; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 8) = 0; + return a1; + } + *a2 = 0; + v11 = *(_DWORD *)a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 8) = 0; + v12 = 2; + goto LABEL_23; + } + if ( v4 == (_BYTE *)-1 ) + { + Sizea = a2; +LABEL_35: + *Sizea = 0; + v11 = *(_DWORD *)a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 8) = 0; + v12 = v24 == 0 ? 6 : 2; + goto LABEL_23; + } + } + else + { + v9 = (unsigned int)&v7[v8]; + v4 = v7 + 1; + if ( v9 <= (unsigned int)(v7 + 1) ) + { + v20 = 1; + Size = 1; +LABEL_28: + memcpy(a2, v7, Size); + v6 = *((_DWORD *)lpuexcpt + 3); + v4 = (_BYTE *)(*((_DWORD *)lpuexcpt + 2) + Size); + goto LABEL_17; + } + do + { + if ( (*(_BYTE *)(v5 + 2 * (unsigned __int8)*v4) & 0x20) != 0 ) + { + v20 = v4 - v7; + Size = v4 - v7; + goto LABEL_16; + } + ++v4; + } + while ( v9 > (unsigned int)v4 ); + v20 = v4 - v7; + Size = v4 - v7; +LABEL_16: + if ( v20 ) + goto LABEL_28; +LABEL_17: + a2 += Size; + *((_DWORD *)lpuexcpt + 2) = v4; + v24 += v20; + if ( (unsigned int)v4 >= v6 ) + { + v4 = (_BYTE *)(*(int (__fastcall **)(struct _Unwind_Exception *))(*(_DWORD *)lpuexcpt + 36))(lpuexcpt); + goto LABEL_31; + } + LOBYTE(v4) = *v4; +LABEL_19: + if ( v24 >= v17 ) + goto LABEL_20; + } + } + *a2 = 0; + v11 = *(_DWORD *)a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 8) = 0; + if ( v24 ) + return a1; + v12 = 4; +LABEL_23: + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(v11 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(v11 - 12) + 20) | v12); + return a1; +} +// 4FF557: variable 'v16' is possibly undefined +// 4FF58F: variable 'v15' is possibly undefined + +//----- (004FF9E0) -------------------------------------------------------- +std::istream::sentry *__cdecl std::operator>>>(std::istream::sentry *a1, _BYTE *a2) +{ + _DWORD *v3; // ecx + char *v4; // eax + char v5; // dl + int v6; // eax + bool v7; // [esp+8h] [ebp-70h] + char v8[25]; // [esp+5Fh] [ebp-19h] BYREF + + std::istream::sentry::sentry(v8, a1, 0, v7); + if ( v8[0] ) + { + v3 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v4 = (char *)v3[2]; + if ( (unsigned int)v4 >= v3[3] ) + { + v6 = (*(int (__fastcall **)(_DWORD *))(*v3 + 40))(v3); + if ( v6 == -1 ) + { + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 20) | 6); + return a1; + } + v5 = v6; + } + else + { + v5 = *v4; + v3[2] = v4 + 1; + } + *a2 = v5; + } + return a1; +} +// 4FFA27: variable 'v7' is possibly undefined +// 4FF9E0: using guessed type char var_19[25]; + +//----- (004FFB80) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) |= a2; + return result; +} + +//----- (004FFBA0) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 4) = a2; + return result; +} + +//----- (004FFBC0) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) &= ~a2; + return result; +} + +//----- (004FFBE0) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 8) = a2; + return result; +} + +//----- (004FFC00) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, int a2) +{ + int v2; // ecx + + v2 = 64; + if ( a2 != 8 ) + { + v2 = 2; + if ( a2 != 10 ) + v2 = 8 * (a2 == 16); + } + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) = v2 | *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) & 0xFFFFFFB5; + return a1; +} + +//----- (004FFC40) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, char a2) +{ + char *v2; // esi + _BYTE *v4; // edi + int (__stdcall *v5)(unsigned __int8); // eax + + v2 = (char *)a1 + *(_DWORD *)(*a1 - 12); + if ( !v2[117] ) + { + v4 = (_BYTE *)*((_DWORD *)v2 + 31); + if ( !v4 ) + std::__throw_bad_cast(); + if ( !v4[28] ) + { + std::ctype::_M_widen_init(*((_DWORD *)v2 + 31)); + v5 = *(int (__stdcall **)(unsigned __int8))(*(_DWORD *)v4 + 24); + if ( v5 != std::ctype::do_widen ) + ((void (__thiscall *)(_BYTE *, int))v5)(v4, 32); + } + v2[117] = 1; + } + v2[116] = a2; + return a1; +} + +//----- (004FFCB0) -------------------------------------------------------- +std::istream::sentry *__cdecl std::operator>>(std::istream::sentry *a1, _DWORD *a2) +{ + int v2; // edx + int v3; // eax + int v5; // edx + char *v6; // eax + unsigned __int8 *v7; // eax + int v8; // ebx + _BYTE *v9; // esi + int v10; // edx + unsigned int v11; // edx + unsigned __int8 *v12; // eax + unsigned __int8 *v13; // eax + int v14; // eax + _BYTE *v15; // eax + unsigned int v16; // edx + unsigned int v17; // eax + unsigned int v18; // edx + const std::locale *v19; // [esp+4h] [ebp-94h] + bool v20; // [esp+8h] [ebp-90h] + _DWORD *v21; // [esp+20h] [ebp-78h] + char *v22; // [esp+24h] [ebp-74h] + unsigned int v23; // [esp+28h] [ebp-70h] + _DWORD *v24; // [esp+2Ch] [ebp-6Ch] + size_t v25; // [esp+30h] [ebp-68h] + unsigned int v26; // [esp+30h] [ebp-68h] + struct _Unwind_Exception *lpuexcpt; // [esp+34h] [ebp-64h] + unsigned int v28; // [esp+38h] [ebp-60h] + char v29; // [esp+7Bh] [ebp-1Dh] BYREF + _DWORD *v30[7]; // [esp+7Ch] [ebp-1Ch] BYREF + + std::istream::sentry::sentry(&v29, a1, 0, v20); + if ( !v29 ) + { + v2 = *(_DWORD *)a1; + v3 = 4; + goto LABEL_3; + } + v5 = 0x3FFFFFFF; + a2[1] = 0; + *(_BYTE *)*a2 = 0; + v6 = (char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12); + if ( *((int *)v6 + 2) > 0 ) + v5 = *((_DWORD *)v6 + 2); + v23 = v5; + std::locale::locale((volatile signed __int32 **)v30, (volatile signed __int32 **)v6 + 27, v19); + v21 = std::use_facet>((int)v30); + std::locale::~locale(v30); + v24 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 120); + v7 = (unsigned __int8 *)v24[2]; + if ( (unsigned int)v7 >= v24[3] ) + v25 = (*(int (__fastcall **)(_DWORD *))(*v24 + 36))(v24); + else + v25 = *v7; + v28 = 0; + while ( 1 ) + { + if ( v25 == -1 ) + { + v2 = *(_DWORD *)a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 8) = 0; + v3 = v28 == 0 ? 6 : 2; + goto LABEL_3; + } + v8 = v21[6]; + if ( (*(_BYTE *)(v8 + 2 * (unsigned __int8)v25) & 0x20) != 0 ) + break; + v9 = (_BYTE *)v24[2]; + v10 = v24[3] - (_DWORD)v9; + if ( v10 > (int)(v23 - v28) ) + v10 = v23 - v28; + lpuexcpt = (struct _Unwind_Exception *)a2[1]; + if ( v10 <= 1 ) + { + v22 = (char *)lpuexcpt + 1; + v15 = (_BYTE *)*a2; + if ( (_DWORD *)*a2 == a2 + 2 ) + v16 = 15; + else + v16 = a2[2]; + if ( (unsigned int)v22 > v16 ) + { + std::string::_M_mutate((int)a2, (size_t)lpuexcpt, 0, 0, 1u); + v15 = (_BYTE *)*a2; + } + *((_BYTE *)lpuexcpt + (_DWORD)v15) = v25; + ++v28; + a2[1] = v22; + *((_BYTE *)lpuexcpt + *a2 + 1) = 0; + v17 = v24[2]; + v18 = v24[3]; + if ( v17 >= v18 ) + { + if ( (*(int (__fastcall **)(_DWORD *))(*v24 + 40))(v24) == -1 ) + { + v2 = *(_DWORD *)a1; +LABEL_37: + *(_DWORD *)((char *)a1 + *(_DWORD *)(v2 - 12) + 8) = 0; + v3 = 2; + goto LABEL_3; + } + v13 = (unsigned __int8 *)v24[2]; + v18 = v24[3]; + } + else + { + v13 = (unsigned __int8 *)(v17 + 1); + v24[2] = v13; + } + if ( (unsigned int)v13 >= v18 ) + { +LABEL_33: + v14 = (*(int (__fastcall **)(_DWORD *))(*v24 + 36))(v24); + goto LABEL_23; + } + } + else + { + v11 = (unsigned int)&v9[v10]; + v12 = v9 + 1; + if ( v11 > (unsigned int)(v9 + 1) ) + { + do + { + if ( (*(_BYTE *)(v8 + 2 * *v12) & 0x20) != 0 ) + break; + ++v12; + } + while ( v11 > (unsigned int)v12 ); + v26 = v12 - v9; + } + else + { + v26 = 1; + } + if ( 0x3FFFFFFF - (int)lpuexcpt < v26 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(a2, v9, v26); + v28 += v26; + v13 = (unsigned __int8 *)(v26 + v24[2]); + v24[2] = v13; + if ( (unsigned int)v13 >= v24[3] ) + goto LABEL_33; + } + v14 = *v13; +LABEL_23: + v25 = v14; + if ( v23 <= v28 ) + { + v2 = *(_DWORD *)a1; + if ( v14 != -1 ) + { + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 8) = 0; + return a1; + } + goto LABEL_37; + } + } + v2 = *(_DWORD *)a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*(_DWORD *)a1 - 12) + 8) = 0; + if ( v28 ) + return a1; + v3 = 4; +LABEL_3: + std::ios::clear( + (std::istream::sentry *)((char *)a1 + *(_DWORD *)(v2 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(v2 - 12) + 20) | v3); + return a1; +} +// 4FFCFA: variable 'v20' is possibly undefined +// 4FFD7D: variable 'v19' is possibly undefined + +//----- (00500150) -------------------------------------------------------- +int *__cdecl std::operator>>>(int *a1, _WORD *a2) +{ + int v2; // eax + int v3; // esi + volatile signed __int32 **v4; // eax + int v5; // edx + unsigned __int16 *v6; // eax + unsigned __int16 v7; // ax + __int16 v8; // dx + unsigned __int16 *v9; // eax + __int16 *v10; // eax + int v11; // edx + char *v12; // edx + char *v14; // edx + char *v15; // edx + const std::locale *v16; // [esp+4h] [ebp-84h] + int v17; // [esp+18h] [ebp-70h] + _WORD *v18; // [esp+18h] [ebp-70h] + void *v19; // [esp+1Ch] [ebp-6Ch] + int v20; // [esp+20h] [ebp-68h] + _DWORD *v21; // [esp+24h] [ebp-64h] + unsigned __int16 lpuexcpt; // [esp+28h] [ebp-60h] + char v23; // [esp+6Bh] [ebp-1Dh] BYREF + _DWORD *v24[7]; // [esp+6Ch] [ebp-1Ch] BYREF + + std::wistream::sentry::sentry(&v23, a1, 0); + v2 = *a1; + if ( !v23 ) + { +LABEL_18: + v11 = 4; + goto LABEL_19; + } + v3 = *(int *)((char *)a1 + *(_DWORD *)(v2 - 12) + 8); + v4 = (volatile signed __int32 **)((char *)a1 + *(_DWORD *)(v2 - 12)); + v5 = 0x7FFFFFFF; + if ( v3 > 0 ) + v5 = v3; + v17 = v5; + std::locale::locale((volatile signed __int32 **)v24, v4 + 27, v16); + v19 = std::use_facet>((int)v24); + std::locale::~locale(v24); + v21 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + v6 = (unsigned __int16 *)v21[2]; + if ( (unsigned int)v6 >= v21[3] ) + v7 = (*(int (__fastcall **)(_DWORD *))(*v21 + 36))(v21); + else + v7 = *v6; + lpuexcpt = v7; + if ( v17 == 1 ) + { + v2 = *a1; + v15 = (char *)a1 + *(_DWORD *)(*a1 - 12); + *a2 = 0; + *((_DWORD *)v15 + 2) = 0; + if ( lpuexcpt == 0xFFFF ) + { + v11 = 6; + goto LABEL_19; + } + goto LABEL_18; + } + if ( v7 == 0xFFFF ) + { + *a2 = 0; + v2 = *a1; + *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 8) = 0; + v11 = 6; + goto LABEL_19; + } + v20 = 0; + v18 = &a2[v17 - 1]; + while ( 1 ) + { + if ( (*(unsigned __int8 (__thiscall **)(void *, int, _DWORD))(*(_DWORD *)v19 + 8))(v19, 32, lpuexcpt) ) + { + v2 = *a1; + v12 = (char *)a1 + *(_DWORD *)(*a1 - 12); + *a2 = 0; + *((_DWORD *)v12 + 2) = 0; + if ( v20 ) + return a1; + goto LABEL_18; + } + ++a2; + ++v20; + *(a2 - 1) = lpuexcpt; + v10 = (__int16 *)v21[2]; + if ( (unsigned int)v10 < v21[3] ) + { + v8 = *v10; + v21[2] = v10 + 1; + if ( v8 == -1 ) + goto LABEL_16; + } + else if ( (*(unsigned __int16 (__fastcall **)(_DWORD *))(*v21 + 40))(v21) == 0xFFFF ) + { +LABEL_16: + *a2 = 0; + v2 = *a1; + *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 8) = 0; + v11 = 2; + goto LABEL_19; + } + v9 = (unsigned __int16 *)v21[2]; + if ( (unsigned int)v9 < v21[3] ) + { + lpuexcpt = *v9; + if ( a2 == v18 ) + break; + goto LABEL_12; + } + lpuexcpt = (*(int (__fastcall **)(_DWORD *))(*v21 + 36))(v21); + if ( a2 == v18 ) + break; +LABEL_12: + if ( lpuexcpt == 0xFFFF ) + goto LABEL_16; + } + v2 = *a1; + v14 = (char *)a1 + *(_DWORD *)(*a1 - 12); + if ( lpuexcpt != 0xFFFF ) + { + *a2 = 0; + *((_DWORD *)v14 + 2) = 0; + return a1; + } + *a2 = 0; + *((_DWORD *)v14 + 2) = 0; + v11 = 2; +LABEL_19: + std::wios::clear((int *)((char *)a1 + *(_DWORD *)(v2 - 12)), *(int *)((char *)a1 + *(_DWORD *)(v2 - 12) + 20) | v11); + return a1; +} +// 5001CF: variable 'v16' is possibly undefined + +//----- (00500550) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, _WORD *a2) +{ + _DWORD *v3; // ecx + __int16 *v4; // eax + __int16 v5; // dx + char v6[25]; // [esp+5Fh] [ebp-19h] BYREF + + std::wistream::sentry::sentry(v6, a1, 0); + if ( v6[0] ) + { + v3 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120); + v4 = (__int16 *)v3[2]; + if ( (unsigned int)v4 >= v3[3] ) + { + v5 = (*(int (__fastcall **)(_DWORD *))(*v3 + 40))(v3); + } + else + { + v5 = *v4; + v3[2] = v4 + 1; + } + if ( v5 == -1 ) + std::wios::clear( + (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)), + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 6); + else + *a2 = v5; + } + return a1; +} +// 500550: using guessed type char var_19[25]; + +//----- (005006F0) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) |= a2; + return result; +} + +//----- (00500710) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 4) = a2; + return result; +} + +//----- (00500730) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) &= ~a2; + return result; +} + +//----- (00500750) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, int a2) +{ + _DWORD *result; // eax + + result = a1; + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 8) = a2; + return result; +} + +//----- (00500770) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, int a2) +{ + int v2; // ecx + + v2 = 64; + if ( a2 != 8 ) + { + v2 = 2; + if ( a2 != 10 ) + v2 = 8 * (a2 == 16); + } + *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) = v2 | *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 12) & 0xFFFFFFB5; + return a1; +} + +//----- (005007B0) -------------------------------------------------------- +_DWORD *__cdecl std::operator>>>(_DWORD *a1, __int16 a2) +{ + char *v2; // esi + int v4; // ecx + + v2 = (char *)a1 + *(_DWORD *)(*a1 - 12); + if ( !v2[118] ) + { + v4 = *((_DWORD *)v2 + 31); + if ( !v4 ) + std::__throw_bad_cast(); + (*(void (__thiscall **)(int, int))(*(_DWORD *)v4 + 40))(v4, 32); + v2[118] = 1; + } + *((_WORD *)v2 + 58) = a2; + return a1; +} + +//----- (00500810) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::iostream::~iostream(int a1) +{ + _DWORD *v2; // ecx + + v2 = (_DWORD *)(a1 + 4); + *(v2 - 1) = &unk_515928; + *(v2 - 3) = &unk_515900; + *(v2 - 2) = 0; + *v2 = &off_51B7D0; + std::ios_base::~ios_base((int)v2); + operator delete((void *)(a1 - 8)); +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500850) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::iostream::~iostream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + *a1 = &unk_515928; + v1 = a1 + 1; + *(v1 - 3) = &unk_515900; + *(v1 - 2) = 0; + *v1 = &off_51B7D0; + std::ios_base::~ios_base((int)v1); +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500880) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::fstream::~fstream(int a1) +{ + void *Block; // [esp+18h] [ebp-54h] + + *(_DWORD *)(a1 - 8) = off_51AAD4; + *(_DWORD *)(a1 + 112) = off_51AAFC; + *(_DWORD *)a1 = off_51AAE8; + *(_DWORD *)(a1 + 4) = off_51AA50; + Block = (void *)(a1 - 8); + std::filebuf::close((struct _Unwind_Exception *)(a1 + 4)); + std::__basic_file::~__basic_file(a1 + 44); + *(_DWORD *)(a1 + 4) = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_5159B4; + *(_DWORD *)(a1 - 8) = &unk_51598C; + *(_DWORD *)(a1 - 4) = 0; + *(_DWORD *)(a1 + 112) = &off_51B7D0; + std::ios_base::~ios_base(a1 + 112); + operator delete(Block); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500980) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::fstream::~fstream(int a1) +{ + *(_DWORD *)(a1 - 8) = off_51AAD4; + *(_DWORD *)(a1 + 112) = off_51AAFC; + *(_DWORD *)a1 = off_51AAE8; + *(_DWORD *)(a1 + 4) = off_51AA50; + std::filebuf::close((struct _Unwind_Exception *)(a1 + 4)); + std::__basic_file::~__basic_file(a1 + 44); + *(_DWORD *)(a1 + 4) = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_5159B4; + *(_DWORD *)(a1 - 8) = &unk_51598C; + *(_DWORD *)(a1 - 4) = 0; + *(_DWORD *)(a1 + 112) = &off_51B7D0; + std::ios_base::~ios_base(a1 + 112); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500A60) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::wfstream::~wfstream(int a1) +{ + void *Block; // [esp+18h] [ebp-54h] + + *(_DWORD *)(a1 - 8) = off_51AB10; + *(_DWORD *)(a1 + 116) = off_51AB38; + *(_DWORD *)a1 = off_51AB24; + *(_DWORD *)(a1 + 4) = off_51AA90; + Block = (void *)(a1 - 8); + std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 4)); + std::__basic_file::~__basic_file(a1 + 44); + *(_DWORD *)(a1 + 4) = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_515A40; + *(_DWORD *)(a1 - 8) = &unk_5159DC; + *(_DWORD *)(a1 - 4) = 0; + *(_DWORD *)(a1 + 116) = &off_51B7E0; + std::ios_base::~ios_base(a1 + 116); + operator delete(Block); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00500B60) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::wfstream::~wfstream(int a1) +{ + *(_DWORD *)(a1 - 8) = off_51AB10; + *(_DWORD *)(a1 + 116) = off_51AB38; + *(_DWORD *)a1 = off_51AB24; + *(_DWORD *)(a1 + 4) = off_51AA90; + std::wfilebuf::close((struct _Unwind_Exception *)(a1 + 4)); + std::__basic_file::~__basic_file(a1 + 44); + *(_DWORD *)(a1 + 4) = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_515A40; + *(_DWORD *)(a1 - 8) = &unk_5159DC; + *(_DWORD *)(a1 - 4) = 0; + *(_DWORD *)(a1 + 116) = &off_51B7E0; + std::ios_base::~ios_base(a1 + 116); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00500C40) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::wiostream::~basic_iostream(int a1) +{ + _DWORD *v2; // ecx + + v2 = (_DWORD *)(a1 + 4); + *(v2 - 1) = &unk_515AE0; + *(v2 - 3) = &unk_515AB8; + *(v2 - 2) = 0; + *v2 = &off_51B7E0; + std::ios_base::~ios_base((int)v2); + operator delete((void *)(a1 - 8)); +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00500C80) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::wiostream::~basic_iostream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + *a1 = &unk_515AE0; + v1 = a1 + 1; + *(v1 - 3) = &unk_515AB8; + *(v1 - 2) = 0; + *v1 = &off_51B7E0; + std::ios_base::~ios_base((int)v1); +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00500CB0) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream( + int a1) +{ + void *v1; // esi + void *Block; // eax + + v1 = (void *)(a1 - 8); + Block = *(void **)(a1 + 40); + *(_DWORD *)(a1 - 8) = &off_51A504; + *(_DWORD *)(a1 + 64) = off_51A52C; + *(_DWORD *)a1 = off_51A518; + *(_DWORD *)(a1 + 4) = &off_51A2D8; + if ( Block != (void *)(a1 + 48) ) + operator delete(Block); + *(_DWORD *)(a1 + 4) = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_5157AC; + *(_DWORD *)(a1 - 8) = &unk_515784; + *(_DWORD *)(a1 - 4) = 0; + *(_DWORD *)(a1 + 64) = &off_51B7D0; + std::ios_base::~ios_base(a1 + 64); + operator delete(v1); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A504: using guessed type int (*off_51A504)(); +// 51A518: using guessed type int (*off_51A518[2])(); +// 51A52C: using guessed type int (*off_51A52C[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500D30) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream( + int a1) +{ + void *Block; // eax + + Block = *(void **)(a1 + 40); + *(_DWORD *)(a1 - 8) = &off_51A504; + *(_DWORD *)(a1 + 64) = off_51A52C; + *(_DWORD *)a1 = off_51A518; + *(_DWORD *)(a1 + 4) = &off_51A2D8; + if ( Block != (void *)(a1 + 48) ) + operator delete(Block); + *(_DWORD *)(a1 + 4) = &off_51ADD4; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_5157AC; + *(_DWORD *)(a1 - 8) = &unk_515784; + *(_DWORD *)(a1 - 4) = 0; + *(_DWORD *)(a1 + 64) = &off_51B7D0; + std::ios_base::~ios_base(a1 + 64); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A504: using guessed type int (*off_51A504)(); +// 51A518: using guessed type int (*off_51A518[2])(); +// 51A52C: using guessed type int (*off_51A52C[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500DA0) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream( + int a1) +{ + void *v1; // esi + void *Block; // eax + + v1 = (void *)(a1 - 8); + Block = *(void **)(a1 + 40); + *(_DWORD *)(a1 - 8) = &off_51A540; + *(_DWORD *)(a1 + 64) = off_51A568; + *(_DWORD *)a1 = off_51A554; + *(_DWORD *)(a1 + 4) = &off_51A318; + if ( Block != (void *)(a1 + 48) ) + operator delete(Block); + *(_DWORD *)(a1 + 4) = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_515838; + *(_DWORD *)(a1 - 8) = &unk_5157D4; + *(_DWORD *)(a1 - 4) = 0; + *(_DWORD *)(a1 + 64) = &off_51B7E0; + std::ios_base::~ios_base(a1 + 64); + operator delete(v1); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A540: using guessed type int (*off_51A540)(); +// 51A554: using guessed type int (*off_51A554[2])(); +// 51A568: using guessed type int (*off_51A568[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00500E20) -------------------------------------------------------- +void __fastcall `non-virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream( + int a1) +{ + void *Block; // eax + + Block = *(void **)(a1 + 40); + *(_DWORD *)(a1 - 8) = &off_51A540; + *(_DWORD *)(a1 + 64) = off_51A568; + *(_DWORD *)a1 = off_51A554; + *(_DWORD *)(a1 + 4) = &off_51A318; + if ( Block != (void *)(a1 + 48) ) + operator delete(Block); + *(_DWORD *)(a1 + 4) = &off_51AE14; + std::locale::~locale((_DWORD **)(a1 + 32)); + *(_DWORD *)a1 = &unk_515838; + *(_DWORD *)(a1 - 8) = &unk_5157D4; + *(_DWORD *)(a1 - 4) = 0; + *(_DWORD *)(a1 + 64) = &off_51B7E0; + std::ios_base::~ios_base(a1 + 64); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A540: using guessed type int (*off_51A540)(); +// 51A554: using guessed type int (*off_51A554[2])(); +// 51A568: using guessed type int (*off_51A568[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00500E90) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::iostream::~iostream(_DWORD *a1) +{ + _DWORD *Block; // ebx + + Block = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + Block[2] = &unk_515928; + *Block = &unk_515900; + Block[1] = 0; + Block[3] = &off_51B7D0; + std::ios_base::~ios_base((int)(Block + 3)); + operator delete(Block); +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500ED0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::iostream::~iostream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + v1[2] = &unk_515928; + v1 += 3; + *(v1 - 3) = &unk_515900; + *(v1 - 2) = 0; + *v1 = &off_51B7D0; + std::ios_base::~ios_base((int)v1); +} +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500F00) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::istream::~istream(_DWORD *a1) +{ + _DWORD *Block; // ebx + + Block = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *Block = &off_51A7F0; + Block[1] = 0; + Block[2] = &off_51B7D0; + std::ios_base::~ios_base((int)(Block + 2)); + operator delete(Block); +} +// 51A7F0: using guessed type void (__cdecl *off_51A7F0)(std::istream *__hidden this); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500F40) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::istream::~istream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = &off_51A7F0; + v1 += 2; + *(v1 - 1) = 0; + *v1 = &off_51B7D0; + std::ios_base::~ios_base((int)v1); +} +// 51A7F0: using guessed type void (__cdecl *off_51A7F0)(std::istream *__hidden this); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500F60) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::ostream::~ostream(_DWORD *a1) +{ + _DWORD *Block; // ebx + + Block = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *Block = &off_51A818; + Block[1] = &off_51B7D0; + std::ios_base::~ios_base((int)(Block + 1)); + operator delete(Block); +} +// 51A818: using guessed type void (__cdecl *off_51A818)(std::ostream *__hidden this); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500F90) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::ostream::~ostream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1++ = &off_51A818; + *v1 = &off_51B7D0; + std::ios_base::~ios_base((int)v1); +} +// 51A818: using guessed type void (__cdecl *off_51A818)(std::ostream *__hidden this); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00500FB0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::fstream::~fstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *Block; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51AAD4; + v1[30] = off_51AAFC; + v1[2] = off_51AAE8; + v1[3] = off_51AA50; + Block = v1; + std::filebuf::close((struct _Unwind_Exception *)(v1 + 3)); + std::__basic_file::~__basic_file((int)(Block + 13)); + Block[3] = &off_51ADD4; + std::locale::~locale((_DWORD **)Block + 10); + Block[2] = &unk_5159B4; + *Block = &unk_51598C; + Block[1] = 0; + Block[30] = &off_51B7D0; + std::ios_base::~ios_base((int)(Block + 30)); + operator delete(Block); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (005010B0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::fstream::~fstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *v2; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51AAD4; + v1[30] = off_51AAFC; + v1[2] = off_51AAE8; + v1[3] = off_51AA50; + v2 = v1; + std::filebuf::close((struct _Unwind_Exception *)(v1 + 3)); + std::__basic_file::~__basic_file((int)(v2 + 13)); + v2[3] = &off_51ADD4; + std::locale::~locale((_DWORD **)v2 + 10); + v2[2] = &unk_5159B4; + *v2 = &unk_51598C; + v2[1] = 0; + v2[30] = &off_51B7D0; + std::ios_base::~ios_base((int)(v2 + 30)); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51AAD4: using guessed type int (*off_51AAD4[2])(); +// 51AAE8: using guessed type int (*off_51AAE8[2])(); +// 51AAFC: using guessed type int (*off_51AAFC[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (005011A0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wfstream::~wfstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *Block; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51AB10; + v1[31] = off_51AB38; + v1[2] = off_51AB24; + v1[3] = off_51AA90; + Block = v1; + std::wfilebuf::close((struct _Unwind_Exception *)(v1 + 3)); + std::__basic_file::~__basic_file((int)(Block + 13)); + Block[3] = &off_51AE14; + std::locale::~locale((_DWORD **)Block + 10); + Block[2] = &unk_515A40; + *Block = &unk_5159DC; + Block[1] = 0; + Block[31] = &off_51B7E0; + std::ios_base::~ios_base((int)(Block + 31)); + operator delete(Block); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (005012A0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wfstream::~wfstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *v2; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51AB10; + v1[31] = off_51AB38; + v1[2] = off_51AB24; + v1[3] = off_51AA90; + v2 = v1; + std::wfilebuf::close((struct _Unwind_Exception *)(v1 + 3)); + std::__basic_file::~__basic_file((int)(v2 + 13)); + v2[3] = &off_51AE14; + std::locale::~locale((_DWORD **)v2 + 10); + v2[2] = &unk_515A40; + *v2 = &unk_5159DC; + v2[1] = 0; + v2[31] = &off_51B7E0; + std::ios_base::~ios_base((int)(v2 + 31)); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AB10: using guessed type int (*off_51AB10[2])(); +// 51AB24: using guessed type int (*off_51AB24[2])(); +// 51AB38: using guessed type int (*off_51AB38[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501390) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wistream::~wistream(_DWORD *a1) +{ + _DWORD *Block; // ebx + + Block = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *Block = &off_51AB4C; + Block[1] = 0; + Block[2] = &off_51B7E0; + std::ios_base::~ios_base((int)(Block + 2)); + operator delete(Block); +} +// 51AB4C: using guessed type int (*off_51AB4C)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (005013D0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wistream::~wistream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = &off_51AB4C; + v1 += 2; + *(v1 - 1) = 0; + *v1 = &off_51B7E0; + std::ios_base::~ios_base((int)v1); +} +// 51AB4C: using guessed type int (*off_51AB4C)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (005013F0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wostream::~wostream(_DWORD *a1) +{ + _DWORD *Block; // ebx + + Block = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *Block = &off_51AB74; + Block[1] = &off_51B7E0; + std::ios_base::~ios_base((int)(Block + 1)); + operator delete(Block); +} +// 51AB74: using guessed type int (*off_51AB74)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501420) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wostream::~wostream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1++ = &off_51AB74; + *v1 = &off_51B7E0; + std::ios_base::~ios_base((int)v1); +} +// 51AB74: using guessed type int (*off_51AB74)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501440) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::ifstream::~ifstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *Block; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51ABB0; + v1[29] = off_51ABC4; + v1[2] = off_51AA50; + Block = v1; + std::filebuf::close((struct _Unwind_Exception *)(v1 + 2)); + std::__basic_file::~__basic_file((int)(Block + 12)); + Block[2] = &off_51ADD4; + std::locale::~locale((_DWORD **)Block + 9); + *Block = &unk_515A68; + Block[1] = 0; + Block[29] = &off_51B7D0; + std::ios_base::~ios_base((int)(Block + 29)); + operator delete(Block); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ABB0: using guessed type int (*off_51ABB0[2])(); +// 51ABC4: using guessed type int (*off_51ABC4[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00501530) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::ifstream::~ifstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *v2; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51ABB0; + v1[29] = off_51ABC4; + v1[2] = off_51AA50; + v2 = v1; + std::filebuf::close((struct _Unwind_Exception *)(v1 + 2)); + std::__basic_file::~__basic_file((int)(v2 + 12)); + v2[2] = &off_51ADD4; + std::locale::~locale((_DWORD **)v2 + 9); + *v2 = &unk_515A68; + v2[1] = 0; + v2[29] = &off_51B7D0; + std::ios_base::~ios_base((int)(v2 + 29)); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51ABB0: using guessed type int (*off_51ABB0[2])(); +// 51ABC4: using guessed type int (*off_51ABC4[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00501610) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wifstream::~wifstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *Block; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51ABD8; + v1[30] = off_51ABEC; + v1[2] = off_51AA90; + Block = v1; + std::wfilebuf::close((struct _Unwind_Exception *)(v1 + 2)); + std::__basic_file::~__basic_file((int)(Block + 12)); + Block[2] = &off_51AE14; + std::locale::~locale((_DWORD **)Block + 9); + *Block = &unk_515A90; + Block[1] = 0; + Block[30] = &off_51B7E0; + std::ios_base::~ios_base((int)(Block + 30)); + operator delete(Block); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51ABD8: using guessed type int (*off_51ABD8[2])(); +// 51ABEC: using guessed type int (*off_51ABEC[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501700) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wifstream::~wifstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *v2; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51ABD8; + v1[30] = off_51ABEC; + v1[2] = off_51AA90; + v2 = v1; + std::wfilebuf::close((struct _Unwind_Exception *)(v1 + 2)); + std::__basic_file::~__basic_file((int)(v2 + 12)); + v2[2] = &off_51AE14; + std::locale::~locale((_DWORD **)v2 + 9); + *v2 = &unk_515A90; + v2[1] = 0; + v2[30] = &off_51B7E0; + std::ios_base::~ios_base((int)(v2 + 30)); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51ABD8: using guessed type int (*off_51ABD8[2])(); +// 51ABEC: using guessed type int (*off_51ABEC[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (005017E0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wiostream::~basic_iostream(_DWORD *a1) +{ + _DWORD *Block; // ebx + + Block = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + Block[2] = &unk_515AE0; + *Block = &unk_515AB8; + Block[1] = 0; + Block[3] = &off_51B7E0; + std::ios_base::~ios_base((int)(Block + 3)); + operator delete(Block); +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501820) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wiostream::~basic_iostream(_DWORD *a1) +{ + _DWORD *v1; // ecx + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + v1[2] = &unk_515AE0; + v1 += 3; + *(v1 - 3) = &unk_515AB8; + *(v1 - 2) = 0; + *v1 = &off_51B7E0; + std::ios_base::~ios_base((int)v1); +} +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501850) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::ofstream::~ofstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *Block; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51AC3C; + v1[28] = off_51AC50; + v1[1] = off_51AA50; + Block = v1; + std::filebuf::close((struct _Unwind_Exception *)(v1 + 1)); + std::__basic_file::~__basic_file((int)(Block + 11)); + Block[1] = &off_51ADD4; + std::locale::~locale((_DWORD **)Block + 8); + *Block = &unk_515B08; + Block[28] = &off_51B7D0; + std::ios_base::~ios_base((int)(Block + 28)); + operator delete(Block); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51AC3C: using guessed type int (*off_51AC3C[2])(); +// 51AC50: using guessed type int (*off_51AC50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00501930) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::ofstream::~ofstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *v2; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51AC3C; + v1[28] = off_51AC50; + v1[1] = off_51AA50; + v2 = v1; + std::filebuf::close((struct _Unwind_Exception *)(v1 + 1)); + std::__basic_file::~__basic_file((int)(v2 + 11)); + v2[1] = &off_51ADD4; + std::locale::~locale((_DWORD **)v2 + 8); + *v2 = &unk_515B08; + v2[28] = &off_51B7D0; + std::ios_base::~ios_base((int)(v2 + 28)); +} +// 51AA50: using guessed type int (*off_51AA50[2])(); +// 51AC3C: using guessed type int (*off_51AC3C[2])(); +// 51AC50: using guessed type int (*off_51AC50[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00501A00) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wofstream::~wofstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *Block; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51AC64; + v1[29] = off_51AC78; + v1[1] = off_51AA90; + Block = v1; + std::wfilebuf::close((struct _Unwind_Exception *)(v1 + 1)); + std::__basic_file::~__basic_file((int)(Block + 11)); + Block[1] = &off_51AE14; + std::locale::~locale((_DWORD **)Block + 8); + *Block = &unk_515B30; + Block[29] = &off_51B7E0; + std::ios_base::~ios_base((int)(Block + 29)); + operator delete(Block); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AC64: using guessed type int (*off_51AC64[2])(); +// 51AC78: using guessed type int (*off_51AC78[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501AE0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wofstream::~wofstream(_DWORD *a1) +{ + _DWORD *v1; // edx + _DWORD *v2; // [esp+18h] [ebp-54h] + + v1 = (_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12)); + *v1 = off_51AC64; + v1[29] = off_51AC78; + v1[1] = off_51AA90; + v2 = v1; + std::wfilebuf::close((struct _Unwind_Exception *)(v1 + 1)); + std::__basic_file::~__basic_file((int)(v2 + 11)); + v2[1] = &off_51AE14; + std::locale::~locale((_DWORD **)v2 + 8); + *v2 = &unk_515B30; + v2[29] = &off_51B7E0; + std::ios_base::~ios_base((int)(v2 + 29)); +} +// 51AA90: using guessed type int (*off_51AA90[2])(); +// 51AC64: using guessed type int (*off_51AC64[2])(); +// 51AC78: using guessed type int (*off_51AC78[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501BB0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream( + _DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 12); + *(_DWORD *)v1 = &off_51A504; + *((_DWORD *)v1 + 18) = off_51A52C; + *((_DWORD *)v1 + 2) = off_51A518; + *((_DWORD *)v1 + 3) = &off_51A2D8; + if ( Block != v1 + 56 ) + operator delete(Block); + *((_DWORD *)v1 + 3) = &off_51ADD4; + std::locale::~locale((_DWORD **)v1 + 10); + *((_DWORD *)v1 + 2) = &unk_5157AC; + *(_DWORD *)v1 = &unk_515784; + *((_DWORD *)v1 + 1) = 0; + *((_DWORD *)v1 + 18) = &off_51B7D0; + std::ios_base::~ios_base((int)(v1 + 72)); + operator delete(v1); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A504: using guessed type int (*off_51A504)(); +// 51A518: using guessed type int (*off_51A518[2])(); +// 51A52C: using guessed type int (*off_51A52C[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00501C30) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream( + _DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 12); + *(_DWORD *)v1 = &off_51A504; + *((_DWORD *)v1 + 18) = off_51A52C; + *((_DWORD *)v1 + 2) = off_51A518; + *((_DWORD *)v1 + 3) = &off_51A2D8; + if ( Block != v1 + 56 ) + operator delete(Block); + *((_DWORD *)v1 + 3) = &off_51ADD4; + std::locale::~locale((_DWORD **)v1 + 10); + *((_DWORD *)v1 + 2) = &unk_5157AC; + *(_DWORD *)v1 = &unk_515784; + *((_DWORD *)v1 + 1) = 0; + *((_DWORD *)v1 + 18) = &off_51B7D0; + std::ios_base::~ios_base((int)(v1 + 72)); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A504: using guessed type int (*off_51A504)(); +// 51A518: using guessed type int (*off_51A518[2])(); +// 51A52C: using guessed type int (*off_51A52C[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00501CA0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream( + _DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 12); + *(_DWORD *)v1 = &off_51A540; + *((_DWORD *)v1 + 18) = off_51A568; + *((_DWORD *)v1 + 2) = off_51A554; + *((_DWORD *)v1 + 3) = &off_51A318; + if ( Block != v1 + 56 ) + operator delete(Block); + *((_DWORD *)v1 + 3) = &off_51AE14; + std::locale::~locale((_DWORD **)v1 + 10); + *((_DWORD *)v1 + 2) = &unk_515838; + *(_DWORD *)v1 = &unk_5157D4; + *((_DWORD *)v1 + 1) = 0; + *((_DWORD *)v1 + 18) = &off_51B7E0; + std::ios_base::~ios_base((int)(v1 + 72)); + operator delete(v1); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A540: using guessed type int (*off_51A540)(); +// 51A554: using guessed type int (*off_51A554[2])(); +// 51A568: using guessed type int (*off_51A568[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501D20) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::basic_stringstream,std::allocator>::~basic_stringstream( + _DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 12); + *(_DWORD *)v1 = &off_51A540; + *((_DWORD *)v1 + 18) = off_51A568; + *((_DWORD *)v1 + 2) = off_51A554; + *((_DWORD *)v1 + 3) = &off_51A318; + if ( Block != v1 + 56 ) + operator delete(Block); + *((_DWORD *)v1 + 3) = &off_51AE14; + std::locale::~locale((_DWORD **)v1 + 10); + *((_DWORD *)v1 + 2) = &unk_515838; + *(_DWORD *)v1 = &unk_5157D4; + *((_DWORD *)v1 + 1) = 0; + *((_DWORD *)v1 + 18) = &off_51B7E0; + std::ios_base::~ios_base((int)(v1 + 72)); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A540: using guessed type int (*off_51A540)(); +// 51A554: using guessed type int (*off_51A554[2])(); +// 51A568: using guessed type int (*off_51A568[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501D90) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::istringstream::~istringstream(_DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 11); + *(_DWORD *)v1 = &off_51A57C; + *((_DWORD *)v1 + 17) = off_51A590; + *((_DWORD *)v1 + 2) = &off_51A2D8; + if ( Block != v1 + 52 ) + operator delete(Block); + *((_DWORD *)v1 + 2) = &off_51ADD4; + std::locale::~locale((_DWORD **)v1 + 9); + *(_DWORD *)v1 = &unk_515860; + *((_DWORD *)v1 + 1) = 0; + *((_DWORD *)v1 + 17) = &off_51B7D0; + std::ios_base::~ios_base((int)(v1 + 68)); + operator delete(v1); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A57C: using guessed type int (*off_51A57C)(); +// 51A590: using guessed type int (*off_51A590[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00501E00) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::istringstream::~istringstream(_DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 11); + *(_DWORD *)v1 = &off_51A57C; + *((_DWORD *)v1 + 17) = off_51A590; + *((_DWORD *)v1 + 2) = &off_51A2D8; + if ( Block != v1 + 52 ) + operator delete(Block); + *((_DWORD *)v1 + 2) = &off_51ADD4; + std::locale::~locale((_DWORD **)v1 + 9); + *(_DWORD *)v1 = &unk_515860; + *((_DWORD *)v1 + 1) = 0; + *((_DWORD *)v1 + 17) = &off_51B7D0; + std::ios_base::~ios_base((int)(v1 + 68)); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A57C: using guessed type int (*off_51A57C)(); +// 51A590: using guessed type int (*off_51A590[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00501E60) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wistringstream::~wistringstream(_DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 11); + *(_DWORD *)v1 = &off_51A5A4; + *((_DWORD *)v1 + 17) = off_51A5B8; + *((_DWORD *)v1 + 2) = &off_51A318; + if ( Block != v1 + 52 ) + operator delete(Block); + *((_DWORD *)v1 + 2) = &off_51AE14; + std::locale::~locale((_DWORD **)v1 + 9); + *(_DWORD *)v1 = &unk_515888; + *((_DWORD *)v1 + 1) = 0; + *((_DWORD *)v1 + 17) = &off_51B7E0; + std::ios_base::~ios_base((int)(v1 + 68)); + operator delete(v1); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5A4: using guessed type int (*off_51A5A4)(); +// 51A5B8: using guessed type int (*off_51A5B8[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501ED0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wistringstream::~wistringstream(_DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 11); + *(_DWORD *)v1 = &off_51A5A4; + *((_DWORD *)v1 + 17) = off_51A5B8; + *((_DWORD *)v1 + 2) = &off_51A318; + if ( Block != v1 + 52 ) + operator delete(Block); + *((_DWORD *)v1 + 2) = &off_51AE14; + std::locale::~locale((_DWORD **)v1 + 9); + *(_DWORD *)v1 = &unk_515888; + *((_DWORD *)v1 + 1) = 0; + *((_DWORD *)v1 + 17) = &off_51B7E0; + std::ios_base::~ios_base((int)(v1 + 68)); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5A4: using guessed type int (*off_51A5A4)(); +// 51A5B8: using guessed type int (*off_51A5B8[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00501F30) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::ostringstream::~ostringstream(_DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 10); + *(_DWORD *)v1 = &off_51A5CC; + *((_DWORD *)v1 + 16) = off_51A5E0; + *((_DWORD *)v1 + 1) = &off_51A2D8; + if ( Block != v1 + 48 ) + operator delete(Block); + *((_DWORD *)v1 + 1) = &off_51ADD4; + std::locale::~locale((_DWORD **)v1 + 8); + *(_DWORD *)v1 = &unk_5158B0; + *((_DWORD *)v1 + 16) = &off_51B7D0; + std::ios_base::~ios_base((int)(v1 + 64)); + operator delete(v1); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A5CC: using guessed type int (*off_51A5CC)(); +// 51A5E0: using guessed type int (*off_51A5E0[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00501FA0) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::ostringstream::~ostringstream(_DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 10); + *(_DWORD *)v1 = &off_51A5CC; + *((_DWORD *)v1 + 16) = off_51A5E0; + *((_DWORD *)v1 + 1) = &off_51A2D8; + if ( Block != v1 + 48 ) + operator delete(Block); + *((_DWORD *)v1 + 1) = &off_51ADD4; + std::locale::~locale((_DWORD **)v1 + 8); + *(_DWORD *)v1 = &unk_5158B0; + *((_DWORD *)v1 + 16) = &off_51B7D0; + std::ios_base::~ios_base((int)(v1 + 64)); +} +// 51A2D8: using guessed type int (*off_51A2D8)(); +// 51A5CC: using guessed type int (*off_51A5CC)(); +// 51A5E0: using guessed type int (*off_51A5E0[2])(); +// 51ADD4: using guessed type int (*off_51ADD4)(); +// 51B7D0: using guessed type int (*off_51B7D0)(); + +//----- (00502000) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wostringstream::~wostringstream(_DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 10); + *(_DWORD *)v1 = &off_51A5F4; + *((_DWORD *)v1 + 16) = off_51A608; + *((_DWORD *)v1 + 1) = &off_51A318; + if ( Block != v1 + 48 ) + operator delete(Block); + *((_DWORD *)v1 + 1) = &off_51AE14; + std::locale::~locale((_DWORD **)v1 + 8); + *(_DWORD *)v1 = &unk_5158D8; + *((_DWORD *)v1 + 16) = &off_51B7E0; + std::ios_base::~ios_base((int)(v1 + 64)); + operator delete(v1); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5F4: using guessed type int (*off_51A5F4)(); +// 51A608: using guessed type int (*off_51A608[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (00502070) -------------------------------------------------------- +void __fastcall `virtual thunk to'std::wostringstream::~wostringstream(_DWORD *a1) +{ + char *v1; // ebx + char *Block; // eax + + v1 = (char *)a1 + *(_DWORD *)(*a1 - 12); + Block = (char *)*((_DWORD *)v1 + 10); + *(_DWORD *)v1 = &off_51A5F4; + *((_DWORD *)v1 + 16) = off_51A608; + *((_DWORD *)v1 + 1) = &off_51A318; + if ( Block != v1 + 48 ) + operator delete(Block); + *((_DWORD *)v1 + 1) = &off_51AE14; + std::locale::~locale((_DWORD **)v1 + 8); + *(_DWORD *)v1 = &unk_5158D8; + *((_DWORD *)v1 + 16) = &off_51B7E0; + std::ios_base::~ios_base((int)(v1 + 64)); +} +// 51A318: using guessed type int (*off_51A318)(); +// 51A5F4: using guessed type int (*off_51A5F4)(); +// 51A608: using guessed type int (*off_51A608[2])(); +// 51AE14: using guessed type int (*off_51AE14)(); +// 51B7E0: using guessed type int (*off_51B7E0)(); + +//----- (005020D0) -------------------------------------------------------- +int __fastcall std::filebuf::close(void)::__close_sentry::~__close_sentry(int *a1) +{ + int v2; // ebx + bool v3; // zf + int result; // eax + int v5; // edx + int v6; // edx + + v2 = *a1; + v3 = *(_BYTE *)(*a1 + 72) == 0; + *(_DWORD *)(v2 + 48) = 0; + *(_BYTE *)(v2 + 84) = 0; + if ( !v3 ) + { + if ( *(_DWORD *)(v2 + 64) ) + operator delete[](*(void **)(v2 + 64)); + *(_DWORD *)(v2 + 64) = 0; + *(_BYTE *)(v2 + 72) = 0; + } + if ( *(_DWORD *)(v2 + 92) ) + operator delete[](*(void **)(v2 + 92)); + result = *a1; + *(_DWORD *)(v2 + 92) = 0; + *(_DWORD *)(v2 + 96) = 0; + *(_DWORD *)(v2 + 100) = 0; + *(_DWORD *)(v2 + 104) = 0; + *(_WORD *)(result + 73) = 0; + v5 = *(_DWORD *)(result + 64); + *(_DWORD *)(result + 20) = 0; + *(_DWORD *)(result + 4) = v5; + *(_DWORD *)(result + 8) = v5; + *(_DWORD *)(result + 12) = v5; + v6 = *(_DWORD *)(result + 52); + *(_DWORD *)(result + 16) = 0; + *(_DWORD *)(result + 24) = 0; + *(_DWORD *)(result + 56) = v6; + *(_DWORD *)(result + 60) = v6; + return result; +} + +//----- (00502170) -------------------------------------------------------- +int __fastcall std::wfilebuf::close(void)::__close_sentry::~__close_sentry(int *a1) +{ + int v2; // ebx + bool v3; // zf + int result; // eax + int v5; // edx + int v6; // edx + + v2 = *a1; + v3 = *(_BYTE *)(*a1 + 72) == 0; + *(_DWORD *)(v2 + 48) = 0; + *(_BYTE *)(v2 + 88) = 0; + if ( !v3 ) + { + if ( *(_DWORD *)(v2 + 64) ) + operator delete[](*(void **)(v2 + 64)); + *(_DWORD *)(v2 + 64) = 0; + *(_BYTE *)(v2 + 72) = 0; + } + if ( *(_DWORD *)(v2 + 96) ) + operator delete[](*(void **)(v2 + 96)); + result = *a1; + *(_DWORD *)(v2 + 96) = 0; + *(_DWORD *)(v2 + 100) = 0; + *(_DWORD *)(v2 + 104) = 0; + *(_DWORD *)(v2 + 108) = 0; + *(_WORD *)(result + 73) = 0; + v5 = *(_DWORD *)(result + 64); + *(_DWORD *)(result + 20) = 0; + *(_DWORD *)(result + 4) = v5; + *(_DWORD *)(result + 8) = v5; + *(_DWORD *)(result + 12) = v5; + v6 = *(_DWORD *)(result + 52); + *(_DWORD *)(result + 16) = 0; + *(_DWORD *)(result + 24) = 0; + *(_DWORD *)(result + 56) = v6; + *(_DWORD *)(result + 60) = v6; + return result; +} + +//----- (00502250) -------------------------------------------------------- +int __cdecl operator new[](unsigned int a1) +{ + return operator new[](a1); +} + +//----- (005022E0) -------------------------------------------------------- +void *__cdecl operator new(size_t a1) +{ + size_t Size; // ebx + void *result; // eax + void (*new_handler)(void); // eax + _DWORD *exception; // eax + + Size = 1; + if ( a1 ) + Size = a1; + while ( 1 ) + { + result = malloc(Size); + if ( result ) + break; + new_handler = (void (*)(void))std::get_new_handler(); + if ( !new_handler ) + { + exception = __cxa_allocate_exception(4u); + *exception = &off_51B7BC; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::bad_alloc, + (void (__cdecl *)(void *))std::bad_alloc::~bad_alloc); + } + new_handler(); + } + return result; +} +// 516A68: using guessed type int *`typeinfo for'std::bad_alloc; +// 51B7BC: using guessed type void (__cdecl *off_51B7BC)(std::bad_alloc *__hidden this); + +//----- (00502340) -------------------------------------------------------- +_DWORD *__cxa_allocate_dependent_exception() +{ + _DWORD *v0; // eax + _DWORD *v1; // ebx + _DWORD *v3; // eax + + v0 = malloc(0x50u); + if ( v0 ) + { + v1 = v0; + } + else + { + `anonymous namespace'::pool::allocate(80); + v1 = v3; + if ( !v3 ) + std::terminate(); + } + *v1 = 0; + v1[19] = 0; + memset( + (void *)((unsigned int)(v1 + 1) & 0xFFFFFFFC), + 0, + 4 * (((unsigned int)v1 - ((unsigned int)(v1 + 1) & 0xFFFFFFFC) + 80) >> 2)); + return v1; +} +// 5023B8: variable 'v3' is possibly undefined + +//----- (005023D0) -------------------------------------------------------- +void *__cdecl __cxa_allocate_exception(size_t thrown_size) +{ + _DWORD *v1; // eax + _DWORD *v2; // edx + _DWORD *v4; // eax + + v1 = malloc(thrown_size + 96); + if ( v1 ) + { + v2 = v1; + } + else + { + `anonymous namespace'::pool::allocate(thrown_size + 96); + v2 = v4; + if ( !v4 ) + std::terminate(); + } + *v2 = 0; + v2[23] = 0; + memset( + (void *)((unsigned int)(v2 + 1) & 0xFFFFFFFC), + 0, + 4 * (((unsigned int)v2 - ((unsigned int)(v2 + 1) & 0xFFFFFFFC) + 96) >> 2)); + return v2 + 24; +} +// 50244B: variable 'v4' is possibly undefined + +//----- (00502460) -------------------------------------------------------- +void *__cdecl __cxa_begin_catch(void *a1) +{ + char **globals; // eax + char *v2; // edx + char *v3; // ebp + int v5; // ecx + int v6; // edi + + globals = (char **)__cxa_get_globals(); + v2 = *globals; + v3 = (char *)a1 - 48; + if ( (unsigned __int64)(*(_QWORD *)a1 - 0x474E5543432B2B00LL) <= 1 ) + { + v5 = *((_DWORD *)a1 - 7); + v6 = 1 - v5; + if ( v5 >= 0 ) + v6 = v5 + 1; + *((_DWORD *)a1 - 7) = v6; + --globals[1]; + if ( v2 != v3 ) + { + *((_DWORD *)a1 - 8) = v2; + *globals = v3; + } + return (void *)*((_DWORD *)a1 - 2); + } + else + { + if ( v2 ) + std::terminate(); + *globals = v3; + return 0; + } +} + +//----- (005024F0) -------------------------------------------------------- +void __cdecl __noreturn __cxa_call_terminate(_Unwind_Exception *a1) +{ + if ( a1 ) + { + __cxa_begin_catch(a1); + if ( !(((unsigned int)(*(_DWORD *)a1 - 1126902528) > 1) + + ((unsigned __int64)(*(_QWORD *)a1 - 0x474E5543432B2B00LL) >> 32)) ) + __cxxabiv1::__terminate(*((void (**)(void))a1 - 9)); + } + std::terminate(); +} + +//----- (00502540) -------------------------------------------------------- +void __cdecl __noreturn __cxa_call_unexpected(void *a1) +{ + __cxa_begin_catch(a1); + __cxxabiv1::__unexpected(*((void (**)(void))a1 - 10)); +} + +//----- (005026E0) -------------------------------------------------------- +struct type_info *__cxa_current_exception_type(void) +{ + struct type_info *result; // eax + int v1; // edx + + result = (struct type_info *)*__cxa_get_globals(); + if ( result ) + { + v1 = *((_DWORD *)result + 12); + result = *(struct type_info **)result; + if ( (v1 & 1) != 0 ) + return (struct type_info *)*((_DWORD *)result - 20); + } + return result; +} + +//----- (00502700) -------------------------------------------------------- +void __noreturn __cxa_deleted_virtual(void) +{ + write(2, "deleted virtual method called\n", 0x1Eu); + std::terminate(); +} + +//----- (00502730) -------------------------------------------------------- +void __cxa_end_catch(void) +{ + _DWORD *globals_fast; // edx + _DWORD *v1; // eax + int v2; // ecx + int v3; // ecx + + globals_fast = __cxa_get_globals_fast(); + v1 = (_DWORD *)*globals_fast; + if ( *globals_fast ) + { + if ( ((unsigned int)(v1[12] - 1126902528) > 1) + + ((unsigned __int64)(*((_QWORD *)v1 + 6) - 0x474E5543432B2B00LL) >> 32) ) + { + *globals_fast = 0; + _Unwind_DeleteException((struct _Unwind_Exception *)(v1 + 12)); + return; + } + v2 = v1[5]; + if ( v2 < 0 ) + { + v3 = v2 + 1; + if ( !v3 ) + *globals_fast = v1[4]; + } + else + { + v3 = v2 - 1; + if ( !v3 ) + { + *globals_fast = v1[4]; + _Unwind_DeleteException((struct _Unwind_Exception *)(v1 + 12)); + return; + } + if ( v3 == -1 ) + std::terminate(); + } + v1[5] = v3; + } +} + +//----- (005027D0) -------------------------------------------------------- +void __cdecl __cxa_free_dependent_exception(char *Block) +{ + if ( Block > ::Block && Block < (char *)::Block + dword_50B418 ) + `anonymous namespace'::pool::free((int)Block); + else + free(Block); +} +// 50B418: using guessed type int dword_50B418; + +//----- (00502840) -------------------------------------------------------- +void __cdecl __cxa_free_exception(void *a1) +{ + char *v1; // eax + + v1 = (char *)a1 - 96; + if ( (char *)a1 - 96 > Block && v1 < (char *)Block + dword_50B418 ) + `anonymous namespace'::pool::free((int)v1); + else + free((char *)a1 - 96); +} +// 50B418: using guessed type int dword_50B418; + +//----- (005028B0) -------------------------------------------------------- +void *__cdecl __cxa_get_exception_ptr(void *a1) +{ + return (void *)*((_DWORD *)a1 - 2); +} + +//----- (005028C0) -------------------------------------------------------- +_DWORD *__cxa_get_globals() +{ + return __emutls_get_address(__emutls_v__ZZN12_GLOBAL__N_110get_globalEvE6global); +} +// 50CC18: using guessed type size_t __emutls_v__ZZN12_GLOBAL__N_110get_globalEvE6global[4]; + +//----- (005028E0) -------------------------------------------------------- +_DWORD *__cxa_get_globals_fast() +{ + return __emutls_get_address(__emutls_v__ZZN12_GLOBAL__N_110get_globalEvE6global); +} +// 50CC18: using guessed type size_t __emutls_v__ZZN12_GLOBAL__N_110get_globalEvE6global[4]; + +//----- (00502900) -------------------------------------------------------- +void __cdecl __cxa_guard_abort(__guard *a1) +{ + *((_BYTE *)a1 + 1) = 0; + if ( _CRT_MT ) + { + if ( __gthr_win32_recursive_mutex_unlock(`anonymous namespace'::static_mutex) ) + __gnu_cxx::__throw_concurrence_unlock_error(); + } +} +// 50B0F0: using guessed type int _CRT_MT; +// 50BFC0: using guessed type int `anonymous namespace'::static_mutex; + +//----- (005029A0) -------------------------------------------------------- +int __cdecl __cxa_guard_acquire(__guard *a1) +{ + _DWORD *exception; // eax + int lpuexcpt; // [esp+18h] [ebp-44h] + + if ( *(_BYTE *)a1 ) + return 0; + lpuexcpt = _CRT_MT; + if ( _CRT_MT ) + { + __gthr_win32_once( + (int)&`anonymous namespace'::get_static_mutex(void)::once, + (void (*)(void))`anonymous namespace'::init); + if ( _CRT_MT ) + { + if ( __gthr_win32_recursive_mutex_lock(`anonymous namespace'::static_mutex) ) + { + exception = __cxa_allocate_exception(4u); + *exception = &off_519CF8; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'__gnu_cxx::__concurrence_lock_error, + (void (__cdecl *)(void *))__gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error); + } + if ( !*(_BYTE *)a1 ) + goto LABEL_9; + if ( _CRT_MT && __gthr_win32_recursive_mutex_unlock(`anonymous namespace'::static_mutex) ) + __gnu_cxx::__throw_concurrence_unlock_error(); + } + else if ( !*(_BYTE *)a1 ) + { +LABEL_9: + if ( *((_BYTE *)a1 + 1) ) + __cxxabiv1::throw_recursive_init_exception(); + goto LABEL_5; + } + return 0; + } + if ( !*(_BYTE *)a1 ) + { + if ( *((_BYTE *)a1 + 1) ) + __cxxabiv1::throw_recursive_init_exception(); +LABEL_5: + lpuexcpt = 1; + *((_BYTE *)a1 + 1) = 1; + } + return lpuexcpt; +} +// 50B0F0: using guessed type int _CRT_MT; +// 50BFC0: using guessed type int `anonymous namespace'::static_mutex; +// 515CC8: using guessed type int *`typeinfo for'__gnu_cxx::__concurrence_lock_error; +// 519CF8: using guessed type void (__cdecl *off_519CF8)(__gnu_cxx::__concurrence_lock_error *__hidden this); + +//----- (00502B40) -------------------------------------------------------- +void __cdecl __cxa_guard_release(__guard *a1) +{ + *((_BYTE *)a1 + 1) = 0; + *(_BYTE *)a1 = 1; + if ( _CRT_MT ) + { + if ( __gthr_win32_recursive_mutex_unlock(`anonymous namespace'::static_mutex) ) + __gnu_cxx::__throw_concurrence_unlock_error(); + } +} +// 50B0F0: using guessed type int _CRT_MT; +// 50BFC0: using guessed type int `anonymous namespace'::static_mutex; + +//----- (00502BE0) -------------------------------------------------------- +int __cdecl __cxa_init_primary_exception(int a1, int a2, int a3) +{ + void (*terminate)(void); // eax + int result; // eax + + *(_DWORD *)(a1 - 80) = a2; + *(_DWORD *)(a1 - 96) = 0; + *(_DWORD *)(a1 - 76) = a3; + *(_DWORD *)(a1 - 72) = std::get_unexpected(); + terminate = std::get_terminate(); + *(_DWORD *)(a1 - 32) = 1126902528; + *(_DWORD *)(a1 - 68) = terminate; + result = a1 - 96; + *(_DWORD *)(a1 - 28) = 1196315971; + *(_DWORD *)(a1 - 24) = __gxx_exception_cleanup; + return result; +} + +//----- (00502C30) -------------------------------------------------------- +void __noreturn __cxa_pure_virtual(void) +{ + write(2, "pure virtual method called\n", 0x1Bu); + std::terminate(); +} + +//----- (00502C60) -------------------------------------------------------- +void __noreturn __cxa_rethrow(void) +{ + int *globals; // eax + int v1; // edx + + globals = __cxa_get_globals(); + v1 = *globals; + ++globals[1]; + if ( v1 ) + { + if ( ((unsigned int)(*(_DWORD *)(v1 + 48) - 1126902528) > 1) + + ((unsigned __int64)(*(_QWORD *)(v1 + 48) - 0x474E5543432B2B00LL) >> 32) ) + { + *globals = 0; + } + else + { + *(_DWORD *)(v1 + 20) = -*(_DWORD *)(v1 + 20); + } + _Unwind_SjLj_Resume_or_Rethrow((struct _Unwind_Exception *)(v1 + 48)); + } + std::terminate(); +} + +//----- (00502CC0) -------------------------------------------------------- +void __cdecl __noreturn __cxa_throw(void *a1, struct type_info *lptinfo, void (__cdecl *a3)(void *)) +{ + _DWORD *globals; // eax + _DWORD *inited; // eax + void *v5; // ebx + + globals = __cxa_get_globals(); + ++globals[1]; + inited = (_DWORD *)__cxa_init_primary_exception((int)a1, (int)lptinfo, (int)a3); + v5 = inited + 16; + *inited = 1; + _Unwind_SjLj_RaiseException((struct _Unwind_Exception *)(inited + 16)); + __cxa_begin_catch(v5); + std::terminate(); +} + +//----- (00502D10) -------------------------------------------------------- +void *__cdecl __dynamic_cast( + const void *lpsrc, + const struct __class_type_info *lpstype, + const struct __class_type_info *lpdtype, + ptrdiff_t s2d) +{ + int v4; // edx + int v5; // ecx + int *v6; // edx + int v7; // eax + void *result; // eax + char *v9; // [esp+48h] [ebp-20h] BYREF + int v10; // [esp+4Ch] [ebp-1Ch] + int v11; // [esp+50h] [ebp-18h] + int v12; // [esp+54h] [ebp-14h] + int v13; // [esp+58h] [ebp-10h] + + v4 = *(_DWORD *)(*(_DWORD *)lpsrc - 8); + v5 = *(_DWORD *)(*(_DWORD *)lpsrc - 4); + v9 = 0; + v10 = 0; + v6 = (int *)((char *)lpsrc + v4); + v11 = 0; + v7 = *v6; + v12 = 0; + v13 = 16; + if ( *(_DWORD *)(v7 - 4) != v5 ) + return 0; + (*(void (__thiscall **)(int, ptrdiff_t, int, const struct __class_type_info *, int *, const struct __class_type_info *, const void *, char **))(*(_DWORD *)v5 + 28))( + v5, + s2d, + 6, + lpdtype, + v6, + lpstype, + lpsrc, + &v9); + result = v9; + if ( !v9 ) + return 0; + if ( (v12 & 6) != 6 && ((unsigned __int8)v11 & (unsigned __int8)v10 & 6) != 6 ) + { + if ( (v11 & 5) != 4 && !v12 ) + { + if ( s2d < 0 ) + { + if ( s2d != -2 + && ((*(int (__thiscall **)(const struct __class_type_info *, ptrdiff_t, char *, const struct __class_type_info *, const void *))(*(_DWORD *)lpdtype + 32))( + lpdtype, + s2d, + v9, + lpstype, + lpsrc) & 6) == 6 ) + { + return v9; + } + } + else if ( lpsrc == &v9[s2d] ) + { + return v9; + } + } + return 0; + } + return result; +} + +//----- (00502E30) -------------------------------------------------------- +int __cdecl __gxx_personality_sj0(int a1, int a2, __int64 a3, _Unwind_Exception *v, struct _Unwind_Context *lpuctx) +{ + int IPInfo; // eax + int v7; // ebp + char *v8; // eax + int v9; // edi + int v10; // ecx + char v11; // bl + int v12; // edx + int v13; // esi + int v14; // ecx + char v15; // bl + int v16; // edx + int v17; // edx + unsigned int v18; // ecx + char *v19; // esi + char v20; // bl + int v21; // eax + char *v22; // ebx + int v23; // esi + unsigned int v24; // ecx + int v25; // edi + char v26; // dl + int v27; // eax + int v28; // esi + char *v29; // edx + int v30; // ecx + char v31; // bl + int v32; // eax + int v33; // edx + unsigned __int8 v34; // al + int v35; // ecx + int *v36; // eax + bool v37; // [esp+18h] [ebp-B4h] + int v38; // [esp+18h] [ebp-B4h] + int v39; // [esp+20h] [ebp-ACh] + char *v40; // [esp+20h] [ebp-ACh] + int v41; // [esp+24h] [ebp-A8h] + char *v42; // [esp+24h] [ebp-A8h] + int v43; // [esp+28h] [ebp-A4h] + int v44; // [esp+2Ch] [ebp-A0h] + unsigned __int64 v45; // [esp+30h] [ebp-9Ch] + char v46; // [esp+3Bh] [ebp-91h] + char *LanguageSpecificData; // [esp+3Ch] [ebp-90h] + int **v48; // [esp+40h] [ebp-8Ch] + int v49; // [esp+48h] [ebp-84h] + int *v50; // [esp+8Ch] [ebp-40h] BYREF + unsigned int v51; // [esp+90h] [ebp-3Ch] BYREF + unsigned __int8 v52[4]; // [esp+94h] [ebp-38h] BYREF + char v53[8]; // [esp+98h] [ebp-34h] BYREF + char *v54; // [esp+A0h] [ebp-2Ch] + int v55; // [esp+A4h] [ebp-28h] + int v56; // [esp+A8h] [ebp-24h] + char v57; // [esp+ACh] [ebp-20h] + + v50 = 0; + v51 = 0; + if ( a1 != 1 ) + return 3; + v45 = a3 - 0x474E5543432B2B00LL; + v37 = (unsigned __int64)(a3 - 0x474E5543432B2B00LL) <= 1; + v46 = v37 && a2 == 6; + if ( v46 ) + { + v39 = *((_DWORD *)v - 3); + if ( v39 ) + { + v41 = *((_DWORD *)v - 6); + LanguageSpecificData = (char *)*((_DWORD *)v - 4); + goto LABEL_5; + } + goto LABEL_44; + } + LanguageSpecificData = (char *)_Unwind_GetLanguageSpecificData((int)lpuctx); + if ( !LanguageSpecificData ) + return 8; + v42 = parse_lsda_header((int)lpuctx, LanguageSpecificData, (int)v53); + v54 = (char *)base_of_encoded_value(v57); + IPInfo = _Unwind_GetIPInfo((int)lpuctx, &v51); + v7 = (__PAIR64__(IPInfo, v51) - 1) >> 32; + v39 = v7; + if ( v7 < 0 ) + return 8; + if ( !v7 ) + { + v41 = 0; + v33 = 1; + v44 = 0; + goto LABEL_49; + } + v8 = v42; + do + { + v9 = 0; + v10 = 0; + do + { + v11 = *v8++; + v12 = (v11 & 0x7F) << v10; + v10 += 7; + v9 |= v12; + } + while ( v11 < 0 ); + v13 = 0; + v14 = 0; + do + { + v15 = *v8++; + v16 = (v15 & 0x7F) << v14; + v14 += 7; + v13 |= v16; + } + while ( v15 < 0 ); + --v7; + } + while ( v7 ); + v49 = v9 + 1; + if ( !v13 ) + { + if ( v9 == -1 ) + return 8; + goto LABEL_46; + } + if ( v9 == -1 ) + return 8; + v44 = v56 + v13 - 1; + if ( v56 + v13 == 1 ) + goto LABEL_46; + v48 = &`typeinfo for'__cxxabiv1::__forced_unwind; + if ( (a2 & 8) == 0 ) + { + v48 = &`typeinfo for'__cxxabiv1::__foreign_exception; + if ( v45 <= 1 ) + { + v36 = (int *)((char *)v + 32); + if ( (*(_BYTE *)v & 1) != 0 ) + v36 = (int *)*((_DWORD *)v - 12); + v50 = v36; + v48 = (int **)*(v36 - 20); + } + } + while ( 1 ) + { + v17 = 0; + v18 = 0; + v19 = (char *)v44; + do + { + v20 = *v19++; + v21 = (v20 & 0x7F) << v18; + v18 += 7; + v17 |= v21; + } + while ( v20 < 0 ); + v40 = v19; + if ( v18 <= 0x1F && (v20 & 0x40) != 0 ) + v17 |= -(1 << v18); + v41 = v17; + v22 = v19; + v23 = 0; + v24 = 0; + v25 = v17; + do + { + v26 = *v22++; + v27 = (v26 & 0x7F) << v24; + v24 += 7; + v23 |= v27; + } + while ( v26 < 0 ); + v43 = v23; + if ( v24 <= 0x1F && (v26 & 0x40) != 0 ) + v43 = -(1 << v24) | v23; + if ( !v25 ) + { + v46 = 1; + goto LABEL_41; + } + if ( v25 > 0 ) + break; + if ( (a2 & 8) == 0 && v37 && v48 ) + { + if ( !(unsigned __int8)check_exception_spec((int)v53, (int)v48, v50, v25) ) + { + if ( (a2 & 1) != 0 ) + { + v39 = v49; + goto LABEL_56; + } + v39 = v49; + if ( (a2 & 8) == 0 ) + { + v33 = 3; +LABEL_51: + if ( v45 <= 1 ) + { + if ( v33 != 1 ) + { +LABEL_5: + if ( v41 < 0 ) + { + parse_lsda_header((int)lpuctx, LanguageSpecificData, (int)v53); + v54 = (char *)base_of_encoded_value(v57); + *((_DWORD *)v - 3) = base_of_encoded_value(v57); + } +LABEL_7: + _Unwind_SetGR(lpuctx, 0, (_Unwind_Word)v); + _Unwind_SetGR(lpuctx, 1, v41); + _Unwind_SetIP((int)lpuctx, v39); + return 7; + } +LABEL_44: + __cxa_call_terminate(v); + } +LABEL_52: + if ( v33 == 1 ) + std::terminate(); + } + if ( v41 < 0 ) + std::unexpected(); + goto LABEL_7; + } + } + else + { + v28 = 0; + v29 = (char *)(v55 + ~v25); + v30 = 0; + do + { + v31 = *v29++; + v32 = (v31 & 0x7F) << v30; + v30 += 7; + v28 |= v32; + } + while ( v31 < 0 ); + if ( !v28 ) + goto LABEL_67; + } +LABEL_41: + if ( !v43 ) + { + if ( !v46 ) + return 8; +LABEL_46: + if ( (a2 & 1) == 0 ) + { + v41 = a2 & 8; + v39 = v49; + if ( (a2 & 8) != 0 ) + v41 = 0; + goto LABEL_7; + } + return 8; + } + v44 = (int)&v40[v43]; + } + if ( v57 == -1 ) + { + v35 = 0; + goto LABEL_64; + } + v34 = v57 & 7; + if ( (v57 & 7) == 2 ) + { + v35 = -2 * v25; + goto LABEL_64; + } + if ( v34 <= 2u ) + { + if ( v34 ) +LABEL_85: + abort(); + goto LABEL_69; + } + if ( v34 == 3 ) + { +LABEL_69: + v35 = -4 * v25; + goto LABEL_64; + } + if ( v34 != 4 ) + goto LABEL_85; + v35 = -8 * v25; +LABEL_64: + read_encoded_value_with_base(v57, v54, (char *)(v55 + v35), (int *)v52); + if ( *(_DWORD *)v52 && (!v48 || !(unsigned __int8)get_adjusted_ptr(*(int *)v52, (int)v48, &v50)) ) + goto LABEL_41; +LABEL_67: + v33 = 3; + v39 = v49; +LABEL_49: + if ( (a2 & 1) == 0 ) + { + if ( (a2 & 8) == 0 ) + goto LABEL_51; + goto LABEL_52; + } + v38 = 6; + if ( v45 <= 1 ) + { +LABEL_56: + v38 = 6; + *((_DWORD *)v - 6) = v41; + *((_DWORD *)v - 5) = v44; + *((_DWORD *)v - 4) = LanguageSpecificData; + *((_DWORD *)v - 2) = v50; + *((_DWORD *)v - 3) = v39; + } + return v38; +} +// 515B4C: using guessed type int *`typeinfo for'__cxxabiv1::__forced_unwind; +// 515B60: using guessed type int *`typeinfo for'__cxxabiv1::__foreign_exception; + +//----- (00503570) -------------------------------------------------------- +void __tcf_0_1(void) +{ + if ( _CRT_MT ) + __gthr_win32_mutex_destroy((int)`anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex); +} +// 50B0F0: using guessed type int _CRT_MT; +// 50CBD4: using guessed type _DWORD `anonymous namespace'::get_locale_cache_mutex(void)::locale_cache_mutex[2]; + +//----- (005035A0) -------------------------------------------------------- +void __tcf_0_2(void) +{ + if ( _CRT_MT ) + __gthr_win32_mutex_destroy((int)`anonymous namespace'::get_locale_mutex(void)::locale_mutex); +} +// 50B0F0: using guessed type int _CRT_MT; +// 50CBC0: using guessed type _DWORD `anonymous namespace'::get_locale_mutex(void)::locale_mutex[2]; + +//----- (00503610) -------------------------------------------------------- +void __tcf_0_3(void) +{ + if ( _CRT_MT ) + __gthr_win32_mutex_destroy((int)`anonymous namespace'::emergency_pool); +} +// 50B0F0: using guessed type int _CRT_MT; +// 50B408: using guessed type _DWORD `anonymous namespace'::emergency_pool[2]; + +//----- (00503680) -------------------------------------------------------- +void __cdecl __tcf_0_4(std::_V2::error_category *a1) +{ + `anonymous namespace'::__io_category_instance(void)::__ec = &off_5199CC; + std::_V2::error_category::~error_category(a1); +} +// 50CBD0: using guessed type void (__cdecl **`anonymous namespace'::__io_category_instance(void)::__ec)(_anonymous_namespace_::io_error_category *__hidden this); +// 5199CC: using guessed type void (__cdecl *off_5199CC)(_anonymous_namespace_::io_error_category *__hidden this); + +//----- (005036C0) -------------------------------------------------------- +int __cdecl main(int argc, const char **argv, const char **envp) +{ + void **v3; // ecx + _BYTE *v4; // eax + char v5; // dl + std::ostream::sentry *v6; // eax + char v7; // al + char v8; // al + _DWORD *v9; // eax + FILE *v10; // eax + bool v11; // zf + int *v12; // eax + int *v13; // edx + int *v14; // eax + bool v15; // zf + std::ostream::sentry *v16; // eax + std::ostream::sentry *v17; // edx + _DWORD *v18; // edx + int v19; // eax + FILE *v20; // eax + FILE *v21; // eax + FILE *v22; // eax + std::ostream::sentry *v23; // eax + std::ostream::sentry *v24; // eax + struct _Unwind_Exception *v25; // eax + FILE *v26; // eax + void **v28; // [esp-38h] [ebp-2D8h] + int v29; // [esp+0h] [ebp-2A0h] + char v30; // [esp+5h] [ebp-29Bh] + char v31; // [esp+6h] [ebp-29Ah] + char v32; // [esp+7h] [ebp-299h] + const char **v33; // [esp+8h] [ebp-298h] + char v34; // [esp+Ch] [ebp-294h] + char v35; // [esp+Dh] [ebp-293h] + char v36; // [esp+Eh] [ebp-292h] + char v37; // [esp+Fh] [ebp-291h] + char *FileName; // [esp+10h] [ebp-290h] + int v39; // [esp+14h] [ebp-28Ch] + int v40; // [esp+18h] [ebp-288h] + bool Stream; // [esp+1Ch] [ebp-284h] + FILE *Streama; // [esp+1Ch] [ebp-284h] + FILE *Streamb; // [esp+1Ch] [ebp-284h] + char **v44; // [esp+20h] [ebp-280h] + char *v45; // [esp+20h] [ebp-280h] + int *v46; // [esp+20h] [ebp-280h] + const char *v47; // [esp+20h] [ebp-280h] + char *Block; // [esp+24h] [ebp-27Ch] + std::ostream::sentry *v49; // [esp+28h] [ebp-278h] + std::ostream::sentry *v50; // [esp+28h] [ebp-278h] + std::ostream::sentry *v51; // [esp+28h] [ebp-278h] + std::ostream::sentry *v52; // [esp+28h] [ebp-278h] + std::ostream::sentry *v53; // [esp+28h] [ebp-278h] + int CommHead; // [esp+2Ch] [ebp-274h] + int i; // [esp+2Ch] [ebp-274h] + char v56; // [esp+2Ch] [ebp-274h] + void **v57; // [esp+2Ch] [ebp-274h] + unsigned int j; // [esp+2Ch] [ebp-274h] + const char *v59; // [esp+2Ch] [ebp-274h] + int k; // [esp+2Ch] [ebp-274h] + int *v61; // [esp+2Ch] [ebp-274h] + int *insert_hint_unique_pos; // [esp+2Ch] [ebp-274h] + void *v63; // [esp+2Ch] [ebp-274h] + const char *v64; // [esp+2Ch] [ebp-274h] + struct _Unwind_Exception *lpuexcpt; // [esp+30h] [ebp-270h] + void **v66; // [esp+74h] [ebp-22Ch] BYREF + void **v67; // [esp+78h] [ebp-228h] + int v68; // [esp+7Ch] [ebp-224h] + void **v69; // [esp+80h] [ebp-220h] BYREF + int v70; // [esp+84h] [ebp-21Ch] + int v71; // [esp+88h] [ebp-218h] + int *v72; // [esp+8Ch] [ebp-214h] BYREF + char *v73; // [esp+90h] [ebp-210h] + char *v74; // [esp+94h] [ebp-20Ch] + void *v75[6]; // [esp+98h] [ebp-208h] BYREF + void *v76[6]; // [esp+B0h] [ebp-1F0h] BYREF + char v77[4]; // [esp+C8h] [ebp-1D8h] BYREF + int v78; // [esp+CCh] [ebp-1D4h] BYREF + std::ostream::sentry *v79; // [esp+D0h] [ebp-1D0h] + int *v80; // [esp+D4h] [ebp-1CCh] + int *v81; // [esp+D8h] [ebp-1C8h] + int v82; // [esp+DCh] [ebp-1C4h] + int v83[2]; // [esp+E0h] [ebp-1C0h] BYREF + char v84; // [esp+E8h] [ebp-1B8h] BYREF + char *v85; // [esp+F8h] [ebp-1A8h] BYREF + int v86; // [esp+FCh] [ebp-1A4h] + char v87; // [esp+100h] [ebp-1A0h] BYREF + void *v88[2]; // [esp+110h] [ebp-190h] BYREF + char v89; // [esp+118h] [ebp-188h] BYREF + void *v90[2]; // [esp+128h] [ebp-178h] BYREF + char v91; // [esp+130h] [ebp-170h] BYREF + char v92[4]; // [esp+140h] [ebp-160h] BYREF + int v93[5]; // [esp+144h] [ebp-15Ch] BYREF + void *v94[2]; // [esp+158h] [ebp-148h] BYREF + char v95; // [esp+160h] [ebp-140h] BYREF + void *v96[2]; // [esp+170h] [ebp-130h] BYREF + char v97; // [esp+178h] [ebp-128h] BYREF + int v98; // [esp+188h] [ebp-118h] BYREF + int v99; // [esp+18Ch] [ebp-114h] + char v100[16]; // [esp+190h] [ebp-110h] BYREF + int v101; // [esp+1A0h] [ebp-100h] BYREF + int v102; // [esp+1A4h] [ebp-FCh] + char v103; // [esp+1A8h] [ebp-F8h] BYREF + void *v104[2]; // [esp+1B8h] [ebp-E8h] BYREF + char v105[4]; // [esp+1C0h] [ebp-E0h] BYREF + char v106[12]; // [esp+1C4h] [ebp-DCh] BYREF + char v107[196]; // [esp+1D0h] [ebp-D0h] BYREF + int *p_argc; // [esp+294h] [ebp-Ch] + + // main - 0 + p_argc = &argc; + v40 = argc; + v33 = argv; + __main(); + std::string::basic_string(v75, (char *)&byte_50D216); + std::string::basic_string(v76, "./app.wxss"); + v80 = &v78; + v81 = &v78; + v66 = 0; + v67 = 0; + v68 = 0; + v78 = 0; + v79 = 0; + v82 = 0; + v83[0] = (int)&v84; + v83[1] = 0; + v84 = 0; + if ( v40 <= 1 ) + { + CommHead = Usage(v40, v33); + goto LABEL_121; + } + // main - 5 + v69 = 0; + v70 = 0; + v71 = 0; + + v85 = &v87; + v86 = 0; + v87 = 0; + + // v40 -> argc + for ( i = 1; i < v40; ++i ) + { + std::string::basic_string(v104, "--config-path"); + v49 = (std::ostream::sentry *)(4 * i); + // v33 -> argv + v44 = (char **)&v33[i]; + Stream = 0; + if ( !std::string::compare((int)v104, *v44) ) + Stream = i + 1 < v40; + std::string::_M_dispose(v104); + if ( Stream ) + { + ++i; + std::string::operator=((unsigned int *)&v85, *(char **)((char *)v49 + (_DWORD)v33 + 4)); + } + else + { + std::string::basic_string(v104, *v44); + std::vector::emplace_back((int)&v69, v104); + std::string::_M_dispose(v104); + } + } + // main - 10 + if ( v86 ) + { + v99 = 0; + v98 = (int)v100; + v100[0] = 0; + ReadFile(v85, (unsigned int *)&v98); + while ( v99 ) + { + std::string::basic_string((void **)&v101, "\n"); + GetNextArg((int)v104, &v98, (int)&v101); + std::vector::emplace_back((int)&v69, v104); + std::string::_M_dispose(v104); + std::string::_M_dispose((void **)&v101); + } + std::string::_M_dispose((void **)&v98); + } + // main - 15 + v50 = 0; + v36 = 0; + v30 = 0; + v29 = 0; + v56 = 0; + // std::vector 参数列表 + v39 = -1431655765 * ((v70 - (int)v69) >> 3); + v31 = 0; + v37 = 0; + v35 = 0; + v32 = 0; + v34 = 0; + FileName = 0; + while ( (int)v50 < v39 ) + { + v3 = &v69[6 * (_DWORD)v50]; + Streama = (FILE *)(24 * (_DWORD)v50); + v4 = *v3; + if ( *(_BYTE *)*v3 != '-'/*45*/ ) + { + v28 = &v69[6 * (_DWORD)v50]; + if ( !v56 ) + { + std::string::basic_string((char *)v104, (int)v28); + std::vector::emplace_back((int)&v66, v104); + std::string::_M_dispose(v104); + goto LABEL_57; // continue + } + std::string::basic_string((char *)v104, (int)v28); + std::string::operator=((unsigned __int8 **)v75, (int)v104); + std::string::_M_dispose(v104); + goto LABEL_56; + } + // v4 -> current + v5 = v4[1]; + v45 = (char *)v50 + 1; + // v50 -> currentIndex + // v39 -> size + switch ( v5 ) + { + case 'o': + if ( v39 > (int)v50 + 1 ) + { + FileName = *(char **)((char *)&Streama->_bufsiz + (_DWORD)v69); + v6 = (std::ostream::sentry *)((char *)v50 + 1); + LABEL_49: + v50 = v6; + goto LABEL_56; // v56 = 0; continue; + } + break; + case 's': + v7 = v4[2]; + if ( v7 == 't'/*116*/ ) + { + v56 = 0; + v34 = 1; + goto LABEL_57; // continue + } + if ( v7 == 'd'/*100*/ ) + { + if ( v39 > (int)v45 ) + { + std::string::operator=((unsigned int *)v83, *(char **)((char *)&Streama->_bufsiz + (_DWORD)v69)); + v56 = 0; + v50 = (std::ostream::sentry *)((char *)v50 + 1); + v35 = 1; + goto LABEL_57; // continue + } + } + else if ( v39 > (int)v45 ) + { + v56 = 0; + v32 = 1; + v50 = (std::ostream::sentry *)((char *)v50 + 1); + goto LABEL_57; // continue + } + break; + case 'l': + v8 = v4[2]; + if ( v8 == 'c'/*99*/ ) + goto LABEL_56; // v56 = 0; continue; + if ( v8 == 'l'/*108*/ ) + { + v36 = 1; + goto LABEL_56; // v56 = 0; continue; + } + break; + case 'd': + if ( v4[2] == 'b'/*98*/ ) + { + v56 = 0; + v37 = 1; + goto LABEL_57; // continue + } + break; + case 'j': + if ( v4[2] == 's'/*115*/ ) + { + v56 = 0; + v31 = 1; + goto LABEL_57; // continue + } + break; + case 'c': + if ( v4[2] == 'p'/*112*/ ) + { + v56 = 1; + goto LABEL_57; // continue + } + break; + default: + if ( v5 == 'p'/*112*/ && v4[2] == 'c'/*99*/ ) + { + v30 = 1; + v29 = atoi(*(const char **)((char *)&Streama->_bufsiz + (_DWORD)v69)); + v50 = (std::ostream::sentry *)((char *)v50 + 1); + LABEL_56: + v56 = 0; + goto LABEL_57; // continue + } + break; + } + v56 = 0; + // v3 -> cur + if ( !std::string::compare((int)v3, "--subpackage") && v39 > (int)v45 ) + { + v101 = (int)&v103; + v102 = 0; + v103 = 0; + + v57 = (void **)((char *)&Streama->_bufsiz + (_DWORD)v69); + std::string::reserve(&v101, (unsigned int)(*(char **)((char *)&Streama->_tmpfname + (_DWORD)v69) + 2)); + if ( v102 == 0x3FFFFFFF || v102 == 1073741822 ) + std::__throw_length_error((std::length_error *)"basic_string::append"); + std::string::_M_append(&v101, "./", 2u); + std::string::_M_append(&v101, *v57, (size_t)v57[1]); + v9 = std::string::append(&v101, "/app.wxss"); + std::string::basic_string(v104, v9); + std::string::operator=((unsigned __int8 **)v76, (int)v104); + std::string::_M_dispose(v104); + std::string::_M_dispose((void **)&v101); + v6 = (std::ostream::sentry *)((char *)v50 + 1); + goto LABEL_49; // v50++; v56 = 0; continue; + } + LABEL_57: + v50 = (std::ostream::sentry *)((char *)v50 + 1); + } + // main - 20 + if ( v67 == v66 && !v32 && !v35 ) + { + CommHead = Usage(v40, v33); + goto LABEL_106; // 销毁数据, return CommHead + } + Streamb = ___acrt_iob_func(1u); + if ( FileName && *FileName ) + Streamb = fopen(FileName, "w"); + if ( !v35 ) + { + for ( j = 0; -1431655765 * (((char *)v67 - (char *)v66) >> 3) > j; ++j ) + { + if ( ReadFile((char *)v66[6 * j], (unsigned int *)v83) ) + { + v59 = (const char *)v66[6 * j]; + v10 = ___acrt_iob_func(2u); + fprintf(v10, "%s not found\n", v59); + CommHead = 1; + goto LABEL_106; // 销毁数据, return CommHead + } + std::string::basic_string((char *)v104, (int)&v66[6 * j]); + std::string::basic_string(v107, (int)v83); + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>> + ::_M_emplace_unique>( + v77, + v104); + std::pair::~pair(v104); + } + } + // main - 25 + v88[0] = &v89; + v88[1] = 0; + v89 = 0; + + // errorMessage + v90[0] = &v91; + v90[1] = 0; + v91 = 0; + + v72 = 0; + v73 = 0; + v74 = 0; + if ( !v30 ) + { + if ( !v36 ) + { + v25 = WXSS::LintAndParseCSSList(v77, (int)v66, (unsigned int *)v88, (int)v90, 0, v31, v37, v34, (int)v75); + goto LABEL_115; + } + LABEL_102: + v93[0] = 0; + v93[1] = 0; + v93[2] = (int)v93; + v93[3] = (int)v93; + v93[4] = 0; + + v94[0] = &v95; + v94[1] = 0; + v95 = 0; + + v96[0] = &v97; + v96[1] = 0; + v97 = 0; + + lpuexcpt = (struct _Unwind_Exception *)operator new(0xB0u); + WXSS::XCompiler::XCompiler((char *)lpuexcpt, v77, v37, (int)v75); + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>> + ::_M_erase(*((_DWORD *)lpuexcpt + 34)); + // offset_(34 * 4) = offset_136 + *((_DWORD *)lpuexcpt + 34) = 0; + *((_DWORD *)lpuexcpt + 35) = (char *)lpuexcpt + 132; + *((_DWORD *)lpuexcpt + 36) = (char *)lpuexcpt + 132; + v19 = *((_DWORD *)lpuexcpt + 40); + *((_DWORD *)lpuexcpt + 37) = 0; + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(v19); + *((_DWORD *)lpuexcpt + 40) = 0; + *((_DWORD *)lpuexcpt + 41) = (char *)lpuexcpt + 156; + *((_DWORD *)lpuexcpt + 42) = (char *)lpuexcpt + 156; + *((_DWORD *)lpuexcpt + 43) = 0; + std::string::_M_assign((int)v96, (int)lpuexcpt + 8); + v52 = *(std::ostream::sentry **)lpuexcpt; + if ( !*(_DWORD *)lpuexcpt ) + { + CommHead = (int)WXSS::XCompiler::GetCommHead((int)lpuexcpt, &v72, v94, 1, (int *)v76); + if ( CommHead ) + { + v21 = ___acrt_iob_func(2u); + fprintf(v21, "ERR: GetCommHead ret %d", CommHead); + } + while ( -1431655765 * ((v73 - (char *)v72) >> 3) > (unsigned int)v52 ) + { + v98 = (int)v100; + v99 = 0; + v100[0] = 0; + + WXML::Rewrite::ToStringCode((int)&v101, &v72[6 * (_DWORD)v52]); + CommHead = WXSS::XCompiler::GetPageCss((char *)lpuexcpt, &v101, &v98, 0); + if ( CommHead ) + { + v22 = ___acrt_iob_func(2u); + fprintf(v22, "INFO: GetPageCss fail ret %d", CommHead); + } + // current + std::string::basic_string((char *)v104, (int)&v72[6 * (_DWORD)v52]); + std::string::basic_string(v107, (int)&v98); + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_emplace_unique>( + v92, + v104); + std::pair::~pair(v104); + std::string::_M_dispose((void **)&v101); + std::string::_M_dispose((void **)&v98); + v52 = (std::ostream::sentry *)((char *)v52 + 1); + } + std::basic_stringstream,std::allocator>::basic_stringstream((int)v104); + v53 = std::operator<<>((std::ostream::sentry *)v105, "{\"common\":\""); + + EscapeToJsonString((int)&v101, (int)v94); + v23 = std::operator<<(v53, &v101); + + std::operator<<>(v23, "\",\"pageWxss\":"); + std::string::_M_dispose((void **)&v101); + DictToJsonString((int)&v101, (int)v92); + v24 = std::operator<<((std::ostream::sentry *)v105, &v101); + std::operator<<>(v24, "}"); + std::string::_M_dispose((void **)&v101); + std::stringbuf::str((int)&v101, (int)v106); + std::string::operator=((unsigned __int8 **)v88, (int)&v101); + std::string::_M_dispose((void **)&v101); + std::basic_stringstream,std::allocator>::~basic_stringstream((int)v104); + std::string::_M_dispose(v96); + std::string::_M_dispose(v94); + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree((int)v92); + goto LABEL_116; + } + v63 = (void *)*((_DWORD *)lpuexcpt + 1); + v47 = (const char *)v96[0]; + v20 = ___acrt_iob_func(2u); + fprintf(v20, "ERR: wxss GetCompiledResult: %s, error file count: %d, ret %d", v47, v63, v52); + std::string::_M_dispose(v96); + std::string::_M_dispose(v94); + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree((int)v92); + LABEL_104: + CommHead = 1; + goto LABEL_105; // return 1; + } + // main - 30 + for ( k = 0; v29 > k; ++k ) + { + if ( v73 == v74 ) + { + std::vector::_M_realloc_insert((void **)&v72, v73, (int)&v66[6 * k]); + } + else + { + std::string::basic_string(v73, (int)&v66[6 * k]); + v73 += 24; + } + } + v51 = v79; + v61 = (int *)v79; + v46 = &v78; + while ( v61 ) + { + v11 = (unsigned __int8)std::operator<((int)(v61 + 4), (int)v76) == 0; + v12 = v46; + v13 = (int *)v61[3]; + if ( v11 ) + { + v13 = (int *)v61[2]; + if ( v11 ) + v12 = v61; + } + v61 = v13; + v46 = v12; + } + // main - 35 + if ( v46 == &v78 ) + { + v14 = v46; + goto LABEL_89; + } + if ( (unsigned __int8)std::operator<((int)v76, (int)(v46 + 4)) ) + { + v14 = &v78; + LABEL_89: + insert_hint_unique_pos = v14; + while ( v51 ) + { + v15 = (unsigned __int8)std::operator<((int)v51 + 16, (int)v76) == 0; + v16 = (std::ostream::sentry *)insert_hint_unique_pos; + v17 = (std::ostream::sentry *)*((_DWORD *)v51 + 3); + if ( v15 ) + { + v17 = (std::ostream::sentry *)*((_DWORD *)v51 + 2); + if ( v15 ) + v16 = v51; + } + v51 = v17; + insert_hint_unique_pos = (int *)v16; + } + if ( insert_hint_unique_pos == &v78 + || (unsigned __int8)std::operator<((int)v76, (int)(insert_hint_unique_pos + 4)) ) + { + Block = (char *)operator new(0x40u); + std::string::basic_string(Block + 16, (int)v76); + *((_DWORD *)Block + 11) = 0; + Block[48] = 0; + *((_DWORD *)Block + 10) = Block + 48; + insert_hint_unique_pos = (int *)std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos( + v77, + insert_hint_unique_pos, + (int)(Block + 16)); + if ( v18 ) + { + insert_hint_unique_pos = std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_insert_node( + v77, + (int)insert_hint_unique_pos, + v18, + Block); + } + else + { + std::string::_M_dispose((void **)Block + 10); + std::string::_M_dispose((void **)Block + 4); + operator delete(Block); + } + } + std::string::operator=((unsigned int *)insert_hint_unique_pos + 10, (char *)&byte_50D216); + } + // main - 40 + if ( v36 ) + goto LABEL_102; + v25 = WXSS::NewLintAndParseCSSList(v77, (int *)&v72, (unsigned int *)v88, (int)v90, 0, v37, (int)v75, (int *)v76); +LABEL_115: + CommHead = (int)v25; +LABEL_116: + if ( CommHead ) + { + v64 = (const char *)v90[0]; + v26 = ___acrt_iob_func(2u); + fprintf(v26, "ERR: %s\nerror file count: %d\n", v64, 0); + goto LABEL_104; // 销毁数据,return 1; + } + fprintf(Streamb, "%s", (const char *)v88[0]); + fclose(Streamb); + // main - 45 +LABEL_105: + std::vector::~vector((void ***)&v72); + std::string::_M_dispose(v90); + std::string::_M_dispose(v88); +LABEL_106: + std::string::_M_dispose((void **)&v85); + std::vector::~vector(&v69); +LABEL_121: + std::string::_M_dispose((void **)v83); + std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::~_Rb_tree((int)v77); + std::vector::~vector(&v66); + std::string::_M_dispose(v76); + std::string::_M_dispose(v75); + return CommHead; +} +// 5042C7: variable 'v18' is possibly undefined +// 5036C0: using guessed type char var_1D8[4]; +// 5036C0: using guessed type char var_160[4]; +// 5036C0: using guessed type char var_E0[4]; +// 5036C0: using guessed type char var_DC[12]; + +//----- (00504C37) -------------------------------------------------------- +int _GLOBAL__sub_I__Z5UsageiPPKc() +{ + std::ios_base::Init::Init(); + return atexit(__tcf_1); +} + +//----- (00504C58) -------------------------------------------------------- +int _GLOBAL__sub_I__ZN4WXSS11RemoveQuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE() +{ + std::ios_base::Init::Init(); + return atexit(__tcf_3); +} + +//----- (00504C78) -------------------------------------------------------- +int _GLOBAL__sub_I__ZN4WXSS10CSSTreeLib6Parser5ParseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RS7_S9_() +{ + std::ios_base::Init::Init(); + return atexit(__tcf_1_1); +} + +//----- (00504C98) -------------------------------------------------------- +int _GLOBAL__sub_I__ZN4WXSS9Tokenizer2TTE() +{ + std::ios_base::Init::Init(); + return atexit(__tcf_0_0); +} + +//----- (00504CB8) -------------------------------------------------------- +int _GLOBAL__sub_I__ZN4WXSS10CSSTreeLib12TransitTable10GetTopTypeEv() +{ + std::ios_base::Init::Init(); + return atexit(__tcf_1_2); +} + +//----- (00504CD8) -------------------------------------------------------- +void __noreturn __cxxabiv1::throw_recursive_init_exception(void) +{ + _DWORD *exception; // ebx + + exception = __cxa_allocate_exception(4u); + __gnu_cxx::recursive_init_error::recursive_init_error(exception); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'__gnu_cxx::recursive_init_error, + (void (__cdecl *)(void *))__gnu_cxx::recursive_init_error::~recursive_init_error); +} +// 515CBC: using guessed type int *`typeinfo for'__gnu_cxx::recursive_init_error; + +//----- (00504D10) -------------------------------------------------------- +void _GLOBAL__sub_I__ZNSt12ctype_bynameIcEC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj() +{ + if ( !`guard variable for'std::moneypunct::id ) + `guard variable for'std::moneypunct::id = 1; + if ( !`guard variable for'std::moneypunct::id ) + `guard variable for'std::moneypunct::id = 1; + if ( !`guard variable for'std::money_get>::id ) + `guard variable for'std::money_get>::id = 1; + if ( !`guard variable for'std::money_put>::id ) + `guard variable for'std::money_put>::id = 1; + if ( !`guard variable for'std::numpunct::id ) + `guard variable for'std::numpunct::id = 1; + if ( !`guard variable for'std::time_get>::id ) + `guard variable for'std::time_get>::id = 1; + if ( !`guard variable for'std::messages::id ) + `guard variable for'std::messages::id = 1; + if ( !`guard variable for'std::collate::id ) + `guard variable for'std::collate::id = 1; +} +// 50B1A8: using guessed type char `guard variable for'std::moneypunct::id; +// 50B1B0: using guessed type char `guard variable for'std::moneypunct::id; +// 50B1C8: using guessed type char `guard variable for'std::collate::id; +// 50B1D8: using guessed type char `guard variable for'std::messages::id; +// 50B1E8: using guessed type char `guard variable for'std::numpunct::id; +// 50B1F8: using guessed type char `guard variable for'std::time_get>::id; +// 50B208: using guessed type char `guard variable for'std::money_get>::id; +// 50B218: using guessed type char `guard variable for'std::money_put>::id; + +//----- (00504DA0) -------------------------------------------------------- +void _GLOBAL__sub_I__ZNSt12ctype_bynameIwEC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj() +{ + if ( !`guard variable for'std::moneypunct::id ) + `guard variable for'std::moneypunct::id = 1; + if ( !`guard variable for'std::moneypunct::id ) + `guard variable for'std::moneypunct::id = 1; + if ( !`guard variable for'std::money_get>::id ) + `guard variable for'std::money_get>::id = 1; + if ( !`guard variable for'std::money_put>::id ) + `guard variable for'std::money_put>::id = 1; + if ( !`guard variable for'std::numpunct::id ) + `guard variable for'std::numpunct::id = 1; + if ( !`guard variable for'std::time_get>::id ) + `guard variable for'std::time_get>::id = 1; + if ( !`guard variable for'std::messages::id ) + `guard variable for'std::messages::id = 1; + if ( !`guard variable for'std::collate::id ) + `guard variable for'std::collate::id = 1; +} +// 50B1B8: using guessed type char `guard variable for'std::moneypunct::id; +// 50B1C0: using guessed type char `guard variable for'std::moneypunct::id; +// 50B1D0: using guessed type char `guard variable for'std::collate::id; +// 50B1E0: using guessed type char `guard variable for'std::messages::id; +// 50B1F0: using guessed type char `guard variable for'std::numpunct::id; +// 50B200: using guessed type char `guard variable for'std::time_get>::id; +// 50B210: using guessed type char `guard variable for'std::money_get>::id; +// 50B220: using guessed type char `guard variable for'std::money_put>::id; + +//----- (00504E30) -------------------------------------------------------- +void __noreturn std::__throw_bad_exception(void) +{ + _DWORD *exception; // eax + + exception = __cxa_allocate_exception(4u); + *exception = &off_51AA3C; + __cxa_throw(exception, (struct type_info *)&`typeinfo for'std::bad_exception, std::bad_exception::~bad_exception); +} +// 5164E0: using guessed type int *`typeinfo for'std::bad_exception; +// 51AA3C: using guessed type void (__cdecl *off_51AA3C)(std::bad_exception *__hidden this); + +//----- (00504E60) -------------------------------------------------------- +void __noreturn std::__throw_bad_alloc(void) +{ + _DWORD *exception; // eax + + exception = __cxa_allocate_exception(4u); + *exception = &off_51B7BC; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::bad_alloc, + (void (__cdecl *)(void *))std::bad_alloc::~bad_alloc); +} +// 516A68: using guessed type int *`typeinfo for'std::bad_alloc; +// 51B7BC: using guessed type void (__cdecl *off_51B7BC)(std::bad_alloc *__hidden this); + +//----- (00504E90) -------------------------------------------------------- +void __noreturn std::__throw_bad_cast(void) +{ + _DWORD *exception; // eax + + exception = __cxa_allocate_exception(4u); + *exception = &off_51B6A0; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::bad_cast, + (void (__cdecl *)(void *))std::bad_cast::~bad_cast); +} +// 5169A4: using guessed type int *`typeinfo for'std::bad_cast; +// 51B6A0: using guessed type void (__cdecl *off_51B6A0)(std::bad_cast *__hidden this); + +//----- (00504EC0) -------------------------------------------------------- +void __noreturn std::__throw_bad_typeid(void) +{ + _DWORD *exception; // eax + + exception = __cxa_allocate_exception(4u); + *exception = &off_51A83C; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::bad_typeid, + (void (__cdecl *)(void *))std::bad_typeid::~bad_typeid); +} +// 5163B0: using guessed type int `typeinfo for'std::bad_typeid; +// 51A83C: using guessed type void (__cdecl *off_51A83C)(std::bad_typeid *__hidden this); + +//----- (00504EF0) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_logic_error(std::logic_error *a1) +{ + const char *v1; // [esp+4h] [ebp-54h] + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(8u); + std::logic_error::logic_error(exception, a1, v1); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::logic_error, + (void (__cdecl *)(void *))std::logic_error::~logic_error); +} +// 504F3B: variable 'v1' is possibly undefined +// 51646C: using guessed type int *`typeinfo for'std::logic_error; + +//----- (00504F88) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_domain_error(std::domain_error *a1) +{ + const char *v1; // [esp+4h] [ebp-54h] + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(8u); + std::domain_error::domain_error(exception, a1, v1); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::domain_error, + (void (__cdecl *)(void *))std::domain_error::~domain_error); +} +// 504FD3: variable 'v1' is possibly undefined +// 5164A4: using guessed type int *`typeinfo for'std::domain_error; + +//----- (00505020) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_invalid_argument(std::invalid_argument *a1) +{ + const char *v1; // [esp+4h] [ebp-54h] + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(8u); + std::invalid_argument::invalid_argument(exception, a1, v1); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::invalid_argument, + (void (__cdecl *)(void *))std::invalid_argument::~invalid_argument); +} +// 50506B: variable 'v1' is possibly undefined +// 5166D4: using guessed type int *`typeinfo for'std::invalid_argument; + +//----- (005050B8) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_length_error(std::length_error *a1) +{ + const char *v1; // [esp+4h] [ebp-54h] + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(8u); + std::length_error::length_error(exception, a1, v1); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::length_error, + (void (__cdecl *)(void *))std::length_error::~length_error); +} +// 505103: variable 'v1' is possibly undefined +// 5164B0: using guessed type int *`typeinfo for'std::length_error; + +//----- (00505150) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_out_of_range(std::out_of_range *a1) +{ + const char *v1; // [esp+4h] [ebp-54h] + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(8u); + std::out_of_range::out_of_range(exception, a1, v1); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::out_of_range, + (void (__cdecl *)(void *))std::out_of_range::~out_of_range); +} +// 50519B: variable 'v1' is possibly undefined +// 5164BC: using guessed type int *`typeinfo for'std::out_of_range; + +//----- (005051E8) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_runtime_error(std::runtime_error *a1) +{ + const char *v1; // [esp+4h] [ebp-54h] + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(8u); + std::runtime_error::runtime_error(exception, a1, v1); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::runtime_error, + (void (__cdecl *)(void *))std::runtime_error::~runtime_error); +} +// 505233: variable 'v1' is possibly undefined +// 516554: using guessed type int *`typeinfo for'std::runtime_error; + +//----- (00505280) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_range_error(std::range_error *a1) +{ + const char *v1; // [esp+4h] [ebp-54h] + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(8u); + std::range_error::range_error(exception, a1, v1); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::range_error, + (void (__cdecl *)(void *))std::range_error::~range_error); +} +// 5052CB: variable 'v1' is possibly undefined +// 516478: using guessed type int *`typeinfo for'std::range_error; + +//----- (00505318) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_overflow_error(std::overflow_error *a1) +{ + const char *v1; // [esp+4h] [ebp-54h] + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(8u); + std::overflow_error::overflow_error(exception, a1, v1); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::overflow_error, + (void (__cdecl *)(void *))std::overflow_error::~overflow_error); +} +// 505363: variable 'v1' is possibly undefined +// 5165E0: using guessed type int *`typeinfo for'std::overflow_error; + +//----- (005053B0) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_underflow_error(std::underflow_error *a1) +{ + const char *v1; // [esp+4h] [ebp-54h] + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(8u); + std::underflow_error::underflow_error(exception, a1, v1); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::underflow_error, + (void (__cdecl *)(void *))std::underflow_error::~underflow_error); +} +// 5053FB: variable 'v1' is possibly undefined +// 5166A4: using guessed type int *`typeinfo for'std::underflow_error; + +//----- (00505450) -------------------------------------------------------- +void _GLOBAL__sub_I__ZNSt12ctype_bynameIcEC2ERKSsj() +{ + if ( !`guard variable for'std::moneypunct::id ) + `guard variable for'std::moneypunct::id = 1; + if ( !`guard variable for'std::moneypunct::id ) + `guard variable for'std::moneypunct::id = 1; + if ( !`guard variable for'std::money_get>::id ) + `guard variable for'std::money_get>::id = 1; + if ( !`guard variable for'std::money_put>::id ) + `guard variable for'std::money_put>::id = 1; + if ( !`guard variable for'std::numpunct::id ) + `guard variable for'std::numpunct::id = 1; + if ( !`guard variable for'std::num_get>::id ) + `guard variable for'std::num_get>::id = 1; + if ( !`guard variable for'std::num_put>::id ) + `guard variable for'std::num_put>::id = 1; + if ( !`guard variable for'std::__timepunct::id ) + `guard variable for'std::__timepunct::id = 1; + if ( !`guard variable for'std::time_put>::id ) + `guard variable for'std::time_put>::id = 1; + if ( !`guard variable for'std::time_get>::id ) + `guard variable for'std::time_get>::id = 1; + if ( !`guard variable for'std::messages::id ) + `guard variable for'std::messages::id = 1; + if ( !`guard variable for'std::collate::id ) + `guard variable for'std::collate::id = 1; +} +// 50B178: using guessed type char `guard variable for'std::moneypunct::id; +// 50B180: using guessed type char `guard variable for'std::moneypunct::id; +// 50B198: using guessed type char `guard variable for'std::__timepunct::id; +// 50B228: using guessed type char `guard variable for'std::collate::id; +// 50B238: using guessed type char `guard variable for'std::num_get>::id; +// 50B248: using guessed type char `guard variable for'std::num_put>::id; +// 50B258: using guessed type char `guard variable for'std::messages::id; +// 50B268: using guessed type char `guard variable for'std::numpunct::id; +// 50B278: using guessed type char `guard variable for'std::time_get>::id; +// 50B288: using guessed type char `guard variable for'std::time_put>::id; +// 50B298: using guessed type char `guard variable for'std::money_get>::id; +// 50B2A8: using guessed type char `guard variable for'std::money_put>::id; + +//----- (00505520) -------------------------------------------------------- +void _GLOBAL__sub_I__ZNSt12ctype_bynameIwEC2ERKSsj() +{ + if ( !`guard variable for'std::moneypunct::id ) + `guard variable for'std::moneypunct::id = 1; + if ( !`guard variable for'std::moneypunct::id ) + `guard variable for'std::moneypunct::id = 1; + if ( !`guard variable for'std::money_get>::id ) + `guard variable for'std::money_get>::id = 1; + if ( !`guard variable for'std::money_put>::id ) + `guard variable for'std::money_put>::id = 1; + if ( !`guard variable for'std::numpunct::id ) + `guard variable for'std::numpunct::id = 1; + if ( !`guard variable for'std::num_get>::id ) + `guard variable for'std::num_get>::id = 1; + if ( !`guard variable for'std::num_put>::id ) + `guard variable for'std::num_put>::id = 1; + if ( !`guard variable for'std::__timepunct::id ) + `guard variable for'std::__timepunct::id = 1; + if ( !`guard variable for'std::time_put>::id ) + `guard variable for'std::time_put>::id = 1; + if ( !`guard variable for'std::time_get>::id ) + `guard variable for'std::time_get>::id = 1; + if ( !`guard variable for'std::messages::id ) + `guard variable for'std::messages::id = 1; + if ( !`guard variable for'std::collate::id ) + `guard variable for'std::collate::id = 1; +} +// 50B188: using guessed type char `guard variable for'std::moneypunct::id; +// 50B190: using guessed type char `guard variable for'std::moneypunct::id; +// 50B1A0: using guessed type char `guard variable for'std::__timepunct::id; +// 50B230: using guessed type char `guard variable for'std::collate::id; +// 50B240: using guessed type char `guard variable for'std::num_get>::id; +// 50B250: using guessed type char `guard variable for'std::num_put>::id; +// 50B260: using guessed type char `guard variable for'std::messages::id; +// 50B270: using guessed type char `guard variable for'std::numpunct::id; +// 50B280: using guessed type char `guard variable for'std::time_get>::id; +// 50B290: using guessed type char `guard variable for'std::time_put>::id; +// 50B2A0: using guessed type char `guard variable for'std::money_get>::id; +// 50B2B0: using guessed type char `guard variable for'std::money_put>::id; + +//----- (005055F0) -------------------------------------------------------- +void __cdecl __noreturn d_type_cold( + int a1, + int a2, + int a3, + int a4, + int a5, + int a6, + int a7, + int a8, + int a9, + int a10, + int a11) +{ + BUG(); +} + +//----- (00505690) -------------------------------------------------------- +int _GLOBAL__sub_I__ZN9__gnu_cxx9__freeresEv() +{ + _DWORD *v0; // eax + + if ( _CRT_MT ) + __gthr_win32_mutex_init_function(`anonymous namespace'::emergency_pool); + dword_50B418 = 18944; + v0 = malloc(0x4A00u); + Block = v0; + if ( v0 ) + { + dword_50B410 = (int)v0; + *v0 = 18944; + v0[1] = 0; + } + else + { + dword_50B418 = 0; + dword_50B410 = 0; + } + return atexit(__tcf_0_3); +} +// 50B0F0: using guessed type int _CRT_MT; +// 50B408: using guessed type _DWORD `anonymous namespace'::emergency_pool[2]; +// 50B410: using guessed type int dword_50B410; +// 50B418: using guessed type int dword_50B418; + +//----- (00505710) -------------------------------------------------------- +void __noreturn __cxa_bad_cast(void) +{ + _DWORD *exception; // eax + + exception = __cxa_allocate_exception(4u); + *exception = &off_51B6A0; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::bad_cast, + (void (__cdecl *)(void *))std::bad_cast::~bad_cast); +} +// 5169A4: using guessed type int *`typeinfo for'std::bad_cast; +// 51B6A0: using guessed type void (__cdecl *off_51B6A0)(std::bad_cast *__hidden this); + +//----- (00505740) -------------------------------------------------------- +void __noreturn __cxa_bad_typeid(void) +{ + _DWORD *exception; // eax + + exception = __cxa_allocate_exception(4u); + *exception = &off_51A83C; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::bad_typeid, + (void (__cdecl *)(void *))std::bad_typeid::~bad_typeid); +} +// 5163B0: using guessed type int `typeinfo for'std::bad_typeid; +// 51A83C: using guessed type void (__cdecl *off_51A83C)(std::bad_typeid *__hidden this); + +//----- (00505770) -------------------------------------------------------- +void __noreturn __cxa_throw_bad_array_new_length(void) +{ + _DWORD *exception; // eax + + exception = __cxa_allocate_exception(4u); + *exception = &off_51B1F8; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::bad_array_new_length, + (void (__cdecl *)(void *))std::bad_array_new_length::~bad_array_new_length); +} +// 5167B8: using guessed type int *`typeinfo for'std::bad_array_new_length; +// 51B1F8: using guessed type void (__cdecl *off_51B1F8)(std::bad_array_new_length *__hidden this); + +//----- (005057A0) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_ios_failure(char *a1) +{ + char *v1; // eax + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(0x18u); + if ( !(_BYTE)`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec ) + { + if ( __cxa_guard_acquire(&`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec) ) + { + __cxa_guard_release(&`guard variable for'`anonymous namespace'::__io_category_instance(void)::__ec); + atexit((_PVFV)__tcf_0_4); + } + } + std::system_error::system_error(exception, 1, (int)&`anonymous namespace'::__io_category_instance(void)::__ec, a1); + *exception = &off_51AA28; + v1 = (char *)std::runtime_error::what((int)exception); + std::__construct_ios_failure(exception + 4, v1); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::__ios_failure, + (void (__cdecl *)(void *))std::__ios_failure::~__ios_failure); +} +// 50CBD0: using guessed type void (__cdecl **`anonymous namespace'::__io_category_instance(void)::__ec)(_anonymous_namespace_::io_error_category *__hidden this); +// 5164D4: using guessed type int *`typeinfo for'std::__ios_failure; +// 51AA28: using guessed type void (__cdecl *off_51AA28)(std::__ios_failure *__hidden this); + +//----- (005058C0) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_ios_failure(std::__ios_failure *a1, std::runtime_error *a2) +{ + int v2; // [esp+8h] [ebp-50h] + _DWORD *exception; // [esp+18h] [ebp-40h] + + exception = __cxa_allocate_exception(0x18u); + std::__ios_failure::__ios_failure(exception, a1, (int)a2, v2); + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::__ios_failure, + (void (__cdecl *)(void *))std::__ios_failure::~__ios_failure); +} +// 505912: variable 'v2' is possibly undefined +// 5164D4: using guessed type int *`typeinfo for'std::__ios_failure; + +//----- (00505960) -------------------------------------------------------- +void __cdecl __noreturn std::__throw_system_error(int a1) +{ + _DWORD *exception; // [esp+18h] [ebp-60h] + void *Block[2]; // [esp+58h] [ebp-20h] BYREF + char v3; // [esp+60h] [ebp-18h] BYREF + + exception = __cxa_allocate_exception(0x10u); + `anonymous namespace'::system_error_category::message[abi:cxx11]( + Block, + (int)&`anonymous namespace'::generic_category_instance, + a1); + std::runtime_error::runtime_error(exception, (int)Block); + if ( Block[0] != &v3 ) + operator delete(Block[0]); + *exception = &off_51AA14; + exception[2] = a1; + exception[3] = &`anonymous namespace'::generic_category_instance; + __cxa_throw( + exception, + (struct type_info *)&`typeinfo for'std::system_error, + (void (__cdecl *)(void *))std::system_error::~system_error); +} +// 50BFC8: using guessed type void (__cdecl **`anonymous namespace'::generic_category_instance)(_anonymous_namespace_::generic_error_category *__hidden this); +// 5164C8: using guessed type int *`typeinfo for'std::system_error; +// 51AA14: using guessed type void (__cdecl *off_51AA14)(std::system_error *__hidden this); + +//----- (00505A60) -------------------------------------------------------- +int _GLOBAL__sub_I__ZSt20__throw_system_errori() +{ + atexit(__tcf_0_5); + return atexit(__tcf_1_3); +} + +// nfuncs=4282 queued=4084 decompiled=4084 lumina nreq=0 worse=0 better=0 +#error "There were 6 decompilation failure(s) on 4084 function(s)"