Skip to content

Instantly share code, notes, and snippets.

@isublimity
Created March 25, 2024 19:15
Show Gist options
  • Save isublimity/837bee4910e24cfc8b29e182812b6e9f to your computer and use it in GitHub Desktop.
Save isublimity/837bee4910e24cfc8b29e182812b6e9f to your computer and use it in GitHub Desktop.
/* This file was generated by the Hex-Rays decompiler version 7.7.0.220118.
Copyright (c) 2007-2021 Hex-Rays <info@hex-rays.com>
Detected compiler: GNU C++
*/
#include <defs.h>
//-------------------------------------------------------------------------
// Function declarations
void sub_13290();
// __int64 __fastcall std::stoul(_QWORD, _QWORD, _QWORD); weak
// __int64 __fastcall std::string::insert(_QWORD, _QWORD, _QWORD, _QWORD); weak
// void *memmove(void *dest, const void *src, size_t n);
// __int64 __fastcall sysctlbyname(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD); weak
// __int64 __fastcall std::ostream::operator<<(_QWORD, _QWORD); weak
// int __fastcall __cxa_finalize(void *);
// int pthread_mutex_lock(pthread_mutex_t *mutex);
// __int64 __fastcall fnv::analytics::DiagnosticEvent::sendAsync(_QWORD, _QWORD, _QWORD); weak
// __int64 __fastcall std::operator+<char>(_QWORD, _QWORD); weak
// __int64 __fastcall std::string::basic_string(_QWORD, _QWORD); weak
// size_t fread(void *ptr, size_t size, size_t n, FILE *stream);
// int socket(int domain, int type, int protocol);
// void __fastcall operator delete(void *); idb
// __int64 __fastcall std::locale::has_facet(_QWORD, _QWORD); weak
// _QWORD __fastcall operator new[](unsigned __int64); idb
// int close(int fd);
// _QWORD __fastcall std::logic_error::logic_error(std::logic_error *__hidden this, const char *); idb
// _QWORD std::ios_base::getloc(std::ios_base *__hidden this); idb
// __int64 __fastcall std::ostream::sentry::sentry(_QWORD, _QWORD); weak
// int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *file_actions, int fd);
// __int64 __fastcall std::string::resize(_QWORD, _QWORD, _QWORD); weak
// __int64 __fastcall std::ios::~ios(_QWORD); weak
// int strncmp(const char *s1, const char *s2, size_t n);
// int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *file_actions);
// void __cxa_end_catch(void);
// void *__fastcall __cxa_allocate_exception(size_t thrown_size);
// __int64 __fastcall __get_errno_ptr(_QWORD); weak
// char *strerror(int errnum);
// void free(void *ptr);
// __int64 __fastcall getifaddrs_fib(_QWORD, _QWORD); weak
// __int64 __fastcall std::stoi(_QWORD, _QWORD, _QWORD); weak
// _QWORD std::mutex::unlock(std::mutex *__hidden this); idb
// void __noreturn abort(void);
// int unlink(const char *name);
// __int64 __fastcall std::ostream::put(_QWORD, _QWORD); weak
// __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD); weak
// __int64 __fastcall std::string::operator=(_QWORD); weak
// int fflush(FILE *stream);
// __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD, _QWORD); weak
// int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *file_actions, int fd, int newfd);
// __pid_t waitpid(__pid_t pid, int *stat_loc, int options);
// __int64 __fastcall std::istream::sentry::sentry(_QWORD, _QWORD, _QWORD); weak
// void *memcpy(void *dest, const void *src, size_t n);
// __int64 pathconf(const char *path, int name);
// int rand(void);
// __int64 __fastcall fnv::analytics::DiagnosticEvent::Builder::Builder(_QWORD, _QWORD); weak
// int pthread_mutex_unlock(pthread_mutex_t *mutex);
// __int64 __fastcall std::ostream::flush(_QWORD); weak
// __int64 __fastcall fnv::analytics::DiagnosticEvent::Builder::setDescription(_QWORD, _QWORD); weak
// int closedir(DIR *dirp);
// __int64 __fastcall std::ostream::sentry::~sentry(_QWORD); weak
// int posix_spawn(pid_t *pid, const char *path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t *attrp, char *const argv[], char *const envp[]);
// void *memset(void *s, int c, size_t n);
// __int64 __fastcall fnv::analytics::DiagnosticEvent::Builder::addLogs(_QWORD, _QWORD); weak
// _QWORD __fastcall std::locale::locale(std::locale *__hidden this, const std::locale *); idb
// int chown(const char *file, __uid_t owner, __gid_t group);
// __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD); weak
// _QWORD Logger::e(Logger *__hidden this, const char *, ...); idb
// __int64 __fastcall procmgr_ability_lookup(_QWORD); weak
// size_t confstr(int name, char *buf, size_t len);
// __int64 __fastcall std::streambuf::~streambuf(_QWORD); weak
// void __fastcall std::locale::~locale(std::locale *__hidden this); idb
// __int64 __fastcall std::locale::use_facet(_QWORD, _QWORD); weak
// ssize_t read(int fd, void *buf, size_t nbytes);
// _QWORD __fastcall std::ios_base::init(std::ios_base *__hidden this, void *); idb
// void freeifaddrs(struct ifaddrs *ifa);
// _QWORD Logger::i(Logger *__hidden this, const char *, ...); idb
// __int64 __fastcall std::streambuf::basic_streambuf(_QWORD); weak
// _QWORD std::bad_cast::bad_cast(std::bad_cast *__hidden this); idb
// int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
// _QWORD __fastcall std::__next_prime(std::__1 *__hidden this, unsigned __int64); idb
// int posix_spawn_file_actions_init(posix_spawn_file_actions_t *file_actions);
// void __fastcall operator delete[](void *); idb
// __int64 __fastcall std::string::assign(_QWORD, _QWORD); weak
// int atoi(const char *nptr);
// DIR *opendir(const char *name);
// _QWORD std::ios_base::__set_badbit_and_consider_rethrow(std::ios_base *__hidden this); idb
// int initgroups(const char *user, __gid_t group);
// size_t fwrite(const void *ptr, size_t size, size_t n, FILE *s);
// FILE *fopen(const char *filename, const char *modes);
// int mkdir(const char *path, __mode_t mode);
// __int64 __fastcall res_init(_QWORD); weak
// __int64 __fastcall procmgr_ability(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD); weak
// _QWORD __fastcall std::to_string(std::__1 *__hidden this, int); idb
// void *__fastcall __cxa_begin_catch(void *);
// _QWORD __fastcall std::to_string(std::__1 *__hidden this, unsigned __int64); idb
// void __fastcall __noreturn __cxa_throw(void *, struct type_info *lptinfo, void (__fastcall *)(void *));
// __int64 __fastcall std::string::insert(_QWORD, _QWORD, _QWORD); weak
// __pid_t getpid(void);
// __int64 __fastcall Logger::getInstanceTo(_QWORD, _QWORD); weak
// void *memchr(const void *s, int c, size_t n);
// int setsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen);
// ssize_t write(int fd, const void *buf, size_t n);
// __int64 __fastcall std::__vector_base_common<true>::__throw_length_error(_QWORD); weak
// __int64 __fastcall spawn(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD); weak
// __int64 std::ostream::operator<<(void); weak
// int pipe(int pipedes[2]);
// __int64 __fastcall std::string::push_back(_QWORD, _QWORD); weak
// __int64 __fastcall std::string::find(_QWORD, _QWORD, _QWORD); weak
// _QWORD Logger::d(Logger *__hidden this, const char *, ...); idb
// __int64 __fastcall std::string::~string(_QWORD); weak
// int dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *), void *data);
// char *strncpy(char *dest, const char *src, size_t n);
// int memcmp(const void *s1, const void *s2, size_t n);
// int fclose(FILE *stream);
// __int64 __fastcall std::string::compare(_QWORD, _QWORD); weak
// __int64 std::__basic_string_common<true>::__throw_length_error(void); weak
// _QWORD fnv::analytics::DiagnosticEvent::Builder::build(fnv::analytics::DiagnosticEvent::Builder *__hidden this); idb
// const char *inet_ntop(int af, const void *cp, char *buf, socklen_t len);
// int ioctl(int fd, unsigned __int64 request, ...);
// __int64 __fastcall std::string::reserve(_QWORD, _QWORD); weak
// __int64 __fastcall Logger::getInstance(_QWORD); weak
// __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD); weak
// _QWORD __fastcall operator new(unsigned __int64); idb
// __int64 __fastcall std::iostream::~basic_iostream(_QWORD, _QWORD); weak
// __int64 __fastcall std::this_thread::sleep_for(_QWORD); weak
// int inet_aton(const char *cp, struct in_addr *inp);
// int kill(__pid_t pid, int sig);
// int open(const char *file, int oflag, ...);
// int __fastcall __cxa_atexit(void (__fastcall *lpfunc)(void *), void *obj, void *lpdso_handle);
// __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD); weak
// int fseeko(FILE *stream, __off_t off, int whence);
// size_t strlen(const char *s);
// void __fastcall fnv::analytics::DiagnosticEvent::Builder::~Builder(fnv::analytics::DiagnosticEvent::Builder *__hidden this); idb
// _QWORD __fastcall std::ios_base::clear(std::ios_base *__hidden this, unsigned int); idb
// int getifaddrs(struct ifaddrs **ifap);
// _QWORD Logger::w(Logger *__hidden this, const char *, ...); idb
// __int64 __fastcall std::string::erase(_QWORD, _QWORD); weak
// _QWORD std::mutex::lock(std::mutex *__hidden this); idb
// void __fastcall fnv::analytics::DiagnosticEvent::~DiagnosticEvent(fnv::analytics::DiagnosticEvent *__hidden this); idb
// int inet_pton(int af, const char *cp, void *buf);
// __off_t ftello(FILE *stream);
// __int64 __fastcall std::istream::~istream(_QWORD, _QWORD); weak
// __int64 __fastcall std::string::append(_QWORD, _QWORD); weak
// void *malloc(size_t size);
// int strcmp(const char *s1, const char *s2);
// __int64 __fastcall fnv::analytics::DiagnosticEvent::Builder::addLogSets(_QWORD, _QWORD); weak
// __int64 __fastcall fnv::analytics::DiagnosticEvent::Builder::addAttribute(_QWORD, _QWORD, _QWORD, _QWORD); weak
// struct dirent *readdir(DIR *dirp);
__int64 btext();
__int64 sub_13CE4();
__int64 sub_13DB8();
__int64 sub_13EAC();
__int64 sub_13F9C();
__int64 sub_147D4();
char *sub_14868();
__int64 sub_148E0();
char *sub_14940();
// __int64 __usercall fnv::vnm::TrimRight@<X0>(unsigned __int8 *a1@<X0>, __int64 a2@<X8>);
// __int64 __usercall fnv::vnm::TrimLeft@<X0>(unsigned __int8 *a1@<X0>, __int64 a2@<X8>);
// __int64 __usercall fnv::vnm::Trim@<X0>(unsigned __int8 *a1@<X0>, __int64 a2@<X8>);
__int64 __fastcall fnv::vnm::ConfigElement::log(fnv::vnm::ConfigElement *__hidden this); // idb
_QWORD **__fastcall sub_14BC0(_QWORD **result, _QWORD *a2, _QWORD *a3);
__int64 __fastcall fnv::vnm::ConfigElement::ConfigElement(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::ConfigElement::ConfigElement(__int64 result, __int64 a2);
void __fastcall fnv::vnm::ConfigElement::~ConfigElement(fnv::vnm::ConfigElement *__hidden this); // idb
void __fastcall fnv::vnm::ConfigElement::~ConfigElement(fnv::vnm::ConfigElement *__hidden this); // idb
__int64 __fastcall fnv::vnm::ConfigElement::operator=(__int64 a1, __int64 a2);
// __int64 __usercall fnv::vnm::ConfigElement::name@<X0>(fnv::vnm::ConfigElement *this@<X0>, __int64 a2@<X8>);
bool __fastcall sub_14E28(__int64 a1, fnv::vnm::ConfigElement **a2);
__int64 __fastcall fnv::vnm::ConfigElement::successful(fnv::vnm::ConfigElement *__hidden this); // idb
__int64 __fastcall fnv::vnm::ConfigElement::errorcode(fnv::vnm::ConfigElement *__hidden this); // idb
// _QWORD *__usercall fnv::vnm::ConfigElement::wrap@<X0>(fnv::vnm::ConfigElement *a1@<X1>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::ConfigElement::setRealName(__int64 a1);
// __int64 __usercall fnv::vnm::ConfigElement::realName@<X0>(fnv::vnm::ConfigElement *this@<X0>, __int64 a2@<X8>);
__int64 __fastcall fnv::vnm::ConfigElement::isSelected(fnv::vnm::ConfigElement *__hidden this); // idb
__int64 __fastcall fnv::vnm::ConfigElement::setSelected(__int64 this);
__int64 __fastcall fnv::vnm::ConfigElement::clearSelected(__int64 this);
__int64 __fastcall fnv::vnm::CompositeConfig::CompositeConfig(__int64 a1, __int64 a2);
_QWORD *__fastcall fnv::vnm::CompositeConfig::CompositeConfig(_QWORD *a1, _QWORD *a2);
// _QWORD *__usercall fnv::vnm::CompositeConfig::moveMe@<X0>(fnv::vnm::CompositeConfig *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::CompositeConfig::count(fnv::vnm::CompositeConfig *__hidden this); // idb
bool __fastcall fnv::vnm::CompositeConfig::empty(fnv::vnm::CompositeConfig *this);
__int64 __fastcall fnv::vnm::CompositeConfig::overrideSuccess(__int64 this);
_QWORD *__fastcall fnv::vnm::CompositeConfig::find(__int64 a1, __int64 a2);
bool __fastcall fnv::vnm::CompositeConfig::exists(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::CompositeConfig::log(fnv::vnm::CompositeConfig *__hidden this); // idb
__int64 __fastcall fnv::vnm::CompositeConfig::begin(fnv::vnm::CompositeConfig *__hidden this); // idb
__int64 __fastcall fnv::vnm::CompositeConfig::end(fnv::vnm::CompositeConfig *__hidden this); // idb
bool __fastcall fnv::vnm::CompositeConfig::isEnd(__int64 a1, __int64 a2, __int64 a3);
_QWORD *__fastcall fnv::vnm::CompositeConfig::find(__int64 a1, __int64 a2);
unsigned __int64 __fastcall fnv::vnm::CompositeConfig::clearSelection(fnv::vnm::CompositeConfig *this);
unsigned __int64 __fastcall fnv::vnm::CompositeConfig::clear(fnv::vnm::CompositeConfig *this);
void __fastcall fnv::vnm::CompositeConfig::~CompositeConfig(fnv::vnm::CompositeConfig *__hidden this); // idb
void __fastcall fnv::vnm::CompositeConfig::~CompositeConfig(fnv::vnm::CompositeConfig *__hidden this); // idb
__int64 __fastcall fnv::vnm::CompositeConfig::maybePush(fnv::vnm::CompositeConfig *__hidden this, fnv::vnm::ConfigElement *); // idb
__int64 __fastcall fnv::vnm::CompositeConfig::remove(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::CompositeConfig::removeSelected(fnv::vnm::CompositeConfig *__hidden this); // idb
__int64 __fastcall fnv::vnm::CompositeConfig::operator=(__int64 a1, _QWORD *a2);
// _QWORD *__usercall fnv::vnm::CompositeConfig::describe@<X0>(fnv::vnm::CompositeConfig *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall std::stringbuf::seekoff(__int64 a1, __int64 a2, int a3, char a4);
__int64 __fastcall sub_15F44(__int64 a1, __int64 a2, __int64 a3);
__int64 __fastcall std::stringbuf::underflow(__int64 a1);
__int64 __fastcall std::stringbuf::pbackfail(__int64 a1, unsigned int a2);
__int64 __fastcall std::stringbuf::~stringbuf(_QWORD *a1);
void __fastcall std::stringbuf::~stringbuf(_QWORD *a1);
__int64 __fastcall std::stringbuf::overflow(__int64 a1, int a2);
__int64 __fastcall std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(_QWORD *a1);
__int64 __fastcall std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(__int64 a1);
__int64 __fastcall std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(__int64 a1);
__int64 __fastcall std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(_QWORD *a1);
unsigned __int64 __fastcall std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::clear(_QWORD *a1);
__int64 __fastcall sub_163A4(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, unsigned __int8 a6);
_QWORD *__fastcall std::__put_character_sequence<char,std::char_traits<char>>(_QWORD *a1, __int64 a2, __int64 a3);
__int64 __fastcall std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::__split_buffer(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4);
void __fastcall std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::~__split_buffer(__int64 a1);
__int64 __fastcall std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *>>::push_front(__int64 *a1, _QWORD *a2);
__int64 __fastcall std::deque<std::unique_ptr<fnv::vnm::ConfigElement>>::__add_front_capacity(__int64 *a1);
_QWORD *__fastcall std::move_backward<std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement> **,long,512l>(_QWORD *a1, _QWORD *a2, _QWORD *a3, __int64 a4);
_QWORD *__fastcall std::move_backward<std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l>(char *a1, _QWORD *a2, _QWORD *a3, _QWORD *a4, _QWORD *a5, __int64 a6);
_QWORD *__fastcall std::move<std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement> **,long,512l>(__int64 a1, __int64 a2, _QWORD *a3, __int64 a4);
_QWORD *__fastcall std::move<std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l>(_QWORD *a1, __int64 a2, char *a3, __int64 a4, _QWORD *a5, __int64 a6);
_QWORD *__fastcall std::deque<std::unique_ptr<fnv::vnm::ConfigElement>>::erase(__int64 a1, char *a2, _QWORD *a3);
_QWORD *__fastcall std::deque<std::unique_ptr<fnv::vnm::ConfigElement>>::erase(__int64 a1, char *a2, __int64 *a3, char *a4, __int64 *a5);
__int64 __fastcall std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *>>::shrink_to_fit(__int64 *a1);
__int64 __fastcall std::string::__init<char *>(__int64 a1, __int64 a2, __int64 a3);
void __fastcall sub_17A48(__int64 (__fastcall ***a1)(), int a2, __int64 a3);
void __fastcall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(__int64 (__fastcall ***a1)());
void __fastcall `non-virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(__int64 a1);
void __fastcall `virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(_QWORD *a1);
void __fastcall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(__int64 (__fastcall ***a1)());
void __fastcall `non-virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(__int64 a1);
void __fastcall `virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(_QWORD *a1);
void __fastcall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(__int64 (__fastcall ***a1)(), __int64 a2);
__int64 __fastcall sub_17B8C(unsigned int a1);
__int64 __fastcall sub_17B94(int a1, __int64 a2, unsigned int *a3);
__int64 __fastcall sub_17CD8(unsigned __int16 *a1, __int64 a2, __int64 a3);
__int64 __fastcall sub_17E28(unsigned __int8 *a1, unsigned int a2, __int64 *a3, __int64 a4);
// _QWORD *__usercall fnv::vnm::GetIfAddress@<X0>(__int64 a1@<X0>, __int64 a2@<X1>, _QWORD *a3@<X8>);
// _QWORD *__usercall fnv::vnm::FindIfName@<X0>(__int64 a1@<X0>, __int64 a2@<X1>, _QWORD *a3@<X8>);
__int64 __fastcall fnv::vnm::Ipv4AddrFromBits(fnv::vnm *this, unsigned __int64 a2, int a3, unsigned __int64 a4, unsigned int a5);
// _QWORD *__usercall fnv::vnm::StringFromIpv4Addr@<X0>(fnv::vnm *this@<X0>, _QWORD *a2@<X8>);
bool __fastcall fnv::vnm::ValidateIpv4Address(__int64 a1);
__int64 __fastcall fnv::vnm::ValidateIfname(__int64 a1);
__int64 __fastcall fnv::vnm::Ipv4AddrFromString(__int64 a1, void *buf);
__int64 __fastcall fnv::vnm::Ipv4Prefixlen2Mask(fnv::vnm *this, _DWORD *a2, unsigned int *a3);
__int64 __fastcall fnv::vnm::GetIfaceFlags(unsigned __int8 *a1, _QWORD *a2, __int64 a3);
__int64 __fastcall fnv::vnm::CreateCloneIface(unsigned __int8 *a1, __int64 a2);
__int64 fnv::vnm::CreateVlanIface();
__int64 __fastcall fnv::vnm::DestroyCloneIface(unsigned __int8 *a1, __int64 a2);
__int64 fnv::vnm::DeleteVlanIface();
__int64 __fastcall fnv::vnm::DeleteTunnel(unsigned __int8 *a1, __int64 a2);
__int64 __fastcall fnv::vnm::SetIfaceVlan(unsigned __int8 *a1, __int64 a2, int a3, __int64 a4);
__int64 __fastcall fnv::vnm::SetIfaceMtu(unsigned __int8 *a1, int a2, __int64 a3);
__int64 __fastcall fnv::vnm::SetIfaceLink1Flag(unsigned __int8 *a1, __int64 a2);
__int64 __fastcall fnv::vnm::SetIfaceNetPrefixLen(__int64 a1, unsigned __int64 a2);
__int64 __fastcall sub_18E8C(unsigned __int8 *a1, unsigned int a2, char *a3, __int64 a4);
__int64 __fastcall fnv::vnm::SetIfaceAddr(__int64 a1, char *a2, __int64 a3);
__int64 __fastcall fnv::vnm::DelIfaceAddr(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::SetIfaceDstAddr(__int64 a1, char *a2, __int64 a3);
__int64 __fastcall fnv::vnm::SetGreSA(__int64 a1, char *a2, __int64 a3);
__int64 __fastcall fnv::vnm::SetGreDA(__int64 a1, char *a2, __int64 a3);
__int64 __fastcall fnv::vnm::AddDefRoute(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::DelDefRoute(__int64 a1, __int64 a2);
// _QWORD *__usercall sub_194D0@<X0>(__int64 a1@<X0>, char *a2@<X1>, _QWORD *a3@<X8>);
__int64 __fastcall sub_19690(__int64 result, __int64 a2, __int64 a3);
__int64 __fastcall fnv::vnm::DnsForwardEntry::DnsForwardEntry(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::Bind9DnsForwardEntry::Bind9DnsForwardEntry(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::JournalPrefix::makeJournalDir(fnv::vnm::JournalPrefix *__hidden this); // idb
__int64 __fastcall fnv::vnm::JournalPrefix::JournalPrefix(fnv::vnm::JournalPrefix *__hidden this); // idb
__int64 __fastcall fnv::vnm::JournalPrefix::instance(fnv::vnm::JournalPrefix *__hidden this); // idb
// __int64 __usercall fnv::vnm::JournalPrefix::getPath@<X0>(fnv::vnm::JournalPrefix *this@<X0>, __int64 a2@<X8>);
void __fastcall fnv::vnm::JournalEntry::~JournalEntry(fnv::vnm::JournalEntry *__hidden this); // idb
void __fastcall fnv::vnm::JournalEntry::~JournalEntry(fnv::vnm::JournalEntry *__hidden this); // idb
void (__fastcall **__fastcall fnv::vnm::JournalEntry::JournalEntry(_QWORD *a1, __int64 a2))(fnv::vnm::JournalEntry *__hidden this);
// _QWORD *__usercall fnv::vnm::JournalEntry::moveMe@<X0>(fnv::vnm::JournalEntry *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::JournalProcessor::JournalProcessor(_QWORD *a1, __int64 a2);
void __fastcall fnv::vnm::JournalProcessor::~JournalProcessor(fnv::vnm::JournalProcessor *__hidden this); // idb
void __fastcall fnv::vnm::JournalProcessor::~JournalProcessor(fnv::vnm::JournalProcessor *__hidden this); // idb
__int64 __fastcall fnv::vnm::JournalProcessor::descend(__int64 a1, DIR *a2);
__int64 __fastcall fnv::vnm::JournalProcessor::go(fnv::vnm::JournalProcessor *__hidden this); // idb
__int64 __fastcall fnv::vnm::InstallForwarders(fnv::vnm *__hidden this); // idb
__int64 __fastcall fnv::vnm::setDhcpIdleMode(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::setDhcpClientMode(__int64 a1);
__int64 fnv::vnm::setDnsForDhcpServer();
__int64 __fastcall fnv::vnm::setDhcpServerMode(unsigned __int8 *a1, unsigned __int8 *a2);
__int64 __fastcall fnv::vnm::clearIpAddress(__int64 a1);
__int64 __fastcall fnv::vnm::setStaticIpAddress(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::RemoveNat(__int64 a1);
__int64 __fastcall fnv::vnm::LogWorthy(__int64 a1, const char *a2, unsigned int a3, __int64 a4);
void __fastcall fnv::vnm::DnsForwardEntry::~DnsForwardEntry(void **this);
void __fastcall fnv::vnm::DnsForwardEntry::~DnsForwardEntry(void **this);
void __fastcall fnv::vnm::Bind9DnsForwardEntry::~Bind9DnsForwardEntry(void **this);
void __fastcall fnv::vnm::Bind9DnsForwardEntry::~Bind9DnsForwardEntry(void **this);
__int64 __fastcall fnv::vnm::JournalEntry::JournalEntry(__int64 a1, __int64 a2);
_QWORD *__fastcall fnv::vnm::DnsForwardEntry::DnsForwardEntry(_QWORD *a1, __int64 *a2);
void (__fastcall **__fastcall fnv::vnm::Bind9DnsForwardEntry::Bind9DnsForwardEntry(_QWORD *a1, __int64 *a2))(fnv::vnm::Bind9DnsForwardEntry *__hidden this);
// _QWORD *__usercall fnv::vnm::Bind9DnsForwardEntry::moveMe@<X0>(fnv::vnm::Bind9DnsForwardEntry *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::DnsForwardEntry::addAddress(__int64 *a1, __int64 a2, int a3);
__int64 __fastcall fnv::vnm::DnsForwardEntry::rollback(fnv::vnm::DnsForwardEntry *__hidden this); // idb
__int64 __fastcall fnv::vnm::DnsForwardEntry::commit(fnv::vnm::DnsForwardEntry *__hidden this); // idb
__int64 __fastcall fnv::vnm::ListConnections(_QWORD *a1);
__int64 __fastcall fnv::vnm::ListInterfaces(_QWORD *a1);
__int64 __fastcall fnv::vnm::ListRules(_QWORD *a1);
__int64 __fastcall fnv::vnm::ListDns(_QWORD *a1);
// __int64 __usercall fnv::vnm::GetIpStats@<X0>(__int64 a1@<X8>);
__int64 __fastcall fnv::vnm::ListIpStats(_QWORD *a1);
// _QWORD *__usercall fnv::vnm::Bind9DnsForwardEntry::format@<X0>(fnv::vnm::Bind9DnsForwardEntry *this@<X0>, int a2@<W1>, int a3@<W2>, _QWORD *a4@<X8>);
// _QWORD *__usercall fnv::vnm::Bind9DnsForwardEntry::describe@<X0>(fnv::vnm::Bind9DnsForwardEntry *this@<X0>, _QWORD *a2@<X8>);
// _QWORD *__usercall fnv::vnm::JournalEntry::describe@<X0>(fnv::vnm::JournalEntry *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::InstallNat(__int64 a1);
void __fastcall std::__vector_base<fnv_analytics_logset_e>::~__vector_base(char **a1);
void __fastcall std::__vector_base<fnv_analytics_log_e>::~__vector_base(char **a1);
__int64 __fastcall std::function<void ()(fnv_analytics_event_info_t)>::~function(__int64 result);
void __fastcall std::__vector_base<fnv::vnm::DnsForwardEntry::DnsAddrProps>::~__vector_base(void **a1);
void __fastcall std::__vector_base<fnv::vnm::DnsForwardEntry::DnsRouteProps>::~__vector_base(void **a1);
_QWORD *__fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsRouteProps>::vector(_QWORD *result, __int64 *a2);
// _QWORD *__usercall std::operator+<char>@<X0>(__int64 a1@<X0>, __int64 a2@<X1>, _QWORD *a3@<X8>);
void __fastcall std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::~__hash_table(__int64 a1);
__int64 __fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::allocate(_QWORD *a1, unsigned __int64 a2);
_QWORD *__fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::vector(_QWORD *result, __int64 *a2);
char *__fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::assign<fnv::vnm::DnsForwardEntry::DnsAddrProps*>(__int64 a1, __int64 a2, __int64 a3);
__int64 __fastcall std::__split_buffer<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__split_buffer(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4);
void __fastcall std::__split_buffer<fnv::vnm::DnsForwardEntry::DnsAddrProps>::~__split_buffer(__int64 a1);
__int64 __fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__swap_out_circular_buffer(__int64 *a1, _QWORD *a2);
__int64 __fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__emplace_back_slow_path<fnv::vnm::DnsForwardEntry::DnsAddrProps&>(__int64 *a1, __int64 a2);
__int64 __fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::shrink_to_fit(__int64 *a1);
unsigned __int64 __fastcall std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_33_to_64(_QWORD *a1, __int64 a2);
unsigned __int64 __fastcall std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_16(__int64 a1, __int64 a2);
unsigned __int64 __fastcall std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_0_to_16(__int64 *a1, unsigned __int64 a2);
__int64 __fastcall std::__murmur2_or_cityhash<unsigned long,64ul>::__weak_hash_len_32_with_seeds(_QWORD *a1, __int64 a2);
unsigned __int64 __fastcall std::__murmur2_or_cityhash<unsigned long,64ul>::operator()(__int64 a1, _QWORD *a2, unsigned __int64 a3);
__int64 __fastcall std::stringbuf::str(__int64 a1);
_QWORD *__fastcall std::operator<<<char>(_QWORD *a1, __int64 a2);
_QWORD *__fastcall std::operator<<<std::char_traits<char>>(_QWORD *a1, char *s);
// __int64 __usercall std::unordered_map<std::string,unsigned long>::__construct_node<char const(&)[15],unsigned long &>@<X0>(__int64 a1@<X0>, const char *a2@<X1>, _QWORD *a3@<X2>, __int64 a4@<X8>);
// _QWORD *__usercall std::stringbuf::str@<X0>(__int64 a1@<X0>, _QWORD *a2@<X8>);
void __fastcall std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__rehash(__int64 a1, unsigned __int64 a2);
void __fastcall std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::rehash(__int64 a1, std::__1 *this);
__int64 *__fastcall std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__node_insert_unique(__int64 a1, __int64 *a2);
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[10],unsigned long &>(__int64 a1, const char *a2, _QWORD *a3);
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[11],unsigned long &>(__int64 a1, const char *a2, _QWORD *a3);
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[13],unsigned long &>(__int64 a1, const char *a2, _QWORD *a3);
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[12],unsigned long &>(__int64 a1, const char *a2, _QWORD *a3);
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[14],unsigned long &>(__int64 a1, const char *a2, _QWORD *a3);
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[16],unsigned long &>(__int64 a1, const char *a2, _QWORD *a3);
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[17],unsigned long &>(__int64 a1, const char *a2, _QWORD *a3);
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[15],unsigned long &>(__int64 a1, const char *a2, _QWORD *a3);
__int64 __fastcall sub_1EB20(int *a1);
__int64 __fastcall sub_1EB78(int *a1, __int64 a2);
__int64 __fastcall fnv::vnm::close_pipes(fnv::vnm *__hidden this, int (*)[2]); // idb
__int64 __fastcall fnv::vnm::send_sigkill(char *a1);
__int64 __fastcall sub_1F028(__int64 a1, __int64 *a2, _QWORD *a3, _QWORD *a4, _QWORD *a5);
__int64 __fastcall fnv::vnm::exec_program_pspawn(const char *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5);
__int64 __fastcall sub_1F7F8(const char *a1, __int64 a2, __int64 a3, __int64 *a4, _QWORD *a5);
__int64 __fastcall fnv::vnm::exec_program(const char *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5);
__int64 __fastcall fnv::vnm::send_to(__int64 a1, const char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6);
__int64 __fastcall fnv::vnm::exec_program_in_env(const char *a1, __int64 a2, __int64 a3, _QWORD *a4, __int64 a5, __int64 a6);
__int64 __fastcall std::filebuf::sync(__int64 a1);
unsigned __int64 __fastcall std::filebuf::seekpos(__int64 a1, unsigned __int64 a2, __off_t a3);
unsigned __int64 __fastcall std::filebuf::seekoff(__int64 a1, __int64 a2, int a3);
__int64 __fastcall std::filebuf::imbue(__int64 a1, __int64 a2);
__int64 __fastcall std::filebuf::setbuf(__int64 a1, __int64 a2, signed __int64 a3);
__int64 __fastcall std::filebuf::~filebuf(__int64 a1);
void __fastcall std::filebuf::~filebuf(void *a1);
__int64 __fastcall std::filebuf::underflow(__int64 a1);
__int64 __fastcall std::filebuf::overflow(__int64 a1, unsigned int a2);
__int64 __fastcall std::filebuf::pbackfail(__int64 a1, unsigned int a2);
void __fastcall std::__vector_base<char const*>::~__vector_base(char **a1);
_QWORD *__fastcall std::vector<char const*>::vector(_QWORD *result, __int64 a2);
__int64 *__fastcall std::operator>><char>(__int64 *a1, __int64 a2);
__int64 __fastcall std::__split_buffer<char const*>::__split_buffer(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4);
void __fastcall std::__split_buffer<char const*>::~__split_buffer(__int64 a1);
__int64 __fastcall std::vector<char const*>::__swap_out_circular_buffer(__int64 a1, _QWORD *a2);
__int64 __fastcall std::vector<char const*>::__push_back_slow_path<char const*>(_QWORD *a1, _QWORD *a2);
__int64 __fastcall std::vector<char const*>::__emplace_back_slow_path<decltype(nullptr)>(_QWORD *a1);
void __fastcall sub_20FB8(__int64 (__fastcall ***a1)(), int a2, __int64 a3);
void __fastcall std::ifstream::~ifstream(__int64 (__fastcall ***a1)());
void __fastcall `virtual thunk to'std::ifstream::~ifstream(_QWORD *a1);
void __fastcall std::ifstream::~ifstream(__int64 (__fastcall ***a1)());
void __fastcall `virtual thunk to'std::ifstream::~ifstream(_QWORD *a1);
void __fastcall std::ifstream::~ifstream(__int64 (__fastcall ***a1)(), __int64 a2);
void __fastcall fnv::vnm::NatRule::~NatRule(fnv::vnm::NatRule *__hidden this); // idb
void __fastcall fnv::vnm::NatRule::~NatRule(fnv::vnm::NatRule *__hidden this); // idb
void __fastcall fnv::vnm::RoutingTunnel::~RoutingTunnel(fnv::vnm::RoutingTunnel *__hidden this); // idb
void __fastcall fnv::vnm::RoutingTunnel::~RoutingTunnel(fnv::vnm::RoutingTunnel *__hidden this); // idb
void __fastcall fnv::vnm::DefaultRoute::~DefaultRoute(fnv::vnm::DefaultRoute *__hidden this); // idb
void __fastcall fnv::vnm::DefaultRoute::~DefaultRoute(fnv::vnm::DefaultRoute *__hidden this); // idb
void __fastcall fnv::vnm::InternalConnectionPolicy::~InternalConnectionPolicy(fnv::vnm::InternalConnectionPolicy *__hidden this); // idb
void __fastcall fnv::vnm::InternalConnectionPolicy::~InternalConnectionPolicy(fnv::vnm::InternalConnectionPolicy *__hidden this); // idb
__int64 sub_21500();
void __fastcall fnv::vnm::PfAnchor::~PfAnchor(fnv::vnm::PfAnchor *__hidden this); // idb
void __fastcall fnv::vnm::PfAnchor::~PfAnchor(fnv::vnm::PfAnchor *__hidden this); // idb
void __fastcall fnv::vnm::VlanIface::~VlanIface(fnv::vnm::VlanIface *__hidden this); // idb
void __fastcall fnv::vnm::VlanIface::~VlanIface(fnv::vnm::VlanIface *__hidden this); // idb
void __fastcall fnv::vnm::AddressConfig::~AddressConfig(fnv::vnm::AddressConfig *__hidden this); // idb
void __fastcall fnv::vnm::AddressConfig::~AddressConfig(fnv::vnm::AddressConfig *__hidden this); // idb
void __fastcall fnv::vnm::RoutingPolicy::~RoutingPolicy(fnv::vnm::RoutingPolicy *__hidden this); // idb
void __fastcall fnv::vnm::RoutingPolicy::~RoutingPolicy(fnv::vnm::RoutingPolicy *__hidden this); // idb
void (__fastcall **__fastcall fnv::vnm::RoutingTunnel::RoutingTunnel(_QWORD *a1, __int64 a2))(fnv::vnm::RoutingTunnel *__hidden this);
// _QWORD *__usercall fnv::vnm::RoutingTunnel::moveMe@<X0>(fnv::vnm::RoutingTunnel *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::RoutingTunnel::RoutingTunnel(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::RoutingTunnel::RoutingTunnel(__int64 a1, unsigned __int8 *a2, char *a3, char *a4, __int64 a5, __int64 a6);
void (__fastcall **__fastcall fnv::vnm::AddressConfig::AddressConfig(_QWORD *a1, __int64 a2))(fnv::vnm::AddressConfig *__hidden this);
// _QWORD *__usercall fnv::vnm::AddressConfig::moveMe@<X0>(fnv::vnm::AddressConfig *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::AddressConfig::AddressConfig(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::AddressConfig::AddressConfig(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD); // weak
void (__fastcall **__fastcall fnv::vnm::VlanIface::VlanIface(_QWORD *a1, __int64 a2))(fnv::vnm::VlanIface *__hidden this);
// _QWORD *__usercall fnv::vnm::VlanIface::moveMe@<X0>(fnv::vnm::VlanIface *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::VlanIface::VlanIface(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::VlanIface::VlanIface(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD); // weak
__int64 __fastcall fnv::vnm::DefaultRoute::DefaultRoute(_QWORD *a1, __int64 a2);
// _QWORD *__usercall fnv::vnm::DefaultRoute::moveMe@<X0>(fnv::vnm::DefaultRoute *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::DefaultRoute::DefaultRoute(__int64 a1, __int64 a2, __int64 a3, __int64 a4);
__int64 __fastcall fnv::vnm::DefaultRoute::DefaultRoute(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::PfAnchor::PfAnchor(__int64 a1, __int64 a2);
// _QWORD *__usercall fnv::vnm::PfAnchor::moveMe@<X0>(fnv::vnm::PfAnchor *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::PfAnchor::PfAnchor(fnv::vnm::PfAnchor *__hidden this); // idb
__int64 __fastcall fnv::vnm::PfAnchor::anchor(fnv::vnm::PfAnchor *__hidden this); // idb
__int64 __fastcall fnv::vnm::InternalConnectionPolicy::InternalConnectionPolicy(__int64 a1, __int64 a2);
// _QWORD *__usercall fnv::vnm::InternalConnectionPolicy::moveMe@<X0>(fnv::vnm::InternalConnectionPolicy *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::InternalConnectionPolicy::parsePort(__int64 a1, __int64 a2, _WORD *a3);
__int64 __fastcall fnv::vnm::InternalConnectionPolicy::validateIP(fnv::vnm::InternalConnectionPolicy *this, int a2);
__int64 __fastcall fnv::vnm::RoutingPolicy::RoutingPolicy(_QWORD *a1, __int64 a2);
// _QWORD *__usercall fnv::vnm::RoutingPolicy::moveMe@<X0>(fnv::vnm::RoutingPolicy *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::RoutingPolicy::RoutingPolicy(__int64 a1, __int64 a2, __int64 a3, __int64 a4, unsigned __int8 *a5);
__int64 __fastcall fnv::vnm::RetainProcmgrAbilities(fnv::vnm *__hidden this); // idb
__int64 __fastcall fnv::vnm::DaemonInit(__int64 a1);
void (__fastcall **__fastcall fnv::vnm::NatRule::NatRule(_QWORD *a1, __int64 a2))(fnv::vnm::NatRule *__hidden this);
// _QWORD *__usercall fnv::vnm::NatRule::moveMe@<X0>(fnv::vnm::NatRule *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::NatRule::NatRule(__int64 a1, __int64 a2);
// _QWORD *__usercall fnv::vnm::VlanNameFromGreName@<X0>(char *a1@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::FreeVlanInterface(__int64 a1);
__int64 __fastcall fnv::vnm::RemoveVlanIface(__int64 a1);
__int64 fnv::vnm::LinkNetworksforWhs();
__int64 __fastcall fnv::vnm::UnlinkNetworks(__int64 a1);
__int64 fnv::vnm::InstallMssClamp();
__int64 fnv::vnm::RemoveMssClamp();
__int64 __fastcall fnv::vnm::startPktFilters(__int64 a1);
__int64 __fastcall fnv::vnm::stopPktFilters(fnv::vnm *__hidden this); // idb
__int64 __fastcall fnv::vnm::IfaceRemover::IfaceRemover(fnv::vnm::IfaceRemover *__hidden this); // idb
__int64 __fastcall fnv::vnm::AddSyncDefRoute(fnv::vnm *__hidden this); // idb
__int64 __fastcall fnv::vnm::RemoveDnsForwarders(unsigned __int8 *a1);
__int64 __fastcall fnv::vnm::Init(fnv::vnm *__hidden this); // idb
unsigned __int64 __fastcall fnv::vnm::Terminate(fnv::vnm *this);
__int64 __fastcall fnv::vnm::RemoveInternalConnection(unsigned __int8 *a1, __int64 a2, __int64 a3, __int64 a4);
unsigned __int64 __fastcall sub_24B08(__int64 a1);
__int64 __fastcall fnv::vnm::InternalConnectionPolicy::InternalConnectionPolicy(__int64 a1, unsigned __int8 *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, char a7, char a8);
// _QWORD *__usercall fnv::vnm::RoutingTunnel::describe@<X0>(fnv::vnm::RoutingTunnel *this@<X0>, _QWORD *a2@<X8>);
// _QWORD *__usercall fnv::vnm::AddressConfig::describe@<X0>(fnv::vnm::AddressConfig *this@<X0>, _QWORD *a2@<X8>);
// _QWORD *__usercall fnv::vnm::VlanIface::describe@<X0>(fnv::vnm::VlanIface *this@<X0>, _QWORD *a2@<X8>);
// _QWORD *__usercall fnv::vnm::DefaultRoute::describe@<X0>(fnv::vnm::DefaultRoute *this@<X0>, _QWORD *a2@<X8>);
// _QWORD *__usercall fnv::vnm::PfAnchor::anchorstr@<X0>(_QWORD *a1@<X8>);
// _QWORD *__usercall fnv::vnm::PfAnchor::describe@<X0>(fnv::vnm::PfAnchor *this@<X0>, _QWORD *a2@<X8>);
// _QWORD *__usercall fnv::vnm::InternalConnectionPolicy::describe@<X0>(fnv::vnm::InternalConnectionPolicy *this@<X0>, _QWORD *a2@<X8>);
// _QWORD *__usercall fnv::vnm::RoutingPolicy::describe@<X0>(fnv::vnm::RoutingPolicy *this@<X0>, _QWORD *a2@<X8>);
// _QWORD *__usercall fnv::vnm::NatRule::describe@<X0>(fnv::vnm::NatRule *this@<X0>, _QWORD *a2@<X8>);
// _QWORD *__usercall fnv::vnm::VlanNameFromVlanId@<X0>(fnv::vnm *this@<X0>, _QWORD *a2@<X8>);
__int64 __fastcall fnv::vnm::AddNativeRoutingTunnel(__int64 a1, char *a2, char *a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7);
__int64 __fastcall fnv::vnm::AddVlanIface(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6);
__int64 __fastcall fnv::vnm::ConfigVlanInterface(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9, char *a10);
__int64 __fastcall fnv::vnm::ConfigVlanInterface(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, char *a8, __int64 a9);
__int64 __fastcall fnv::vnm::ConfigVlanWithIp(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8);
__int64 __fastcall fnv::vnm::ConfigVlanWithIp(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9, __int64 a10);
__int64 __fastcall fnv::vnm::AddInternalConnection(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, char a6, char a7);
__int64 __fastcall fnv::vnm::LinkNetworks(__int64 a1, __int64 a2, __int64 a3, __int64 a4);
__int64 __fastcall fnv::vnm::LinkRoutingTunnels(__int64 a1, __int64 a2, __int64 a3);
__int64 __fastcall fnv::vnm::TrustedLinkNetworks(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6);
__int64 __fastcall fnv::vnm::IfaceRemover::visit(__int64 a1, __int64 a2);
__int64 __fastcall fnv::vnm::AddDnsForwarder(unsigned __int8 *a1, __int64 a2, __int64 a3, unsigned int a4);
__int64 __fastcall fnv::vnm::AddDnsForwarder(unsigned __int8 *a1, __int64 a2, unsigned int a3);
__int64 __fastcall fnv::vnm::InitNameServer(fnv::vnm *__hidden this); // idb
void __fastcall fnv::vnm::IfaceRemover::~IfaceRemover(fnv::vnm::IfaceRemover *__hidden this); // idb
void __fastcall fnv::vnm::IfaceRemover::~IfaceRemover(fnv::vnm::IfaceRemover *__hidden this); // idb
__int64 __fastcall std::char_traits<char>::compare(const void *a1, const void *a2, size_t a3);
__int64 __fastcall std::pair<std::string const,std::string>::~pair(__int64 a1);
// _QWORD *__usercall std::operator+<char>@<X0>(char *s@<X1>, unsigned __int8 *a2@<X0>, _QWORD *a3@<X8>);
void __fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::~__hash_table(__int64 a1);
__int64 __fastcall std::unordered_map<std::string,int>::~unordered_map(); // weak
void __fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::~__hash_table(__int64 a1);
__int64 __fastcall std::unordered_map<std::string,std::string>::~unordered_map(); // weak
__int64 *__fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::find<std::string>(_QWORD *a1, __int64 a2);
__int64 *__fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::find<std::string>(_QWORD *a1, __int64 a2);
__int64 *__fastcall std::unordered_map<std::string,std::string>::at(_QWORD *a1, __int64 a2);
void __fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::__rehash(__int64 a1, unsigned __int64 a2);
void __fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::rehash(__int64 a1, std::__1 *this);
_QWORD *__fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::__node_insert_unique(__int64 a1, _QWORD *a2);
_QWORD *__fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::__insert_unique<std::pair<std::string const,int> const&>(__int64 a1, __int64 a2);
void __fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::__rehash(__int64 a1, unsigned __int64 a2);
void __fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::rehash(__int64 a1, std::__1 *this);
_QWORD *__fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::__node_insert_unique(__int64 a1, _QWORD *a2);
_QWORD *__fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::__insert_unique<std::pair<std::string const,std::string> const&>(__int64 a1, __int64 a2);
float *__fastcall std::unordered_map<std::string,std::string>::unordered_map(float *result, __int64 a2, __int64 a3);
_DWORD *__fastcall sub_2A694(_DWORD *result);
__int64 __fastcall fnv::vnm::PfClose(fnv::vnm *__hidden this, void *); // idb
__int64 __fastcall fnv::vnm::PfAbortAnchor(fnv::vnm *__hidden this, void *); // idb
__int64 __fastcall fnv::vnm::PfCommitAnchor(fnv::vnm *__hidden this, void *); // idb
__int64 __fastcall fnv::vnm::PfAddPoolAddr(_DWORD *a1, __int64 a2, unsigned __int8 *a3);
__int64 __fastcall fnv::vnm::PfAddNatPoolAddr(_DWORD *a1, __int64 a2);
__int64 __fastcall fnv::vnm::PfAddEgressAnchorRule(_DWORD *a1, __int64 a2);
__int64 __fastcall fnv::vnm::PfAddEgressAnchorRuleIfname(_DWORD *a1, __int64 a2);
__int64 __fastcall fnv::vnm::PfAddPeer2PeerPortsAnchorRule(_DWORD *a1, int *a2, int *a3, int *a4, int *a5, unsigned __int8 *a6, unsigned __int16 *a7, unsigned __int16 *a8, char a9, char a10);
__int64 __fastcall fnv::vnm::PfRemovePeer2PeerPortsAnchorRule(_DWORD *a1, int *a2, int *a3, int *a4, int *a5, char *a6, _WORD *a7, _WORD *a8);
__int64 __fastcall fnv::vnm::PfAddIngressAnchorRule(_DWORD *a1, __int64 a2);
__int64 __fastcall fnv::vnm::PfAddNatAnchorRule(_DWORD *a1, __int64 a2);
__int64 __fastcall fnv::vnm::PfRemoveNatAnchorRule(_DWORD *a1, __int64 a2);
__int64 __fastcall fnv::vnm::PfCallAnchor(_DWORD *a1, __int64 a2);
__int64 __fastcall fnv::vnm::PfEnable(fnv::vnm *__hidden this); // idb
__int64 __fastcall fnv::vnm::PfDisable(fnv::vnm *__hidden this); // idb
__int64 __fastcall sub_2BE18(char **a1, char *a2, int a3);
__int64 __fastcall fnv::vnm::PfFlushAnchor(char *a1);
__int64 __fastcall fnv::vnm::PfOpenFilterAnchor(char **a1, char *a2);
__int64 __fastcall fnv::vnm::PfOpenNatAnchor(char **a1, char *a2);
void *__fastcall fnv::vnm::PfContext::PfContext(fnv::vnm::PfContext *this);
__int64 __fastcall std::this_thread::sleep_for<long long,std::ratio<1l,1000l>>(unsigned __int64 *a1);
__int64 __fastcall sub_2C250(long double a1, long double a2);
__n128 __fastcall sub_2C3C8(unsigned int a1);
__n128 __fastcall sub_2C450(unsigned __int64 a1);
char *__fastcall sub_2C520(char a1, char *a2, char *a3, unsigned __int64 *a4);
__int64 __fastcall sub_2C650(unsigned __int8 a1, _QWORD *a2);
char *__fastcall sub_2C6D8(char *result, unsigned __int64 a2, _QWORD *a3, _QWORD *dest);
__int64 __fastcall sub_2CEC8(_QWORD *a1, _QWORD *s);
__int64 sub_2D2C0();
__int64 __fastcall sub_2D3D8(char *a1, unsigned __int64 a2, _QWORD *a3, __int64 a4);
__int64 __fastcall sub_2DB40(char *src, __int64 a2);
__int64 __fastcall sub_2DEE0(__int64 a1, __int64 a2, __int64 a3);
_QWORD *__fastcall sub_2E0F8(__int64 a1, __int64 a2);
__int64 __fastcall sub_2E190(_QWORD *a1, _QWORD *a2);
__int64 __fastcall sub_2E248(_QWORD *a1, _QWORD *a2);
__int64 __fastcall sub_2E358(__int64 a1, __int64 a2);
__int64 __fastcall sub_2E4E0(__int64 a1, int a2);
__int64 __fastcall sub_2E550(__int64 a1);
_QWORD *__fastcall sub_2E558(_QWORD *result, int a2, __int64 a3);
__int64 __fastcall sub_2E5C8(__int64 a1);
__int64 __fastcall sub_2E5D0(__int64 a1, _DWORD *a2);
__int64 __fastcall sub_2E5E8(__int64 result, __int64 a2);
__int64 __fastcall sub_2E5F0(__int64 a1);
__int64 __fastcall sub_2E5F8(__int64 a1);
__int64 __fastcall sub_2E600(__int64 a1);
__int64 __fastcall sub_2E630(__int64 a1);
__int64 __fastcall sub_2E638(__int64 a1);
__int64 __fastcall sub_2E640(__int64 a1, __int64 a2);
__int64 __fastcall nullsub_1(_QWORD, _QWORD); // weak
_QWORD *__fastcall sub_2E760(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9);
_QWORD *__fastcall sub_2E8D8(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9);
_QWORD *__fastcall sub_2E9C8(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9);
_QWORD *__fastcall sub_2EAB8(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9);
__int64 __fastcall sub_2EBA8(__int64 result);
__int64 __fastcall sub_2EBC8(unsigned int (__fastcall *a1)(_QWORD *, __int64), __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9);
__int64 __fastcall sub_2ECA0(__int64 a1, __int64 a2, __int64 a3);
__int64 __fastcall sub_2ECC0(__int64 result, __int64 (__fastcall *a2)(__int64, _QWORD, __int64), __int64 a3, int a4, int a5);
__int64 __fastcall sub_2EDB8(__int64 result, __int64 (__fastcall *a2)(__int64, _QWORD, __int64), __int64 a3);
__int64 __fastcall sub_2EE70(unsigned __int8 a1);
char *__fastcall sub_2EEF0(char a1, char *a2, char *a3, unsigned __int64 *a4);
__int64 __fastcall sub_2F020(__int64 a1);
__int64 __fastcall sub_2F130(unsigned __int8 a1, __int64 a2, __int64 a3);
__int64 __fastcall sub_2F1A0(__int64 a1, __int64 a2, __int64 a3);
unsigned int *__fastcall sub_2F230(__int64 a1, unsigned int *a2, __int64 a3);
__int64 __fastcall sub_2F3B8(__int64 a1, __int64 a2, __int64 a3);
__int64 __fastcall sub_2F478(__int64 a1, char *a2);
__int64 __fastcall sub_2F600(__int64 a1, __int64 *a2, char *a3);
unsigned int *__fastcall sub_2F748(__int64 a1, unsigned __int64 a2);
__int64 __fastcall sub_2FDE0(__int64 *a1, unsigned __int64 a2, __int64 a3);
__int64 __fastcall sub_30238(__int64 a1, _QWORD *a2);
_DWORD *__fastcall sub_30298(_DWORD *result, _QWORD *a2, __int64 a3, __int64 a4);
__int64 __fastcall sub_30308(__int64 a1, _QWORD *a2);
_DWORD *__fastcall sub_30320(_DWORD *result);
__int64 __fastcall sub_30360(__int64 a1, _QWORD *a2, __int64 a3, __int64 a4);
__int64 __fastcall sub_303D0(__int64 a1, _QWORD *a2);
__int64 __fastcall sub_303E0(__int64 a1);
__int64 __fastcall sub_30418(_DWORD *a1);
__int64 __fastcall sub_30550(_DWORD *);
void __fastcall sub_30558(_DWORD *a1);
__int64 __fastcall sub_30580(unsigned __int64 a1, _QWORD *a2);
unsigned __int64 __fastcall sub_30748(unsigned __int64 result);
// int __fastcall _cxa_finalize(void *);
// void __fastcall std::out_of_range::~out_of_range(std::out_of_range *__hidden this); idb
// void __fastcall std::bad_cast::~bad_cast(std::bad_cast *__hidden this); idb
// void __fastcall std::mutex::~mutex(std::mutex *__hidden this); idb
// __int64 ITM_deregisterTMCloneTable(void); weak
// __int64 Jv_RegisterClasses(void); weak
// __int64 ITM_registerTMCloneTable(void); weak
//-------------------------------------------------------------------------
// Data declarations
int dword_0 = 1179403647; // weak
int dword_14 = 1; // weak
__int128 xmmword_1B7F0 = 0x402A0C6F7A0B5ED8D36933A0407CC7D2LL; // weak
__int128 xmmword_1FC60 = 0x402A0C6F7A0B5ED8D36933A0407CC7D2LL; // weak
__int128 xmmword_2C240 = 0x402A0C6F7A0B5ED8D36933A0407CC7D2LL; // weak
_UNKNOWN unk_307B8; // weak
_UNKNOWN unk_31162; // weak
_UNKNOWN unk_31B28; // weak
_UNKNOWN unk_31B8F; // weak
_UNKNOWN unk_322CA; // weak
_UNKNOWN unk_33170; // weak
_DWORD dword_342A8[5537] =
{
20,
0,
5405185,
18774020,
2034715,
0,
52,
28,
-129328,
152,
1074675968,
127797405,
1109200193,
93587091,
-1790836073,
1594070532,
-707273250,
215274454,
31,
0,
52,
84,
-129232,
196,
1074675968,
127797405,
1125977409,
60163221,
26739351,
93587091,
-673325461,
-740895272,
2034900,
0,
28,
0,
1280342529,
2013528146,
-979695842,
452985228,
2034715,
0,
44,
36,
-129124,
136,
5622532,
1343111424,
161352349,
1092422977,
127142035,
1460049223,
-740958754,
2034900,
20,
220,
-124232,
260,
0,
0,
36,
244,
-123996,
36,
269369600,
27132573,
1159531842,
520936926,
0,
0,
20,
284,
-124000,
76,
0,
0,
20,
308,
-123948,
120,
0,
0,
20,
332,
-129148,
68,
0,
0,
36,
356,
-123876,
52,
537805312,
60687517,
1109200193,
-565771629,
520934365,
0,
36,
396,
-123864,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
108,
300,
-123868,
360,
5559044,
1343111936,
161352349,
1125977409,
127142035,
93718165,
60294295,
2114099525,
-639771126,
-690628393,
520934611,
1141588224,
-754966772,
-673786412,
-555886120,
1344080962,
127142035,
93718165,
60294295,
178061977,
-565704290,
-656942627,
-724314411,
7948,
20,
548,
-129296,
48,
0,
0,
52,
436,
-129272,
112,
5530372,
806240512,
94242461,
1092422977,
60032147,
1342346563,
-706879990,
520934611,
737536,
0,
20,
628,
-129216,
104,
0,
0,
36,
652,
-129136,
52,
537805312,
60687517,
1109200193,
-565771629,
520934365,
0,
36,
692,
-129124,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
44,
596,
-129128,
220,
5493508,
806240512,
94242461,
1109200194,
60032147,
-563019115,
-724314659,
7948,
36,
780,
-128956,
44,
537805056,
60687517,
1092422979,
-565902701,
520934365,
0,
44,
820,
-128952,
272,
1343111424,
161352349,
1092422977,
127142035,
-1777953469,
-572621563,
-724314411,
7948,
20,
868,
-128728,
8,
0,
0,
20,
892,
-128744,
8,
0,
0,
20,
916,
-128760,
12,
0,
0,
20,
940,
-128772,
8,
0,
0,
36,
964,
-128788,
44,
537805056,
60687517,
1092422979,
-565902701,
520934365,
0,
20,
1004,
-128784,
8,
0,
0,
20,
1028,
-128800,
12,
0,
0,
20,
1052,
-128812,
8,
0,
0,
36,
1076,
-128828,
80,
537805056,
60687517,
1092422977,
-565181805,
520934365,
0,
36,
1116,
-128788,
116,
537805056,
60687517,
1092422977,
26477203,
-740434343,
2034900,
52,
1020,
-128712,
144,
5385988,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
20,
1212,
-128624,
8,
0,
0,
20,
1236,
-128640,
16,
0,
0,
20,
1260,
-128648,
12,
0,
0,
20,
1284,
-124356,
60,
0,
0,
20,
1308,
-124320,
56,
0,
0,
60,
1196,
-128708,
236,
5345028,
1611546880,
194907293,
1092422977,
160696979,
-1744398526,
143999749,
-562952298,
-707209251,
215274454,
31,
0,
36,
1396,
-128536,
52,
537805056,
60687517,
1092422977,
26477203,
-740434359,
2034900,
52,
1300,
-128524,
288,
5323012,
1611546880,
194907293,
1092422977,
160696979,
-1777822397,
110577927,
-673325448,
-724314411,
7948,
20,
1492,
-124448,
56,
0,
0,
36,
1516,
-128316,
24,
269369600,
27132573,
1109200194,
520936926,
0,
0,
20,
1556,
-124456,
60,
0,
0,
36,
1580,
-128356,
24,
269369600,
27132573,
1109200194,
520936926,
0,
0,
36,
1620,
-128372,
44,
537805056,
60687517,
1092422978,
-565837165,
520934365,
0,
60,
1524,
-128368,
236,
5270276,
1611546880,
194907293,
1092422977,
160696979,
-1744398526,
143999749,
-562952298,
-707209251,
215274454,
31,
0,
44,
1724,
-128196,
112,
806240512,
94242461,
1092422977,
-1824324971,
1426297860,
-740958754,
2034900,
0,
44,
1772,
-124612,
208,
806240512,
94242461,
1109200193,
60032147,
26608277,
-706879889,
215274454,
31,
20,
1820,
-128180,
8,
0,
0,
44,
1844,
-128196,
140,
806240512,
94242461,
1092422977,
26608277,
-1811639485,
-572630013,
-724314411,
7948,
36,
1892,
-128104,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
68,
1796,
-124564,
356,
5205252,
1879982336,
228462237,
1092422977,
194251923,
-1744267454,
177554439,
110692758,
1325532570,
-623256098,
-690628393,
520934611,
0,
0,
76,
1868,
-124280,
412,
5192452,
-2146549504,
-1643078399,
487407887,
-1777560255,
244531979,
-1757147756,
-1727424502,
1208457736,
94111387,
-572632062,
-623256357,
-690628393,
520934611,
0,
0,
44,
2084,
-123948,
80,
806240512,
94242461,
1109200193,
60032147,
-565247339,
-724314659,
7948,
0,
20,
2132,
-123916,
44,
0,
0,
44,
2156,
-123896,
340,
1611546880,
194907293,
1092422977,
160696979,
-1777822398,
-565247481,
-740895267,
2034900,
68,
2068,
-123604,
1324,
5154564,
-535936768,
-1642291967,
487408155,
-1776773823,
445858327,
-1756751468,
-1726638058,
-1693214188,
20579090,
-639902242,
-707209254,
215274454,
31,
52,
2140,
-128452,
396,
5144580,
1611546880,
194907293,
1092422977,
160696979,
-1777822397,
-564395513,
-740895267,
2034900,
0,
60,
2332,
-122408,
344,
1343111424,
161352349,
1142754625,
93718165,
127142035,
60294295,
26870425,
-572633342,
-656942375,
-724314411,
7948,
0,
52,
2396,
-122128,
300,
1074677504,
127797405,
1109200194,
93587091,
60163221,
1979881288,
-707273250,
215274454,
31,
0,
60,
2452,
-121884,
272,
1343111424,
161352349,
1142754625,
127142035,
26870425,
93718165,
60294295,
-639771011,
-707209254,
215274454,
31,
0,
52,
2516,
-121676,
272,
1074677504,
127797405,
1092422977,
60163221,
-1811508413,
43468037,
-673325457,
-724314411,
7948,
0,
52,
2572,
-121460,
736,
1074675968,
127797405,
1092422977,
60163221,
-1744660669,
-1811508479,
-558824955,
-707209251,
215274454,
31,
68,
2492,
-128408,
320,
5062148,
1879982336,
228462237,
1092422977,
194251923,
-1710843582,
144130821,
-1790507112,
34182666,
-639771072,
-707209254,
215274454,
31,
0,
60,
2700,
-120852,
956,
1343111424,
161352349,
1142754626,
93718165,
127142035,
60294295,
26870425,
-572594430,
-656942375,
-724314411,
7948,
0,
60,
2764,
-128224,
364,
1343111424,
161352349,
1092422977,
93718165,
-1761437373,
1124308996,
127142035,
-572632830,
-707209255,
215274454,
31,
0,
44,
2692,
-120024,
220,
5016324,
1611546880,
194907293,
1092422978,
160696979,
1711838540,
-740958754,
2034900,
44,
2876,
-127972,
380,
806240512,
94242461,
1092422978,
-1824390507,
33788932,
-706879912,
520934611,
0,
52,
2924,
-119900,
140,
806240512,
94242461,
1092422977,
60032147,
-1778215614,
-569747711,
-740895267,
2034900,
2881,
0,
52,
2980,
-119816,
216,
806240512,
94242461,
1109200193,
60032147,
174916245,
-740958754,
2034900,
-566031551,
-724314659,
7948,
20,
3036,
-119656,
12,
0,
0,
20,
3060,
-119668,
8,
0,
0,
20,
3084,
-119684,
16,
0,
0,
60,
2972,
-127824,
704,
4948740,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1824314984,
36541486,
-673325401,
-740895272,
2034900,
0,
36,
3172,
-119756,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
20,
3212,
-119760,
8,
0,
0,
20,
3236,
-119776,
16,
0,
0,
20,
3260,
-119784,
12,
0,
0,
52,
3148,
-136048,
212,
4915204,
1343111424,
161352349,
1092422978,
127142035,
-1777953469,
-572625659,
-724314411,
7948,
0,
20,
3340,
-119852,
8,
0,
0,
52,
3364,
-119868,
324,
1343111424,
161352349,
1092422978,
127142035,
1107597123,
93718165,
-572635390,
-740895273,
2034900,
0,
44,
3420,
-119600,
336,
1074675968,
127797405,
1092422977,
60163221,
-1811508413,
-565378555,
-740895267,
2034900,
60,
3468,
-119312,
280,
-267501312,
-1642160895,
487407901,
-1776642751,
479412761,
-1757078636,
1209505816,
-562882919,
-656942627,
-724314411,
7948,
0,
52,
3396,
-119096,
272,
4859652,
1879982336,
228462237,
1092422978,
-1790441321,
-1828088310,
1997247500,
-707273250,
215274454,
31,
52,
3452,
-118880,
336,
4850180,
1611546880,
194907293,
1092422978,
160696979,
34116936,
-706879929,
520934611,
0,
0,
36,
3644,
-118600,
100,
269372672,
27132573,
1142754628,
520936926,
0,
0,
44,
3548,
-118540,
148,
4829444,
1611546880,
194907293,
1092422978,
160696979,
-740434336,
2034900,
0,
36,
3732,
-118440,
108,
806240768,
94242461,
1176309057,
-565115757,
520934365,
0,
44,
3772,
-118372,
164,
1074675968,
127797405,
1092422977,
93587091,
1661244738,
-740958754,
2034900,
0,
36,
3820,
-118256,
100,
269370112,
27132573,
1411190081,
520936926,
0,
0,
36,
3860,
-118196,
76,
269370368,
27132573,
1142754628,
520936926,
0,
0,
52,
3900,
-118160,
304,
-535936768,
-1642291967,
487407899,
-1776773823,
445858583,
-1757144684,
34969622,
-673325503,
-740895272,
2034900,
52,
3956,
-117912,
312,
-804372224,
-1642423039,
487408153,
-1810328767,
378880791,
1174541718,
-690627106,
520934611,
0,
0,
20,
4012,
-117656,
8,
0,
0,
52,
4036,
-117672,
316,
-804372224,
-1642423039,
487408153,
-1810328767,
378880791,
1191318934,
-690627106,
520934611,
0,
0,
20,
4092,
-117412,
8,
0,
0,
52,
4116,
-117428,
316,
-804372224,
-1642423039,
487408153,
-1810328767,
378880791,
1191318934,
-690627106,
520934611,
0,
0,
60,
4172,
-117168,
428,
-1878114048,
-1641898750,
487407905,
-1809804479,
513098271,
-1757143658,
1209767964,
1493310105,
-673587746,
-740895272,
2034900,
0,
52,
4236,
-116804,
328,
-535936768,
-1642291967,
487407899,
-1810197695,
412435225,
-1757276266,
-565640682,
-690628643,
520934611,
0,
52,
4292,
-116532,
352,
-535936768,
-1642291967,
487408155,
-1776773823,
445858583,
1342314900,
-690627106,
520934611,
0,
0,
44,
4348,
-116236,
240,
1343111424,
161352349,
1092422979,
127142035,
1879479622,
-740958754,
2034900,
0,
60,
4260,
-116044,
516,
4650244,
-1609678592,
-1642816255,
487407891,
-1777298111,
244794639,
311627160,
-1723395692,
-563019252,
-656942627,
-724314411,
7948,
36,
4460,
-115592,
128,
537805056,
60687517,
1109200196,
26477203,
-740434344,
2034900,
52,
4364,
-115504,
260,
4631812,
1611546880,
194907293,
1092422978,
160696979,
-1794730173,
2030540296,
-707273250,
215274454,
31,
36,
4556,
-115300,
128,
537805056,
60687517,
1109200196,
26477203,
-740434344,
2034900,
36,
4596,
-115212,
128,
537805056,
60687517,
1109200196,
26477203,
-740434344,
2034900,
36,
4636,
-115124,
128,
537805056,
60687517,
1109200196,
26477203,
-740434344,
2034900,
44,
4676,
-115036,
156,
-535936768,
-1642291967,
487408155,
-1810197695,
412435225,
-564193386,
-740895267,
2034900,
44,
4724,
-114928,
156,
-535936768,
-1642291967,
487408155,
-1810197695,
412435225,
-564193386,
-740895267,
2034900,
52,
4636,
-137324,
212,
4566788,
1343111424,
161352349,
1092422978,
127142035,
-1777953469,
-572625659,
-724314411,
7948,
0,
60,
4692,
-114872,
448,
4559620,
-1878114048,
-1642947327,
487407889,
-1810853055,
244662799,
-1757147754,
34314252,
-673325466,
-740895272,
2034900,
0,
44,
4892,
-114488,
100,
806240512,
94242461,
1109200193,
60032147,
26608277,
-706879916,
215274454,
31,
36,
4940,
-114436,
88,
537805056,
60687517,
1092422977,
-565050733,
520934365,
0,
36,
4980,
-114388,
56,
537805056,
60687517,
1092422977,
-565575021,
520934365,
0,
68,
4884,
-114372,
568,
4520964,
-1609678592,
-1642816255,
487407891,
-1810721983,
211370769,
-1790506086,
-1760586224,
-1693607922,
34184202,
-606216576,
-673523236,
-740895272,
2034900,
44,
4956,
-113876,
108,
4507652,
537805056,
60687517,
1092422977,
26477203,
-740434345,
2034900,
0,
44,
5004,
-113816,
96,
4498436,
537805056,
60687517,
1092422977,
26477203,
-740434348,
2034900,
0,
36,
5188,
-113768,
44,
537805056,
60687517,
1092422979,
-565902701,
520934365,
0,
60,
5092,
-113764,
312,
4480004,
-1878114048,
-1642947327,
487407889,
-1810853055,
244663055,
211226006,
1191316376,
-656941602,
-724314411,
7948,
0,
36,
5292,
-113516,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
36,
5332,
-113520,
48,
537805056,
60687517,
1092422977,
-565706093,
520934365,
0,
52,
5236,
-113512,
144,
4444164,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
52,
5292,
-113424,
204,
4433924,
1343111424,
161352349,
1092422977,
127142035,
-1777953469,
-572625915,
-724314411,
7948,
0,
20,
5484,
-113276,
20,
0,
0,
36,
5508,
-113280,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
68,
5412,
-113284,
332,
4407812,
-2146549504,
-1643078399,
487407887,
-1777560255,
244533259,
177671572,
144247192,
110823322,
-572635390,
-673523237,
-740895272,
2034900,
0,
36,
5620,
-113024,
96,
537805056,
60687517,
1092422977,
26477203,
-740434348,
2034900,
60,
5524,
-112968,
644,
4384004,
-1878114048,
-1642947327,
487408145,
-1777429183,
278086157,
-1756754028,
-1727293428,
-560987638,
-656942627,
-724314411,
7948,
52,
5588,
-112388,
412,
4376836,
-2146549504,
-1643078399,
487408143,
-1777560254,
244531723,
1593970068,
-690627106,
520934611,
0,
68,
5644,
-112032,
708,
4369156,
-1341243136,
-1641636606,
487407909,
-1742694591,
513360415,
-1824252518,
-1792830428,
35755554,
-639770969,
-707209254,
215274454,
31,
0,
36,
5852,
-111396,
52,
269370112,
27132573,
1176309059,
520936926,
0,
0,
76,
5756,
-111384,
868,
4348932,
-1072807680,
-1641505534,
487407911,
-1709139647,
513491743,
-1824252516,
-1759144922,
1109497890,
597042325,
-572601342,
-623256357,
-690628393,
520934611,
0,
0,
52,
5972,
-110596,
316,
1343111424,
161352349,
1092422977,
93718165,
-1811377342,
77022983,
-572636670,
-740895273,
2034900,
0,
60,
5892,
-110336,
332,
4324356,
1611546880,
194907293,
1092422977,
160696979,
-1777822398,
110576647,
1224869272,
-656941602,
-724314411,
7948,
0,
60,
5956,
-110068,
600,
4313348,
-1072807680,
-1642554111,
487408151,
-1777035967,
378749715,
-1756818028,
1125226514,
-2113793895,
-673587746,
-740895272,
2034900,
20,
6156,
-101016,
44,
0,
0,
20,
6180,
-100996,
44,
0,
0,
20,
6204,
-100976,
48,
0,
0,
68,
6092,
-109604,
780,
4289796,
-1341243136,
-1641636606,
487407909,
-1809542335,
580207395,
-1757142634,
1193252896,
496639641,
-572608254,
-656942375,
-724314411,
7948,
0,
52,
6300,
-101024,
80,
537805056,
60687517,
1092422977,
26477203,
-572650931,
520934611,
1108033792,
-724312610,
7948,
0,
52,
6356,
-101000,
104,
806240512,
94242461,
1092422977,
-1824390507,
1342411780,
-706879990,
520934611,
1124811008,
-740958754,
2034900,
52,
6276,
-100952,
228,
4267012,
806240512,
94242461,
1109200194,
60032147,
26608277,
-706879885,
215274454,
31,
0,
36,
6468,
-109064,
76,
537805312,
60687517,
1109200193,
-565378413,
520934365,
0,
36,
6508,
-109028,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
20,
6548,
-109032,
20,
0,
0,
36,
6572,
-109036,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
52,
6476,
-100924,
160,
4220932,
806240512,
94242461,
1109200193,
60032147,
173933205,
-740958754,
2034900,
2881,
0,
76,
6532,
-109096,
1368,
4210180,
-1072807680,
-1641505534,
487407911,
-1809411263,
613762085,
546907030,
-1756946534,
-1692297182,
52272158,
-572653241,
-623256357,
-690628393,
520934611,
0,
0,
52,
6748,
-100900,
100,
806240512,
94242461,
1092422977,
60032147,
1308792131,
-706879990,
520934611,
1124811008,
-740958754,
2034900,
36,
6804,
-100856,
72,
537805056,
60687517,
1092422977,
26477203,
-740434354,
2034900,
52,
6708,
-100824,
104,
4186628,
537807104,
60687517,
1092422977,
26477203,
-572650936,
520934611,
1158365440,
-754966772,
14605780,
60,
6764,
-107936,
196,
4175364,
1074675968,
127797405,
1109200193,
93587091,
60163221,
1459787588,
-673325558,
-724314411,
1090526988,
11,
0,
36,
6964,
-107804,
48,
537805056,
60687517,
1092422977,
-565706093,
520934365,
0,
52,
6868,
-107796,
144,
4157188,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
68,
7060,
-100936,
352,
1074675968,
127797405,
1092422977,
93587091,
-1744660667,
76891137,
1174537110,
-673325558,
-740895272,
2034900,
-565966015,
-707209251,
215274454,
31,
44,
7132,
-100656,
80,
806240512,
94242461,
1109200193,
60032147,
-565247339,
-724314659,
7948,
0,
52,
7180,
-100624,
80,
537805056,
60687517,
1092422977,
26477203,
-572650931,
520934611,
1108033792,
-724312610,
7948,
0,
20,
7236,
-100600,
132,
0,
0,
52,
7124,
-100492,
280,
4095748,
1879982336,
228462237,
1092422977,
160828053,
-1811115197,
144131851,
-673325448,
-724314411,
7948,
52,
7180,
-107964,
224,
4086276,
1879982336,
228462237,
1092422977,
194251923,
1124636482,
160828053,
-673325457,
-724314411,
7948,
44,
7236,
-100324,
164,
4077316,
1611546880,
194907293,
1092422977,
160696979,
1527289162,
-740958754,
2034900,
36,
7420,
-107844,
84,
537805056,
60687517,
1092422977,
26477203,
-740434351,
2034900,
36,
7460,
-107800,
68,
537805056,
60687517,
1092422977,
26477203,
-740434356,
2034900,
20,
7500,
-100288,
200,
0,
0,
20,
7524,
-100112,
48,
0,
0,
36,
7548,
-100088,
204,
537805824,
60687517,
1092422978,
-565640557,
520934365,
0,
20,
7588,
-99924,
56,
0,
0,
100,
7612,
-99892,
620,
1879982336,
228462237,
1159531843,
194251923,
160828053,
127404183,
93980313,
60556443,
-572650934,
-623256357,
-690628393,
520934611,
1745568000,
-606216694,
-673523236,
-740895272,
2034900,
1560415041,
-589570594,
-656942375,
-724314411,
7948,
44,
7716,
-99376,
244,
806240512,
94242461,
1092422977,
-1824390507,
1996723204,
-740958754,
2034900,
0,
20,
7764,
-99180,
32,
0,
0,
36,
7788,
-99172,
52,
537805056,
60687517,
1092422977,
26477203,
-740434359,
2034900,
68,
7692,
-108100,
576,
3983108,
-1878114048,
-1642947327,
487407889,
-1810853055,
211239439,
-1790309480,
-1727162866,
-1693869558,
34053128,
-606216576,
-673523236,
-740895272,
2034900,
68,
7764,
-107596,
572,
3975428,
-1878114048,
-1642947327,
487407889,
-1810853055,
244662799,
-1756754538,
-1727293428,
-1693869558,
34053128,
-606216577,
-673523236,
-740895272,
2034900,
68,
7836,
-107096,
572,
3967748,
-1878114048,
-1642947327,
487407889,
-1810853055,
244662799,
-1756754538,
-1727293428,
-1693869558,
34053128,
-606216577,
-673523236,
-740895272,
2034900,
68,
7908,
-106596,
572,
3960068,
-1878114048,
-1642947327,
487407889,
-1810853055,
244662799,
-1756754538,
-1727293428,
-1693869558,
34053128,
-606216577,
-673523236,
-740895272,
2034900,
60,
7980,
-99448,
192,
3952388,
1074675968,
127797405,
1092422977,
93587091,
-1778084538,
1510119171,
-673325558,
-724314411,
1090526988,
11,
0,
36,
8180,
-99320,
112,
537805056,
60687517,
1109200193,
-564723053,
520934365,
0,
68,
8220,
-99248,
472,
1879982336,
228462237,
1109200193,
194251923,
160828053,
-1744267451,
-1710843641,
-1677419771,
-563346941,
-639837219,
-707209254,
215274454,
31,
0,
28,
0,
1381005825,
511181824,
1827576582,
203096065,
31,
0,
52,
36,
-98880,
216,
806240512,
94242461,
1109200194,
60032147,
174195349,
-740958754,
2034900,
-565376191,
-724314659,
7948,
68,
92,
-98720,
652,
1879982336,
228462237,
1092422977,
127404183,
-1777691326,
110707977,
210961818,
-1689908332,
-560856572,
-623256611,
-690628393,
520934611,
0,
0,
52,
8316,
-98140,
216,
3870980,
1343111424,
161352349,
1092422977,
127142035,
-1777953468,
-572625403,
-724314411,
7948,
0,
52,
8372,
-97980,
216,
3861252,
1343111424,
161352349,
1092422977,
127142035,
-1777953468,
-572625403,
-724314411,
7948,
0,
52,
8428,
-97820,
216,
3851524,
1343111424,
161352349,
1092422977,
127142035,
-1777953468,
-572625403,
-724314411,
7948,
0,
52,
8484,
-97660,
216,
3841796,
1343111424,
161352349,
1092422977,
127142035,
-1777953468,
-572625403,
-724314411,
7948,
0,
52,
8540,
-97500,
216,
3832068,
1343111424,
161352349,
1092422977,
127142035,
-1777953468,
-572625403,
-724314411,
7948,
0,
52,
8596,
-97340,
216,
3822340,
1343111424,
161352349,
1092422977,
127142035,
-1777953468,
-572625403,
-724314411,
7948,
0,
52,
8652,
-97180,
216,
3812612,
1343111424,
161352349,
1092422977,
127142035,
-1777953468,
-572625403,
-724314411,
7948,
0,
52,
8708,
-97020,
216,
3802884,
1343111424,
161352349,
1092422977,
127142035,
-1777953468,
-572625403,
-724314411,
7948,
0,
52,
8764,
-106880,
796,
3793156,
-1341242624,
-1641636606,
487408421,
-1809542330,
35820835,
-706879814,
520934611,
0,
0,
68,
8820,
-106140,
540,
3784196,
-1341243136,
-1642685183,
487408149,
-1810590911,
278348307,
-1790767208,
1175557650,
228200089,
-572623102,
-656942375,
-724314411,
7948,
0,
76,
8892,
-105672,
504,
3772676,
-1609678592,
-1640719101,
487407923,
-1808624831,
815088433,
-1757139050,
1328388142,
731524249,
698100379,
-572627966,
-623256357,
-690628393,
520934611,
0,
0,
60,
8972,
-105248,
432,
3760388,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-563936723,
-690628643,
520934611,
0,
0,
60,
9036,
-104880,
432,
3755268,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-563936723,
-690628643,
520934611,
0,
0,
52,
9100,
-141576,
244,
3750148,
1343111424,
161352349,
1092422978,
93718165,
-1811377341,
-572623609,
-724314411,
7948,
0,
60,
9156,
-104568,
404,
3743236,
-1878114048,
-1641898750,
487407905,
-1776380607,
546521629,
-1757012076,
-564592100,
-690628643,
520934611,
0,
0,
52,
9356,
-92408,
544,
1343111424,
161352349,
1092422977,
93718165,
-1811377341,
-1744529657,
-561970685,
-707209251,
215274454,
31,
60,
9412,
-91920,
176,
1343111936,
161352349,
1109200193,
93718165,
60294295,
-1811377338,
43598855,
-639771048,
-690628393,
520934611,
0,
0,
44,
9476,
-91808,
272,
806240512,
94242461,
1092422977,
60032147,
-1778215613,
-572621567,
-724314411,
7948,
36,
9524,
-91584,
244,
537805056,
60687517,
1092422977,
26477203,
-740434311,
2034900,
44,
9564,
-91380,
248,
806240512,
94242461,
1109200193,
60032147,
-562494827,
-724314659,
7948,
0,
44,
9476,
-91180,
160,
3669764,
806240768,
94242461,
1109200193,
60032147,
1594004803,
-740958754,
2034900,
36,
9660,
-91068,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
44,
9700,
-97648,
88,
537805056,
60687517,
1092422977,
172884627,
215211486,
188874783,
-740434366,
7948,
60,
9748,
-97608,
184,
-1878114048,
-1072807672,
25730312,
1090619294,
-1790894835,
-2087321212,
-2037169407,
25531393,
-706879899,
215274454,
1091080223,
14,
44,
9812,
-91184,
648,
1343111424,
161352349,
1092422977,
93718165,
-1811377342,
-560201209,
-740895267,
2034900,
68,
9860,
-90584,
572,
-2146549504,
-1643078399,
487407887,
-1777560255,
244531723,
-1756754540,
-1727424502,
-1694000632,
33922054,
-606216577,
-673523236,
-740895272,
2034900,
0,
20,
9932,
-90084,
96,
0,
0,
36,
9956,
-97632,
68,
537805056,
60687517,
1092422977,
-565378413,
520934365,
0,
20,
9996,
-97604,
4,
0,
0,
20,
10020,
-90076,
44,
0,
0,
52,
9908,
-90056,
172,
3565316,
1074675968,
127797405,
1125977409,
60163221,
93587091,
-563805545,
-690628643,
520934611,
0,
60,
9964,
-89940,
536,
3555076,
1611546880,
194907293,
1092422978,
127273109,
-1811246270,
110576649,
2063730072,
-656941602,
-724314411,
7948,
0,
44,
10164,
-89468,
80,
806240512,
94242461,
1109200193,
60032147,
-565247339,
-724314659,
7948,
0,
20,
10212,
-89436,
44,
0,
0,
36,
10236,
-89416,
120,
537805056,
60687517,
1092422977,
26477203,
-740434342,
2034900,
52,
10276,
-89336,
248,
1879982336,
228462237,
1092422977,
160828053,
-1811115197,
144131851,
-673325456,
-724314411,
7948,
0,
44,
10332,
-89144,
232,
1611546880,
194907293,
1092422977,
127273109,
-1811246269,
-572624119,
-724314411,
7948,
52,
10380,
-88960,
188,
806240512,
94242461,
1109200193,
60032147,
174457493,
-740958754,
2034900,
-566031551,
-724314659,
7948,
20,
10436,
-88828,
12,
0,
0,
20,
10460,
-88840,
16,
0,
0,
60,
10348,
-98088,
944,
3469060,
-804372224,
-1640325885,
487407929,
-1774807743,
949174837,
-1756940396,
-1724671948,
-555810254,
-656942627,
-724314411,
7948,
36,
10548,
-88912,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
20,
10588,
-88916,
16,
0,
0,
20,
10612,
-88924,
12,
0,
0,
68,
10500,
-97296,
1072,
3443204,
-804372224,
-1640325885,
487407929,
-1774807743,
949176117,
882325396,
-1723386984,
-1691248078,
36674608,
-606216454,
-673523236,
-740895272,
2034900,
76,
10572,
-96296,
928,
3436548,
-2146549504,
-1642029822,
487407903,
-1809935551,
412697117,
-1690036326,
1175821334,
462822549,
-1743087802,
-556662247,
-639837219,
-707209254,
215274454,
31,
0,
68,
10652,
-95448,
1124,
3425540,
-1341243136,
-1641636606,
487407909,
-1809542324,
-1776118493,
-1742694623,
-1709270753,
-1675846883,
17433371,
-589570594,
-656942375,
-724314411,
7948,
52,
10724,
-94376,
192,
3417092,
1879982336,
228462237,
1092422977,
194251923,
-1777691325,
144132617,
-673325473,
-724314411,
7948,
36,
10916,
-94240,
44,
537805056,
60687517,
1176309059,
520936926,
0,
0,
60,
10820,
-94236,
228,
3397124,
1879982336,
228462237,
1092422977,
194251923,
-1777691325,
144131081,
-563214440,
-707209251,
215274454,
31,
0,
52,
10884,
-143116,
240,
3385604,
1343111424,
161352349,
1092422978,
127142035,
-1777953469,
-572623867,
-724314411,
7948,
0,
20,
11076,
-89376,
20,
0,
0,
36,
11100,
-89380,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
52,
11004,
-89384,
244,
3362564,
1343111680,
161352349,
1193086273,
93718165,
127142035,
-706879886,
215274454,
31,
0,
36,
11196,
-89196,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
60,
11100,
-89200,
404,
3345156,
-1609678592,
-1642816255,
487407891,
-1810721983,
244794641,
278203800,
-1723134058,
-565116404,
-656942627,
-724314411,
7948,
36,
11300,
-88860,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
52,
11204,
-88864,
260,
3319556,
1343111424,
161352349,
1092422977,
127142035,
-1777953458,
1862571781,
-707273250,
215274454,
31,
36,
11396,
-88660,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
60,
11300,
-88664,
2572,
3296004,
-1341243136,
-1642685183,
487408149,
-1743743167,
345195023,
-1790438508,
-1726900718,
41157390,
-673587746,
-740895272,
2034900,
20,
11500,
-55720,
20,
0,
0,
36,
11524,
-55724,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
44,
11428,
-86220,
112,
3375620,
806242048,
94242461,
1092422977,
60032147,
1325569347,
-740958754,
2034900,
36,
11612,
-86156,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
52,
11516,
-86160,
336,
3354116,
-1878113792,
-1642947327,
487407889,
-1810853049,
1108121359,
227937941,
-572635390,
-740895273,
2034900,
36,
11708,
-85880,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
52,
11612,
-85884,
336,
3330564,
-1878113792,
-1642947327,
487407889,
-1810853049,
1108121359,
227937941,
-572635390,
-740895273,
2034900,
36,
11804,
-85604,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
44,
11708,
-85608,
104,
3307012,
537805056,
60687517,
1092422977,
26477203,
-740434346,
2034900,
0,
36,
11892,
-85552,
36,
537805056,
60687517,
1092422977,
-565902701,
520934365,
0,
20,
11932,
-56096,
16,
0,
0,
36,
11956,
-85580,
48,
537805056,
60687517,
1092422977,
-565706093,
520934365,
0,
52,
11860,
-85572,
144,
3269124,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
36,
12052,
-85484,
56,
537805056,
60687517,
1092422977,
-565575021,
520934365,
0,
60,
11956,
-85468,
452,
3248900,
1343111424,
161352349,
1125977409,
93718165,
60294295,
127142035,
33724742,
-639771035,
-690628393,
520934611,
0,
36,
12156,
-85080,
48,
537805056,
60687517,
1092422977,
-565706093,
520934365,
0,
52,
12060,
-85072,
144,
3236612,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
36,
12252,
-84984,
56,
537805056,
60687517,
1092422977,
-565575021,
520934365,
0,
68,
12156,
-84968,
356,
3216132,
1074675968,
127797405,
1109200193,
93587091,
60163221,
1526896452,
-673325558,
-724314411,
1090526988,
-572623861,
-740895273,
2034900,
0,
36,
12364,
-84684,
48,
537805056,
60687517,
1092422977,
-565706093,
520934365,
0,
52,
12268,
-84676,
144,
3197700,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
36,
12460,
-84588,
56,
537805056,
60687517,
1092422977,
-565575021,
520934365,
0,
68,
12364,
-84572,
308,
3177220,
1074675968,
127797405,
1109200193,
93587091,
60163221,
2046990148,
-673325558,
-724314411,
1090526988,
-572634869,
-740895273,
2034900,
0,
52,
12436,
-84336,
124,
3169028,
806240512,
94242461,
1109200193,
60032147,
173081237,
-740958754,
2034900,
2881,
0,
52,
12492,
-84268,
144,
3159812,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
60,
12548,
-84180,
528,
3149572,
1611546880,
194907293,
1092422977,
127273109,
-1811246269,
110576649,
2030175640,
-656941602,
-724314411,
7948,
0,
52,
12612,
-83716,
212,
3149572,
-2146549504,
-1643078399,
487407887,
-1810984127,
177685005,
-1777560253,
-572625909,
-740895273,
2034900,
36,
12804,
-83560,
60,
537805056,
60687517,
1092422977,
26477203,
-740434357,
2034900,
52,
12708,
-83540,
144,
3130884,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
44,
12764,
-83452,
264,
3120644,
1343111424,
161352349,
1092422978,
127142035,
1946588489,
-740958754,
2034900,
20,
12948,
-83236,
8,
0,
0,
44,
12836,
-83252,
140,
3106820,
537805056,
60687517,
1092422977,
26477203,
-572650918,
520934611,
737536,
52,
12884,
-83160,
144,
3098884,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
60,
12940,
-83072,
540,
3089156,
-1878114048,
-1642947327,
487407889,
-1777429183,
278086413,
-1757016172,
1158387724,
1963068057,
-673587746,
-740895272,
2034900,
36,
13140,
-82596,
152,
1074676224,
127797405,
1646071105,
520936926,
0,
0,
44,
13044,
-82484,
84,
3078916,
537805056,
60687517,
1092422977,
26477203,
-572650932,
520934611,
737536,
52,
13092,
-82448,
144,
3070724,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
68,
13148,
-82360,
400,
3060484,
1611546880,
194907293,
1092422977,
160696979,
-1744398525,
77154565,
143983514,
1409419158,
-623256098,
-690628393,
520934611,
0,
0,
52,
13356,
-82032,
376,
1074675968,
127797405,
1142754626,
60163221,
26739351,
93587091,
-572631550,
-690628393,
520934611,
0,
52,
13412,
-81712,
428,
537805056,
60687517,
1092422978,
26477203,
-569745406,
215274461,
188809247,
-740434364,
2034900,
0,
36,
13468,
-81340,
48,
537805056,
60687517,
1092422977,
-565706093,
520934365,
0,
52,
13372,
-81332,
144,
3009540,
1074675968,
127797405,
1092422977,
93587091,
-1778084542,
-572629501,
-724314411,
7948,
0,
60,
13428,
-81244,
520,
2999300,
-1341243136,
-1642685183,
487407893,
-1777167039,
278349073,
345182104,
-1723395180,
-562953714,
-656942627,
-724314411,
7948,
60,
13492,
-80788,
340,
2992388,
-2146549504,
-1643078399,
487407887,
-1810984127,
211108621,
-1756951658,
-565771766,
-690628643,
520934611,
0,
0,
52,
13556,
-80512,
272,
2982404,
1611546880,
194907293,
1092422977,
160696979,
-1777822397,
110577927,
-673325452,
-724314411,
7948,
52,
13612,
-80296,
312,
2972676,
-2146549504,
-1643078399,
487407887,
-1810984127,
211108621,
-1756886122,
-572621046,
-740895273,
2034900,
36,
13804,
-57952,
40,
537805056,
60687517,
1092422977,
-565837165,
520934365,
0,
20,
13844,
-80080,
8,
0,
0,
52,
13732,
-80096,
236,
2949380,
1611546880,
194907293,
1092422977,
127273109,
-1811246269,
110577929,
-673325461,
-724314411,
7948,
20,
13924,
-79916,
4,
0,
0,
20,
13948,
-79936,
8,
0,
0,
20,
13972,
-79952,
8,
0,
0,
60,
13860,
-79968,
520,
2920964,
-804372224,
-1642423039,
487407897,
-1810328767,
312033815,
-1743481021,
378880531,
1996625302,
-673587746,
-740895272,
2034900,
36,
14060,
-79512,
64,
537805056,
60687517,
1092422977,
-565443949,
520934365,
0,
44,
13964,
-79488,
168,
2901252,
1343111424,
161352349,
1092422978,
127142035,
1661375810,
-740958754,
2034900,
60,
14012,
-79368,
428,
2893572,
-1878114048,
-1640850173,
487408177,
-1808755903,
748110639,
-1790301288,
-1725065682,
-564592086,
-656942627,
-724314411,
7948,
52,
14076,
-79004,
504,
2887684,
1611546880,
194907293,
1092422977,
127273109,
-1811246270,
110577673,
-572624894,
-740895273,
2034900,
44,
14132,
-78556,
148,
2878212,
1611546880,
194907293,
1092422977,
160696979,
1493734728,
-740958754,
2034900,
36,
14316,
-78456,
60,
537805056,
60687517,
1092422977,
-565509485,
520934365,
0,
60,
14220,
-58464,
160,
2860036,
1074675968,
127797405,
1125977409,
93587091,
60163221,
26739351,
-572650915,
-690628393,
520934611,
737536,
0,
60,
14284,
-78500,
684,
2847236,
-267501312,
-1642160895,
487407901,
-1810066623,
412566299,
-1790699624,
1209636378,
-1744693607,
-673587746,
-740895272,
2034900,
52,
14484,
-58432,
100,
806240512,
94242461,
1092422977,
60032147,
1308792131,
-706879990,
520934611,
1124811008,
-740958754,
2034900,
20,
14540,
-58388,
4,
0,
0,
52,
14564,
-58408,
100,
806240512,
94242461,
1092422977,
60032147,
1308792131,
-706879990,
520934611,
1124811008,
-740958754,
2034900,
20,
14620,
-58364,
4,
0,
0,
36,
14644,
-78040,
104,
806240768,
94242461,
1159531841,
-565115757,
520934365,
0,
52,
14684,
-58424,
300,
1074675968,
127797405,
1092422977,
93587091,
-1778084540,
-1744660733,
-566033919,
-707209251,
215274454,
31,
76,
14604,
-78032,
2284,
2799364,
-2146549504,
782057731,
205598110,
1090711581,
664283287,
-1809018045,
714426667,
614148502,
-1723128932,
52795942,
-572653025,
-623256357,
-690628393,
520934611,
0,
52,
14820,
-58260,
300,
1074675968,
127797405,
1092422977,
93587091,
-1778084540,
-1744660733,
-566033919,
-707209251,
215274454,
31,
44,
14740,
-58016,
120,
2814724,
537805056,
60687517,
1092422977,
26477203,
-740434342,
2034900,
0,
68,
14924,
-57944,
464,
1879982336,
228462237,
1109200193,
194251923,
160828053,
-1744267451,
-1710843641,
-1677419771,
-563478013,
-639837219,
-707209254,
215274454,
31,
0,
52,
6708,
-57552,
216,
806240512,
94242461,
1109200194,
60032147,
174195349,
-740958754,
2034900,
-565376191,
-724314659,
7948,
60,
6764,
-57392,
580,
1343111424,
161352349,
1109200193,
93718165,
26870425,
-1811377338,
-1744529657,
-561643005,
-673523235,
-740895272,
2034900,
0,
52,
14980,
-56876,
200,
2756356,
806240512,
94242461,
1092422977,
26608277,
-1811639485,
-572626173,
-724314411,
7948,
0,
68,
15172,
-56732,
464,
1879982336,
228462237,
1109200193,
194251923,
160828053,
-1744267451,
-1710843641,
-1677419771,
-563478013,
-639837219,
-707209254,
215274454,
31,
0,
52,
6956,
-56340,
216,
806240512,
94242461,
1109200194,
60032147,
174195349,
-740958754,
2034900,
-565376191,
-724314659,
7948,
60,
7012,
-56180,
580,
1343111424,
161352349,
1109200193,
93718165,
26870425,
-1811377338,
-1744529657,
-561643005,
-673523235,
-740895272,
2034900,
0,
52,
15228,
-55664,
228,
2698500,
806240512,
94242461,
1092422977,
26608277,
-1811639485,
-572624381,
-724314411,
7948,
0,
44,
15284,
-55492,
112,
2691076,
806240512,
94242461,
1142754626,
60032147,
1375900994,
-740958754,
2034900,
84,
15332,
-147324,
2100,
2681860,
-1341243136,
-1878114045,
-1639801596,
487407937,
-1740859583,
1083392571,
-1790492780,
1161664062,
966408857,
932984987,
-570296061,
-639837219,
-707209254,
215274454,
1090760735,
14,
0,
60,
15420,
-76564,
432,
2725380,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-563936723,
-690628643,
520934611,
0,
0,
60,
15484,
-76196,
432,
2720260,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-563936723,
-690628643,
520934611,
0,
0,
60,
15548,
-75828,
432,
2715140,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-563936723,
-690628643,
520934611,
0,
0,
60,
15612,
-75460,
432,
2710020,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-563936723,
-690628643,
520934611,
0,
0,
60,
15676,
-75092,
496,
2704900,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-562888147,
-690628643,
520934611,
0,
0,
60,
15740,
-74660,
432,
2698244,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-563936723,
-690628643,
520934611,
0,
0,
60,
15804,
-74292,
432,
2693124,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-563936723,
-690628643,
520934611,
0,
0,
60,
15868,
-73924,
432,
2688004,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-563936723,
-690628643,
520934611,
0,
0,
60,
15932,
-73556,
432,
2682884,
-2146549504,
-1640981245,
487407919,
-1775463103,
714555947,
-1808886973,
-563936723,
-690628643,
520934611,
0,
0,
60,
15996,
-73188,
476,
2677764,
-2146549504,
-1640981245,
487408175,
-1808886975,
714555949,
-1775463101,
-563281365,
-690628643,
520934611,
0,
0,
20,
16196,
-145952,
4,
0,
0,
68,
16084,
-72800,
992,
2665988,
-535936768,
-1640194813,
487407931,
-1808100543,
949306425,
-1723320426,
-1691117004,
-1758356430,
37066806,
-606216472,
-673523236,
-740895272,
2034900,
84,
16156,
-71880,
1096,
2670852,
-1341243136,
-1878114045,
-1639801596,
487407937,
-1807707327,
983122495,
-1690027622,
1211604024,
1033256597,
-1740859581,
-553975237,
-639837219,
-707209254,
215274454,
1090760735,
14,
0,
76,
16244,
-70872,
2108,
2676484,
-2146549504,
-535936763,
-1638097659,
487407963,
-1705731775,
1486178643,
1452758934,
1385911704,
1519604124,
219540,
-606216702,
-673523236,
-740895272,
-2145448748,
934149,
76,
16324,
-68844,
368,
2697988,
-267501312,
446513409,
205592990,
1090637853,
295309977,
-1776904893,
412305429,
345446292,
-1689644136,
34577424,
-606216638,
-673523236,
-740895272,
2034900,
0,
76,
16404,
-68556,
376,
2685444,
-267501312,
480067841,
205593502,
1090641949,
395712661,
-1743349949,
445859605,
-1723524716,
-1693214188,
34708498,
-606216630,
-673523236,
-740895272,
2034900,
0,
76,
16484,
-68260,
384,
2674180,
-1878114048,
513622274,
205594014,
1090646045,
429267605,
-1743218876,
-1676371177,
479414803,
-1723589740,
34970134,
-606216631,
-673523236,
-740895272,
2034900,
0,
84,
16564,
-67956,
1868,
2662916,
-1341243136,
-1878114045,
-1639801596,
487407937,
-1774283455,
1083392573,
-1756807276,
1127979068,
966408857,
-1674011833,
28836663,
-589570594,
-656942375,
-724314411,
61873932,
3649,
0,
84,
16652,
-66176,
1560,
2675204,
-1341243136,
-1878114044,
-1638753019,
487407953,
-1806658751,
1318405711,
-1689956970,
1162320968,
1268272279,
1234848409,
-570331133,
-639837219,
-707209254,
215274454,
1090826271,
14,
0,
52,
16740,
-64704,
184,
2688772,
1611546880,
194907293,
1092422977,
160696979,
-1777822397,
110578183,
-673325475,
-724314411,
7948,
20,
16932,
-64576,
4,
0,
0,
76,
16820,
-64596,
1204,
2672900,
-804372224,
-1640325885,
487407929,
-1674536127,
949175087,
-1790625900,
1211471414,
865612951,
832189081,
-570353405,
-639837219,
-707209254,
215274454,
31,
0,
60,
16900,
-63472,
324,
2671620,
-267501312,
-1641112318,
487407917,
-1809018047,
681002027,
714418072,
1224878486,
-656941602,
-724314411,
7948,
0,
68,
16964,
-63212,
1000,
2664196,
-535936768,
-1641243390,
487407915,
-1742301375,
680870437,
-1824184426,
1177130026,
597304473,
-385736037,
-639902242,
-707209254,
215274454,
31,
52,
17036,
-62284,
184,
2659844,
1611546880,
194907293,
1092422977,
160696979,
-1777822397,
110578183,
-673325475,
-724314411,
7948,
68,
17092,
-62156,
708,
2650116,
-535936768,
-1641243390,
487407915,
-1742301375,
680870437,
-1823922282,
1160352810,
597304473,
-572613374,
-656942375,
-724314411,
7948,
0,
36,
17300,
-57260,
72,
269369600,
27132573,
1327304001,
520936926,
0,
0,
36,
17340,
-50436,
68,
537805056,
60687517,
1092422979,
-565509485,
520934365,
0,
68,
17380,
-57268,
252,
-1609678592,
-535936751,
43818257,
1090689950,
-1824449267,
-1718353254,
-1735047166,
43488770,
1895995031,
-707273250,
215274454,
1091674143,
14,
0,
36,
17452,
-57088,
116,
537805056,
60687517,
1092422977,
26477203,
-740434343,
2034900,
36,
17492,
-57012,
116,
537805056,
60687517,
1092422977,
26477203,
-740434343,
2034900,
44,
17532,
-56936,
336,
1074675968,
127797405,
1092422977,
60163221,
-1811508413,
-565378555,
-740895267,
2034900,
36,
17580,
-56648,
212,
537805056,
60687517,
1092422977,
26477203,
-740434319,
2034900,
60,
17620,
-56476,
356,
-267501312,
-1609678571,
48536854,
1090708382,
-1824449267,
-510393630,
-527089150,
-565116414,
-724314659,
368058124,
3649,
0,
60,
17684,
-56184,
312,
-535936768,
-1878114027,
48405782,
1090707870,
-1824449267,
-543948064,
-560643582,
48076290,
-572635646,
-724314411,
367009548,
3649,
92,
17748,
-55936,
580,
-267501312,
-804372203,
48930070,
1090709918,
-1824449267,
-409730328,
-526695934,
48208898,
48665929,
1124263318,
-1744640873,
-493288733,
48339458,
-572621566,
-623256357,
-690628393,
520934611,
239146480,
0,
0,
100,
17844,
-55452,
1096,
-2146549504,
-804372192,
-1341243092,
97951021,
1090901406,
-1824449267,
-745273900,
-862239995,
97229829,
97556295,
1124454296,
-1710895463,
-761985587,
97621509,
-572588798,
-623256357,
-690628393,
520934611,
239152336,
239144144,
0,
0,
60,
17948,
-54460,
300,
-535936768,
-1878114027,
48405782,
1090707870,
-1824449267,
-543948064,
-560643582,
48076290,
-572636414,
-724314411,
367009548,
3649,
68,
18012,
-54224,
372,
-535936768,
-1609678571,
48536854,
1090708382,
-1824449267,
-510393630,
-527089150,
48207362,
48142150,
-572633342,
-740895273,
-534836012,
934165,
0,
76,
18084,
-53924,
580,
-535936768,
-1341243115,
48667926,
1090708894,
-1790894835,
-510262558,
-526958078,
48207874,
48534343,
-1727863916,
-577109282,
-561905150,
-673523235,
-740895272,
-534836012,
934165,
68,
18164,
-53424,
312,
-535936768,
-1609678571,
48536854,
1090708382,
-1790894835,
-543816992,
-493665534,
48337922,
48142150,
-673325441,
-724314411,
367009548,
3649,
0,
36,
18236,
-51256,
140,
806240512,
94242461,
1092422978,
60032147,
-740434338,
2034900,
60,
18140,
-53224,
504,
2398980,
-1878114048,
-1642947327,
487407889,
-1777429183,
211239693,
-1823929448,
-1727032304,
-563215862,
-656942627,
-724314411,
7948,
60,
18204,
-52784,
504,
2389252,
-1878114048,
-1642947327,
487407889,
-1777429183,
211239693,
-1823929448,
-1727032304,
-563215862,
-656942627,
-724314411,
7948,
76,
18268,
-52344,
732,
2379524,
-1609678592,
-1642816255,
487407891,
-1777298111,
244794127,
211357080,
-1689908326,
1107926026,
294916755,
-572610558,
-623256357,
-690628393,
520934611,
0,
0,
36,
18484,
-51692,
96,
806240512,
94242461,
1092422977,
-564919149,
520934365,
0,
20,
18524,
-51636,
8,
0,
0,
20,
18548,
-51652,
8,
0,
0,
44,
18436,
-148324,
144,
2345988,
1074675968,
127797405,
1092422978,
93587091,
-740434337,
2034900,
0,
44,
18620,
-50760,
304,
269369600,
27132573,
1444744515,
215866890,
188874783,
215932269,
31,
0,
60,
18668,
-50504,
132,
269369600,
27132573,
1293749571,
215932170,
188809247,
-572650939,
1090526988,
-586529781,
2034910,
-582874302,
2034910,
0,
116,
18732,
-50432,
2028,
1879983104,
228462237,
1092422977,
160828053,
-1744267453,
210978823,
110693268,
77268378,
174916508,
-589570594,
-656942375,
-724314411,
1107304204,
28771083,
-754966772,
-673786412,
-606414376,
1105124828,
-1821369076,
-1794403316,
-1760979446,
-1727555576,
-1694131706,
-1660707836,
892430,
0,
108,
18852,
-48520,
1012,
1879982336,
228462237,
1092422978,
194251923,
-1777691325,
144131337,
110692248,
77268378,
1828848540,
-606216694,
-673523236,
-740895272,
2034900,
174918465,
-707341356,
-639969320,
-555885604,
1090526988,
-737512181,
-657074477,
-589702441,
215932379,
188809247,
0,
20,
18964,
-47616,
276,
0,
0,
68,
18988,
-47360,
1892,
-1878114048,
-535936508,
-1639146236,
487407947,
-1807051964,
-1773628087,
-1740204217,
-1706780347,
-569742525,
-673523235,
-740895272,
-1877013292,
934148,
2882,
108,
19060,
-45536,
924,
-535936768,
-1072807417,
25730312,
1090619294,
-1790894835,
-2087321212,
2124104449,
-1824096868,
-2053897850,
25335553,
-1727954536,
2140799360,
-569746942,
-639837219,
-707209254,
215274454,
1091035167,
188809230,
-741078419,
-673655338,
-606283302,
520937181,
239142880,
737792,
68,
19172,
-44720,
532,
-1878114048,
-804372211,
31104269,
1090640286,
-1790829299,
-711589418,
30709505,
30970694,
1879168916,
-673325558,
-724314411,
227548940,
1107299905,
11,
52,
19244,
-44256,
152,
537805056,
60687517,
1092422977,
26477203,
-572650915,
520934611,
1124811264,
-555887660,
7948,
0,
68,
19300,
-44160,
184,
-2146549504,
-1072807667,
30973197,
1090639774,
-1790763763,
-745143852,
30839553,
-1761487468,
174391762,
-707273250,
215274454,
1091403807,
188809230,
0,
84,
19372,
-44048,
268,
-2146549504,
-1072807667,
30973197,
1090639774,
-1790763763,
-745143852,
30839553,
-1761487468,
-778567214,
-569740543,
-707209251,
215274454,
1108181023,
188809230,
-690760635,
-573056811,
-2145448738,
934157,
76,
19460,
-43864,
392,
1074675968,
127797405,
1092422977,
60163221,
-1811508413,
-737516539,
-573188397,
2034910,
172362561,
-690627106,
520934611,
1779122432,
-690760694,
215932373,
188809247,
0,
44,
19540,
-43552,
108,
269369600,
27132573,
1394412866,
215866890,
188874783,
215932226,
31,
0,
20,
19588,
-43488,
8,
0,
0,
44,
19612,
-43504,
108,
269369600,
27132573,
1411190082,
215866890,
188809247,
215932226,
31,
0,
20,
19660,
-43440,
8,
0,
0,
20,
19684,
-43456,
20,
0,
0,
20,
19708,
-43456,
8,
0,
0,
20,
19732,
-43472,
8,
0,
0,
20,
19756,
-43488,
8,
0,
0,
36,
19780,
-43504,
48,
806240512,
94242461,
1159531842,
215866890,
188874783,
0,
20,
19820,
-43496,
8,
0,
0,
20,
19844,
-43512,
8,
0,
0,
76,
19868,
-43528,
280,
-1072807680,
-267501036,
47095060,
1090702750,
-1790894835,
-912915766,
-862764286,
46896130,
-572650890,
-724314411,
348135180,
1090522689,
-741063925,
-555887146,
348135180,
3650,
20,
19948,
-43328,
4,
0,
0,
156,
19972,
-43344,
372,
-2146549504,
-1072807652,
64527645,
1090770846,
-1790829299,
-812252208,
-934804221,
-951515901,
-696236541,
64323843,
63326725,
63261445,
-2096900990,
1275397075,
1292174276,
88605635,
84132430,
-1828470449,
-778828846,
63870723,
-1727804008,
-879098932,
63609603,
1828964764,
115203594,
105842254,
105711180,
105580106,
-615971256,
-673523236,
-740895272,
-1060912428,
-2145448767,
934172,
2883,
0,
156,
20132,
-43128,
236,
-2146549504,
-1072807665,
42507536,
1090684830,
-1824383731,
-2121006462,
-129497854,
-146209535,
-2071836415,
42173186,
32918021,
32852741,
-2130540928,
1275396741,
1292173812,
-2137718285,
33527298,
32656901,
32591621,
-1744699753,
-1723334147,
-73793028,
33200897,
1476524444,
115203594,
105842254,
105711180,
105580106,
-615971256,
-673523236,
-740895272,
-1060912428,
-2145448767,
934159,
2882,
0,
148,
20292,
-43048,
240,
-2146549504,
-1072807665,
42507536,
1090684830,
-1824383731,
-2121006462,
-129497854,
-146209535,
1241859585,
1258619382,
-2038431243,
42303746,
32787461,
32722181,
-2096987006,
1308951171,
1325728242,
-1790770703,
-6946176,
-23640575,
33396737,
-1711145831,
-90504709,
33135617,
115203685,
105842254,
105711180,
105580106,
-615971256,
-673523236,
-740895272,
-1060912428,
-2145448767,
934159,
156,
20444,
-42960,
240,
-2146549504,
-1072807665,
42507536,
1090684830,
88284429,
84015176,
-2147354807,
-2055142778,
-162921214,
-179632895,
1275414785,
1292173812,
-2104294925,
42046466,
32656901,
32591621,
-2096987006,
-2137718141,
33527298,
-1744699753,
-57081347,
33266177,
-1677591909,
173015545,
1309072862,
1275481862,
1241926918,
1208371974,
-589608698,
-656942375,
-724314411,
-1044331582,
260054796,
1107299905,
11,
0,
20,
20604,
-42880,
28,
0,
0,
140,
20628,
-42872,
216,
-1072807680,
-535936492,
48012565,
1090706334,
-1824383731,
-644611366,
-800586494,
-817298174,
1241859586,
1258619598,
-661323059,
47683074,
46943237,
46877957,
-1744644457,
1308951253,
1325728458,
-1723465015,
-744881452,
47356674,
1594020252,
115203594,
105842254,
105711180,
105580106,
-615971256,
-673523236,
-740895272,
-1071706924,
934164,
2882,
0,
20,
20772,
-42800,
28,
0,
0,
60,
20796,
-42792,
244,
1611546880,
194907293,
1092422977,
160696979,
-1794991290,
-1761110520,
-1727686650,
1929615876,
-639902242,
-707209254,
215274454,
31,
52,
20860,
-42608,
184,
1343111424,
161352349,
1092422977,
127142035,
-1777953467,
-1761437435,
1694734340,
-673587746,
-740895272,
2034900,
60,
20916,
-42480,
124,
269369600,
27132573,
1310526787,
215866890,
188874783,
-555939262,
1107304204,
-586530293,
2034910,
-582874302,
2034910,
0,
44,
20980,
-42416,
304,
269369600,
27132573,
1444744515,
215866890,
188874783,
215932269,
31,
0,
52,
21028,
-42160,
272,
806240512,
94242461,
1092422977,
60032147,
-572650929,
520934611,
1678459392,
-573320182,
2034910,
2882,
52,
21084,
-41944,
108,
269369600,
27132573,
1226640707,
215866890,
188809247,
-555939256,
1107304204,
-555924981,
7948,
0,
52,
21140,
-41888,
144,
1343111424,
161352349,
1092422977,
127142035,
-1777953467,
1527027461,
-707273250,
215274454,
31,
0,
84,
21196,
-41800,
392,
-2146549504,
-1643078399,
487407887,
-1677288639,
177685253,
-1824257640,
-1794272242,
1191941644,
127535257,
-572650901,
-623256357,
-690628393,
520934611,
1661682176,
-707341356,
-639969320,
-555885604,
7948,
52,
21284,
-41496,
188,
1343111424,
161352349,
1092422977,
93718165,
-1811377341,
77022471,
-673325469,
-724314411,
7948,
0,
84,
21340,
-41360,
392,
1879982336,
228462237,
1092422977,
160828053,
-1811115194,
-1744267509,
-1710843641,
-1677419771,
172556803,
-589570594,
-656942375,
-724314411,
1107304204,
-737522933,
-657074477,
-589702441,
215932379,
188809247,
68,
21428,
-41056,
324,
1879982336,
228462237,
1092422977,
93980313,
-1777691325,
210978057,
144116628,
77268888,
175178652,
-589570594,
-656942375,
-724314411,
1107304204,
11,
92,
21500,
-40800,
1688,
-1341243136,
-1642685183,
487407893,
-1777167039,
345196049,
278336404,
244912024,
211488154,
174328732,
-589570594,
-656942375,
-724314411,
1090526988,
174719499,
-707341356,
-639969320,
-555885604,
1107304204,
11,
0,
108,
21596,
-39208,
1112,
240058880,
278724992,
222367646,
244532253,
211094932,
177671062,
-565638760,
-707209251,
215274454,
207159327,
-1828618211,
-1794272242,
-1760848372,
-1660315638,
1930403344,
-754966772,
-673786412,
1675550168,
25173260,
227806867,
194382997,
160959127,
262017181,
0,
36,
21708,
-38208,
96,
537805056,
60687517,
1092422978,
26477203,
-740434349,
2034900,
36,
21748,
-38152,
112,
537806080,
60687517,
1092422977,
26477203,
-740434348,
2034900,
20,
21788,
-38080,
20,
0,
0,
36,
21812,
-38080,
60,
537806080,
60687517,
1092422977,
-565771629,
520934365,
0,
36,
21852,
-38056,
108,
537805056,
60687517,
1092422978,
26477203,
-740434346,
2034900,
20,
21892,
-37984,
12,
0,
0,
36,
21916,
-37992,
52,
537805056,
60687517,
1092422977,
-565771629,
520934365,
0,
60,
21956,
-37976,
312,
806240512,
94242461,
1109200193,
60032147,
175506069,
-740958754,
2034900,
172297026,
-573189164,
2034910,
2881,
0,
20,
22020,
-37728,
4,
0,
0,
36,
22044,
-37744,
36,
269370624,
27132573,
1109200193,
520936926,
0,
0,
60,
22084,
-37744,
452,
1879982336,
228462237,
1092422977,
160828053,
-1744267453,
210977799,
174721940,
-656941602,
-724314411,
1090526988,
11,
0,
0
}; // weak
__int64 qword_4BEE8 = 0LL; // weak
void *fnv::vnm::JournalPrefix::journalPrefixes = (void *)0x315DCLL; // weak
char algn_4BF70[16] =
{
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0'
}; // weak
void (__fastcall *off_4BFA8[2])(fnv::vnm::CompositeConfig *__hidden this) =
{
&fnv::vnm::CompositeConfig::~CompositeConfig,
&fnv::vnm::CompositeConfig::~CompositeConfig
}; // weak
__int64 (__fastcall *off_4BFE0[2])() = { &std::stringbuf::~stringbuf, &std::stringbuf::~stringbuf }; // weak
__int64 (__fastcall *off_4C000[2])() = { &std::stringbuf::seekoff, &sub_15F44 }; // weak
_UNKNOWN unk_4C0B8; // weak
_UNKNOWN unk_4C0E0; // weak
void *off_4C170 = &unk_4C108; // weak
__int64 (__fastcall *off_4C1D0[2])() =
{
&std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream,
&std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream
}; // weak
__int64 (__fastcall *off_4C1F8[2])() =
{
&`non-virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream,
&`non-virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream
}; // weak
__int64 (__fastcall *off_4C220[2])() =
{
&`virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream,
&`virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream
}; // weak
_UNKNOWN unk_4C298; // weak
void (__fastcall *off_4C2D8[2])(fnv::vnm::Bind9DnsForwardEntry *__hidden this) =
{
&fnv::vnm::Bind9DnsForwardEntry::~Bind9DnsForwardEntry,
&fnv::vnm::Bind9DnsForwardEntry::~Bind9DnsForwardEntry
}; // weak
void (__fastcall *off_4C318[2])(fnv::vnm::JournalEntry *__hidden this) =
{
&fnv::vnm::JournalEntry::~JournalEntry,
&fnv::vnm::JournalEntry::~JournalEntry
}; // weak
char algn_4C350[16] =
{
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0'
}; // weak
__int64 (__fastcall *off_4C3A8[3])() = { &std::filebuf::~filebuf, &std::filebuf::~filebuf, &std::filebuf::imbue }; // weak
_UNKNOWN unk_4C430; // weak
_UNKNOWN unk_4C458; // weak
void *off_4C470 = &unk_4C430; // weak
__int64 (__fastcall *off_4C4A0[2])() = { &std::ifstream::~ifstream, &std::ifstream::~ifstream }; // weak
__int64 (__fastcall *off_4C4C8[2])() =
{
&`virtual thunk to'std::ifstream::~ifstream,
&`virtual thunk to'std::ifstream::~ifstream
}; // weak
void (__fastcall *off_4C5C0[2])(fnv::vnm::RoutingTunnel *__hidden this) =
{
&fnv::vnm::RoutingTunnel::~RoutingTunnel,
&fnv::vnm::RoutingTunnel::~RoutingTunnel
}; // weak
void (__fastcall *off_4C5F8[2])(fnv::vnm::AddressConfig *__hidden this) =
{
&fnv::vnm::AddressConfig::~AddressConfig,
&fnv::vnm::AddressConfig::~AddressConfig
}; // weak
void (__fastcall *off_4C630[2])(fnv::vnm::VlanIface *__hidden this) = { &fnv::vnm::VlanIface::~VlanIface, &fnv::vnm::VlanIface::~VlanIface }; // weak
void (__fastcall *off_4C668[2])(fnv::vnm::DefaultRoute *__hidden this) =
{
&fnv::vnm::DefaultRoute::~DefaultRoute,
&fnv::vnm::DefaultRoute::~DefaultRoute
}; // weak
void (__fastcall *off_4C6A0[2])(fnv::vnm::PfAnchor *__hidden this) = { &fnv::vnm::PfAnchor::~PfAnchor, &fnv::vnm::PfAnchor::~PfAnchor }; // weak
void (__fastcall *off_4C6D8[2])(fnv::vnm::InternalConnectionPolicy *__hidden this) =
{
&fnv::vnm::InternalConnectionPolicy::~InternalConnectionPolicy,
&fnv::vnm::InternalConnectionPolicy::~InternalConnectionPolicy
}; // weak
void (__fastcall *off_4C710[2])(fnv::vnm::RoutingPolicy *__hidden this) =
{
&fnv::vnm::RoutingPolicy::~RoutingPolicy,
&fnv::vnm::RoutingPolicy::~RoutingPolicy
}; // weak
void (__fastcall *off_4C748[2])(fnv::vnm::NatRule *__hidden this) = { &fnv::vnm::NatRule::~NatRule, &fnv::vnm::NatRule::~NatRule }; // weak
void (__fastcall *off_4C780[2])(fnv::vnm::IfaceRemover *__hidden this) =
{
&fnv::vnm::IfaceRemover::~IfaceRemover,
&fnv::vnm::IfaceRemover::~IfaceRemover
}; // weak
void *off_4D000 = &off_4D000; // weak
_UNKNOWN unk_4D010; // weak
void *fnv::vnm::pConnectionMap = &unk_4D308; // weak
void *fnv::vnm::pNatMap = &unk_4D380; // weak
void *fnv::vnm::pDnsMap = &unk_4D290; // weak
void *fnv::vnm::pRouteMap = &unk_4D1A0; // weak
void *fnv::vnm::pIfaceMap = &unk_4D128; // weak
pthread_once_t dword_4D050[4] = { 0, 2147483648, -1, 0 }; // weak
__int64 qword_4D060 = -1LL; // weak
_UNKNOWN unk_4D068; // weak
char _bss_start__; // weak
_QWORD qword_4D078[6]; // weak
__int64 qword_4D0A8; // weak
__int64 qword_4D0B0; // weak
__int64 qword_4D0B8; // weak
__int64 qword_4D0C0; // weak
__int64 qword_4D0C8; // weak
__int64 qword_4D0D0; // weak
_UNKNOWN unk_4D0D8; // weak
_UNKNOWN unk_4D0E0; // weak
__int64 qword_4D0E8; // weak
__int64 fnv::vnm::JournalPrefix::_instance; // weak
__int64 qword_4D0F8; // weak
__int64 qword_4D100; // weak
__int64 qword_4D108; // weak
__int64 qword_4D110; // weak
_BYTE byte_4D118[16]; // weak
_UNKNOWN unk_4D128; // weak
_UNKNOWN unk_4D1A0; // weak
_UNKNOWN unk_4D218; // weak
_UNKNOWN unk_4D290; // weak
_UNKNOWN unk_4D308; // weak
_UNKNOWN unk_4D380; // weak
_QWORD qword_4D3F8[4]; // weak
int dword_4D418; // weak
__int64 qword_4D420; // weak
_UNKNOWN unk_4D428; // weak
_UNKNOWN unk_4D430; // weak
float flt_4D438[20]; // weak
__int64 qword_4D488; // weak
char byte_4D490[]; // weak
char byte_4D4AF; // weak
char byte_4D4D0; // weak
_UNKNOWN unk_4D4F8; // weak
_UNKNOWN unk_4D500; // weak
__int64 qword_4D508; // weak
__int64 qword_4D510; // weak
_UNKNOWN unk_4D518; // weak
_UNKNOWN unk_4D548; // weak
__int64 qword_4D690; // weak
__int64 qword_4D698; // weak
__int64 qword_4D6A0; // weak
// extern _UNKNOWN sysctlbyname; weak
// extern _UNKNOWN `typeinfo for'std::out_of_range; weak
// extern _UNKNOWN std::codecvt<char,char,_Mbstatet>::id; weak
// extern _UNKNOWN _stack_chk_guard; weak
// extern _UNKNOWN `vtable for'std::out_of_range; weak
// extern _UNKNOWN `typeinfo for'std::bad_cast; weak
// extern _UNKNOWN std::string::~string; weak
// extern _UNKNOWN std::ctype<char>::id; weak
//----- (0000000000013290) ----------------------------------------------------
void sub_13290()
{
JUMPOUT(0LL);
}
// 132A0: control flows out of bounds to 0
//----- (0000000000013C10) ----------------------------------------------------
__int64 btext()
{
__int64 v1; // [xsp+30h] [xbp+30h] BYREF
__int64 v2; // [xsp+38h] [xbp+38h]
__int64 v3; // [xsp+40h] [xbp+40h]
__int64 v4; // [xsp+48h] [xbp+48h]
v3 = 0LL;
v1 = 0LL;
v2 = 0LL;
std::string::__init(&v1, "libvnm", 6LL);
qword_4D0A8 = Logger::getInstance(&v1);
std::string::~string(&v1);
v3 = 0LL;
v1 = 0LL;
v2 = 0LL;
std::string::__init(&v1, "libvnm", 6LL);
qword_4D0B0 = Logger::getInstanceTo(2LL, &v1);
std::string::~string(&v1);
return v4 ^ _stack_chk_guard;
}
// 138D0: using guessed type __int64 __fastcall Logger::getInstanceTo(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A40: using guessed type __int64 __fastcall Logger::getInstance(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D0A8: using guessed type __int64 qword_4D0A8;
// 4D0B0: using guessed type __int64 qword_4D0B0;
//----- (0000000000013CE4) ----------------------------------------------------
__int64 sub_13CE4()
{
__int64 v1; // [xsp+30h] [xbp+30h] BYREF
__int64 v2; // [xsp+38h] [xbp+38h]
__int64 v3; // [xsp+40h] [xbp+40h]
__int64 v4; // [xsp+48h] [xbp+48h]
v3 = 0LL;
v1 = 0LL;
v2 = 0LL;
std::string::__init(&v1, "libvnm", 6LL);
qword_4D0B8 = Logger::getInstance(&v1);
std::string::~string(&v1);
v3 = 0LL;
v1 = 0LL;
v2 = 0LL;
std::string::__init(&v1, "libvnm", 6LL);
qword_4D0C0 = Logger::getInstanceTo(2LL, &v1);
std::string::~string(&v1);
return v4 ^ _stack_chk_guard;
}
// 138D0: using guessed type __int64 __fastcall Logger::getInstanceTo(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A40: using guessed type __int64 __fastcall Logger::getInstance(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000013DB8) ----------------------------------------------------
__int64 sub_13DB8()
{
__int64 v1; // [xsp+30h] [xbp+30h] BYREF
__int64 v2; // [xsp+38h] [xbp+38h]
__int64 v3; // [xsp+40h] [xbp+40h]
__int64 v4; // [xsp+48h] [xbp+48h]
qword_4D0D0 = 0LL;
unk_4D0D8 = 0LL;
unk_4D0E0 = 0LL;
__cxa_atexit((void (__fastcall *)(void *))&std::string::~string, &qword_4D0D0, &off_4D000);
v3 = 0LL;
v1 = 0LL;
v2 = 0LL;
std::string::__init(&v1, "libvnm", 6LL);
qword_4D0C8 = Logger::getInstance(&v1);
std::string::~string(&v1);
v3 = 0LL;
v1 = 0LL;
v2 = 0LL;
std::string::__init(&v1, "libvnm", 6LL);
qword_4D0E8 = Logger::getInstanceTo(2LL, &v1);
std::string::~string(&v1);
return v4 ^ _stack_chk_guard;
}
// 138D0: using guessed type __int64 __fastcall Logger::getInstanceTo(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A40: using guessed type __int64 __fastcall Logger::getInstance(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D000: using guessed type void *off_4D000;
// 4D0C8: using guessed type __int64 qword_4D0C8;
// 4D0D0: using guessed type __int64 qword_4D0D0;
// 4D0E8: using guessed type __int64 qword_4D0E8;
//----- (0000000000013EAC) ----------------------------------------------------
__int64 sub_13EAC()
{
__int64 v1; // [xsp+30h] [xbp+30h] BYREF
__int64 v2; // [xsp+38h] [xbp+38h]
__int64 v3; // [xsp+40h] [xbp+40h]
__int64 v4; // [xsp+48h] [xbp+48h]
v3 = 0LL;
v1 = 0LL;
v2 = 0LL;
std::string::__init(&v1, "libvnm", 6LL);
qword_4D0F8 = Logger::getInstance(&v1);
std::string::~string(&v1);
v3 = 0LL;
v1 = 0LL;
v2 = 0LL;
std::string::__init(&v1, "libvnm", 6LL);
qword_4D100 = Logger::getInstanceTo(2LL, &v1);
std::string::~string(&v1);
__cxa_atexit((void (__fastcall *)(void *))&std::mutex::~mutex, &unk_4D010, &off_4D000);
return v4 ^ _stack_chk_guard;
}
// 138D0: using guessed type __int64 __fastcall Logger::getInstanceTo(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A40: using guessed type __int64 __fastcall Logger::getInstance(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D000: using guessed type void *off_4D000;
// 4D0F8: using guessed type __int64 qword_4D0F8;
// 4D100: using guessed type __int64 qword_4D100;
//----- (0000000000013F9C) ----------------------------------------------------
__int64 sub_13F9C()
{
__int64 v0; // x23
__int64 *v1; // x1
__int64 (__fastcall **v2)(); // x28
__int64 *v3; // x19
__int64 v4; // x0
_BYTE v6[16]; // [xsp+58h] [xbp+58h] BYREF
__int64 (__fastcall **v7)(); // [xsp+68h] [xbp+68h]
char *v8; // [xsp+70h] [xbp+70h]
__int64 (__fastcall **v9)(); // [xsp+78h] [xbp+78h]
__int64 v10; // [xsp+88h] [xbp+88h] BYREF
__int64 v11; // [xsp+90h] [xbp+90h]
__int64 v12; // [xsp+98h] [xbp+98h]
__int64 v13; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v14; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v15; // [xsp+B0h] [xbp+B0h]
__int64 v16; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v17; // [xsp+C0h] [xbp+C0h]
__int64 v18; // [xsp+C8h] [xbp+C8h] BYREF
__int64 v19; // [xsp+D0h] [xbp+D0h] BYREF
__int64 v20; // [xsp+D8h] [xbp+D8h]
__int64 v21; // [xsp+E0h] [xbp+E0h]
__int64 v22; // [xsp+E8h] [xbp+E8h] BYREF
__int64 v23; // [xsp+F0h] [xbp+F0h]
__int64 v24; // [xsp+F8h] [xbp+F8h]
__int64 v25; // [xsp+100h] [xbp+100h] BYREF
__int64 v26; // [xsp+108h] [xbp+108h]
__int64 v27; // [xsp+110h] [xbp+110h]
__int64 v28; // [xsp+118h] [xbp+118h] BYREF
__int64 v29; // [xsp+120h] [xbp+120h]
__int64 v30; // [xsp+128h] [xbp+128h]
__int64 v31; // [xsp+130h] [xbp+130h] BYREF
__int64 v32; // [xsp+138h] [xbp+138h]
__int64 v33; // [xsp+140h] [xbp+140h]
__int64 v34; // [xsp+148h] [xbp+148h] BYREF
__int64 v35; // [xsp+150h] [xbp+150h]
__int64 v36; // [xsp+158h] [xbp+158h]
__int64 v37; // [xsp+160h] [xbp+160h] BYREF
__int64 v38; // [xsp+168h] [xbp+168h]
__int64 v39; // [xsp+170h] [xbp+170h]
__int64 v40[3]; // [xsp+178h] [xbp+178h] BYREF
__int64 v41[3]; // [xsp+190h] [xbp+190h] BYREF
__int64 v42[3]; // [xsp+1A8h] [xbp+1A8h] BYREF
__int64 v43[3]; // [xsp+1C0h] [xbp+1C0h] BYREF
__int64 v44[3]; // [xsp+1D8h] [xbp+1D8h] BYREF
__int64 v45[4]; // [xsp+1F0h] [xbp+1F0h] BYREF
unk_4D428 = 0LL;
unk_4D430 = 0LL;
qword_4D420 = 0LL;
__cxa_atexit((void (__fastcall *)(void *))&std::string::~string, &qword_4D420, &off_4D000);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "dfltrt", 6LL);
v9 = off_4C000;
fnv::vnm::CompositeConfig::CompositeConfig((__int64)&unk_4D218, (__int64)&v10);
std::string::~string(&v10);
__cxa_atexit((void (__fastcall *)(void *))fnv::vnm::CompositeConfig::~CompositeConfig, &unk_4D218, &off_4D000);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "ifaces", 6LL);
fnv::vnm::CompositeConfig::CompositeConfig((__int64)&unk_4D128, (__int64)&v10);
std::string::~string(&v10);
__cxa_atexit((void (__fastcall *)(void *))fnv::vnm::CompositeConfig::~CompositeConfig, &unk_4D128, &off_4D000);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "rules", 5LL);
fnv::vnm::CompositeConfig::CompositeConfig((__int64)&unk_4D1A0, (__int64)&v10);
std::string::~string(&v10);
__cxa_atexit((void (__fastcall *)(void *))fnv::vnm::CompositeConfig::~CompositeConfig, &unk_4D1A0, &off_4D000);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "rules", 5LL);
fnv::vnm::CompositeConfig::CompositeConfig((__int64)&unk_4D308, (__int64)&v10);
std::string::~string(&v10);
__cxa_atexit((void (__fastcall *)(void *))fnv::vnm::CompositeConfig::~CompositeConfig, &unk_4D308, &off_4D000);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "dns", 3LL);
fnv::vnm::CompositeConfig::CompositeConfig((__int64)&unk_4D290, (__int64)&v10);
std::string::~string(&v10);
__cxa_atexit((void (__fastcall *)(void *))fnv::vnm::CompositeConfig::~CompositeConfig, &unk_4D290, &off_4D000);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "nat", 3LL);
fnv::vnm::CompositeConfig::CompositeConfig((__int64)&unk_4D380, (__int64)&v10);
std::string::~string(&v10);
__cxa_atexit((void (__fastcall *)(void *))fnv::vnm::CompositeConfig::~CompositeConfig, &unk_4D380, &off_4D000);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "libvnm", 6LL);
qword_4D108 = Logger::getInstance(&v10);
std::string::~string(&v10);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "libvnm", 6LL);
qword_4D110 = Logger::getInstanceTo(2LL, &v10);
v0 = 0LL;
std::string::~string(&v10);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "ALL", 3LL);
LODWORD(v13) = 0;
v14 = 0LL;
v15 = 0LL;
v16 = 0LL;
std::string::__init(&v14, "ICMP", 4LL);
LODWORD(v17) = 1;
v18 = 0LL;
v19 = 0LL;
v20 = 0LL;
std::string::__init(&v18, "TCP", 3LL);
LODWORD(v21) = 6;
v22 = 0LL;
v23 = 0LL;
v24 = 0LL;
std::string::__init(&v22, "UDP", 3LL);
qword_4D3F8[0] = 0LL;
qword_4D3F8[1] = 0LL;
qword_4D3F8[2] = 0LL;
qword_4D3F8[3] = 0LL;
LODWORD(v25) = 17;
dword_4D418 = 1.0;
do
{
std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::__insert_unique<std::pair<std::string const,int> const&>(
(__int64)qword_4D3F8,
(__int64)&v10 + v0);
v0 += 32LL;
}
while ( v0 != 128 );
std::string::~string(&v22);
std::string::~string(&v18);
std::string::~string(&v14);
std::string::~string(&v10);
__cxa_atexit(
(void (__fastcall *)(void *))std::unordered_map<std::string,int>::~unordered_map,
qword_4D3F8,
&off_4D000);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "ECG", 3LL);
v15 = 0LL;
v13 = 0LL;
v14 = 0LL;
std::string::__init(&v13, "ECG", 3LL);
v16 = 0LL;
v17 = 0LL;
v18 = 0LL;
std::string::__init(&v16, "uECG", 4LL);
v19 = 0LL;
v20 = 0LL;
v21 = 0LL;
std::string::__init(&v19, "10.1.0.1", 8LL);
v22 = 0LL;
v23 = 0LL;
v24 = 0LL;
std::string::__init(&v22, "TCU", 3LL);
v25 = 0LL;
v26 = 0LL;
v27 = 0LL;
std::string::__init(&v25, "10.1.0.2", 8LL);
v28 = 0LL;
v29 = 0LL;
v30 = 0LL;
std::string::__init(&v28, "SYNC", 4LL);
v31 = 0LL;
v32 = 0LL;
v33 = 0LL;
std::string::__init(&v31, "10.1.0.3", 8LL);
v34 = 0LL;
v35 = 0LL;
v36 = 0LL;
std::string::__init(&v34, "tECG", 4LL);
v37 = 0LL;
v38 = 0LL;
v39 = 0LL;
std::string::__init(&v37, "10.2.0.1", 8LL);
memset(v40, 0, sizeof(v40));
std::string::__init(v40, "CLUSTER", 7LL);
memset(v41, 0, sizeof(v41));
std::string::__init(v41, "10.2.0.2", 8LL);
memset(v42, 0, sizeof(v42));
std::string::__init(v42, "ADAS", 4LL);
memset(v43, 0, sizeof(v43));
std::string::__init(v43, "10.2.0.3", 8LL);
memset(v44, 0, sizeof(v44));
std::string::__init(v44, "HUD", 3LL);
v8 = "ing (%s)";
memset(v45, 0, 24);
std::string::__init(v45, "10.2.0.4", 8LL);
std::unordered_map<std::string,std::string>::unordered_map(flt_4D438, (__int64)&v10, 8LL);
v1 = v44;
do
{
v7 = (__int64 (__fastcall **)())v1;
std::pair<std::string const,std::string>::~pair((__int64)v1);
v1 = (__int64 *)(v7 - 6);
}
while ( v7 - 6 != (__int64 (__fastcall **)())v6 );
v7 = off_4C000;
__cxa_atexit(
(void (__fastcall *)(void *))std::unordered_map<std::string,std::string>::~unordered_map,
flt_4D438,
&off_4D000);
v12 = 0LL;
v10 = 0LL;
v11 = 0LL;
std::string::__init(&v10, "TCU", 3LL);
v15 = 0LL;
v2 = v7;
v13 = 0LL;
v14 = 0LL;
std::string::__init(&v13, "uECG", 4LL);
v18 = 0LL;
v16 = 0LL;
v17 = 0LL;
std::string::__init(&v16, "SYNC", 4LL);
v21 = 0LL;
v19 = 0LL;
v20 = 0LL;
std::string::__init(&v19, "uECG", 4LL);
v24 = 0LL;
v22 = 0LL;
v23 = 0LL;
std::string::__init(&v22, "CLUSTER", 7LL);
v27 = 0LL;
v25 = 0LL;
v26 = 0LL;
std::string::__init(&v25, "tECG", 4LL);
v30 = 0LL;
v28 = 0LL;
v29 = 0LL;
std::string::__init(&v28, "ADAS", 4LL);
v33 = 0LL;
v31 = 0LL;
v32 = 0LL;
std::string::__init(&v31, "tECG", 4LL);
v34 = 0LL;
v35 = 0LL;
v36 = 0LL;
std::string::__init(&v34, v8 + 1748, 3LL);
v39 = 0LL;
v37 = 0LL;
v38 = 0LL;
std::string::__init(&v37, "tECG", 4LL);
std::unordered_map<std::string,std::string>::unordered_map(&flt_4D438[10], (__int64)&v10, 5LL);
v3 = &v34;
do
{
v4 = (__int64)v3;
v3 -= 6;
std::pair<std::string const,std::string>::~pair(v4);
}
while ( v3 != (__int64 *)v6 );
__cxa_atexit((void (__fastcall *)(void *))v2[466], &flt_4D438[10], &off_4D000);
return v45[3] ^ *(_QWORD *)v9[491];
}
// 1F8: using guessed type __int64 elf_gnu_hash_indexes[64];
// 138D0: using guessed type __int64 __fastcall Logger::getInstanceTo(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A40: using guessed type __int64 __fastcall Logger::getInstance(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 29764: using guessed type __int64 __fastcall std::unordered_map<std::string,int>::~unordered_map();
// 297CC: using guessed type __int64 __fastcall std::unordered_map<std::string,std::string>::~unordered_map();
// 4C000: using guessed type __int64 (__fastcall *[2])();
// 4D000: using guessed type void *off_4D000;
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
// 4D3F8: using guessed type _QWORD[4];
// 4D418: using guessed type int dword_4D418;
// 4D420: using guessed type __int64 qword_4D420;
// 4D438: using guessed type float[20];
//----- (00000000000147D4) ----------------------------------------------------
__int64 sub_147D4()
{
__int64 v1[4]; // [xsp+20h] [xbp+20h] BYREF
memset(v1, 0, 24);
std::string::__init(v1, "libvnm", 6LL);
qword_4D488 = Logger::getInstance(v1);
std::string::~string(v1);
return v1[3] ^ _stack_chk_guard;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A40: using guessed type __int64 __fastcall Logger::getInstance(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D488: using guessed type __int64 qword_4D488;
//----- (0000000000014868) ----------------------------------------------------
char *sub_14868()
{
return &_bss_start__;
}
// 4D070: using guessed type char _bss_start__;
// 4DBE0: using guessed type __int64 ITM_deregisterTMCloneTable(void);
//----- (00000000000148E0) ----------------------------------------------------
__int64 sub_148E0()
{
__int64 result; // x0
result = (unsigned __int8)_bss_start__;
if ( !_bss_start__ )
{
if ( &_cxa_finalize )
__cxa_finalize(off_4D000);
sub_14868();
if ( sub_30550 )
sub_30550(dword_342A8);
result = 1LL;
_bss_start__ = 1;
}
return result;
}
// 342A8: using guessed type _DWORD dword_342A8[5537];
// 4D000: using guessed type void *off_4D000;
// 4D070: using guessed type char _bss_start__;
//----- (0000000000014940) ----------------------------------------------------
char *sub_14940()
{
if ( sub_30308 )
sub_30308((__int64)dword_342A8, qword_4D078);
if ( qword_4BEE8 && &Jv_RegisterClasses )
Jv_RegisterClasses();
return &_bss_start__;
}
// 342A8: using guessed type _DWORD dword_342A8[5537];
// 4BEE8: using guessed type __int64 qword_4BEE8;
// 4D070: using guessed type char _bss_start__;
// 4D078: using guessed type _QWORD qword_4D078[6];
// 4DBE8: using guessed type __int64 Jv_RegisterClasses(void);
// 4DBF0: using guessed type __int64 ITM_registerTMCloneTable(void);
//----- (0000000000014998) ----------------------------------------------------
__int64 __usercall fnv::vnm::TrimRight@<X0>(unsigned __int8 *a1@<X0>, __int64 a2@<X8>)
{
unsigned __int8 v4; // w0
__int64 v5; // x0
char *v6; // x21
char *v7; // x19
int v8; // t1
__int64 v9; // x3
v4 = *a1;
if ( (v4 & 1) != 0 )
{
v5 = *((_QWORD *)a1 + 1);
v6 = (char *)*((_QWORD *)a1 + 2);
}
else
{
v6 = (char *)(a1 + 1);
v5 = v4 >> 1;
}
v7 = &v6[v5];
while ( v7 != v6 )
{
v8 = (unsigned __int8)*--v7;
if ( !memchr(&unk_307B8, v8, 3uLL) )
{
v9 = v7 - v6;
goto LABEL_9;
}
}
v9 = -1LL;
LABEL_9:
std::string::basic_string(a2, a1, 0LL, v9 + 1, a1);
return a2;
}
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
//----- (0000000000014A30) ----------------------------------------------------
__int64 __usercall fnv::vnm::TrimLeft@<X0>(unsigned __int8 *a1@<X0>, __int64 a2@<X8>)
{
int v4; // w0
__int64 v5; // x0
unsigned __int8 *v6; // x22
unsigned __int8 *v7; // x19
unsigned __int8 *i; // x20
__int64 v9; // x2
v4 = *a1;
if ( (v4 & 1) != 0 )
{
v5 = *((_QWORD *)a1 + 1);
if ( !v5 )
goto LABEL_5;
v6 = (unsigned __int8 *)*((_QWORD *)a1 + 2);
}
else
{
LODWORD(v5) = v4 >> 1;
if ( !(_DWORD)v5 )
{
LABEL_5:
std::string::basic_string(a2, a1);
return a2;
}
v6 = a1 + 1;
v5 = (int)v5;
}
v7 = &v6[v5];
for ( i = v6; v7 != i; ++i )
{
if ( !memchr(&unk_307B8, *i, 3uLL) )
{
v9 = i - v6;
goto LABEL_14;
}
}
v9 = -1LL;
LABEL_14:
std::string::basic_string(a2, a1, v9, -1LL, a1);
return a2;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
//----- (0000000000014AF4) ----------------------------------------------------
__int64 __usercall fnv::vnm::Trim@<X0>(unsigned __int8 *a1@<X0>, __int64 a2@<X8>)
{
unsigned __int8 v4[24]; // [xsp+30h] [xbp+30h] BYREF
fnv::vnm::TrimRight(a1, (__int64)v4);
fnv::vnm::TrimLeft(v4, a2);
std::string::~string(v4);
return a2;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (0000000000014B7C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigElement::log(fnv::vnm::ConfigElement *this)
{
const char *v1; // x2
const char *v2; // x3
v1 = (char *)this + 17;
if ( (*((_BYTE *)this + 16) & 1) != 0 )
v1 = (const char *)*((_QWORD *)this + 4);
if ( *((_BYTE *)this + 8) )
v2 = "established";
else
v2 = "-";
return Logger::i((Logger *)qword_4D0A8, "\t%s: %s", v1, v2);
}
// 4D0A8: using guessed type __int64 qword_4D0A8;
//----- (0000000000014BC0) ----------------------------------------------------
_QWORD **__fastcall sub_14BC0(_QWORD **result, _QWORD *a2, _QWORD *a3)
{
while ( a3 != a2 )
{
if ( *result )
**result = *a2;
++a2;
++*result;
}
return result;
}
//----- (0000000000014BF0) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigElement::ConfigElement(__int64 a1, __int64 a2)
{
__int64 result; // x0
*(_BYTE *)(a1 + 8) = 0;
*(_DWORD *)(a1 + 12) = 0;
*(_QWORD *)a1 = algn_4BF70;
std::string::basic_string(a1 + 16, a2);
result = std::string::basic_string(a1 + 40, a2);
*(_BYTE *)(a1 + 64) = 0;
return result;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
//----- (0000000000014C60) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigElement::ConfigElement(__int64 result, __int64 a2)
{
__int64 v2; // x5
__int64 v3; // x5
char v4; // w2
*(_QWORD *)result = algn_4BF70;
*(_BYTE *)(result + 8) = *(_BYTE *)(a2 + 8);
*(_DWORD *)(result + 12) = *(_DWORD *)(a2 + 12);
v2 = *(_QWORD *)(a2 + 24);
*(_QWORD *)(result + 16) = *(_QWORD *)(a2 + 16);
*(_QWORD *)(result + 24) = v2;
*(_QWORD *)(result + 32) = *(_QWORD *)(a2 + 32);
*(_QWORD *)(a2 + 16) = 0LL;
*(_QWORD *)(a2 + 24) = 0LL;
*(_QWORD *)(a2 + 32) = 0LL;
v3 = *(_QWORD *)(a2 + 48);
*(_QWORD *)(result + 40) = *(_QWORD *)(a2 + 40);
*(_QWORD *)(result + 48) = v3;
*(_QWORD *)(result + 56) = *(_QWORD *)(a2 + 56);
*(_QWORD *)(a2 + 40) = 0LL;
*(_QWORD *)(a2 + 48) = 0LL;
v4 = *(_BYTE *)(a2 + 64);
*(_QWORD *)(a2 + 56) = 0LL;
*(_BYTE *)(result + 64) = v4;
*(_BYTE *)(a2 + 8) = 0;
return result;
}
//----- (0000000000014CC8) ----------------------------------------------------
void __fastcall fnv::vnm::ConfigElement::~ConfigElement(fnv::vnm::ConfigElement *this)
{
*(_QWORD *)this = algn_4BF70;
std::string::~string((char *)this + 40);
std::string::~string((char *)this + 16);
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (0000000000014CFC) ----------------------------------------------------
void __fastcall fnv::vnm::ConfigElement::~ConfigElement(fnv::vnm::ConfigElement *this)
{
fnv::vnm::ConfigElement::~ConfigElement(this);
operator delete(this);
}
//----- (0000000000014D20) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigElement::operator=(__int64 a1, __int64 a2)
{
__int64 v3; // x21
__int64 v5; // x3
__int64 v6; // x3
char v7; // w0
if ( a1 != a2 )
{
v3 = a1 + 16;
if ( (*(_BYTE *)(a1 + 16) & 1) != 0 )
{
**(_BYTE **)(a1 + 32) = 0;
*(_QWORD *)(a1 + 24) = 0LL;
}
else
{
*(_BYTE *)(a1 + 17) = 0;
*(_BYTE *)(a1 + 16) = 0;
}
std::string::reserve(v3, 0LL);
v5 = *(_QWORD *)(a2 + 24);
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a2 + 16);
*(_QWORD *)(a1 + 24) = v5;
*(_QWORD *)(v3 + 16) = *(_QWORD *)(a2 + 32);
*(_QWORD *)(a2 + 16) = 0LL;
*(_QWORD *)(a2 + 24) = 0LL;
*(_QWORD *)(a2 + 32) = 0LL;
if ( (*(_BYTE *)(a1 + 40) & 1) != 0 )
{
**(_BYTE **)(a1 + 56) = 0;
*(_QWORD *)(a1 + 48) = 0LL;
}
else
{
*(_BYTE *)(a1 + 41) = 0;
*(_BYTE *)(a1 + 40) = 0;
}
std::string::reserve(a1 + 40, 0LL);
v6 = *(_QWORD *)(a2 + 48);
*(_QWORD *)(a1 + 40) = *(_QWORD *)(a2 + 40);
*(_QWORD *)(a1 + 48) = v6;
*(_QWORD *)(a1 + 56) = *(_QWORD *)(a2 + 56);
*(_QWORD *)(a2 + 40) = 0LL;
*(_QWORD *)(a2 + 48) = 0LL;
v7 = *(_BYTE *)(a2 + 8);
*(_QWORD *)(a2 + 56) = 0LL;
*(_BYTE *)(a1 + 8) = v7;
*(_DWORD *)(a1 + 12) = *(_DWORD *)(a2 + 12);
*(_BYTE *)(a2 + 8) = 0;
}
return a1;
}
// 13A30: using guessed type __int64 __fastcall std::string::reserve(_QWORD, _QWORD);
//----- (0000000000014DFC) ----------------------------------------------------
__int64 __usercall fnv::vnm::ConfigElement::name@<X0>(fnv::vnm::ConfigElement *this@<X0>, __int64 a2@<X8>)
{
std::string::basic_string(a2, (char *)this + 16);
return a2;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
//----- (0000000000014E28) ----------------------------------------------------
bool __fastcall sub_14E28(__int64 a1, fnv::vnm::ConfigElement **a2)
{
_BOOL4 v2; // w20
int v4; // w3
__int64 v5; // x1
size_t v6; // x2
_BYTE *v7; // x0
char *v8; // x1
int v9; // w3
__int64 v10; // x3
int v11; // w4
unsigned __int8 v13; // [xsp+30h] [xbp+30h] BYREF
_BYTE v14[15]; // [xsp+31h] [xbp+31h] BYREF
_BYTE *v15; // [xsp+40h] [xbp+40h]
v2 = 0;
if ( *a2 )
{
fnv::vnm::ConfigElement::name(*a2, (__int64)&v13);
v4 = v13 & 1;
v5 = v13 >> 1;
if ( v4 )
v5 = *(_QWORD *)&v14[7];
v6 = *(_BYTE *)a1 >> 1;
if ( (*(_BYTE *)a1 & 1) != 0 )
v6 = *(_QWORD *)(a1 + 8);
v2 = 0;
if ( v6 == v5 )
{
v7 = v15;
v8 = (char *)(a1 + 1);
if ( !v4 )
v7 = v14;
if ( (*(_BYTE *)a1 & 1) != 0 )
v8 = *(char **)(a1 + 16);
if ( v4 )
{
v9 = 0;
if ( v6 )
v9 = memcmp(v7, v8, v6);
v2 = v9 == 0;
}
else
{
v10 = 0LL;
while ( v6 != v10 )
{
v11 = (unsigned __int8)v7[v10++];
if ( (unsigned __int8)v8[v10 - 1] != v11 )
{
v2 = 0;
goto LABEL_20;
}
}
v2 = 1;
}
}
LABEL_20:
std::string::~string(&v13);
}
return v2;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (0000000000014F38) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigElement::successful(fnv::vnm::ConfigElement *this)
{
return *((unsigned __int8 *)this + 8);
}
//----- (0000000000014F40) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigElement::errorcode(fnv::vnm::ConfigElement *this)
{
return *((unsigned int *)this + 3);
}
//----- (0000000000014F48) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::ConfigElement::wrap@<X0>(fnv::vnm::ConfigElement *a1@<X1>, _QWORD *a2@<X8>)
{
_QWORD *result; // x0
result = a2;
*a2 = a1;
return result;
}
//----- (0000000000014F54) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigElement::setRealName(__int64 a1)
{
return std::string::operator=(a1 + 40);
}
// 13500: using guessed type __int64 __fastcall std::string::operator=(_QWORD);
//----- (0000000000014F5C) ----------------------------------------------------
__int64 __usercall fnv::vnm::ConfigElement::realName@<X0>(fnv::vnm::ConfigElement *this@<X0>, __int64 a2@<X8>)
{
std::string::basic_string(a2, (char *)this + 40);
return a2;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
//----- (0000000000014F88) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigElement::isSelected(fnv::vnm::ConfigElement *this)
{
return *((unsigned __int8 *)this + 64);
}
//----- (0000000000014F90) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigElement::setSelected(__int64 this)
{
*(_BYTE *)(this + 64) = 1;
return this;
}
//----- (0000000000014F9C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigElement::clearSelected(__int64 this)
{
*(_BYTE *)(this + 64) = 0;
return this;
}
//----- (0000000000014FA4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CompositeConfig::CompositeConfig(__int64 a1, __int64 a2)
{
__int64 result; // x0
fnv::vnm::ConfigElement::ConfigElement(a1, a2);
*(_QWORD *)a1 = off_4BFA8;
*(_QWORD *)(a1 + 72) = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
*(_QWORD *)(a1 + 88) = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
*(_QWORD *)(a1 + 104) = 0LL;
result = 1LL;
*(_QWORD *)(a1 + 112) = 0LL;
*(_BYTE *)(a1 + 8) = 1;
return result;
}
// 4BFA8: using guessed type void (__fastcall *[2])(fnv::vnm::CompositeConfig *__hidden this);
//----- (0000000000014FF4) ----------------------------------------------------
_QWORD *__fastcall fnv::vnm::CompositeConfig::CompositeConfig(_QWORD *a1, _QWORD *a2)
{
__int64 v4; // x2
_QWORD *result; // x0
fnv::vnm::ConfigElement::ConfigElement((__int64)a1, (__int64)a2);
v4 = a2[13];
*a1 = off_4BFA8;
result = a1 + 9;
a1[9] = a2[9];
a1[10] = a2[10];
a1[11] = a2[11];
a1[12] = a2[12];
a2[9] = 0LL;
a2[10] = 0LL;
a2[11] = 0LL;
a2[12] = 0LL;
a1[13] = v4;
a1[14] = a2[14];
a2[13] = 0LL;
a2[14] = 0LL;
return result;
}
// 4BFA8: using guessed type void (__fastcall *off_4BFA8[2])(fnv::vnm::CompositeConfig *__hidden this);
//----- (0000000000015068) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::CompositeConfig::moveMe@<X0>(fnv::vnm::CompositeConfig *this@<X0>, _QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0x78uLL);
fnv::vnm::CompositeConfig::CompositeConfig(v4, this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (00000000000150F8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CompositeConfig::count(fnv::vnm::CompositeConfig *this)
{
return *((_QWORD *)this + 14);
}
//----- (0000000000015100) ----------------------------------------------------
bool __fastcall fnv::vnm::CompositeConfig::empty(fnv::vnm::CompositeConfig *this)
{
return *((_QWORD *)this + 14) == 0LL;
}
//----- (0000000000015110) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CompositeConfig::overrideSuccess(__int64 this)
{
*(_BYTE *)(this + 8) = 1;
return this;
}
//----- (000000000001511C) ----------------------------------------------------
_QWORD *__fastcall fnv::vnm::CompositeConfig::find(__int64 a1, __int64 a2)
{
_QWORD *v3; // x22
_QWORD *v4; // x21
fnv::vnm::ConfigElement **v5; // x1
fnv::vnm::ConfigElement **v6; // x19
fnv::vnm::ConfigElement **v7; // x1
fnv::vnm::ConfigElement **v8; // x23
_BYTE v10[24]; // [xsp+40h] [xbp+40h] BYREF
v3 = (_QWORD *)(a1 + 72);
v4 = (_QWORD *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(a1 + 72);
v6 = v5;
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(v3);
v8 = v7;
std::string::basic_string(v10, a2);
while ( v6 != v8 && !sub_14E28((__int64)v10, v6) )
{
if ( (unsigned __int64)++v6 - *v4 - 4096 <= 7 )
{
v6 = (fnv::vnm::ConfigElement **)v4[1];
++v4;
}
}
std::string::~string(v10);
return v4;
}
// 1515C: variable 'v5' is possibly undefined
// 15168: variable 'v7' is possibly undefined
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (0000000000015208) ----------------------------------------------------
bool __fastcall fnv::vnm::CompositeConfig::exists(__int64 a1, __int64 a2)
{
__int64 v3; // x1
__int64 v4; // x19
__int64 v5; // x1
fnv::vnm::CompositeConfig::find(a1, a2);
v4 = v3;
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end((_QWORD *)(a1 + 72));
return v5 != v4;
}
// 15220: variable 'v3' is possibly undefined
// 1522C: variable 'v5' is possibly undefined
//----- (000000000001523C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CompositeConfig::log(fnv::vnm::CompositeConfig *this)
{
Logger *v2; // x23
_BYTE *v3; // x2
_QWORD *v4; // x21
_QWORD *v5; // x22
__int64 *v6; // x1
__int64 *v7; // x20
__int64 *v8; // x1
__int64 *v9; // x21
__int64 v10; // t1
char v12; // [xsp+40h] [xbp+40h] BYREF
_BYTE v13[23]; // [xsp+41h] [xbp+41h] BYREF
__int64 v14; // [xsp+58h] [xbp+58h]
v2 = (Logger *)qword_4D0B0;
fnv::vnm::ConfigElement::name(this, (__int64)&v12);
v3 = *(_BYTE **)&v13[15];
if ( (v12 & 1) == 0 )
v3 = v13;
Logger::i(v2, "%s: ", v3);
v4 = (_QWORD *)((char *)this + 72);
std::string::~string(&v12);
Logger::i((Logger *)qword_4D0B0, "%zu elements.", v4[5]);
v5 = (_QWORD *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin((__int64)v4);
v7 = v6;
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(v4);
v9 = v8;
while ( v9 != v7 )
{
v10 = *v7++;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 24LL))(v10);
if ( (unsigned __int64)v7 - *v5 - 4096 <= 7 )
{
v7 = (__int64 *)v5[1];
++v5;
}
}
return v14 ^ _stack_chk_guard;
}
// 152D8: variable 'v6' is possibly undefined
// 152E0: variable 'v8' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D0B0: using guessed type __int64 qword_4D0B0;
//----- (000000000001535C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CompositeConfig::begin(fnv::vnm::CompositeConfig *this)
{
return std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin((__int64)this + 72);
}
//----- (0000000000015374) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CompositeConfig::end(fnv::vnm::CompositeConfig *this)
{
return std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end((_QWORD *)this + 9);
}
//----- (000000000001538C) ----------------------------------------------------
bool __fastcall fnv::vnm::CompositeConfig::isEnd(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v4; // x1
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end((_QWORD *)(a1 + 72));
return v4 == a3;
}
// 153A8: variable 'v4' is possibly undefined
//----- (00000000000153B8) ----------------------------------------------------
_QWORD *__fastcall fnv::vnm::CompositeConfig::find(__int64 a1, __int64 a2)
{
_QWORD *v3; // x22
_QWORD *v4; // x21
fnv::vnm::ConfigElement **v5; // x1
fnv::vnm::ConfigElement **v6; // x19
fnv::vnm::ConfigElement **v7; // x1
fnv::vnm::ConfigElement **v8; // x23
_BYTE v10[24]; // [xsp+40h] [xbp+40h] BYREF
v3 = (_QWORD *)(a1 + 72);
v4 = (_QWORD *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(a1 + 72);
v6 = v5;
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(v3);
v8 = v7;
std::string::basic_string(v10, a2);
while ( v6 != v8 && !sub_14E28((__int64)v10, v6) )
{
if ( (unsigned __int64)++v6 - *v4 - 4096 <= 7 )
{
v6 = (fnv::vnm::ConfigElement **)v4[1];
++v4;
}
}
std::string::~string(v10);
return v4;
}
// 153F8: variable 'v5' is possibly undefined
// 15404: variable 'v7' is possibly undefined
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (00000000000154A4) ----------------------------------------------------
unsigned __int64 __fastcall fnv::vnm::CompositeConfig::clearSelection(fnv::vnm::CompositeConfig *this)
{
_QWORD *v1; // x21
_QWORD *v2; // x20
__int64 *v3; // x1
__int64 *v4; // x19
unsigned __int64 result; // x0
__int64 *v6; // x1
__int64 *v7; // x21
__int64 v8; // t1
v1 = (_QWORD *)((char *)this + 72);
v2 = (_QWORD *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin((__int64)this + 72);
v4 = v3;
result = std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(v1);
v7 = v6;
while ( v4 != v7 )
{
v8 = *v4++;
fnv::vnm::ConfigElement::clearSelected(v8);
result = (unsigned __int64)v4 - *v2 - 4096;
if ( result <= 7 )
{
v4 = (__int64 *)v2[1];
++v2;
}
}
return result;
}
// 154C8: variable 'v3' is possibly undefined
// 154D0: variable 'v6' is possibly undefined
//----- (0000000000015514) ----------------------------------------------------
unsigned __int64 __fastcall fnv::vnm::CompositeConfig::clear(fnv::vnm::CompositeConfig *this)
{
return std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::clear((_QWORD *)this + 9);
}
//----- (000000000001551C) ----------------------------------------------------
void __fastcall fnv::vnm::CompositeConfig::~CompositeConfig(fnv::vnm::CompositeConfig *this)
{
void **v2; // x19
void **v3; // x20
void **v4; // x22
void *v5; // t1
char *v6; // x1
char *v7; // x0
*(_QWORD *)this = off_4BFA8;
v2 = (void **)((char *)this + 72);
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::clear((_QWORD *)this + 9);
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::clear(v2);
v3 = (void **)v2[1];
v4 = (void **)v2[2];
while ( v4 != v3 )
{
v5 = *v3++;
operator delete(v5);
}
v6 = (char *)v2[1];
while ( 1 )
{
v7 = (char *)v2[2];
if ( v6 == v7 )
break;
v2[2] = v7 - 8;
}
if ( *v2 )
operator delete(*v2);
fnv::vnm::ConfigElement::~ConfigElement(this);
}
// 4BFA8: using guessed type void (__fastcall *off_4BFA8[2])(fnv::vnm::CompositeConfig *__hidden this);
//----- (00000000000155A8) ----------------------------------------------------
void __fastcall fnv::vnm::CompositeConfig::~CompositeConfig(fnv::vnm::CompositeConfig *this)
{
fnv::vnm::CompositeConfig::~CompositeConfig(this);
operator delete(this);
}
//----- (00000000000155CC) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CompositeConfig::maybePush(fnv::vnm::CompositeConfig *this, fnv::vnm::ConfigElement *a2)
{
int v4; // w0
_QWORD *v5; // x0
__int64 v6; // x1
__int64 v7; // x0
Logger *v8; // x22
_BYTE *v9; // x2
__int64 v11; // [xsp+38h] [xbp+38h]
char v12; // [xsp+40h] [xbp+40h] BYREF
_BYTE v13[23]; // [xsp+41h] [xbp+41h] BYREF
__int64 v14; // [xsp+58h] [xbp+58h]
v4 = *((unsigned __int8 *)this + 8);
if ( v4 )
v4 = (unsigned __int8)fnv::vnm::ConfigElement::successful(a2);
*((_BYTE *)this + 8) = v4;
if ( v4 )
{
(*(void (__fastcall **)(fnv::vnm::ConfigElement *))(*(_QWORD *)a2 + 16LL))(a2);
if ( !*((_QWORD *)this + 13) )
std::deque<std::unique_ptr<fnv::vnm::ConfigElement>>::__add_front_capacity((__int64 *)this + 9);
v5 = (_QWORD *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin((__int64)this + 72);
if ( v6 == *v5 )
v6 = *(v5 - 1) + 4096LL;
if ( v6 != 8 )
{
v7 = v11;
v11 = 0LL;
*(_QWORD *)(v6 - 8) = v7;
}
--*((_QWORD *)this + 13);
++*((_QWORD *)this + 14);
if ( v11 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v11 + 8LL))(v11);
}
else
{
*((_DWORD *)this + 3) = fnv::vnm::ConfigElement::errorcode(a2);
}
v8 = (Logger *)qword_4D0B0;
fnv::vnm::ConfigElement::name(this, (__int64)&v12);
v9 = *(_BYTE **)&v13[15];
if ( (v12 & 1) == 0 )
v9 = v13;
Logger::i(v8, "%s: %zu elements.", v9, *((_QWORD *)this + 14));
std::string::~string(&v12);
return v14 ^ _stack_chk_guard;
}
// 15644: variable 'v6' is possibly undefined
// 15668: variable 'v11' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D0B0: using guessed type __int64 qword_4D0B0;
//----- (0000000000015758) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CompositeConfig::remove(__int64 a1, __int64 a2)
{
_QWORD *v3; // x23
__int64 v5; // x21
fnv::vnm::ConfigElement **v6; // x1
fnv::vnm::ConfigElement **v7; // x19
fnv::vnm::ConfigElement **v8; // x1
fnv::vnm::ConfigElement **v9; // x26
__int64 result; // x0
fnv::vnm::ConfigElement **v11; // x1
__int64 v12; // x2
_BYTE v13[24]; // [xsp+50h] [xbp+50h] BYREF
v3 = (_QWORD *)(a1 + 72);
v5 = std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(a1 + 72);
v7 = v6;
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(v3);
v9 = v8;
std::string::basic_string(v13, a2);
while ( v7 != v9 && !sub_14E28((__int64)v13, v7) )
{
if ( (unsigned __int64)++v7 - *(_QWORD *)v5 - 4096 <= 7 )
{
v7 = *(fnv::vnm::ConfigElement ***)(v5 + 8);
v5 += 8LL;
}
}
std::string::~string(v13);
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(v3);
result = 0LL;
if ( v7 != v11 )
{
std::deque<std::unique_ptr<fnv::vnm::ConfigElement>>::erase((__int64)v3, (char *)v5, v7);
v12 = a2 + 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v12 = *(_QWORD *)(a2 + 16);
Logger::i((Logger *)qword_4D0B0, "%s: %zu elements.", v12, *(_QWORD *)(a1 + 112));
return 1LL;
}
return result;
}
// 157A0: variable 'v6' is possibly undefined
// 157AC: variable 'v8' is possibly undefined
// 15814: variable 'v11' is possibly undefined
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D0B0: using guessed type __int64 qword_4D0B0;
//----- (0000000000015898) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CompositeConfig::removeSelected(fnv::vnm::CompositeConfig *this)
{
_QWORD *v1; // x22
__int64 v3; // x20
fnv::vnm::ConfigElement **v4; // x1
fnv::vnm::ConfigElement **v5; // x19
fnv::vnm::ConfigElement **v6; // x1
fnv::vnm::ConfigElement **v7; // x24
fnv::vnm::ConfigElement **v8; // x21
_QWORD *v9; // x25
fnv::vnm::ConfigElement *v10; // x1
fnv::vnm::ConfigElement *v11; // x0
__int64 result; // x0
fnv::vnm::ConfigElement **v13; // x1
char *v14; // x0
__int64 *v15; // x1
v1 = (_QWORD *)((char *)this + 72);
v3 = std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin((__int64)this + 72);
v5 = v4;
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(v1);
v7 = v6;
while ( v7 != v5 )
{
if ( (unsigned __int8)fnv::vnm::ConfigElement::isSelected(*v5) )
{
v8 = v5;
v9 = (_QWORD *)v3;
while ( 1 )
{
if ( (unsigned __int64)++v8 - *v9 - 4096 <= 7 )
{
v8 = (fnv::vnm::ConfigElement **)v9[1];
++v9;
}
if ( v7 == v8 )
break;
if ( !(unsigned __int8)fnv::vnm::ConfigElement::isSelected(*v8) )
{
v10 = *v8;
*v8 = 0LL;
v11 = *v5;
*v5 = v10;
if ( v11 )
(*(void (__fastcall **)(fnv::vnm::ConfigElement *))(*(_QWORD *)v11 + 8LL))(v11);
if ( (unsigned __int64)++v5 - *(_QWORD *)v3 - 4096 <= 7 )
{
v5 = *(fnv::vnm::ConfigElement ***)(v3 + 8);
v3 += 8LL;
}
}
}
break;
}
if ( (unsigned __int64)++v5 - *(_QWORD *)v3 - 4096 <= 7 )
{
v5 = *(fnv::vnm::ConfigElement ***)(v3 + 8);
v3 += 8LL;
}
}
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(v1);
result = 0LL;
if ( v5 != v13 )
{
v14 = (char *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(v1);
std::deque<std::unique_ptr<fnv::vnm::ConfigElement>>::erase((__int64)v1, (char *)v3, (__int64 *)v5, v14, v15);
Logger::i((Logger *)qword_4D0B0, "removeSelected: new size %zu elements.", *((_QWORD *)this + 14));
return 1LL;
}
return result;
}
// 158C8: variable 'v4' is possibly undefined
// 158D0: variable 'v6' is possibly undefined
// 159AC: variable 'v13' is possibly undefined
// 159CC: variable 'v15' is possibly undefined
// 4D0B0: using guessed type __int64 qword_4D0B0;
//----- (0000000000015A04) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CompositeConfig::operator=(__int64 a1, _QWORD *a2)
{
_QWORD *v4; // x19
__int64 v5; // x1
__int64 v6; // x1
__int64 v7; // x0
__int64 v8; // x2
__int64 v9; // x0
__int64 v10; // x1
__int64 v11; // x0
__int64 v12; // x1
__int64 v13; // x0
__int64 v14; // x1
if ( (_QWORD *)a1 != a2 )
{
v4 = (_QWORD *)(a1 + 72);
fnv::vnm::ConfigElement::operator=(a1, (__int64)a2);
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::clear((_QWORD *)(a1 + 72));
if ( *(_QWORD *)(a1 + 112) )
{
if ( *(_QWORD *)(a1 + 104) > 0x1FFuLL )
{
operator delete(**(void ***)(a1 + 80));
*(_QWORD *)(a1 + 80) += 8LL;
*(_QWORD *)(a1 + 104) -= 512LL;
}
v8 = *(_QWORD *)(a1 + 88);
v9 = (v8 - *(_QWORD *)(a1 + 80)) >> 3;
if ( v9 )
v9 = (v9 << 9) - 1;
if ( (unsigned __int64)(v9 - (*(_QWORD *)(a1 + 104) + *(_QWORD *)(a1 + 112))) > 0x1FF )
{
operator delete(*(void **)(v8 - 8));
v10 = *(_QWORD *)(a1 + 88) - 8LL;
while ( 1 )
{
v11 = *(_QWORD *)(a1 + 88);
if ( v10 == v11 )
break;
*(_QWORD *)(a1 + 88) = v11 - 8;
}
}
}
else
{
while ( 1 )
{
v5 = *(_QWORD *)(a1 + 88);
if ( !((v5 - *(_QWORD *)(a1 + 80)) >> 3) )
break;
operator delete(*(void **)(v5 - 8));
v6 = *(_QWORD *)(a1 + 88) - 8LL;
while ( 1 )
{
v7 = *(_QWORD *)(a1 + 88);
if ( v6 == v7 )
break;
*(_QWORD *)(a1 + 88) = v7 - 8;
}
}
*(_QWORD *)(a1 + 104) = 0LL;
}
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *>>::shrink_to_fit((__int64 *)(a1 + 72));
v12 = *(_QWORD *)(a1 + 80);
while ( 1 )
{
v13 = *(_QWORD *)(a1 + 88);
if ( v12 == v13 )
break;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *>>::shrink_to_fit((__int64 *)(a1 + 72));
*v4 = a2[9];
*(_QWORD *)(a1 + 80) = a2[10];
*(_QWORD *)(a1 + 88) = a2[11];
*(_QWORD *)(a1 + 96) = a2[12];
a2[9] = 0LL;
a2[10] = 0LL;
v14 = a2[13];
a2[11] = 0LL;
a2[12] = 0LL;
*(_QWORD *)(a1 + 104) = v14;
*(_QWORD *)(a1 + 112) = a2[14];
a2[13] = 0LL;
a2[14] = 0LL;
}
return a1;
}
//----- (0000000000015B80) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::CompositeConfig::describe@<X0>(fnv::vnm::CompositeConfig *this@<X0>, _QWORD *a2@<X8>)
{
__int64 v4; // x0
char *v5; // x1
unsigned __int64 v6; // x0
char *v7; // x1
char *v8; // x0
__int64 v9; // x24
unsigned __int64 v10; // x1
char *v11; // x0
__int64 v12; // x1
char *v13; // x1
__int64 v14; // x2
char v15; // w0
__int64 v16; // x1
__int64 v17; // x2
__int64 v19; // [xsp+48h] [xbp+48h] BYREF
__int64 v20; // [xsp+50h] [xbp+50h]
char *v21; // [xsp+58h] [xbp+58h]
__int64 (__fastcall **v22[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v23)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v24[2]; // [xsp+78h] [xbp+78h] BYREF
char *v25; // [xsp+88h] [xbp+88h]
char *v26; // [xsp+90h] [xbp+90h]
__int64 v27; // [xsp+98h] [xbp+98h]
char *v28; // [xsp+A0h] [xbp+A0h]
unsigned __int64 v29; // [xsp+A8h] [xbp+A8h]
char *v30; // [xsp+B0h] [xbp+B0h]
__int64 v31; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v32; // [xsp+C0h] [xbp+C0h]
char *v33; // [xsp+C8h] [xbp+C8h]
unsigned __int64 v34; // [xsp+D0h] [xbp+D0h]
int v35; // [xsp+D8h] [xbp+D8h]
__int64 v36[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v37; // [xsp+170h] [xbp+170h]
v22[1] = 0LL;
v36[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v36, v24);
v37 = -1;
v36[17] = 0LL;
v22[0] = off_4C1D0;
v23 = off_4C1F8;
v36[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v24);
v21 = 0LL;
v19 = 0LL;
v20 = 0LL;
v31 = 0LL;
v32 = 0LL;
v24[0] = (__int64)off_4BFE0;
v35 = 24;
v33 = 0LL;
v34 = 0LL;
std::string::operator=(&v31);
v34 = 0LL;
if ( (v35 & 8) != 0 )
{
if ( (v31 & 1) != 0 )
{
v4 = v32;
v5 = v33;
}
else
{
v4 = (unsigned __int8)v31 >> 1;
v5 = (char *)&v31 + 1;
}
v6 = (unsigned __int64)&v5[v4];
v7 = (char *)&v31 + 1;
if ( (v31 & 1) != 0 )
v7 = v33;
v27 = v6;
v25 = v7;
v26 = v7;
v34 = v6;
}
if ( (v35 & 0x10) != 0 )
{
if ( (v31 & 1) != 0 )
{
v9 = v32;
v8 = v33;
}
else
{
v9 = (unsigned __int8)v31 >> 1;
v8 = (char *)&v31 + 1;
}
v34 = (unsigned __int64)&v8[v9];
v10 = 22LL;
if ( (v31 & 1) != 0 )
v10 = (v31 & 0xFFFFFFFFFFFFFFFELL) - 1;
std::string::resize(&v31, v10, 0LL);
if ( (v31 & 1) != 0 )
{
v12 = v32;
v11 = v33;
}
else
{
v12 = (unsigned __int8)v31 >> 1;
v11 = (char *)&v31 + 1;
}
v30 = &v11[v12];
v28 = v11;
v29 = (unsigned __int64)v11;
if ( (v35 & 3) != 0 )
v29 = (unsigned __int64)&v11[(int)v9];
}
std::string::~string(&v19);
fnv::vnm::ConfigElement::name(this, (__int64)&v19);
if ( (v19 & 1) != 0 )
{
v14 = v20;
v13 = v21;
}
else
{
v14 = (unsigned __int8)v19 >> 1;
v13 = (char *)&v19 + 1;
}
std::__put_character_sequence<char,std::char_traits<char>>(&v23, (__int64)v13, v14);
std::string::~string(&v19);
v15 = v35;
if ( (v35 & 0x10) != 0 )
{
if ( v34 < v29 )
v34 = v29;
v16 = (__int64)v28;
v17 = v34;
*a2 = 0LL;
a2[1] = 0LL;
a2[2] = 0LL;
goto LABEL_25;
}
*a2 = 0LL;
a2[1] = 0LL;
a2[2] = 0LL;
if ( (v15 & 8) != 0 )
{
v16 = (__int64)v25;
v17 = v27;
LABEL_25:
std::string::__init<char *>((__int64)a2, v16, v17);
}
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v22);
return a2;
}
// 133F0: using guessed type __int64 __fastcall std::string::resize(_QWORD, _QWORD, _QWORD);
// 13500: using guessed type __int64 __fastcall std::string::operator=(_QWORD);
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (0000000000015E40) ----------------------------------------------------
__int64 __fastcall std::stringbuf::seekoff(__int64 a1, __int64 a2, int a3, char a4)
{
unsigned __int64 v4; // x5
__int64 v7; // x2
__int64 v8; // x6
unsigned __int64 v9; // x2
__int64 v10; // x1
__int64 v11; // x2
__int64 v12; // x6
v4 = *(_QWORD *)(a1 + 48);
if ( *(_QWORD *)(a1 + 88) < v4 )
*(_QWORD *)(a1 + 88) = v4;
if ( (a4 & 0x18) == 0 )
return 0LL;
if ( (a4 & 0x18) == 24 && a3 == 1 )
return 0LL;
if ( a3 != 1 )
{
if ( !a3 )
{
v9 = 0LL;
goto LABEL_20;
}
if ( a3 != 2 )
return 0LL;
v8 = a1 + 65;
v7 = *(_QWORD *)(a1 + 88);
if ( (*(_BYTE *)(a1 + 64) & 1) != 0 )
v8 = *(_QWORD *)(a1 + 80);
goto LABEL_18;
}
if ( (a4 & 8) != 0 )
{
v8 = *(_QWORD *)(a1 + 16);
v7 = *(_QWORD *)(a1 + 24);
LABEL_18:
v9 = v7 - v8;
goto LABEL_20;
}
v9 = v4 - *(_QWORD *)(a1 + 40);
LABEL_20:
v10 = v9 + a2;
if ( v10 < 0 )
return 0LL;
v11 = a1 + 65;
v12 = *(_QWORD *)(a1 + 88);
if ( (*(_BYTE *)(a1 + 64) & 1) != 0 )
v11 = *(_QWORD *)(a1 + 80);
if ( v10 > v12 - v11 )
return 0LL;
if ( v10 )
{
if ( (a4 & 8) != 0 && !*(_QWORD *)(a1 + 24) )
return 0LL;
if ( (a4 & 0x10) != 0 && v4 == 0 )
return 0LL;
}
if ( (a4 & 8) != 0 )
{
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 16) + v10;
*(_QWORD *)(a1 + 32) = v12;
}
if ( (a4 & 0x10) != 0 )
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 40) + (int)v10;
return 0LL;
}
//----- (0000000000015F44) ----------------------------------------------------
__int64 __fastcall sub_15F44(__int64 a1, __int64 a2, __int64 a3)
{
return (*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 32LL))(a1, a3, 0LL);
}
//----- (0000000000015F68) ----------------------------------------------------
__int64 __fastcall std::stringbuf::underflow(__int64 a1)
{
unsigned __int64 v1; // x1
unsigned __int64 v3; // x1
unsigned __int8 *v4; // x1
v1 = *(_QWORD *)(a1 + 48);
if ( *(_QWORD *)(a1 + 88) < v1 )
*(_QWORD *)(a1 + 88) = v1;
if ( (*(_DWORD *)(a1 + 96) & 8) == 0 )
return 0xFFFFFFFFLL;
v3 = *(_QWORD *)(a1 + 88);
if ( v3 > *(_QWORD *)(a1 + 32) )
*(_QWORD *)(a1 + 32) = v3;
v4 = *(unsigned __int8 **)(a1 + 24);
if ( (unsigned __int64)v4 < *(_QWORD *)(a1 + 32) )
return *v4;
else
return 0xFFFFFFFFLL;
}
//----- (0000000000015FB4) ----------------------------------------------------
__int64 __fastcall std::stringbuf::pbackfail(__int64 a1, unsigned int a2)
{
unsigned __int64 v2; // x2
unsigned __int64 v3; // x2
unsigned int v4; // w3
__int64 v5; // x1
__int64 v6; // x3
v2 = *(_QWORD *)(a1 + 48);
if ( *(_QWORD *)(a1 + 88) < v2 )
*(_QWORD *)(a1 + 88) = v2;
v3 = *(_QWORD *)(a1 + 24);
v4 = -1;
if ( *(_QWORD *)(a1 + 16) < v3 )
{
if ( a2 == -1 )
{
v5 = *(_QWORD *)(a1 + 88);
v4 = 0;
*(_QWORD *)(a1 + 24) = v3 - 1;
*(_QWORD *)(a1 + 32) = v5;
}
else if ( (*(_DWORD *)(a1 + 96) & 0x10) != 0 || *(unsigned __int8 *)(v3 - 1) == (unsigned __int8)a2 )
{
v6 = *(_QWORD *)(a1 + 88);
*(_QWORD *)(a1 + 24) = v3 - 1;
*(_QWORD *)(a1 + 32) = v6;
*(_BYTE *)(v3 - 1) = a2;
return a2;
}
else
{
return (unsigned int)-1;
}
}
return v4;
}
//----- (000000000001602C) ----------------------------------------------------
__int64 __fastcall std::stringbuf::~stringbuf(_QWORD *a1)
{
*a1 = off_4BFE0;
std::string::~string(a1 + 8);
return std::streambuf::~streambuf(a1);
}
// 136D0: using guessed type __int64 __fastcall std::streambuf::~streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *[2])();
//----- (0000000000016060) ----------------------------------------------------
void __fastcall std::stringbuf::~stringbuf(_QWORD *a1)
{
std::stringbuf::~stringbuf(a1);
operator delete(a1);
}
//----- (0000000000016084) ----------------------------------------------------
__int64 __fastcall std::stringbuf::overflow(__int64 a1, int a2)
{
unsigned __int8 v3; // w20
__int64 v4; // x22
__int64 v5; // x24
__int64 v6; // x21
__int64 v7; // x0
int v8; // w21
__int64 v9; // x23
unsigned __int64 v10; // x1
__int64 v11; // x0
__int64 v12; // x1
unsigned __int8 *v13; // x2
unsigned __int64 v14; // x0
int v15; // w1
__int64 v16; // x1
if ( a2 == -1 )
return 0LL;
v3 = a2;
v5 = *(_QWORD *)(a1 + 16);
v4 = *(_QWORD *)(a1 + 24);
v6 = *(_QWORD *)(a1 + 48);
if ( v6 == *(_QWORD *)(a1 + 56) )
{
if ( (*(_DWORD *)(a1 + 96) & 0x10) == 0 )
return 0xFFFFFFFFLL;
v7 = *(_QWORD *)(a1 + 40);
v8 = v6 - v7;
v9 = *(_QWORD *)(a1 + 88) - v7;
std::string::push_back(a1 + 64, 0LL);
v10 = 22LL;
if ( (*(_BYTE *)(a1 + 64) & 1) != 0 )
v10 = (*(_QWORD *)(a1 + 64) & 0xFFFFFFFFFFFFFFFELL) - 1;
std::string::resize(a1 + 64, v10, 0LL);
if ( (*(_BYTE *)(a1 + 64) & 1) != 0 )
{
v11 = *(_QWORD *)(a1 + 72);
v12 = *(_QWORD *)(a1 + 80);
}
else
{
v12 = a1 + 65;
v11 = *(_BYTE *)(a1 + 64) >> 1;
}
*(_QWORD *)(a1 + 56) = v12 + v11;
*(_QWORD *)(a1 + 40) = v12;
*(_QWORD *)(a1 + 48) = v12 + v8;
*(_QWORD *)(a1 + 88) = v12 + v9;
}
v13 = *(unsigned __int8 **)(a1 + 48);
v14 = *(_QWORD *)(a1 + 88);
v15 = *(_DWORD *)(a1 + 96);
if ( v14 < (unsigned __int64)(v13 + 1) )
v14 = (unsigned __int64)(v13 + 1);
*(_QWORD *)(a1 + 88) = v14;
if ( (v15 & 8) != 0 )
{
v16 = a1 + 65;
if ( (*(_BYTE *)(a1 + 64) & 1) != 0 )
v16 = *(_QWORD *)(a1 + 80);
*(_QWORD *)(a1 + 32) = v14;
*(_QWORD *)(a1 + 16) = v16;
*(_QWORD *)(a1 + 24) = v16 + v4 - v5;
}
if ( v13 == *(unsigned __int8 **)(a1 + 56) )
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 104LL))(a1, v3);
*(_QWORD *)(a1 + 48) = v13 + 1;
*v13 = v3;
return v3;
}
// 133F0: using guessed type __int64 __fastcall std::string::resize(_QWORD, _QWORD, _QWORD);
// 13950: using guessed type __int64 __fastcall std::string::push_back(_QWORD, _QWORD);
//----- (00000000000161EC) ----------------------------------------------------
__int64 __fastcall std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(_QWORD *a1)
{
return a1[1] + 8LL * ((a1[5] + a1[4]) >> 9);
}
//----- (0000000000016228) ----------------------------------------------------
__int64 __fastcall std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(__int64 a1)
{
return *(_QWORD *)(a1 + 8) + 8LL * (*(_QWORD *)(a1 + 32) >> 9);
}
//----- (0000000000016260) ----------------------------------------------------
__int64 __fastcall std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(__int64 a1)
{
return *(_QWORD *)(a1 + 8) + 8LL * (*(_QWORD *)(a1 + 32) >> 9);
}
//----- (0000000000016298) ----------------------------------------------------
__int64 __fastcall std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(_QWORD *a1)
{
return a1[1] + 8LL * ((a1[5] + a1[4]) >> 9);
}
//----- (00000000000162D4) ----------------------------------------------------
unsigned __int64 __fastcall std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::clear(_QWORD *a1)
{
_QWORD *v2; // x21
__int64 *v3; // x1
__int64 *v4; // x20
__int64 *v5; // x1
__int64 *v6; // x22
__int64 v7; // x0
void **v8; // x1
unsigned __int64 result; // x0
v2 = (_QWORD *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin((__int64)a1);
v4 = v3;
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end(a1);
v6 = v5;
while ( v4 != v6 )
{
v7 = *v4;
*v4 = 0LL;
if ( v7 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 8LL))(v7);
if ( (unsigned __int64)++v4 - *v2 - 4096 <= 7 )
{
v4 = (__int64 *)v2[1];
++v2;
}
}
a1[5] = 0LL;
while ( 1 )
{
v8 = (void **)a1[1];
result = (__int64)(a1[2] - (_QWORD)v8) >> 3;
if ( result <= 2 )
break;
operator delete(*v8);
a1[1] += 8LL;
}
if ( result == 1 )
{
result = 256LL;
}
else
{
if ( result != 2 )
return result;
result = 512LL;
}
a1[4] = result;
return result;
}
// 162F4: variable 'v3' is possibly undefined
// 162FC: variable 'v5' is possibly undefined
//----- (00000000000163A4) ----------------------------------------------------
__int64 __fastcall sub_163A4(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, unsigned __int8 a6)
{
__int64 v8; // x19
__int64 v9; // x2
__int64 v10; // x23
__int64 v11; // x22
unsigned int v13; // w26
char *v14; // x1
__int64 v15; // x21
__int64 v17[2]; // [xsp+50h] [xbp+50h] BYREF
char *v18; // [xsp+60h] [xbp+60h]
if ( a1 )
{
v9 = *(_QWORD *)(a5 + 24);
v10 = a3 - a2;
v8 = a1;
v11 = v9 - (a4 - a2);
if ( a4 - a2 >= v9 )
v11 = 0LL;
v13 = a6;
if ( v10 <= 0 || v10 == (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 96LL))(a1) )
{
if ( v11 )
{
v17[0] = 0LL;
v17[1] = 0LL;
v18 = 0LL;
std::string::__init(v17, v11, v13);
v14 = v18;
if ( (v17[0] & 1) == 0 )
v14 = (char *)v17 + 1;
if ( v11 != (*(__int64 (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)v8 + 96LL))(v8, v14, v11) )
{
v8 = 0LL;
std::string::~string(v17);
return v8;
}
std::string::~string(v17);
}
v15 = a4 - a3;
if ( v15 <= 0 || v15 == (*(__int64 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v8 + 96LL))(v8, a3, v15) )
{
*(_QWORD *)(a5 + 24) = 0LL;
return v8;
}
}
}
return 0LL;
}
// 134F0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (0000000000016508) ----------------------------------------------------
_QWORD *__fastcall std::__put_character_sequence<char,std::char_traits<char>>(_QWORD *a1, __int64 a2, __int64 a3)
{
__int64 v6; // x22
__int64 v7; // x19
__int64 v8; // x26
__int64 v9; // x27
__int64 v10; // x0
int v11; // w28
__int64 v13; // [xsp+60h] [xbp+60h] BYREF
char v14[16]; // [xsp+68h] [xbp+68h] BYREF
std::ostream::sentry::sentry(v14, a1);
if ( v14[0] )
{
v6 = a2 + a3;
v7 = (__int64)a1 + *(_QWORD *)(*a1 - 24LL);
v8 = *(_QWORD *)(v7 + 40);
if ( (*(_DWORD *)(v7 + 8) & 0xB0) == 32 )
v9 = v6;
else
v9 = a2;
if ( *(_DWORD *)(v7 + 144) == -1 )
{
std::ios_base::getloc((std::ios_base *)((char *)a1 + *(_QWORD *)(*a1 - 24LL)));
v10 = std::locale::use_facet(&v13, &std::ctype<char>::id);
v11 = (*(unsigned __int8 (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 56LL))(v10, 32LL);
std::locale::~locale((std::locale *)&v13);
*(_DWORD *)(v7 + 144) = v11;
}
if ( !sub_163A4(v8, a2, v9, v6, v7, *(_BYTE *)(v7 + 144)) )
std::ios_base::clear(
(std::ios_base *)((char *)a1 + *(_QWORD *)(*a1 - 24LL)),
*(_DWORD *)((char *)a1 + *(_QWORD *)(*a1 - 24LL) + 32) | 5);
}
std::ostream::sentry::~sentry(v14);
return a1;
}
// 133D0: using guessed type __int64 __fastcall std::ostream::sentry::sentry(_QWORD, _QWORD);
// 135F0: using guessed type __int64 __fastcall std::ostream::sentry::~sentry(_QWORD);
// 136F0: using guessed type __int64 __fastcall std::locale::use_facet(_QWORD, _QWORD);
//----- (00000000000166A4) ----------------------------------------------------
__int64 __fastcall std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::__split_buffer(
_QWORD *a1,
__int64 a2,
__int64 a3,
__int64 a4)
{
__int64 v5; // x20
__int64 result; // x0
__int64 v8; // x2
a1[3] = 0LL;
a1[4] = a4;
v5 = 8 * a2;
result = 0LL;
if ( a2 )
result = operator new(8 * a2);
v8 = result + 8 * a3;
*a1 = result;
a1[1] = v8;
a1[2] = v8;
a1[3] = result + v5;
return result;
}
//----- (00000000000166F4) ----------------------------------------------------
void __fastcall std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::~__split_buffer(
__int64 a1)
{
__int64 v1; // x2
__int64 v2; // x1
void *v3; // x0
v1 = *(_QWORD *)(a1 + 8);
while ( 1 )
{
v2 = *(_QWORD *)(a1 + 16);
if ( v2 == v1 )
break;
*(_QWORD *)(a1 + 16) = v2 - 8;
}
v3 = *(void **)a1;
if ( v3 )
operator delete(v3);
}
//----- (0000000000016720) ----------------------------------------------------
__int64 __fastcall std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *>>::push_front(
__int64 *a1,
_QWORD *a2)
{
const void *v4; // x1
unsigned __int64 v5; // x0
unsigned __int64 v6; // x2
__int64 v7; // x19
char *v8; // x3
signed __int64 v9; // x2
__int64 v10; // x19
__int64 v11; // x1
__int64 v12; // x0
__int64 v13; // x1
_QWORD *v14; // x0
__int64 v15; // x1
__int64 v16; // x0
__int64 v18; // [xsp+30h] [xbp+30h] BYREF
__int64 v19; // [xsp+38h] [xbp+38h]
_QWORD *v20; // [xsp+40h] [xbp+40h] BYREF
__int64 v21; // [xsp+48h] [xbp+48h]
__int64 v22; // [xsp+58h] [xbp+58h]
v4 = (const void *)a1[1];
if ( v4 == (const void *)*a1 )
{
v6 = a1[2];
v5 = a1[3];
if ( v6 >= v5 )
{
v11 = 2 * ((__int64)(v5 - (_QWORD)v4) >> 3);
if ( !v11 )
v11 = 1LL;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::__split_buffer(
&v18,
v11,
(unsigned __int64)(v11 + 3) >> 2,
(__int64)(a1 + 3));
sub_14BC0(&v20, (_QWORD *)a1[1], (_QWORD *)a1[2]);
v12 = *a1;
*a1 = v18;
v18 = v12;
v13 = v19;
v19 = a1[1];
a1[1] = v13;
v14 = (_QWORD *)a1[2];
a1[2] = (__int64)v20;
v20 = v14;
v15 = v21;
v21 = a1[3];
a1[3] = v15;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::~__split_buffer((__int64)&v18);
}
else
{
v7 = 8 * ((((__int64)(v5 - v6) >> 3) + 1) / 2);
v8 = (char *)(v6 + v7);
v9 = v6 - (_QWORD)v4;
if ( v9 >> 3 )
v8 = (char *)memmove(&v8[-v9], v4, v9);
v10 = a1[2] + v7;
a1[1] = (__int64)v8;
a1[2] = v10;
}
}
v16 = a1[1];
if ( v16 != 8 )
*(_QWORD *)(v16 - 8) = *a2;
a1[1] -= 8LL;
return v22 ^ _stack_chk_guard;
}
//----- (0000000000016874) ----------------------------------------------------
__int64 __fastcall std::deque<std::unique_ptr<fnv::vnm::ConfigElement>>::__add_front_capacity(__int64 *a1)
{
__int64 v1; // x2
__int64 v3; // x0
__int64 v4; // x1
unsigned __int64 v5; // x3
__int64 v6; // x4
__int64 v7; // x0
__int64 v8; // x1
unsigned __int64 v9; // x1
__int64 v10; // x22
__int64 v11; // x20
__int64 v12; // x0
char *v13; // x1
signed __int64 v14; // x20
__int64 v15; // x23
char *v16; // x3
unsigned __int64 v17; // x1
__int64 v18; // x0
char *v19; // x1
char *v20; // x0
char *v21; // x1
_QWORD *v22; // x0
__int64 *v23; // x1
__int64 *v24; // x0
__int64 v25; // x1
__int64 v26; // x1
__int64 v27; // x22
size_t v28; // x20
__int64 v29; // x24
char *v30; // x3
unsigned __int64 v31; // x1
__int64 v32; // x0
char *v33; // x1
char *v34; // x0
char *v35; // x1
char *v36; // x22
char *v37; // x2
size_t v38; // x20
__int64 v39; // x27
char *v40; // x3
unsigned __int64 v41; // x1
__int64 v42; // x0
char *v43; // x1
char *v44; // x0
char *v45; // x1
unsigned __int64 v46; // x1
char *v47; // x0
char *v48; // x1
char *v49; // x0
char *v50; // x3
__int64 v51; // x0
__int64 v52; // x1
unsigned __int64 v54; // [xsp+60h] [xbp+60h] BYREF
char *v55; // [xsp+68h] [xbp+68h]
char *v56; // [xsp+70h] [xbp+70h]
char *v57; // [xsp+78h] [xbp+78h]
__int64 v58; // [xsp+80h] [xbp+80h]
unsigned __int64 v59; // [xsp+88h] [xbp+88h] BYREF
char *v60; // [xsp+90h] [xbp+90h]
char *v61; // [xsp+98h] [xbp+98h] BYREF
char *v62; // [xsp+A0h] [xbp+A0h]
unsigned __int64 v63; // [xsp+B0h] [xbp+B0h] BYREF
char *v64; // [xsp+B8h] [xbp+B8h]
char *v65; // [xsp+C0h] [xbp+C0h] BYREF
char *v66; // [xsp+C8h] [xbp+C8h]
__int64 v67; // [xsp+D8h] [xbp+D8h]
v1 = 0LL;
v3 = a1[1];
v4 = a1[2];
v5 = (v4 - v3) >> 3;
if ( v5 )
v1 = (v5 << 9) - 1;
v6 = a1[4];
if ( (unsigned __int64)(v1 - (v6 + a1[5])) <= 0x1FF )
{
v9 = (a1[3] - *a1) >> 3;
if ( v5 >= v9 )
{
v26 = 2 * v9;
if ( !v26 )
v26 = 1LL;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::__split_buffer(
&v54,
v26,
0LL,
(__int64)(a1 + 3));
v27 = operator new(0x1000uLL);
if ( v56 == v57 )
{
if ( (unsigned __int64)v55 <= v54 )
{
v31 = 2 * ((__int64)&v56[-v54] >> 3);
if ( !v31 )
v31 = 1LL;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::__split_buffer(
&v63,
v31,
v31 >> 2,
v58);
sub_14BC0((_QWORD **)&v65, v55, v56);
v32 = v54;
v54 = v63;
v63 = v32;
v33 = v64;
v64 = v55;
v55 = v33;
v34 = v56;
v56 = v65;
v65 = v34;
v35 = v66;
v66 = v57;
v57 = v35;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::~__split_buffer((__int64)&v63);
}
else
{
v28 = v56 - v55;
v29 = -8 * ((((__int64)&v55[-v54] >> 3) + 1) / 2);
v30 = &v55[-8 * ((((__int64)&v55[-v54] >> 3) + 1) / 2)];
if ( (v56 - v55) >> 3 )
v30 = (char *)memmove(&v55[-8 * ((((__int64)&v55[-v54] >> 3) + 1) / 2)], v55, v28);
v55 += v29;
v56 = &v30[v28];
}
}
if ( v56 )
*(_QWORD *)v56 = v27;
v36 = (char *)a1[1];
for ( v56 += 8; ; v56 += 8 )
{
v37 = v57;
if ( v36 == (char *)a1[2] )
break;
if ( v56 == v57 )
{
if ( (unsigned __int64)v55 <= v54 )
{
v41 = 2 * ((__int64)&v56[-v54] >> 3);
if ( !v41 )
v41 = 1LL;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::__split_buffer(
&v59,
v41,
v41 >> 2,
v58);
sub_14BC0((_QWORD **)&v61, v55, v56);
v42 = v54;
v54 = v59;
v59 = v42;
v43 = v60;
v60 = v55;
v55 = v43;
v44 = v56;
v56 = v61;
v61 = v44;
v45 = v62;
v62 = v57;
v57 = v45;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::~__split_buffer((__int64)&v59);
}
else
{
v38 = v56 - v55;
v39 = -8 * ((((__int64)&v55[-v54] >> 3) + 1) / 2);
v40 = &v55[-8 * ((((__int64)&v55[-v54] >> 3) + 1) / 2)];
if ( (v56 - v55) >> 3 )
v40 = (char *)memmove(&v55[-8 * ((((__int64)&v55[-v54] >> 3) + 1) / 2)], v55, v38);
v55 += v39;
v56 = &v40[v38];
}
}
if ( v56 )
*(_QWORD *)v56 = *(_QWORD *)v36;
v36 += 8;
}
v46 = v54;
v54 = *a1;
v47 = (char *)a1[1];
*a1 = v46;
v48 = v55;
v55 = v47;
v49 = v56;
a1[2] = (__int64)v56;
v50 = (char *)a1[3];
v51 = (v49 - v48) >> 3;
a1[1] = (__int64)v48;
a1[3] = (__int64)v37;
v57 = v50;
v52 = 256LL;
v56 = v36;
if ( v51 != 1 )
v52 = a1[4] + 512;
a1[4] = v52;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::~__split_buffer((__int64)&v54);
}
else
{
if ( (v3 - *a1) >> 3 )
{
v63 = operator new(0x1000uLL);
}
else
{
v10 = operator new(0x1000uLL);
v11 = a1[2];
if ( v11 == a1[3] )
{
v12 = *a1;
v13 = (char *)a1[1];
if ( (unsigned __int64)v13 <= *a1 )
{
v17 = 2 * ((v11 - v12) >> 3);
if ( !v17 )
v17 = 1LL;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::__split_buffer(
&v63,
v17,
v17 >> 2,
(__int64)(a1 + 3));
sub_14BC0((_QWORD **)&v65, (_QWORD *)a1[1], (_QWORD *)a1[2]);
v18 = *a1;
*a1 = v63;
v63 = v18;
v19 = v64;
v64 = (char *)a1[1];
a1[1] = (__int64)v19;
v20 = (char *)a1[2];
a1[2] = (__int64)v65;
v65 = v20;
v21 = v66;
v66 = (char *)a1[3];
a1[3] = (__int64)v21;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::~__split_buffer((__int64)&v63);
}
else
{
v14 = v11 - (_QWORD)v13;
v15 = -8 * ((((__int64)&v13[-v12] >> 3) + 1) / 2);
v16 = &v13[-8 * ((((__int64)&v13[-v12] >> 3) + 1) / 2)];
if ( v14 >> 3 )
v16 = (char *)memmove(&v13[-8 * ((((__int64)&v13[-v12] >> 3) + 1) / 2)], v13, v14);
a1[1] += v15;
a1[2] = (__int64)&v16[v14];
}
}
v22 = (_QWORD *)a1[2];
if ( v22 )
*v22 = v10;
v23 = (__int64 *)a1[2];
a1[2] = (__int64)(v23 + 1);
v63 = *v23;
while ( 1 )
{
v24 = (__int64 *)a1[2];
if ( v24 == v23 )
break;
a1[2] = (__int64)(v24 - 1);
}
}
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *>>::push_front(
a1,
&v63);
v25 = 256LL;
if ( (a1[2] - a1[1]) >> 3 != 1 )
v25 = a1[4] + 512;
a1[4] = v25;
}
}
else
{
v7 = v4 - 8;
v63 = *(_QWORD *)(v4 - 8);
a1[4] = v6 + 512;
while ( 1 )
{
v8 = a1[2];
if ( v7 == v8 )
break;
a1[2] = v8 - 8;
}
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *>>::push_front(
a1,
&v63);
}
return v67 ^ _stack_chk_guard;
}
//----- (0000000000016DA0) ----------------------------------------------------
_QWORD *__fastcall std::move_backward<std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement> **,long,512l>(
_QWORD *a1,
_QWORD *a2,
_QWORD *a3,
__int64 a4)
{
__int64 v8; // x19
_QWORD *v9; // x0
__int64 v10; // x19
__int64 v11; // x19
_QWORD *v12; // x19
_QWORD *v13; // x26
__int64 v14; // x0
__int64 v15; // x23
__int64 v16; // x1
__int64 v17; // t1
__int64 v18; // x0
__int64 v19; // t1
__int64 v20; // x3
__int64 v21; // x3
while ( a2 != a1 )
{
v8 = ((a4 - *a3) >> 3) - 1;
if ( v8 <= 0 )
{
v11 = 512 - ((a4 - *a3) >> 3);
v9 = &a3[-(v11 >> 9)];
v10 = *v9 + 8 * (511 - (v11 & 0x1FF));
}
else
{
v9 = &a3[v8 >> 9];
v10 = *v9 + 8 * (v8 & 0x1FF);
}
v12 = (_QWORD *)(v10 + 8);
v13 = a1;
v14 = (__int64)v12 - *v9;
v15 = a2 - a1;
if ( v14 >> 3 < v15 )
{
v13 = (_QWORD *)((char *)a2 - v14);
v15 = v14 >> 3;
}
while ( v13 != a2 )
{
v17 = *--a2;
v16 = v17;
*a2 = 0LL;
v19 = *--v12;
v18 = v19;
*v12 = v16;
if ( v19 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v18 + 8LL))(v18);
}
if ( v15 )
{
v20 = ((a4 - *a3) >> 3) - v15;
if ( v20 <= 0 )
{
v21 = 511 - v20;
a3 -= v21 >> 9;
a4 = *a3 + 8 * (511 - (v21 & 0x1FF));
}
else
{
a3 += v20 >> 9;
a4 = *a3 + 8 * (v20 & 0x1FF);
}
}
a2 = v13;
}
return a3;
}
//----- (0000000000016EF8) ----------------------------------------------------
_QWORD *__fastcall std::move_backward<std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l>(
char *a1,
_QWORD *a2,
_QWORD *a3,
_QWORD *a4,
_QWORD *a5,
__int64 a6)
{
bool v8; // zf
_QWORD *result; // x0
__int64 v10; // x1
_QWORD *v11; // x5
_QWORD *v12; // x20
__int64 v13; // x21
__int64 v14; // x5
_QWORD *v15; // x6
__int64 v16; // x19
__int64 v17; // x22
__int64 v18; // x22
__int64 v19; // x19
__int64 v20; // x19
v8 = a4 == a2;
result = a5;
v10 = a6;
if ( !v8 )
{
v11 = a4;
v12 = a3;
v13 = (((char *)a3 - a1) << 6) + (((__int64)a4 - *a3) >> 3) - (((__int64)a2 - *(_QWORD *)a1) >> 3);
while ( v13 > 0 )
{
if ( (_QWORD *)*v12 == v11 )
{
v14 = *--v12;
v11 = (_QWORD *)(v14 + 4096);
}
v15 = (_QWORD *)*v12;
v16 = (__int64)(v11 - 1);
v17 = ((__int64)v11 - *v12) >> 3;
if ( v13 < v17 )
{
v15 = &v11[-v13];
v17 = v13;
}
v13 -= v17;
result = std::move_backward<std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement> **,long,512l>(
v15,
v11,
result,
v10);
v18 = v17 - 1;
if ( v18 )
{
v19 = ((v16 - *v12) >> 3) - v18;
if ( v19 <= 0 )
{
v20 = 511 - v19;
v12 -= v20 >> 9;
v16 = *v12 + 8 * (511 - (v20 & 0x1FF));
}
else
{
v12 += v19 >> 9;
v16 = *v12 + 8 * (v19 & 0x1FF);
}
}
v11 = (_QWORD *)v16;
}
}
return result;
}
// 16FA8: variable 'v10' is possibly undefined
//----- (0000000000017024) ----------------------------------------------------
_QWORD *__fastcall std::move<std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement> **,long,512l>(
__int64 a1,
__int64 a2,
_QWORD *a3,
__int64 a4)
{
__int64 v8; // x23
__int64 v9; // x24
__int64 v10; // x0
__int64 i; // x21
__int64 v12; // x1
__int64 v13; // x0
__int64 v14; // x19
__int64 v15; // x19
while ( a1 != a2 )
{
v8 = (a2 - a1) >> 3;
v9 = a2;
v10 = *a3 + 4096LL - a4;
if ( v10 >> 3 < v8 )
{
v9 = a1 + v10;
v8 = v10 >> 3;
}
for ( i = 0LL; v9 != a1 + i; i += 8LL )
{
v12 = *(_QWORD *)(a1 + i);
*(_QWORD *)(a1 + i) = 0LL;
v13 = *(_QWORD *)(a4 + i);
*(_QWORD *)(a4 + i) = v12;
if ( v13 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v13 + 8LL))(v13);
}
if ( v8 )
{
v14 = v8 + ((a4 - *a3) >> 3);
if ( v14 <= 0 )
{
v15 = 511 - v14;
a3 -= v15 >> 9;
a4 = *a3 + 8 * (511 - (v15 & 0x1FF));
}
else
{
a3 += v14 >> 9;
a4 = *a3 + 8 * (v14 & 0x1FF);
}
}
a1 = v9;
}
return a3;
}
//----- (0000000000017134) ----------------------------------------------------
_QWORD *__fastcall std::move<std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l>(
_QWORD *a1,
__int64 a2,
char *a3,
__int64 a4,
_QWORD *a5,
__int64 a6)
{
bool v8; // zf
_QWORD *v9; // x2
_QWORD *v11; // x20
__int64 v12; // x19
__int64 v13; // x21
__int64 v14; // x1
__int64 v15; // x22
__int64 v16; // x1
__int64 v17; // x19
__int64 v18; // x19
v8 = a4 == a2;
v9 = a5;
if ( v8 )
return a5;
v11 = a1;
v12 = a2;
v13 = ((a3 - (char *)a1) << 6) + ((a4 - *(_QWORD *)a3) >> 3) - ((a2 - *a1) >> 3);
while ( v13 > 0 )
{
v14 = *v11 + 4096LL;
v15 = (v14 - v12) >> 3;
if ( v13 < v15 )
{
v14 = v12 + 8 * v13;
v15 = v13;
}
v13 -= v15;
v9 = std::move<std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement> *,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement> **,long,512l>(
v12,
v14,
v9,
a6);
a6 = v16;
if ( v15 )
{
v17 = v15 + ((v12 - *v11) >> 3);
if ( v17 <= 0 )
{
v18 = 511 - v17;
v11 -= v18 >> 9;
v12 = *v11 + 8 * (511 - (v18 & 0x1FF));
}
else
{
v11 += v17 >> 9;
v12 = *v11 + 8 * (v17 & 0x1FF);
}
}
}
return v9;
}
// 171C8: variable 'v16' is possibly undefined
//----- (0000000000017244) ----------------------------------------------------
_QWORD *__fastcall std::deque<std::unique_ptr<fnv::vnm::ConfigElement>>::erase(__int64 a1, char *a2, _QWORD *a3)
{
char *v6; // x0
_QWORD *v7; // x1
_QWORD *v8; // x23
char *v9; // x21
__int64 v10; // x1
unsigned __int64 v11; // x19
_QWORD *v12; // x22
__int64 v13; // x1
__int64 v14; // x1
__int64 v15; // x1
__int64 v16; // x1
char *v17; // x4
__int64 v18; // x5
__int64 v19; // x1
__int64 v20; // x0
unsigned __int64 v21; // x0
__int64 v22; // x0
char *v23; // x24
__int64 v24; // x23
__int64 v25; // x0
char *v26; // x0
__int64 v27; // x1
__int64 *v28; // x1
__int64 v29; // x0
__int64 v30; // x3
__int64 v31; // x1
__int64 v32; // x0
__int64 v33; // x1
__int64 v34; // x0
_QWORD *result; // x0
__int64 v36; // x1
__int64 v37; // x19
v6 = (char *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(a1);
v8 = v7;
v9 = v6;
if ( a3 == v7 )
{
v12 = v7;
v11 = 0LL;
}
else
{
v10 = ((__int64)v7 - *(_QWORD *)v6) >> 3;
v11 = ((a2 - v6) << 6) + (((__int64)a3 - *(_QWORD *)a2) >> 3) - v10;
v12 = v8;
if ( v11 )
{
v13 = v10 + v11;
if ( v13 <= 0 )
{
v14 = 511 - v13;
v9 = &v6[-8 * (v14 >> 9)];
v12 = (_QWORD *)(*(_QWORD *)v9 + 8 * (511 - (v14 & 0x1FF)));
}
else
{
v9 = &v6[8 * (v13 >> 9)];
v12 = (_QWORD *)(*(_QWORD *)v9 + 8 * (v13 & 0x1FF));
}
}
}
v15 = *(_QWORD *)v9;
if ( v11 > (unsigned __int64)(*(_QWORD *)(a1 + 40) - 1LL) >> 1 )
{
v22 = (((__int64)v12 - v15) >> 3) + 1;
if ( v22 <= 0 )
{
v25 = 510 - (((__int64)v12 - v15) >> 3);
v23 = &v9[-8 * (v25 >> 9)];
v24 = *(_QWORD *)v23 + 8 * (511 - (v25 & 0x1FF));
}
else
{
v23 = &v9[8 * (v22 >> 9)];
v24 = *(_QWORD *)v23 + 8 * (v22 & 0x1FF);
}
v26 = (char *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end((_QWORD *)a1);
std::move<std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l>(
v23,
v24,
v26,
v27,
v9,
(__int64)v12);
v29 = *v28;
*v28 = 0LL;
if ( v29 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v29 + 8LL))(v29);
v30 = *(_QWORD *)(a1 + 16);
v31 = *(_QWORD *)(a1 + 40) - 1LL;
v32 = (v30 - *(_QWORD *)(a1 + 8)) >> 3;
*(_QWORD *)(a1 + 40) = v31;
if ( v32 )
v32 = (v32 << 9) - 1;
if ( (unsigned __int64)(v32 - (v31 + *(_QWORD *)(a1 + 32))) > 0x3FF )
{
operator delete(*(void **)(v30 - 8));
v33 = *(_QWORD *)(a1 + 16) - 8LL;
while ( 1 )
{
v34 = *(_QWORD *)(a1 + 16);
if ( v33 == v34 )
break;
*(_QWORD *)(a1 + 16) = v34 - 8;
}
}
}
else
{
v16 = (((__int64)v12 - v15) >> 3) + 1;
if ( v16 <= 0 )
{
v19 = 511 - v16;
v17 = &v9[-8 * (v19 >> 9)];
v18 = *(_QWORD *)v17 + 8 * (511 - (v19 & 0x1FF));
}
else
{
v17 = &v9[8 * (v16 >> 9)];
v18 = *(_QWORD *)v17 + 8 * (v16 & 0x1FF);
}
std::move_backward<std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l>(
v6,
v8,
v9,
v12,
v17,
v18);
v20 = *v8;
*v8 = 0LL;
if ( v20 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v20 + 8LL))(v20);
--*(_QWORD *)(a1 + 40);
v21 = *(_QWORD *)(a1 + 32) + 1LL;
*(_QWORD *)(a1 + 32) = v21;
if ( v21 > 0x3FF )
{
operator delete(**(void ***)(a1 + 8));
*(_QWORD *)(a1 + 8) += 8LL;
*(_QWORD *)(a1 + 32) -= 512LL;
}
}
result = (_QWORD *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(a1);
if ( v11 )
{
v37 = v11 + ((v36 - *result) >> 3);
if ( v37 <= 0 )
result -= (511 - v37) >> 9;
else
result += v37 >> 9;
}
return result;
}
// 1726C: variable 'v7' is possibly undefined
// 1743C: variable 'v27' is possibly undefined
// 17440: variable 'v28' is possibly undefined
// 174C8: variable 'v36' is possibly undefined
//----- (0000000000017524) ----------------------------------------------------
_QWORD *__fastcall std::deque<std::unique_ptr<fnv::vnm::ConfigElement>>::erase(
__int64 a1,
char *a2,
__int64 *a3,
char *a4,
__int64 *a5)
{
__int64 *v8; // x23
__int64 v9; // x22
char *v10; // x0
__int64 *v11; // x1
char *v12; // x25
__int64 *v13; // x24
unsigned __int64 v14; // x20
__int64 v15; // x3
char *v16; // x21
__int64 v17; // x3
__int64 v18; // x2
char *v19; // x4
__int64 v20; // x5
__int64 v21; // x2
__int64 *v22; // x1
__int64 *v23; // x21
__int64 v24; // x0
__int64 v25; // x0
char *v26; // x25
__int64 v27; // x24
__int64 v28; // x0
char *v29; // x0
__int64 v30; // x1
_QWORD *v31; // x23
__int64 *v32; // x1
__int64 *v33; // x21
__int64 *v34; // x1
__int64 *v35; // x24
__int64 v36; // x0
__int64 v37; // x2
__int64 v38; // x0
__int64 v39; // x1
__int64 v40; // x0
_QWORD *v41; // x0
__int64 v42; // x1
_QWORD *v43; // x3
__int64 v44; // x20
v8 = a3;
v9 = 0LL;
if ( a5 != a3 )
v9 = ((a4 - a2) << 6) + (((__int64)a5 - *(_QWORD *)a4) >> 3) - (((__int64)a3 - *(_QWORD *)a2) >> 3);
v10 = (char *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(a1);
v12 = v10;
v13 = v11;
if ( v11 == a3 )
goto LABEL_44;
v14 = ((a2 - v10) << 6) + (((__int64)a3 - *(_QWORD *)a2) >> 3) - (((__int64)v11 - *(_QWORD *)v10) >> 3);
if ( !v14 )
{
v8 = v11;
LABEL_44:
v14 = 0LL;
if ( v9 <= 0 )
goto LABEL_38;
v16 = v10;
v14 = 0LL;
goto LABEL_10;
}
v15 = ((a2 - v10) << 6) + (((__int64)a3 - *(_QWORD *)a2) >> 3);
if ( v15 <= 0 )
{
v17 = 511 - v15;
v16 = &v10[-8 * (v17 >> 9)];
v8 = (__int64 *)(*(_QWORD *)v16 + 8 * (511 - (v17 & 0x1FF)));
}
else
{
v16 = &v10[8 * (v15 >> 9)];
v8 = (__int64 *)(*(_QWORD *)v16 + 8 * (v15 & 0x1FF));
}
if ( v9 > 0 )
{
if ( v14 > (unsigned __int64)(*(_QWORD *)(a1 + 40) - v9) >> 1 )
{
v25 = v9 + (((__int64)v8 - *(_QWORD *)v16) >> 3);
if ( v25 <= 0 )
{
v28 = 511 - v25;
v26 = &v16[-8 * (v28 >> 9)];
v27 = *(_QWORD *)v26 + 8 * (511 - (v28 & 0x1FF));
}
else
{
v26 = &v16[8 * (v25 >> 9)];
v27 = *(_QWORD *)v26 + 8 * (v25 & 0x1FF);
}
v29 = (char *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end((_QWORD *)a1);
v31 = std::move<std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l>(
v26,
v27,
v29,
v30,
v16,
(__int64)v8);
v33 = v32;
std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::end((_QWORD *)a1);
v35 = v34;
while ( v33 != v35 )
{
v36 = *v33;
*v33 = 0LL;
if ( v36 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v36 + 8LL))(v36);
if ( (unsigned __int64)++v33 - *v31 - 4096 <= 7 )
{
v33 = (__int64 *)v31[1];
++v31;
}
}
*(_QWORD *)(a1 + 40) -= v9;
while ( 1 )
{
v37 = *(_QWORD *)(a1 + 16);
v38 = (v37 - *(_QWORD *)(a1 + 8)) >> 3;
if ( v38 )
v38 = (v38 << 9) - 1;
if ( (unsigned __int64)(v38 - (*(_QWORD *)(a1 + 32) + *(_QWORD *)(a1 + 40))) <= 0x3FF )
break;
operator delete(*(void **)(v37 - 8));
v39 = *(_QWORD *)(a1 + 16) - 8LL;
while ( 1 )
{
v40 = *(_QWORD *)(a1 + 16);
if ( v39 == v40 )
break;
*(_QWORD *)(a1 + 16) = v40 - 8;
}
}
LABEL_38:
v41 = (_QWORD *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(a1);
v43 = v41;
if ( !v14 )
return v43;
goto LABEL_39;
}
LABEL_10:
v18 = v9 + (((__int64)v8 - *(_QWORD *)v16) >> 3);
if ( v18 <= 0 )
{
v21 = 511 - v18;
v19 = &v16[-8 * (v21 >> 9)];
v20 = *(_QWORD *)v19 + 8 * (511 - (v21 & 0x1FF));
}
else
{
v19 = &v16[8 * (v18 >> 9)];
v20 = *(_QWORD *)v19 + 8 * (v18 & 0x1FF);
}
std::move_backward<std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l,std::unique_ptr<fnv::vnm::ConfigElement>,std::unique_ptr<fnv::vnm::ConfigElement>*,std::unique_ptr<fnv::vnm::ConfigElement>&,std::unique_ptr<fnv::vnm::ConfigElement>**,long,512l>(
v10,
v11,
v16,
v8,
v19,
v20);
v23 = v22;
while ( v13 != v23 )
{
v24 = *v13;
*v13 = 0LL;
if ( v24 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v24 + 8LL))(v24);
if ( (unsigned __int64)++v13 - *(_QWORD *)v12 - 4096 <= 7 )
{
v13 = (__int64 *)*((_QWORD *)v12 + 1);
v12 += 8;
}
}
*(_QWORD *)(a1 + 40) -= v9;
for ( *(_QWORD *)(a1 + 32) += v9; *(_QWORD *)(a1 + 32) > 0x3FFuLL; *(_QWORD *)(a1 + 32) -= 512LL )
{
operator delete(**(void ***)(a1 + 8));
*(_QWORD *)(a1 + 8) += 8LL;
}
goto LABEL_38;
}
v41 = (_QWORD *)std::__deque_base<std::unique_ptr<fnv::vnm::ConfigElement>>::begin(a1);
LABEL_39:
v44 = v14 + ((v42 - *v41) >> 3);
if ( v44 <= 0 )
return &v41[-((511 - v44) >> 9)];
else
return &v41[v44 >> 9];
}
// 17588: variable 'v11' is possibly undefined
// 17674: variable 'v22' is possibly undefined
// 17778: variable 'v30' is possibly undefined
// 17784: variable 'v32' is possibly undefined
// 1778C: variable 'v34' is possibly undefined
// 1784C: variable 'v42' is possibly undefined
//----- (00000000000178E0) ----------------------------------------------------
__int64 __fastcall std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *>>::shrink_to_fit(
__int64 *a1)
{
unsigned __int64 v2; // x1
_QWORD *v3; // x1
__int64 v4; // x0
__int64 v5; // x2
__int64 v6; // x4
char *v7; // x0
__int64 v8; // x1
__int64 v10; // [xsp+30h] [xbp+30h] BYREF
__int64 v11; // [xsp+38h] [xbp+38h]
_QWORD *v12; // [xsp+40h] [xbp+40h] BYREF
__int64 v13; // [xsp+48h] [xbp+48h]
__int64 v14; // [xsp+58h] [xbp+58h]
v2 = (a1[2] - a1[1]) >> 3;
if ( v2 < (a1[3] - *a1) >> 3 )
{
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::__split_buffer(
&v10,
v2,
0LL,
(__int64)(a1 + 3));
sub_14BC0(&v12, (_QWORD *)a1[1], (_QWORD *)a1[2]);
v3 = (_QWORD *)a1[2];
v4 = a1[1];
v6 = v10;
v5 = v11;
v10 = *a1;
v11 = v4;
v12 = v3;
v7 = (char *)v3 + v5 - v4;
v8 = v13;
a1[2] = (__int64)v7;
v13 = a1[3];
*a1 = v6;
a1[1] = v5;
a1[3] = v8;
std::__split_buffer<std::unique_ptr<fnv::vnm::ConfigElement> *,std::allocator<std::unique_ptr<fnv::vnm::ConfigElement> *> &>::~__split_buffer((__int64)&v10);
}
return v14 ^ _stack_chk_guard;
}
//----- (00000000000179BC) ----------------------------------------------------
__int64 __fastcall std::string::__init<char *>(__int64 a1, __int64 a2, __int64 a3)
{
unsigned __int64 v3; // x19
unsigned __int64 v6; // x0
__int64 v7; // x20
__int64 result; // x0
__int64 i; // x1
v3 = a3 - a2;
if ( (unsigned __int64)(a3 - a2) <= 0xFFFFFFFFFFFFFFEFLL )
{
if ( v3 <= 0x16 )
{
*(_BYTE *)a1 = 2 * (v3 & 0x7F);
result = a1 + 1;
goto LABEL_4;
}
}
else
{
std::__basic_string_common<true>::__throw_length_error();
}
v6 = (v3 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v7 = v6 | 1;
result = operator new(v6);
*(_QWORD *)(a1 + 16) = result;
*(_QWORD *)a1 = v7;
*(_QWORD *)(a1 + 8) = v3;
LABEL_4:
for ( i = 0LL; i != v3; ++i )
*(_BYTE *)(result + i) = *(_BYTE *)(a2 + i);
*(_BYTE *)(result + i) = 0;
return result;
}
// 139E0: using guessed type __int64 std::__basic_string_common<true>::__throw_length_error(void);
//----- (0000000000017A48) ----------------------------------------------------
void __fastcall sub_17A48(__int64 (__fastcall ***a1)(), int a2, __int64 a3)
{
__int64 (__fastcall **v6)(); // x0
__int64 v7; // x1
__int64 (__fastcall ***v8)(); // x1
__int64 (__fastcall **v9)(); // x0
__int64 (__fastcall **v10)(); // x0
void **v11; // x1
if ( a2 )
v6 = off_4C1D0;
else
v6 = *(__int64 (__fastcall ***)())a3;
*a1 = v6;
v7 = 128LL;
if ( !a2 )
v7 = (__int64)*(v6 - 3);
v8 = (__int64 (__fastcall ***)())((char *)a1 + v7);
if ( a2 )
v9 = off_4C220;
else
v9 = *(__int64 (__fastcall ***)())(a3 + 64);
*v8 = v9;
if ( a2 )
v10 = off_4C1F8;
else
v10 = *(__int64 (__fastcall ***)())(a3 + 72);
a1[2] = v10;
std::stringbuf::~stringbuf(a1 + 3);
v11 = (void **)(a3 + 8);
if ( a2 )
v11 = &off_4C170;
std::iostream::~basic_iostream(a1, v11);
if ( (a2 & 2) != 0 )
std::ios::~ios(a1 + 16);
if ( (a2 & 1) != 0 )
operator delete(a1);
}
// 13400: using guessed type __int64 __fastcall std::ios::~ios(_QWORD);
// 13A70: using guessed type __int64 __fastcall std::iostream::~basic_iostream(_QWORD, _QWORD);
// 4C170: using guessed type void *;
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (0000000000017B20) ----------------------------------------------------
void __fastcall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
__int64 (__fastcall ***a1)())
{
sub_17A48(a1, 2, 0LL);
}
//----- (0000000000017B2C) ----------------------------------------------------
void __fastcall `non-virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
__int64 a1)
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream((__int64 (__fastcall ***)())(a1 - 16));
}
//----- (0000000000017B34) ----------------------------------------------------
void __fastcall `virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
_QWORD *a1)
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream((__int64 (__fastcall ***)())((char *)a1 + *(_QWORD *)(*a1 - 24LL)));
}
//----- (0000000000017B44) ----------------------------------------------------
void __fastcall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
__int64 (__fastcall ***a1)())
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(a1);
operator delete(a1);
}
//----- (0000000000017B68) ----------------------------------------------------
void __fastcall `non-virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
__int64 a1)
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream((__int64 (__fastcall ***)())(a1 - 16));
}
//----- (0000000000017B70) ----------------------------------------------------
void __fastcall `virtual thunk to'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
_QWORD *a1)
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream((__int64 (__fastcall ***)())((char *)a1 + *(_QWORD *)(*a1 - 24LL)));
}
//----- (0000000000017B80) ----------------------------------------------------
void __fastcall std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
__int64 (__fastcall ***a1)(),
__int64 a2)
{
sub_17A48(a1, 0, a2);
}
//----- (0000000000017B8C) ----------------------------------------------------
__int64 __fastcall sub_17B8C(unsigned int a1)
{
return bswap32(a1);
}
//----- (0000000000017B94) ----------------------------------------------------
__int64 __fastcall sub_17B94(int a1, __int64 a2, unsigned int *a3)
{
int v5; // w1
int v6; // w0
unsigned int v7; // w20
__int64 v8; // x2
Logger *v9; // x0
Logger *v10; // x21
unsigned int *errno_ptr; // x0
unsigned int v12; // w19
unsigned int *v13; // x0
int v14; // w0
__int64 v16; // [xsp+40h] [xbp+40h] BYREF
if ( a1 == 2 )
v5 = 268435458;
else
v5 = 268435459;
v6 = socket(a1, v5, 0);
v7 = v6;
if ( (v6 & 0x80000000) != 0 )
{
if ( a3 )
{
v8 = *(unsigned int *)__get_errno_ptr();
v9 = (Logger *)qword_4D0B8;
*a3 = v8;
Logger::e(v9, "Could not allocate socket, rc=%d", v8);
}
else
{
v10 = (Logger *)qword_4D0B8;
errno_ptr = (unsigned int *)__get_errno_ptr();
Logger::e(v10, "Could not allocate socket, rc=%d", *errno_ptr);
}
}
else
{
v16 = a2;
v12 = setsockopt(v6, 0xFFFF, 4106, &v16, 8u);
if ( v12 )
{
v13 = (unsigned int *)__get_errno_ptr();
v12 = *v13;
Logger::w((Logger *)qword_4D0B8, "%s(%d): Setting fib socket option: rc=%d.", "SetSockFib", 56LL, *v13);
if ( v12 )
{
Logger::e((Logger *)qword_4D0B8, "Could not set fib socket option, rc=%d", v12);
v14 = v7;
v7 = -1;
close(v14);
}
}
if ( a3 )
*a3 = v12;
}
return v7;
}
// 13450: using guessed type __int64 __get_errno_ptr(void);
// 4D0B8: using guessed type __int64 qword_4D0B8;
//----- (0000000000017CD8) ----------------------------------------------------
__int64 __fastcall sub_17CD8(unsigned __int16 *a1, __int64 a2, __int64 a3)
{
const char *v6; // x0
int v7; // w0
int v8; // w20
ssize_t v9; // x0
__int64 result; // x0
unsigned int v11; // [xsp+34h] [xbp+34h] BYREF
v11 = 0;
*a1 = 168;
*((_BYTE *)a1 + 2) = 3;
*((_DWORD *)a1 + 2) = 2051;
*((_DWORD *)a1 + 5) = 1234;
*((_DWORD *)a1 + 3) = 7;
*((_DWORD *)a1 + 4) = getpid();
*((_BYTE *)a1 + 121) = 2;
*((_BYTE *)a1 + 137) = 2;
*((_BYTE *)a1 + 153) = 2;
*((_BYTE *)a1 + 120) = 16;
*((_BYTE *)a1 + 136) = 16;
*((_BYTE *)a1 + 152) = 16;
v6 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v6 = *(const char **)(a2 + 16);
inet_aton(v6, (struct in_addr *)a1 + 35);
v7 = sub_17B94(17, a3, &v11);
v8 = v7;
if ( (v7 & 0x80000000) != 0 )
{
Logger::e((Logger *)qword_4D0B8, "%s: Could not create routing socket, rc=%d.", "PerformRoutingOps", v11);
return v11;
}
v9 = write(v7, a1, *a1);
if ( v9 <= 0 )
v11 = *(_DWORD *)__get_errno_ptr(v9);
close(v8);
result = v11;
if ( v11 )
{
Logger::e((Logger *)qword_4D0B8, "%s: Setting/Deleting default route: rc=%d.", "PerformRoutingOps", v11);
return v11;
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D0B8: using guessed type __int64 qword_4D0B8;
//----- (0000000000017E28) ----------------------------------------------------
__int64 __fastcall sub_17E28(unsigned __int8 *a1, unsigned int a2, __int64 *a3, __int64 a4)
{
unsigned int v8; // w2
__int64 result; // x0
const char *v10; // x1
__int64 v11; // x0
int v12; // w21
__int64 v13; // x3
__int64 v14; // x0
unsigned int v15; // w19
char v16[16]; // [xsp+58h] [xbp+58h] BYREF
__int64 v17; // [xsp+68h] [xbp+68h]
__int64 v18; // [xsp+70h] [xbp+70h]
memset(v16, 0, 0x90uLL);
v8 = *a1;
if ( (v8 & 1) != 0 )
{
result = 22LL;
if ( *((_QWORD *)a1 + 1) > 0xFuLL )
return result;
v10 = (const char *)*((_QWORD *)a1 + 2);
}
else
{
result = 22LL;
if ( v8 > 0x1F )
return result;
v10 = (const char *)(a1 + 1);
}
strncpy(v16, v10, 0xFuLL);
v11 = sub_17B94(2, a4, 0LL);
v12 = v11;
if ( (_DWORD)v11 == -1 )
return *(unsigned int *)__get_errno_ptr(v11);
v13 = a3[1];
v17 = *a3;
v18 = v13;
v14 = ioctl(v11, a2, v16);
v15 = v14;
if ( (_DWORD)v14 )
v15 = *(_DWORD *)__get_errno_ptr(v14);
close(v12);
return v15;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
//----- (0000000000017F40) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::GetIfAddress@<X0>(__int64 a1@<X0>, __int64 a2@<X1>, _QWORD *a3@<X8>)
{
int v5; // w0
struct sockaddr *v6; // x20
struct ifaddrs *i; // x19
struct sockaddr *ifa_addr; // x0
const char *v9; // x0
struct ifaddrs *ifa; // [xsp+40h] [xbp+40h] BYREF
char v12[32]; // [xsp+48h] [xbp+48h] BYREF
ifa = 0LL;
if ( a2 )
v5 = getifaddrs_fib(&ifa, a2);
else
v5 = getifaddrs(&ifa);
v6 = 0LL;
if ( !v5 )
{
for ( i = ifa; i; i = i->ifa_next )
{
ifa_addr = i->ifa_addr;
if ( ifa_addr && HIBYTE(ifa_addr->sa_family) == 2 && !(unsigned int)std::string::compare(a1, i->ifa_name) )
v6 = i->ifa_addr;
}
}
*a3 = 0LL;
a3[1] = 0LL;
a3[2] = 0LL;
if ( v6 )
{
v9 = inet_ntop(2, &v6->sa_data[2], v12, 0x20u);
if ( v9 )
std::string::assign(a3, v9);
}
if ( ifa )
freeifaddrs(ifa);
return a3;
}
// 13480: using guessed type __int64 __fastcall getifaddrs_fib(_QWORD, _QWORD);
// 137A0: using guessed type __int64 __fastcall std::string::assign(_QWORD, _QWORD);
// 139D0: using guessed type __int64 __fastcall std::string::compare(_QWORD, _QWORD);
// 17F40: using guessed type char anonymous_0[32];
//----- (0000000000018050) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::FindIfName@<X0>(__int64 a1@<X0>, __int64 a2@<X1>, _QWORD *a3@<X8>)
{
const char *v5; // x1
int v6; // w0
struct ifaddrs *i; // x0
struct sockaddr *ifa_addr; // x2
__int64 v9; // x1
int v11; // [xsp+30h] [xbp+30h] BYREF
struct ifaddrs *ifa; // [xsp+38h] [xbp+38h] BYREF
__int64 v13; // [xsp+40h] [xbp+40h] BYREF
__int64 v14; // [xsp+48h] [xbp+48h]
__int64 v15; // [xsp+50h] [xbp+50h]
ifa = 0LL;
v13 = 0LL;
v14 = 0LL;
v15 = 0LL;
v5 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v5 = *(const char **)(a1 + 16);
if ( inet_pton(2, v5, &v11) == 1 )
{
if ( a2 )
v6 = getifaddrs_fib(&ifa, (unsigned int)a2);
else
v6 = getifaddrs(&ifa);
if ( !v6 )
{
for ( i = ifa; i; i = i->ifa_next )
{
ifa_addr = i->ifa_addr;
if ( ifa_addr && HIBYTE(ifa_addr->sa_family) == 2 && v11 == *(_DWORD *)&ifa_addr->sa_data[2] )
{
std::string::assign(&v13, i->ifa_name);
break;
}
}
}
if ( ifa )
freeifaddrs(ifa);
v9 = v14;
*a3 = v13;
a3[1] = v9;
a3[2] = v15;
v13 = 0LL;
v14 = 0LL;
v15 = 0LL;
}
else
{
*a3 = 0LL;
a3[1] = 0LL;
a3[2] = 0LL;
std::string::__init(a3, "", 0LL);
}
std::string::~string(&v13);
return a3;
}
// 13480: using guessed type __int64 __fastcall getifaddrs_fib(_QWORD, _QWORD);
// 137A0: using guessed type __int64 __fastcall std::string::assign(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
//----- (00000000000181A0) ----------------------------------------------------
__int64 __fastcall fnv::vnm::Ipv4AddrFromBits(
fnv::vnm *this,
unsigned __int64 a2,
int a3,
unsigned __int64 a4,
unsigned int a5)
{
int v6; // w5
__int64 result; // x0
if ( a2 > 0x20 || a4 > 0x20 )
return 0LL;
v6 = (int)this;
result = 0LL;
if ( a2 + a4 <= 0x20 )
return (unsigned int)sub_17B8C((a3 << (32 - a4 - a2)) | (v6 << (32 - a2)) | a5);
return result;
}
//----- (0000000000018204) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::StringFromIpv4Addr@<X0>(fnv::vnm *this@<X0>, _QWORD *a2@<X8>)
{
const char *v3; // x0
fnv::vnm *v5; // [xsp+28h] [xbp+28h] BYREF
char v6[32]; // [xsp+38h] [xbp+38h] BYREF
v5 = this;
a2[2] = 0LL;
*a2 = 0LL;
a2[1] = 0LL;
v3 = inet_ntop(2, &v5, v6, 0x20u);
std::string::assign(a2, v3);
return a2;
}
// 137A0: using guessed type __int64 __fastcall std::string::assign(_QWORD, _QWORD);
// 18204: using guessed type char anonymous_0[32];
//----- (0000000000018298) ----------------------------------------------------
bool __fastcall fnv::vnm::ValidateIpv4Address(__int64 a1)
{
const char *v1; // x1
__int64 v3; // [xsp+20h] [xbp+20h] BYREF
v1 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v1 = *(const char **)(a1 + 16);
return inet_pton(2, v1, &v3) == 1;
}
//----- (0000000000018304) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ValidateIfname(__int64 a1)
{
unsigned int v2; // w20
struct ifaddrs *i; // x20
struct ifaddrs *ifa; // [xsp+30h] [xbp+30h] BYREF
ifa = 0LL;
if ( !getifaddrs(&ifa) )
{
for ( i = ifa; i; i = i->ifa_next )
{
if ( (i->ifa_flags & 1) != 0 && !(unsigned int)std::string::compare(a1, i->ifa_name) )
{
v2 = 1;
goto LABEL_8;
}
}
}
v2 = 0;
LABEL_8:
if ( ifa )
freeifaddrs(ifa);
return v2;
}
// 139D0: using guessed type __int64 __fastcall std::string::compare(_QWORD, _QWORD);
//----- (00000000000183A8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::Ipv4AddrFromString(__int64 a1, void *buf)
{
const char *v3; // x1
unsigned int v4; // w0
unsigned int v5; // w1
v3 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v3 = *(const char **)(a1 + 16);
v4 = inet_pton(2, v3, buf);
v5 = 1;
if ( v4 != 1 )
{
Logger::e((Logger *)qword_4D0B8, "ERROR %s: %d", "Ipv4AddrFromString", v4);
return 0;
}
return v5;
}
// 4D0B8: using guessed type __int64 qword_4D0B8;
//----- (000000000001840C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::Ipv4Prefixlen2Mask(fnv::vnm *this, _DWORD *a2, unsigned int *a3)
{
int v3; // w0
_DWORD *v4; // x1
__int64 result; // x0
if ( (unsigned int)this > 0x20 )
return 22LL;
if ( (_DWORD)this )
{
v3 = sub_17B8C(-1 << (32 - (_BYTE)this));
*v4 = v3;
return 0LL;
}
else
{
result = 0LL;
*a2 = 0;
}
return result;
}
// 18434: variable 'v4' is possibly undefined
//----- (0000000000018458) ----------------------------------------------------
__int64 __fastcall fnv::vnm::GetIfaceFlags(unsigned __int8 *a1, _QWORD *a2, __int64 a3)
{
unsigned int v6; // w2
__int64 result; // x0
const char *v8; // x1
int v9; // w0
int v10; // w21
__int64 v11; // x0
unsigned int v12; // w19
unsigned int v13; // [xsp+44h] [xbp+44h] BYREF
char v14[16]; // [xsp+48h] [xbp+48h] BYREF
int v15; // [xsp+58h] [xbp+58h]
memset(v14, 0, 0x90uLL);
v6 = *a1;
if ( (v6 & 1) != 0 )
{
result = 22LL;
if ( *((_QWORD *)a1 + 1) > 0xFuLL )
return result;
v8 = (const char *)*((_QWORD *)a1 + 2);
}
else
{
result = 22LL;
if ( v6 > 0x1F )
return result;
v8 = (const char *)(a1 + 1);
}
strncpy(v14, v8, 0xFuLL);
v13 = 0;
v9 = sub_17B94(2, a3, &v13);
v10 = v9;
if ( v9 == -1 )
return v13;
v11 = ioctl(v9, 0xC0906911uLL, v14);
v12 = v11;
if ( (_DWORD)v11 )
v12 = *(_DWORD *)__get_errno_ptr(v11);
close(v10);
if ( v12 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCGIFFLAGS: rc=%d", v12);
return v12;
}
else
{
*a2 = v15;
return 0LL;
}
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D0B8: using guessed type __int64 qword_4D0B8;
//----- (0000000000018588) ----------------------------------------------------
__int64 __fastcall fnv::vnm::CreateCloneIface(unsigned __int8 *a1, __int64 a2)
{
unsigned int v4; // w1
__int64 result; // x0
const char *v6; // x1
int v7; // w0
int v8; // w22
__int64 v9; // x0
unsigned int v10; // w19
const char *v11; // x2
unsigned int v12; // [xsp+34h] [xbp+34h] BYREF
char v13[144]; // [xsp+38h] [xbp+38h] BYREF
memset(v13, 0, sizeof(v13));
v4 = *a1;
if ( (v4 & 1) != 0 )
{
result = 22LL;
if ( *((_QWORD *)a1 + 1) > 0xFuLL )
return result;
v6 = (const char *)*((_QWORD *)a1 + 2);
}
else
{
result = 22LL;
if ( v4 > 0x1F )
return result;
v6 = (const char *)(a1 + 1);
}
strncpy(v13, v6, 0xFuLL);
v7 = sub_17B94(2, a2, &v12);
v8 = v7;
if ( v7 == -1 )
return v12;
v9 = ioctl(v7, 0x8090697AuLL, v13);
v10 = v9;
if ( (_DWORD)v9 )
v10 = *(_DWORD *)__get_errno_ptr(v9);
close(v8);
if ( v10 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCIFCREATE: errno=%d", v10);
return v10;
}
else
{
v11 = (const char *)(a1 + 1);
if ( (*a1 & 1) != 0 )
v11 = (const char *)*((_QWORD *)a1 + 2);
Logger::i((Logger *)qword_4D0C0, "Iface created, interface name: %s.", v11);
return 0LL;
}
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (00000000000186C0) ----------------------------------------------------
__int64 fnv::vnm::CreateVlanIface()
{
return 48LL;
}
//----- (00000000000186C8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DestroyCloneIface(unsigned __int8 *a1, __int64 a2)
{
unsigned int v4; // w1
__int64 result; // x0
const char *v6; // x1
__int64 v7; // x0
int v8; // w22
__int64 v9; // x0
unsigned int v10; // w19
const char *v11; // x2
char v12[144]; // [xsp+38h] [xbp+38h] BYREF
memset(v12, 0, sizeof(v12));
v4 = *a1;
if ( (v4 & 1) != 0 )
{
result = 22LL;
if ( *((_QWORD *)a1 + 1) > 0xFuLL )
return result;
v6 = (const char *)*((_QWORD *)a1 + 2);
}
else
{
result = 22LL;
if ( v4 > 0x1F )
return result;
v6 = (const char *)(a1 + 1);
}
strncpy(v12, v6, 0xFuLL);
v7 = sub_17B94(2, a2, 0LL);
v8 = v7;
if ( (_DWORD)v7 == -1 )
return *(unsigned int *)__get_errno_ptr(v7);
v9 = ioctl(v7, 0x80906979uLL, v12);
v10 = v9;
if ( (_DWORD)v9 )
v10 = *(_DWORD *)__get_errno_ptr(v9);
close(v8);
if ( v10 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCIFDESTROY: errno=%d", v10);
return v10;
}
else
{
v11 = (const char *)(a1 + 1);
if ( (*a1 & 1) != 0 )
v11 = (const char *)*((_QWORD *)a1 + 2);
Logger::i((Logger *)qword_4D0C0, "Iface destroyed, interface name: %s.", v11);
return 0LL;
}
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000018804) ----------------------------------------------------
__int64 fnv::vnm::DeleteVlanIface()
{
return 48LL;
}
//----- (000000000001880C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DeleteTunnel(unsigned __int8 *a1, __int64 a2)
{
unsigned int v4; // w1
__int64 result; // x0
const char *v6; // x1
__int64 v7; // x0
int v8; // w22
__int64 v9; // x0
unsigned int v10; // w19
const char *v11; // x2
char v12[144]; // [xsp+38h] [xbp+38h] BYREF
memset(v12, 0, sizeof(v12));
v4 = *a1;
if ( (v4 & 1) != 0 )
{
result = 22LL;
if ( *((_QWORD *)a1 + 1) > 0xFuLL )
return result;
v6 = (const char *)*((_QWORD *)a1 + 2);
}
else
{
result = 22LL;
if ( v4 > 0x1F )
return result;
v6 = (const char *)(a1 + 1);
}
strncpy(v12, v6, 0xFuLL);
v7 = sub_17B94(2, a2, 0LL);
v8 = v7;
if ( (_DWORD)v7 == -1 )
return *(unsigned int *)__get_errno_ptr(v7);
v9 = ioctl(v7, 0x80906949uLL, v12);
v10 = v9;
if ( (_DWORD)v9 )
v10 = *(_DWORD *)__get_errno_ptr(v9);
close(v8);
if ( v10 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCDIFPHYADDR: errno=%d", v10);
return v10;
}
else
{
v11 = (const char *)(a1 + 1);
if ( (*a1 & 1) != 0 )
v11 = (const char *)*((_QWORD *)a1 + 2);
Logger::i((Logger *)qword_4D0C0, "Tunnel deleted, name: %s.", v11);
return 0LL;
}
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000018948) ----------------------------------------------------
__int64 __fastcall fnv::vnm::SetIfaceVlan(unsigned __int8 *a1, __int64 a2, int a3, __int64 a4)
{
unsigned int v8; // w0
const char *v10; // x1
int v11; // w2
unsigned __int64 v12; // x1
const char *v14; // x1
int v15; // w0
int v16; // w24
__int64 v17; // x0
unsigned int v18; // w19
const char *v19; // x2
const char *v20; // x3
unsigned int v21; // [xsp+5Ch] [xbp+5Ch] BYREF
__int64 v22[2]; // [xsp+60h] [xbp+60h] BYREF
__int16 v23; // [xsp+70h] [xbp+70h]
char v24[16]; // [xsp+78h] [xbp+78h] BYREF
__int64 *v25; // [xsp+88h] [xbp+88h]
memset(v24, 0, 0x90uLL);
v8 = *a1;
if ( (v8 & 1) != 0 )
{
if ( *((_QWORD *)a1 + 1) > 0xFuLL )
return 22LL;
v10 = (const char *)*((_QWORD *)a1 + 2);
}
else
{
if ( v8 > 0x1F )
return 22LL;
v10 = (const char *)(a1 + 1);
}
strncpy(v24, v10, 0xFuLL);
v11 = *(_BYTE *)a2 & 1;
v12 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v12 = *(_QWORD *)(a2 + 8);
if ( a3 > 1024 || v12 > 0xF )
return 22LL;
v22[0] = 0LL;
v22[1] = 0LL;
v23 = 0;
v14 = (const char *)(a2 + 1);
if ( v11 )
v14 = *(const char **)(a2 + 16);
strncpy((char *)v22, v14, 0xFuLL);
v23 = a3;
v25 = v22;
v15 = sub_17B94(2, a4, &v21);
v16 = v15;
if ( v15 == -1 )
return v21;
v17 = ioctl(v15, 0x80906939uLL, v24);
v18 = v17;
if ( (_DWORD)v17 )
v18 = *(_DWORD *)__get_errno_ptr(v17);
close(v16);
if ( v18 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCSETVLAN: errno=%d", v18);
return v18;
}
else
{
v19 = (const char *)(a1 + 1);
if ( (*a1 & 1) != 0 )
v19 = (const char *)*((_QWORD *)a1 + 2);
v20 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v20 = *(const char **)(a2 + 16);
Logger::i((Logger *)qword_4D0C0, "vlan iface defined, interface name: %s, parent intf name: %s.", v19, v20);
return 0LL;
}
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000018AF4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::SetIfaceMtu(unsigned __int8 *a1, int a2, __int64 a3)
{
unsigned int v6; // w1
__int64 result; // x0
const char *v8; // x1
int v9; // w0
int v10; // w22
__int64 v11; // x0
unsigned int v12; // w19
const char *v13; // x2
unsigned int v14; // [xsp+44h] [xbp+44h] BYREF
char v15[16]; // [xsp+48h] [xbp+48h] BYREF
int v16; // [xsp+58h] [xbp+58h]
memset(v15, 0, 0x90uLL);
v6 = *a1;
if ( (v6 & 1) != 0 )
{
result = 22LL;
if ( *((_QWORD *)a1 + 1) > 0xFuLL )
return result;
v8 = (const char *)*((_QWORD *)a1 + 2);
}
else
{
result = 22LL;
if ( v6 > 0x1F )
return result;
v8 = (const char *)(a1 + 1);
}
strncpy(v15, v8, 0xFuLL);
v9 = sub_17B94(2, a3, &v14);
v10 = v9;
if ( v9 == -1 )
return v14;
v16 = a2;
v11 = ioctl(v9, 0x8090697FuLL, v15);
v12 = v11;
if ( (_DWORD)v11 )
v12 = *(_DWORD *)__get_errno_ptr(v11);
close(v10);
if ( v12 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCSIFMTU: errno=%d", v12);
return v12;
}
else
{
v13 = (const char *)(a1 + 1);
if ( (*a1 & 1) != 0 )
v13 = (const char *)*((_QWORD *)a1 + 2);
Logger::i((Logger *)qword_4D0C0, "MTU setting succeeded, interface name: %s.", v13);
return 0LL;
}
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000018C3C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::SetIfaceLink1Flag(unsigned __int8 *a1, __int64 a2)
{
unsigned int v4; // w1
__int64 result; // x0
const char *v6; // x1
int v7; // w0
int v8; // w22
__int64 v9; // x0
unsigned int v10; // w19
const char *v11; // x2
unsigned int v12; // [xsp+3Ch] [xbp+3Ch] BYREF
__int64 v13; // [xsp+40h] [xbp+40h] BYREF
char v14[16]; // [xsp+48h] [xbp+48h] BYREF
int v15; // [xsp+58h] [xbp+58h]
memset(v14, 0, 0x90uLL);
v4 = *a1;
if ( (v4 & 1) != 0 )
{
result = 22LL;
if ( *((_QWORD *)a1 + 1) > 0xFuLL )
return result;
v6 = (const char *)*((_QWORD *)a1 + 2);
}
else
{
result = 22LL;
if ( v4 > 0x1F )
return result;
v6 = (const char *)(a1 + 1);
}
strncpy(v14, v6, 0xFuLL);
v13 = 0LL;
result = fnv::vnm::GetIfaceFlags(a1, &v13, a2);
if ( !(_DWORD)result )
{
v12 = 0;
v7 = sub_17B94(2, a2, &v12);
v8 = v7;
if ( v7 == -1 )
{
return v12;
}
else
{
v15 = v13 | 0x2000;
v9 = ioctl(v7, 0x80906910uLL, v14);
v10 = v9;
if ( (_DWORD)v9 )
v10 = *(_DWORD *)__get_errno_ptr(v9);
close(v8);
if ( v10 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCSIFFLAGS: errno=%d", v10);
return v10;
}
else
{
v11 = (const char *)(a1 + 1);
if ( (*a1 & 1) != 0 )
v11 = (const char *)*((_QWORD *)a1 + 2);
Logger::i((Logger *)qword_4D0C0, "Iface flags set, interface name: %s.", v11);
return 0LL;
}
}
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000018D9C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::SetIfaceNetPrefixLen(__int64 a1, unsigned __int64 a2)
{
__int64 result; // x0
__int64 v4; // x2
unsigned int v5; // w19
const char *v6; // x2
int v7; // [xsp+38h] [xbp+38h] BYREF
__int64 v8; // [xsp+3Ch] [xbp+3Ch]
int v9; // [xsp+44h] [xbp+44h]
result = 22LL;
if ( a2 <= 0x20 )
{
v7 = 16;
v9 = 0;
v8 = (unsigned int)sub_17B8C(-1 << (32 - a2));
v5 = sub_17E28((unsigned __int8 *)a1, 0x80906916, (__int64 *)&v7, v4);
if ( v5 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCSIFNETMASK: errno=%d", v5);
return v5;
}
else
{
v6 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v6 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D0C0, "Mask setting succeeded, interface name: %s.", v6);
return 0LL;
}
}
return result;
}
// 18E10: variable 'v4' is possibly undefined
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000018E8C) ----------------------------------------------------
__int64 __fastcall sub_18E8C(unsigned __int8 *a1, unsigned int a2, char *a3, __int64 a4)
{
unsigned __int8 v8; // w1
__int64 v9; // x1
_BYTE *v10; // x19
_BYTE *v11; // x0
_BYTE *v12; // x1
_BYTE *v13; // x19
__int64 v14; // x0
unsigned int v15; // w0
unsigned int v16; // w19
int v17; // w0
const char *v19; // x0
__int64 v20[2]; // [xsp+58h] [xbp+58h] BYREF
char v21[8]; // [xsp+68h] [xbp+68h] BYREF
__int64 v22; // [xsp+70h] [xbp+70h]
__int64 v23; // [xsp+80h] [xbp+80h] BYREF
__int64 v24; // [xsp+88h] [xbp+88h]
const char *v25; // [xsp+90h] [xbp+90h]
v8 = *a3;
v20[0] = 0LL;
v20[1] = 0LL;
if ( (v8 & 1) != 0 )
{
v9 = *((_QWORD *)a3 + 1);
v10 = (_BYTE *)*((_QWORD *)a3 + 2);
}
else
{
v10 = a3 + 1;
v9 = v8 >> 1;
}
if ( v9 > 0 )
{
v11 = v10;
v12 = &v10[v9];
while ( v11 != v12 )
{
if ( *v11 == 47 )
{
v13 = (_BYTE *)(v11 - v10);
if ( v13 == (_BYTE *)-1LL )
break;
std::string::basic_string(v21, a3, 0LL, v13, a3);
std::string::basic_string(&v23, a3, v13 + 1, -1LL, a3);
goto LABEL_11;
}
++v11;
}
}
std::string::basic_string(v21, a3);
v25 = 0LL;
v23 = 0LL;
v24 = 0LL;
std::string::__init(&v23, "", 0LL);
LABEL_11:
LOBYTE(v20[0]) = 16;
v14 = v22;
if ( (v21[0] & 1) == 0 )
v14 = (unsigned __int8)v21[0] >> 1;
if ( !v14 || (BYTE1(v20[0]) = 2, (unsigned __int8)fnv::vnm::Ipv4AddrFromString((__int64)v21, (char *)v20 + 4)) )
{
v15 = sub_17E28(a1, a2, v20, a4);
if ( !v15 )
{
if ( (v23 & 1) != 0 )
{
v16 = 0;
if ( !v24 )
goto LABEL_25;
v19 = v25;
}
else
{
v16 = (int)(unsigned __int8)v23 >> 1;
if ( !v16 )
goto LABEL_25;
v19 = (char *)&v23 + 1;
}
v17 = atoi(v19);
v15 = fnv::vnm::SetIfaceNetPrefixLen((__int64)a1, v17);
}
v16 = v15;
goto LABEL_25;
}
v16 = 22;
LABEL_25:
std::string::~string(&v23);
std::string::~string(v21);
return v16;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 18E8C: using guessed type char var_38[8];
//----- (0000000000019090) ----------------------------------------------------
__int64 __fastcall fnv::vnm::SetIfaceAddr(__int64 a1, char *a2, __int64 a3)
{
unsigned int v4; // w19
const char *v6; // x2
v4 = sub_18E8C((unsigned __int8 *)a1, 0x8090690C, a2, a3);
if ( v4 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCSIFADDR: errno=%d", v4);
return v4;
}
else
{
v6 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v6 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D0C0, "Address setting succeeded, name: %s.", v6);
return 0LL;
}
}
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000019110) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DelIfaceAddr(__int64 a1, __int64 a2)
{
unsigned int v4; // w19
const char *v6; // x2
__int64 v7[3]; // [xsp+40h] [xbp+40h] BYREF
memset(v7, 0, sizeof(v7));
std::string::__init(v7, "", 0LL);
v4 = sub_18E8C((unsigned __int8 *)a1, 0x80906919, (char *)v7, a2);
std::string::~string(v7);
if ( v4 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCDIFADDR: errno=%d", v4);
return v4;
}
else
{
v6 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v6 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D0C0, "Address deleted, interface name: %s.", v6);
return 0LL;
}
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000019214) ----------------------------------------------------
__int64 __fastcall fnv::vnm::SetIfaceDstAddr(__int64 a1, char *a2, __int64 a3)
{
unsigned int v4; // w19
const char *v6; // x2
v4 = sub_18E8C((unsigned __int8 *)a1, 0x8090690E, a2, a3);
if ( v4 )
{
Logger::e((Logger *)qword_4D0B8, "SIOCSIFDSTADDR: errno=%d", v4);
return v4;
}
else
{
v6 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v6 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D0C0, "Dst address setting succeeded, interface name: %s.", v6);
return 0LL;
}
}
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000019294) ----------------------------------------------------
__int64 __fastcall fnv::vnm::SetGreSA(__int64 a1, char *a2, __int64 a3)
{
unsigned int v4; // w19
const char *v6; // x2
v4 = sub_18E8C((unsigned __int8 *)a1, 0x80906965, a2, a3);
if ( v4 )
{
Logger::e((Logger *)qword_4D0B8, "GRESADDRS: errno=%d", v4);
return v4;
}
else
{
v6 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v6 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D0C0, "GRE SA setting succeeded, interface name: %s.", v6);
return 0LL;
}
}
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000019314) ----------------------------------------------------
__int64 __fastcall fnv::vnm::SetGreDA(__int64 a1, char *a2, __int64 a3)
{
unsigned int v4; // w19
const char *v6; // x2
v4 = sub_18E8C((unsigned __int8 *)a1, 0x80906966, a2, a3);
if ( v4 )
{
Logger::e((Logger *)qword_4D0B8, "GRESADDRD: errno=%d", v4);
return v4;
}
else
{
v6 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v6 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D0C0, "GRE DA setting succeeded, interface name: %s.", v6);
return 0LL;
}
}
// 4D0B8: using guessed type __int64 qword_4D0B8;
// 4D0C0: using guessed type __int64 qword_4D0C0;
//----- (0000000000019394) ----------------------------------------------------
__int64 __fastcall fnv::vnm::AddDefRoute(__int64 a1, __int64 a2)
{
unsigned int v4; // w20
unsigned __int16 v6; // [xsp+30h] [xbp+30h] BYREF
char v7; // [xsp+33h] [xbp+33h]
memset(&v6, 0, 0xA8uLL);
v7 = 1;
v4 = sub_17CD8(&v6, a1, a2);
if ( v4 )
Logger::e((Logger *)qword_4D0B8, "Default route add failed.");
return v4;
}
// 4D0B8: using guessed type __int64 qword_4D0B8;
//----- (0000000000019430) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DelDefRoute(__int64 a1, __int64 a2)
{
unsigned int v4; // w20
unsigned __int16 v6; // [xsp+30h] [xbp+30h] BYREF
char v7; // [xsp+33h] [xbp+33h]
memset(&v6, 0, 0xA8uLL);
v7 = 2;
v4 = sub_17CD8(&v6, a1, a2);
if ( v4 )
Logger::e((Logger *)qword_4D0B8, "Default route delete failed.");
return v4;
}
// 4D0B8: using guessed type __int64 qword_4D0B8;
//----- (00000000000194D0) ----------------------------------------------------
_QWORD *__usercall sub_194D0@<X0>(__int64 a1@<X0>, char *a2@<X1>, _QWORD *a3@<X8>)
{
unsigned __int8 v5; // w2
__int64 v6; // x1
_QWORD *v7; // x0
__int64 v8; // x3
char *v9; // x1
__int64 v10; // x2
__int64 *v11; // x0
__int64 v12; // x3
_QWORD *v13; // x0
__int64 v14; // x3
__int64 *v15; // x0
_QWORD *v16; // x0
__int64 v17; // x3
_BYTE v19[24]; // [xsp+40h] [xbp+40h] BYREF
_QWORD v20[3]; // [xsp+58h] [xbp+58h] BYREF
__int64 v21[3]; // [xsp+70h] [xbp+70h] BYREF
v5 = *a2;
v6 = (unsigned __int8)*a2 >> 1;
if ( (v5 & 1) != 0 )
v6 = *((_QWORD *)a2 + 1);
if ( v6 )
{
std::operator+<char>("/var/run/dhcp_", a1);
v7 = (_QWORD *)std::string::append(v19, "_");
v8 = v7[1];
v20[0] = *v7;
v20[1] = v8;
v20[2] = v7[2];
*v7 = 0LL;
v7[1] = 0LL;
v7[2] = 0LL;
if ( (*a2 & 1) != 0 )
{
v10 = *((_QWORD *)a2 + 1);
v9 = (char *)*((_QWORD *)a2 + 2);
}
else
{
v9 = a2 + 1;
v10 = (unsigned __int8)*a2 >> 1;
}
v11 = (__int64 *)std::string::append(v20, v9, v10);
v12 = v11[1];
v21[0] = *v11;
v21[1] = v12;
v21[2] = v11[2];
*v11 = 0LL;
v11[1] = 0LL;
v11[2] = 0LL;
v13 = (_QWORD *)std::string::append(v21, ".pid");
v14 = v13[1];
*a3 = *v13;
a3[1] = v14;
a3[2] = v13[2];
*v13 = 0LL;
v13[1] = 0LL;
v13[2] = 0LL;
std::string::~string(v21);
std::string::~string(v20);
v15 = (__int64 *)v19;
}
else
{
std::operator+<char>("/var/run/dhcp_", a1);
v16 = (_QWORD *)std::string::append(v21, ".pid");
v17 = v16[1];
*a3 = *v16;
a3[1] = v17;
a3[2] = v16[2];
*v16 = 0LL;
v16[1] = 0LL;
v16[2] = 0LL;
v15 = v21;
}
std::string::~string(v15);
return a3;
}
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
// 13BA0: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD);
//----- (0000000000019690) ----------------------------------------------------
__int64 __fastcall sub_19690(__int64 result, __int64 a2, __int64 a3)
{
__int64 v3; // x20
__int64 v6; // x21
v3 = result;
while ( a3 != a2 )
{
v6 = *(_QWORD *)(v3 + 8);
if ( v6 )
{
std::string::basic_string(*(_QWORD *)(v3 + 8), a2);
*(_DWORD *)(v6 + 24) = *(_DWORD *)(a2 + 24);
}
a2 += 32LL;
result = *(_QWORD *)(v3 + 8) + 32LL;
*(_QWORD *)(v3 + 8) = result;
}
return result;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
//----- (00000000000196F4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DnsForwardEntry::DnsForwardEntry(__int64 a1, __int64 a2)
{
__int64 result; // x0
fnv::vnm::ConfigElement::ConfigElement(a1, a2);
*(_QWORD *)a1 = &unk_4C298;
*(_QWORD *)(a1 + 72) = 0LL;
result = 1LL;
*(_QWORD *)(a1 + 80) = 0LL;
*(_BYTE *)(a1 + 8) = 1;
*(_QWORD *)(a1 + 88) = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
*(_QWORD *)(a1 + 104) = 0LL;
*(_QWORD *)(a1 + 112) = 0LL;
*(_QWORD *)(a1 + 120) = 0LL;
*(_QWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 136) = 0LL;
*(_QWORD *)(a1 + 144) = 0LL;
*(_QWORD *)(a1 + 152) = 0LL;
*(_QWORD *)(a1 + 160) = 0LL;
return result;
}
//----- (000000000001974C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::Bind9DnsForwardEntry::Bind9DnsForwardEntry(__int64 a1, __int64 a2)
{
__int64 result; // x0
fnv::vnm::DnsForwardEntry::DnsForwardEntry(a1, a2);
*(_QWORD *)a1 = off_4C2D8;
result = 1LL;
*(_BYTE *)(a1 + 8) = 1;
return result;
}
// 4C2D8: using guessed type void (__fastcall *off_4C2D8[2])(fnv::vnm::Bind9DnsForwardEntry *__hidden this);
//----- (0000000000019784) ----------------------------------------------------
__int64 __fastcall fnv::vnm::JournalPrefix::makeJournalDir(fnv::vnm::JournalPrefix *this)
{
__int64 v2; // x22
unsigned int v3; // w27
const char *v4; // x21
size_t v5; // x0
__int64 *v6; // x0
__int64 v7; // x3
__int64 v8; // x1
const char *v9; // x3
const char *v10; // x0
unsigned int v11; // w21
const char *v12; // x3
const char *v13; // x0
__int64 result; // x0
unsigned int v15; // w22
Logger *v16; // x23
const char *v17; // x21
unsigned int v18; // w19
char *v19; // x0
__int64 v20[3]; // [xsp+68h] [xbp+68h] BYREF
__int64 v21; // [xsp+80h] [xbp+80h] BYREF
__int64 v22; // [xsp+88h] [xbp+88h]
__int64 v23; // [xsp+90h] [xbp+90h]
v2 = 0LL;
while ( 1 )
{
v3 = v2 + 1;
memset(v20, 0, sizeof(v20));
v4 = (const char *)*(&fnv::vnm::JournalPrefix::journalPrefixes + v2);
v5 = strlen(v4);
std::string::__init(v20, v4, v5);
v6 = (__int64 *)std::string::append(v20, "vnm/");
v7 = v6[1];
v21 = *v6;
v22 = v7;
v23 = v6[2];
*v6 = 0LL;
v6[1] = 0LL;
v6[2] = 0LL;
if ( (*(_BYTE *)this & 1) != 0 )
{
**((_BYTE **)this + 2) = 0;
*((_QWORD *)this + 1) = 0LL;
}
else
{
*((_BYTE *)this + 1) = 0;
*(_BYTE *)this = 0;
}
std::string::reserve(this, 0LL);
v8 = v22;
*(_QWORD *)this = v21;
*((_QWORD *)this + 1) = v8;
*((_QWORD *)this + 2) = v23;
v21 = 0LL;
v22 = 0LL;
v23 = 0LL;
std::string::~string(&v21);
std::string::~string(v20);
v9 = (char *)this + 1;
if ( (*(_BYTE *)this & 1) != 0 )
v9 = (const char *)*((_QWORD *)this + 2);
Logger::d((Logger *)qword_4D0C8, "%d. Attempting mkdir on %s", v3, v9);
v10 = (char *)this + 1;
if ( (*(_BYTE *)this & 1) != 0 )
v10 = (const char *)*((_QWORD *)this + 2);
v11 = mkdir(v10, 0x1C0u);
if ( !v11 || *(_DWORD *)__get_errno_ptr() == 17 )
break;
if ( ++v2 == 3 )
return v11;
}
if ( (*(_BYTE *)this & 1) != 0 )
v12 = (const char *)*((_QWORD *)this + 2);
else
v12 = (char *)this + 1;
Logger::d((Logger *)qword_4D0C8, "%d. Attempting chown on %s", v3, v12);
v13 = (char *)this + 1;
if ( (*(_BYTE *)this & 1) != 0 )
v13 = (const char *)*((_QWORD *)this + 2);
result = chown(v13, 0xD2u, 0xD2u);
v15 = result;
if ( (result & 0x80000000) != 0 )
{
v16 = (Logger *)qword_4D0C8;
v17 = (char *)this + 1;
if ( (*(_BYTE *)this & 1) != 0 )
v17 = (const char *)*((_QWORD *)this + 2);
v18 = *(_DWORD *)__get_errno_ptr();
v19 = strerror(v18);
Logger::e(v16, "chown on %s failed with errno %d, err %s", v17, v18, v19);
return v15;
}
return result;
}
// 13450: using guessed type __int64 __get_errno_ptr(void);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A30: using guessed type __int64 __fastcall std::string::reserve(_QWORD, _QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 13BA0: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD);
// 4BEF0: using guessed type void *fnv::vnm::JournalPrefix::journalPrefixes;
// 4D0C8: using guessed type __int64 qword_4D0C8;
//----- (00000000000199BC) ----------------------------------------------------
__int64 __fastcall fnv::vnm::JournalPrefix::JournalPrefix(fnv::vnm::JournalPrefix *this)
{
__int64 result; // x0
const char *v3; // x2
*(_QWORD *)this = 0LL;
*((_QWORD *)this + 1) = 0LL;
*((_QWORD *)this + 2) = 0LL;
result = fnv::vnm::JournalPrefix::makeJournalDir(this);
if ( (_DWORD)result )
{
v3 = (char *)this + 1;
if ( (*(_BYTE *)this & 1) != 0 )
v3 = (const char *)*((_QWORD *)this + 2);
return Logger::e((Logger *)qword_4D0C8, "Unable to create journal dir %s (%d).", v3, (unsigned int)result);
}
return result;
}
// 4D0C8: using guessed type __int64 qword_4D0C8;
//----- (0000000000019A28) ----------------------------------------------------
__int64 __fastcall fnv::vnm::JournalPrefix::instance(fnv::vnm::JournalPrefix *this)
{
fnv::vnm::JournalPrefix *v1; // x20
if ( !fnv::vnm::JournalPrefix::_instance )
{
v1 = (fnv::vnm::JournalPrefix *)operator new(0x18uLL);
fnv::vnm::JournalPrefix::JournalPrefix(v1);
fnv::vnm::JournalPrefix::_instance = (__int64)v1;
}
return fnv::vnm::JournalPrefix::_instance;
}
// 4D0F0: using guessed type __int64 fnv::vnm::JournalPrefix::_instance;
//----- (0000000000019A88) ----------------------------------------------------
__int64 __usercall fnv::vnm::JournalPrefix::getPath@<X0>(fnv::vnm::JournalPrefix *this@<X0>, __int64 a2@<X8>)
{
std::string::basic_string(a2, this);
return a2;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
//----- (0000000000019AB4) ----------------------------------------------------
void __fastcall fnv::vnm::JournalEntry::~JournalEntry(fnv::vnm::JournalEntry *this)
{
fnv::vnm::ConfigElement *v1; // x21
fnv::vnm::JournalPrefix *v2; // x0
_BYTE *v3; // x2
__int64 v4; // x3
__int64 *v5; // x0
__int64 v6; // x3
const char *v7; // x0
int v8; // w24
__int64 v9; // x0
__int64 v10; // x3
unsigned __int8 v11; // [xsp+40h] [xbp+40h] BYREF
_BYTE v12[15]; // [xsp+41h] [xbp+41h] BYREF
_BYTE *v13; // [xsp+50h] [xbp+50h]
_BYTE v14[24]; // [xsp+58h] [xbp+58h] BYREF
__int64 v15[2]; // [xsp+70h] [xbp+70h] BYREF
const char *v16; // [xsp+80h] [xbp+80h]
*(_QWORD *)this = off_4C318;
if ( *((_BYTE *)this + 8) )
{
v1 = this;
v2 = (fnv::vnm::JournalPrefix *)fnv::vnm::JournalPrefix::instance(this);
fnv::vnm::JournalPrefix::getPath(v2, (__int64)&v11);
fnv::vnm::ConfigElement::name(v1, (__int64)v14);
if ( (v11 & 1) != 0 )
{
v4 = *(_QWORD *)&v12[7];
v3 = v13;
}
else
{
v4 = v11 >> 1;
v3 = v12;
}
v5 = (__int64 *)std::string::insert(v14, 0LL, v3, v4);
v6 = v5[1];
v15[0] = *v5;
v15[1] = v6;
v16 = (const char *)v5[2];
*v5 = 0LL;
v5[1] = 0LL;
v5[2] = 0LL;
v7 = v16;
if ( (v15[0] & 1) == 0 )
v7 = (char *)v15 + 1;
v8 = unlink(v7);
std::string::~string(v15);
v9 = std::string::~string(v14);
if ( v8 )
{
v10 = *(unsigned int *)__get_errno_ptr(v9);
if ( (_DWORD)v10 )
Logger::e((Logger *)qword_4D0C8, "%s (%d)", "Removing journal file", v10);
}
std::string::~string(&v11);
this = v1;
}
fnv::vnm::ConfigElement::~ConfigElement(this);
}
// 132C0: using guessed type __int64 __fastcall std::string::insert(_QWORD, _QWORD, _QWORD, _QWORD);
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4C318: using guessed type void (__fastcall *[2])(fnv::vnm::JournalEntry *__hidden this);
// 4D0C8: using guessed type __int64 qword_4D0C8;
//----- (0000000000019BEC) ----------------------------------------------------
void __fastcall fnv::vnm::JournalEntry::~JournalEntry(fnv::vnm::JournalEntry *this)
{
fnv::vnm::JournalEntry::~JournalEntry(this);
operator delete(this);
}
//----- (0000000000019C10) ----------------------------------------------------
void (__fastcall **__fastcall fnv::vnm::JournalEntry::JournalEntry(
_QWORD *a1,
__int64 a2))(fnv::vnm::JournalEntry *__hidden this)
{
void (__fastcall **result)(fnv::vnm::JournalEntry *__hidden); // x0
fnv::vnm::ConfigElement::ConfigElement((__int64)a1, a2);
result = off_4C318;
*a1 = off_4C318;
return result;
}
// 4C318: using guessed type void (__fastcall *off_4C318[2])(fnv::vnm::JournalEntry *__hidden this);
//----- (0000000000019C40) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::JournalEntry::moveMe@<X0>(fnv::vnm::JournalEntry *this@<X0>, _QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0x48uLL);
fnv::vnm::JournalEntry::JournalEntry(v4, (__int64)this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (0000000000019CD0) ----------------------------------------------------
__int64 __fastcall fnv::vnm::JournalProcessor::JournalProcessor(_QWORD *a1, __int64 a2)
{
fnv::vnm::JournalPrefix *v4; // x0
__int64 v5; // x1
__int64 v6; // x2
_QWORD *v7; // x0
__int64 v8; // x3
_BYTE v10[32]; // [xsp+30h] [xbp+30h] BYREF
*a1 = algn_4C350;
v4 = (fnv::vnm::JournalPrefix *)fnv::vnm::JournalPrefix::instance((fnv::vnm::JournalPrefix *)algn_4C350);
fnv::vnm::JournalPrefix::getPath(v4, (__int64)v10);
if ( (*(_BYTE *)a2 & 1) != 0 )
{
v6 = *(_QWORD *)(a2 + 8);
v5 = *(_QWORD *)(a2 + 16);
}
else
{
v5 = a2 + 1;
v6 = *(_BYTE *)a2 >> 1;
}
v7 = (_QWORD *)std::string::append(v10, v5, v6);
v8 = v7[1];
a1[1] = *v7;
a1[2] = v8;
a1[3] = v7[2];
*v7 = 0LL;
v7[1] = 0LL;
v7[2] = 0LL;
std::string::~string(v10);
return *(_QWORD *)&v10[24] ^ _stack_chk_guard;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
//----- (0000000000019D9C) ----------------------------------------------------
void __fastcall fnv::vnm::JournalProcessor::~JournalProcessor(fnv::vnm::JournalProcessor *this)
{
*(_QWORD *)this = algn_4C350;
std::string::~string((char *)this + 8);
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (0000000000019DB0) ----------------------------------------------------
void __fastcall fnv::vnm::JournalProcessor::~JournalProcessor(fnv::vnm::JournalProcessor *this)
{
fnv::vnm::JournalProcessor::~JournalProcessor(this);
operator delete(this);
}
//----- (0000000000019DD4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::JournalProcessor::descend(__int64 a1, DIR *a2)
{
char v3; // w2
const char *v5; // x0
__int64 v6; // x0
unsigned int *errno_ptr; // x24
struct dirent *v8; // x0
unsigned int v9; // w23
char *v10; // x20
size_t v11; // x0
__int64 v13[3]; // [xsp+60h] [xbp+60h] BYREF
v3 = *(_BYTE *)(a1 + 8);
v5 = (const char *)(a1 + 9);
if ( (v3 & 1) != 0 )
v5 = *(const char **)(a1 + 24);
v6 = pathconf(v5, 4);
errno_ptr = (unsigned int *)__get_errno_ptr(v6);
*errno_ptr = 0;
v8 = readdir(a2);
v9 = *errno_ptr;
if ( !*errno_ptr && v8 )
{
while ( !*errno_ptr )
{
if ( !v8 )
return v9;
v10 = &v8->d_name[1];
memset(v13, 0, sizeof(v13));
v11 = strlen(&v8->d_name[1]);
std::string::__init(v13, v10, v11);
if ( (unsigned int)std::string::compare(v13, ".") )
{
if ( (unsigned int)std::string::compare(v13, "..") )
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)a1 + 16LL))(a1, v13);
}
std::string::~string(v13);
v8 = readdir(a2);
}
return *errno_ptr;
}
return v9;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 139D0: using guessed type __int64 __fastcall std::string::compare(_QWORD, _QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
//----- (0000000000019F20) ----------------------------------------------------
__int64 __fastcall fnv::vnm::JournalProcessor::go(fnv::vnm::JournalProcessor *this)
{
const char *v2; // x0
DIR *v3; // x0
DIR *v4; // x20
unsigned int v6; // w19
v2 = (char *)this + 9;
if ( (*(v2 - 1) & 1) != 0 )
v2 = (const char *)*((_QWORD *)this + 3);
v3 = opendir(v2);
v4 = v3;
if ( !v3 )
return *(unsigned int *)__get_errno_ptr(0LL);
v6 = fnv::vnm::JournalProcessor::descend((__int64)this, v3);
closedir(v4);
return v6;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
//----- (0000000000019F80) ----------------------------------------------------
__int64 __fastcall fnv::vnm::InstallForwarders(fnv::vnm *this)
{
fnv::vnm::CompositeConfig *v1; // x22
_QWORD *v2; // x23
fnv::vnm::ConfigElement **v3; // x1
fnv::vnm::ConfigElement **v4; // x19
fnv::vnm::ConfigElement **v5; // x1
fnv::vnm::ConfigElement **v6; // x24
fnv::vnm::ConfigElement *v7; // x25
_BYTE *v8; // x1
__int64 v9; // x2
int v10; // w3
__int64 v11; // x0
int v12; // w23
const char *v13; // x1
__int64 v14; // x0
const char *v15; // x1
size_t v16; // x2
__int64 v17; // x19
size_t v18; // x0
Logger *v19; // x22
unsigned int *errno_ptr; // x19
unsigned int v21; // w19
__int64 v23; // x1
char v24[16]; // [xsp+0h] [xbp+0h] BYREF
__int64 v25; // [xsp+58h] [xbp+58h] BYREF
size_t v26; // [xsp+60h] [xbp+60h]
const char *v27; // [xsp+68h] [xbp+68h]
unsigned __int8 v28; // [xsp+70h] [xbp+70h] BYREF
_BYTE v29[15]; // [xsp+71h] [xbp+71h] BYREF
_BYTE *v30; // [xsp+80h] [xbp+80h]
v27 = 0LL;
v25 = 0LL;
v26 = 0LL;
std::string::__init(&v25, "", 0LL);
v1 = (fnv::vnm::CompositeConfig *)fnv::vnm::pDnsMap;
if ( fnv::vnm::pDnsMap )
{
v2 = (_QWORD *)fnv::vnm::CompositeConfig::begin((fnv::vnm::CompositeConfig *)fnv::vnm::pDnsMap);
v4 = v3;
fnv::vnm::CompositeConfig::end(v1);
v6 = v5;
while ( v4 != v6 )
{
v7 = *v4;
if ( !(unsigned __int8)fnv::vnm::ConfigElement::isSelected(*v4) )
{
(*(void (__fastcall **)(fnv::vnm::ConfigElement *, _QWORD, _QWORD))(*(_QWORD *)v7 + 40LL))(v7, 0LL, 0LL);
if ( (v28 & 1) != 0 )
{
v9 = *(_QWORD *)&v29[7];
v8 = v30;
}
else
{
v9 = v28 >> 1;
v8 = v29;
}
std::string::append(&v25, v8, v9);
std::string::~string(&v28);
}
if ( (unsigned __int64)++v4 - *v2 - 4096 <= 7 )
{
v4 = (fnv::vnm::ConfigElement **)v2[1];
++v2;
}
}
}
v10 = v25 & 1;
if ( v10 )
{
v11 = v26;
if ( !v26 )
goto LABEL_12;
}
else
{
LODWORD(v11) = (int)(unsigned __int8)v25 >> 1;
if ( !(_DWORD)v11 )
goto LABEL_12;
v11 = (int)v11;
}
v13 = v27;
v14 = v11 - 1;
if ( !v10 )
v13 = (char *)&v25 + 1;
if ( v13[v14] == 10 )
{
v23 = v26;
if ( !v10 )
v23 = (unsigned __int8)v25 >> 1;
std::string::erase(&v25, v23 - 1);
}
LABEL_12:
v12 = v25 & 1;
if ( (v25 & 1) != 0 )
{
v16 = v26;
v15 = v27;
}
else
{
v16 = (unsigned __int8)v25 >> 1;
v15 = (char *)&v25 + 1;
}
v17 = (unsigned __int8)v25 >> 1;
strncpy(v24, v15, v16);
if ( v12 )
v17 = v26;
v24[v17] = 0;
v18 = confstr(458, v24, 0LL);
if ( v18 )
{
v21 = 0;
}
else
{
v19 = (Logger *)qword_4D0C8;
errno_ptr = (unsigned int *)__get_errno_ptr(&off_4D000);
v18 = Logger::e(v19, "Setting _CS_RESOLVE failed, errno: %d", *errno_ptr);
v21 = *errno_ptr;
}
if ( (unsigned int)res_init(v18) )
Logger::e((Logger *)qword_4D0C8, "Setting res_init() failed");
std::string::~string(&v25);
return v21;
}
// 19FEC: variable 'v3' is possibly undefined
// 19FF4: variable 'v5' is possibly undefined
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13840: using guessed type __int64 __fastcall res_init(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 13B40: using guessed type __int64 __fastcall std::string::erase(_QWORD, _QWORD);
// 4D000: using guessed type void *off_4D000;
// 4D028: using guessed type void *fnv::vnm::pDnsMap;
// 4D0C8: using guessed type __int64 qword_4D0C8;
// 19F80: using guessed type char var_90[16];
//----- (000000000001A204) ----------------------------------------------------
__int64 __fastcall fnv::vnm::setDhcpIdleMode(__int64 a1, __int64 a2)
{
unsigned __int8 v2; // w3
__int64 v3; // x2
unsigned int v4; // w0
__int64 v6; // [xsp+30h] [xbp+30h] BYREF
__int64 v7; // [xsp+38h] [xbp+38h]
__int64 v8; // [xsp+40h] [xbp+40h]
__int64 v9; // [xsp+48h] [xbp+48h] BYREF
__int64 v10; // [xsp+50h] [xbp+50h]
__int64 v11; // [xsp+58h] [xbp+58h]
__int64 v12; // [xsp+60h] [xbp+60h] BYREF
__int64 v13; // [xsp+68h] [xbp+68h]
__int64 v14; // [xsp+70h] [xbp+70h]
v8 = 0LL;
v2 = *(_BYTE *)a2;
v6 = 0LL;
v7 = 0LL;
v3 = v2 >> 1;
if ( (v2 & 1) != 0 )
v3 = *(_QWORD *)(a2 + 8);
if ( v3 )
{
sub_194D0(a1, (char *)a2, &v9);
LOWORD(v6) = 0;
std::string::reserve(&v6, 0LL);
v6 = v9;
v7 = v10;
v8 = v11;
v9 = 0LL;
v10 = 0LL;
v11 = 0LL;
}
else
{
v11 = 0LL;
v9 = 0LL;
v10 = 0LL;
sub_194D0(a1, (char *)&v9, &v12);
LOWORD(v6) = 0;
std::string::reserve(&v6, 0LL);
v6 = v12;
v7 = v13;
v8 = v14;
v12 = 0LL;
v13 = 0LL;
v14 = 0LL;
std::string::~string(&v12);
}
std::string::~string(&v9);
v4 = fnv::vnm::send_sigkill((char *)&v6);
if ( v4 )
Logger::e((Logger *)qword_4D0C8, "%s: %s (%d)", "setDhcpIdleMode", "ending dhcpd/dhclient", v4);
std::string::~string(&v6);
return 0LL;
}
// 1A25C: conditional instruction was optimized away because %var_50.1==0
// 1A2BC: conditional instruction was optimized away because %var_50.1==0
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A30: using guessed type __int64 __fastcall std::string::reserve(_QWORD, _QWORD);
// 4D0C8: using guessed type __int64 qword_4D0C8;
//----- (000000000001A3A0) ----------------------------------------------------
__int64 __fastcall fnv::vnm::setDhcpClientMode(__int64 a1)
{
unsigned __int8 v2; // w1
__int64 v3; // x0
unsigned int v4; // w20
const char *v5; // x20
size_t v6; // x0
const char *v7; // x20
size_t v8; // x0
__int64 *v9; // x19
__int64 *v10; // x0
const char *v11; // x2
char *v12; // x4
__int64 v14[3]; // [xsp+50h] [xbp+50h] BYREF
_QWORD v15[2]; // [xsp+68h] [xbp+68h] BYREF
char *v16; // [xsp+78h] [xbp+78h]
_QWORD v17[3]; // [xsp+80h] [xbp+80h] BYREF
__int64 v18; // [xsp+98h] [xbp+98h] BYREF
__int64 v19; // [xsp+A0h] [xbp+A0h]
__int64 v20; // [xsp+A8h] [xbp+A8h]
__int64 v21[3]; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v22[3]; // [xsp+C8h] [xbp+C8h] BYREF
__int64 v23[3]; // [xsp+E0h] [xbp+E0h] BYREF
__int64 v24[3]; // [xsp+F8h] [xbp+F8h] BYREF
__int64 v25[3]; // [xsp+110h] [xbp+110h] BYREF
v2 = *(_BYTE *)a1;
memset(v14, 0, sizeof(v14));
v15[0] = 0LL;
v15[1] = 0LL;
v16 = 0LL;
v3 = v2 >> 1;
if ( (v2 & 1) != 0 )
v3 = *(_QWORD *)(a1 + 8);
if ( !v3 )
{
v4 = 22;
goto LABEL_19;
}
v20 = 0LL;
v18 = 0LL;
v19 = 0LL;
sub_194D0(a1, (char *)&v18, v17);
std::string::~string(&v18);
v4 = fnv::vnm::setDhcpIdleMode(a1, (__int64)&qword_4D0D0);
if ( v4 )
{
v11 = "ending any running daemon";
}
else
{
Logger::d((Logger *)qword_4D0E8, "%s: Using QNX Neutrino function spawn()", "setDhcpClientMode");
v18 = 0LL;
v19 = 0LL;
v20 = 0LL;
std::string::__init(&v18, "-4", 2LL);
memset(v21, 0, sizeof(v21));
std::string::__init(v21, "-nw", 3LL);
memset(v22, 0, sizeof(v22));
std::string::__init(v22, "--ignore-saved-leases", 21LL);
memset(v23, 0, sizeof(v23));
std::string::__init(v23, "-pf", 3LL);
v5 = (const char *)v17[2];
v24[2] = 0LL;
if ( (v17[0] & 1) == 0 )
v5 = (char *)v17 + 1;
v24[0] = 0LL;
v24[1] = 0LL;
v6 = strlen(v5);
std::string::__init(v24, v5, v6);
v7 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v7 = *(const char **)(a1 + 16);
memset(v25, 0, sizeof(v25));
v8 = strlen(v7);
std::string::__init(v25, v7, v8);
v4 = fnv::vnm::exec_program("/sbin/dhclient", (__int64)v14, (__int64)v15, (__int64)&v18, 6LL);
v9 = v25;
do
{
v10 = v9;
v9 -= 3;
std::string::~string(v10);
}
while ( v9 != v17 );
if ( !v4 )
goto LABEL_17;
v11 = "running dhclient";
}
v12 = v16;
if ( (v15[0] & 1) == 0 )
v12 = (char *)v15 + 1;
Logger::e((Logger *)qword_4D0C8, "error %s (%d) %s", v11, v4, v12);
v4 = 1002;
LABEL_17:
std::string::~string(v17);
LABEL_19:
std::string::~string(v15);
std::string::~string(v14);
return v4;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D0C8: using guessed type __int64 qword_4D0C8;
// 4D0D0: using guessed type __int64 qword_4D0D0;
// 4D0E8: using guessed type __int64 qword_4D0E8;
//----- (000000000001A664) ----------------------------------------------------
__int64 fnv::vnm::setDnsForDhcpServer()
{
Logger::e((Logger *)qword_4D0C8, "%s: Setting DNS-servers for DHCP-server mode not supported!", "setDnsForDhcpServer");
return 22LL;
}
// 4D0C8: using guessed type __int64 qword_4D0C8;
//----- (000000000001A698) ----------------------------------------------------
__int64 __fastcall fnv::vnm::setDhcpServerMode(unsigned __int8 *a1, unsigned __int8 *a2)
{
int v4; // w0
unsigned int v5; // w27
const char *v6; // x0
__int64 v7; // x0
__int64 *v8; // x1
const char *v9; // x27
size_t v10; // x0
const char *v11; // x27
size_t v12; // x0
int v13; // w0
const char *v14; // x20
size_t v15; // x0
__int64 *v16; // x19
__int64 *v17; // x0
const char *v18; // x2
char *v19; // x4
__int64 v21[3]; // [xsp+60h] [xbp+60h] BYREF
_QWORD v22[2]; // [xsp+78h] [xbp+78h] BYREF
char *v23; // [xsp+88h] [xbp+88h]
_QWORD v24[3]; // [xsp+90h] [xbp+90h] BYREF
__int64 v25[3]; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v26[3]; // [xsp+C0h] [xbp+C0h] BYREF
__int64 v27[3]; // [xsp+D8h] [xbp+D8h] BYREF
__int64 v28[3]; // [xsp+F0h] [xbp+F0h] BYREF
__int64 v29[3]; // [xsp+108h] [xbp+108h] BYREF
__int64 v30[3]; // [xsp+120h] [xbp+120h] BYREF
v4 = *a1;
memset(v21, 0, sizeof(v21));
v22[0] = 0LL;
v22[1] = 0LL;
v23 = 0LL;
if ( (v4 & 1) == 0 )
{
if ( !(v4 >> 1) )
goto LABEL_3;
v6 = (const char *)(a1 + 1);
LABEL_7:
if ( strcmp(v6, "mrvl_uap0") )
{
Logger::e((Logger *)qword_4D0C8, "error: not a valid n/w if");
goto LABEL_3;
}
sub_194D0((__int64)a1, (char *)a2, v24);
memset(v25, 0, sizeof(v25));
std::string::__init(v25, "/tmp/dhcpd.conf", 15LL);
v7 = *a2 >> 1;
if ( (*a2 & 1) != 0 )
v7 = *((_QWORD *)a2 + 1);
v8 = (__int64 *)a2;
if ( !v7 )
v8 = &qword_4D0D0;
v5 = fnv::vnm::setDhcpIdleMode((__int64)a1, (__int64)v8);
if ( v5 )
{
v18 = "ending any running daemon";
goto LABEL_28;
}
Logger::d((Logger *)qword_4D0E8, "%s: Using QNX Neutrino function spawn()", "setDhcpServerMode");
memset(v26, 0, sizeof(v26));
std::string::__init(v26, "-4", 2LL);
memset(v27, 0, sizeof(v27));
std::string::__init(v27, "-pf", 3LL);
v9 = (const char *)v24[2];
v28[2] = 0LL;
if ( (v24[0] & 1) == 0 )
v9 = (char *)v24 + 1;
v28[0] = 0LL;
v28[1] = 0LL;
v10 = strlen(v9);
std::string::__init(v28, v9, v10);
v11 = (const char *)(a1 + 1);
if ( (*a1 & 1) != 0 )
v11 = (const char *)*((_QWORD *)a1 + 2);
memset(v29, 0, sizeof(v29));
v12 = strlen(v11);
std::string::__init(v29, v11, v12);
v13 = *a2;
if ( (v13 & 1) != 0 )
{
if ( *((_QWORD *)a2 + 1) )
{
v14 = (const char *)*((_QWORD *)a2 + 2);
LABEL_23:
memset(v30, 0, sizeof(v30));
v15 = strlen(v14);
std::string::__init(v30, v14, v15);
v5 = fnv::vnm::exec_program("/usr/sbin/dhcpd", (__int64)v21, (__int64)v22, (__int64)v26, 5LL);
v16 = v30;
do
{
v17 = v16;
v16 -= 3;
std::string::~string(v17);
}
while ( v16 != v25 );
v18 = "running dhcp server - dhcpd";
if ( !v5 )
{
Logger::d((Logger *)qword_4D0E8, "running dhcp server - dhcpd", "running dhcp server - dhcpd");
LABEL_32:
std::string::~string(v25);
std::string::~string(v24);
goto LABEL_33;
}
LABEL_28:
v19 = v23;
if ( (v22[0] & 1) == 0 )
v19 = (char *)v22 + 1;
Logger::e((Logger *)qword_4D0C8, "error %s (%d) %s", v18, v5, v19);
v5 = 1002;
goto LABEL_32;
}
}
else
{
v14 = (const char *)(a2 + 1);
if ( v13 >> 1 )
goto LABEL_23;
}
v14 = "";
goto LABEL_23;
}
if ( *((_QWORD *)a1 + 1) )
{
v6 = (const char *)*((_QWORD *)a1 + 2);
goto LABEL_7;
}
LABEL_3:
v5 = 22;
LABEL_33:
std::string::~string(v22);
std::string::~string(v21);
return v5;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D0C8: using guessed type __int64 qword_4D0C8;
// 4D0D0: using guessed type __int64 qword_4D0D0;
// 4D0E8: using guessed type __int64 qword_4D0E8;
//----- (000000000001A9FC) ----------------------------------------------------
__int64 __fastcall fnv::vnm::clearIpAddress(__int64 a1)
{
unsigned __int8 v2; // w0
__int64 v3; // x1
__int64 result; // x0
unsigned int IfaceFlags; // w19
const char *v6; // x3
const char *v7; // x2
__int64 v8; // [xsp+40h] [xbp+40h] BYREF
v2 = *(_BYTE *)a1;
v3 = v2 >> 1;
if ( (v2 & 1) != 0 )
v3 = *(_QWORD *)(a1 + 8);
result = 22LL;
if ( v3 )
{
v8 = 0LL;
IfaceFlags = fnv::vnm::GetIfaceFlags((unsigned __int8 *)a1, &v8, 0LL);
if ( IfaceFlags )
{
v6 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v6 = *(const char **)(a1 + 16);
Logger::e((Logger *)qword_4D0C8, "%s: Not recognizing interface [%s].", "clearIpAddress", v6);
return IfaceFlags;
}
IfaceFlags = fnv::vnm::setDhcpIdleMode(a1, (__int64)&qword_4D0D0);
if ( IfaceFlags )
{
v7 = "clearIpAddress, ending any running daemon";
goto LABEL_14;
}
IfaceFlags = fnv::vnm::DelIfaceAddr(a1, 0LL);
if ( IfaceFlags == 249 )
{
Logger::i((Logger *)qword_4D0E8, "Attempt to clear IP address failed. Probably already no IP. Ignore.");
return 0LL;
}
result = 0LL;
if ( IfaceFlags )
{
v7 = "Clearing addresses";
LABEL_14:
Logger::e((Logger *)qword_4D0C8, "error %s (%d)", v7, IfaceFlags);
return IfaceFlags;
}
}
return result;
}
// 4D0C8: using guessed type __int64 qword_4D0C8;
// 4D0D0: using guessed type __int64 qword_4D0D0;
// 4D0E8: using guessed type __int64 qword_4D0E8;
//----- (000000000001AB38) ----------------------------------------------------
__int64 __fastcall fnv::vnm::setStaticIpAddress(__int64 a1, __int64 a2)
{
unsigned __int8 v4; // w1
__int64 v5; // x0
__int64 v6; // x0
unsigned int v7; // w21
unsigned int v9; // w20
const char *v10; // x2
__int64 v11[3]; // [xsp+40h] [xbp+40h] BYREF
v4 = *(_BYTE *)a1;
memset(v11, 0, sizeof(v11));
v5 = v4 >> 1;
if ( (v4 & 1) != 0 )
v5 = *(_QWORD *)(a1 + 8);
if ( v5 )
{
v6 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v6 = *(_QWORD *)(a2 + 8);
if ( v6 )
{
v9 = fnv::vnm::setDhcpIdleMode(a1, (__int64)&qword_4D0D0);
if ( v9 )
{
v10 = (const char *)&unk_31162;
}
else
{
v9 = fnv::vnm::SetIfaceAddr(a1, (char *)a2, 0LL);
v7 = 0;
if ( !v9 )
goto LABEL_8;
v10 = "Setting address";
}
Logger::e((Logger *)qword_4D0C8, "error %s (%d) %s", v10, v9, (char *)v11 + 1);
v7 = v9;
goto LABEL_8;
}
}
Logger::e((Logger *)qword_4D0C8, "%s: both parameters must be non-empty", "setStaticIpAddress");
v7 = 22;
LABEL_8:
std::string::~string(v11);
return v7;
}
// 1AC60: conditional instruction was optimized away because %var_20.1==0
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D0C8: using guessed type __int64 qword_4D0C8;
// 4D0D0: using guessed type __int64 qword_4D0D0;
//----- (000000000001AC84) ----------------------------------------------------
__int64 __fastcall fnv::vnm::RemoveNat(__int64 a1)
{
unsigned int v2; // w24
const char *v3; // x2
const char *v4; // x2
void *v5; // x25
int v6; // w25
const char *v7; // x2
unsigned int v8; // w19
const char *v9; // x2
char *v11; // x4
char *v12; // x2
char *v13; // [xsp+50h] [xbp+50h] BYREF
_QWORD v14[2]; // [xsp+58h] [xbp+58h] BYREF
char *v15; // [xsp+68h] [xbp+68h]
__int64 v16[2]; // [xsp+70h] [xbp+70h] BYREF
char *v17; // [xsp+80h] [xbp+80h]
__int64 v18[3]; // [xsp+88h] [xbp+88h] BYREF
_BYTE v19[24]; // [xsp+A0h] [xbp+A0h] BYREF
v13 = 0LL;
v14[0] = 0LL;
v14[1] = 0LL;
v15 = 0LL;
v16[0] = 0LL;
v16[1] = 0LL;
v17 = 0LL;
memset(v18, 0, sizeof(v18));
std::string::__init(v18, "nat_vnm", 7LL);
v2 = fnv::vnm::PfOpenNatAnchor(&v13, (char *)v18);
std::string::~string(v18);
if ( v2 )
{
Logger::e((Logger *)qword_4D0C8, "ERROR PfOpenNatAnchor nat_vnm, rc=%d", v2);
v3 = "Opening PF nat_vnm context";
}
else
{
v2 = fnv::vnm::PfRemoveNatAnchorRule(v13, a1);
if ( !v2 )
goto LABEL_4;
Logger::e((Logger *)qword_4D0C8, "ERROR PfRemoveNatAnchorRule, rc=%d", v2);
v3 = "Remove PF NAT Anchor Rule";
}
v11 = v15;
if ( (v14[0] & 1) == 0 )
v11 = (char *)v14 + 1;
Logger::e((Logger *)qword_4D0C8, "%s (%d) %s", v3, v2, v11);
v12 = v17;
if ( (v16[0] & 1) == 0 )
v12 = (char *)v16 + 1;
Logger::e((Logger *)qword_4D0C8, "%s", v12);
LABEL_4:
if ( (*(_BYTE *)a1 & 1) != 0 )
v4 = *(const char **)(a1 + 16);
else
v4 = (const char *)(a1 + 1);
Logger::i((Logger *)qword_4D0E8, "RemoveNat: please remove: [%s].", v4);
v5 = fnv::vnm::pNatMap;
if ( fnv::vnm::pNatMap
&& (std::string::basic_string(v19, a1),
v6 = (unsigned __int8)fnv::vnm::CompositeConfig::remove((__int64)v5, (__int64)v19),
std::string::~string(v19),
v6) )
{
v7 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v7 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D0E8, "RemoveNat [%s] successful.", v7);
v8 = 0;
}
else
{
v9 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v9 = *(const char **)(a1 + 16);
Logger::e((Logger *)qword_4D0C8, "RemoveNat: not found: [%s].", v9);
v8 = 2;
}
std::string::~string(v16);
std::string::~string(v14);
return v8;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D020: using guessed type void *fnv::vnm::pNatMap;
// 4D0C8: using guessed type __int64 qword_4D0C8;
// 4D0E8: using guessed type __int64 qword_4D0E8;
//----- (000000000001AEDC) ----------------------------------------------------
__int64 __fastcall fnv::vnm::LogWorthy(__int64 a1, const char *a2, unsigned int a3, __int64 a4)
{
char *v8; // x0
char *v9; // x0
size_t v10; // x0
_QWORD *v11; // x0
__int64 v12; // x3
__int64 *v13; // x0
__int64 v14; // x3
int v15; // w1
_BYTE *v16; // x1
__int64 v17; // x2
__int64 *v18; // x0
__int64 v19; // x3
unsigned int v20; // w23
__int64 v22; // [xsp+50h] [xbp+50h] BYREF
__int64 v23; // [xsp+58h] [xbp+58h] BYREF
char *v24; // [xsp+60h] [xbp+60h] BYREF
char *v25; // [xsp+68h] [xbp+68h]
char *v26; // [xsp+70h] [xbp+70h]
char *v27; // [xsp+78h] [xbp+78h] BYREF
char *v28; // [xsp+80h] [xbp+80h]
char *v29; // [xsp+88h] [xbp+88h]
__int64 v30[3]; // [xsp+90h] [xbp+90h] BYREF
_QWORD v31[3]; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v32[2]; // [xsp+C0h] [xbp+C0h] BYREF
__int64 v33; // [xsp+D0h] [xbp+D0h]
unsigned __int8 v34; // [xsp+D8h] [xbp+D8h] BYREF
_BYTE v35[15]; // [xsp+D9h] [xbp+D9h] BYREF
_BYTE *v36; // [xsp+E8h] [xbp+E8h]
__int64 v37[8]; // [xsp+F0h] [xbp+F0h] BYREF
fnv::analytics::DiagnosticEvent::Builder::Builder(&v22, 8240LL);
fnv::analytics::DiagnosticEvent::Builder::setDescription(&v22, a1);
v24 = 0LL;
v25 = 0LL;
v26 = 0LL;
v8 = (char *)operator new(4uLL);
v24 = v8;
v25 = v8 + 4;
*(_DWORD *)v8 = 1;
v26 = v8 + 4;
fnv::analytics::DiagnosticEvent::Builder::addLogSets(&v22, &v24);
std::__vector_base<fnv_analytics_logset_e>::~__vector_base(&v24);
v29 = 0LL;
v27 = 0LL;
v28 = 0LL;
v9 = (char *)operator new(4uLL);
v27 = v9;
v28 = v9 + 4;
*(_DWORD *)v9 = 4104;
v29 = v9 + 4;
fnv::analytics::DiagnosticEvent::Builder::addLogs(&v22, &v27);
std::__vector_base<fnv_analytics_log_e>::~__vector_base(&v27);
memset(v30, 0, sizeof(v30));
v10 = strlen(a2);
std::string::__init(v30, a2, v10);
v11 = (_QWORD *)std::string::insert(v30, 0LL, "SYNC:");
v12 = v11[1];
v31[0] = *v11;
v31[1] = v12;
v31[2] = v11[2];
*v11 = 0LL;
v11[1] = 0LL;
v11[2] = 0LL;
v13 = (__int64 *)std::string::append(v31, ":");
v14 = v13[1];
v32[0] = *v13;
v32[1] = v14;
v33 = v13[2];
v15 = v33;
*v13 = 0LL;
v13[1] = 0LL;
v13[2] = 0LL;
std::to_string((std::__1 *)a3, v15);
if ( (v34 & 1) != 0 )
{
v17 = *(_QWORD *)&v35[7];
v16 = v36;
}
else
{
v17 = v34 >> 1;
v16 = v35;
}
v18 = (__int64 *)std::string::append(v32, v16, v17);
v19 = v18[1];
v37[0] = *v18;
v37[1] = v19;
v37[2] = v18[2];
*v18 = 0LL;
v18[1] = 0LL;
v18[2] = 0LL;
fnv::analytics::DiagnosticEvent::Builder::addAttribute(&v22, v37, a4, 0LL);
std::string::~string(v37);
std::string::~string(&v34);
std::string::~string(v32);
std::string::~string(v31);
std::string::~string(v30);
fnv::analytics::DiagnosticEvent::Builder::build((fnv::analytics::DiagnosticEvent::Builder *)&v22);
v37[4] = 0LL;
v20 = fnv::analytics::DiagnosticEvent::sendAsync(&v23, v37, 0LL);
std::function<void ()(fnv_analytics_event_info_t)>::~function((__int64)v37);
fnv::analytics::DiagnosticEvent::~DiagnosticEvent((fnv::analytics::DiagnosticEvent *)&v23);
Logger::d((Logger *)qword_4D0E8, "logworthy async send has status %d.", v20);
fnv::analytics::DiagnosticEvent::Builder::~Builder((fnv::analytics::DiagnosticEvent::Builder *)&v22);
return v37[7] ^ _stack_chk_guard;
}
// 13320: using guessed type __int64 __fastcall fnv::analytics::DiagnosticEvent::sendAsync(_QWORD, _QWORD, _QWORD);
// 135A0: using guessed type __int64 __fastcall fnv::analytics::DiagnosticEvent::Builder::Builder(_QWORD, _QWORD);
// 135D0: using guessed type __int64 __fastcall fnv::analytics::DiagnosticEvent::Builder::setDescription(_QWORD, _QWORD);
// 13640: using guessed type __int64 __fastcall fnv::analytics::DiagnosticEvent::Builder::addLogs(_QWORD, _QWORD);
// 138B0: using guessed type __int64 __fastcall std::string::insert(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 13BA0: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD);
// 13BE0: using guessed type __int64 __fastcall fnv::analytics::DiagnosticEvent::Builder::addLogSets(_QWORD, _QWORD);
// 13BF0: using guessed type __int64 __fastcall fnv::analytics::DiagnosticEvent::Builder::addAttribute(_QWORD, _QWORD, _QWORD, _QWORD);
// 4D0E8: using guessed type __int64 qword_4D0E8;
//----- (000000000001B1E8) ----------------------------------------------------
void __fastcall fnv::vnm::DnsForwardEntry::~DnsForwardEntry(void **this)
{
*this = &unk_4C298;
std::__vector_base<fnv::vnm::DnsForwardEntry::DnsRouteProps>::~__vector_base(this + 18);
std::__vector_base<fnv::vnm::DnsForwardEntry::DnsRouteProps>::~__vector_base(this + 15);
std::__vector_base<fnv::vnm::DnsForwardEntry::DnsAddrProps>::~__vector_base(this + 12);
std::__vector_base<fnv::vnm::DnsForwardEntry::DnsAddrProps>::~__vector_base(this + 9);
fnv::vnm::ConfigElement::~ConfigElement((fnv::vnm::ConfigElement *)this);
}
//----- (000000000001B234) ----------------------------------------------------
void __fastcall fnv::vnm::DnsForwardEntry::~DnsForwardEntry(void **this)
{
fnv::vnm::DnsForwardEntry::~DnsForwardEntry(this);
operator delete(this);
}
//----- (000000000001B258) ----------------------------------------------------
void __fastcall fnv::vnm::Bind9DnsForwardEntry::~Bind9DnsForwardEntry(void **this)
{
*this = off_4C2D8;
fnv::vnm::DnsForwardEntry::~DnsForwardEntry(this);
}
// 4C2D8: using guessed type void (__fastcall *[2])(fnv::vnm::Bind9DnsForwardEntry *__hidden this);
//----- (000000000001B26C) ----------------------------------------------------
void __fastcall fnv::vnm::Bind9DnsForwardEntry::~Bind9DnsForwardEntry(void **this)
{
fnv::vnm::Bind9DnsForwardEntry::~Bind9DnsForwardEntry(this);
operator delete(this);
}
//----- (000000000001B290) ----------------------------------------------------
__int64 __fastcall fnv::vnm::JournalEntry::JournalEntry(__int64 a1, __int64 a2)
{
fnv::vnm::JournalPrefix *v4; // x0
unsigned __int64 v5; // x1
unsigned __int64 v6; // x0
__int64 v7; // x1
__int64 v8; // x20
_BYTE *v9; // x20
_BYTE *v10; // x0
unsigned int v11; // w19
const char *v12; // x0
int v13; // w19
__int64 v14; // x0
char *v15; // x2
fnv::vnm::JournalPrefix *v16; // x0
fnv::vnm::JournalPrefix *v17; // x0
const char *v18; // x0
__int64 v19; // x0
unsigned __int64 v20; // x0
unsigned __int64 v21; // x1
__int64 v22; // x2
_BYTE *v23; // x20
_BYTE *v24; // x1
bool v25; // zf
const char *v26; // x2
int v27; // w20
const char *v28; // x0
__int64 v29; // x0
int v30; // w27
int v32; // w0
char *v33; // x5
signed int v34; // w23
long double v35; // q0
char *v37; // x2
int v39; // [xsp+64h] [xbp+64h]
__int64 v40; // [xsp+70h] [xbp+70h] BYREF
_BYTE v41[24]; // [xsp+78h] [xbp+78h] BYREF
_QWORD v42[2]; // [xsp+90h] [xbp+90h] BYREF
const char *v43; // [xsp+A0h] [xbp+A0h]
_BYTE v44[24]; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v45[3]; // [xsp+C0h] [xbp+C0h] BYREF
__int64 v46; // [xsp+D8h] [xbp+D8h] BYREF
__int64 v47; // [xsp+E0h] [xbp+E0h]
char *v48; // [xsp+E8h] [xbp+E8h]
_QWORD v49[3]; // [xsp+F0h] [xbp+F0h] BYREF
_QWORD v50[3]; // [xsp+108h] [xbp+108h] BYREF
__int64 v51; // [xsp+120h] [xbp+120h] BYREF
__int64 v52; // [xsp+128h] [xbp+128h]
char *v53; // [xsp+130h] [xbp+130h]
__int64 v54; // [xsp+138h] [xbp+138h]
fnv::vnm::ConfigElement::ConfigElement(a1, a2);
*(_QWORD *)a1 = off_4C318;
v4 = (fnv::vnm::JournalPrefix *)fnv::vnm::JournalPrefix::instance((fnv::vnm::JournalPrefix *)off_4C318);
fnv::vnm::JournalPrefix::getPath(v4, (__int64)v41);
std::operator+<char>((__int64)v41, a2, v42);
v5 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v5 = *(_QWORD *)(a2 + 8);
if ( v5 <= 1 )
{
v11 = 0;
}
else
{
if ( (*(_BYTE *)a2 & 1) != 0 )
{
v6 = *(_QWORD *)(a2 + 8);
v7 = *(_QWORD *)(a2 + 16);
}
else
{
v7 = a2 + 1;
v6 = *(_BYTE *)a2 >> 1;
}
v8 = -1LL;
if ( v6 > 1 )
{
v9 = (_BYTE *)(v7 + 1);
v10 = (_BYTE *)(v7 + v6);
while ( 1 )
{
if ( v9 == v10 )
{
v8 = -1LL;
goto LABEL_13;
}
if ( *v9 == 47 )
break;
++v9;
}
v8 = (__int64)&v9[-v7];
}
LABEL_13:
v11 = 0;
v48 = 0LL;
v46 = 0LL;
v47 = 0LL;
LABEL_14:
while ( v8 != -1 )
{
std::string::basic_string(&v51, a2, 0LL, v8, a2);
if ( (v46 & 1) != 0 )
{
*v48 = 0;
v47 = 0LL;
}
else
{
LOWORD(v46) = 0;
}
std::string::reserve(&v46, 0LL);
v46 = v51;
v47 = v52;
v48 = v53;
v51 = 0LL;
v52 = 0LL;
v53 = 0LL;
std::string::~string(&v51);
std::operator+<char>((__int64)v41, (__int64)&v46, v50);
v12 = (const char *)v50[2];
if ( (v50[0] & 1) == 0 )
v12 = (char *)v50 + 1;
v13 = mkdir(v12, 0x1C0u);
v14 = std::string::~string(v50);
if ( v13 )
v11 = *(_DWORD *)__get_errno_ptr(v14);
else
v11 = 0;
v15 = v48;
if ( (v46 & 1) == 0 )
v15 = (char *)&v46 + 1;
v16 = (fnv::vnm::JournalPrefix *)Logger::d((Logger *)qword_4D0E8, "mkdir %s %d", v15, v11);
if ( v11 == 2 )
{
v17 = (fnv::vnm::JournalPrefix *)fnv::vnm::JournalPrefix::instance(v16);
if ( !(unsigned int)fnv::vnm::JournalPrefix::makeJournalDir(v17) )
goto LABEL_27;
std::operator+<char>((__int64)v41, (__int64)&v46, v49);
v18 = (const char *)v49[2];
if ( (v49[0] & 1) == 0 )
v18 = (char *)v49 + 1;
v39 = mkdir(v18, 0x1C0u);
v19 = std::string::~string(v49);
if ( v39 )
v11 = *(_DWORD *)__get_errno_ptr(v19);
else
LABEL_27:
v11 = 0;
}
v20 = v8 + 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
{
v21 = *(_QWORD *)(a2 + 8);
v22 = *(_QWORD *)(a2 + 16);
}
else
{
v22 = a2 + 1;
v21 = *(_BYTE *)a2 >> 1;
}
v8 = -1LL;
if ( v20 < v21 )
{
v23 = (_BYTE *)(v22 + v20);
v24 = (_BYTE *)(v22 + v21);
while ( 1 )
{
if ( v24 == v23 )
{
v8 = -1LL;
goto LABEL_14;
}
if ( *v23 == 47 )
break;
++v23;
}
v8 = (__int64)&v23[-v22];
}
}
std::string::~string(&v46);
}
if ( v11 )
v25 = v11 == 17;
else
v25 = 1;
if ( v25 )
{
v27 = 0;
do
{
++v27;
v28 = v43;
if ( (v42[0] & 1) == 0 )
v28 = (char *)v42 + 1;
v29 = open(v28, 8449, 384LL);
v30 = v29;
v11 = 0;
if ( (_DWORD)v29 == -1 )
v11 = *(_DWORD *)__get_errno_ptr(v29);
if ( v27 <= 2 && v11 == 22 )
{
std::operator+<char>("Problem opening ", v42);
memset(v45, 0, sizeof(v45));
std::string::__init(v45, "JournalEntryFailure: EINVAL", 27LL);
fnv::vnm::LogWorthy((__int64)v44, "vnm_common.cpp", 0x1BDu, (__int64)v45);
std::string::~string(v45);
std::string::~string(v44);
v32 = rand();
v33 = (char *)v43;
v34 = v32 % 490 + 10;
if ( (v42[0] & 1) == 0 )
v33 = (char *)v42 + 1;
Logger::e(
(Logger *)qword_4D0C8,
"%s: (%d/%d) Failed to open %s with EINVAL, retrying in %d ms",
"JournalEntry",
(unsigned int)v27,
3LL,
v33,
(unsigned int)v34);
if ( v34 > 0 )
{
*(__n128 *)&v35 = sub_2C3C8(v34);
if ( (sub_2C250(v35, *(long double *)&xmmword_1B7F0) & 0x80000000) != 0 )
v40 = 1000000LL * v34;
else
v40 = 0x7FFFFFFFFFFFFFFFLL;
std::this_thread::sleep_for(&v40);
}
}
}
while ( v11 == 22 && v27 <= 2 );
close(v30);
if ( v30 == -1 )
{
v37 = (char *)v43;
if ( (v42[0] & 1) == 0 )
v37 = (char *)v42 + 1;
Logger::e((Logger *)qword_4D0C8, "Issue with journal file [%s] (%d)", v37, v11);
}
if ( !v11 )
{
*(_BYTE *)(a1 + 8) = 1;
goto LABEL_77;
}
v26 = "Opening journal file";
}
else
{
v26 = "Ensuring journal dir";
}
Logger::e((Logger *)qword_4D0C8, "%s (%d)", v26, v11);
*(_DWORD *)(a1 + 12) = v11;
LABEL_77:
std::string::~string(v42);
std::string::~string(v41);
return v54 ^ _stack_chk_guard;
}
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A30: using guessed type __int64 __fastcall std::string::reserve(_QWORD, _QWORD);
// 13A80: using guessed type __int64 __fastcall std::this_thread::sleep_for(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 1B7F0: using guessed type __int128 xmmword_1B7F0;
// 4C318: using guessed type void (__fastcall *off_4C318[2])(fnv::vnm::JournalEntry *__hidden this);
// 4D0C8: using guessed type __int64 qword_4D0C8;
// 4D0E8: using guessed type __int64 qword_4D0E8;
//----- (000000000001B800) ----------------------------------------------------
_QWORD *__fastcall fnv::vnm::DnsForwardEntry::DnsForwardEntry(_QWORD *a1, __int64 *a2)
{
fnv::vnm::ConfigElement::ConfigElement((__int64)a1, (__int64)a2);
*a1 = &unk_4C298;
std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::vector(a1 + 9, a2 + 9);
std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::vector(a1 + 12, a2 + 12);
std::vector<fnv::vnm::DnsForwardEntry::DnsRouteProps>::vector(a1 + 15, a2 + 15);
return std::vector<fnv::vnm::DnsForwardEntry::DnsRouteProps>::vector(a1 + 18, a2 + 18);
}
//----- (000000000001B8C4) ----------------------------------------------------
void (__fastcall **__fastcall fnv::vnm::Bind9DnsForwardEntry::Bind9DnsForwardEntry(
_QWORD *a1,
__int64 *a2))(fnv::vnm::Bind9DnsForwardEntry *__hidden this)
{
void (__fastcall **result)(fnv::vnm::Bind9DnsForwardEntry *__hidden); // x0
fnv::vnm::DnsForwardEntry::DnsForwardEntry(a1, a2);
result = off_4C2D8;
*a1 = off_4C2D8;
return result;
}
// 4C2D8: using guessed type void (__fastcall *off_4C2D8[2])(fnv::vnm::Bind9DnsForwardEntry *__hidden this);
//----- (000000000001B8F4) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::Bind9DnsForwardEntry::moveMe@<X0>(
fnv::vnm::Bind9DnsForwardEntry *this@<X0>,
_QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0xA8uLL);
fnv::vnm::Bind9DnsForwardEntry::Bind9DnsForwardEntry(v4, (__int64 *)this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (000000000001B984) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DnsForwardEntry::addAddress(__int64 *a1, __int64 a2, int a3)
{
unsigned __int64 v5; // x22
_BYTE v7[24]; // [xsp+48h] [xbp+48h] BYREF
int v8; // [xsp+60h] [xbp+60h]
__int64 v9; // [xsp+68h] [xbp+68h]
std::string::basic_string(v7, a2);
v8 = a3;
std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::assign<fnv::vnm::DnsForwardEntry::DnsAddrProps*>(
(__int64)(a1 + 12),
a1[9],
a1[10]);
v5 = a1[10];
if ( v5 >= a1[11] )
{
std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__emplace_back_slow_path<fnv::vnm::DnsForwardEntry::DnsAddrProps&>(
a1 + 9,
(__int64)v7);
}
else
{
if ( v5 )
{
std::string::basic_string(a1[10], v7);
*(_DWORD *)(v5 + 24) = v8;
}
a1[10] += 32LL;
}
std::string::~string(v7);
return v9 ^ _stack_chk_guard;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001BA64) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DnsForwardEntry::rollback(fnv::vnm::DnsForwardEntry *this)
{
__int64 *v2; // x19
__int64 v3; // x20
__int64 v4; // x0
__int64 v5; // x0
v2 = (__int64 *)((char *)this + 96);
std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::assign<fnv::vnm::DnsForwardEntry::DnsAddrProps*>(
(__int64)this + 72,
*((_QWORD *)this + 12),
*((_QWORD *)this + 13));
v3 = *((_QWORD *)this + 12);
while ( 1 )
{
v4 = v2[1];
if ( v3 == v4 )
break;
v5 = v4 - 32;
v2[1] = v5;
std::string::~string(v5);
}
return std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::shrink_to_fit(v2);
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001BAB8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DnsForwardEntry::commit(fnv::vnm::DnsForwardEntry *this)
{
__int64 v1; // x20
__int64 v3; // x1
v1 = *((_QWORD *)this + 12);
while ( 1 )
{
v3 = *((_QWORD *)this + 13);
if ( v1 == v3 )
break;
*((_QWORD *)this + 13) = v3 - 32;
std::string::~string(v3 - 32);
}
return std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::shrink_to_fit((__int64 *)this + 12);
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001BAFC) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ListConnections(_QWORD *a1)
{
__int64 v2; // x19
_QWORD *v3; // x0
char *v4; // x1
char v5; // w0
_QWORD *v6; // x21
__int64 v7; // x0
unsigned int v8; // w22
_QWORD *v9; // x22
_QWORD *v10; // x1
_QWORD *v11; // x21
_QWORD *v12; // x27
__int64 v13; // x0
unsigned int v14; // w28
char v16; // [xsp+67h] [xbp+67h] BYREF
__int64 v17; // [xsp+68h] [xbp+68h] BYREF
_BYTE v18[32]; // [xsp+70h] [xbp+70h] BYREF
if ( fnv::vnm::pConnectionMap )
{
v2 = fnv::vnm::CompositeConfig::count((fnv::vnm::CompositeConfig *)fnv::vnm::pConnectionMap);
v3 = (_QWORD *)std::ostream::operator<<(a1, v2);
if ( v2 == 1 )
v4 = " connection";
else
v4 = " connections";
std::operator<<<std::char_traits<char>>(v3, v4);
if ( v2 )
v5 = 58;
else
v5 = 46;
v16 = v5;
v6 = std::__put_character_sequence<char,std::char_traits<char>>(a1, (__int64)&v16, 1LL);
std::ios_base::getloc((std::ios_base *)((char *)v6 + *(_QWORD *)(*v6 - 24LL)));
v7 = std::locale::use_facet(&v17, &std::ctype<char>::id);
v8 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 56LL))(v7, 10LL);
std::locale::~locale((std::locale *)&v17);
std::ostream::put(v6, v8);
std::ostream::flush(v6);
v9 = (_QWORD *)fnv::vnm::CompositeConfig::begin((fnv::vnm::CompositeConfig *)fnv::vnm::pConnectionMap);
v11 = v10;
while ( !fnv::vnm::CompositeConfig::isEnd((__int64)fnv::vnm::pConnectionMap, (__int64)v9, (__int64)v11) )
{
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)*v11 + 32LL))(*v11);
v12 = std::operator<<<char>(a1, (__int64)v18);
std::ios_base::getloc((std::ios_base *)((char *)v12 + *(_QWORD *)(*v12 - 24LL)));
v13 = std::locale::use_facet(&v17, &std::ctype<char>::id);
v14 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v13 + 56LL))(v13, 10LL);
std::locale::~locale((std::locale *)&v17);
std::ostream::put(v12, v14);
std::ostream::flush(v12);
++v11;
std::string::~string(v18);
if ( (unsigned __int64)v11 - *v9 - 4096 <= 7 )
{
v11 = (_QWORD *)v9[1];
++v9;
}
}
}
return *(_QWORD *)&v18[24] ^ _stack_chk_guard;
}
// 1BC08: variable 'v10' is possibly undefined
// 132F0: using guessed type __int64 __fastcall std::ostream::operator<<(_QWORD, _QWORD);
// 134E0: using guessed type __int64 __fastcall std::ostream::put(_QWORD, _QWORD);
// 135C0: using guessed type __int64 __fastcall std::ostream::flush(_QWORD);
// 136F0: using guessed type __int64 __fastcall std::locale::use_facet(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D018: using guessed type void *fnv::vnm::pConnectionMap;
//----- (000000000001BD3C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ListInterfaces(_QWORD *a1)
{
__int64 v2; // x19
_QWORD *v3; // x0
char *v4; // x1
char v5; // w0
_QWORD *v6; // x23
__int64 v7; // x0
unsigned int v8; // w24
fnv::vnm::CompositeConfig *v9; // x23
_QWORD *v10; // x24
_QWORD *v11; // x1
_QWORD *v12; // x21
_QWORD *v13; // x1
_QWORD *v14; // x26
_QWORD *v15; // x27
__int64 v16; // x0
unsigned int v17; // w28
char v19; // [xsp+67h] [xbp+67h] BYREF
__int64 v20; // [xsp+68h] [xbp+68h] BYREF
_BYTE v21[32]; // [xsp+70h] [xbp+70h] BYREF
if ( fnv::vnm::pIfaceMap )
{
v2 = fnv::vnm::CompositeConfig::count((fnv::vnm::CompositeConfig *)fnv::vnm::pIfaceMap);
v3 = (_QWORD *)std::ostream::operator<<(a1, v2);
if ( v2 == 1 )
v4 = " interface";
else
v4 = " interfaces";
std::operator<<<std::char_traits<char>>(v3, v4);
if ( v2 )
v5 = 58;
else
v5 = 46;
v19 = v5;
v6 = std::__put_character_sequence<char,std::char_traits<char>>(a1, (__int64)&v19, 1LL);
std::ios_base::getloc((std::ios_base *)((char *)v6 + *(_QWORD *)(*v6 - 24LL)));
v7 = std::locale::use_facet(&v20, &std::ctype<char>::id);
v8 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 56LL))(v7, 10LL);
std::locale::~locale((std::locale *)&v20);
std::ostream::put(v6, v8);
std::ostream::flush(v6);
v9 = (fnv::vnm::CompositeConfig *)fnv::vnm::pIfaceMap;
v10 = (_QWORD *)fnv::vnm::CompositeConfig::begin((fnv::vnm::CompositeConfig *)fnv::vnm::pIfaceMap);
v12 = v11;
fnv::vnm::CompositeConfig::end(v9);
v14 = v13;
while ( v12 != v14 )
{
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)*v12 + 32LL))(*v12);
v15 = std::operator<<<char>(a1, (__int64)v21);
std::ios_base::getloc((std::ios_base *)((char *)v15 + *(_QWORD *)(*v15 - 24LL)));
v16 = std::locale::use_facet(&v20, &std::ctype<char>::id);
v17 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v16 + 56LL))(v16, 10LL);
std::locale::~locale((std::locale *)&v20);
std::ostream::put(v15, v17);
std::ostream::flush(v15);
++v12;
std::string::~string(v21);
if ( (unsigned __int64)v12 - *v10 - 4096 <= 7 )
{
v12 = (_QWORD *)v10[1];
++v10;
}
}
}
return *(_QWORD *)&v21[24] ^ _stack_chk_guard;
}
// 1BE4C: variable 'v11' is possibly undefined
// 1BE58: variable 'v13' is possibly undefined
// 132F0: using guessed type __int64 __fastcall std::ostream::operator<<(_QWORD, _QWORD);
// 134E0: using guessed type __int64 __fastcall std::ostream::put(_QWORD, _QWORD);
// 135C0: using guessed type __int64 __fastcall std::ostream::flush(_QWORD);
// 136F0: using guessed type __int64 __fastcall std::locale::use_facet(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D038: using guessed type void *fnv::vnm::pIfaceMap;
//----- (000000000001BF78) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ListRules(_QWORD *a1)
{
__int64 v2; // x19
_QWORD *v3; // x0
char *v4; // x1
char v5; // w0
_QWORD *v6; // x23
__int64 v7; // x0
unsigned int v8; // w24
fnv::vnm::CompositeConfig *v9; // x23
_QWORD *v10; // x24
_QWORD *v11; // x1
_QWORD *v12; // x21
_QWORD *v13; // x1
_QWORD *v14; // x26
_QWORD *v15; // x27
__int64 v16; // x0
unsigned int v17; // w28
char v19; // [xsp+67h] [xbp+67h] BYREF
__int64 v20; // [xsp+68h] [xbp+68h] BYREF
_BYTE v21[32]; // [xsp+70h] [xbp+70h] BYREF
if ( fnv::vnm::pRouteMap )
{
v2 = fnv::vnm::CompositeConfig::count((fnv::vnm::CompositeConfig *)fnv::vnm::pRouteMap);
v3 = (_QWORD *)std::ostream::operator<<(a1, v2);
if ( v2 == 1 )
v4 = " rule";
else
v4 = " rules";
std::operator<<<std::char_traits<char>>(v3, v4);
if ( v2 )
v5 = 58;
else
v5 = 46;
v19 = v5;
v6 = std::__put_character_sequence<char,std::char_traits<char>>(a1, (__int64)&v19, 1LL);
std::ios_base::getloc((std::ios_base *)((char *)v6 + *(_QWORD *)(*v6 - 24LL)));
v7 = std::locale::use_facet(&v20, &std::ctype<char>::id);
v8 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 56LL))(v7, 10LL);
std::locale::~locale((std::locale *)&v20);
std::ostream::put(v6, v8);
std::ostream::flush(v6);
v9 = (fnv::vnm::CompositeConfig *)fnv::vnm::pRouteMap;
v10 = (_QWORD *)fnv::vnm::CompositeConfig::begin((fnv::vnm::CompositeConfig *)fnv::vnm::pRouteMap);
v12 = v11;
fnv::vnm::CompositeConfig::end(v9);
v14 = v13;
while ( v12 != v14 )
{
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)*v12 + 32LL))(*v12);
v15 = std::operator<<<char>(a1, (__int64)v21);
std::ios_base::getloc((std::ios_base *)((char *)v15 + *(_QWORD *)(*v15 - 24LL)));
v16 = std::locale::use_facet(&v20, &std::ctype<char>::id);
v17 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v16 + 56LL))(v16, 10LL);
std::locale::~locale((std::locale *)&v20);
std::ostream::put(v15, v17);
std::ostream::flush(v15);
++v12;
std::string::~string(v21);
if ( (unsigned __int64)v12 - *v10 - 4096 <= 7 )
{
v12 = (_QWORD *)v10[1];
++v10;
}
}
}
return *(_QWORD *)&v21[24] ^ _stack_chk_guard;
}
// 1C088: variable 'v11' is possibly undefined
// 1C094: variable 'v13' is possibly undefined
// 132F0: using guessed type __int64 __fastcall std::ostream::operator<<(_QWORD, _QWORD);
// 134E0: using guessed type __int64 __fastcall std::ostream::put(_QWORD, _QWORD);
// 135C0: using guessed type __int64 __fastcall std::ostream::flush(_QWORD);
// 136F0: using guessed type __int64 __fastcall std::locale::use_facet(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D030: using guessed type void *fnv::vnm::pRouteMap;
//----- (000000000001C1B4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ListDns(_QWORD *a1)
{
__int64 v2; // x19
_QWORD *v3; // x0
char *v4; // x1
char v5; // w0
_QWORD *v6; // x23
__int64 v7; // x0
unsigned int v8; // w24
fnv::vnm::CompositeConfig *v9; // x23
_QWORD *v10; // x24
_QWORD *v11; // x1
_QWORD *v12; // x21
_QWORD *v13; // x1
_QWORD *v14; // x26
_QWORD *v15; // x27
__int64 v16; // x0
unsigned int v17; // w28
char v19; // [xsp+67h] [xbp+67h] BYREF
__int64 v20; // [xsp+68h] [xbp+68h] BYREF
_BYTE v21[32]; // [xsp+70h] [xbp+70h] BYREF
if ( fnv::vnm::pDnsMap )
{
v2 = fnv::vnm::CompositeConfig::count((fnv::vnm::CompositeConfig *)fnv::vnm::pDnsMap);
v3 = (_QWORD *)std::ostream::operator<<(a1, v2);
if ( v2 == 1 )
v4 = " DNS object";
else
v4 = " DNS objects";
std::operator<<<std::char_traits<char>>(v3, v4);
if ( v2 )
v5 = 58;
else
v5 = 46;
v19 = v5;
v6 = std::__put_character_sequence<char,std::char_traits<char>>(a1, (__int64)&v19, 1LL);
std::ios_base::getloc((std::ios_base *)((char *)v6 + *(_QWORD *)(*v6 - 24LL)));
v7 = std::locale::use_facet(&v20, &std::ctype<char>::id);
v8 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 56LL))(v7, 10LL);
std::locale::~locale((std::locale *)&v20);
std::ostream::put(v6, v8);
std::ostream::flush(v6);
v9 = (fnv::vnm::CompositeConfig *)fnv::vnm::pDnsMap;
v10 = (_QWORD *)fnv::vnm::CompositeConfig::begin((fnv::vnm::CompositeConfig *)fnv::vnm::pDnsMap);
v12 = v11;
fnv::vnm::CompositeConfig::end(v9);
v14 = v13;
while ( v12 != v14 )
{
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)*v12 + 32LL))(*v12);
v15 = std::operator<<<char>(a1, (__int64)v21);
std::ios_base::getloc((std::ios_base *)((char *)v15 + *(_QWORD *)(*v15 - 24LL)));
v16 = std::locale::use_facet(&v20, &std::ctype<char>::id);
v17 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v16 + 56LL))(v16, 10LL);
std::locale::~locale((std::locale *)&v20);
std::ostream::put(v15, v17);
std::ostream::flush(v15);
++v12;
std::string::~string(v21);
if ( (unsigned __int64)v12 - *v10 - 4096 <= 7 )
{
v12 = (_QWORD *)v10[1];
++v10;
}
}
}
return *(_QWORD *)&v21[24] ^ _stack_chk_guard;
}
// 1C2C4: variable 'v11' is possibly undefined
// 1C2D0: variable 'v13' is possibly undefined
// 132F0: using guessed type __int64 __fastcall std::ostream::operator<<(_QWORD, _QWORD);
// 134E0: using guessed type __int64 __fastcall std::ostream::put(_QWORD, _QWORD);
// 135C0: using guessed type __int64 __fastcall std::ostream::flush(_QWORD);
// 136F0: using guessed type __int64 __fastcall std::locale::use_facet(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D028: using guessed type void *fnv::vnm::pDnsMap;
//----- (000000000001C3F0) ----------------------------------------------------
__int64 __usercall fnv::vnm::GetIpStats@<X0>(__int64 a1@<X8>)
{
unsigned int v3; // w0
__int64 v5; // [xsp+30h] [xbp+30h] BYREF
__int64 v6; // [xsp+38h] [xbp+38h] BYREF
__int64 v7; // [xsp+40h] [xbp+40h] BYREF
__int64 v8; // [xsp+48h] [xbp+48h] BYREF
__int64 v9; // [xsp+50h] [xbp+50h] BYREF
__int64 v10; // [xsp+58h] [xbp+58h] BYREF
__int64 v11; // [xsp+60h] [xbp+60h] BYREF
__int64 v12; // [xsp+68h] [xbp+68h] BYREF
__int64 v13; // [xsp+70h] [xbp+70h] BYREF
__int64 v14; // [xsp+78h] [xbp+78h] BYREF
__int64 v15; // [xsp+80h] [xbp+80h] BYREF
__int64 v16; // [xsp+88h] [xbp+88h] BYREF
__int64 v17; // [xsp+90h] [xbp+90h] BYREF
__int64 v18; // [xsp+98h] [xbp+98h] BYREF
__int64 v19; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v20; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v21; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v22; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v23; // [xsp+C0h] [xbp+C0h] BYREF
__int64 v24; // [xsp+C8h] [xbp+C8h] BYREF
__int64 v25; // [xsp+D0h] [xbp+D0h] BYREF
__int64 v26; // [xsp+D8h] [xbp+D8h] BYREF
__int64 v27; // [xsp+E0h] [xbp+E0h] BYREF
__int64 v28; // [xsp+E8h] [xbp+E8h] BYREF
__int64 v29; // [xsp+F0h] [xbp+F0h] BYREF
__int64 v30; // [xsp+F8h] [xbp+F8h] BYREF
__int64 v31; // [xsp+100h] [xbp+100h] BYREF
__int64 v32; // [xsp+108h] [xbp+108h] BYREF
__int64 v33; // [xsp+110h] [xbp+110h] BYREF
__int64 v34; // [xsp+118h] [xbp+118h] BYREF
__int64 v35; // [xsp+120h] [xbp+120h] BYREF
*(_QWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 8) = 0LL;
v5 = 240LL;
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = 0LL;
*(float *)(a1 + 32) = 1.0;
v3 = sysctlbyname("net.inet.ip.stats", &v6, &v5, 0LL, 0LL);
if ( v3 )
{
Logger::e((Logger *)qword_4D0C8, "sysctlbyname: errno=%d", v3);
}
else
{
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[10],unsigned long &>(a1, "ips_total", &v6);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[11],unsigned long &>(a1, "ips_badsum", &v7);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[13],unsigned long &>(a1, "ips_tooshort", &v8);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[13],unsigned long &>(a1, "ips_toosmall", &v9);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[12],unsigned long &>(a1, "ips_badhlen", &v10);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[11],unsigned long &>(a1, "ips_badlen", &v11);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[14],unsigned long &>(a1, "ips_fragments", &v12);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[16],unsigned long &>(
a1,
"ips_fragdropped",
&v13);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[16],unsigned long &>(
a1,
"ips_fragtimeout",
&v14);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[12],unsigned long &>(a1, "ips_forward", &v15);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[16],unsigned long &>(
a1,
"ips_fastforward",
&v16);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[16],unsigned long &>(
a1,
"ips_cantforward",
&v17);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[17],unsigned long &>(
a1,
"ips_redirectsent",
&v18);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[12],unsigned long &>(a1, "ips_noproto", &v19);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[14],unsigned long &>(a1, "ips_delivered", &v20);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[13],unsigned long &>(a1, "ips_localout", &v21);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[13],unsigned long &>(a1, "ips_odropped", &v22);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[16],unsigned long &>(
a1,
"ips_reassembled",
&v23);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[15],unsigned long &>(
a1,
"ips_fragmented",
&v24);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[15],unsigned long &>(
a1,
"ips_ofragments",
&v25);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[13],unsigned long &>(a1, "ips_cantfrag", &v26);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[15],unsigned long &>(
a1,
"ips_badoptions",
&v27);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[12],unsigned long &>(a1, "ips_noroute", &v28);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[12],unsigned long &>(a1, "ips_badvers", &v29);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[11],unsigned long &>(a1, "ips_rawout", &v30);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[13],unsigned long &>(a1, "ips_badfrags", &v31);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[15],unsigned long &>(
a1,
"ips_rcvmemdrop",
&v32);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[12],unsigned long &>(a1, "ips_toolong", &v33);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[10],unsigned long &>(a1, "ips_nogif", &v34);
std::unordered_map<std::string,unsigned long>::emplace<char const(&)[12],unsigned long &>(a1, "ips_badaddr", &v35);
}
return a1;
}
// 132E0: using guessed type __int64 __fastcall sysctlbyname(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 4D0C8: using guessed type __int64 qword_4D0C8;
//----- (000000000001C70C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ListIpStats(_QWORD *a1)
{
void *v2; // x1
__int64 v3; // x1
unsigned __int64 v4; // x0
unsigned __int64 v5; // x0
_QWORD *i; // x21
_QWORD *v7; // x0
_QWORD *v8; // x0
_QWORD *v9; // x22
__int64 v10; // x0
unsigned int v11; // w26
__int64 v13; // [xsp+50h] [xbp+50h] BYREF
void *v14[2]; // [xsp+58h] [xbp+58h] BYREF
__int64 v15[2]; // [xsp+68h] [xbp+68h] BYREF
int v16; // [xsp+78h] [xbp+78h]
void *v17; // [xsp+80h] [xbp+80h] BYREF
void *v18; // [xsp+88h] [xbp+88h]
__int64 v19; // [xsp+90h] [xbp+90h]
__int64 v20; // [xsp+98h] [xbp+98h]
int v21; // [xsp+A0h] [xbp+A0h]
__int64 v22; // [xsp+A8h] [xbp+A8h]
fnv::vnm::GetIpStats((__int64)&v17);
v2 = v17;
v17 = 0LL;
v14[0] = v2;
v3 = (__int64)v18;
v14[1] = v18;
v15[1] = v20;
v16 = v21;
v18 = 0LL;
v15[0] = v19;
if ( v20 )
{
v4 = *(_QWORD *)(v19 + 8);
if ( (v3 & (v3 - 1)) != 0 )
v5 = v4 % v3;
else
v5 = v4 & (v3 - 1);
*((_QWORD *)v14[0] + v5) = v15;
v19 = 0LL;
v20 = 0LL;
}
std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::~__hash_table((__int64)&v17);
std::operator<<<std::char_traits<char>>(a1, "IP protocol stats:\n");
for ( i = (_QWORD *)v15[0]; i; i = (_QWORD *)*i )
{
v7 = std::operator<<<char>(a1, (__int64)(i + 2));
v8 = std::operator<<<std::char_traits<char>>(v7, ": ");
v9 = (_QWORD *)std::ostream::operator<<(v8, i[5]);
std::ios_base::getloc((std::ios_base *)((char *)v9 + *(_QWORD *)(*v9 - 24LL)));
v10 = std::locale::use_facet(&v13, &std::ctype<char>::id);
v11 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 56LL))(v10, 10LL);
std::locale::~locale((std::locale *)&v13);
std::ostream::put(v9, v11);
std::ostream::flush(v9);
}
std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::~__hash_table((__int64)v14);
return v22 ^ _stack_chk_guard;
}
// 1C75C: conditional instruction was optimized away because %var_40.8==0
// 1C7BC: conditional instruction was optimized away because x0.8==0
// 132F0: using guessed type __int64 __fastcall std::ostream::operator<<(_QWORD, _QWORD);
// 134E0: using guessed type __int64 __fastcall std::ostream::put(_QWORD, _QWORD);
// 135C0: using guessed type __int64 __fastcall std::ostream::flush(_QWORD);
// 136F0: using guessed type __int64 __fastcall std::locale::use_facet(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001C928) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::Bind9DnsForwardEntry::format@<X0>(
fnv::vnm::Bind9DnsForwardEntry *this@<X0>,
int a2@<W1>,
int a3@<W2>,
_QWORD *a4@<X8>)
{
__int64 v8; // x27
__int64 i; // x21
_QWORD *v10; // x0
_QWORD *v11; // x0
__int64 v13[3]; // [xsp+68h] [xbp+68h] BYREF
__int64 (__fastcall **v14[2])(); // [xsp+80h] [xbp+80h] BYREF
__int64 (__fastcall **v15)(); // [xsp+90h] [xbp+90h] BYREF
__int64 v16[12]; // [xsp+98h] [xbp+98h] BYREF
int v17; // [xsp+F8h] [xbp+F8h]
__int64 v18[18]; // [xsp+100h] [xbp+100h] BYREF
int v19; // [xsp+190h] [xbp+190h]
v14[1] = 0LL;
v18[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v18, v16);
v19 = -1;
v18[17] = 0LL;
v14[0] = off_4C1D0;
v15 = off_4C1F8;
v18[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v16);
memset(v13, 0, sizeof(v13));
memset(&v16[8], 0, 32);
v16[0] = (__int64)off_4BFE0;
v17 = 24;
std::stringbuf::str((__int64)v16);
std::string::~string(v13);
v8 = *((_QWORD *)this + 10);
for ( i = *((_QWORD *)this + 9); v8 != i; i += 32LL )
{
if ( ((a2 ^ *(_DWORD *)(i + 24)) & a3) == 0 )
{
v10 = std::operator<<<std::char_traits<char>>(&v15, "nameserver_");
v11 = std::operator<<<char>(v10, i);
std::operator<<<std::char_traits<char>>(v11, "\n");
std::operator<<<std::char_traits<char>>(&v15, "");
}
}
std::stringbuf::str((__int64)v16, a4);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v14);
return a4;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (000000000001CB20) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::Bind9DnsForwardEntry::describe@<X0>(
fnv::vnm::Bind9DnsForwardEntry *this@<X0>,
_QWORD *a2@<X8>)
{
__int64 v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v6[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v7)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v8[12]; // [xsp+78h] [xbp+78h] BYREF
int v9; // [xsp+D8h] [xbp+D8h]
__int64 v10[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v11; // [xsp+170h] [xbp+170h]
v6[1] = 0LL;
v6[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v10, v8);
v11 = -1;
v10[17] = 0LL;
v6[0] = off_4C1D0;
v7 = off_4C1F8;
v10[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v8);
memset(v5, 0, sizeof(v5));
memset(&v8[8], 0, 32);
v8[0] = (__int64)off_4BFE0;
v9 = 24;
std::stringbuf::str((__int64)v8);
std::string::~string(v5);
fnv::vnm::ConfigElement::name(this, (__int64)v5);
std::operator<<<char>(&v7, (__int64)v5);
std::string::~string(v5);
std::stringbuf::str((__int64)v8, a2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a2;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (000000000001CCD0) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::JournalEntry::describe@<X0>(fnv::vnm::JournalEntry *this@<X0>, _QWORD *a2@<X8>)
{
__int64 v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v6[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v7)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v8[12]; // [xsp+78h] [xbp+78h] BYREF
int v9; // [xsp+D8h] [xbp+D8h]
__int64 v10[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v11; // [xsp+170h] [xbp+170h]
v6[1] = 0LL;
v6[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v10, v8);
v11 = -1;
v10[17] = 0LL;
v6[0] = off_4C1D0;
v7 = off_4C1F8;
v10[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v8);
memset(v5, 0, sizeof(v5));
memset(&v8[8], 0, 32);
v8[0] = (__int64)off_4BFE0;
v9 = 24;
std::stringbuf::str((__int64)v8);
std::string::~string(v5);
fnv::vnm::ConfigElement::name(this, (__int64)v5);
std::operator<<<char>(&v7, (__int64)v5);
std::string::~string(v5);
std::stringbuf::str((__int64)v8, a2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a2;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (000000000001CE80) ----------------------------------------------------
__int64 __fastcall fnv::vnm::InstallNat(__int64 a1)
{
char v2; // w1
__int64 v3; // x0
unsigned int v4; // w20
Logger *v5; // x23
const char *v6; // x22
unsigned int v7; // w0
const char *v8; // x2
_BYTE v10[72]; // [xsp+48h] [xbp+48h] BYREF
_BYTE v11[120]; // [xsp+90h] [xbp+90h] BYREF
v2 = *(_BYTE *)a1;
v3 = *(_BYTE *)a1 >> 1;
if ( (v2 & 1) != 0 )
v3 = *(_QWORD *)(a1 + 8);
if ( v3 )
{
fnv::vnm::CompositeConfig::CompositeConfig((__int64)v11, a1);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v11) )
{
fnv::vnm::NatRule::NatRule((__int64)v10, a1);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v11, (fnv::vnm::ConfigElement *)v10);
fnv::vnm::NatRule::~NatRule((fnv::vnm::NatRule *)v10);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v11) )
{
if ( fnv::vnm::pNatMap )
fnv::vnm::CompositeConfig::maybePush(
(fnv::vnm::CompositeConfig *)fnv::vnm::pNatMap,
(fnv::vnm::ConfigElement *)v11);
v8 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v8 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D0E8, "InstallNat successful iface=[%s].", v8);
v4 = 0;
}
else
{
v5 = (Logger *)qword_4D0C8;
v6 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v6 = *(const char **)(a1 + 16);
v7 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v11);
Logger::e(v5, "InstallNat failed iface=[%s] errorcode = %d.", v6, v7);
v4 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v11);
}
fnv::vnm::CompositeConfig::~CompositeConfig((fnv::vnm::CompositeConfig *)v11);
}
else
{
v4 = 22;
Logger::e((Logger *)qword_4D0C8, "InstallNat: Interface name must have length.");
}
return v4;
}
// 4D020: using guessed type void *fnv::vnm::pNatMap;
// 4D0C8: using guessed type __int64 qword_4D0C8;
// 4D0E8: using guessed type __int64 qword_4D0E8;
//----- (000000000001D020) ----------------------------------------------------
void __fastcall std::__vector_base<fnv_analytics_logset_e>::~__vector_base(char **a1)
{
char *v2; // x0
char *v3; // x1
v2 = *a1;
if ( v2 )
{
while ( 1 )
{
v3 = a1[1];
if ( v2 == v3 )
break;
a1[1] = v3 - 4;
}
operator delete(v2);
}
}
//----- (000000000001D04C) ----------------------------------------------------
void __fastcall std::__vector_base<fnv_analytics_log_e>::~__vector_base(char **a1)
{
char *v2; // x0
char *v3; // x1
v2 = *a1;
if ( v2 )
{
while ( 1 )
{
v3 = a1[1];
if ( v2 == v3 )
break;
a1[1] = v3 - 4;
}
operator delete(v2);
}
}
//----- (000000000001D078) ----------------------------------------------------
__int64 __fastcall std::function<void ()(fnv_analytics_event_info_t)>::~function(__int64 result)
{
__int64 v1; // x1
v1 = *(_QWORD *)(result + 32);
if ( v1 == result )
return (*(__int64 (**)(void))(*(_QWORD *)v1 + 32LL))();
if ( v1 )
return (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v1 + 40LL))(*(_QWORD *)(result + 32));
return result;
}
//----- (000000000001D0A8) ----------------------------------------------------
void __fastcall std::__vector_base<fnv::vnm::DnsForwardEntry::DnsAddrProps>::~__vector_base(void **a1)
{
char *v1; // x20
char *v3; // x0
char *v4; // x0
v1 = (char *)*a1;
if ( *a1 )
{
while ( 1 )
{
v3 = (char *)a1[1];
if ( v1 == v3 )
break;
v4 = v3 - 32;
a1[1] = v4;
std::string::~string(v4);
}
operator delete(*a1);
}
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001D0F8) ----------------------------------------------------
void __fastcall std::__vector_base<fnv::vnm::DnsForwardEntry::DnsRouteProps>::~__vector_base(void **a1)
{
char *v1; // x21
char *v3; // x19
char *v4; // x19
v1 = (char *)*a1;
if ( *a1 )
{
while ( 1 )
{
v3 = (char *)a1[1];
if ( v1 == v3 )
break;
v4 = v3 - 48;
a1[1] = v4;
std::string::~string(v4 + 24);
std::string::~string(v4);
}
operator delete(*a1);
}
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001D160) ----------------------------------------------------
_QWORD *__fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsRouteProps>::vector(_QWORD *result, __int64 *a2)
{
signed __int64 v2; // x20
unsigned __int64 v3; // x2
_QWORD *v5; // x19
__int64 v6; // x20
__int64 v7; // x22
__int64 v8; // x21
*result = 0LL;
result[1] = 0LL;
result[2] = 0LL;
v2 = a2[1] - *a2;
v3 = 0xAAAAAAAAAAAAAAABLL * (v2 >> 4);
if ( v3 )
{
v5 = result;
if ( v3 > 0x555555555555555LL )
std::__vector_base_common<true>::__throw_length_error();
result = (_QWORD *)operator new(v2);
v5[2] = (char *)result + v2;
*v5 = result;
v5[1] = result;
v6 = *a2;
v7 = a2[1];
while ( v6 != v7 )
{
v8 = v5[1];
if ( v8 )
{
std::string::basic_string(v5[1], v6);
std::string::basic_string(v8 + 24, v6 + 24);
}
v6 += 48LL;
result = (_QWORD *)(v5[1] + 48LL);
v5[1] = result;
}
}
return result;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13910: using guessed type __int64 std::__vector_base_common<true>::__throw_length_error(void);
//----- (000000000001D244) ----------------------------------------------------
_QWORD *__usercall std::operator+<char>@<X0>(__int64 a1@<X0>, __int64 a2@<X1>, _QWORD *a3@<X8>)
{
__int64 v5; // x2
__int64 v6; // x21
__int64 v7; // x1
__int64 v8; // x1
*a3 = 0LL;
a3[1] = 0LL;
a3[2] = 0LL;
v5 = *(_BYTE *)a1 >> 1;
if ( (*(_BYTE *)a1 & 1) != 0 )
v5 = *(_QWORD *)(a1 + 8);
v6 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v6 = *(_QWORD *)(a2 + 8);
v7 = a1 + 1;
if ( (*(_BYTE *)a1 & 1) != 0 )
v7 = *(_QWORD *)(a1 + 16);
std::string::__init(a3, v7, v5, v6 + v5);
v8 = a2 + 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v8 = *(_QWORD *)(a2 + 16);
std::string::append(a3, v8, v6);
return a3;
}
// 13520: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD, _QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
//----- (000000000001D2E4) ----------------------------------------------------
void __fastcall std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::~__hash_table(
__int64 a1)
{
_QWORD *v1; // x19
_QWORD *v3; // x21
void *v4; // x0
void *v5; // x0
v1 = *(_QWORD **)(a1 + 16);
while ( v1 )
{
v3 = (_QWORD *)*v1;
std::string::~string(v1 + 2);
v4 = v1;
v1 = v3;
operator delete(v4);
}
v5 = *(void **)a1;
*(_QWORD *)a1 = 0LL;
if ( v5 )
operator delete(v5);
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001D348) ----------------------------------------------------
__int64 __fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::allocate(_QWORD *a1, unsigned __int64 a2)
{
unsigned __int64 v4; // x19
__int64 result; // x0
if ( a2 > 0x7FFFFFFFFFFFFFFLL )
std::__vector_base_common<true>::__throw_length_error();
v4 = 32 * a2;
result = operator new(v4);
*a1 = result;
a1[1] = result;
a1[2] = result + v4;
return result;
}
// 13910: using guessed type __int64 std::__vector_base_common<true>::__throw_length_error(void);
//----- (000000000001D390) ----------------------------------------------------
_QWORD *__fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::vector(_QWORD *result, __int64 *a2)
{
__int64 v3; // x1
__int64 *v4; // x20
__int64 v5; // x19
result[2] = 0LL;
*result = 0LL;
result[1] = 0LL;
v3 = (a2[1] - *a2) >> 5;
if ( v3 )
{
v4 = a2;
v5 = (__int64)result;
std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::allocate(result, v3);
return (_QWORD *)sub_19690(v5, *v4, v4[1]);
}
return result;
}
//----- (000000000001D3F8) ----------------------------------------------------
char *__fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::assign<fnv::vnm::DnsForwardEntry::DnsAddrProps*>(
__int64 a1,
__int64 a2,
__int64 a3)
{
char *v3; // x20
unsigned __int64 v5; // x24
__int64 v7; // x21
__int64 v8; // x22
__int64 v9; // x22
int v10; // w24
char *v11; // x0
__int64 v12; // x2
__int64 v13; // x1
char *result; // x0
char *v15; // x0
char *v16; // x0
char *v17; // x0
unsigned __int64 v18; // x0
unsigned __int64 v19; // x1
v3 = *(char **)a1;
v5 = (a3 - a2) >> 5;
v7 = a2;
if ( v5 > (__int64)(*(_QWORD *)(a1 + 16) - *(_QWORD *)a1) >> 5 )
{
if ( v3 )
{
while ( 1 )
{
v16 = *(char **)(a1 + 8);
if ( v3 == v16 )
break;
v17 = v16 - 32;
*(_QWORD *)(a1 + 8) = v17;
std::string::~string(v17);
}
operator delete(*(void **)a1);
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 8) = 0LL;
}
if ( v5 > 0x7FFFFFFFFFFFFFFLL )
std::__vector_base_common<true>::__throw_length_error(a1);
v18 = (__int64)(*(_QWORD *)(a1 + 16) - *(_QWORD *)a1) >> 5;
v19 = 0x7FFFFFFFFFFFFFFLL;
if ( v18 <= 0x3FFFFFFFFFFFFFELL )
{
v19 = 2 * v18;
if ( 2 * v18 < v5 )
v19 = v5;
}
std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::allocate((_QWORD *)a1, v19);
v12 = a3;
v13 = v7;
return (char *)sub_19690(a1, v13, v12);
}
v8 = *(_QWORD *)(a1 + 8) - (_QWORD)v3;
if ( v5 <= v8 >> 5 )
{
v9 = a3;
v10 = 0;
}
else
{
v9 = a2 + v8;
v10 = 1;
}
while ( v9 != v7 )
{
v11 = v3;
v7 += 32LL;
v3 += 32;
std::string::operator=(v11);
*((_DWORD *)v3 - 2) = *(_DWORD *)(v7 - 8);
}
if ( v10 )
{
v12 = a3;
v13 = v9;
return (char *)sub_19690(a1, v13, v12);
}
while ( 1 )
{
result = *(char **)(a1 + 8);
if ( v3 == result )
break;
v15 = result - 32;
*(_QWORD *)(a1 + 8) = v15;
std::string::~string(v15);
}
return result;
}
// 13500: using guessed type __int64 __fastcall std::string::operator=(_QWORD);
// 13910: using guessed type __int64 __fastcall std::__vector_base_common<true>::__throw_length_error(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001D558) ----------------------------------------------------
__int64 __fastcall std::__split_buffer<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__split_buffer(
_QWORD *a1,
__int64 a2,
__int64 a3,
__int64 a4)
{
__int64 v5; // x20
__int64 result; // x0
__int64 v8; // x2
a1[3] = 0LL;
a1[4] = a4;
v5 = 32 * a2;
result = 0LL;
if ( a2 )
result = operator new(32 * a2);
v8 = result + 32 * a3;
*a1 = result;
a1[1] = v8;
a1[2] = v8;
a1[3] = result + v5;
return result;
}
//----- (000000000001D5A8) ----------------------------------------------------
void __fastcall std::__split_buffer<fnv::vnm::DnsForwardEntry::DnsAddrProps>::~__split_buffer(__int64 a1)
{
__int64 v1; // x20
__int64 v3; // x0
__int64 v4; // x0
v1 = *(_QWORD *)(a1 + 8);
while ( 1 )
{
v3 = *(_QWORD *)(a1 + 16);
if ( v3 == v1 )
break;
v4 = v3 - 32;
*(_QWORD *)(a1 + 16) = v4;
std::string::~string(v4);
}
if ( *(_QWORD *)a1 )
operator delete(*(void **)a1);
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001D5F8) ----------------------------------------------------
__int64 __fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__swap_out_circular_buffer(
__int64 *a1,
_QWORD *a2)
{
__int64 v2; // x2
__int64 v3; // x4
__int64 v4; // x3
__int64 v5; // x7
int v6; // w5
__int64 v7; // x2
__int64 v8; // x2
__int64 v9; // x2
__int64 result; // x0
v3 = *a1;
v2 = a1[1];
while ( 1 )
{
v4 = a2[1];
if ( v3 == v2 )
break;
v2 -= 32LL;
if ( v4 != 32 )
{
v5 = *(_QWORD *)(v2 + 8);
*(_QWORD *)(v4 - 32) = *(_QWORD *)v2;
*(_QWORD *)(v4 - 24) = v5;
*(_QWORD *)(v4 - 16) = *(_QWORD *)(v2 + 16);
*(_QWORD *)v2 = 0LL;
*(_QWORD *)(v2 + 8) = 0LL;
v6 = *(_DWORD *)(v2 + 24);
*(_QWORD *)(v2 + 16) = 0LL;
*(_DWORD *)(v4 - 8) = v6;
}
a2[1] -= 32LL;
}
v7 = *a1;
*a1 = v4;
a2[1] = v7;
v8 = a1[1];
a1[1] = a2[2];
a2[2] = v8;
v9 = a1[2];
a1[2] = a2[3];
a2[3] = v9;
result = a2[1];
*a2 = result;
return result;
}
//----- (000000000001D67C) ----------------------------------------------------
__int64 __fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__emplace_back_slow_path<fnv::vnm::DnsForwardEntry::DnsAddrProps&>(
__int64 *a1,
__int64 a2)
{
__int64 v4; // x23
unsigned __int64 v5; // x19
unsigned __int64 v6; // x0
__int64 v7; // x1
__int64 v8; // x23
_QWORD v10[2]; // [xsp+40h] [xbp+40h] BYREF
__int64 v11; // [xsp+50h] [xbp+50h]
__int64 v12; // [xsp+68h] [xbp+68h]
v4 = (__int64)(a1 + 2);
v5 = ((a1[1] - *a1) >> 5) + 1;
if ( v5 > 0x7FFFFFFFFFFFFFFLL )
std::__vector_base_common<true>::__throw_length_error(a1);
v6 = (a1[2] - *a1) >> 5;
v7 = 0x7FFFFFFFFFFFFFFLL;
if ( v6 <= 0x3FFFFFFFFFFFFFELL )
{
v7 = 2 * v6;
if ( 2 * v6 < v5 )
v7 = v5;
}
std::__split_buffer<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__split_buffer(v10, v7, (a1[1] - *a1) >> 5, v4);
v8 = v11;
if ( v11 )
{
std::string::basic_string(v11, a2);
*(_DWORD *)(v8 + 24) = *(_DWORD *)(a2 + 24);
}
v11 += 32LL;
std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__swap_out_circular_buffer(a1, v10);
std::__split_buffer<fnv::vnm::DnsForwardEntry::DnsAddrProps>::~__split_buffer((__int64)v10);
return v12 ^ _stack_chk_guard;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13910: using guessed type __int64 __fastcall std::__vector_base_common<true>::__throw_length_error(_QWORD);
//----- (000000000001D794) ----------------------------------------------------
__int64 __fastcall std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::shrink_to_fit(__int64 *a1)
{
unsigned __int64 v2; // x2
_QWORD v4[6]; // [xsp+30h] [xbp+30h] BYREF
v2 = (a1[1] - *a1) >> 5;
if ( v2 < (a1[2] - *a1) >> 5 )
{
std::__split_buffer<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__split_buffer(
v4,
(a1[1] - *a1) >> 5,
v2,
(__int64)(a1 + 2));
std::vector<fnv::vnm::DnsForwardEntry::DnsAddrProps>::__swap_out_circular_buffer(a1, v4);
std::__split_buffer<fnv::vnm::DnsForwardEntry::DnsAddrProps>::~__split_buffer((__int64)v4);
}
return v4[5] ^ _stack_chk_guard;
}
//----- (000000000001D838) ----------------------------------------------------
unsigned __int64 __fastcall std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_33_to_64(_QWORD *a1, __int64 a2)
{
__int64 v2; // x7
__int64 v3; // x9
__int64 v4; // x6
__int64 v5; // x4
__int64 v6; // x5
__int64 v7; // x3
__int64 v8; // x4
__int64 v9; // x8
__int64 v10; // x5
unsigned __int64 v11; // x2
v2 = a1[2];
v3 = a1[3];
v4 = *(_QWORD *)((char *)a1 + a2 - 16);
v5 = *a1 - 0x3C5A37A36834CED9LL * (a2 + v4);
v6 = v5 + a1[1];
v7 = v6 + v2;
v8 = __ROR8__(v5 + v3, 52) + __ROR8__(v6, 7) + __ROR8__(v6 + v2, 31) + __ROR8__(v5, 37);
v9 = v2 + *(_QWORD *)((char *)a1 + a2 - 32);
v10 = v4 + v9 + *(_QWORD *)((char *)a1 + a2 - 24);
v11 = 0xC3A5C85C97CB3127LL * (v3 + *(_QWORD *)((char *)a1 + a2 - 8) + v10 + v8)
- 0x651E95C4D06FBFB1LL
* (__ROR8__(v9 + v3 + *(_QWORD *)((char *)a1 + a2 - 8), 52)
+ __ROR8__(v9 + *(_QWORD *)((char *)a1 + a2 - 24), 7)
+ __ROR8__(v9, 37)
+ v3
+ __ROR8__(v10, 31)
+ v7);
return 0x9AE16A3B2F90404FLL
* ((v8 - 0x3C5A37A36834CED9LL * (v11 ^ (v11 >> 47))) ^ ((v8 - 0x3C5A37A36834CED9LL * (v11 ^ (v11 >> 47))) >> 47));
}
//----- (000000000001D900) ----------------------------------------------------
unsigned __int64 __fastcall std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_16(__int64 a1, __int64 a2)
{
return 0x9DDFEA08EB382D69LL
* ((0x9DDFEA08EB382D69LL * (a2 ^ (0x9DDFEA08EB382D69LL * (a1 ^ a2)) ^ ((0x9DDFEA08EB382D69LL * (a1 ^ a2)) >> 47))) ^ ((0x9DDFEA08EB382D69LL * (a2 ^ (0x9DDFEA08EB382D69LL * (a1 ^ a2)) ^ ((0x9DDFEA08EB382D69LL * (a1 ^ a2)) >> 47))) >> 47));
}
//----- (000000000001D930) ----------------------------------------------------
unsigned __int64 __fastcall std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_0_to_16(
__int64 *a1,
unsigned __int64 a2)
{
__int64 v2; // x19
unsigned __int64 v4; // x2
unsigned __int64 v5; // x4
unsigned __int64 v6; // x0
if ( a2 <= 8 )
{
if ( a2 <= 3 )
{
v4 = 0x9AE16A3B2F90404FLL;
if ( a2 )
{
v5 = 0x9AE16A3B2F90404FLL * (*(unsigned __int8 *)a1 + (*((unsigned __int8 *)a1 + (a2 >> 1)) << 8));
v6 = 0xC949D7C7509E6557LL * ((unsigned int)a2 + 4 * *((unsigned __int8 *)a1 + a2 - 1));
return 0x9AE16A3B2F90404FLL * (v5 ^ v6 ^ ((v5 ^ v6) >> 47));
}
return v4;
}
else
{
return std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_16(
8LL * (*(_DWORD *)a1 & 0x1FFFFFFF) + a2,
*(unsigned int *)((char *)a1 + a2 - 4));
}
}
else
{
v2 = *(__int64 *)((char *)a1 + a2 - 8);
return std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_16(*a1, __ROR8__(a2 + v2, a2)) ^ v2;
}
}
//----- (000000000001D9FC) ----------------------------------------------------
__int64 __fastcall std::__murmur2_or_cityhash<unsigned long,64ul>::__weak_hash_len_32_with_seeds(
_QWORD *a1,
__int64 a2)
{
return a1[3] + a1[1] + a1[2] + a2 + *a1;
}
//----- (000000000001DA34) ----------------------------------------------------
unsigned __int64 __fastcall std::__murmur2_or_cityhash<unsigned long,64ul>::operator()(
__int64 a1,
_QWORD *a2,
unsigned __int64 a3)
{
_QWORD *v5; // x26
__int64 v7; // x23
unsigned __int64 v8; // x20
unsigned __int64 v9; // x22
__int64 v10; // x3
__int64 v11; // x1
__int64 v12; // x24
__int64 v13; // x0
__int64 v14; // x3
unsigned __int64 v15; // x19
__int64 v16; // x1
__int64 v17; // x28
__int64 v18; // x25
unsigned __int64 v19; // x23
__int64 v20; // x3
_QWORD *v21; // x0
__int64 v22; // x1
__int64 v23; // x1
__int64 v24; // x20
__int64 v25; // x1
__int64 v26; // [xsp+68h] [xbp+68h]
__int64 v27; // [xsp+68h] [xbp+68h]
if ( a3 > 0x20 )
{
if ( a3 > 0x40 )
{
v5 = a2;
v7 = *(_QWORD *)((char *)a2 + a3 - 40);
v8 = *(_QWORD *)((char *)a2 + a3 - 16) + *(_QWORD *)((char *)a2 + a3 - 56);
v9 = std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_16(
a3 + *(_QWORD *)((char *)a2 + a3 - 48),
*(_QWORD *)((char *)a2 + a3 - 24));
v10 = std::__murmur2_or_cityhash<unsigned long,64ul>::__weak_hash_len_32_with_seeds(
(_QWORD *)((char *)a2 + a3 - 64),
a3);
v12 = v11;
v26 = v10;
v13 = std::__murmur2_or_cityhash<unsigned long,64ul>::__weak_hash_len_32_with_seeds(
(_QWORD *)((char *)a2 + a3 - 32),
v8 - 0x4B6D499041670D8DLL);
v14 = v26;
v15 = (a3 - 1) & 0xFFFFFFFFFFFFFFC0LL;
v17 = v16;
v18 = *a2 - 0x4B6D499041670D8DLL * v7;
do
{
v19 = (0xB492B66FBE98F273LL * __ROR8__(v18 + v5[1] + v8 + v14, 37)) ^ v17;
v8 = v14 + v5[5] - 0x4B6D499041670D8DLL * __ROR8__(v8 + v12 + v5[6], 42);
v18 = 0xB492B66FBE98F273LL * __ROR8__(v9 + v13, 33);
v20 = std::__murmur2_or_cityhash<unsigned long,64ul>::__weak_hash_len_32_with_seeds(
v5,
0xB492B66FBE98F273LL * v12);
v21 = v5 + 4;
v12 = v22;
v27 = v20;
v5 += 8;
v9 = v19;
v13 = std::__murmur2_or_cityhash<unsigned long,64ul>::__weak_hash_len_32_with_seeds(v21, v18 + v17);
v17 = v23;
v14 = v27;
}
while ( (_QWORD *)((char *)a2 + v15 - (_QWORD)v5) );
v24 = v19
+ std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_16(v27, v13)
- 0x4B6D499041670D8DLL * (v8 ^ (v8 >> 47));
v25 = v18 + std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_16(v12, v17);
return std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_16(v24, v25);
}
else
{
return std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_33_to_64(a2, a3);
}
}
else if ( a3 > 0x10 )
{
return std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_16(
__ROR8__(0xB492B66FBE98F273LL * *a2 - a2[1], 43)
+ __ROR8__(0x9AE16A3B2F90404FLL * *(_QWORD *)((char *)a2 + a3 - 8), 30)
- 0x3C5A37A36834CED9LL * *(_QWORD *)((char *)a2 + a3 - 16),
__ROR8__(a2[1] ^ 0xC949D7C7509E6557LL, 20)
- 0x9AE16A3B2F90404FLL * *(_QWORD *)((char *)a2 + a3 - 8)
+ a3
- 0x4B6D499041670D8DLL * *a2);
}
else
{
return std::__murmur2_or_cityhash<unsigned long,64ul>::__hash_len_0_to_16(a2, a3);
}
}
// 1DB88: variable 'v11' is possibly undefined
// 1DBB0: variable 'v16' is possibly undefined
// 1DC18: variable 'v22' is possibly undefined
// 1DC34: variable 'v23' is possibly undefined
//----- (000000000001DCA0) ----------------------------------------------------
__int64 __fastcall std::stringbuf::str(__int64 a1)
{
__int64 v1; // x21
__int64 result; // x0
int v4; // w2
unsigned __int8 v5; // w0
int v6; // w3
__int64 v7; // x0
__int64 v8; // x1
__int64 v9; // x1
unsigned __int8 v10; // w20
int v11; // w2
__int64 v12; // x0
__int64 v13; // x20
unsigned __int64 v14; // x1
__int64 v15; // x0
__int64 v16; // x1
int v17; // w0
v1 = a1 + 64;
result = std::string::operator=(a1 + 64);
v4 = *(_DWORD *)(a1 + 96);
*(_QWORD *)(a1 + 88) = 0LL;
if ( (v4 & 8) != 0 )
{
v5 = *(_BYTE *)(a1 + 64);
v6 = v5 & 1;
if ( (v5 & 1) != 0 )
{
v7 = *(_QWORD *)(v1 + 8);
v8 = *(_QWORD *)(v1 + 16);
}
else
{
v8 = a1 + 65;
v7 = v5 >> 1;
}
result = v8 + v7;
*(_QWORD *)(a1 + 88) = result;
v9 = a1 + 65;
if ( v6 )
v9 = *(_QWORD *)(v1 + 16);
*(_QWORD *)(a1 + 16) = v9;
*(_QWORD *)(a1 + 24) = v9;
*(_QWORD *)(a1 + 32) = result;
}
if ( (v4 & 0x10) != 0 )
{
v10 = *(_BYTE *)(a1 + 64);
v11 = v10 & 1;
if ( (v10 & 1) != 0 )
{
v13 = *(_QWORD *)(v1 + 8);
v12 = *(_QWORD *)(v1 + 16);
}
else
{
v13 = v10 >> 1;
v12 = a1 + 65;
}
*(_QWORD *)(a1 + 88) = v12 + v13;
v14 = 22LL;
if ( v11 )
v14 = (*(_QWORD *)(a1 + 64) & 0xFFFFFFFFFFFFFFFELL) - 1;
std::string::resize(v1, v14, 0LL);
if ( (*(_BYTE *)(a1 + 64) & 1) != 0 )
{
v15 = *(_QWORD *)(v1 + 8);
v16 = *(_QWORD *)(v1 + 16);
}
else
{
v16 = a1 + 65;
v15 = *(_BYTE *)(a1 + 64) >> 1;
}
*(_QWORD *)(a1 + 56) = v16 + v15;
v17 = *(_DWORD *)(a1 + 96);
*(_QWORD *)(a1 + 40) = v16;
*(_QWORD *)(a1 + 48) = v16;
result = v17 & 3;
if ( (_DWORD)result )
*(_QWORD *)(a1 + 48) = v16 + (int)v13;
}
return result;
}
// 133F0: using guessed type __int64 __fastcall std::string::resize(_QWORD, _QWORD, _QWORD);
// 13500: using guessed type __int64 __fastcall std::string::operator=(_QWORD);
//----- (000000000001DD94) ----------------------------------------------------
_QWORD *__fastcall std::operator<<<char>(_QWORD *a1, __int64 a2)
{
__int64 v2; // x2
__int64 v3; // x3
if ( (*(_BYTE *)a2 & 1) != 0 )
{
v2 = *(_QWORD *)(a2 + 8);
v3 = *(_QWORD *)(a2 + 16);
}
else
{
v3 = a2 + 1;
v2 = *(_BYTE *)a2 >> 1;
}
return std::__put_character_sequence<char,std::char_traits<char>>(a1, v3, v2);
}
//----- (000000000001DDB4) ----------------------------------------------------
_QWORD *__fastcall std::operator<<<std::char_traits<char>>(_QWORD *a1, char *s)
{
__int64 v4; // x0
v4 = strlen(s);
return std::__put_character_sequence<char,std::char_traits<char>>(a1, (__int64)s, v4);
}
//----- (000000000001DDE8) ----------------------------------------------------
__int64 __usercall std::unordered_map<std::string,unsigned long>::__construct_node<char const(&)[15],unsigned long &>@<X0>(
__int64 a1@<X0>,
const char *a2@<X1>,
_QWORD *a3@<X2>,
__int64 a4@<X8>)
{
__int64 v5; // x20
__int64 v8; // x21
_QWORD *v9; // x0
_QWORD *v10; // x20
size_t v11; // x0
v5 = a1 + 16;
v8 = a4 + 8;
v9 = (_QWORD *)operator new(0x30uLL);
v9[2] = 0LL;
*(_QWORD *)a4 = v9;
*(_QWORD *)(a4 + 8) = v5;
v10 = v9 + 2;
*(_BYTE *)(a4 + 16) = 0;
*(_BYTE *)(a4 + 17) = 0;
v9[3] = 0LL;
v9[4] = 0LL;
v11 = strlen(a2);
std::string::__init(v10, a2, v11);
v10[3] = *a3;
*(_BYTE *)(v8 + 8) = 1;
*(_BYTE *)(v8 + 9) = 1;
return a4;
}
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
//----- (000000000001DEA8) ----------------------------------------------------
_QWORD *__usercall std::stringbuf::str@<X0>(__int64 a1@<X0>, _QWORD *a2@<X8>)
{
int v2; // w1
unsigned __int64 v4; // x1
__int64 v5; // x1
__int64 v6; // x2
v2 = *(_DWORD *)(a1 + 96);
if ( (v2 & 0x10) != 0 )
{
v4 = *(_QWORD *)(a1 + 48);
if ( *(_QWORD *)(a1 + 88) < v4 )
*(_QWORD *)(a1 + 88) = v4;
v5 = *(_QWORD *)(a1 + 40);
v6 = *(_QWORD *)(a1 + 88);
}
else
{
if ( (v2 & 8) == 0 )
{
*a2 = 0LL;
a2[1] = 0LL;
a2[2] = 0LL;
return a2;
}
v5 = *(_QWORD *)(a1 + 16);
v6 = *(_QWORD *)(a1 + 32);
}
a2[2] = 0LL;
*a2 = 0LL;
a2[1] = 0LL;
std::string::__init<char *>((__int64)a2, v5, v6);
return a2;
}
//----- (000000000001DF18) ----------------------------------------------------
void __fastcall std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__rehash(
__int64 a1,
unsigned __int64 a2)
{
__int64 v4; // x1
void *v5; // x0
__int64 v6; // x0
_QWORD *v7; // x27
unsigned __int64 v8; // x28
unsigned __int64 v9; // x22
__int64 v10; // x5
unsigned __int64 v11; // x22
_QWORD *i; // x20
unsigned __int64 v13; // x0
unsigned __int64 v14; // x0
__int64 v15; // x24
__int64 *j; // x25
unsigned __int8 v17; // w0
int v18; // w3
__int64 v19; // x1
unsigned __int8 v20; // w0
int v21; // w6
size_t v22; // x2
unsigned __int8 *v23; // x0
char *v24; // x1
__int64 v25; // x23
int v26; // w0
__int64 v27; // x3
int v28; // w4
__int64 v29; // [xsp+68h] [xbp+68h]
v4 = 0LL;
if ( a2 )
v4 = operator new(8 * a2);
v5 = *(void **)a1;
*(_QWORD *)a1 = v4;
if ( v5 )
operator delete(v5);
*(_QWORD *)(a1 + 8) = a2;
if ( a2 )
{
v6 = 0LL;
do
*(_QWORD *)(*(_QWORD *)a1 + 8 * v6++) = 0LL;
while ( a2 != v6 );
v7 = *(_QWORD **)(a1 + 16);
if ( v7 )
{
v8 = a2 - 1;
v9 = v7[1];
v10 = a2 & (a2 - 1);
if ( v10 )
v11 = v9 % a2;
else
v11 = v8 & v9;
*(_QWORD *)(*(_QWORD *)a1 + 8 * v11) = a1 + 16;
for ( i = (_QWORD *)*v7; i; i = (_QWORD *)*i )
{
v13 = i[1];
if ( v10 )
v14 = v13 % a2;
else
v14 = v8 & v13;
if ( v11 != v14 )
{
v15 = 8 * v14;
if ( *(_QWORD *)(*(_QWORD *)a1 + 8 * v14) )
{
for ( j = i; ; j = (__int64 *)v25 )
{
v25 = *j;
if ( !*j )
break;
v17 = *((_BYTE *)i + 16);
v18 = v17 & 1;
v19 = v17 >> 1;
if ( (v17 & 1) != 0 )
v19 = i[3];
v20 = *(_BYTE *)(v25 + 16);
v21 = v20 & 1;
v22 = v20 >> 1;
if ( (v20 & 1) != 0 )
v22 = *(_QWORD *)(v25 + 24);
if ( v22 != v19 )
break;
v23 = (unsigned __int8 *)i + 17;
if ( v18 )
v23 = (unsigned __int8 *)i[4];
v24 = (char *)(v25 + 17);
if ( v21 )
v24 = *(char **)(v25 + 32);
if ( v18 )
{
if ( v22 )
{
v29 = v10;
v26 = memcmp(v23, v24, v22);
v10 = v29;
if ( v26 )
break;
}
}
else
{
v27 = 0LL;
while ( v22 != v27 )
{
v28 = v23[v27++];
if ( (unsigned __int8)v24[v27 - 1] != v28 )
goto LABEL_40;
}
}
}
LABEL_40:
*v7 = v25;
*j = **(_QWORD **)(*(_QWORD *)a1 + v15);
**(_QWORD **)(*(_QWORD *)a1 + v15) = i;
v14 = v11;
i = v7;
}
else
{
*(_QWORD *)(*(_QWORD *)a1 + 8 * v14) = v7;
}
}
v7 = i;
v11 = v14;
}
}
}
}
//----- (000000000001E0F0) ----------------------------------------------------
void __fastcall std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::rehash(
__int64 a1,
std::__1 *this)
{
std::__1 *prime; // x19
unsigned __int64 v4; // x20
unsigned __int64 v5; // x1
unsigned __int64 v6; // x2
float v7; // s2
unsigned __int64 v8; // x0
prime = (std::__1 *)(&dword_0 + 2);
if ( this != (std::__1 *)((char *)&dword_0 + 1) )
{
prime = this;
if ( (((unsigned __int64)this - 1) & (unsigned __int64)this) != 0 )
prime = (std::__1 *)std::__next_prime(this, (unsigned __int64)this);
}
v4 = *(_QWORD *)(a1 + 8);
v5 = (unsigned __int64)prime;
if ( v4 < (unsigned __int64)prime
|| v4 > (unsigned __int64)prime
&& ((v6 = *(_QWORD *)(a1 + 24), v7 = *(float *)(a1 + 32), v4 > 2) && ((v4 - 1) & v4) == 0
? (v8 = 1LL << (64 - (unsigned __int8)__clz(vcvtps_u32_f32((float)v6 / v7) - 1)))
: (v8 = std::__next_prime((std::__1 *)vcvtps_u32_f32((float)v6 / v7), (unsigned __int64)prime)),
v8 < (unsigned __int64)prime ? (v5 = (unsigned __int64)prime) : (v5 = v8),
v4 > v5) )
{
std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__rehash(
a1,
v5);
}
}
// 0: using guessed type int dword_0;
//----- (000000000001E1C8) ----------------------------------------------------
__int64 *__fastcall std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__node_insert_unique(
__int64 a1,
__int64 *a2)
{
__int64 v2; // x20
__int64 *v5; // x25
unsigned __int8 v6; // w2
_QWORD *v7; // x1
unsigned __int64 v8; // x2
unsigned __int64 v9; // x0
unsigned __int64 v10; // x19
__int64 **v11; // x0
__int64 *i; // x24
unsigned __int64 v13; // x0
unsigned __int64 v14; // x0
float v15; // s2
float v16; // s0
bool v17; // w1
std::__1 *v18; // x1
unsigned __int64 v19; // x0
unsigned __int64 v20; // x0
__int64 v21; // x20
__int64 *v22; // x0
unsigned __int64 v23; // x1
unsigned __int64 v24; // x1
unsigned __int8 v25; // w0
int v26; // w3
__int64 v27; // x0
size_t v28; // x2
unsigned __int8 *v29; // x0
char *v30; // x1
__int64 v32; // x3
int v33; // w4
__int64 v34; // [xsp+60h] [xbp+60h] BYREF
v5 = a2 + 2;
v6 = *((_BYTE *)a2 + 16);
if ( (v6 & 1) != 0 )
{
v8 = a2[3];
v7 = (_QWORD *)a2[4];
}
else
{
v7 = (__int64 *)((char *)a2 + 17);
v8 = v6 >> 1;
}
v9 = std::__murmur2_or_cityhash<unsigned long,64ul>::operator()((__int64)&v34, v7, v8);
a2[1] = v9;
v10 = *(_QWORD *)(a1 + 8);
if ( v10 )
{
v2 = (v10 - 1) & v9;
if ( ((v10 - 1) & v10) != 0 )
v2 = v9 % v10;
v11 = *(__int64 ***)(*(_QWORD *)a1 + 8 * v2);
if ( v11 )
{
for ( i = *v11; i; i = (__int64 *)*i )
{
v13 = i[1];
v14 = ((v10 - 1) & v10) != 0 ? v13 % v10 : v13 & (v10 - 1);
if ( v14 != v2 )
break;
v25 = *((_BYTE *)i + 16);
v26 = v25 & 1;
if ( (v25 & 1) != 0 )
v27 = i[3];
else
v27 = v25 >> 1;
v28 = *(_BYTE *)v5 >> 1;
if ( (*(_BYTE *)v5 & 1) != 0 )
v28 = v5[1];
if ( v28 == v27 )
{
v29 = (unsigned __int8 *)i + 17;
if ( v26 )
v29 = (unsigned __int8 *)i[4];
v30 = (char *)a2 + 17;
if ( (*(_BYTE *)v5 & 1) != 0 )
v30 = (char *)v5[2];
if ( !v26 )
{
v32 = 0LL;
while ( v28 != v32 )
{
v33 = v29[v32++];
if ( (unsigned __int8)v30[v32 - 1] != v33 )
goto LABEL_48;
}
return i;
}
if ( !v28 || !memcmp(v29, v30, v28) )
return i;
}
LABEL_48:
;
}
}
}
v15 = *(float *)(a1 + 32);
v16 = (float)(unsigned __int64)(*(_QWORD *)(a1 + 24) + 1LL);
if ( v16 > (float)((float)v10 * v15) )
{
if ( v10 > 2 )
{
v17 = ((v10 - 1) & v10) == 0;
goto LABEL_17;
}
LABEL_16:
v17 = 0;
LABEL_17:
v18 = (std::__1 *)(!v17 + 2 * v10);
v19 = vcvtps_u32_f32(v16 / v15);
if ( (unsigned __int64)v18 < v19 )
v18 = (std::__1 *)v19;
std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::rehash(
a1,
v18);
v10 = *(_QWORD *)(a1 + 8);
v20 = a2[1];
if ( ((v10 - 1) & v10) != 0 )
v2 = v20 % v10;
else
v2 = v20 & (v10 - 1);
goto LABEL_22;
}
if ( !v10 )
goto LABEL_16;
LABEL_22:
v21 = 8 * v2;
v22 = *(__int64 **)(*(_QWORD *)a1 + v21);
if ( v22 )
{
*a2 = *v22;
*v22 = (__int64)a2;
}
else
{
*a2 = *(_QWORD *)(a1 + 16);
*(_QWORD *)(a1 + 16) = a2;
*(_QWORD *)(*(_QWORD *)a1 + v21) = a1 + 16;
if ( *a2 )
{
v23 = *(_QWORD *)(*a2 + 8);
if ( (v10 & (v10 - 1)) != 0 )
v24 = v23 % v10;
else
v24 = v23 & (v10 - 1);
*(_QWORD *)(*(_QWORD *)a1 + 8 * v24) = a2;
}
}
i = a2;
++*(_QWORD *)(a1 + 24);
return i;
}
// 1E2EC: variable 'v2' is possibly undefined
//----- (000000000001E454) ----------------------------------------------------
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[10],unsigned long &>(
__int64 a1,
const char *a2,
_QWORD *a3)
{
__int64 *inserted; // x0
char *v5; // x20
char v6; // w1
__int64 *v7; // x22
void *v9; // [xsp+30h] [xbp+30h] BYREF
char v10; // [xsp+40h] [xbp+40h]
std::unordered_map<std::string,unsigned long>::__construct_node<char const(&)[15],unsigned long &>(
a1,
a2,
a3,
(__int64)&v9);
inserted = std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__node_insert_unique(
a1,
(__int64 *)v9);
v5 = (char *)v9;
v9 = 0LL;
if ( v6 )
v5 = 0LL;
v7 = inserted;
if ( v5 )
{
if ( v10 )
std::string::~string(v5 + 16);
operator delete(v5);
}
return v7;
}
// 1E4A0: variable 'v6' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001E52C) ----------------------------------------------------
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[11],unsigned long &>(
__int64 a1,
const char *a2,
_QWORD *a3)
{
__int64 *inserted; // x0
char *v5; // x20
char v6; // w1
__int64 *v7; // x22
void *v9; // [xsp+30h] [xbp+30h] BYREF
char v10; // [xsp+40h] [xbp+40h]
std::unordered_map<std::string,unsigned long>::__construct_node<char const(&)[15],unsigned long &>(
a1,
a2,
a3,
(__int64)&v9);
inserted = std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__node_insert_unique(
a1,
(__int64 *)v9);
v5 = (char *)v9;
v9 = 0LL;
if ( v6 )
v5 = 0LL;
v7 = inserted;
if ( v5 )
{
if ( v10 )
std::string::~string(v5 + 16);
operator delete(v5);
}
return v7;
}
// 1E578: variable 'v6' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001E604) ----------------------------------------------------
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[13],unsigned long &>(
__int64 a1,
const char *a2,
_QWORD *a3)
{
__int64 *inserted; // x0
char *v5; // x20
char v6; // w1
__int64 *v7; // x22
void *v9; // [xsp+30h] [xbp+30h] BYREF
char v10; // [xsp+40h] [xbp+40h]
std::unordered_map<std::string,unsigned long>::__construct_node<char const(&)[15],unsigned long &>(
a1,
a2,
a3,
(__int64)&v9);
inserted = std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__node_insert_unique(
a1,
(__int64 *)v9);
v5 = (char *)v9;
v9 = 0LL;
if ( v6 )
v5 = 0LL;
v7 = inserted;
if ( v5 )
{
if ( v10 )
std::string::~string(v5 + 16);
operator delete(v5);
}
return v7;
}
// 1E650: variable 'v6' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001E6DC) ----------------------------------------------------
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[12],unsigned long &>(
__int64 a1,
const char *a2,
_QWORD *a3)
{
__int64 *inserted; // x0
char *v5; // x20
char v6; // w1
__int64 *v7; // x22
void *v9; // [xsp+30h] [xbp+30h] BYREF
char v10; // [xsp+40h] [xbp+40h]
std::unordered_map<std::string,unsigned long>::__construct_node<char const(&)[15],unsigned long &>(
a1,
a2,
a3,
(__int64)&v9);
inserted = std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__node_insert_unique(
a1,
(__int64 *)v9);
v5 = (char *)v9;
v9 = 0LL;
if ( v6 )
v5 = 0LL;
v7 = inserted;
if ( v5 )
{
if ( v10 )
std::string::~string(v5 + 16);
operator delete(v5);
}
return v7;
}
// 1E728: variable 'v6' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001E7B4) ----------------------------------------------------
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[14],unsigned long &>(
__int64 a1,
const char *a2,
_QWORD *a3)
{
__int64 *inserted; // x0
char *v5; // x20
char v6; // w1
__int64 *v7; // x22
void *v9; // [xsp+30h] [xbp+30h] BYREF
char v10; // [xsp+40h] [xbp+40h]
std::unordered_map<std::string,unsigned long>::__construct_node<char const(&)[15],unsigned long &>(
a1,
a2,
a3,
(__int64)&v9);
inserted = std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__node_insert_unique(
a1,
(__int64 *)v9);
v5 = (char *)v9;
v9 = 0LL;
if ( v6 )
v5 = 0LL;
v7 = inserted;
if ( v5 )
{
if ( v10 )
std::string::~string(v5 + 16);
operator delete(v5);
}
return v7;
}
// 1E800: variable 'v6' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001E88C) ----------------------------------------------------
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[16],unsigned long &>(
__int64 a1,
const char *a2,
_QWORD *a3)
{
__int64 *inserted; // x0
char *v5; // x20
char v6; // w1
__int64 *v7; // x22
void *v9; // [xsp+30h] [xbp+30h] BYREF
char v10; // [xsp+40h] [xbp+40h]
std::unordered_map<std::string,unsigned long>::__construct_node<char const(&)[15],unsigned long &>(
a1,
a2,
a3,
(__int64)&v9);
inserted = std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__node_insert_unique(
a1,
(__int64 *)v9);
v5 = (char *)v9;
v9 = 0LL;
if ( v6 )
v5 = 0LL;
v7 = inserted;
if ( v5 )
{
if ( v10 )
std::string::~string(v5 + 16);
operator delete(v5);
}
return v7;
}
// 1E8D8: variable 'v6' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001E964) ----------------------------------------------------
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[17],unsigned long &>(
__int64 a1,
const char *a2,
_QWORD *a3)
{
__int64 *inserted; // x0
char *v5; // x20
char v6; // w1
__int64 *v7; // x22
void *v9; // [xsp+30h] [xbp+30h] BYREF
char v10; // [xsp+40h] [xbp+40h]
std::unordered_map<std::string,unsigned long>::__construct_node<char const(&)[15],unsigned long &>(
a1,
a2,
a3,
(__int64)&v9);
inserted = std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__node_insert_unique(
a1,
(__int64 *)v9);
v5 = (char *)v9;
v9 = 0LL;
if ( v6 )
v5 = 0LL;
v7 = inserted;
if ( v5 )
{
if ( v10 )
std::string::~string(v5 + 16);
operator delete(v5);
}
return v7;
}
// 1E9B0: variable 'v6' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001EA3C) ----------------------------------------------------
__int64 *__fastcall std::unordered_map<std::string,unsigned long>::emplace<char const(&)[15],unsigned long &>(
__int64 a1,
const char *a2,
_QWORD *a3)
{
__int64 *inserted; // x0
char *v5; // x20
char v6; // w1
__int64 *v7; // x22
void *v9; // [xsp+30h] [xbp+30h] BYREF
char v10; // [xsp+40h] [xbp+40h]
std::unordered_map<std::string,unsigned long>::__construct_node<char const(&)[15],unsigned long &>(
a1,
a2,
a3,
(__int64)&v9);
inserted = std::__hash_table<std::__hash_value_type<std::string,unsigned long>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,unsigned long>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,unsigned long>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,unsigned long>>>::__node_insert_unique(
a1,
(__int64 *)v9);
v5 = (char *)v9;
v9 = 0LL;
if ( v6 )
v5 = 0LL;
v7 = inserted;
if ( v5 )
{
if ( v10 )
std::string::~string(v5 + 16);
operator delete(v5);
}
return v7;
}
// 1EA88: variable 'v6' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000001EB20) ----------------------------------------------------
__int64 __fastcall sub_1EB20(int *a1)
{
__int64 result; // x0
Logger *v3; // x19
unsigned int *errno_ptr; // x0
result = close(*a1);
*a1 = -1;
if ( (_DWORD)result )
{
v3 = (Logger *)qword_4D0F8;
errno_ptr = (unsigned int *)__get_errno_ptr();
return Logger::e(v3, "Error from close, errno=%d", *errno_ptr);
}
return result;
}
// 13450: using guessed type __int64 __get_errno_ptr(void);
// 4D0F8: using guessed type __int64 qword_4D0F8;
//----- (000000000001EB78) ----------------------------------------------------
__int64 __fastcall sub_1EB78(int *a1, __int64 a2)
{
int v4; // w0
_BYTE v6[1032]; // [xsp+38h] [xbp+38h] BYREF
if ( (*(_BYTE *)a2 & 1) != 0 )
{
**(_BYTE **)(a2 + 16) = 0;
*(_QWORD *)(a2 + 8) = 0LL;
}
else
{
*(_BYTE *)(a2 + 1) = 0;
*(_BYTE *)a2 = 0;
}
while ( 1 )
{
v4 = read(*a1, v6, 0x400uLL);
if ( v4 <= 0 )
break;
std::string::append(a2, v6, v4);
}
sub_1EB20(a1);
return *(_QWORD *)&v6[1024] ^ _stack_chk_guard;
}
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
//----- (000000000001EC30) ----------------------------------------------------
__int64 __fastcall fnv::vnm::close_pipes(fnv::vnm *this, int (*a2)[2])
{
sub_1EB20((int *)this);
sub_1EB20((int *)this + 1);
sub_1EB20((int *)this + 2);
sub_1EB20((int *)this + 3);
sub_1EB20((int *)this + 4);
return sub_1EB20((int *)this + 5);
}
//----- (000000000001EC78) ----------------------------------------------------
__int64 __fastcall fnv::vnm::send_sigkill(char *a1)
{
unsigned __int8 v2; // w1
__int64 v3; // x0
unsigned int v4; // w21
int has_facet; // w25
const char *v6; // x0
const char *v7; // x0
int v8; // w21
const char *v9; // x0
__int64 v10; // x0
__int64 v11; // x0
Logger *v12; // x25
__int64 v13; // x2
const char *v14; // x3
unsigned int *errno_ptr; // x0
const char *v16; // x2
__int64 v18; // [xsp+58h] [xbp+58h] BYREF
__int64 v19[2]; // [xsp+60h] [xbp+60h] BYREF
const char *v20; // [xsp+70h] [xbp+70h]
__int64 (__fastcall **v21[2])(); // [xsp+78h] [xbp+78h] BYREF
__int64 (__fastcall **v22)(); // [xsp+88h] [xbp+88h] BYREF
_BYTE v23[112]; // [xsp+90h] [xbp+90h] BYREF
FILE *v24; // [xsp+100h] [xbp+100h]
__int64 v25; // [xsp+108h] [xbp+108h]
int v26; // [xsp+110h] [xbp+110h]
__int16 v27; // [xsp+114h] [xbp+114h]
__int16 v28; // [xsp+116h] [xbp+116h]
int v29; // [xsp+118h] [xbp+118h]
__int16 v30; // [xsp+11Ch] [xbp+11Ch]
__int16 v31; // [xsp+11Eh] [xbp+11Eh]
int v32; // [xsp+120h] [xbp+120h]
int v33; // [xsp+124h] [xbp+124h]
char v34; // [xsp+128h] [xbp+128h]
char v35; // [xsp+129h] [xbp+129h]
char v36; // [xsp+12Ah] [xbp+12Ah]
__int64 v37[4]; // [xsp+130h] [xbp+130h] BYREF
int v38; // [xsp+150h] [xbp+150h]
__int64 v39; // [xsp+1B8h] [xbp+1B8h]
int v40; // [xsp+1C0h] [xbp+1C0h]
v2 = *a1;
v3 = (unsigned __int8)*a1 >> 1;
if ( (v2 & 1) != 0 )
v3 = *((_QWORD *)a1 + 1);
v4 = 22;
if ( v3 )
{
v21[0] = (__int64 (__fastcall **)())&unk_4C430;
v21[1] = 0LL;
v37[0] = (__int64)&unk_4C458;
std::ios_base::init((std::ios_base *)v37, &v22);
v40 = -1;
v39 = 0LL;
v37[0] = (__int64)off_4C4C8;
v21[0] = off_4C4A0;
std::streambuf::basic_streambuf(&v22);
v27 = 0;
v28 = 0;
v22 = off_4C3A8;
v30 = 0;
v31 = 0;
v34 = 0;
v35 = 0;
v36 = 0;
memset(&v23[56], 0, 24);
memset(&v23[88], 0, 24);
v24 = 0LL;
v25 = 0LL;
v26 = 0;
v29 = 0;
v32 = 0;
v33 = 0;
std::locale::locale((std::locale *)&v18, (const std::locale *)v23);
has_facet = (unsigned __int8)std::locale::has_facet(&v18, &std::codecvt<char,char,_Mbstatet>::id);
std::locale::~locale((std::locale *)&v18);
if ( has_facet )
{
std::locale::locale((std::locale *)&v18, (const std::locale *)v23);
v25 = std::locale::use_facet(&v18, &std::codecvt<char,char,_Mbstatet>::id);
std::locale::~locale((std::locale *)&v18);
v36 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v25 + 56LL))(v25);
}
std::filebuf::setbuf((__int64)&v22, 0LL, 4096LL);
v6 = a1 + 1;
if ( (*a1 & 1) != 0 )
v6 = (const char *)*((_QWORD *)a1 + 2);
if ( v24 || (v24 = fopen(v6, "r")) == 0LL )
std::ios_base::clear((std::ios_base *)v37, v38 | 4);
else
v32 = 8;
if ( (v38 & 5) != 0 )
{
v16 = a1 + 1;
if ( (*a1 & 1) != 0 )
v16 = (const char *)*((_QWORD *)a1 + 2);
Logger::e((Logger *)qword_4D0F8, "pid file [%s] does not exist!", v16);
v4 = 22;
}
else
{
v20 = 0LL;
v19[0] = 0LL;
v19[1] = 0LL;
std::operator>><char>((__int64 *)v21, (__int64)v19);
v7 = v20;
if ( (v19[0] & 1) == 0 )
v7 = (char *)v19 + 1;
v8 = atoi(v7);
if ( v8 > 1 )
{
Logger::i((Logger *)qword_4D100, "pid to end: %d", (unsigned int)v8);
v9 = a1 + 1;
if ( (*a1 & 1) != 0 )
v9 = (const char *)*((_QWORD *)a1 + 2);
v10 = unlink(v9);
if ( (_DWORD)v10 )
{
v12 = (Logger *)qword_4D0F8;
v13 = *(unsigned int *)__get_errno_ptr(v10);
v14 = a1 + 1;
if ( (*a1 & 1) != 0 )
v14 = (const char *)*((_QWORD *)a1 + 2);
Logger::w(v12, "failed (%d): pid file [%s] removal", v13, v14);
}
v11 = kill(v8, 9);
if ( (_DWORD)v11 && (errno_ptr = (unsigned int *)__get_errno_ptr(v11), (v4 = *errno_ptr) != 0) )
Logger::w((Logger *)qword_4D0F8, "failed (%d): kill.", v4);
else
v4 = 0;
}
else
{
Logger::e((Logger *)qword_4D0F8, "%s: pid file contained an invalid PID", "send_sigkill");
v4 = 22;
}
std::string::~string(v19);
}
std::ifstream::~ifstream(v21);
}
return v4;
}
// 13380: using guessed type __int64 __fastcall std::locale::has_facet(_QWORD, _QWORD);
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 136F0: using guessed type __int64 __fastcall std::locale::use_facet(_QWORD, _QWORD);
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4C3A8: using guessed type __int64 (__fastcall *off_4C3A8[3])();
// 4C4A0: using guessed type __int64 (__fastcall *off_4C4A0[2])();
// 4C4C8: using guessed type __int64 (__fastcall *off_4C4C8[2])();
// 4D0F8: using guessed type __int64 qword_4D0F8;
// 4D100: using guessed type __int64 qword_4D100;
//----- (000000000001F028) ----------------------------------------------------
__int64 __fastcall sub_1F028(__int64 a1, __int64 *a2, _QWORD *a3, _QWORD *a4, _QWORD *a5)
{
__int64 v9; // x20
__int64 v10; // x21
__int64 *v11; // x0
unsigned __int64 v12; // x2
__int64 v13; // x1
__int64 v14; // x0
char *v15; // x1
__int64 v16; // x0
char *v17; // x1
char *v18; // x0
__int64 v19; // x20
unsigned __int64 v20; // x1
char *v21; // x0
__int64 v22; // x1
_QWORD *v23; // x20
_QWORD *v24; // x22
_QWORD *v25; // t1
__int64 v26; // x24
_QWORD *v27; // x0
_QWORD *v28; // x0
_QWORD *v29; // x0
__int64 *v30; // x1
unsigned __int64 v31; // x2
char *v32; // x0
__int64 v33; // x0
__int64 v34; // x0
_QWORD *v35; // x0
__int64 v37; // [xsp+68h] [xbp+68h] BYREF
char v38; // [xsp+77h] [xbp+77h] BYREF
__int64 v39; // [xsp+78h] [xbp+78h] BYREF
_QWORD v40[3]; // [xsp+80h] [xbp+80h] BYREF
__int64 v41[2]; // [xsp+98h] [xbp+98h] BYREF
char *v42; // [xsp+A8h] [xbp+A8h]
__int64 (__fastcall **v43[2])(); // [xsp+B0h] [xbp+B0h] BYREF
__int64 (__fastcall **v44)(); // [xsp+C0h] [xbp+C0h] BYREF
__int64 v45[6]; // [xsp+C8h] [xbp+C8h] BYREF
char *v46; // [xsp+F8h] [xbp+F8h]
char *v47; // [xsp+100h] [xbp+100h]
__int64 v48; // [xsp+108h] [xbp+108h] BYREF
__int64 v49; // [xsp+110h] [xbp+110h]
char *v50; // [xsp+118h] [xbp+118h]
char *v51; // [xsp+120h] [xbp+120h]
int v52; // [xsp+128h] [xbp+128h]
__int64 v53[18]; // [xsp+130h] [xbp+130h] BYREF
int v54; // [xsp+1C0h] [xbp+1C0h]
__int64 v55; // [xsp+1C8h] [xbp+1C8h]
v37 = a1;
if ( a4[2] )
a4[1] += 8LL;
else
std::vector<char const*>::__push_back_slow_path<char const*>(a4, &v37);
v9 = *a2;
v10 = *a2 + 24 * a2[1];
while ( 1 )
{
v11 = (__int64 *)a4[1];
v12 = a4[2];
if ( v10 == v9 )
break;
v13 = v9 + 1;
if ( (*(_BYTE *)v9 & 1) != 0 )
v13 = *(_QWORD *)(v9 + 16);
v39 = v13;
if ( (unsigned __int64)v11 >= v12 )
{
std::vector<char const*>::__push_back_slow_path<char const*>(a4, &v39);
}
else
{
if ( v11 )
*v11 = v13;
a4[1] += 8LL;
}
v9 += 24LL;
}
v39 = 0LL;
if ( (unsigned __int64)v11 >= v12 )
{
std::vector<char const*>::__emplace_back_slow_path<decltype(nullptr)>(a4);
}
else
{
if ( v11 )
*v11 = 0LL;
a4[1] += 8LL;
}
v43[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v43[1] = 0LL;
v53[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v53, v45);
v54 = -1;
v53[17] = 0LL;
v43[0] = off_4C1D0;
v44 = off_4C1F8;
v53[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v45);
v42 = 0LL;
v41[0] = 0LL;
v41[1] = 0LL;
v48 = 0LL;
v49 = 0LL;
v45[0] = (__int64)off_4BFE0;
v52 = 24;
v50 = 0LL;
v51 = 0LL;
std::string::operator=(&v48);
v51 = 0LL;
if ( (v52 & 8) != 0 )
{
if ( (v48 & 1) != 0 )
{
v14 = v49;
v15 = v50;
}
else
{
v14 = (unsigned __int8)v48 >> 1;
v15 = (char *)&v48 + 1;
}
v16 = (__int64)&v15[v14];
v17 = (char *)&v48 + 1;
if ( (v48 & 1) != 0 )
v17 = v50;
v45[4] = v16;
v45[2] = (__int64)v17;
v45[3] = (__int64)v17;
v51 = (char *)v16;
}
if ( (v52 & 0x10) != 0 )
{
if ( (v48 & 1) != 0 )
{
v19 = v49;
v18 = v50;
}
else
{
v19 = (unsigned __int8)v48 >> 1;
v18 = (char *)&v48 + 1;
}
v51 = &v18[v19];
v20 = 22LL;
if ( (v48 & 1) != 0 )
v20 = (v48 & 0xFFFFFFFFFFFFFFFELL) - 1;
std::string::resize(&v48, v20, 0LL);
if ( (v48 & 1) != 0 )
{
v22 = v49;
v21 = v50;
}
else
{
v22 = (unsigned __int8)v48 >> 1;
v21 = (char *)&v48 + 1;
}
v47 = &v21[v22];
v45[5] = (__int64)v21;
v46 = v21;
if ( (v52 & 3) != 0 )
v46 = &v21[(int)v19];
}
std::string::~string(v41);
if ( a3 )
{
v25 = (_QWORD *)*a3;
v24 = a3 + 1;
v23 = v25;
v26 = 0LL;
while ( v24 != v23 )
{
v27 = std::operator<<<char>(&v44, (__int64)(v23 + 4));
v28 = std::__put_character_sequence<char,std::char_traits<char>>(v27, (__int64)"=", 1LL);
v29 = std::operator<<<char>(v28, (__int64)(v23 + 7));
v38 = 0;
std::__put_character_sequence<char,std::char_traits<char>>(v29, (__int64)&v38, 1LL);
std::stringbuf::str((__int64)v45, v41);
v30 = (__int64 *)a5[1];
v31 = a5[2];
v32 = v42;
if ( (v41[0] & 1) == 0 )
v32 = (char *)v41 + 1;
v33 = (__int64)&v32[v26];
v39 = v33;
if ( (unsigned __int64)v30 >= v31 )
{
std::vector<char const*>::__push_back_slow_path<char const*>(a5, &v39);
}
else
{
if ( v30 )
*v30 = v33;
a5[1] += 8LL;
}
std::string::~string(v41);
std::stringbuf::str((__int64)v45, v40);
v34 = LOBYTE(v40[0]) >> 1;
if ( (v40[0] & 1) != 0 )
v34 = v40[1];
v26 += v34;
std::string::~string(v40);
v35 = (_QWORD *)v23[1];
if ( v35 )
{
while ( *v35 )
v35 = (_QWORD *)*v35;
}
else
{
while ( 1 )
{
v35 = (_QWORD *)v23[2];
if ( v23 == (_QWORD *)*v35 )
break;
v23 = (_QWORD *)v23[2];
}
}
v23 = v35;
}
}
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v43);
return v55 ^ _stack_chk_guard;
}
// 133F0: using guessed type __int64 __fastcall std::string::resize(_QWORD, _QWORD, _QWORD);
// 13500: using guessed type __int64 __fastcall std::string::operator=(_QWORD);
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
// 1F028: using guessed type __int64 var_168;
//----- (000000000001F458) ----------------------------------------------------
__int64 __fastcall fnv::vnm::exec_program_pspawn(const char *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)
{
int v8; // w19
int v9; // w19
Logger *v10; // x19
unsigned int *errno_ptr; // x0
int (*v12)[2]; // x1
unsigned int v13; // w19
__int64 v14; // x23
char *const *v15; // x5
unsigned int v16; // w23
__int64 v17; // x2
int v19; // w0
char *v20; // x1
unsigned int v21; // w0
int (*v22)[2]; // x1
__int64 v23; // [xsp+68h] [xbp+68h]
__int64 v24[2]; // [xsp+70h] [xbp+70h] BYREF
__pid_t pid; // [xsp+84h] [xbp+84h] BYREF
posix_spawn_file_actions_t v26; // [xsp+88h] [xbp+88h] BYREF
char *v27; // [xsp+D8h] [xbp+D8h]
int v28; // [xsp+E0h] [xbp+E0h] BYREF
int fd; // [xsp+E4h] [xbp+E4h] BYREF
int v30; // [xsp+E8h] [xbp+E8h] BYREF
int v31; // [xsp+ECh] [xbp+ECh] BYREF
int v32; // [xsp+F0h] [xbp+F0h] BYREF
int v33; // [xsp+F4h] [xbp+F4h] BYREF
v27 = 0LL;
v24[0] = a4;
v24[1] = a5;
*(_QWORD *)&v26.__pad[12] = 0LL;
*(_QWORD *)&v26.__pad[14] = 0LL;
std::string::__init(&v26.__pad[12], "", 0LL);
if ( !a1 )
{
v13 = 22;
goto LABEL_20;
}
std::mutex::lock((std::mutex *)&unk_4D010);
v8 = pipe(&v28);
v9 = v8 | pipe(&v30);
if ( !(v9 | pipe(&v32)) )
{
posix_spawn_file_actions_init(&v26);
posix_spawn_file_actions_addclose(&v26, 0);
posix_spawn_file_actions_addclose(&v26, 1);
posix_spawn_file_actions_addclose(&v26, 2);
posix_spawn_file_actions_addclose(&v26, fd);
posix_spawn_file_actions_addclose(&v26, v30);
posix_spawn_file_actions_addclose(&v26, v32);
posix_spawn_file_actions_adddup2(&v26, v28, 0);
posix_spawn_file_actions_adddup2(&v26, v31, 1);
posix_spawn_file_actions_adddup2(&v26, v33, 2);
posix_spawn_file_actions_addclose(&v26, v28);
posix_spawn_file_actions_addclose(&v26, v31);
posix_spawn_file_actions_addclose(&v26, v33);
memset(v26.__pad, 0, 48);
sub_1F028((__int64)a1, v24, 0LL, v26.__pad, &v26.__pad[6]);
v14 = *(_QWORD *)&v26.__pad[8];
v23 = *(_QWORD *)&v26.__pad[6];
v26.__actions = 0LL;
if ( *(_QWORD *)&v26.__pad[8] >= *(_QWORD *)&v26.__pad[10] )
{
std::vector<char const*>::__emplace_back_slow_path<decltype(nullptr)>(&v26.__pad[6]);
}
else
{
if ( *(_QWORD *)&v26.__pad[8] )
**(_QWORD **)&v26.__pad[8] = 0LL;
*(_QWORD *)&v26.__pad[8] += 8LL;
}
v15 = *(char *const **)&v26.__pad[6];
if ( v23 == v14 )
v15 = 0LL;
pid = 0;
v16 = posix_spawn(&pid, a1, &v26, 0LL, *(char *const *__attribute__((__org_arrdim(0,0))) *)v26.__pad, v15);
posix_spawn_file_actions_destroy(&v26);
if ( v16 )
{
Logger::e((Logger *)qword_4D0F8, "posix_spawn: non success rc=%d", v16);
fnv::vnm::close_pipes((fnv::vnm *)&v28, v22);
v13 = v16;
LABEL_17:
std::__vector_base<char const*>::~__vector_base((char **)&v26.__pad[6]);
std::__vector_base<char const*>::~__vector_base((char **)v26.__pad);
goto LABEL_18;
}
if ( (v26.__pad[12] & 1) != 0 )
{
v17 = *(_QWORD *)&v26.__pad[14];
if ( !*(_QWORD *)&v26.__pad[14] )
goto LABEL_15;
v19 = fd;
v20 = v27;
}
else
{
LODWORD(v17) = (int)LOBYTE(v26.__pad[12]) >> 1;
if ( !(_DWORD)v17 )
goto LABEL_15;
v19 = fd;
v17 = (int)v17;
v20 = (char *)&v26.__pad[12] + 1;
}
v21 = write(v19, v20, v17 + 1);
Logger::d((Logger *)qword_4D100, "exec: bytes written: %d", v21);
LABEL_15:
sub_1EB20(&fd);
sub_1EB20(&v28);
sub_1EB20(&v31);
sub_1EB20(&v33);
LODWORD(v26.__actions) = 0;
waitpid(pid, (int *)&v26.__actions, 0);
sub_1EB78(&v32, a3);
sub_1EB78(&v30, a2);
v13 = 1001;
if ( !LOBYTE(v26.__actions) )
v13 = BYTE1(v26.__actions);
goto LABEL_17;
}
v10 = (Logger *)qword_4D0F8;
errno_ptr = (unsigned int *)__get_errno_ptr(&off_4D000);
Logger::e(v10, "Could not allocate pipe fd, errno=%d", *errno_ptr);
fnv::vnm::close_pipes((fnv::vnm *)&v28, v12);
v13 = 24;
LABEL_18:
std::mutex::unlock((std::mutex *)&unk_4D010);
LABEL_20:
std::string::~string(&v26.__pad[12]);
return v13;
}
// 1F51C: variable 'v12' is possibly undefined
// 1F7C4: variable 'v22' is possibly undefined
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D000: using guessed type void *off_4D000;
// 4D0F8: using guessed type __int64 qword_4D0F8;
// 4D100: using guessed type __int64 qword_4D100;
//----- (000000000001F7F8) ----------------------------------------------------
__int64 __fastcall sub_1F7F8(const char *a1, __int64 a2, __int64 a3, __int64 *a4, _QWORD *a5)
{
int v6; // w22
int v7; // w20
__int64 v8; // x0
Logger *v9; // x19
unsigned int *errno_ptr; // x0
int v11; // w19
char *v12; // x5
__int64 v13; // x0
unsigned int v14; // w23
Logger *v15; // x21
unsigned int *v16; // x0
signed int v17; // w21
long double v18; // q0
__int64 v19; // x0
Logger *v20; // x21
unsigned int *v21; // x0
unsigned int v23; // w19
int v27; // [xsp+8Ch] [xbp+8Ch]
unsigned int v28; // [xsp+9Ch] [xbp+9Ch] BYREF
__int64 v29; // [xsp+A0h] [xbp+A0h] BYREF
char *v30[3]; // [xsp+A8h] [xbp+A8h] BYREF
char *v31; // [xsp+C0h] [xbp+C0h] BYREF
_QWORD *v32; // [xsp+C8h] [xbp+C8h]
unsigned __int64 v33; // [xsp+D0h] [xbp+D0h]
char *v34[3]; // [xsp+D8h] [xbp+D8h] BYREF
char *v35[3]; // [xsp+F0h] [xbp+F0h] BYREF
int v36; // [xsp+108h] [xbp+108h] BYREF
int fd; // [xsp+10Ch] [xbp+10Ch]
int v38; // [xsp+110h] [xbp+110h] BYREF
int v39; // [xsp+114h] [xbp+114h]
int v40[4]; // [xsp+118h] [xbp+118h] BYREF
if ( !a1 )
return 22LL;
memset(v30, 0, sizeof(v30));
v31 = 0LL;
v32 = 0LL;
v33 = 0LL;
sub_1F028((__int64)a1, a4, a5, v30, &v31);
v35[0] = 0LL;
if ( (unsigned __int64)v32 >= v33 )
{
std::vector<char const*>::__emplace_back_slow_path<decltype(nullptr)>(&v31);
}
else
{
if ( v32 )
*v32 = 0LL;
++v32;
}
std::mutex::lock((std::mutex *)&unk_4D010);
std::vector<char const*>::vector(v35, (__int64)v30);
std::vector<char const*>::vector(v34, (__int64)&v31);
v27 = -1;
v6 = 0;
do
{
++v6;
v36 = -1;
fd = -1;
v38 = -1;
v39 = -1;
v7 = pipe(&v36);
v8 = v7 | (unsigned int)pipe(&v38);
if ( (_DWORD)v8 )
{
v9 = (Logger *)qword_4D0F8;
errno_ptr = (unsigned int *)__get_errno_ptr(v8);
Logger::e(v9, "Could not allocate pipe fd, errno=%d", *errno_ptr);
v11 = 23;
goto LABEL_34;
}
v40[1] = fd;
v12 = v34[0];
v40[2] = v39;
if ( v34[0] == v34[1] )
v12 = 0LL;
v40[0] = 0;
v13 = spawn(a1, 3LL, v40, 0LL, v35[0], v12);
v14 = v13;
if ( (_DWORD)v13 == -1 )
{
v15 = (Logger *)qword_4D0F8;
v16 = (unsigned int *)__get_errno_ptr(v13);
Logger::e(v15, "%s: Spawn returned -1 with errno: %d", "spawnWithRetry", *v16);
if ( v6 > 2 )
{
Logger::e(
(Logger *)qword_4D0F8,
"%s: (%d/%d) Failed to spawn. Max attempts hit, not retrying",
"spawnWithRetry",
(unsigned int)v6,
3LL);
v27 = 1001;
}
else
{
v17 = rand() % 490 + 10;
Logger::e(
(Logger *)qword_4D0F8,
"%s: (%d/%d) Failed to spawn, retrying in %d ms",
"spawnWithRetry",
(unsigned int)v6,
3LL,
(unsigned int)v17);
if ( v17 > 0 )
{
*(__n128 *)&v18 = sub_2C3C8(v17);
if ( (sub_2C250(v18, *(long double *)&xmmword_1FC60) & 0x80000000) != 0 )
v29 = 1000000LL * v17;
else
v29 = 0x7FFFFFFFFFFFFFFFLL;
std::this_thread::sleep_for(&v29);
}
}
}
else
{
close(fd);
close(v39);
v28 = 0;
v19 = waitpid(v14, (int *)&v28, 0);
if ( (_DWORD)v19 == -1 )
{
v20 = (Logger *)qword_4D0F8;
v21 = (unsigned int *)__get_errno_ptr(v19);
Logger::e(v20, "%s: Timed out and will be killed. retVal: %d, errno: %d", "spawnWithRetry", 0xFFFFFFFFLL, *v21);
kill(v14, 9);
}
else if ( (_BYTE)v28 )
{
if ( (v28 & 0xFF00) != 0 )
Logger::e((Logger *)qword_4D0F8, "%s: Terminated abnormally: %d", "spawnWithRetry", v28);
else
Logger::e((Logger *)qword_4D0F8, "%s: Terminated with signal: %d", "spawnWithRetry", v28 & 0x7F);
}
else if ( BYTE1(v28) )
{
Logger::e(
(Logger *)qword_4D0F8,
"%s: Child process terminated normally but returned a non-zero exit code (error), exit status: %d",
"spawnWithRetry",
BYTE1(v28));
sub_1EB78(&v38, a3);
}
else
{
Logger::d((Logger *)qword_4D0F8, "%s: SPAWN success, pid=%d!", "spawnWithRetry", v14);
sub_1EB78(&v36, a2);
sub_1EB78(&v38, a3);
v27 = v14;
}
}
}
while ( v14 == -1 && v6 <= 2 );
v11 = v27;
LABEL_34:
std::__vector_base<char const*>::~__vector_base(v34);
std::__vector_base<char const*>::~__vector_base(v35);
if ( v11 == -1 )
{
Logger::e((Logger *)qword_4D0F8, "%s: Failed to spawn: %s", "spawn_process_qnx", a1);
v23 = 1001;
}
else
{
Logger::i((Logger *)qword_4D0F8, "%s: %s spawned successfully!", "spawn_process_qnx", a1);
v23 = 0;
}
std::mutex::unlock((std::mutex *)&unk_4D010);
std::__vector_base<char const*>::~__vector_base(&v31);
std::__vector_base<char const*>::~__vector_base(v30);
return v23;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13920: using guessed type __int64 __fastcall spawn(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 13A80: using guessed type __int64 __fastcall std::this_thread::sleep_for(_QWORD);
// 1FC60: using guessed type __int128 xmmword_1FC60;
// 4D0F8: using guessed type __int64 qword_4D0F8;
//----- (000000000001FC70) ----------------------------------------------------
__int64 __fastcall fnv::vnm::exec_program(const char *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)
{
__int64 v9[2]; // [xsp+40h] [xbp+40h] BYREF
__int64 v10[3]; // [xsp+50h] [xbp+50h] BYREF
v9[0] = a4;
v9[1] = a5;
memset(v10, 0, sizeof(v10));
std::string::__init(v10, "", 0LL);
LODWORD(a1) = sub_1F7F8(a1, a2, a3, v9, 0LL);
std::string::~string(v10);
return (unsigned int)a1;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
//----- (000000000001FD30) ----------------------------------------------------
__int64 __fastcall fnv::vnm::send_to(__int64 a1, const char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)
{
__int64 v7[2]; // [xsp+10h] [xbp+10h] BYREF
v7[0] = a5;
v7[1] = a6;
return sub_1F7F8(a2, a3, a4, v7, 0LL);
}
//----- (000000000001FD5C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::exec_program_in_env(
const char *a1,
__int64 a2,
__int64 a3,
_QWORD *a4,
__int64 a5,
__int64 a6)
{
__int64 v10; // x2
_QWORD *v11; // x4
unsigned int v12; // w21
__int64 v14[2]; // [xsp+40h] [xbp+40h] BYREF
__int64 v15[3]; // [xsp+50h] [xbp+50h] BYREF
v10 = a4[2];
v14[0] = a5;
v14[1] = a6;
Logger::d((Logger *)qword_4D100, "There are %zu environmental items", v10);
memset(v15, 0, sizeof(v15));
std::string::__init(v15, "", 0LL);
if ( a4[2] )
v11 = a4;
else
v11 = 0LL;
v12 = sub_1F7F8(a1, a2, a3, v14, v11);
std::string::~string(v15);
return v12;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D100: using guessed type __int64 qword_4D100;
//----- (000000000001FE40) ----------------------------------------------------
__int64 __fastcall std::filebuf::sync(__int64 a1)
{
__int64 v1; // x1
std::bad_cast *exception; // x19
int v4; // w2
int v5; // w22
const void *v6; // x0
__int64 v7; // x20
__int64 result; // x0
__int64 v9; // x20
int v10; // w0
__int64 v11; // x1
__int64 v12; // x4
int v13; // w22
__int64 v14; // x1
__int64 v15; // [xsp+40h] [xbp+40h] BYREF
if ( !*(_QWORD *)(a1 + 120) )
return 0LL;
v1 = *(_QWORD *)(a1 + 128);
if ( !v1 )
{
exception = (std::bad_cast *)__cxa_allocate_exception(8uLL);
std::bad_cast::bad_cast(exception);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::bad_cast,
(void (__fastcall *)(void *))&std::bad_cast::~bad_cast);
}
v4 = *(_DWORD *)(a1 + 156);
if ( (v4 & 0x10) != 0 )
{
if ( *(_QWORD *)(a1 + 48) == *(_QWORD *)(a1 + 40)
|| (*(unsigned int (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 104LL))(a1, 0xFFFFFFFFLL) != -1 )
{
while ( 1 )
{
v5 = (*(__int64 (__fastcall **)(_QWORD, __int64, _QWORD, _QWORD, __int64 *))(**(_QWORD **)(a1 + 128) + 40LL))(
*(_QWORD *)(a1 + 128),
a1 + 136,
*(_QWORD *)(a1 + 64),
*(_QWORD *)(a1 + 64) + *(_QWORD *)(a1 + 96),
&v15);
v6 = *(const void **)(a1 + 64);
v7 = v15 - (_QWORD)v6;
if ( v7 != fwrite(v6, 1uLL, v15 - (_QWORD)v6, *(FILE **)(a1 + 120)) )
break;
if ( v5 != 1 )
{
if ( v5 == 2 )
return 0xFFFFFFFFLL;
if ( fflush(*(FILE **)(a1 + 120)) )
return 0xFFFFFFFFLL;
else
return 0LL;
}
}
}
return 0xFFFFFFFFLL;
}
result = 0LL;
if ( (v4 & 8) == 0 )
return result;
v15 = *(_QWORD *)(a1 + 144);
if ( *(_BYTE *)(a1 + 162) )
{
v9 = *(_QWORD *)(a1 + 32) - *(_QWORD *)(a1 + 24);
}
else
{
v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 48LL))(v1);
v12 = *(_QWORD *)(a1 + 24);
v11 = *(_QWORD *)(a1 + 32);
v9 = *(_QWORD *)(a1 + 80) - *(_QWORD *)(a1 + 72);
if ( v10 <= 0 )
{
v13 = 0;
if ( v11 != v12 )
{
v13 = 1;
v9 += *(_QWORD *)(a1 + 72)
- *(_QWORD *)(a1 + 64)
- (*(int (__fastcall **)(_QWORD, __int64 *, _QWORD))(**(_QWORD **)(a1 + 128) + 64LL))(
*(_QWORD *)(a1 + 128),
&v15,
*(_QWORD *)(a1 + 64));
}
goto LABEL_24;
}
v9 += (v11 - v12) * v10;
}
v13 = 0;
LABEL_24:
result = fseeko(*(FILE **)(a1 + 120), -v9, 1);
if ( (_DWORD)result )
return 0xFFFFFFFFLL;
if ( v13 )
*(_QWORD *)(a1 + 136) = v15;
v14 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
*(_QWORD *)(a1 + 72) = v14;
*(_QWORD *)(a1 + 80) = v14;
*(_DWORD *)(a1 + 156) = 0;
return result;
}
//----- (0000000000020060) ----------------------------------------------------
unsigned __int64 __fastcall std::filebuf::seekpos(__int64 a1, unsigned __int64 a2, __off_t a3)
{
__int16 v3; // w22
unsigned __int64 v4; // x23
unsigned int v5; // w21
unsigned __int16 v6; // w24
unsigned __int16 v9; // w25
unsigned __int64 result; // x0
if ( !*(_QWORD *)(a1 + 120) )
return 0LL;
v3 = WORD2(a2);
v4 = HIWORD(a2);
v5 = a2;
v6 = HIWORD(a2);
v9 = WORD2(a2);
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a1 + 48LL))(a1) || fseeko(*(FILE **)(a1 + 120), a3, 0) )
return 0LL;
*(_WORD *)(a1 + 140) = v3;
*(_WORD *)(a1 + 142) = v4;
result = v5 | ((unsigned __int64)v9 << 32) & 0xFFFFFFFFFFFFLL | ((unsigned __int64)v6 << 48);
*(_DWORD *)(a1 + 136) = v5;
return result;
}
//----- (0000000000020110) ----------------------------------------------------
unsigned __int64 __fastcall std::filebuf::seekoff(__int64 a1, __int64 a2, int a3)
{
__int64 v4; // x0
std::bad_cast *exception; // x19
__int64 v8; // x21
bool v9; // zf
int v11; // w2
__off_t v12; // x1
v4 = *(_QWORD *)(a1 + 128);
if ( !v4 )
{
exception = (std::bad_cast *)__cxa_allocate_exception(8uLL);
std::bad_cast::bad_cast(exception);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::bad_cast,
(void (__fastcall *)(void *))&std::bad_cast::~bad_cast);
}
v8 = (*(int (__fastcall **)(__int64))(*(_QWORD *)v4 + 48LL))(v4);
if ( !*(_QWORD *)(a1 + 120) )
return 0LL;
v9 = (int)v8 > 0 || a2 == 0;
if ( !v9 || (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a1 + 48LL))(a1) )
return 0LL;
if ( a3 == 1 )
{
LABEL_14:
v11 = a3;
goto LABEL_15;
}
if ( a3 )
{
if ( a3 != 2 )
return 0LL;
goto LABEL_14;
}
v11 = 0;
LABEL_15:
v12 = 0LL;
if ( (int)v8 > 0 )
v12 = v8 * a2;
if ( !fseeko(*(FILE **)(a1 + 120), v12, v11) )
{
ftello(*(FILE **)(a1 + 120));
return *(unsigned int *)(a1 + 136) | ((unsigned __int64)*(unsigned __int16 *)(a1 + 140) << 32) & 0xFFFFFFFFFFFFLL | ((unsigned __int64)*(unsigned __int16 *)(a1 + 142) << 48);
}
return 0LL;
}
//----- (0000000000020220) ----------------------------------------------------
__int64 __fastcall std::filebuf::imbue(__int64 a1, __int64 a2)
{
__int64 *v4; // x0
__int64 v5; // x1
__int64 result; // x0
void *v7; // x0
unsigned __int64 v8; // x0
__int64 v9; // x1
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 48LL))(a1);
v4 = (__int64 *)std::locale::use_facet(a2, &std::codecvt<char,char,_Mbstatet>::id);
v5 = *v4;
*(_QWORD *)(a1 + 128) = v4;
LODWORD(a2) = *(unsigned __int8 *)(a1 + 162);
result = (*(__int64 (**)(void))(v5 + 56))();
*(_BYTE *)(a1 + 162) = result;
if ( (_DWORD)a2 != (unsigned __int8)result )
{
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
*(_QWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
if ( (_BYTE)result )
{
if ( *(_BYTE *)(a1 + 160) )
{
v7 = *(void **)(a1 + 64);
if ( v7 )
operator delete[](v7);
}
*(_BYTE *)(a1 + 160) = *(_BYTE *)(a1 + 161);
*(_QWORD *)(a1 + 96) = *(_QWORD *)(a1 + 112);
result = *(_QWORD *)(a1 + 104);
*(_BYTE *)(a1 + 161) = 0;
*(_QWORD *)(a1 + 112) = 0LL;
*(_QWORD *)(a1 + 64) = result;
*(_QWORD *)(a1 + 104) = 0LL;
}
else
{
v8 = *(_QWORD *)(a1 + 96);
if ( *(_BYTE *)(a1 + 160) || (v9 = *(_QWORD *)(a1 + 64), v9 == a1 + 88) )
{
*(_QWORD *)(a1 + 112) = v8;
*(_QWORD *)(a1 + 104) = operator new[](v8);
result = 1LL;
*(_BYTE *)(a1 + 161) = 1;
}
else
{
*(_BYTE *)(a1 + 161) = 0;
*(_QWORD *)(a1 + 104) = v9;
*(_QWORD *)(a1 + 112) = v8;
*(_QWORD *)(a1 + 64) = operator new[](v8);
result = 1LL;
*(_BYTE *)(a1 + 160) = 1;
}
}
}
return result;
}
// 136F0: using guessed type __int64 __fastcall std::locale::use_facet(_QWORD, _QWORD);
//----- (0000000000020314) ----------------------------------------------------
__int64 __fastcall std::filebuf::setbuf(__int64 a1, __int64 a2, signed __int64 a3)
{
void *v6; // x0
void *v7; // x0
unsigned __int64 v8; // x0
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
*(_QWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
if ( *(_BYTE *)(a1 + 160) )
{
v6 = *(void **)(a1 + 64);
if ( v6 )
operator delete[](v6);
}
if ( *(_BYTE *)(a1 + 161) )
{
v7 = *(void **)(a1 + 104);
if ( v7 )
operator delete[](v7);
}
*(_QWORD *)(a1 + 96) = a3;
if ( (unsigned __int64)a3 <= 8 )
{
*(_QWORD *)(a1 + 64) = a1 + 88;
*(_QWORD *)(a1 + 96) = 8LL;
}
else
{
if ( ((a2 != 0) & *(_BYTE *)(a1 + 162)) == 0 )
{
*(_QWORD *)(a1 + 64) = operator new[](a3);
*(_BYTE *)(a1 + 160) = 1;
goto LABEL_13;
}
*(_QWORD *)(a1 + 64) = a2;
}
*(_BYTE *)(a1 + 160) = 0;
LABEL_13:
if ( *(_BYTE *)(a1 + 162) )
{
*(_QWORD *)(a1 + 104) = 0LL;
*(_QWORD *)(a1 + 112) = 0LL;
goto LABEL_20;
}
v8 = 8LL;
if ( a3 > 7 )
v8 = a3;
*(_QWORD *)(a1 + 112) = v8;
if ( a2 )
{
*(_QWORD *)(a1 + 104) = a2;
LABEL_20:
*(_BYTE *)(a1 + 161) = 0;
return a1;
}
*(_QWORD *)(a1 + 104) = operator new[](v8);
*(_BYTE *)(a1 + 161) = 1;
return a1;
}
//----- (000000000002040C) ----------------------------------------------------
__int64 __fastcall std::filebuf::~filebuf(__int64 a1)
{
FILE *v1; // x20
void *v3; // x0
void *v4; // x0
v1 = *(FILE **)(a1 + 120);
*(_QWORD *)a1 = off_4C3A8;
if ( v1 )
{
std::filebuf::sync(a1);
if ( !fclose(v1) )
*(_QWORD *)(a1 + 120) = 0LL;
}
if ( *(_BYTE *)(a1 + 160) )
{
v3 = *(void **)(a1 + 64);
if ( v3 )
operator delete[](v3);
}
if ( *(_BYTE *)(a1 + 161) )
{
v4 = *(void **)(a1 + 104);
if ( v4 )
operator delete[](v4);
}
return std::streambuf::~streambuf(a1);
}
// 136D0: using guessed type __int64 __fastcall std::streambuf::~streambuf(_QWORD);
// 4C3A8: using guessed type __int64 (__fastcall *[3])();
//----- (00000000000204AC) ----------------------------------------------------
void __fastcall std::filebuf::~filebuf(void *a1)
{
std::filebuf::~filebuf((__int64)a1);
operator delete(a1);
}
//----- (00000000000204D0) ----------------------------------------------------
__int64 __fastcall std::filebuf::underflow(__int64 a1)
{
int v2; // w1
int v3; // w0
int v4; // w0
__int64 v5; // x1
__int64 v6; // x0
__int64 v7; // x0
__int64 *v8; // x1
unsigned __int64 v9; // x20
__int64 *v10; // x0
size_t v11; // x0
__int64 result; // x0
__int64 v13; // x1
__int64 v14; // x2
__int64 v15; // x1
void *v16; // x0
__int64 v17; // x1
__int64 v18; // x3
size_t v19; // x2
size_t v20; // x1
size_t v21; // x1
__int64 *v22; // x0
std::bad_cast *exception; // x19
__int64 v24; // x2
__int64 v25; // x5
size_t v26; // x3
__int64 v27; // x1
__int64 v28; // x1
__int64 v29; // x2
char v30; // [xsp+3Fh] [xbp+3Fh] BYREF
__int64 v31; // [xsp+40h] [xbp+40h] BYREF
if ( !*(_QWORD *)(a1 + 120) )
return 0xFFFFFFFFLL;
v2 = *(_DWORD *)(a1 + 156);
v3 = 0;
if ( (v2 & 8) == 0 )
{
v4 = *(unsigned __int8 *)(a1 + 162);
*(_QWORD *)(a1 + 40) = 0LL;
*(_QWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
if ( v4 )
{
v5 = *(_QWORD *)(a1 + 64);
v6 = *(_QWORD *)(a1 + 96);
}
else
{
v5 = *(_QWORD *)(a1 + 104);
v6 = *(_QWORD *)(a1 + 112);
}
v7 = v5 + v6;
*(_QWORD *)(a1 + 32) = v7;
*(_QWORD *)(a1 + 16) = v5;
*(_QWORD *)(a1 + 24) = v7;
*(_DWORD *)(a1 + 156) = 8;
v3 = 1;
}
if ( *(_QWORD *)(a1 + 24) )
{
if ( v3 )
{
v9 = 0LL;
goto LABEL_14;
}
LABEL_9:
v9 = (*(_QWORD *)(a1 + 32) - *(_QWORD *)(a1 + 16)) / 2LL;
if ( v9 > 4 )
v9 = 4LL;
LABEL_14:
v10 = *(__int64 **)(a1 + 24);
v8 = *(__int64 **)(a1 + 32);
if ( v10 != v8 )
goto LABEL_33;
goto LABEL_17;
}
v8 = &v31;
*(_QWORD *)(a1 + 32) = &v31;
*(_QWORD *)(a1 + 16) = &v30;
*(_QWORD *)(a1 + 24) = &v31;
if ( !v3 )
goto LABEL_9;
v9 = 0LL;
LABEL_17:
memmove(*(void **)(a1 + 16), (char *)v8 - v9, v9);
if ( *(_BYTE *)(a1 + 162) )
{
v11 = fread(
(void *)(*(_QWORD *)(a1 + 16) + v9),
1uLL,
*(_QWORD *)(a1 + 32) - *(_QWORD *)(a1 + 16) - v9,
*(FILE **)(a1 + 120));
if ( !v11 )
{
LABEL_19:
result = 0xFFFFFFFFLL;
goto LABEL_34;
}
v13 = *(_QWORD *)(a1 + 16);
*(_QWORD *)(a1 + 24) = v13 + v9;
*(_QWORD *)(a1 + 32) = v13 + v9 + v11;
LABEL_32:
result = *(unsigned __int8 *)(v13 + v9);
goto LABEL_34;
}
memmove(*(void **)(a1 + 64), *(const void **)(a1 + 72), *(_QWORD *)(a1 + 80) - *(_QWORD *)(a1 + 72));
v14 = *(_QWORD *)(a1 + 64);
v15 = 8LL;
v16 = (void *)(v14 + *(_QWORD *)(a1 + 80) - *(_QWORD *)(a1 + 72));
*(_QWORD *)(a1 + 72) = v16;
if ( v14 != a1 + 88 )
v15 = *(_QWORD *)(a1 + 96);
v17 = v14 + v15;
v18 = *(_QWORD *)(a1 + 136);
v19 = *(_QWORD *)(a1 + 112) - v9;
*(_QWORD *)(a1 + 80) = v17;
v20 = v17 - (_QWORD)v16;
*(_QWORD *)(a1 + 144) = v18;
if ( v19 > v20 )
v19 = v20;
v21 = fread(v16, 1uLL, v19, *(FILE **)(a1 + 120));
if ( !v21 )
goto LABEL_19;
v22 = *(__int64 **)(a1 + 128);
if ( !v22 )
{
exception = (std::bad_cast *)__cxa_allocate_exception(8uLL);
std::bad_cast::bad_cast(exception);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::bad_cast,
(void (__fastcall *)(void *))&std::bad_cast::~bad_cast);
}
v24 = *(_QWORD *)(a1 + 64);
v25 = *(_QWORD *)(a1 + 16);
v26 = *(_QWORD *)(a1 + 72) + v21;
v27 = *v22;
*(_QWORD *)(a1 + 80) = v26;
if ( (*(unsigned int (__fastcall **)(__int64 *, __int64, __int64, size_t, __int64, unsigned __int64, __int64, __int64 *))(v27 + 32))(
v22,
a1 + 136,
v24,
v26,
a1 + 72,
v25 + v9,
v25 + *(_QWORD *)(a1 + 112),
&v31) != 3 )
{
v13 = *(_QWORD *)(a1 + 16);
result = 0xFFFFFFFFLL;
v29 = v31;
if ( v13 + v9 == v31 )
goto LABEL_34;
*(_QWORD *)(a1 + 24) = v13 + v9;
*(_QWORD *)(a1 + 32) = v29;
goto LABEL_32;
}
v10 = *(__int64 **)(a1 + 64);
v28 = *(_QWORD *)(a1 + 80);
*(_QWORD *)(a1 + 16) = v10;
*(_QWORD *)(a1 + 24) = v10;
*(_QWORD *)(a1 + 32) = v28;
LABEL_33:
result = *(unsigned __int8 *)v10;
LABEL_34:
if ( *(char **)(a1 + 16) == &v30 )
{
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
}
return result;
}
//----- (0000000000020758) ----------------------------------------------------
__int64 __fastcall std::filebuf::overflow(__int64 a1, unsigned int a2)
{
unsigned __int64 v4; // x0
__int64 v5; // x1
__int64 v6; // x23
__int64 v7; // x24
_BYTE *v8; // x0
_BYTE *v9; // x22
__int64 v10; // x0
std::bad_cast *exception; // x19
unsigned int v12; // w28
const void *v13; // x0
__int64 v14; // x26
__int64 v15; // x0
__int64 v16; // x1
char v18; // [xsp+67h] [xbp+67h] BYREF
__int64 v19; // [xsp+68h] [xbp+68h] BYREF
_BYTE *v20; // [xsp+70h] [xbp+70h] BYREF
if ( !*(_QWORD *)(a1 + 120) )
return 0xFFFFFFFFLL;
if ( (*(_DWORD *)(a1 + 156) & 0x10) == 0 )
{
v4 = *(_QWORD *)(a1 + 96);
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
if ( v4 <= 8 )
{
*(_QWORD *)(a1 + 40) = 0LL;
*(_QWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
}
else
{
if ( *(_BYTE *)(a1 + 162) )
{
v5 = *(_QWORD *)(a1 + 64);
}
else
{
v5 = *(_QWORD *)(a1 + 104);
v4 = *(_QWORD *)(a1 + 112);
}
*(_QWORD *)(a1 + 40) = v5;
*(_QWORD *)(a1 + 48) = v5;
*(_QWORD *)(a1 + 56) = v5 + v4 - 1;
}
*(_DWORD *)(a1 + 156) = 16;
}
v6 = *(_QWORD *)(a1 + 40);
v7 = *(_QWORD *)(a1 + 56);
if ( a2 != -1 )
{
if ( !*(_QWORD *)(a1 + 48) )
{
*(_QWORD *)(a1 + 40) = &v18;
*(_QWORD *)(a1 + 48) = &v18;
*(_QWORD *)(a1 + 56) = &v19;
}
*(_BYTE *)(*(_QWORD *)(a1 + 48))++ = a2;
}
v8 = *(_BYTE **)(a1 + 40);
v9 = *(_BYTE **)(a1 + 48);
if ( v9 != v8 )
{
if ( !*(_BYTE *)(a1 + 162) )
{
v19 = *(_QWORD *)(a1 + 64);
while ( 1 )
{
v10 = *(_QWORD *)(a1 + 128);
if ( !v10 )
{
exception = (std::bad_cast *)__cxa_allocate_exception(8uLL);
std::bad_cast::bad_cast(exception);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::bad_cast,
(void (__fastcall *)(void *))&std::bad_cast::~bad_cast);
}
v12 = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD, _QWORD, _BYTE **, _QWORD, _QWORD, __int64 *))(*(_QWORD *)v10 + 24LL))(
v10,
a1 + 136,
*(_QWORD *)(a1 + 40),
*(_QWORD *)(a1 + 48),
&v20,
*(_QWORD *)(a1 + 64),
*(_QWORD *)(a1 + 64) + *(_QWORD *)(a1 + 96),
&v19);
v8 = *(_BYTE **)(a1 + 40);
if ( v8 == v20 )
return 0xFFFFFFFFLL;
if ( v12 == 3 )
{
v9 = *(_BYTE **)(a1 + 48);
break;
}
if ( v12 > 1 )
return 0xFFFFFFFFLL;
v13 = *(const void **)(a1 + 64);
v14 = v19 - (_QWORD)v13;
if ( v14 != fwrite(v13, 1uLL, v19 - (_QWORD)v13, *(FILE **)(a1 + 120)) )
return 0xFFFFFFFFLL;
if ( v12 != 1 )
goto LABEL_29;
v15 = *(_QWORD *)(a1 + 48);
v16 = (__int64)v20;
*(_QWORD *)(a1 + 56) = v15;
*(_QWORD *)(a1 + 40) = v16;
*(_QWORD *)(a1 + 48) = v16 + (int)v15 - (int)v16;
}
}
if ( v9 - v8 != fwrite(v8, 1uLL, v9 - v8, *(FILE **)(a1 + 120)) )
return 0xFFFFFFFFLL;
LABEL_29:
*(_QWORD *)(a1 + 40) = v6;
*(_QWORD *)(a1 + 48) = v6;
*(_QWORD *)(a1 + 56) = v7;
}
if ( a2 == -1 )
return 0LL;
else
return a2;
}
//----- (0000000000020994) ----------------------------------------------------
__int64 __fastcall std::filebuf::pbackfail(__int64 a1, unsigned int a2)
{
unsigned __int64 v2; // x2
if ( !*(_QWORD *)(a1 + 120) )
return 0xFFFFFFFFLL;
v2 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(a1 + 16) >= v2 )
return 0xFFFFFFFFLL;
if ( a2 == -1 )
{
*(_QWORD *)(a1 + 24) = v2 - 1;
return 0LL;
}
else
{
if ( (*(_DWORD *)(a1 + 152) & 0x10) == 0 && *(unsigned __int8 *)(v2 - 1) != (unsigned __int8)a2 )
return 0xFFFFFFFFLL;
*(_QWORD *)(a1 + 24) = v2 - 1;
*(_BYTE *)(v2 - 1) = a2;
return a2;
}
}
//----- (00000000000209F4) ----------------------------------------------------
void __fastcall std::__vector_base<char const*>::~__vector_base(char **a1)
{
char *v2; // x0
char *v3; // x1
v2 = *a1;
if ( v2 )
{
while ( 1 )
{
v3 = a1[1];
if ( v2 == v3 )
break;
a1[1] = v3 - 8;
}
operator delete(v2);
}
}
//----- (0000000000020A20) ----------------------------------------------------
_QWORD *__fastcall std::vector<char const*>::vector(_QWORD *result, __int64 a2)
{
signed __int64 v2; // x21
_QWORD *v4; // x19
__int64 v5; // x20
char *v6; // x20
*result = 0LL;
result[1] = 0LL;
result[2] = 0LL;
v2 = *(_QWORD *)(a2 + 8) - *(_QWORD *)a2;
if ( v2 >> 3 )
{
v4 = result;
if ( (unsigned __int64)(v2 >> 3) > 0x1FFFFFFFFFFFFFFFLL )
std::__vector_base_common<true>::__throw_length_error();
result = (_QWORD *)operator new(v2);
v4[2] = (char *)result + v2;
*v4 = result;
v4[1] = result;
v5 = *(_QWORD *)(a2 + 8) - *(_QWORD *)a2;
if ( v5 > 7 )
{
v6 = (char *)result + v5;
result = memcpy(result, *(const void **)a2, *(_QWORD *)(a2 + 8) - *(_QWORD *)a2);
v4[1] = v6;
}
}
return result;
}
// 13910: using guessed type __int64 std::__vector_base_common<true>::__throw_length_error(void);
//----- (0000000000020ACC) ----------------------------------------------------
__int64 *__fastcall std::operator>><char>(__int64 *a1, __int64 a2)
{
std::ios_base *v4; // x0
__int64 v5; // x22
__int64 v6; // x24
__int64 v7; // x23
_QWORD *v8; // x0
_BYTE *v9; // x1
int v10; // w0
int v11; // w1
_QWORD *v12; // x0
__int64 v13; // x1
__int64 v14; // x2
std::ios_base *v15; // x0
int v16; // w1
char v18[8]; // [xsp+48h] [xbp+48h] BYREF
__int64 v19; // [xsp+50h] [xbp+50h] BYREF
std::istream::sentry::sentry(v18, a1, 0LL);
if ( v18[0] )
{
if ( (*(_BYTE *)a2 & 1) != 0 )
{
**(_BYTE **)(a2 + 16) = 0;
*(_QWORD *)(a2 + 8) = 0LL;
}
else
{
*(_BYTE *)(a2 + 1) = 0;
*(_BYTE *)a2 = 0;
}
v4 = (std::ios_base *)((char *)a1 + *(_QWORD *)(*a1 - 24));
v5 = *((_QWORD *)v4 + 3);
if ( v5 <= 0 )
v5 = 0x7FFFFFFFFFFFFFFFLL;
std::ios_base::getloc(v4);
v6 = std::locale::use_facet(&v19, &std::ctype<char>::id);
v7 = 0LL;
std::locale::~locale((std::locale *)&v19);
do
{
v8 = *(_QWORD **)((char *)a1 + *(_QWORD *)(*a1 - 24) + 40);
v9 = (_BYTE *)v8[3];
if ( (_BYTE *)v8[4] == v9 )
{
v10 = (*(__int64 (__fastcall **)(_QWORD *))(*v8 + 72LL))(v8);
if ( v10 == -1 )
{
v11 = 2;
goto LABEL_18;
}
}
else
{
LOBYTE(v10) = *v9;
}
if ( (unsigned __int8)v10 <= 0x7Fu && (*(_WORD *)(*(_QWORD *)(v6 + 16) + 2LL * (unsigned __int8)v10) & 1) != 0 )
break;
std::string::push_back(a2, (unsigned __int8)v10);
++v7;
v12 = *(_QWORD **)((char *)a1 + *(_QWORD *)(*a1 - 24) + 40);
v13 = v12[3];
if ( v13 == v12[4] )
(*(void (__fastcall **)(_QWORD *))(*v12 + 80LL))(v12);
else
v12[3] = v13 + 1;
}
while ( v5 != v7 );
v11 = 0;
LABEL_18:
v14 = *a1;
*(__int64 *)((char *)a1 + *(_QWORD *)(*a1 - 24) + 24) = 0LL;
if ( !v7 )
v11 |= 4u;
v15 = (std::ios_base *)((char *)a1 + *(_QWORD *)(v14 - 24));
v16 = v11 | *((_DWORD *)v15 + 8);
}
else
{
v15 = (std::ios_base *)((char *)a1 + *(_QWORD *)(*a1 - 24));
v16 = *((_DWORD *)v15 + 8) | 4;
}
std::ios_base::clear(v15, v16);
return a1;
}
// 13550: using guessed type __int64 __fastcall std::istream::sentry::sentry(_QWORD, _QWORD, _QWORD);
// 136F0: using guessed type __int64 __fastcall std::locale::use_facet(_QWORD, _QWORD);
// 13950: using guessed type __int64 __fastcall std::string::push_back(_QWORD, _QWORD);
// 20ACC: using guessed type char var_18[8];
//----- (0000000000020CE4) ----------------------------------------------------
__int64 __fastcall std::__split_buffer<char const*>::__split_buffer(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v5; // x20
__int64 result; // x0
__int64 v8; // x2
a1[3] = 0LL;
a1[4] = a4;
v5 = 8 * a2;
result = 0LL;
if ( a2 )
result = operator new(8 * a2);
v8 = result + 8 * a3;
*a1 = result;
a1[1] = v8;
a1[2] = v8;
a1[3] = result + v5;
return result;
}
//----- (0000000000020D34) ----------------------------------------------------
void __fastcall std::__split_buffer<char const*>::~__split_buffer(__int64 a1)
{
__int64 v1; // x2
__int64 v2; // x1
void *v3; // x0
v1 = *(_QWORD *)(a1 + 8);
while ( 1 )
{
v2 = *(_QWORD *)(a1 + 16);
if ( v2 == v1 )
break;
*(_QWORD *)(a1 + 16) = v2 - 8;
}
v3 = *(void **)a1;
if ( v3 )
operator delete(v3);
}
//----- (0000000000020D60) ----------------------------------------------------
__int64 __fastcall std::vector<char const*>::__swap_out_circular_buffer(__int64 a1, _QWORD *a2)
{
const void *v4; // x1
signed __int64 v5; // x2
void *v6; // x0
const void *v7; // x0
__int64 v8; // x0
__int64 v9; // x0
__int64 result; // x0
v4 = *(const void **)a1;
v5 = *(_QWORD *)(a1 + 8) - *(_QWORD *)a1;
v6 = (void *)(a2[1] - v5);
a2[1] = v6;
if ( v5 > 7 )
memcpy(v6, v4, v5);
v7 = *(const void **)a1;
*(_QWORD *)a1 = a2[1];
a2[1] = v7;
v8 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(a1 + 8) = a2[2];
a2[2] = v8;
v9 = *(_QWORD *)(a1 + 16);
*(_QWORD *)(a1 + 16) = a2[3];
a2[3] = v9;
result = a2[1];
*a2 = result;
return result;
}
//----- (0000000000020DD8) ----------------------------------------------------
__int64 __fastcall std::vector<char const*>::__push_back_slow_path<char const*>(_QWORD *a1, _QWORD *a2)
{
__int64 v4; // x23
unsigned __int64 v5; // x19
unsigned __int64 v6; // x0
__int64 v7; // x1
_QWORD v9[2]; // [xsp+40h] [xbp+40h] BYREF
_QWORD *v10; // [xsp+50h] [xbp+50h]
__int64 v11; // [xsp+68h] [xbp+68h]
v4 = (__int64)(a1 + 2);
v5 = ((__int64)(a1[1] - *a1) >> 3) + 1;
if ( v5 > 0x1FFFFFFFFFFFFFFFLL )
std::__vector_base_common<true>::__throw_length_error();
v6 = (__int64)(a1[2] - *a1) >> 3;
v7 = 0x1FFFFFFFFFFFFFFFLL;
if ( v6 <= 0xFFFFFFFFFFFFFFELL )
{
v7 = 2 * v6;
if ( 2 * v6 < v5 )
v7 = v5;
}
std::__split_buffer<char const*>::__split_buffer(v9, v7, (__int64)(a1[1] - *a1) >> 3, v4);
if ( v10 )
*v10 = *a2;
++v10;
std::vector<char const*>::__swap_out_circular_buffer((__int64)a1, v9);
std::__split_buffer<char const*>::~__split_buffer((__int64)v9);
return v11 ^ _stack_chk_guard;
}
// 13910: using guessed type __int64 std::__vector_base_common<true>::__throw_length_error(void);
//----- (0000000000020ED0) ----------------------------------------------------
__int64 __fastcall std::vector<char const*>::__emplace_back_slow_path<decltype(nullptr)>(_QWORD *a1)
{
__int64 v1; // x22
unsigned __int64 v3; // x19
unsigned __int64 v4; // x0
__int64 v5; // x1
_QWORD v7[2]; // [xsp+30h] [xbp+30h] BYREF
_QWORD *v8; // [xsp+40h] [xbp+40h]
__int64 v9; // [xsp+58h] [xbp+58h]
v1 = (__int64)(a1 + 2);
v3 = ((__int64)(a1[1] - *a1) >> 3) + 1;
if ( v3 > 0x1FFFFFFFFFFFFFFFLL )
std::__vector_base_common<true>::__throw_length_error();
v4 = (__int64)(a1[2] - *a1) >> 3;
v5 = 0x1FFFFFFFFFFFFFFFLL;
if ( v4 <= 0xFFFFFFFFFFFFFFELL )
{
v5 = 2 * v4;
if ( 2 * v4 < v3 )
v5 = v3;
}
std::__split_buffer<char const*>::__split_buffer(v7, v5, (__int64)(a1[1] - *a1) >> 3, v1);
if ( v8 )
*v8 = 0LL;
++v8;
std::vector<char const*>::__swap_out_circular_buffer((__int64)a1, v7);
std::__split_buffer<char const*>::~__split_buffer((__int64)v7);
return v9 ^ _stack_chk_guard;
}
// 13910: using guessed type __int64 std::__vector_base_common<true>::__throw_length_error(void);
//----- (0000000000020FB8) ----------------------------------------------------
void __fastcall sub_20FB8(__int64 (__fastcall ***a1)(), int a2, __int64 a3)
{
__int64 (__fastcall **v6)(); // x0
__int64 v7; // x1
__int64 (__fastcall ***v8)(); // x1
__int64 (__fastcall **v9)(); // x0
void **v10; // x1
if ( a2 )
v6 = off_4C4A0;
else
v6 = *(__int64 (__fastcall ***)())a3;
*a1 = v6;
v7 = 184LL;
if ( !a2 )
v7 = (__int64)*(v6 - 3);
v8 = (__int64 (__fastcall ***)())((char *)a1 + v7);
if ( a2 )
v9 = off_4C4C8;
else
v9 = *(__int64 (__fastcall ***)())(a3 + 24);
*v8 = v9;
std::filebuf::~filebuf((__int64)(a1 + 2));
v10 = (void **)(a3 + 8);
if ( a2 )
v10 = &off_4C470;
std::istream::~istream(a1, v10);
if ( (a2 & 2) != 0 )
std::ios::~ios(a1 + 23);
if ( (a2 & 1) != 0 )
operator delete(a1);
}
// 13400: using guessed type __int64 __fastcall std::ios::~ios(_QWORD);
// 13B90: using guessed type __int64 __fastcall std::istream::~istream(_QWORD, _QWORD);
// 4C470: using guessed type void *;
// 4C4A0: using guessed type __int64 (__fastcall *off_4C4A0[2])();
// 4C4C8: using guessed type __int64 (__fastcall *off_4C4C8[2])();
//----- (0000000000021074) ----------------------------------------------------
void __fastcall std::ifstream::~ifstream(__int64 (__fastcall ***a1)())
{
sub_20FB8(a1, 2, 0LL);
}
//----- (0000000000021080) ----------------------------------------------------
void __fastcall `virtual thunk to'std::ifstream::~ifstream(_QWORD *a1)
{
std::ifstream::~ifstream((__int64 (__fastcall ***)())((char *)a1 + *(_QWORD *)(*a1 - 24LL)));
}
//----- (0000000000021090) ----------------------------------------------------
void __fastcall std::ifstream::~ifstream(__int64 (__fastcall ***a1)())
{
std::ifstream::~ifstream(a1);
operator delete(a1);
}
//----- (00000000000210B4) ----------------------------------------------------
void __fastcall `virtual thunk to'std::ifstream::~ifstream(_QWORD *a1)
{
std::ifstream::~ifstream((__int64 (__fastcall ***)())((char *)a1 + *(_QWORD *)(*a1 - 24LL)));
}
//----- (00000000000210C4) ----------------------------------------------------
void __fastcall std::ifstream::~ifstream(__int64 (__fastcall ***a1)(), __int64 a2)
{
sub_20FB8(a1, 0, a2);
}
//----- (00000000000210D0) ----------------------------------------------------
void __fastcall fnv::vnm::NatRule::~NatRule(fnv::vnm::NatRule *this)
{
*(_QWORD *)this = off_4C748;
fnv::vnm::ConfigElement::~ConfigElement(this);
}
// 4C748: using guessed type void (__fastcall *[2])(fnv::vnm::NatRule *__hidden this);
//----- (00000000000210E4) ----------------------------------------------------
void __fastcall fnv::vnm::NatRule::~NatRule(fnv::vnm::NatRule *this)
{
fnv::vnm::NatRule::~NatRule(this);
operator delete(this);
}
//----- (0000000000021108) ----------------------------------------------------
void __fastcall fnv::vnm::RoutingTunnel::~RoutingTunnel(fnv::vnm::RoutingTunnel *this)
{
unsigned int v2; // w20
__int64 v3; // x3
const char *v4; // x2
unsigned int v5; // w20
unsigned __int8 v6[24]; // [xsp+30h] [xbp+30h] BYREF
*(_QWORD *)this = off_4C5C0;
if ( *((_BYTE *)this + 8) )
{
fnv::vnm::ConfigElement::name(this, (__int64)v6);
v2 = fnv::vnm::DeleteTunnel(v6, 0LL);
std::string::~string(v6);
if ( v2 )
{
v3 = v2;
v4 = "deleting tunnel config";
LABEL_6:
Logger::e((Logger *)qword_4D108, "%s (%d)", v4, v3);
goto LABEL_7;
}
fnv::vnm::ConfigElement::name(this, (__int64)v6);
v5 = fnv::vnm::DestroyCloneIface(v6, 0LL);
std::string::~string(v6);
if ( v5 )
{
v3 = v5;
v4 = (const char *)&unk_31B8F;
goto LABEL_6;
}
}
LABEL_7:
fnv::vnm::ConfigElement::~ConfigElement(this);
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4C5C0: using guessed type void (__fastcall *[2])(fnv::vnm::RoutingTunnel *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
//----- (00000000000211FC) ----------------------------------------------------
void __fastcall fnv::vnm::RoutingTunnel::~RoutingTunnel(fnv::vnm::RoutingTunnel *this)
{
fnv::vnm::RoutingTunnel::~RoutingTunnel(this);
operator delete(this);
}
//----- (0000000000021220) ----------------------------------------------------
void __fastcall fnv::vnm::DefaultRoute::~DefaultRoute(fnv::vnm::DefaultRoute *this)
{
char *v2; // x23
char *v3; // x24
const char *v4; // x2
const char *v5; // x3
unsigned int v6; // w0
unsigned int v7; // w22
int v8; // w1
_QWORD *v9; // x0
__int64 v10; // x3
__int64 v11[3]; // [xsp+50h] [xbp+50h] BYREF
_QWORD v12[3]; // [xsp+68h] [xbp+68h] BYREF
_BYTE v13[24]; // [xsp+80h] [xbp+80h] BYREF
v2 = (char *)this + 72;
v3 = (char *)this + 96;
*(_QWORD *)this = off_4C668;
if ( *((_BYTE *)this + 8) )
{
v4 = (char *)this + 73;
if ( (*((_BYTE *)this + 72) & 1) != 0 )
v4 = (const char *)*((_QWORD *)this + 11);
v5 = (char *)this + 97;
if ( (*((_BYTE *)this + 96) & 1) != 0 )
v5 = (const char *)*((_QWORD *)this + 14);
Logger::d((Logger *)qword_4D110, "being removed ifaddr %s fib %s", v4, v5);
v6 = fnv::vnm::DelDefRoute((__int64)v2, 0LL);
v7 = v6;
if ( v6 )
{
Logger::e((Logger *)qword_4D108, "%s (%d)", "remove default route", v6);
memset(v11, 0, sizeof(v11));
std::string::__init(v11, "Problem removing route.", 23LL);
std::to_string((std::__1 *)v7, v8);
v9 = (_QWORD *)std::string::insert(v13, 0LL, "DelRouteFailure: ");
v10 = v9[1];
v12[0] = *v9;
v12[1] = v10;
v12[2] = v9[2];
v9[2] = 0LL;
*v9 = 0LL;
v9[1] = 0LL;
fnv::vnm::LogWorthy((__int64)v11, "nto/tun_qnx.cpp", 0x20Cu, (__int64)v12);
std::string::~string(v12);
std::string::~string(v13);
std::string::~string(v11);
}
}
std::string::~string(v3);
std::string::~string(v2);
fnv::vnm::ConfigElement::~ConfigElement(this);
}
// 2130C: variable 'v8' is possibly undefined
// 138B0: using guessed type __int64 __fastcall std::string::insert(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4C668: using guessed type void (__fastcall *[2])(fnv::vnm::DefaultRoute *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (00000000000213B4) ----------------------------------------------------
void __fastcall fnv::vnm::DefaultRoute::~DefaultRoute(fnv::vnm::DefaultRoute *this)
{
fnv::vnm::DefaultRoute::~DefaultRoute(this);
operator delete(this);
}
//----- (00000000000213D8) ----------------------------------------------------
void __fastcall fnv::vnm::InternalConnectionPolicy::~InternalConnectionPolicy(fnv::vnm::InternalConnectionPolicy *this)
{
void *v2; // x1
unsigned int v3; // w22
const char *v4; // x21
fnv::vnm *v5; // [xsp+40h] [xbp+40h] BYREF
*(_QWORD *)this = off_4C6D8;
if ( *((_BYTE *)this + 8) )
{
v3 = fnv::vnm::PfOpenFilterAnchor((char **)&v5, (char *)this + 72);
if ( v3 )
{
v4 = "Open anchor context";
}
else
{
v4 = "Remove Port Connect";
v3 = fnv::vnm::PfRemovePeer2PeerPortsAnchorRule(
v5,
(int *)this + 24,
(int *)this + 26,
(int *)this + 25,
(int *)this + 27,
(char *)this + 112,
(_WORD *)this + 57,
(_WORD *)this + 59);
}
fnv::vnm::PfClose(v5, v2);
if ( v3 )
{
Logger::e((Logger *)qword_4D108, "%s (%d)", v4, v3);
*((_DWORD *)this + 3) = v3;
}
}
std::string::~string((char *)this + 72);
fnv::vnm::ConfigElement::~ConfigElement(this);
}
// 21478: variable 'v2' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4C6D8: using guessed type void (__fastcall *[2])(fnv::vnm::InternalConnectionPolicy *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
//----- (00000000000214DC) ----------------------------------------------------
void __fastcall fnv::vnm::InternalConnectionPolicy::~InternalConnectionPolicy(fnv::vnm::InternalConnectionPolicy *this)
{
fnv::vnm::InternalConnectionPolicy::~InternalConnectionPolicy(this);
operator delete(this);
}
//----- (0000000000021500) ----------------------------------------------------
__int64 sub_21500()
{
int v0; // w22
int v1; // w23
int v2; // w21
int v3; // w22
int v4; // w20
int v5; // w21
int v6; // w23
int v7; // w20
int v8; // w22
int v9; // w23
int v10; // w21
int v11; // w22
int v12; // w20
int v13; // w21
int v14; // w20
int v15; // w20
unsigned int v16; // w20
int v17; // w1
__int64 *v18; // x0
__int64 v19; // x3
int v20; // w1
__int64 *v21; // x0
__int64 v22; // x3
fnv::vnm *v23; // x20
int v24; // w22
fnv::vnm *v25; // x20
int v26; // w23
fnv::vnm *v27; // x20
int v28; // w21
fnv::vnm *v29; // x20
int v30; // w22
fnv::vnm *v31; // x20
fnv::vnm *v32; // x21
fnv::vnm *v33; // x20
int v34; // w23
fnv::vnm *v35; // x20
fnv::vnm *v36; // x21
int v37; // w22
fnv::vnm *v38; // x21
int v39; // w23
fnv::vnm *v40; // x20
fnv::vnm *v41; // x20
int v42; // w22
fnv::vnm *v43; // x20
fnv::vnm *v44; // x21
fnv::vnm *v45; // x20
fnv::vnm *v46; // x22
fnv::vnm *v47; // x21
void *v48; // x1
void *v49; // x1
fnv::vnm *v51; // [xsp+58h] [xbp+58h] BYREF
_BYTE v52[24]; // [xsp+60h] [xbp+60h] BYREF
__int64 v53; // [xsp+78h] [xbp+78h] BYREF
__int64 v54; // [xsp+80h] [xbp+80h]
__int64 v55; // [xsp+88h] [xbp+88h]
__int64 v56; // [xsp+90h] [xbp+90h] BYREF
__int64 v57; // [xsp+98h] [xbp+98h]
__int64 v58; // [xsp+A0h] [xbp+A0h]
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/0", 5LL);
v0 = fnv::vnm::PfFlushAnchor((char *)&v56);
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/1", 5LL);
v1 = v0 | fnv::vnm::PfFlushAnchor((char *)&v56);
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/2", 5LL);
v2 = fnv::vnm::PfFlushAnchor((char *)&v56);
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/3", 5LL);
v3 = v2 | fnv::vnm::PfFlushAnchor((char *)&v56) | v1;
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/4", 5LL);
v4 = fnv::vnm::PfFlushAnchor((char *)&v56);
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/5", 5LL);
v5 = v4 | fnv::vnm::PfFlushAnchor((char *)&v56) | v3;
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/6", 5LL);
v6 = fnv::vnm::PfFlushAnchor((char *)&v56);
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/7", 5LL);
v7 = v6 | fnv::vnm::PfFlushAnchor((char *)&v56) | v5;
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/8", 5LL);
v8 = fnv::vnm::PfFlushAnchor((char *)&v56);
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/9", 5LL);
v9 = v8 | fnv::vnm::PfFlushAnchor((char *)&v56) | v7;
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/0", 5LL);
v10 = fnv::vnm::PfFlushAnchor((char *)&v56);
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/a", 5LL);
v11 = v10 | fnv::vnm::PfFlushAnchor((char *)&v56) | v9;
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/b", 5LL);
v12 = fnv::vnm::PfFlushAnchor((char *)&v56);
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/c", 5LL);
v13 = v12 | fnv::vnm::PfFlushAnchor((char *)&v56) | v11;
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/d", 5LL);
v14 = fnv::vnm::PfFlushAnchor((char *)&v56);
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/e", 5LL);
v15 = v14 | fnv::vnm::PfFlushAnchor((char *)&v56) | v13;
std::string::~string(&v56);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "vnm/f", 5LL);
v16 = fnv::vnm::PfFlushAnchor((char *)&v56) | v15;
std::string::~string(&v56);
if ( v16 )
{
Logger::e((Logger *)qword_4D108, "Problem flushing anchors. rc=%d", v16);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "Problem flushing anchors.", 25LL);
std::to_string((std::__1 *)v16, v17);
v18 = (__int64 *)std::string::insert(v52, 0LL, "FlushAnchorsFailure: ");
v19 = v18[1];
v53 = *v18;
v54 = v19;
v55 = v18[2];
*v18 = 0LL;
v18[1] = 0LL;
v18[2] = 0LL;
fnv::vnm::LogWorthy((__int64)&v56, "nto/tun_qnx.cpp", 0x71u, (__int64)&v53);
LABEL_5:
std::string::~string(&v53);
std::string::~string(v52);
std::string::~string(&v56);
return v16;
}
v51 = 0LL;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "vnm", 3LL);
v16 = fnv::vnm::PfOpenFilterAnchor((char **)&v51, (char *)&v56);
std::string::~string(&v56);
if ( v16 )
{
Logger::e((Logger *)qword_4D108, "ERROR PfOpenFilterAnchor, rc=%d", v16);
Logger::e((Logger *)qword_4D108, "error %s (%d)", "Opening PF context", v16);
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "Problem with anchor installation.", 33LL);
std::to_string((std::__1 *)v16, v20);
v21 = (__int64 *)std::string::insert(v52, 0LL, "AnchorsInstallFailure: ");
v22 = v21[1];
v53 = *v21;
v54 = v22;
v55 = v21[2];
*v21 = 0LL;
v21[1] = 0LL;
v21[2] = 0LL;
fnv::vnm::LogWorthy((__int64)&v56, "nto/tun_qnx.cpp", 0x7Cu, (__int64)&v53);
goto LABEL_5;
}
v23 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "0", 1LL);
v24 = fnv::vnm::PfCallAnchor(v23, (__int64)&v56);
std::string::~string(&v56);
v25 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "1", 1LL);
v26 = v24 | fnv::vnm::PfCallAnchor(v25, (__int64)&v56);
std::string::~string(&v56);
v27 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "2", 1LL);
v28 = fnv::vnm::PfCallAnchor(v27, (__int64)&v56);
std::string::~string(&v56);
v29 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "3", 1LL);
v30 = v28 | fnv::vnm::PfCallAnchor(v29, (__int64)&v56) | v26;
std::string::~string(&v56);
v31 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "4", 1LL);
LODWORD(v31) = fnv::vnm::PfCallAnchor(v31, (__int64)&v56);
std::string::~string(&v56);
v32 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "5", 1LL);
LODWORD(v32) = (unsigned int)v31 | fnv::vnm::PfCallAnchor(v32, (__int64)&v56) | v30;
std::string::~string(&v56);
v33 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "6", 1LL);
v34 = fnv::vnm::PfCallAnchor(v33, (__int64)&v56);
std::string::~string(&v56);
v35 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "7", 1LL);
LODWORD(v35) = v34 | fnv::vnm::PfCallAnchor(v35, (__int64)&v56) | (unsigned int)v32;
std::string::~string(&v56);
v36 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "8", 1LL);
v37 = fnv::vnm::PfCallAnchor(v36, (__int64)&v56);
std::string::~string(&v56);
v38 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "9", 1LL);
v39 = v37 | fnv::vnm::PfCallAnchor(v38, (__int64)&v56) | (unsigned int)v35;
std::string::~string(&v56);
v40 = v51;
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "0", 1LL);
LODWORD(v38) = fnv::vnm::PfCallAnchor(v40, (__int64)&v56);
std::string::~string(&v56);
v41 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "a", 1LL);
v42 = (unsigned int)v38 | fnv::vnm::PfCallAnchor(v41, (__int64)&v56) | v39;
std::string::~string(&v56);
v43 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "b", 1LL);
LODWORD(v43) = fnv::vnm::PfCallAnchor(v43, (__int64)&v56);
std::string::~string(&v56);
v44 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "c", 1LL);
LODWORD(v44) = (unsigned int)v43 | fnv::vnm::PfCallAnchor(v44, (__int64)&v56) | v42;
std::string::~string(&v56);
v45 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "d", 1LL);
LODWORD(v45) = fnv::vnm::PfCallAnchor(v45, (__int64)&v56);
std::string::~string(&v56);
v46 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "e", 1LL);
LODWORD(v45) = (unsigned int)v45 | fnv::vnm::PfCallAnchor(v46, (__int64)&v56) | (unsigned int)v44;
std::string::~string(&v56);
v47 = v51;
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "f", 1LL);
v16 = (unsigned int)v45 | fnv::vnm::PfCallAnchor(v47, (__int64)&v56);
std::string::~string(&v56);
if ( v16 )
{
Logger::e((Logger *)qword_4D108, "ERROR PfCallAnchor, rc=%d. Aborting.", v16);
fnv::vnm::PfAbortAnchor(v51, v49);
return v16;
}
return fnv::vnm::PfCommitAnchor(v51, v48);
}
// 218BC: variable 'v17' is possibly undefined
// 219A4: variable 'v20' is possibly undefined
// 21DFC: variable 'v49' is possibly undefined
// 21E0C: variable 'v48' is possibly undefined
// 138B0: using guessed type __int64 __fastcall std::string::insert(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
//----- (0000000000021F0C) ----------------------------------------------------
void __fastcall fnv::vnm::PfAnchor::~PfAnchor(fnv::vnm::PfAnchor *this)
{
unsigned __int64 v1; // x20
fnv::vnm::PfAnchor *v2; // x19
*(_QWORD *)this = off_4C6A0;
if ( *((_BYTE *)this + 8) )
{
v1 = *((int *)this + 17);
v2 = this;
if ( v1 <= 0x10 )
{
Logger::i((Logger *)qword_4D110, "Actually freeing %lu.", *((int *)this + 17));
*((_BYTE *)&qword_4D108 + v1 + 16) = 0;
}
this = v2;
}
fnv::vnm::ConfigElement::~ConfigElement(this);
}
// 4C6A0: using guessed type void (__fastcall *[2])(fnv::vnm::PfAnchor *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (0000000000021F7C) ----------------------------------------------------
void __fastcall fnv::vnm::PfAnchor::~PfAnchor(fnv::vnm::PfAnchor *this)
{
fnv::vnm::PfAnchor::~PfAnchor(this);
operator delete(this);
}
//----- (0000000000021FA0) ----------------------------------------------------
void __fastcall fnv::vnm::VlanIface::~VlanIface(fnv::vnm::VlanIface *this)
{
fnv::vnm::VlanIface *v1; // x21
unsigned int v2; // w20
int v3; // w1
_QWORD *v4; // x0
__int64 v5; // x3
_BYTE v6[24]; // [xsp+40h] [xbp+40h] BYREF
_QWORD v7[3]; // [xsp+58h] [xbp+58h] BYREF
__int64 v8[3]; // [xsp+70h] [xbp+70h] BYREF
*(_QWORD *)this = off_4C630;
if ( *((_BYTE *)this + 8) )
{
v1 = this;
fnv::vnm::ConfigElement::name(this, (__int64)v8);
v2 = fnv::vnm::DestroyCloneIface((unsigned __int8 *)v8, 0LL);
std::string::~string(v8);
if ( v2 )
{
Logger::e((Logger *)qword_4D108, "%s (%d)", "deleting vlan interface", v2);
memset(v8, 0, sizeof(v8));
std::string::__init(v8, "Problem removing iface", 22LL);
std::to_string((std::__1 *)v2, v3);
v4 = (_QWORD *)std::string::insert(v6, 0LL, "DelVlanFailure: ");
v5 = v4[1];
v7[0] = *v4;
v7[1] = v5;
v7[2] = v4[2];
v4[2] = 0LL;
*v4 = 0LL;
v4[1] = 0LL;
fnv::vnm::LogWorthy((__int64)v8, "nto/tun_qnx.cpp", 0x1B8u, (__int64)v7);
std::string::~string(v7);
std::string::~string(v6);
std::string::~string(v8);
}
this = v1;
}
fnv::vnm::ConfigElement::~ConfigElement(this);
}
// 2205C: variable 'v3' is possibly undefined
// 138B0: using guessed type __int64 __fastcall std::string::insert(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4C630: using guessed type void (__fastcall *[2])(fnv::vnm::VlanIface *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
//----- (00000000000220F0) ----------------------------------------------------
void __fastcall fnv::vnm::VlanIface::~VlanIface(fnv::vnm::VlanIface *this)
{
fnv::vnm::VlanIface::~VlanIface(this);
operator delete(this);
}
//----- (0000000000022114) ----------------------------------------------------
void __fastcall fnv::vnm::AddressConfig::~AddressConfig(fnv::vnm::AddressConfig *this)
{
fnv::vnm::AddressConfig *v1; // x21
unsigned int v2; // w20
int v3; // w1
_QWORD *v4; // x0
__int64 v5; // x3
_BYTE v6[24]; // [xsp+40h] [xbp+40h] BYREF
_QWORD v7[3]; // [xsp+58h] [xbp+58h] BYREF
__int64 v8[3]; // [xsp+70h] [xbp+70h] BYREF
*(_QWORD *)this = off_4C5F8;
if ( *((_BYTE *)this + 8) )
{
v1 = this;
fnv::vnm::ConfigElement::name(this, (__int64)v8);
v2 = fnv::vnm::DelIfaceAddr((__int64)v8, 0LL);
std::string::~string(v8);
if ( v2 )
{
Logger::e((Logger *)qword_4D108, "%s (%d)", "deleting address config", v2);
memset(v8, 0, sizeof(v8));
std::string::__init(v8, "Problem Removing address", 24LL);
std::to_string((std::__1 *)v2, v3);
v4 = (_QWORD *)std::string::insert(v6, 0LL, "DelAddrFailure: ");
v5 = v4[1];
v7[0] = *v4;
v7[1] = v5;
v7[2] = v4[2];
v4[2] = 0LL;
*v4 = 0LL;
v4[1] = 0LL;
fnv::vnm::LogWorthy((__int64)v8, "nto/tun_qnx.cpp", 0x15Bu, (__int64)v7);
std::string::~string(v7);
std::string::~string(v6);
std::string::~string(v8);
}
this = v1;
}
fnv::vnm::ConfigElement::~ConfigElement(this);
}
// 221D0: variable 'v3' is possibly undefined
// 138B0: using guessed type __int64 __fastcall std::string::insert(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4C5F8: using guessed type void (__fastcall *[2])(fnv::vnm::AddressConfig *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
//----- (0000000000022264) ----------------------------------------------------
void __fastcall fnv::vnm::AddressConfig::~AddressConfig(fnv::vnm::AddressConfig *this)
{
fnv::vnm::AddressConfig::~AddressConfig(this);
operator delete(this);
}
//----- (0000000000022288) ----------------------------------------------------
void __fastcall fnv::vnm::RoutingPolicy::~RoutingPolicy(fnv::vnm::RoutingPolicy *this)
{
char *v2; // x20
unsigned int v3; // w0
v2 = (char *)this + 72;
*(_QWORD *)this = off_4C710;
if ( *((_BYTE *)this + 8) )
{
v3 = fnv::vnm::PfFlushAnchor((char *)this + 72);
if ( v3 )
Logger::e((Logger *)qword_4D108, "From pfctl: %d", v3);
}
std::string::~string(v2);
fnv::vnm::ConfigElement::~ConfigElement(this);
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4C710: using guessed type void (__fastcall *[2])(fnv::vnm::RoutingPolicy *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
//----- (00000000000222F0) ----------------------------------------------------
void __fastcall fnv::vnm::RoutingPolicy::~RoutingPolicy(fnv::vnm::RoutingPolicy *this)
{
fnv::vnm::RoutingPolicy::~RoutingPolicy(this);
operator delete(this);
}
//----- (0000000000022314) ----------------------------------------------------
void (__fastcall **__fastcall fnv::vnm::RoutingTunnel::RoutingTunnel(
_QWORD *a1,
__int64 a2))(fnv::vnm::RoutingTunnel *__hidden this)
{
void (__fastcall **result)(fnv::vnm::RoutingTunnel *__hidden); // x0
fnv::vnm::ConfigElement::ConfigElement((__int64)a1, a2);
result = off_4C5C0;
*a1 = off_4C5C0;
return result;
}
// 4C5C0: using guessed type void (__fastcall *off_4C5C0[2])(fnv::vnm::RoutingTunnel *__hidden this);
//----- (0000000000022344) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::RoutingTunnel::moveMe@<X0>(fnv::vnm::RoutingTunnel *this@<X0>, _QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0x48uLL);
fnv::vnm::RoutingTunnel::RoutingTunnel(v4, (__int64)this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (00000000000223D4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::RoutingTunnel::RoutingTunnel(__int64 a1, __int64 a2)
{
__int64 result; // x0
fnv::vnm::ConfigElement::ConfigElement(a1, a2);
*(_QWORD *)a1 = off_4C5C0;
result = 1LL;
*(_BYTE *)(a1 + 8) = 1;
return result;
}
// 4C5C0: using guessed type void (__fastcall *off_4C5C0[2])(fnv::vnm::RoutingTunnel *__hidden this);
//----- (000000000002240C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::RoutingTunnel::RoutingTunnel(
__int64 a1,
unsigned __int8 *a2,
char *a3,
char *a4,
__int64 a5,
__int64 a6)
{
unsigned __int64 v11; // x2
unsigned int CloneIface; // w0
const char *v13; // x2
__int64 result; // x0
fnv::vnm::ConfigElement::ConfigElement(a1, (__int64)a2);
*(_QWORD *)a1 = off_4C5C0;
v11 = (int)std::stoi(a6, 0LL, 10LL);
if ( v11 > 0xE )
Logger::w((Logger *)qword_4D108, "WARN: fib number too large: %lu", v11);
CloneIface = fnv::vnm::CreateCloneIface(a2, 0LL);
if ( CloneIface )
{
v13 = "tunnel create";
LABEL_13:
*(_DWORD *)(a1 + 12) = CloneIface;
return Logger::e((Logger *)qword_4D108, "%s (%d)", v13, CloneIface);
}
CloneIface = fnv::vnm::SetGreSA((__int64)a2, a3, 0LL);
if ( CloneIface )
{
v13 = "Setting tunnel local address";
goto LABEL_13;
}
CloneIface = fnv::vnm::SetGreDA((__int64)a2, a4, 0LL);
if ( CloneIface )
{
v13 = "Setting tunnel remote address";
}
else
{
CloneIface = fnv::vnm::SetIfaceLink1Flag(a2, 0LL);
v13 = "Setting interface flag";
}
*(_DWORD *)(a1 + 12) = CloneIface;
if ( CloneIface )
return Logger::e((Logger *)qword_4D108, "%s (%d)", v13, CloneIface);
result = 1LL;
*(_BYTE *)(a1 + 8) = 1;
return result;
}
// 13490: using guessed type __int64 __fastcall std::stoi(_QWORD, _QWORD, _QWORD);
// 4C5C0: using guessed type void (__fastcall *off_4C5C0[2])(fnv::vnm::RoutingTunnel *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
//----- (00000000000225D0) ----------------------------------------------------
void (__fastcall **__fastcall fnv::vnm::AddressConfig::AddressConfig(
_QWORD *a1,
__int64 a2))(fnv::vnm::AddressConfig *__hidden this)
{
void (__fastcall **result)(fnv::vnm::AddressConfig *__hidden); // x0
fnv::vnm::ConfigElement::ConfigElement((__int64)a1, a2);
result = off_4C5F8;
*a1 = off_4C5F8;
return result;
}
// 4C5F8: using guessed type void (__fastcall *off_4C5F8[2])(fnv::vnm::AddressConfig *__hidden this);
//----- (0000000000022600) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::AddressConfig::moveMe@<X0>(fnv::vnm::AddressConfig *this@<X0>, _QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0x48uLL);
fnv::vnm::AddressConfig::AddressConfig(v4, (__int64)this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (0000000000022690) ----------------------------------------------------
__int64 __fastcall fnv::vnm::AddressConfig::AddressConfig(__int64 a1, __int64 a2)
{
__int64 result; // x0
fnv::vnm::ConfigElement::ConfigElement(a1, a2);
*(_QWORD *)a1 = off_4C5F8;
result = 1LL;
*(_BYTE *)(a1 + 8) = 1;
return result;
}
// 4C5F8: using guessed type void (__fastcall *off_4C5F8[2])(fnv::vnm::AddressConfig *__hidden this);
//----- (00000000000226C8) ----------------------------------------------------
#error "22768: call analysis failed (funcsize=86)"
//----- (000000000002282C) ----------------------------------------------------
void (__fastcall **__fastcall fnv::vnm::VlanIface::VlanIface(
_QWORD *a1,
__int64 a2))(fnv::vnm::VlanIface *__hidden this)
{
void (__fastcall **result)(fnv::vnm::VlanIface *__hidden); // x0
fnv::vnm::ConfigElement::ConfigElement((__int64)a1, a2);
result = off_4C630;
*a1 = off_4C630;
return result;
}
// 4C630: using guessed type void (__fastcall *off_4C630[2])(fnv::vnm::VlanIface *__hidden this);
//----- (000000000002285C) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::VlanIface::moveMe@<X0>(fnv::vnm::VlanIface *this@<X0>, _QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0x48uLL);
fnv::vnm::VlanIface::VlanIface(v4, (__int64)this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (00000000000228EC) ----------------------------------------------------
__int64 __fastcall fnv::vnm::VlanIface::VlanIface(__int64 a1, __int64 a2)
{
__int64 result; // x0
fnv::vnm::ConfigElement::ConfigElement(a1, a2);
*(_QWORD *)a1 = off_4C630;
result = 1LL;
*(_BYTE *)(a1 + 8) = 1;
return result;
}
// 4C630: using guessed type void (__fastcall *off_4C630[2])(fnv::vnm::VlanIface *__hidden this);
//----- (0000000000022924) ----------------------------------------------------
#error "22A40: call analysis failed (funcsize=72)"
//----- (0000000000022A58) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DefaultRoute::DefaultRoute(_QWORD *a1, __int64 a2)
{
fnv::vnm::ConfigElement::ConfigElement((__int64)a1, a2);
*a1 = off_4C668;
std::string::basic_string(a1 + 9, a2 + 72);
return std::string::basic_string(a1 + 12, a2 + 96);
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 4C668: using guessed type void (__fastcall *off_4C668[2])(fnv::vnm::DefaultRoute *__hidden this);
//----- (0000000000022AD4) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::DefaultRoute::moveMe@<X0>(fnv::vnm::DefaultRoute *this@<X0>, _QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0x78uLL);
fnv::vnm::DefaultRoute::DefaultRoute(v4, (__int64)this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (0000000000022B64) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DefaultRoute::DefaultRoute(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v8; // x23
const char *v9; // x2
std::__1 *v10; // x0
__int64 v11; // x1
__int64 v12; // x0
unsigned int v13; // w0
__int64 v15; // [xsp+40h] [xbp+40h] BYREF
__int64 v16; // [xsp+48h] [xbp+48h]
__int64 v17; // [xsp+50h] [xbp+50h]
__int64 v18; // [xsp+58h] [xbp+58h]
fnv::vnm::ConfigElement::ConfigElement(a1, a2);
*(_QWORD *)a1 = off_4C668;
v8 = a1 + 72;
std::string::basic_string(v8, a3);
std::string::basic_string(a1 + 96, a4);
v9 = (const char *)(a4 + 1);
if ( (*(_BYTE *)a4 & 1) != 0 )
v9 = *(const char **)(a4 + 16);
Logger::d((Logger *)qword_4D110, "Passed svc level: %s", v9);
v10 = (std::__1 *)(int)std::stoi(a4, 0LL, 10LL);
if ( (unsigned __int64)v10 - 1 > 0xD )
{
if ( (*(_BYTE *)(a1 + 96) & 1) != 0 )
{
**(_BYTE **)(a1 + 112) = 0;
*(_QWORD *)(a1 + 104) = 0LL;
}
else
{
*(_BYTE *)(a1 + 97) = 0;
*(_BYTE *)(a1 + 96) = 0;
}
}
else
{
std::to_string(v10, (unsigned __int64)v10 - 1);
if ( (*(_BYTE *)(a1 + 96) & 1) != 0 )
{
**(_BYTE **)(a1 + 112) = 0;
*(_QWORD *)(a1 + 104) = 0LL;
}
else
{
*(_BYTE *)(a1 + 97) = 0;
*(_BYTE *)(a1 + 96) = 0;
}
std::string::reserve(a1 + 96, 0LL);
v11 = v16;
*(_QWORD *)(a1 + 96) = v15;
*(_QWORD *)(a1 + 104) = v11;
*(_QWORD *)(a1 + 112) = v17;
v15 = 0LL;
v16 = 0LL;
v17 = 0LL;
std::string::~string(&v15);
}
v12 = *(_BYTE *)(a1 + 72) >> 1;
if ( (*(_BYTE *)(a1 + 72) & 1) != 0 )
v12 = *(_QWORD *)(v8 + 8);
if ( !v12 )
{
*(_DWORD *)(a1 + 12) = 6;
LABEL_17:
*(_BYTE *)(a1 + 8) = (unsigned __int8)&dword_0 + 1;
return v18 ^ _stack_chk_guard;
}
v13 = fnv::vnm::AddDefRoute(v8, 0LL);
*(_DWORD *)(a1 + 12) = v13;
if ( !v13 )
goto LABEL_17;
Logger::e((Logger *)qword_4D108, "%s (%d)", "configure default route", v13);
return v18 ^ _stack_chk_guard;
}
// 0: using guessed type int dword_0;
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13490: using guessed type __int64 __fastcall std::stoi(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A30: using guessed type __int64 __fastcall std::string::reserve(_QWORD, _QWORD);
// 4C668: using guessed type void (__fastcall *off_4C668[2])(fnv::vnm::DefaultRoute *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (0000000000022D74) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DefaultRoute::DefaultRoute(__int64 a1, __int64 a2)
{
_QWORD v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 v6[4]; // [xsp+60h] [xbp+60h] BYREF
fnv::vnm::GetIfAddress(a2, 0LL, v5);
memset(v6, 0, 24);
std::string::__init(v6, "", 0LL);
fnv::vnm::DefaultRoute::DefaultRoute(a1, a2, (__int64)v5, (__int64)v6);
std::string::~string(v6);
std::string::~string(v5);
return v6[3] ^ _stack_chk_guard;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
//----- (0000000000022E48) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAnchor::PfAnchor(__int64 a1, __int64 a2)
{
__int64 result; // x0
fnv::vnm::ConfigElement::ConfigElement(a1, a2);
*(_QWORD *)a1 = off_4C6A0;
result = *(unsigned int *)(a2 + 68);
*(_DWORD *)(a1 + 68) = result;
return result;
}
// 4C6A0: using guessed type void (__fastcall *off_4C6A0[2])(fnv::vnm::PfAnchor *__hidden this);
//----- (0000000000022E84) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::PfAnchor::moveMe@<X0>(fnv::vnm::PfAnchor *this@<X0>, _QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0x48uLL);
fnv::vnm::PfAnchor::PfAnchor((__int64)v4, (__int64)this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (0000000000022F14) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAnchor::PfAnchor(fnv::vnm::PfAnchor *this)
{
__int64 v2; // x2
int v3; // w0
__int64 v5[4]; // [xsp+30h] [xbp+30h] BYREF
memset(v5, 0, 24);
std::string::__init(v5, "anchor", 6LL);
fnv::vnm::ConfigElement::ConfigElement((__int64)this, (__int64)v5);
std::string::~string(v5);
v2 = 0LL;
*(_QWORD *)this = off_4C6A0;
while ( byte_4D118[v2] )
{
if ( ++v2 == 16 )
{
v3 = 1001;
goto LABEL_5;
}
}
v3 = v2;
byte_4D118[v2] = 1;
LABEL_5:
*((_DWORD *)this + 17) = v3;
if ( v3 == -1 )
*((_DWORD *)this + 3) = 23;
else
*((_BYTE *)this + 8) = 1;
return v5[3] ^ _stack_chk_guard;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4C6A0: using guessed type void (__fastcall *off_4C6A0[2])(fnv::vnm::PfAnchor *__hidden this);
// 4D118: using guessed type _BYTE[16];
//----- (000000000002301C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAnchor::anchor(fnv::vnm::PfAnchor *this)
{
return *((unsigned int *)this + 17);
}
//----- (0000000000023024) ----------------------------------------------------
__int64 __fastcall fnv::vnm::InternalConnectionPolicy::InternalConnectionPolicy(__int64 a1, __int64 a2)
{
__int64 result; // x0
fnv::vnm::ConfigElement::ConfigElement(a1, a2);
*(_QWORD *)a1 = off_4C6D8;
std::string::basic_string(a1 + 72, a2 + 72);
*(_DWORD *)(a1 + 96) = *(_DWORD *)(a2 + 96);
*(_DWORD *)(a1 + 100) = *(_DWORD *)(a2 + 100);
*(_DWORD *)(a1 + 104) = *(_DWORD *)(a2 + 104);
*(_DWORD *)(a1 + 108) = *(_DWORD *)(a2 + 108);
*(_BYTE *)(a1 + 112) = *(_BYTE *)(a2 + 112);
*(_DWORD *)(a1 + 114) = *(_DWORD *)(a2 + 114);
result = *(unsigned int *)(a2 + 118);
*(_DWORD *)(a1 + 118) = result;
return result;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 4C6D8: using guessed type void (__fastcall *off_4C6D8[2])(fnv::vnm::InternalConnectionPolicy *__hidden this);
//----- (00000000000230B0) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::InternalConnectionPolicy::moveMe@<X0>(
fnv::vnm::InternalConnectionPolicy *this@<X0>,
_QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0x80uLL);
fnv::vnm::InternalConnectionPolicy::InternalConnectionPolicy((__int64)v4, (__int64)this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (0000000000023140) ----------------------------------------------------
__int64 __fastcall fnv::vnm::InternalConnectionPolicy::parsePort(__int64 a1, __int64 a2, _WORD *a3)
{
__int64 v5; // x19
unsigned __int64 v6; // x19
unsigned __int64 v7; // x0
unsigned int v10; // w19
_BYTE v11[24]; // [xsp+58h] [xbp+58h] BYREF
_BYTE v12[24]; // [xsp+70h] [xbp+70h] BYREF
v5 = std::string::find(a2, 45LL, 0LL);
std::string::basic_string(v11, a2, 0LL, v5, a2);
if ( v5 == -1 )
std::string::basic_string(v12, v11);
else
std::string::basic_string(v12, a2, v5 + 1, -1LL, a2);
v6 = std::stoul(v11, 0LL, 10LL);
v7 = std::stoul(v12, 0LL, 10LL);
if ( v6 > 0xFFFF || v7 > 0xFFFF )
{
Logger::e((Logger *)qword_4D108, "ERROR %s: Port out of range (%zu , %zu) ", "parsePort", v6);
}
else
{
if ( v6 <= v7 )
{
*a3 = v6;
v10 = 1;
a3[1] = v7;
goto LABEL_15;
}
Logger::e((Logger *)qword_4D108, "ERROR %s: invalid port range (%zu , %zu) ", "parsePort", v6);
}
v10 = 0;
LABEL_15:
std::string::~string(v12);
std::string::~string(v11);
return v10;
}
// 132B0: using guessed type __int64 __fastcall std::stoul(_QWORD, _QWORD, _QWORD);
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 13960: using guessed type __int64 __fastcall std::string::find(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D108: using guessed type __int64 qword_4D108;
//----- (000000000002335C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::InternalConnectionPolicy::validateIP(fnv::vnm::InternalConnectionPolicy *this, int a2)
{
__int64 *v2; // x4
_QWORD v4[4]; // [xsp+18h] [xbp+18h] BYREF
__int64 v5; // [xsp+38h] [xbp+38h] BYREF
v4[0] = 0xFFFF00000A010000LL;
v4[1] = 0xFFFF00000A020000LL;
v4[2] = 0xFFFFFF00C0A80A00LL;
v4[3] = 0xFFFFFF00C0A80100LL;
v2 = (_QWORD *)((char *)v4 + 4);
while ( (a2 & bswap32(*(_DWORD *)v2)) != bswap32(*((_DWORD *)v2 - 1)) )
{
if ( (__int64 *)((char *)&v5 + 4) == ++v2 )
return 0LL;
}
return 1LL;
}
//----- (00000000000233F4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::RoutingPolicy::RoutingPolicy(_QWORD *a1, __int64 a2)
{
fnv::vnm::ConfigElement::ConfigElement((__int64)a1, a2);
*a1 = off_4C710;
return std::string::basic_string(a1 + 9, a2 + 72);
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 4C710: using guessed type void (__fastcall *off_4C710[2])(fnv::vnm::RoutingPolicy *__hidden this);
//----- (0000000000023448) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::RoutingPolicy::moveMe@<X0>(fnv::vnm::RoutingPolicy *this@<X0>, _QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0x60uLL);
fnv::vnm::RoutingPolicy::RoutingPolicy(v4, (__int64)this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (00000000000234D8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::RoutingPolicy::RoutingPolicy(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
unsigned __int8 *a5)
{
const char *v10; // x2
unsigned int v11; // w0
unsigned int v12; // w21
void *v13; // x1
int v14; // w0
fnv::vnm *v16[2]; // [xsp+50h] [xbp+50h] BYREF
fnv::vnm::ConfigElement::ConfigElement(a1, a3);
*(_QWORD *)a1 = off_4C710;
std::string::basic_string(a1 + 72, a2);
v10 = (const char *)(a1 + 73);
if ( (*(_BYTE *)(a1 + 72) & 1) != 0 )
v10 = *(const char **)(a1 + 88);
Logger::d((Logger *)qword_4D110, "Anchor name is: %s", v10);
v11 = fnv::vnm::PfOpenFilterAnchor((char **)v16, (char *)(a1 + 72));
v12 = v11;
if ( v11 )
{
Logger::e((Logger *)qword_4D108, "ERROR PfOpenFilterAnchor, rc=%d", v11);
Logger::e((Logger *)qword_4D108, "%s (%d)", "Open anchor context", v12);
*(_DWORD *)(a1 + 12) = v12;
}
else
{
if ( (unsigned int)fnv::vnm::PfAddPoolAddr((_DWORD *)v16[0], a4, a5)
|| (!fnv::vnm::ValidateIpv4Address(a3)
? (v14 = fnv::vnm::PfAddEgressAnchorRuleIfname((_DWORD *)v16[0], a3))
: (v14 = fnv::vnm::PfAddEgressAnchorRule((_DWORD *)v16[0], a3)),
v14) )
{
fnv::vnm::PfAbortAnchor(v16[0], v13);
}
else
{
fnv::vnm::PfCommitAnchor(v16[0], v13);
}
*(_BYTE *)(a1 + 8) = 1;
}
return (__int64)v16[1] ^ _stack_chk_guard;
}
// 235CC: variable 'v13' is possibly undefined
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 4C710: using guessed type void (__fastcall *off_4C710[2])(fnv::vnm::RoutingPolicy *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (0000000000023668) ----------------------------------------------------
__int64 __fastcall fnv::vnm::RetainProcmgrAbilities(fnv::vnm *this)
{
unsigned int v1; // w21
unsigned int v2; // w22
unsigned int v3; // w23
unsigned int v4; // w24
unsigned int v5; // w0
__int64 result; // x0
unsigned int v7; // w19
unsigned int v8; // w19
v1 = procmgr_ability_lookup("network/bind/privport");
v2 = procmgr_ability_lookup("network/interface/getpriv");
v3 = procmgr_ability_lookup("network/interface/setpriv");
v4 = procmgr_ability_lookup("network/route/set");
v5 = procmgr_ability_lookup("network/socket/rawsock");
if ( (v1 & 0x80000000) != 0 )
{
Logger::e((Logger *)qword_4D108, ":( privport ability lookup: %d", v1);
return -v1;
}
else if ( (v2 & 0x80000000) != 0 )
{
Logger::e((Logger *)qword_4D108, ":( ifget ability lookup: %d", v2);
return -v2;
}
else if ( (v3 & 0x80000000) != 0 )
{
Logger::e((Logger *)qword_4D108, ":( ifset ability lookup: %d", v3);
return -v3;
}
else if ( (v4 & 0x80000000) != 0 )
{
Logger::e((Logger *)qword_4D108, ":( routeset ability lookup: %d", v4);
return -v4;
}
else
{
v7 = v5;
if ( (v5 & 0x80000000) != 0 )
{
Logger::e((Logger *)qword_4D108, ":( rawsock ability lookup: %d", v5);
return -v7;
}
else
{
Logger::i((Logger *)qword_4D110, "procmgr_ability_lookup: ok.");
v8 = procmgr_ability(
0LL,
v1 | 0x20420000,
v2 | 0x20420000,
v3 | 0x20420000,
v4 | 0x20420000,
v7 | 0x20420000,
0xFFFFLL);
result = 0LL;
if ( v8 )
{
Logger::e((Logger *)qword_4D108, "procmgr_ability failed (%d)", v8);
return v8;
}
}
}
return result;
}
// 136B0: using guessed type __int64 __fastcall procmgr_ability_lookup(_QWORD);
// 13860: using guessed type __int64 __fastcall procmgr_ability(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (00000000000237E0) ----------------------------------------------------
__int64 __fastcall fnv::vnm::DaemonInit(__int64 a1)
{
__int64 v2; // x2
__int64 v3; // x3
__int64 v4; // x4
__int64 v5; // x5
__int64 v6; // x6
fnv::vnm *v7; // x0
unsigned int v8; // w0
__int64 v9; // x4
__int64 v10; // x5
__int64 v11; // x6
__int64 v12; // x2
__int64 v13; // x3
__int64 v14; // x4
__int64 v15; // x5
__int64 v16; // x6
__int64 v17; // x0
__int64 v18; // x2
Logger::d((Logger *)qword_4D110, "Clearing procmgr abilities");
v7 = (fnv::vnm *)procmgr_ability(0LL, 537001983LL, v2, v3, v4, v5, v6);
if ( (_DWORD)v7 )
{
Logger::e((Logger *)qword_4D108, "ERROR: procmgr_ability (clear) failed!");
v7 = (fnv::vnm *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 184LL))(a1);
}
v8 = fnv::vnm::RetainProcmgrAbilities(v7);
Logger::d((Logger *)qword_4D110, "RetainProcmgrAbilities: rc=%d.", v8);
if ( (unsigned int)procmgr_ability(0LL, 537002015LL, 537002013LL, 0xFFFFLL, v9, v10, v11) )
{
Logger::e((Logger *)qword_4D108, "ERROR: procmgr_ability (IO / INTERRUPT) failed!");
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 184LL))(a1);
}
Logger::d((Logger *)qword_4D110, "Setting generic nonroot procmgr abilities");
if ( (unsigned int)procmgr_ability(0LL, 537002007LL, 537001996LL, 537002008LL, 537002005LL, 537001993LL, 0xFFFFLL) )
{
Logger::e((Logger *)qword_4D108, "ERROR: procmgr_ability (general) failed!");
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 184LL))(a1);
}
if ( (unsigned int)procmgr_ability(0LL, 537460735LL, v12, v13, v14, v15, v16) )
{
Logger::e((Logger *)qword_4D108, "ERROR: procmgr_ability (lock) failed!");
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 184LL))(a1);
}
v17 = initgroups("vnm", 0xD2u);
if ( !(_DWORD)v17 )
return Logger::i((Logger *)qword_4D110, "initgroups OK");
v18 = *(unsigned int *)__get_errno_ptr(v17);
return Logger::i((Logger *)qword_4D110, "initgroups rc=%d", v18);
}
// 23810: variable 'v2' is possibly undefined
// 23810: variable 'v3' is possibly undefined
// 23810: variable 'v4' is possibly undefined
// 23810: variable 'v5' is possibly undefined
// 23810: variable 'v6' is possibly undefined
// 2386C: variable 'v9' is possibly undefined
// 2386C: variable 'v10' is possibly undefined
// 2386C: variable 'v11' is possibly undefined
// 23910: variable 'v12' is possibly undefined
// 23910: variable 'v13' is possibly undefined
// 23910: variable 'v14' is possibly undefined
// 23910: variable 'v15' is possibly undefined
// 23910: variable 'v16' is possibly undefined
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13860: using guessed type __int64 __fastcall procmgr_ability(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (000000000002398C) ----------------------------------------------------
void (__fastcall **__fastcall fnv::vnm::NatRule::NatRule(_QWORD *a1, __int64 a2))(fnv::vnm::NatRule *__hidden this)
{
void (__fastcall **result)(fnv::vnm::NatRule *__hidden); // x0
fnv::vnm::ConfigElement::ConfigElement((__int64)a1, a2);
result = off_4C748;
*a1 = off_4C748;
return result;
}
// 4C748: using guessed type void (__fastcall *off_4C748[2])(fnv::vnm::NatRule *__hidden this);
//----- (00000000000239BC) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::NatRule::moveMe@<X0>(fnv::vnm::NatRule *this@<X0>, _QWORD *a2@<X8>)
{
fnv::vnm::ConfigElement *v4; // x20
v4 = (fnv::vnm::ConfigElement *)operator new(0x48uLL);
fnv::vnm::NatRule::NatRule(v4, (__int64)this);
fnv::vnm::ConfigElement::wrap(v4, a2);
return a2;
}
//----- (0000000000023A4C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::NatRule::NatRule(__int64 a1, __int64 a2)
{
unsigned int v4; // w20
const char *v5; // x19
void *v6; // x1
char *v7; // x4
char *v8; // x2
void *v10; // x1
fnv::vnm *v11; // [xsp+58h] [xbp+58h] BYREF
_QWORD v12[2]; // [xsp+60h] [xbp+60h] BYREF
char *v13; // [xsp+70h] [xbp+70h]
__int64 v14[2]; // [xsp+78h] [xbp+78h] BYREF
char *v15; // [xsp+88h] [xbp+88h]
__int64 v16[4]; // [xsp+90h] [xbp+90h] BYREF
fnv::vnm::ConfigElement::ConfigElement(a1, a2);
v11 = 0LL;
v12[0] = 0LL;
v12[1] = 0LL;
v13 = 0LL;
*(_QWORD *)a1 = off_4C748;
v14[0] = 0LL;
v14[1] = 0LL;
v15 = 0LL;
memset(v16, 0, 24);
std::string::__init(v16, "nat_vnm", 7LL);
v4 = fnv::vnm::PfOpenNatAnchor((char **)&v11, (char *)v16);
std::string::~string(v16);
if ( v4 )
{
Logger::e((Logger *)qword_4D108, "ERROR PfOpenNatAnchor nat_vnm, rc=%d", v4);
v5 = "Opening PF nat_vnm context";
LABEL_3:
Logger::e((Logger *)qword_4D108, "ERROR PfAddNatAnchorRule, rc=%d. Aborting.", v4);
fnv::vnm::PfAbortAnchor(v11, v6);
goto LABEL_6;
}
v4 = fnv::vnm::PfAddNatPoolAddr(v11, a2);
if ( v4 )
{
v5 = "Add NAT pool addr";
goto LABEL_3;
}
v4 = fnv::vnm::PfAddNatAnchorRule(v11, a2);
if ( v4 )
{
v5 = "Calling PfAddNatAnchorRule";
goto LABEL_3;
}
v4 = fnv::vnm::PfCommitAnchor(v11, v10);
if ( !v4 )
{
*(_BYTE *)(a1 + 8) = 1;
goto LABEL_12;
}
v5 = (const char *)&unk_322CA;
LABEL_6:
v7 = v13;
if ( (v12[0] & 1) == 0 )
v7 = (char *)v12 + 1;
Logger::e((Logger *)qword_4D108, "%s (%d) %s", v5, v4, v7);
v8 = v15;
if ( (v14[0] & 1) == 0 )
v8 = (char *)v14 + 1;
Logger::e((Logger *)qword_4D108, "%s", v8);
LABEL_12:
std::string::~string(v14);
std::string::~string(v12);
return v16[3] ^ _stack_chk_guard;
}
// 23B20: variable 'v6' is possibly undefined
// 23B2C: variable 'v10' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4C748: using guessed type void (__fastcall *off_4C748[2])(fnv::vnm::NatRule *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
//----- (0000000000023C54) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::VlanNameFromGreName@<X0>(char *a1@<X0>, _QWORD *a2@<X8>)
{
unsigned __int8 v4; // w1
__int64 v5; // x0
__int64 v6; // x2
_BYTE *v7; // x1
__int64 v8; // x2
__int64 v9; // x1
__int64 v11; // [xsp+48h] [xbp+48h] BYREF
__int64 v12; // [xsp+50h] [xbp+50h]
__int64 v13; // [xsp+58h] [xbp+58h]
unsigned __int8 v14; // [xsp+60h] [xbp+60h] BYREF
_BYTE v15[15]; // [xsp+61h] [xbp+61h] BYREF
_BYTE *v16; // [xsp+70h] [xbp+70h]
v4 = *a1;
v5 = (unsigned __int8)*a1 >> 1;
if ( (v4 & 1) != 0 )
v5 = *((_QWORD *)a1 + 1);
if ( v5 )
{
v13 = 0LL;
v11 = 0LL;
v12 = 0LL;
std::string::__init(&v11, "vlan", 4LL);
v6 = (unsigned __int8)*a1 >> 1;
if ( (*a1 & 1) != 0 )
v6 = *((_QWORD *)a1 + 1);
std::string::basic_string(&v14, a1, v6 - 1, -1LL, a1);
if ( (v14 & 1) != 0 )
{
v8 = *(_QWORD *)&v15[7];
v7 = v16;
}
else
{
v8 = v14 >> 1;
v7 = v15;
}
std::string::append(&v11, v7, v8);
std::string::~string(&v14);
v9 = v12;
*a2 = v11;
a2[1] = v9;
a2[2] = v13;
v11 = 0LL;
v12 = 0LL;
v13 = 0LL;
std::string::~string(&v11);
}
else
{
*a2 = 0LL;
a2[1] = 0LL;
a2[2] = 0LL;
std::string::__init(a2, "error", 5LL);
}
return a2;
}
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
//----- (0000000000023DA8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::FreeVlanInterface(__int64 a1)
{
const char *v2; // x2
int v3; // w23
const char *v4; // x2
__int64 result; // x0
const char *v6; // x2
_BYTE v7[24]; // [xsp+40h] [xbp+40h] BYREF
v2 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v2 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D110, "Removing: %s", v2);
std::string::basic_string(v7, a1);
v3 = (unsigned __int8)fnv::vnm::CompositeConfig::remove((__int64)&unk_4D128, (__int64)v7);
std::string::~string(v7);
v4 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v4 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D110, "Request to Remove: [%s]", v4);
result = 0LL;
if ( !v3 )
{
v6 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v6 = *(const char **)(a1 + 16);
Logger::e((Logger *)qword_4D108, "Remove: [%s]: not found", v6);
return 2LL;
}
return result;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (0000000000023EB8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::RemoveVlanIface(__int64 a1)
{
__int64 v2; // x0
int v3; // w23
const char *v4; // x2
const char *v5; // x2
unsigned int v6; // w21
char v8; // [xsp+48h] [xbp+48h] BYREF
_BYTE v9[15]; // [xsp+49h] [xbp+49h] BYREF
const char *v10; // [xsp+58h] [xbp+58h]
_BYTE v11[24]; // [xsp+60h] [xbp+60h] BYREF
v2 = std::string::find(a1, 47LL, 0LL);
std::string::basic_string(&v8, a1, 0LL, v2, a1);
std::string::basic_string(v11, &v8);
v3 = (unsigned __int8)fnv::vnm::CompositeConfig::remove((__int64)&unk_4D128, (__int64)v11);
std::string::~string(v11);
v4 = v10;
if ( (v8 & 1) == 0 )
v4 = v9;
Logger::i((Logger *)qword_4D110, "Request to Remove: [%s]", v4);
if ( v3 )
{
v6 = 0;
}
else
{
v5 = v10;
if ( (v8 & 1) == 0 )
v5 = v9;
Logger::e((Logger *)qword_4D108, "Remove: [%s]: not found", v5);
v6 = 2;
}
std::string::~string(&v8);
return v6;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 13960: using guessed type __int64 __fastcall std::string::find(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (0000000000023FF0) ----------------------------------------------------
__int64 fnv::vnm::LinkNetworksforWhs()
{
return 48LL;
}
//----- (0000000000023FF8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::UnlinkNetworks(__int64 a1)
{
int v2; // w23
const char *v3; // x2
__int64 result; // x0
const char *v5; // x2
_BYTE v6[24]; // [xsp+40h] [xbp+40h] BYREF
std::string::basic_string(v6, a1);
v2 = (unsigned __int8)fnv::vnm::CompositeConfig::remove((__int64)&unk_4D1A0, (__int64)v6);
std::string::~string(v6);
v3 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v3 = *(const char **)(a1 + 16);
Logger::i((Logger *)qword_4D110, "Request to Remove: [%s]", v3);
result = 0LL;
if ( !v2 )
{
v5 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v5 = *(const char **)(a1 + 16);
Logger::e((Logger *)qword_4D108, "Unlink: linkid [%s] not found", v5);
return 2LL;
}
return result;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (00000000000240E8) ----------------------------------------------------
__int64 fnv::vnm::InstallMssClamp()
{
return 48LL;
}
//----- (00000000000240F0) ----------------------------------------------------
__int64 fnv::vnm::RemoveMssClamp()
{
return 48LL;
}
//----- (00000000000240F8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::startPktFilters(__int64 a1)
{
unsigned int v2; // w0
unsigned int v3; // w19
const char *v4; // x21
size_t v5; // x0
unsigned int v6; // w21
char *v7; // x3
__int64 v9[3]; // [xsp+50h] [xbp+50h] BYREF
_QWORD v10[2]; // [xsp+68h] [xbp+68h] BYREF
char *v11; // [xsp+78h] [xbp+78h]
__int64 v12[3]; // [xsp+80h] [xbp+80h] BYREF
__int64 v13[3]; // [xsp+98h] [xbp+98h] BYREF
__int64 v14[3]; // [xsp+B0h] [xbp+B0h] BYREF
memset(v9, 0, sizeof(v9));
v10[0] = 0LL;
v10[1] = 0LL;
v11 = 0LL;
v2 = fnv::vnm::PfEnable((fnv::vnm *)&_stack_chk_guard);
v3 = v2;
if ( v2 == 17 )
{
Logger::i((Logger *)qword_4D110, "PfEnable: Already enabled, OK");
}
else
{
if ( v2 )
{
Logger::e((Logger *)qword_4D108, "PfEnable: rc=%d", v2);
goto LABEL_13;
}
Logger::d((Logger *)qword_4D110, "PfEnable succeeded, rc=%d", 0LL);
}
memset(v12, 0, sizeof(v12));
std::string::__init(v12, "-g", 2LL);
memset(v13, 0, sizeof(v13));
std::string::__init(v13, "-f", 2LL);
v4 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v4 = *(const char **)(a1 + 16);
memset(v14, 0, sizeof(v14));
v5 = strlen(v4);
std::string::__init(v14, v4, v5);
v6 = fnv::vnm::exec_program("/sbin/pfctl", (__int64)v9, (__int64)v10, (__int64)v12, 3LL);
std::string::~string(v14);
std::string::~string(v13);
v3 = 0;
std::string::~string(v12);
if ( v6 )
{
v7 = v11;
if ( (v10[0] & 1) == 0 )
v7 = (char *)v10 + 1;
Logger::e((Logger *)qword_4D108, "startPktFilters: From pfctl: %d [%s]", v6, v7);
v3 = 1002;
}
LABEL_13:
std::string::~string(v10);
std::string::~string(v9);
return v3;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (0000000000024300) ----------------------------------------------------
__int64 __fastcall fnv::vnm::stopPktFilters(fnv::vnm *this)
{
unsigned int v1; // w0
unsigned int v2; // w19
v1 = fnv::vnm::PfDisable(this);
v2 = v1;
if ( v1 )
Logger::e((Logger *)qword_4D108, "stopPktFilters: From pfctl: %d", v1);
return v2;
}
// 4D108: using guessed type __int64 qword_4D108;
//----- (0000000000024340) ----------------------------------------------------
__int64 __fastcall fnv::vnm::IfaceRemover::IfaceRemover(fnv::vnm::IfaceRemover *this)
{
__int64 v3[4]; // [xsp+30h] [xbp+30h] BYREF
memset(v3, 0, 24);
std::string::__init(v3, "ifaces/", 7LL);
fnv::vnm::JournalProcessor::JournalProcessor(this, (__int64)v3);
std::string::~string(v3);
*(_QWORD *)this = off_4C780;
return v3[3] ^ _stack_chk_guard;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4C780: using guessed type void (__fastcall *[2])(fnv::vnm::IfaceRemover *__hidden this);
//----- (00000000000243E8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::AddSyncDefRoute(fnv::vnm *this)
{
unsigned int v1; // w19
__int64 v3[3]; // [xsp+50h] [xbp+50h] BYREF
__int64 v4[3]; // [xsp+68h] [xbp+68h] BYREF
__int64 v5[3]; // [xsp+80h] [xbp+80h] BYREF
_BYTE v6[120]; // [xsp+98h] [xbp+98h] BYREF
_BYTE v7[120]; // [xsp+110h] [xbp+110h] BYREF
memset(v3, 0, sizeof(v3));
std::string::__init(v3, "sync_dflt", 9LL);
fnv::vnm::CompositeConfig::CompositeConfig((__int64)v6, (__int64)v3);
memset(v4, 0, sizeof(v4));
std::string::__init(v4, "127.0.0.1", 9LL);
memset(v5, 0, sizeof(v5));
std::string::__init(v5, "0", 1LL);
fnv::vnm::DefaultRoute::DefaultRoute((__int64)v7, (__int64)v3, (__int64)v4, (__int64)v5);
std::string::~string(v5);
std::string::~string(v4);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v6, (fnv::vnm::ConfigElement *)v7);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v6) )
{
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)&unk_4D218, (fnv::vnm::ConfigElement *)v6);
v1 = 0;
}
else
{
v1 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v6);
}
fnv::vnm::DefaultRoute::~DefaultRoute((fnv::vnm::DefaultRoute *)v7);
fnv::vnm::CompositeConfig::~CompositeConfig((fnv::vnm::CompositeConfig *)v6);
std::string::~string(v3);
return v1;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
//----- (0000000000024594) ----------------------------------------------------
__int64 __fastcall fnv::vnm::RemoveDnsForwarders(unsigned __int8 *a1)
{
const char *v1; // x2
__int64 v2; // x0
unsigned int v3; // w19
_QWORD *v4; // x0
__int64 v5; // x1
__int64 *v6; // x23
const char *v7; // x2
fnv::vnm *v8; // x0
unsigned int v9; // w21
const char *v10; // x2
const char *v11; // x2
Logger *v12; // x19
__int64 v13; // x0
fnv::vnm *v14; // x0
unsigned __int8 v16; // [xsp+40h] [xbp+40h] BYREF
_BYTE v17[15]; // [xsp+41h] [xbp+41h] BYREF
const char *v18; // [xsp+50h] [xbp+50h]
fnv::vnm::Trim(a1, (__int64)&v16);
v1 = v18;
if ( (v16 & 1) == 0 )
v1 = v17;
Logger::i((Logger *)qword_4D110, "Removing service named [%s]", v1);
v2 = v16 >> 1;
if ( (v16 & 1) != 0 )
v2 = *(_QWORD *)&v17[7];
if ( !v2 )
{
Logger::e((Logger *)qword_4D108, "%s: %s", "RemoveDnsForwarders", "Service name must be non-empty.");
LABEL_7:
v3 = 22;
goto LABEL_19;
}
v4 = fnv::vnm::CompositeConfig::find((__int64)&unk_4D290, (__int64)&v16);
v6 = (__int64 *)v5;
if ( fnv::vnm::CompositeConfig::isEnd((__int64)&unk_4D290, (__int64)v4, v5) )
{
v7 = v18;
if ( (v16 & 1) == 0 )
v7 = v17;
Logger::i((Logger *)qword_4D110, "dns: service [%s] already didn't exist", v7);
v3 = 2;
}
else
{
v8 = (fnv::vnm *)fnv::vnm::ConfigElement::setSelected(*v6);
v9 = fnv::vnm::InstallForwarders(v8);
if ( v9 )
{
fnv::vnm::ConfigElement::clearSelected(*v6);
v10 = v18;
if ( (v16 & 1) == 0 )
v10 = v17;
Logger::e((Logger *)qword_4D108, "dns: removal of service [%s] could not be persisted. Undoing.", v10);
v3 = v9;
}
else
{
fnv::vnm::CompositeConfig::removeSelected((fnv::vnm::CompositeConfig *)&unk_4D290);
v11 = v18;
if ( (v16 & 1) == 0 )
v11 = v17;
Logger::i((Logger *)qword_4D110, "dns: service [%s] was removed.", v11);
v12 = (Logger *)qword_4D110;
v13 = fnv::vnm::CompositeConfig::count((fnv::vnm::CompositeConfig *)&unk_4D290);
v14 = (fnv::vnm *)Logger::i(v12, "There are %lu services left.", v13);
v3 = 0;
if ( (unsigned int)fnv::vnm::AddSyncDefRoute(v14) )
goto LABEL_7;
}
}
LABEL_19:
std::string::~string(&v16);
return v3;
}
// 24644: variable 'v5' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (000000000002478C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::Init(fnv::vnm *this)
{
fnv::vnm *v1; // x0
unsigned int v2; // w21
_BYTE v4[32]; // [xsp+38h] [xbp+38h] BYREF
fnv::vnm::IfaceRemover::IfaceRemover((fnv::vnm::IfaceRemover *)v4);
v1 = (fnv::vnm *)fnv::vnm::JournalProcessor::go((fnv::vnm::JournalProcessor *)v4);
v2 = 22;
if ( !(unsigned int)fnv::vnm::AddSyncDefRoute(v1) )
v2 = sub_21500();
fnv::vnm::IfaceRemover::~IfaceRemover((fnv::vnm::IfaceRemover *)v4);
return v2;
}
//----- (0000000000024820) ----------------------------------------------------
unsigned __int64 __fastcall fnv::vnm::Terminate(fnv::vnm *this)
{
fnv::vnm::CompositeConfig::clear((fnv::vnm::CompositeConfig *)&unk_4D1A0);
fnv::vnm::CompositeConfig::clear((fnv::vnm::CompositeConfig *)&unk_4D308);
fnv::vnm::CompositeConfig::clear((fnv::vnm::CompositeConfig *)&unk_4D128);
return fnv::vnm::CompositeConfig::clear((fnv::vnm::CompositeConfig *)&unk_4D380);
}
//----- (000000000002485C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::RemoveInternalConnection(unsigned __int8 *a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v7; // x1
__int64 v8; // x2
_QWORD *v9; // x0
__int64 v10; // x3
__int64 *v11; // x0
__int64 v12; // x3
__int64 v13; // x1
__int64 v14; // x2
_QWORD *v15; // x0
__int64 v16; // x3
__int64 *v17; // x0
__int64 v18; // x3
__int64 v19; // x1
__int64 v20; // x2
_QWORD *v21; // x0
__int64 v22; // x3
int v23; // w23
const char *v24; // x2
char *v25; // x2
unsigned int v26; // w20
_QWORD v28[2]; // [xsp+58h] [xbp+58h] BYREF
const char *v29; // [xsp+68h] [xbp+68h]
_QWORD v30[3]; // [xsp+70h] [xbp+70h] BYREF
_QWORD v31[3]; // [xsp+88h] [xbp+88h] BYREF
__int64 v32[3]; // [xsp+A0h] [xbp+A0h] BYREF
_QWORD v33[3]; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v34[3]; // [xsp+D0h] [xbp+D0h] BYREF
std::operator+<char>(":", a1, v30);
if ( (*(_BYTE *)a2 & 1) != 0 )
{
v8 = *(_QWORD *)(a2 + 8);
v7 = *(_QWORD *)(a2 + 16);
}
else
{
v7 = a2 + 1;
v8 = *(_BYTE *)a2 >> 1;
}
v9 = (_QWORD *)std::string::append(v30, v7, v8);
v10 = v9[1];
v31[0] = *v9;
v31[1] = v10;
v31[2] = v9[2];
*v9 = 0LL;
v9[1] = 0LL;
v9[2] = 0LL;
v11 = (__int64 *)std::string::append(v31, ":");
v12 = v11[1];
v32[0] = *v11;
v32[1] = v12;
v32[2] = v11[2];
*v11 = 0LL;
v11[1] = 0LL;
v11[2] = 0LL;
if ( (*(_BYTE *)a3 & 1) != 0 )
{
v14 = *(_QWORD *)(a3 + 8);
v13 = *(_QWORD *)(a3 + 16);
}
else
{
v13 = a3 + 1;
v14 = *(_BYTE *)a3 >> 1;
}
v15 = (_QWORD *)std::string::append(v32, v13, v14);
v16 = v15[1];
v33[0] = *v15;
v33[1] = v16;
v33[2] = v15[2];
*v15 = 0LL;
v15[1] = 0LL;
v15[2] = 0LL;
v17 = (__int64 *)std::string::append(v33, ":");
v18 = v17[1];
v34[0] = *v17;
v34[1] = v18;
v34[2] = v17[2];
*v17 = 0LL;
v17[1] = 0LL;
v17[2] = 0LL;
if ( (*(_BYTE *)a4 & 1) != 0 )
{
v20 = *(_QWORD *)(a4 + 8);
v19 = *(_QWORD *)(a4 + 16);
}
else
{
v19 = a4 + 1;
v20 = *(_BYTE *)a4 >> 1;
}
v21 = (_QWORD *)std::string::append(v34, v19, v20);
v22 = v21[1];
v28[0] = *v21;
v28[1] = v22;
v29 = (const char *)v21[2];
*v21 = 0LL;
v21[1] = 0LL;
v21[2] = 0LL;
std::string::~string(v34);
std::string::~string(v33);
std::string::~string(v32);
std::string::~string(v31);
std::string::~string(v30);
std::string::basic_string(v34, v28);
v23 = (unsigned __int8)fnv::vnm::CompositeConfig::remove((__int64)&unk_4D308, (__int64)v34);
std::string::~string(v34);
v24 = v29;
if ( (v28[0] & 1) == 0 )
v24 = (char *)v28 + 1;
Logger::i((Logger *)qword_4D110, "Request to Remove: [%s]", v24);
if ( v23 )
{
v26 = 0;
}
else
{
v25 = (char *)v29;
if ( (v28[0] & 1) == 0 )
v25 = (char *)v28 + 1;
Logger::e((Logger *)qword_4D108, "Close: Connection [%s] not found", v25);
v26 = 2;
}
std::string::~string(v28);
return v26;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
// 13BA0: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (0000000000024B08) ----------------------------------------------------
unsigned __int64 __fastcall sub_24B08(__int64 a1)
{
_QWORD *v1; // x1
unsigned __int64 v2; // x2
__int64 v4; // [xsp+20h] [xbp+20h] BYREF
if ( (*(_BYTE *)a1 & 1) != 0 )
{
v2 = *(_QWORD *)(a1 + 8);
v1 = *(_QWORD **)(a1 + 16);
}
else
{
v1 = (_QWORD *)(a1 + 1);
v2 = *(_BYTE *)a1 >> 1;
}
return std::__murmur2_or_cityhash<unsigned long,64ul>::operator()((__int64)&v4, v1, v2);
}
//----- (0000000000024B70) ----------------------------------------------------
__int64 __fastcall fnv::vnm::InternalConnectionPolicy::InternalConnectionPolicy(
__int64 a1,
unsigned __int8 *a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
char a7,
char a8)
{
__int64 v12; // x1
__int64 v13; // x2
_QWORD *v14; // x0
__int64 v15; // x3
_QWORD *v16; // x0
__int64 v17; // x3
__int64 v18; // x1
__int64 v19; // x2
__int64 *v20; // x0
__int64 v21; // x3
__int64 *v22; // x0
__int64 v23; // x3
__int64 v24; // x1
__int64 v25; // x2
_QWORD *v26; // x0
__int64 v27; // x3
__int64 v28; // x28
__int64 v29; // x0
__int64 v30; // x23
const char *v31; // x2
fnv::vnm *v32; // x0
unsigned int *v33; // x2
fnv::vnm *v34; // x0
unsigned int *v35; // x2
unsigned int v36; // w1
int v37; // w0
int v38; // w2
unsigned __int8 v39; // w0
__int64 *v40; // x0
int v41; // w0
void *v42; // x1
unsigned int v43; // w28
const char *v44; // x23
std::logic_error *exception; // x23
__int64 v49; // [xsp+98h] [xbp+88h]
int v50; // [xsp+98h] [xbp+88h]
fnv::vnm *v52; // [xsp+B0h] [xbp+A0h] BYREF
_BYTE v53[24]; // [xsp+B8h] [xbp+A8h] BYREF
__int64 v54[3]; // [xsp+D0h] [xbp+C0h] BYREF
_QWORD v55[3]; // [xsp+E8h] [xbp+D8h] BYREF
__int64 v56; // [xsp+100h] [xbp+F0h] BYREF
__int64 v57; // [xsp+108h] [xbp+F8h]
__int64 v58; // [xsp+110h] [xbp+100h]
__int64 v59; // [xsp+118h] [xbp+108h] BYREF
__int64 v60; // [xsp+120h] [xbp+110h]
__int64 v61; // [xsp+128h] [xbp+118h]
_QWORD v62[3]; // [xsp+130h] [xbp+120h] BYREF
_QWORD v63[3]; // [xsp+148h] [xbp+138h] BYREF
_QWORD v64[4]; // [xsp+160h] [xbp+150h] BYREF
std::operator+<char>(":", a2, v64);
if ( (*(_BYTE *)a3 & 1) != 0 )
{
v13 = *(_QWORD *)(a3 + 8);
v12 = *(_QWORD *)(a3 + 16);
}
else
{
v12 = a3 + 1;
v13 = *(_BYTE *)a3 >> 1;
}
v14 = (_QWORD *)std::string::append(v64, v12, v13);
v15 = v14[1];
v63[0] = *v14;
v63[1] = v15;
v63[2] = v14[2];
*v14 = 0LL;
v14[1] = 0LL;
v14[2] = 0LL;
v16 = (_QWORD *)std::string::append(v63, ":");
v17 = v16[1];
v62[0] = *v16;
v62[1] = v17;
v62[2] = v16[2];
*v16 = 0LL;
v16[1] = 0LL;
v16[2] = 0LL;
if ( (*(_BYTE *)a4 & 1) != 0 )
{
v19 = *(_QWORD *)(a4 + 8);
v18 = *(_QWORD *)(a4 + 16);
}
else
{
v19 = *(_BYTE *)a4 >> 1;
v18 = a4 + 1;
}
v20 = (__int64 *)std::string::append(v62, v18, v19);
v21 = v20[1];
v59 = *v20;
v60 = v21;
v61 = v20[2];
*v20 = 0LL;
v20[1] = 0LL;
v20[2] = 0LL;
v22 = (__int64 *)std::string::append(&v59, ":");
v23 = v22[1];
v56 = *v22;
v57 = v23;
v58 = v22[2];
*v22 = 0LL;
v22[1] = 0LL;
v22[2] = 0LL;
if ( (*(_BYTE *)a5 & 1) != 0 )
{
v25 = *(_QWORD *)(a5 + 8);
v24 = *(_QWORD *)(a5 + 16);
}
else
{
v24 = a5 + 1;
v25 = *(_BYTE *)a5 >> 1;
}
v26 = (_QWORD *)std::string::append(&v56, v24, v25);
v27 = v26[1];
v55[0] = *v26;
v55[1] = v27;
v55[2] = v26[2];
*v26 = 0LL;
v26[1] = 0LL;
v26[2] = 0LL;
fnv::vnm::ConfigElement::ConfigElement(a1, (__int64)v55);
std::string::~string(v55);
std::string::~string(&v56);
std::string::~string(&v59);
std::string::~string(v62);
std::string::~string(v63);
std::string::~string(v64);
*(_QWORD *)a1 = off_4C6D8;
*(_QWORD *)(a1 + 72) = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
*(_QWORD *)(a1 + 88) = 0LL;
std::string::__init(a1 + 72, "vnmCustomInternalNwRules", 24LL);
*(_BYTE *)(a1 + 112) = 0;
*(_WORD *)(a1 + 114) = 0;
*(_WORD *)(a1 + 116) = 0;
*(_WORD *)(a1 + 118) = 0;
*(_WORD *)(a1 + 120) = 0;
*(_DWORD *)(a1 + 96) = 0;
*(_DWORD *)(a1 + 100) = 0;
*(_DWORD *)(a1 + 104) = 0;
*(_DWORD *)(a1 + 108) = 0;
v49 = std::string::find(a2, 47LL, 0LL);
std::string::basic_string(v53, a2, 0LL, v49, a2);
if ( v49 == -1 )
{
memset(v54, 0, sizeof(v54));
std::string::__init(v54, "32", 2LL);
}
else
{
std::string::basic_string(v54, a2, v49 + 1, -1LL, a2);
}
v28 = std::string::find(a3, 47LL, 0LL);
std::string::basic_string(v55, a3, 0LL, v28, a3);
if ( v28 == -1 )
{
v56 = 0LL;
v57 = 0LL;
v58 = 0LL;
std::string::__init(&v56, "32", 2LL);
}
else
{
std::string::basic_string(&v56, a3, v28 + 1, -1LL, a3);
}
v29 = std::string::find(a5, 58LL, 0LL);
v30 = v29;
if ( v29 == -1 )
{
v59 = 0LL;
v60 = 0LL;
v61 = 0LL;
std::string::__init(&v59, "0", 1LL);
std::string::basic_string(v62, a5);
}
else
{
std::string::basic_string(&v59, a5, 0LL, v29, a5);
std::string::basic_string(v62, a5, v30 + 1, -1LL, a5);
}
v31 = (const char *)(a1 + 73);
if ( (*(_BYTE *)(a1 + 72) & 1) != 0 )
v31 = *(const char **)(a1 + 88);
Logger::d((Logger *)qword_4D110, "Anchor name is: %s", v31);
if ( !(unsigned __int8)fnv::vnm::Ipv4AddrFromString((__int64)v53, (void *)(a1 + 96))
|| !(unsigned __int8)fnv::vnm::Ipv4AddrFromString((__int64)v55, (void *)(a1 + 100)) )
{
goto LABEL_31;
}
v32 = (fnv::vnm *)std::stoi(v54, 0LL, 10LL);
if ( (unsigned int)fnv::vnm::Ipv4Prefixlen2Mask(v32, (_DWORD *)(a1 + 104), v33)
|| (v34 = (fnv::vnm *)std::stoi(&v56, 0LL, 10LL),
(unsigned int)fnv::vnm::Ipv4Prefixlen2Mask(v34, (_DWORD *)(a1 + 108), v35)) )
{
Logger::e((Logger *)qword_4D108, "ERROR %s: invalid Prefix Length", "InternalConnectionPolicy");
goto LABEL_32;
}
v36 = *(_DWORD *)(a1 + 96);
v37 = 0;
if ( v36 )
v37 = *(_DWORD *)(a1 + 104);
v38 = *(_DWORD *)(a1 + 100);
*(_DWORD *)(a1 + 104) = v37;
if ( v38 )
v38 = *(_DWORD *)(a1 + 108);
*(_DWORD *)(a1 + 108) = v38;
if ( !(unsigned __int8)fnv::vnm::InternalConnectionPolicy::validateIP(
(fnv::vnm::InternalConnectionPolicy *)a1,
v37 & v36)
|| (v39 = fnv::vnm::InternalConnectionPolicy::validateIP(
(fnv::vnm::InternalConnectionPolicy *)a1,
*(_DWORD *)(a1 + 100) & *(_DWORD *)(a1 + 108)),
(v50 = v39) == 0) )
{
LABEL_31:
Logger::e((Logger *)qword_4D108, "ERROR %s: invalid IP address", "InternalConnectionPolicy");
goto LABEL_32;
}
if ( !std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::find<std::string>(
qword_4D3F8,
a4) )
{
LABEL_58:
Logger::e((Logger *)qword_4D108, "ERROR %s: invalid protocol value", "InternalConnectionPolicy");
goto LABEL_32;
}
v40 = std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::find<std::string>(
qword_4D3F8,
a4);
if ( !v40 )
{
exception = (std::logic_error *)__cxa_allocate_exception(0x10uLL);
std::logic_error::logic_error(exception, "unordered_map::at: key not found");
*(_QWORD *)exception = (char *)&`vtable for'std::out_of_range + 16;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (__fastcall *)(void *))&std::out_of_range::~out_of_range);
}
v41 = *((_DWORD *)v40 + 10);
if ( v41 == 1 )
{
*(_BYTE *)(a1 + 112) = 1;
goto LABEL_40;
}
if ( v41 > 1 )
{
if ( v41 != 6 )
{
if ( v41 != 17 )
goto LABEL_58;
*(_BYTE *)(a1 + 112) = 17;
}
if ( !*(_BYTE *)(a1 + 112) )
*(_BYTE *)(a1 + 112) = 6;
std::string::basic_string(v63, &v59);
if ( (unsigned __int8)fnv::vnm::InternalConnectionPolicy::parsePort(a1, (__int64)v63, (_WORD *)(a1 + 114)) )
{
std::string::basic_string(v64, v62);
v50 = (unsigned __int8)fnv::vnm::InternalConnectionPolicy::parsePort(a1, (__int64)v64, (_WORD *)(a1 + 118)) ^ 1;
std::string::~string(v64);
}
std::string::~string(v63);
if ( !v50 )
goto LABEL_40;
Logger::e((Logger *)qword_4D108, "ERROR %s: invalid port", "InternalConnectionPolicy");
LABEL_32:
*(_DWORD *)(a1 + 12) = 22;
goto LABEL_44;
}
if ( v41 )
goto LABEL_58;
*(_BYTE *)(a1 + 112) = 0;
LABEL_40:
v43 = fnv::vnm::PfOpenFilterAnchor((char **)&v52, (char *)(a1 + 72));
if ( v43 )
{
v44 = "Open anchor context";
}
else
{
v43 = fnv::vnm::PfAddPeer2PeerPortsAnchorRule(
v52,
(int *)(a1 + 96),
(int *)(a1 + 104),
(int *)(a1 + 100),
(int *)(a1 + 108),
(unsigned __int8 *)(a1 + 112),
(unsigned __int16 *)(a1 + 114),
(unsigned __int16 *)(a1 + 118),
a7,
a8);
v44 = "Add Port Connect";
}
fnv::vnm::PfClose(v52, v42);
if ( !v43 )
{
*(_BYTE *)(a1 + 8) = 1;
std::string::~string(v62);
std::string::~string(&v59);
std::string::~string(&v56);
goto LABEL_45;
}
Logger::e((Logger *)qword_4D108, "%s (%d)", v44, v43);
*(_DWORD *)(a1 + 12) = v43;
LABEL_44:
std::string::~string(v62);
std::string::~string(&v59);
std::string::~string(&v56);
LABEL_45:
std::string::~string(v55);
std::string::~string(v54);
std::string::~string(v53);
return v64[3] ^ _stack_chk_guard;
}
// 2504C: variable 'v33' is possibly undefined
// 2506C: variable 'v35' is possibly undefined
// 2519C: variable 'v42' is possibly undefined
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13490: using guessed type __int64 __fastcall std::stoi(_QWORD, _QWORD, _QWORD);
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 13960: using guessed type __int64 __fastcall std::string::find(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 13BA0: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD);
// 4C6D8: using guessed type void (__fastcall *off_4C6D8[2])(fnv::vnm::InternalConnectionPolicy *__hidden this);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
// 4D3F8: using guessed type _QWORD qword_4D3F8[4];
//----- (000000000002545C) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::RoutingTunnel::describe@<X0>(fnv::vnm::RoutingTunnel *this@<X0>, _QWORD *a2@<X8>)
{
__int64 v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v6[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v7)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v8[12]; // [xsp+78h] [xbp+78h] BYREF
int v9; // [xsp+D8h] [xbp+D8h]
__int64 v10[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v11; // [xsp+170h] [xbp+170h]
v6[1] = 0LL;
v6[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v10, v8);
v11 = -1;
v10[17] = 0LL;
v6[0] = off_4C1D0;
v7 = off_4C1F8;
v10[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v8);
memset(v5, 0, sizeof(v5));
memset(&v8[8], 0, 32);
v8[0] = (__int64)off_4BFE0;
v9 = 24;
std::stringbuf::str((__int64)v8);
std::string::~string(v5);
fnv::vnm::ConfigElement::name(this, (__int64)v5);
std::operator<<<char>(&v7, (__int64)v5);
std::string::~string(v5);
std::stringbuf::str((__int64)v8, a2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a2;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (000000000002560C) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::AddressConfig::describe@<X0>(fnv::vnm::AddressConfig *this@<X0>, _QWORD *a2@<X8>)
{
__int64 v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v6[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v7)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v8[12]; // [xsp+78h] [xbp+78h] BYREF
int v9; // [xsp+D8h] [xbp+D8h]
__int64 v10[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v11; // [xsp+170h] [xbp+170h]
v6[1] = 0LL;
v6[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v10, v8);
v11 = -1;
v10[17] = 0LL;
v6[0] = off_4C1D0;
v7 = off_4C1F8;
v10[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v8);
memset(v5, 0, sizeof(v5));
memset(&v8[8], 0, 32);
v8[0] = (__int64)off_4BFE0;
v9 = 24;
std::stringbuf::str((__int64)v8);
std::string::~string(v5);
fnv::vnm::ConfigElement::name(this, (__int64)v5);
std::operator<<<char>(&v7, (__int64)v5);
std::string::~string(v5);
std::stringbuf::str((__int64)v8, a2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a2;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (00000000000257BC) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::VlanIface::describe@<X0>(fnv::vnm::VlanIface *this@<X0>, _QWORD *a2@<X8>)
{
__int64 v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v6[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v7)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v8[12]; // [xsp+78h] [xbp+78h] BYREF
int v9; // [xsp+D8h] [xbp+D8h]
__int64 v10[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v11; // [xsp+170h] [xbp+170h]
v6[1] = 0LL;
v6[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v10, v8);
v11 = -1;
v10[17] = 0LL;
v6[0] = off_4C1D0;
v7 = off_4C1F8;
v10[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v8);
memset(v5, 0, sizeof(v5));
memset(&v8[8], 0, 32);
v8[0] = (__int64)off_4BFE0;
v9 = 24;
std::stringbuf::str((__int64)v8);
std::string::~string(v5);
fnv::vnm::ConfigElement::name(this, (__int64)v5);
std::operator<<<char>(&v7, (__int64)v5);
std::string::~string(v5);
std::stringbuf::str((__int64)v8, a2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a2;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (000000000002596C) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::DefaultRoute::describe@<X0>(fnv::vnm::DefaultRoute *this@<X0>, _QWORD *a2@<X8>)
{
__int64 v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v6[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v7)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v8[12]; // [xsp+78h] [xbp+78h] BYREF
int v9; // [xsp+D8h] [xbp+D8h]
__int64 v10[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v11; // [xsp+170h] [xbp+170h]
v6[1] = 0LL;
v6[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v10, v8);
v11 = -1;
v10[17] = 0LL;
v6[0] = off_4C1D0;
v7 = off_4C1F8;
v10[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v8);
memset(v5, 0, sizeof(v5));
memset(&v8[8], 0, 32);
v8[0] = (__int64)off_4BFE0;
v9 = 24;
std::stringbuf::str((__int64)v8);
std::string::~string(v5);
fnv::vnm::ConfigElement::name(this, (__int64)v5);
std::operator<<<char>(&v7, (__int64)v5);
std::string::~string(v5);
std::stringbuf::str((__int64)v8, a2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a2;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (0000000000025B1C) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::PfAnchor::anchorstr@<X0>(_QWORD *a1@<X8>)
{
_QWORD *v3; // x0
__int64 v4; // x3
__int64 v6[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v7[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v8)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v9[12]; // [xsp+78h] [xbp+78h] BYREF
int v10; // [xsp+D8h] [xbp+D8h]
__int64 v11[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v12; // [xsp+170h] [xbp+170h]
v7[1] = 0LL;
v7[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v11[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v11, v9);
v12 = -1;
v11[17] = 0LL;
v7[0] = off_4C1D0;
v8 = off_4C1F8;
v11[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v9);
memset(v6, 0, sizeof(v6));
memset(&v9[8], 0, 32);
v9[0] = (__int64)off_4BFE0;
v10 = 24;
std::stringbuf::str((__int64)v9);
std::string::~string(v6);
*(_DWORD *)((char *)v9 + (_QWORD)*(v8 - 3)) = *(_DWORD *)((_BYTE *)v9 + (_QWORD)*(v8 - 3)) & 0xFFFFFFB5 | 8;
std::ostream::operator<<();
std::stringbuf::str((__int64)v9, v6);
v3 = (_QWORD *)std::string::insert(v6, 0LL, "vnm/");
v4 = v3[1];
*a1 = *v3;
a1[1] = v4;
a1[2] = v3[2];
*v3 = 0LL;
v3[1] = 0LL;
v3[2] = 0LL;
std::string::~string(v6);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v7);
return a1;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 138B0: using guessed type __int64 __fastcall std::string::insert(_QWORD, _QWORD, _QWORD);
// 13930: using guessed type __int64 std::ostream::operator<<(void);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (0000000000025D0C) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::PfAnchor::describe@<X0>(fnv::vnm::PfAnchor *this@<X0>, _QWORD *a2@<X8>)
{
__int64 v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v6[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v7)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v8[12]; // [xsp+78h] [xbp+78h] BYREF
int v9; // [xsp+D8h] [xbp+D8h]
__int64 v10[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v11; // [xsp+170h] [xbp+170h]
v6[1] = 0LL;
v6[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v10, v8);
v11 = -1;
v10[17] = 0LL;
v6[0] = off_4C1D0;
v7 = off_4C1F8;
v10[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v8);
memset(v5, 0, sizeof(v5));
memset(&v8[8], 0, 32);
v8[0] = (__int64)off_4BFE0;
v9 = 24;
std::stringbuf::str((__int64)v8);
std::string::~string(v5);
fnv::vnm::ConfigElement::name(this, (__int64)v5);
std::operator<<<char>(&v7, (__int64)v5);
std::string::~string(v5);
std::stringbuf::str((__int64)v8, a2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a2;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (0000000000025EBC) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::InternalConnectionPolicy::describe@<X0>(
fnv::vnm::InternalConnectionPolicy *this@<X0>,
_QWORD *a2@<X8>)
{
__int64 v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v6[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v7)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v8[12]; // [xsp+78h] [xbp+78h] BYREF
int v9; // [xsp+D8h] [xbp+D8h]
__int64 v10[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v11; // [xsp+170h] [xbp+170h]
v6[1] = 0LL;
v6[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v10, v8);
v11 = -1;
v10[17] = 0LL;
v6[0] = off_4C1D0;
v7 = off_4C1F8;
v10[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v8);
memset(v5, 0, sizeof(v5));
memset(&v8[8], 0, 32);
v8[0] = (__int64)off_4BFE0;
v9 = 24;
std::stringbuf::str((__int64)v8);
std::string::~string(v5);
fnv::vnm::ConfigElement::name(this, (__int64)v5);
std::operator<<<char>(&v7, (__int64)v5);
std::string::~string(v5);
std::stringbuf::str((__int64)v8, a2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a2;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (000000000002606C) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::RoutingPolicy::describe@<X0>(fnv::vnm::RoutingPolicy *this@<X0>, _QWORD *a2@<X8>)
{
__int64 v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v6[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v7)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v8[12]; // [xsp+78h] [xbp+78h] BYREF
int v9; // [xsp+D8h] [xbp+D8h]
__int64 v10[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v11; // [xsp+170h] [xbp+170h]
v6[1] = 0LL;
v6[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v10, v8);
v11 = -1;
v10[17] = 0LL;
v6[0] = off_4C1D0;
v7 = off_4C1F8;
v10[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v8);
memset(v5, 0, sizeof(v5));
memset(&v8[8], 0, 32);
v8[0] = (__int64)off_4BFE0;
v9 = 24;
std::stringbuf::str((__int64)v8);
std::string::~string(v5);
fnv::vnm::ConfigElement::name(this, (__int64)v5);
std::operator<<<char>(&v7, (__int64)v5);
std::string::~string(v5);
std::stringbuf::str((__int64)v8, a2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a2;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (000000000002621C) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::NatRule::describe@<X0>(fnv::vnm::NatRule *this@<X0>, _QWORD *a2@<X8>)
{
__int64 v5[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 (__fastcall **v6[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v7)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v8[12]; // [xsp+78h] [xbp+78h] BYREF
int v9; // [xsp+D8h] [xbp+D8h]
__int64 v10[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v11; // [xsp+170h] [xbp+170h]
v6[1] = 0LL;
v6[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v10, v8);
v11 = -1;
v10[17] = 0LL;
v6[0] = off_4C1D0;
v7 = off_4C1F8;
v10[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v8);
memset(v5, 0, sizeof(v5));
memset(&v8[8], 0, 32);
v8[0] = (__int64)off_4BFE0;
v9 = 24;
std::stringbuf::str((__int64)v8);
std::string::~string(v5);
fnv::vnm::ConfigElement::name(this, (__int64)v5);
std::operator<<<char>(&v7, (__int64)v5);
std::string::~string(v5);
std::stringbuf::str((__int64)v8, a2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a2;
}
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (00000000000263CC) ----------------------------------------------------
_QWORD *__usercall fnv::vnm::VlanNameFromVlanId@<X0>(fnv::vnm *this@<X0>, _QWORD *a2@<X8>)
{
char *v4; // x1
__int64 v5; // x2
__int64 v7; // [xsp+48h] [xbp+48h] BYREF
__int64 v8; // [xsp+50h] [xbp+50h]
char *v9; // [xsp+58h] [xbp+58h]
__int64 (__fastcall **v10[2])(); // [xsp+60h] [xbp+60h] BYREF
__int64 (__fastcall **v11)(); // [xsp+70h] [xbp+70h] BYREF
__int64 v12[12]; // [xsp+78h] [xbp+78h] BYREF
int v13; // [xsp+D8h] [xbp+D8h]
__int64 v14[18]; // [xsp+E0h] [xbp+E0h] BYREF
int v15; // [xsp+170h] [xbp+170h]
a2[2] = 0LL;
*a2 = 0LL;
a2[1] = 0LL;
std::string::__init(a2, "vlan", 4LL);
v10[0] = (__int64 (__fastcall **)())&unk_4C0B8;
v10[1] = 0LL;
v14[0] = (__int64)&unk_4C0E0;
std::ios_base::init((std::ios_base *)v14, v12);
v15 = -1;
v14[17] = 0LL;
v10[0] = off_4C1D0;
v11 = off_4C1F8;
v14[0] = (__int64)off_4C220;
std::streambuf::basic_streambuf(v12);
v9 = 0LL;
v7 = 0LL;
v8 = 0LL;
memset(&v12[8], 0, 32);
v12[0] = (__int64)off_4BFE0;
v13 = 24;
std::stringbuf::str((__int64)v12);
std::string::~string(&v7);
std::ostream::operator<<(&v11, this);
std::stringbuf::str((__int64)v12, &v7);
if ( (v7 & 1) != 0 )
{
v5 = v8;
v4 = v9;
}
else
{
v5 = (unsigned __int8)v7 >> 1;
v4 = (char *)&v7 + 1;
}
std::string::append(a2, v4, v5);
std::string::~string(&v7);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v10);
return a2;
}
// 132F0: using guessed type __int64 __fastcall std::ostream::operator<<(_QWORD, _QWORD);
// 13740: using guessed type __int64 __fastcall std::streambuf::basic_streambuf(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4BFE0: using guessed type __int64 (__fastcall *off_4BFE0[2])();
// 4C1D0: using guessed type __int64 (__fastcall *off_4C1D0[2])();
// 4C1F8: using guessed type __int64 (__fastcall *off_4C1F8[2])();
// 4C220: using guessed type __int64 (__fastcall *off_4C220[2])();
//----- (00000000000265A8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::AddNativeRoutingTunnel(
__int64 a1,
char *a2,
char *a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7)
{
__int64 v12; // x19
__int64 v13; // x0
unsigned int v14; // w19
const char *v15; // x3
__int64 v16; // x0
char *v17; // x3
char *v18; // x0
char *i; // x1
unsigned __int8 v23[8]; // [xsp+88h] [xbp+88h] BYREF
__int64 v24; // [xsp+90h] [xbp+90h]
__int64 v25; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v26; // [xsp+A8h] [xbp+A8h]
char *v27; // [xsp+B0h] [xbp+B0h]
__int64 v28[3]; // [xsp+B8h] [xbp+B8h] BYREF
_BYTE v29[24]; // [xsp+D0h] [xbp+D0h] BYREF
_BYTE v30[120]; // [xsp+E8h] [xbp+E8h] BYREF
_BYTE v31[120]; // [xsp+160h] [xbp+160h] BYREF
v12 = std::string::find(a1, 47LL, 0LL);
std::string::basic_string(v23, a1, 0LL, v12, a1);
if ( v12 == -1 )
{
v25 = 0LL;
v26 = 0LL;
v27 = 0LL;
std::string::__init(&v25, "", 0LL);
}
else
{
std::string::basic_string(&v25, a1, v12 + 1, -1LL, a1);
}
v13 = v24;
if ( (v23[0] & 1) == 0 )
v13 = v23[0] >> 1;
if ( v13 )
{
if ( fnv::vnm::CompositeConfig::exists((__int64)&unk_4D128, (__int64)v23) )
{
v15 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v15 = *(const char **)(a1 + 16);
Logger::e(
(Logger *)qword_4D108,
"%s: ERROR: request for tunnel [%s]: name not unique.",
"AddNativeRoutingTunnel",
v15);
v14 = 17;
}
else
{
fnv::vnm::CompositeConfig::CompositeConfig((__int64)v30, (__int64)v23);
fnv::vnm::RoutingTunnel::RoutingTunnel((__int64)v31, v23, a2, a3, a6, a7);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v30, (fnv::vnm::ConfigElement *)v31);
fnv::vnm::RoutingTunnel::~RoutingTunnel((fnv::vnm::RoutingTunnel *)v31);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v30) )
{
memset(v28, 0, sizeof(v28));
std::string::__init(v28, "24", 2LL);
fnv::vnm::AddressConfig::AddressConfig(v31, v23, a4, v28, a5);
std::string::~string(v28);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v30, (fnv::vnm::ConfigElement *)v31);
fnv::vnm::AddressConfig::~AddressConfig((fnv::vnm::AddressConfig *)v31);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v30) )
{
if ( (v25 & 1) != 0 )
{
v16 = v26;
v17 = v27;
}
else
{
v16 = (unsigned __int8)v25 >> 1;
v17 = (char *)&v25 + 1;
}
if ( v16 )
{
v18 = &v17[v16];
for ( i = v17; v18 != i; ++i )
{
if ( (*i & 0xDF) == 79 )
{
if ( i - v17 != -1 )
{
fnv::vnm::DefaultRoute::DefaultRoute((__int64)v31, a1, a4, a7);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v30, (fnv::vnm::ConfigElement *)v31);
fnv::vnm::DefaultRoute::~DefaultRoute((fnv::vnm::DefaultRoute *)v31);
}
break;
}
}
}
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v30) )
{
std::operator+<char>("ifaces/", v23);
fnv::vnm::JournalEntry::JournalEntry((__int64)v31, (__int64)v29);
std::string::~string(v29);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v30, (fnv::vnm::ConfigElement *)v31);
fnv::vnm::JournalEntry::~JournalEntry((fnv::vnm::JournalEntry *)v31);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v30) )
{
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)&unk_4D128, (fnv::vnm::ConfigElement *)v30);
v14 = 0;
}
else
{
v14 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v30);
}
fnv::vnm::CompositeConfig::~CompositeConfig((fnv::vnm::CompositeConfig *)v30);
}
}
else
{
Logger::e((Logger *)qword_4D108, "%s: ERROR: name cannot be empty.", "AddNativeRoutingTunnel");
v14 = 22;
}
std::string::~string(&v25);
std::string::~string(v23);
return v14;
}
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 13960: using guessed type __int64 __fastcall std::string::find(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 226C8: using guessed type __int64 __fastcall fnv::vnm::AddressConfig::AddressConfig(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 265A8: using guessed type unsigned __int8 var_158[8];
//----- (0000000000026988) ----------------------------------------------------
__int64 __fastcall fnv::vnm::AddVlanIface(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)
{
__int64 v10; // x19
__int64 v11; // x0
unsigned int v12; // w19
const char *v13; // x3
__int64 v14; // x0
char *v15; // x3
char *v16; // x0
char *i; // x1
char v21[8]; // [xsp+88h] [xbp+88h] BYREF
__int64 v22; // [xsp+90h] [xbp+90h]
__int64 v23; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v24; // [xsp+A8h] [xbp+A8h]
char *v25; // [xsp+B0h] [xbp+B0h]
_QWORD v26[3]; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v27[3]; // [xsp+D0h] [xbp+D0h] BYREF
__int64 v28[3]; // [xsp+E8h] [xbp+E8h] BYREF
_BYTE v29[24]; // [xsp+100h] [xbp+100h] BYREF
_BYTE v30[120]; // [xsp+118h] [xbp+118h] BYREF
_BYTE v31[120]; // [xsp+190h] [xbp+190h] BYREF
v10 = std::string::find(a1, 47LL, 0LL);
std::string::basic_string(v21, a1, 0LL, v10, a1);
if ( v10 == -1 )
{
v23 = 0LL;
v24 = 0LL;
v25 = 0LL;
std::string::__init(&v23, "", 0LL);
}
else
{
std::string::basic_string(&v23, a1, v10 + 1, -1LL, a1);
}
fnv::vnm::VlanNameFromGreName(v21, v26);
v11 = (unsigned __int8)v21[0] >> 1;
if ( (v21[0] & 1) != 0 )
v11 = v22;
if ( v11 )
{
if ( fnv::vnm::CompositeConfig::exists((__int64)&unk_4D128, (__int64)v21) )
{
v13 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v13 = *(const char **)(a1 + 16);
Logger::e((Logger *)qword_4D108, "%s: ERROR: request for iface [%s]: name not unique.", "AddVlanIface", v13);
v12 = 17;
}
else
{
fnv::vnm::CompositeConfig::CompositeConfig((__int64)v30, (__int64)v21);
fnv::vnm::VlanIface::VlanIface(v31, v26, a2, a3, a6, 1496LL);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v30, (fnv::vnm::ConfigElement *)v31);
fnv::vnm::VlanIface::~VlanIface((fnv::vnm::VlanIface *)v31);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v30) )
{
memset(v27, 0, sizeof(v27));
std::string::__init(v27, "30", 2LL);
memset(v28, 0, sizeof(v28));
std::string::__init(v28, "", 0LL);
fnv::vnm::AddressConfig::AddressConfig(v31, v26, a4, v27, v28);
std::string::~string(v28);
std::string::~string(v27);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v30, (fnv::vnm::ConfigElement *)v31);
fnv::vnm::AddressConfig::~AddressConfig((fnv::vnm::AddressConfig *)v31);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v30) )
{
if ( (v23 & 1) != 0 )
{
v14 = v24;
v15 = v25;
}
else
{
v14 = (unsigned __int8)v23 >> 1;
v15 = (char *)&v23 + 1;
}
if ( v14 )
{
v16 = &v15[v14];
for ( i = v15; v16 != i; ++i )
{
if ( (*i & 0xDF) == 79 )
{
if ( i - v15 != -1 )
{
fnv::vnm::DefaultRoute::DefaultRoute((__int64)v31, a1, a5, a6);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v30, (fnv::vnm::ConfigElement *)v31);
fnv::vnm::DefaultRoute::~DefaultRoute((fnv::vnm::DefaultRoute *)v31);
}
break;
}
}
}
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v30) )
{
std::operator+<char>("ifaces/", v26);
fnv::vnm::JournalEntry::JournalEntry((__int64)v31, (__int64)v29);
std::string::~string(v29);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v30, (fnv::vnm::ConfigElement *)v31);
fnv::vnm::JournalEntry::~JournalEntry((fnv::vnm::JournalEntry *)v31);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v30) )
{
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)&unk_4D128, (fnv::vnm::ConfigElement *)v30);
v12 = 0;
}
else
{
v12 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v30);
}
fnv::vnm::CompositeConfig::~CompositeConfig((fnv::vnm::CompositeConfig *)v30);
}
}
else
{
Logger::e((Logger *)qword_4D108, "%s: ERROR: name cannot be empty.", "AddVlanIface");
v12 = 22;
}
std::string::~string(v26);
std::string::~string(&v23);
std::string::~string(v21);
return v12;
}
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 13960: using guessed type __int64 __fastcall std::string::find(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 226C8: using guessed type __int64 __fastcall fnv::vnm::AddressConfig::AddressConfig(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 22924: using guessed type __int64 __fastcall fnv::vnm::VlanIface::VlanIface(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 26988: using guessed type char var_188[8];
//----- (0000000000026DD0) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigVlanInterface(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
__int64 a8,
__int64 a9,
char *a10)
{
char v14; // w1
__int64 v17; // x0
const char *v18; // x3
unsigned int v19; // w26
const char *v20; // x2
const char *v21; // x3
const char *v22; // x4
fnv::vnm *v23; // x20
signed int v24; // w22
signed int v25; // w21
int v26; // w0
__int64 v27; // x27
const char *v28; // x2
unsigned __int8 v29; // w1
__int64 v30; // x0
unsigned int v31; // w0
int v32; // w1
_QWORD *v33; // x0
__int64 v34; // x3
const char *v35; // x2
const char *v36; // x2
fnv::vnm *v39; // [xsp+70h] [xbp+70h]
fnv::vnm *v40; // [xsp+78h] [xbp+78h]
_QWORD v41[3]; // [xsp+98h] [xbp+98h] BYREF
__int64 v42; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v43; // [xsp+B8h] [xbp+B8h]
const char *v44; // [xsp+C0h] [xbp+C0h]
__int64 v45; // [xsp+C8h] [xbp+C8h] BYREF
__int64 v46; // [xsp+D0h] [xbp+D0h]
_BYTE *v47; // [xsp+D8h] [xbp+D8h]
__int64 v48; // [xsp+E0h] [xbp+E0h] BYREF
__int64 v49; // [xsp+E8h] [xbp+E8h]
const char *v50; // [xsp+F0h] [xbp+F0h]
__int64 v51; // [xsp+F8h] [xbp+F8h] BYREF
__int64 v52; // [xsp+100h] [xbp+100h]
_BYTE *v53; // [xsp+108h] [xbp+108h]
_BYTE v54[24]; // [xsp+110h] [xbp+110h] BYREF
__int64 v55[3]; // [xsp+128h] [xbp+128h] BYREF
__int64 v56[3]; // [xsp+140h] [xbp+140h] BYREF
_QWORD v57[3]; // [xsp+158h] [xbp+158h] BYREF
_BYTE v58[72]; // [xsp+170h] [xbp+170h] BYREF
_QWORD v59[9]; // [xsp+1B8h] [xbp+1B8h] BYREF
__int64 v60[12]; // [xsp+200h] [xbp+200h] BYREF
_BYTE v61[120]; // [xsp+260h] [xbp+260h] BYREF
v14 = *(_BYTE *)a1;
v17 = *(_BYTE *)a1 >> 1;
if ( (v14 & 1) != 0 )
v17 = *(_QWORD *)(a1 + 8);
if ( !v17 )
{
Logger::e((Logger *)qword_4D108, "%s: ERROR: name cannot be empty.", "ConfigVlanInterface");
return 22;
}
if ( !fnv::vnm::CompositeConfig::exists((__int64)&unk_4D128, a1) )
{
v20 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v20 = *(const char **)(a1 + 16);
v21 = (const char *)(a3 + 1);
if ( (*(_BYTE *)a3 & 1) != 0 )
v21 = *(const char **)(a3 + 16);
v22 = (const char *)(a4 + 1);
if ( (*(_BYTE *)a4 & 1) != 0 )
v22 = *(const char **)(a4 + 16);
Logger::i((Logger *)qword_4D110, "Configuring i/f named [%s] for vlanid [%s] over [%s]", v20, v21, v22);
v23 = (fnv::vnm *)(int)std::stoi(a3, 0LL, 10LL);
v24 = std::stoi(a2, 0LL, 10LL);
v25 = std::stoi(a5, 0LL, 10LL);
v26 = std::stoi(a6, 0LL, 10LL);
if ( (unsigned __int64)v23 - 1 > 0x13 )
{
Logger::i((Logger *)qword_4D110, "%s: VLAN ID (%zu) is not valid.", "ConfigVlanInterface", v23);
return 22;
}
if ( (unsigned __int64)(v24 - 1LL) > 0xD )
{
Logger::i((Logger *)qword_4D110, "%s: Host number (%zu) is not valid.", "ConfigVlanInterface", v24);
return 22;
}
if ( (unsigned __int64)(v25 - 1LL) > 0xD )
{
Logger::i((Logger *)qword_4D110, "%s: gw host number (%zu) is not valid.", "ConfigVlanInterface", v25);
return 22;
}
v27 = v26;
if ( (unsigned __int64)v26 > 0x5D8 )
{
v27 = 1496LL;
Logger::w((Logger *)qword_4D108, "Requested MTU too large for 8021.Q. Reduced to %lu.", 1496LL);
}
fnv::vnm::VlanNameFromVlanId(v23, v41);
v28 = (const char *)v41[2];
if ( (v41[0] & 1) == 0 )
v28 = (char *)v41 + 1;
Logger::i((Logger *)qword_4D110, "The actual i/f name shall be [%s]", v28);
v29 = *a10;
v42 = 0LL;
v43 = 0LL;
v44 = 0LL;
v45 = 0LL;
v46 = 0LL;
v47 = 0LL;
v30 = v29 >> 1;
if ( (v29 & 1) != 0 )
v30 = *((_QWORD *)a10 + 1);
if ( v30 )
{
std::string::operator=(&v42);
std::string::operator=(&v45);
}
else
{
v40 = (fnv::vnm *)fnv::vnm::Ipv4AddrFromBits(
(fnv::vnm *)"vector_baseIPKcNS_9allocatorIS2_EEED2Ev",
0x10uLL,
(int)v23,
0xCuLL,
v24);
v39 = (fnv::vnm *)fnv::vnm::Ipv4AddrFromBits(
(fnv::vnm *)"vector_baseIPKcNS_9allocatorIS2_EEED2Ev",
0x10uLL,
(int)v23,
0xCuLL,
v25);
fnv::vnm::StringFromIpv4Addr(v40, &v48);
if ( (v42 & 1) != 0 )
{
*v44 = 0;
v43 = 0LL;
}
else
{
LOWORD(v42) = 0;
}
std::string::reserve(&v42, 0LL);
v42 = v48;
v43 = v49;
v44 = v50;
v48 = 0LL;
v49 = 0LL;
v50 = 0LL;
std::string::~string(&v48);
fnv::vnm::StringFromIpv4Addr(v39, &v51);
if ( (v45 & 1) != 0 )
{
*v47 = 0;
v46 = 0LL;
}
else
{
LOWORD(v45) = 0;
}
std::string::reserve(&v45, 0LL);
v45 = v51;
v46 = v52;
v47 = v53;
v51 = 0LL;
v52 = 0LL;
v53 = 0LL;
std::string::~string(&v51);
}
fnv::vnm::CompositeConfig::CompositeConfig((__int64)v61, a1);
fnv::vnm::VlanIface::VlanIface(v58, v41, a4, a3, a7, v27);
v31 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v58);
v19 = v31;
if ( v31 )
{
Logger::e((Logger *)qword_4D108, "ConfigVlanInterface VlanIface Construction error: %d", v31);
if ( v19 == 22 )
{
memset(v60, 0, 24);
std::string::__init(v60, "ConfigVlanInterface VlanIface Construction error ", 49LL);
std::to_string((std::__1 *)((unsigned int)&dword_14 + 2), v32);
v33 = (_QWORD *)std::string::insert(v54, 0LL, "VlanIfaceFailure: ");
v34 = v33[1];
v59[0] = *v33;
v59[1] = v34;
v59[2] = v33[2];
*v33 = 0LL;
v33[1] = 0LL;
v33[2] = 0LL;
fnv::vnm::LogWorthy((__int64)v60, "nto/tun_qnx.cpp", 0x520u, (__int64)v59);
std::string::~string(v59);
v19 = 22;
std::string::~string(v54);
std::string::~string(v60);
}
goto LABEL_60;
}
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v61, (fnv::vnm::ConfigElement *)v58);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v61) )
{
memset(v55, 0, sizeof(v55));
std::string::__init(v55, "28", 2LL);
memset(v56, 0, sizeof(v56));
std::string::__init(v56, "", 0LL);
fnv::vnm::AddressConfig::AddressConfig(v60, v41, &v42, v55, v56);
std::string::~string(v56);
std::string::~string(v55);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v61, (fnv::vnm::ConfigElement *)v60);
fnv::vnm::AddressConfig::~AddressConfig((fnv::vnm::AddressConfig *)v60);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v61) )
{
if ( v24 == (__int64)v25 )
{
v35 = v44;
if ( (v42 & 1) == 0 )
v35 = (char *)&v42 + 1;
Logger::d((Logger *)qword_4D110, "ConfigVlanInterface: Not configuring egress rule for VLAN IP: %s", v35);
}
else
{
fnv::vnm::PfAnchor::PfAnchor((fnv::vnm::PfAnchor *)v59);
if ( !(unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v59) )
{
v19 = 23;
fnv::vnm::PfAnchor::~PfAnchor((fnv::vnm::PfAnchor *)v59);
LABEL_60:
fnv::vnm::VlanIface::~VlanIface((fnv::vnm::VlanIface *)v58);
fnv::vnm::CompositeConfig::~CompositeConfig((fnv::vnm::CompositeConfig *)v61);
std::string::~string(&v45);
std::string::~string(&v42);
std::string::~string(v41);
return v19;
}
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v61, (fnv::vnm::ConfigElement *)v59);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v61) )
{
fnv::vnm::PfAnchor::anchorstr(v57);
fnv::vnm::RoutingPolicy::RoutingPolicy(
(__int64)v60,
(__int64)v57,
(__int64)&v42,
(__int64)v41,
(unsigned __int8 *)&v45);
std::string::~string(v57);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v61, (fnv::vnm::ConfigElement *)v60);
fnv::vnm::RoutingPolicy::~RoutingPolicy((fnv::vnm::RoutingPolicy *)v60);
}
fnv::vnm::PfAnchor::~PfAnchor((fnv::vnm::PfAnchor *)v59);
}
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v61) )
{
std::operator+<char>("ifaces/", v41);
fnv::vnm::JournalEntry::JournalEntry((__int64)v60, (__int64)v59);
std::string::~string(v59);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v61, (fnv::vnm::ConfigElement *)v60);
fnv::vnm::JournalEntry::~JournalEntry((fnv::vnm::JournalEntry *)v60);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v61) )
{
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)&unk_4D128, (fnv::vnm::ConfigElement *)v61);
std::string::operator=(a10);
v36 = a10 + 1;
if ( (*a10 & 1) != 0 )
v36 = (const char *)*((_QWORD *)a10 + 2);
Logger::d((Logger *)qword_4D110, "ConfigVlanInterface: VLAN IP-address being returned: %s", v36);
v19 = 0;
}
else
{
v19 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v61);
}
goto LABEL_60;
}
v18 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v18 = *(const char **)(a1 + 16);
v19 = 17;
Logger::e((Logger *)qword_4D108, "%s: ERROR: request for iface [%s]: name not unique.", "ConfigVlanInterface", v18);
return v19;
}
// 271FC: variable 'v32' is possibly undefined
// 14: using guessed type int dword_14;
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13490: using guessed type __int64 __fastcall std::stoi(_QWORD, _QWORD, _QWORD);
// 13500: using guessed type __int64 __fastcall std::string::operator=(_QWORD);
// 138B0: using guessed type __int64 __fastcall std::string::insert(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13A30: using guessed type __int64 __fastcall std::string::reserve(_QWORD, _QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 226C8: using guessed type __int64 __fastcall fnv::vnm::AddressConfig::AddressConfig(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 22924: using guessed type __int64 __fastcall fnv::vnm::VlanIface::VlanIface(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (000000000002760C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigVlanInterface(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
char *a8,
__int64 a9)
{
_QWORD v18[3]; // [xsp+A0h] [xbp+80h] BYREF
__int64 v19[3]; // [xsp+B8h] [xbp+98h] BYREF
_BYTE v20[24]; // [xsp+D0h] [xbp+B0h] BYREF
v18[1] = 0LL;
v18[2] = 0LL;
std::string::__init(v18, "", 0LL);
memset(v19, 0, sizeof(v19));
std::string::__init(v19, "", 0LL);
std::string::basic_string(v20, a9);
LODWORD(a1) = fnv::vnm::ConfigVlanInterface(a1, a2, a3, a4, a5, a6, a7, (__int64)v18, (__int64)v19, a8);
std::string::~string(v20);
std::string::~string(v19);
std::string::~string(v18);
return (unsigned int)a1;
}
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
//----- (000000000002777C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigVlanWithIp(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
__int64 a8)
{
char v16[24]; // [xsp+88h] [xbp+78h] BYREF
_BYTE v17[24]; // [xsp+A0h] [xbp+90h] BYREF
_BYTE v18[24]; // [xsp+B8h] [xbp+A8h] BYREF
_BYTE v19[24]; // [xsp+D0h] [xbp+C0h] BYREF
std::string::basic_string(v16, a7);
std::string::basic_string(v17, a8);
std::operator+<char>("vlan", a1);
std::string::basic_string(v19, v17);
LODWORD(a1) = fnv::vnm::ConfigVlanInterface((__int64)v18, a2, a1, a3, a4, a5, a6, v16, (__int64)v19);
std::string::~string(v19);
std::string::~string(v18);
std::string::~string(v17);
std::string::~string(v16);
return (unsigned int)a1;
}
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (00000000000278F4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::ConfigVlanWithIp(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
__int64 a8,
__int64 a9,
__int64 a10)
{
char v18[24]; // [xsp+A8h] [xbp+88h] BYREF
_BYTE v19[24]; // [xsp+C0h] [xbp+A0h] BYREF
_BYTE v20[24]; // [xsp+D8h] [xbp+B8h] BYREF
_BYTE v21[24]; // [xsp+F0h] [xbp+D0h] BYREF
std::string::basic_string(v18, a7);
std::string::basic_string(v19, a8);
std::operator+<char>("vlan", a1);
std::string::basic_string(v21, v19);
LODWORD(a1) = fnv::vnm::ConfigVlanInterface((__int64)v20, a2, a1, a3, a4, a5, a6, a9, a10, v18);
std::string::~string(v21);
std::string::~string(v20);
std::string::~string(v19);
std::string::~string(v18);
return (unsigned int)a1;
}
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (0000000000027A74) ----------------------------------------------------
__int64 __fastcall fnv::vnm::AddInternalConnection(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
char a6,
char a7)
{
__int64 v11; // x1
__int64 v12; // x2
__int64 *v13; // x0
__int64 v14; // x3
__int64 *v15; // x0
__int64 v16; // x3
__int64 v17; // x1
__int64 v18; // x2
_QWORD *v19; // x0
__int64 v20; // x3
_QWORD *v21; // x0
__int64 v22; // x3
__int64 v23; // x1
__int64 v24; // x2
_QWORD *v25; // x0
__int64 v26; // x3
const char *v27; // x2
const char *v28; // x3
const char *v29; // x4
const char *v30; // x5
__int64 v31; // x1
__int64 v32; // x1
__int64 v33; // x0
size_t v34; // x2
unsigned __int8 *v35; // x0
char *v36; // x1
__int64 v37; // x3
int v38; // w4
unsigned int v39; // w19
_QWORD *v40; // x0
__int64 v41; // x1
char *v42; // x3
unsigned __int8 v43; // w0
int v44; // w28
__int64 *v45; // x0
int v46; // w20
__int64 *v47; // x0
_QWORD v52[2]; // [xsp+98h] [xbp+98h] BYREF
char *v53; // [xsp+A8h] [xbp+A8h]
__int64 v54[3]; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v55[3]; // [xsp+C8h] [xbp+C8h] BYREF
__int64 v56; // [xsp+E0h] [xbp+E0h] BYREF
__int64 v57; // [xsp+E8h] [xbp+E8h]
__int64 v58; // [xsp+F0h] [xbp+F0h]
__int64 v59; // [xsp+F8h] [xbp+F8h] BYREF
__int64 v60; // [xsp+100h] [xbp+100h]
__int64 v61; // [xsp+108h] [xbp+108h]
_QWORD v62[15]; // [xsp+110h] [xbp+110h] BYREF
_QWORD v63[16]; // [xsp+188h] [xbp+188h] BYREF
std::operator+<char>(":", (unsigned __int8 *)a1, v55);
if ( (*(_BYTE *)a2 & 1) != 0 )
{
v12 = *(_QWORD *)(a2 + 8);
v11 = *(_QWORD *)(a2 + 16);
}
else
{
v11 = a2 + 1;
v12 = *(_BYTE *)a2 >> 1;
}
v13 = (__int64 *)std::string::append(v55, v11, v12);
v14 = v13[1];
v56 = *v13;
v57 = v14;
v58 = v13[2];
*v13 = 0LL;
v13[1] = 0LL;
v13[2] = 0LL;
v15 = (__int64 *)std::string::append(&v56, ":");
v16 = v15[1];
v59 = *v15;
v60 = v16;
v61 = v15[2];
*v15 = 0LL;
v15[1] = 0LL;
v15[2] = 0LL;
if ( (*(_BYTE *)a3 & 1) != 0 )
{
v18 = *(_QWORD *)(a3 + 8);
v17 = *(_QWORD *)(a3 + 16);
}
else
{
v17 = a3 + 1;
v18 = *(_BYTE *)a3 >> 1;
}
v19 = (_QWORD *)std::string::append(&v59, v17, v18);
v20 = v19[1];
v62[0] = *v19;
v62[1] = v20;
v62[2] = v19[2];
*v19 = 0LL;
v19[1] = 0LL;
v19[2] = 0LL;
v21 = (_QWORD *)std::string::append(v62, ":");
v22 = v21[1];
v63[0] = *v21;
v63[1] = v22;
v63[2] = v21[2];
*v21 = 0LL;
v21[1] = 0LL;
v21[2] = 0LL;
if ( (*(_BYTE *)a4 & 1) != 0 )
{
v24 = *(_QWORD *)(a4 + 8);
v23 = *(_QWORD *)(a4 + 16);
}
else
{
v23 = a4 + 1;
v24 = *(_BYTE *)a4 >> 1;
}
v25 = (_QWORD *)std::string::append(v63, v23, v24);
v26 = v25[1];
v52[0] = *v25;
v52[1] = v26;
v53 = (char *)v25[2];
*v25 = 0LL;
v25[1] = 0LL;
v25[2] = 0LL;
std::string::~string(v63);
std::string::~string(v62);
std::string::~string(&v59);
std::string::~string(&v56);
std::string::~string(v55);
v27 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v27 = *(const char **)(a1 + 16);
v28 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v28 = *(const char **)(a2 + 16);
v29 = (const char *)(a3 + 1);
if ( (*(_BYTE *)a3 & 1) != 0 )
v29 = *(const char **)(a3 + 16);
v30 = (const char *)(a4 + 1);
if ( (*(_BYTE *)a4 & 1) != 0 )
v30 = *(const char **)(a4 + 16);
Logger::i(
(Logger *)qword_4D108,
"Request to open a connection from IP/network [%s] to IP/network [%s], protocol %s parameter %s",
v27,
v28,
v29,
v30);
v31 = *(_BYTE *)a1 >> 1;
if ( (*(_BYTE *)a1 & 1) != 0 )
v31 = *(_QWORD *)(a1 + 8);
if ( !v31 )
goto LABEL_72;
v32 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v32 = *(_QWORD *)(a2 + 8);
if ( !v32 )
{
LABEL_72:
Logger::e((Logger *)qword_4D108, "%s: ERROR: trusted or untrusted IP/network cannot be empty.", &unk_31B28);
goto LABEL_42;
}
if ( (*(_BYTE *)a1 & 1) != 0 )
v33 = *(_QWORD *)(a1 + 8);
else
v33 = *(_BYTE *)a1 >> 1;
v34 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v34 = *(_QWORD *)(a2 + 8);
if ( v34 != v33 )
goto LABEL_43;
v35 = (unsigned __int8 *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v35 = *(unsigned __int8 **)(a1 + 16);
v36 = (char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v36 = *(char **)(a2 + 16);
if ( (*(_BYTE *)a1 & 1) == 0 )
{
v37 = 0LL;
while ( v34 != v37 )
{
v38 = v35[v37++];
if ( (unsigned __int8)v36[v37 - 1] != v38 )
goto LABEL_43;
}
goto LABEL_41;
}
if ( !(unsigned int)std::char_traits<char>::compare(v35, v36, v34) )
{
LABEL_41:
Logger::e((Logger *)qword_4D108, "%s: ERROR: trusted or untrusted IP/network cannot be the same.", &unk_31B28);
LABEL_42:
v39 = 22;
goto LABEL_71;
}
LABEL_43:
v40 = fnv::vnm::CompositeConfig::find((__int64)&unk_4D308, (__int64)v52);
if ( fnv::vnm::CompositeConfig::isEnd((__int64)&unk_4D308, (__int64)v40, v41) )
{
fnv::vnm::CompositeConfig::CompositeConfig((__int64)v62, (__int64)v52);
v43 = fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v62);
v44 = v43;
if ( v43 )
{
memset(v54, 0, sizeof(v54));
v59 = 0LL;
v60 = 0LL;
v61 = 0LL;
if ( std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::find<std::string>(
flt_4D438,
a1) )
{
std::unordered_map<std::string,std::string>::at(flt_4D438, a1);
}
std::string::operator=(v54);
if ( std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::find<std::string>(
flt_4D438,
a2) )
{
std::unordered_map<std::string,std::string>::at(flt_4D438, a2);
}
std::string::operator=(&v59);
if ( !(unsigned int)std::string::compare(v54, "ECG") )
{
if ( std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::find<std::string>(
&flt_4D438[10],
a2) )
{
v45 = std::unordered_map<std::string,std::string>::at(&flt_4D438[10], a2);
std::unordered_map<std::string,std::string>::at(flt_4D438, (__int64)v45);
v46 = 0;
}
else
{
memset(v55, 0, sizeof(v55));
std::string::__init(v55, "uECG", 4LL);
std::unordered_map<std::string,std::string>::at(flt_4D438, (__int64)v55);
v46 = v44;
}
std::string::operator=(v54);
if ( v46 )
std::string::~string(v55);
}
if ( !(unsigned int)std::string::compare(&v59, "ECG") )
{
if ( std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::find<std::string>(
&flt_4D438[10],
a1) )
{
v47 = std::unordered_map<std::string,std::string>::at(&flt_4D438[10], a1);
std::unordered_map<std::string,std::string>::at(flt_4D438, (__int64)v47);
v44 = 0;
}
else
{
v58 = 0LL;
v56 = 0LL;
v57 = 0LL;
std::string::__init(&v56, "uECG", 4LL);
std::unordered_map<std::string,std::string>::at(flt_4D438, (__int64)&v56);
}
std::string::operator=(&v59);
if ( v44 )
std::string::~string(&v56);
}
fnv::vnm::InternalConnectionPolicy::InternalConnectionPolicy(
(__int64)v63,
(unsigned __int8 *)v54,
(__int64)&v59,
a3,
a4,
a5,
a6,
a7);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v62, (fnv::vnm::ConfigElement *)v63);
fnv::vnm::InternalConnectionPolicy::~InternalConnectionPolicy((fnv::vnm::InternalConnectionPolicy *)v63);
std::string::~string(&v59);
std::string::~string(v54);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v62) )
{
std::operator+<char>("rules/", v52);
fnv::vnm::JournalEntry::JournalEntry((__int64)v63, (__int64)&v59);
std::string::~string(&v59);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v62, (fnv::vnm::ConfigElement *)v63);
fnv::vnm::JournalEntry::~JournalEntry((fnv::vnm::JournalEntry *)v63);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v62) )
{
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)&unk_4D308, (fnv::vnm::ConfigElement *)v62);
v39 = 0;
}
else
{
v39 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v62);
}
fnv::vnm::CompositeConfig::~CompositeConfig((fnv::vnm::CompositeConfig *)v62);
}
else
{
v42 = v53;
if ( (v52[0] & 1) == 0 )
v42 = (char *)v52 + 1;
Logger::e((Logger *)qword_4D108, "%s: ERROR: Connection exist [%s].", &unk_31B28, v42);
v39 = 17;
}
LABEL_71:
std::string::~string(v52);
return v39;
}
// 27DC8: variable 'v41' is possibly undefined
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13500: using guessed type __int64 __fastcall std::string::operator=(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 139D0: using guessed type __int64 __fastcall std::string::compare(_QWORD, _QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 13BA0: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D438: using guessed type float flt_4D438[20];
//----- (00000000000281C0) ----------------------------------------------------
__int64 __fastcall fnv::vnm::LinkNetworks(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
const char *v7; // x2
const char *v8; // x3
__int64 v9; // x0
__int64 v10; // x0
unsigned int v11; // w20
__int64 v13; // x24
__int64 v14; // x0
char *v15; // x2
_QWORD *v16; // x24
__int64 v17; // x1
__int64 v18; // x25
_BYTE *v19; // x3
const char *v20; // x3
const char *v21; // x3
_BYTE *v22; // x2
char v23; // [xsp+78h] [xbp+78h] BYREF
_BYTE v24[15]; // [xsp+79h] [xbp+79h] BYREF
_BYTE *v25; // [xsp+88h] [xbp+88h]
__int64 v26; // [xsp+90h] [xbp+90h] BYREF
__int64 v27; // [xsp+98h] [xbp+98h]
char *v28; // [xsp+A0h] [xbp+A0h]
_BYTE v29[24]; // [xsp+A8h] [xbp+A8h] BYREF
_QWORD v30[3]; // [xsp+C0h] [xbp+C0h] BYREF
_QWORD v31[3]; // [xsp+D8h] [xbp+D8h] BYREF
_BYTE v32[24]; // [xsp+F0h] [xbp+F0h] BYREF
_BYTE v33[72]; // [xsp+108h] [xbp+108h] BYREF
_BYTE v34[72]; // [xsp+150h] [xbp+150h] BYREF
_BYTE v35[120]; // [xsp+198h] [xbp+198h] BYREF
_BYTE v36[120]; // [xsp+210h] [xbp+210h] BYREF
v7 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v7 = *(const char **)(a1 + 16);
v8 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v8 = *(const char **)(a2 + 16);
Logger::i((Logger *)qword_4D110, "Request to link iface [%s] to iface [%s]", v7, v8);
v9 = *(_BYTE *)a1 >> 1;
if ( (*(_BYTE *)a1 & 1) != 0 )
v9 = *(_QWORD *)(a1 + 8);
if ( v9 )
{
v10 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v10 = *(_QWORD *)(a2 + 8);
if ( v10 )
{
v13 = std::string::find(a2, 47LL, 0LL);
std::string::basic_string(&v23, a2, 0LL, v13, a2);
if ( v13 == -1 )
{
v26 = 0LL;
v27 = 0LL;
v28 = 0LL;
std::string::__init(&v26, "", 0LL);
}
else
{
std::string::basic_string(&v26, a2, v13 + 1, -1LL, a2);
}
v14 = v27;
if ( (v26 & 1) == 0 )
v14 = (unsigned __int8)v26 >> 1;
if ( !v14 || fnv::vnm::ValidateIpv4Address((__int64)&v26) )
{
if ( (unsigned __int8)fnv::vnm::ValidateIfname((__int64)&v23) )
{
if ( fnv::vnm::CompositeConfig::exists((__int64)&unk_4D1A0, a1) )
{
v20 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v20 = *(const char **)(a1 + 16);
Logger::e(
(Logger *)qword_4D108,
"%s: ERROR: the interface [%s] has already been linked.",
"LinkNetworks",
v20);
v11 = 17;
}
else
{
v16 = fnv::vnm::CompositeConfig::find((__int64)&unk_4D128, a1);
v18 = v17;
std::string::basic_string(v29, a1);
if ( fnv::vnm::CompositeConfig::isEnd((__int64)&unk_4D128, (__int64)v16, v18) )
{
v21 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v21 = *(const char **)(a1 + 16);
Logger::e((Logger *)qword_4D108, "%s: ERROR: we do not know the interface [%s].", "LinkNetworks", v21);
v11 = 22;
}
else
{
fnv::vnm::PfAnchor::PfAnchor((fnv::vnm::PfAnchor *)v33);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v33) )
{
fnv::vnm::CompositeConfig::CompositeConfig((__int64)v35, a1);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v35, (fnv::vnm::ConfigElement *)v33);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v35) )
{
if ( !(unsigned int)std::string::compare(&v23, "mrvl_mlan0") )
{
v22 = v25;
if ( (v23 & 1) == 0 )
v22 = v24;
Logger::d((Logger *)qword_4D110, "LinkNetworks: Not adding default route for outifnm: %s", v22);
}
else
{
fnv::vnm::DefaultRoute::DefaultRoute((__int64)v36, (__int64)&v23);
fnv::vnm::CompositeConfig::maybePush(
(fnv::vnm::CompositeConfig *)v35,
(fnv::vnm::ConfigElement *)v36);
fnv::vnm::CompositeConfig::overrideSuccess((__int64)v35);
fnv::vnm::DefaultRoute::~DefaultRoute((fnv::vnm::DefaultRoute *)v36);
}
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v35) )
{
fnv::vnm::PfAnchor::anchorstr(v30);
fnv::vnm::RoutingPolicy::RoutingPolicy(
(__int64)v36,
(__int64)v30,
(__int64)v29,
(__int64)&v23,
(unsigned __int8 *)&v26);
std::string::~string(v30);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v35, (fnv::vnm::ConfigElement *)v36);
fnv::vnm::RoutingPolicy::~RoutingPolicy((fnv::vnm::RoutingPolicy *)v36);
}
fnv::vnm::PfAnchor::PfAnchor((fnv::vnm::PfAnchor *)v34);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v34) )
{
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v35, (fnv::vnm::ConfigElement *)v34);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v35) )
{
fnv::vnm::PfAnchor::anchorstr(v31);
fnv::vnm::RoutingPolicy::RoutingPolicy(
(__int64)v36,
(__int64)v31,
(__int64)&v23,
(__int64)&v23,
(unsigned __int8 *)&v26);
std::string::~string(v31);
fnv::vnm::CompositeConfig::maybePush(
(fnv::vnm::CompositeConfig *)v35,
(fnv::vnm::ConfigElement *)v36);
fnv::vnm::RoutingPolicy::~RoutingPolicy((fnv::vnm::RoutingPolicy *)v36);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v35) )
{
std::operator+<char>("rules/", a1);
fnv::vnm::JournalEntry::JournalEntry((__int64)v36, (__int64)v32);
std::string::~string(v32);
fnv::vnm::CompositeConfig::maybePush(
(fnv::vnm::CompositeConfig *)v35,
(fnv::vnm::ConfigElement *)v36);
fnv::vnm::JournalEntry::~JournalEntry((fnv::vnm::JournalEntry *)v36);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v35) )
{
fnv::vnm::CompositeConfig::maybePush(
(fnv::vnm::CompositeConfig *)&unk_4D1A0,
(fnv::vnm::ConfigElement *)v35);
std::string::operator=(a4);
v11 = 0;
}
else
{
v11 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v35);
}
}
else
{
v11 = 23;
}
fnv::vnm::PfAnchor::~PfAnchor((fnv::vnm::PfAnchor *)v34);
fnv::vnm::CompositeConfig::~CompositeConfig((fnv::vnm::CompositeConfig *)v35);
}
else
{
v11 = 23;
}
fnv::vnm::PfAnchor::~PfAnchor((fnv::vnm::PfAnchor *)v33);
}
std::string::~string(v29);
}
goto LABEL_41;
}
v19 = v25;
if ( (v23 & 1) == 0 )
v19 = v24;
Logger::e((Logger *)qword_4D108, "%s: ERROR: the interface [%s] does not exist.", "LinkNetworks", v19);
}
else
{
v15 = v28;
if ( (v26 & 1) == 0 )
v15 = (char *)&v26 + 1;
Logger::w((Logger *)qword_4D108, "Gateway string is not valid: [%s]", v15);
}
v11 = 22;
LABEL_41:
std::string::~string(&v26);
std::string::~string(&v23);
return v11;
}
}
v11 = 22;
Logger::e((Logger *)qword_4D108, "%s: ERROR: interface names cannot be empty.", "LinkNetworks");
return v11;
}
// 283D4: variable 'v17' is possibly undefined
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13500: using guessed type __int64 __fastcall std::string::operator=(_QWORD);
// 13680: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD);
// 13960: using guessed type __int64 __fastcall std::string::find(_QWORD, _QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 139D0: using guessed type __int64 __fastcall std::string::compare(_QWORD, _QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (00000000000287D8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::LinkRoutingTunnels(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v7[3]; // [xsp+40h] [xbp+40h] BYREF
memset(v7, 0, sizeof(v7));
std::string::__init(v7, "", 0LL);
LODWORD(a1) = fnv::vnm::LinkNetworks(a1, a2, (__int64)v7, a3);
std::string::~string(v7);
return (unsigned int)a1;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
//----- (0000000000028894) ----------------------------------------------------
__int64 __fastcall fnv::vnm::TrustedLinkNetworks(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6)
{
const char *v11; // x2
const char *v12; // x3
__int64 v13; // x0
__int64 v14; // x0
__int64 v15; // x0
unsigned int v16; // w20
const char *v18; // x2
__int64 v19; // x3
const char *v20; // x3
_QWORD *v21; // x0
__int64 v22; // x1
__int64 v23; // x3
Logger *v24; // x22
__int64 v25; // x20
unsigned int v26; // w0
__int64 v27; // x3
_QWORD v29[3]; // [xsp+78h] [xbp+78h] BYREF
_BYTE v30[24]; // [xsp+90h] [xbp+90h] BYREF
_BYTE v31[72]; // [xsp+A8h] [xbp+A8h] BYREF
_BYTE v32[96]; // [xsp+F0h] [xbp+F0h] BYREF
_BYTE v33[120]; // [xsp+150h] [xbp+150h] BYREF
v11 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v11 = *(const char **)(a1 + 16);
v12 = (const char *)(a3 + 1);
if ( (*(_BYTE *)a3 & 1) != 0 )
v12 = *(const char **)(a3 + 16);
Logger::i((Logger *)qword_4D110, "Request to link iface [%s] to iface [%s]", v11, v12);
v13 = *(_BYTE *)a1 >> 1;
if ( (*(_BYTE *)a1 & 1) != 0 )
v13 = *(_QWORD *)(a1 + 8);
if ( !v13 )
goto LABEL_14;
v14 = *(_BYTE *)a3 >> 1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v14 = *(_QWORD *)(a3 + 8);
if ( !v14 )
goto LABEL_14;
v15 = *(_BYTE *)a4 >> 1;
if ( (*(_BYTE *)a4 & 1) != 0 )
v15 = *(_QWORD *)(a4 + 8);
if ( !v15 )
{
LABEL_14:
Logger::e((Logger *)qword_4D108, "%s: ERROR: interface names or gateway cannot be empty.", "TrustedLinkNetworks");
return 22;
}
if ( !fnv::vnm::ValidateIpv4Address(a4) )
{
v18 = (const char *)(a4 + 1);
if ( (*(_BYTE *)a4 & 1) != 0 )
v18 = *(const char **)(a4 + 16);
Logger::w((Logger *)qword_4D108, "Gateway string is not valid: [%s]", v18);
return 22;
}
if ( !(unsigned __int8)fnv::vnm::ValidateIfname(a3) )
{
v19 = a3 + 1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v19 = *(_QWORD *)(a3 + 16);
Logger::e((Logger *)qword_4D108, "%s: ERROR: the interface [%s] does not exist.", "TrustedLinkNetworks", v19);
return 22;
}
if ( !fnv::vnm::CompositeConfig::exists((__int64)&unk_4D1A0, a1) )
{
v21 = fnv::vnm::CompositeConfig::find((__int64)&unk_4D128, a1);
if ( fnv::vnm::CompositeConfig::isEnd((__int64)&unk_4D128, (__int64)v21, v22) )
{
v23 = a1 + 1;
if ( (*(_BYTE *)a1 & 1) != 0 )
v23 = *(_QWORD *)(a1 + 16);
Logger::e((Logger *)qword_4D108, "%s: ERROR: we do not know the interface [%s].", "TrustedLinkNetworks", v23);
return 22;
}
fnv::vnm::PfAnchor::PfAnchor((fnv::vnm::PfAnchor *)v31);
if ( !(unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v31) )
{
v16 = 23;
goto LABEL_54;
}
fnv::vnm::CompositeConfig::CompositeConfig((__int64)v33, a1);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v33, (fnv::vnm::ConfigElement *)v31);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v33) )
{
fnv::vnm::PfAnchor::anchorstr(v29);
fnv::vnm::RoutingPolicy::RoutingPolicy((__int64)v32, (__int64)v29, a2, a3, (unsigned __int8 *)a4);
std::string::~string(v29);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v33, (fnv::vnm::ConfigElement *)v32);
fnv::vnm::RoutingPolicy::~RoutingPolicy((fnv::vnm::RoutingPolicy *)v32);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v33) )
{
fnv::vnm::NatRule::NatRule((__int64)v32, a3);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v33, (fnv::vnm::ConfigElement *)v32);
fnv::vnm::NatRule::~NatRule((fnv::vnm::NatRule *)v32);
}
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v33) )
{
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)&unk_4D380, (fnv::vnm::ConfigElement *)v33);
v27 = a3 + 1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v27 = *(_QWORD *)(a3 + 16);
Logger::i((Logger *)qword_4D110, "%s: InstallNat successful iface=[%s].", "TrustedLinkNetworks", v27);
fnv::vnm::CompositeConfig::overrideSuccess((__int64)v33);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v33) )
{
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)&unk_4D1A0, (fnv::vnm::ConfigElement *)v33);
if ( (unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v33) )
{
std::operator+<char>("rules/", a1);
fnv::vnm::JournalEntry::JournalEntry((__int64)v32, (__int64)v30);
std::string::~string(v30);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v33, (fnv::vnm::ConfigElement *)v32);
fnv::vnm::JournalEntry::~JournalEntry((fnv::vnm::JournalEntry *)v32);
}
std::string::operator=(a6);
v16 = 0;
goto LABEL_52;
}
}
else
{
v24 = (Logger *)qword_4D108;
v25 = a3 + 1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v25 = *(_QWORD *)(a3 + 16);
v26 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v33);
Logger::e(v24, "%s: InstallNat failed iface=[%s] errorcode = %d.", "TrustedLinkNetworks", v25, v26);
}
v16 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v33);
LABEL_52:
fnv::vnm::CompositeConfig::~CompositeConfig((fnv::vnm::CompositeConfig *)v33);
LABEL_54:
fnv::vnm::PfAnchor::~PfAnchor((fnv::vnm::PfAnchor *)v31);
return v16;
}
v20 = (const char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v20 = *(const char **)(a1 + 16);
v16 = 17;
Logger::e((Logger *)qword_4D108, "%s: ERROR: the interface [%s] has already been linked.", "TrustedLinkNetworks", v20);
return v16;
}
// 28A6C: variable 'v22' is possibly undefined
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13500: using guessed type __int64 __fastcall std::string::operator=(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (0000000000028D48) ----------------------------------------------------
__int64 __fastcall fnv::vnm::IfaceRemover::visit(__int64 a1, __int64 a2)
{
const char *v3; // x2
_BYTE v5[24]; // [xsp+48h] [xbp+48h] BYREF
_BYTE v6[72]; // [xsp+60h] [xbp+60h] BYREF
_BYTE v7[72]; // [xsp+A8h] [xbp+A8h] BYREF
_BYTE v8[128]; // [xsp+F0h] [xbp+F0h] BYREF
v3 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v3 = *(const char **)(a2 + 16);
Logger::i((Logger *)qword_4D110, "Iface remover visit: %s", v3);
fnv::vnm::CompositeConfig::CompositeConfig((__int64)v8, a2);
fnv::vnm::VlanIface::VlanIface((__int64)v6, a2);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v8, (fnv::vnm::ConfigElement *)v6);
std::operator+<char>("ifaces/", a2);
fnv::vnm::JournalEntry::JournalEntry((__int64)v7, (__int64)v5);
std::string::~string(v5);
fnv::vnm::CompositeConfig::maybePush((fnv::vnm::CompositeConfig *)v8, (fnv::vnm::ConfigElement *)v7);
fnv::vnm::JournalEntry::~JournalEntry((fnv::vnm::JournalEntry *)v7);
fnv::vnm::VlanIface::~VlanIface((fnv::vnm::VlanIface *)v6);
fnv::vnm::CompositeConfig::~CompositeConfig((fnv::vnm::CompositeConfig *)v8);
return *(_QWORD *)&v8[120] ^ _stack_chk_guard;
}
// 13330: using guessed type __int64 __fastcall std::operator+<char>(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 4D110: using guessed type __int64 qword_4D110;
//----- (0000000000028E8C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::AddDnsForwarder(unsigned __int8 *a1, __int64 a2, __int64 a3, unsigned int a4)
{
__int64 v7; // x0
unsigned int v8; // w19
bool v9; // w0
unsigned __int8 v10; // w1
__int64 v11; // x0
__int64 v12; // x3
__int64 v13; // x3
__int64 v14; // x0
__int64 v15; // x3
__int64 v16; // x2
const char *v17; // x2
const char *v18; // x3
const char *v19; // x4
_QWORD *v20; // x0
__int64 v21; // x1
__int64 **v22; // x26
__int64 *v23; // x27
__int64 *v24; // x26
__int64 v25; // x0
const char *v27; // x2
const char *v28; // x3
_BOOL4 v29; // w26
unsigned __int8 v30; // [xsp+68h] [xbp+68h] BYREF
_BYTE v31[15]; // [xsp+69h] [xbp+69h] BYREF
const char *v32; // [xsp+78h] [xbp+78h]
__int64 v33[3]; // [xsp+80h] [xbp+80h] BYREF
__int64 v34[3]; // [xsp+98h] [xbp+98h] BYREF
void *v35[21]; // [xsp+B0h] [xbp+B0h] BYREF
fnv::vnm::Trim(a1, (__int64)&v30);
v7 = v30 >> 1;
if ( (v30 & 1) != 0 )
v7 = *(_QWORD *)&v31[7];
if ( v7 )
{
v9 = fnv::vnm::ValidateIpv4Address(a2);
v10 = *(_BYTE *)a3;
if ( !v9 )
{
v11 = v10 >> 1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v11 = *(_QWORD *)(a3 + 8);
if ( v11 )
{
v12 = a2 + 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v12 = *(_QWORD *)(a2 + 16);
Logger::e((Logger *)qword_4D108, "%s: [%s] is not a valid primary IP address.", "AddDnsForwarder", v12);
}
else
{
v13 = a2 + 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v13 = *(_QWORD *)(a2 + 16);
Logger::e((Logger *)qword_4D108, "%s: [%s] is not a valid IP address.", "AddDnsForwarder", v13);
}
goto LABEL_5;
}
v14 = v10 >> 1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v14 = *(_QWORD *)(a3 + 8);
if ( v14 && !fnv::vnm::ValidateIpv4Address(a3) )
{
if ( (*(_BYTE *)a3 & 1) != 0 )
v15 = *(_QWORD *)(a3 + 16);
else
v15 = a3 + 1;
Logger::e((Logger *)qword_4D108, "%s: [%s] is not a valid secondary IP address.", "AddDnsForwarder", v15);
goto LABEL_5;
}
if ( (a4 & 0x80000000) != 0 )
{
Logger::e((Logger *)qword_4D108, "%s: [%d] not a valid hints ", "AddDnsForwarder", a4);
goto LABEL_5;
}
v16 = *(_BYTE *)a3 >> 1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v16 = *(_QWORD *)(a3 + 8);
if ( v16 )
{
v17 = v32;
v18 = (const char *)(a2 + 1);
if ( (v30 & 1) == 0 )
v17 = v31;
if ( (*(_BYTE *)a2 & 1) != 0 )
v18 = *(const char **)(a2 + 16);
v19 = (const char *)(a3 + 1);
if ( (*(_BYTE *)a3 & 1) != 0 )
v19 = *(const char **)(a3 + 16);
Logger::i(
(Logger *)qword_4D110,
"Configuring service named [%s] with primary and secondary DNS IP %s and %s",
v17,
v18,
v19);
}
else
{
v27 = v32;
v28 = (const char *)(a2 + 1);
if ( (v30 & 1) == 0 )
v27 = v31;
if ( (*(_BYTE *)a2 & 1) != 0 )
v28 = *(const char **)(a2 + 16);
Logger::i((Logger *)qword_4D110, "Configuring service named [%s] with DNS IP %s", v27, v28);
}
fnv::vnm::Bind9DnsForwardEntry::Bind9DnsForwardEntry((__int64)v35, (__int64)&v30);
v20 = fnv::vnm::CompositeConfig::find((__int64)&unk_4D290, (__int64)&v30);
v22 = (__int64 **)v21;
if ( fnv::vnm::CompositeConfig::isEnd((__int64)&unk_4D290, (__int64)v20, v21) )
{
v24 = (__int64 *)v35;
v23 = 0LL;
}
else
{
v23 = *v22;
v24 = *v22;
}
fnv::vnm::DnsForwardEntry::addAddress(v24, a2, a4);
v25 = *(_BYTE *)a3 >> 1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v25 = *(_QWORD *)(a3 + 8);
if ( v25 )
v25 = fnv::vnm::DnsForwardEntry::addAddress(v24, a3, a4);
if ( !v23 )
{
if ( !(unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v35) )
{
v8 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v35);
LABEL_43:
fnv::vnm::Bind9DnsForwardEntry::~Bind9DnsForwardEntry(v35);
goto LABEL_44;
}
v25 = fnv::vnm::CompositeConfig::maybePush(
(fnv::vnm::CompositeConfig *)&unk_4D290,
(fnv::vnm::ConfigElement *)v35);
}
v8 = fnv::vnm::InstallForwarders((fnv::vnm *)v25);
if ( v8 )
{
fnv::vnm::DnsForwardEntry::rollback((fnv::vnm::DnsForwardEntry *)v24);
}
else
{
fnv::vnm::DnsForwardEntry::commit((fnv::vnm::DnsForwardEntry *)v24);
memset(v33, 0, sizeof(v33));
std::string::__init(v33, "sync_dflt", 9LL);
v29 = fnv::vnm::CompositeConfig::exists((__int64)&unk_4D218, (__int64)v33);
v8 = 0;
std::string::~string(v33);
if ( v29 )
{
Logger::d((Logger *)qword_4D110, "%s: DefaultRoute exists, deleting", "AddDnsForwarder");
memset(v34, 0, sizeof(v34));
std::string::__init(v34, "sync_dflt", 9LL);
fnv::vnm::CompositeConfig::remove((__int64)&unk_4D218, (__int64)v34);
std::string::~string(v34);
}
}
goto LABEL_43;
}
Logger::e((Logger *)qword_4D108, "%s: Name must have non-blanks", "AddDnsForwarder");
LABEL_5:
v8 = 22;
LABEL_44:
std::string::~string(&v30);
return v8;
}
// 29050: variable 'v21' is possibly undefined
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
//----- (0000000000029274) ----------------------------------------------------
__int64 __fastcall fnv::vnm::AddDnsForwarder(unsigned __int8 *a1, __int64 a2, unsigned int a3)
{
__int64 v7[3]; // [xsp+40h] [xbp+40h] BYREF
memset(v7, 0, sizeof(v7));
std::string::__init(v7, "", 0LL);
LODWORD(a1) = fnv::vnm::AddDnsForwarder(a1, a2, (__int64)v7, a3);
std::string::~string(v7);
return (unsigned int)a1;
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
//----- (000000000002932C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::InitNameServer(fnv::vnm *this)
{
_QWORD *v1; // x25
__int64 **v2; // x1
__int64 **v3; // x19
__int64 *v4; // x19
fnv::vnm *v5; // x0
unsigned int v6; // w23
int v7; // w26
const char *v8; // x1
size_t v9; // x2
__int64 v10; // x19
Logger *v11; // x22
unsigned int *errno_ptr; // x19
char v14[16]; // [xsp+0h] [xbp+0h] BYREF
__int64 v15[3]; // [xsp+50h] [xbp+50h] BYREF
__int64 v16[3]; // [xsp+68h] [xbp+68h] BYREF
__int64 v17[3]; // [xsp+80h] [xbp+80h] BYREF
__int64 v18; // [xsp+98h] [xbp+98h] BYREF
size_t v19; // [xsp+A0h] [xbp+A0h]
const char *v20; // [xsp+A8h] [xbp+A8h]
void *v21[21]; // [xsp+B0h] [xbp+B0h] BYREF
Logger::i((Logger *)qword_4D110, "Configuring service named [ecg] with DNS IP 10.1.0.1");
v20 = 0LL;
v18 = 0LL;
v19 = 0LL;
std::string::__init(&v18, "ecg", 3LL);
fnv::vnm::Bind9DnsForwardEntry::Bind9DnsForwardEntry((__int64)v21, (__int64)&v18);
std::string::~string(&v18);
memset(v15, 0, sizeof(v15));
std::string::__init(v15, "ecg", 3LL);
v1 = fnv::vnm::CompositeConfig::find((__int64)&unk_4D290, (__int64)v15);
v3 = v2;
std::string::~string(v15);
if ( fnv::vnm::CompositeConfig::isEnd((__int64)&unk_4D290, (__int64)v1, (__int64)v3) )
{
memset(v17, 0, sizeof(v17));
std::string::__init(v17, "10.1.0.1", 8LL);
fnv::vnm::DnsForwardEntry::addAddress((__int64 *)v21, (__int64)v17, 4);
std::string::~string(v17);
}
else
{
v4 = *v3;
memset(v16, 0, sizeof(v16));
std::string::__init(v16, "10.1.0.1", 8LL);
fnv::vnm::DnsForwardEntry::addAddress(v4, (__int64)v16, 4);
v5 = (fnv::vnm *)std::string::~string(v16);
if ( v4 )
goto LABEL_8;
}
if ( !(unsigned __int8)fnv::vnm::ConfigElement::successful((fnv::vnm::ConfigElement *)v21) )
{
v6 = fnv::vnm::ConfigElement::errorcode((fnv::vnm::ConfigElement *)v21);
goto LABEL_15;
}
v5 = (fnv::vnm *)fnv::vnm::CompositeConfig::maybePush(
(fnv::vnm::CompositeConfig *)&unk_4D290,
(fnv::vnm::ConfigElement *)v21);
LABEL_8:
v6 = fnv::vnm::InstallForwarders(v5);
v20 = 0LL;
v18 = 0LL;
v19 = 0LL;
std::string::__init(&v18, "fnv.net", 7LL);
v7 = v18 & 1;
if ( (v18 & 1) != 0 )
{
v9 = v19;
v8 = v20;
}
else
{
v9 = (unsigned __int8)v18 >> 1;
v8 = (char *)&v18 + 1;
}
v10 = (unsigned __int8)v18 >> 1;
strncpy(v14, v8, v9);
if ( v7 )
v10 = v19;
v14[v10] = 0;
if ( !confstr(457, v14, 0LL) )
{
v11 = (Logger *)qword_4D108;
errno_ptr = (unsigned int *)__get_errno_ptr(0LL);
Logger::e(v11, "Setting _CS_DOMAIN failed, errno: %d", *errno_ptr);
v6 |= *errno_ptr;
}
std::string::~string(&v18);
LABEL_15:
fnv::vnm::Bind9DnsForwardEntry::~Bind9DnsForwardEntry(v21);
return v6;
}
// 293DC: variable 'v2' is possibly undefined
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D108: using guessed type __int64 qword_4D108;
// 4D110: using guessed type __int64 qword_4D110;
// 2932C: using guessed type char var_160[16];
//----- (00000000000295F0) ----------------------------------------------------
void __fastcall fnv::vnm::IfaceRemover::~IfaceRemover(fnv::vnm::IfaceRemover *this)
{
*(_QWORD *)this = off_4C780;
fnv::vnm::JournalProcessor::~JournalProcessor(this);
}
// 4C780: using guessed type void (__fastcall *off_4C780[2])(fnv::vnm::IfaceRemover *__hidden this);
//----- (0000000000029604) ----------------------------------------------------
void __fastcall fnv::vnm::IfaceRemover::~IfaceRemover(fnv::vnm::IfaceRemover *this)
{
fnv::vnm::IfaceRemover::~IfaceRemover(this);
operator delete(this);
}
//----- (0000000000029628) ----------------------------------------------------
__int64 __fastcall std::char_traits<char>::compare(const void *a1, const void *a2, size_t a3)
{
if ( a3 )
return memcmp(a1, a2, a3);
else
return 0LL;
}
//----- (0000000000029638) ----------------------------------------------------
__int64 __fastcall std::pair<std::string const,std::string>::~pair(__int64 a1)
{
std::string::~string(a1 + 24);
return std::string::~string(a1);
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (0000000000029660) ----------------------------------------------------
_QWORD *__usercall std::operator+<char>@<X0>(char *s@<X1>, unsigned __int8 *a2@<X0>, _QWORD *a3@<X8>)
{
unsigned __int8 v6; // w0
int v7; // w24
__int64 v8; // x21
size_t v9; // x0
size_t v10; // x23
char *v11; // x1
*a3 = 0LL;
a3[1] = 0LL;
a3[2] = 0LL;
v6 = *a2;
v7 = v6 & 1;
v8 = v6 >> 1;
if ( (v6 & 1) != 0 )
v8 = *((_QWORD *)a2 + 1);
v9 = strlen(s);
v10 = v9;
v11 = (char *)(a2 + 1);
if ( v7 )
v11 = (char *)*((_QWORD *)a2 + 2);
std::string::__init(a3, v11, v8, v9 + v8);
std::string::append(a3, s, v10);
return a3;
}
// 13520: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD, _QWORD);
// 13A50: using guessed type __int64 __fastcall std::string::append(_QWORD, _QWORD, _QWORD);
//----- (0000000000029700) ----------------------------------------------------
void __fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::~__hash_table(
__int64 a1)
{
_QWORD *v1; // x19
_QWORD *v3; // x21
void *v4; // x0
void *v5; // x0
v1 = *(_QWORD **)(a1 + 16);
while ( v1 )
{
v3 = (_QWORD *)*v1;
std::string::~string(v1 + 2);
v4 = v1;
v1 = v3;
operator delete(v4);
}
v5 = *(void **)a1;
*(_QWORD *)a1 = 0LL;
if ( v5 )
operator delete(v5);
}
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (0000000000029768) ----------------------------------------------------
void __fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::~__hash_table(
__int64 a1)
{
_QWORD *v1; // x19
_QWORD *v3; // x21
void *v4; // x0
void *v5; // x0
v1 = *(_QWORD **)(a1 + 16);
while ( v1 )
{
v3 = (_QWORD *)*v1;
std::pair<std::string const,std::string>::~pair((__int64)(v1 + 2));
v4 = v1;
v1 = v3;
operator delete(v4);
}
v5 = *(void **)a1;
*(_QWORD *)a1 = 0LL;
if ( v5 )
operator delete(v5);
}
//----- (00000000000297D0) ----------------------------------------------------
__int64 *__fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::find<std::string>(
_QWORD *a1,
__int64 a2)
{
unsigned __int64 v4; // x0
unsigned __int64 v5; // x20
__int64 v6; // x21
__int64 **v7; // x0
__int64 *i; // x19
unsigned __int64 v9; // x0
unsigned __int64 v10; // x0
unsigned __int8 v12; // w0
int v13; // w3
__int64 v14; // x0
size_t v15; // x2
unsigned __int8 *v16; // x0
char *v17; // x1
__int64 v18; // x3
int v19; // w4
v4 = sub_24B08(a2);
v5 = a1[1];
if ( v5 )
{
v6 = (v5 - 1) & v4;
if ( ((v5 - 1) & v5) != 0 )
v6 = v4 % v5;
v7 = *(__int64 ***)(*a1 + 8 * v6);
if ( v7 )
{
for ( i = *v7; i; i = (__int64 *)*i )
{
v9 = i[1];
v10 = ((v5 - 1) & v5) != 0 ? v9 % v5 : (v5 - 1) & v9;
if ( v6 != v10 )
break;
v12 = *((_BYTE *)i + 16);
v13 = v12 & 1;
if ( (v12 & 1) != 0 )
v14 = i[3];
else
v14 = v12 >> 1;
v15 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v15 = *(_QWORD *)(a2 + 8);
if ( v15 == v14 )
{
v16 = (unsigned __int8 *)i + 17;
if ( v13 )
v16 = (unsigned __int8 *)i[4];
v17 = (char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v17 = *(char **)(a2 + 16);
if ( !v13 )
{
v18 = 0LL;
while ( v18 != v15 )
{
v19 = v16[v18++];
if ( (unsigned __int8)v17[v18 - 1] != v19 )
goto LABEL_30;
}
return i;
}
if ( !(unsigned int)std::char_traits<char>::compare(v16, v17, v15) )
return i;
}
LABEL_30:
;
}
}
}
return 0LL;
}
//----- (00000000000298FC) ----------------------------------------------------
__int64 *__fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::find<std::string>(
_QWORD *a1,
__int64 a2)
{
unsigned __int64 v4; // x0
unsigned __int64 v5; // x20
__int64 v6; // x21
__int64 **v7; // x0
__int64 *i; // x19
unsigned __int64 v9; // x0
unsigned __int64 v10; // x0
unsigned __int8 v12; // w0
int v13; // w3
__int64 v14; // x0
size_t v15; // x2
unsigned __int8 *v16; // x0
char *v17; // x1
__int64 v18; // x3
int v19; // w4
v4 = sub_24B08(a2);
v5 = a1[1];
if ( v5 )
{
v6 = (v5 - 1) & v4;
if ( ((v5 - 1) & v5) != 0 )
v6 = v4 % v5;
v7 = *(__int64 ***)(*a1 + 8 * v6);
if ( v7 )
{
for ( i = *v7; i; i = (__int64 *)*i )
{
v9 = i[1];
v10 = ((v5 - 1) & v5) != 0 ? v9 % v5 : (v5 - 1) & v9;
if ( v6 != v10 )
break;
v12 = *((_BYTE *)i + 16);
v13 = v12 & 1;
if ( (v12 & 1) != 0 )
v14 = i[3];
else
v14 = v12 >> 1;
v15 = *(_BYTE *)a2 >> 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v15 = *(_QWORD *)(a2 + 8);
if ( v15 == v14 )
{
v16 = (unsigned __int8 *)i + 17;
if ( v13 )
v16 = (unsigned __int8 *)i[4];
v17 = (char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v17 = *(char **)(a2 + 16);
if ( !v13 )
{
v18 = 0LL;
while ( v18 != v15 )
{
v19 = v16[v18++];
if ( (unsigned __int8)v17[v18 - 1] != v19 )
goto LABEL_30;
}
return i;
}
if ( !(unsigned int)std::char_traits<char>::compare(v16, v17, v15) )
return i;
}
LABEL_30:
;
}
}
}
return 0LL;
}
//----- (0000000000029A28) ----------------------------------------------------
__int64 *__fastcall std::unordered_map<std::string,std::string>::at(_QWORD *a1, __int64 a2)
{
__int64 *v2; // x0
std::logic_error *exception; // x19
v2 = std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::find<std::string>(
a1,
a2);
if ( !v2 )
{
exception = (std::logic_error *)__cxa_allocate_exception(0x10uLL);
std::logic_error::logic_error(exception, "unordered_map::at: key not found");
*(_QWORD *)exception = (char *)&`vtable for'std::out_of_range + 16;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (__fastcall *)(void *))&std::out_of_range::~out_of_range);
}
return v2 + 5;
}
//----- (0000000000029AA0) ----------------------------------------------------
void __fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::__rehash(
__int64 a1,
unsigned __int64 a2)
{
__int64 v4; // x1
void *v5; // x0
__int64 v6; // x0
_QWORD *v7; // x27
unsigned __int64 v8; // x28
unsigned __int64 v9; // x22
__int64 v10; // x5
unsigned __int64 v11; // x22
_QWORD *i; // x20
unsigned __int64 v13; // x0
unsigned __int64 v14; // x0
__int64 v15; // x24
__int64 *j; // x25
unsigned __int8 v17; // w0
int v18; // w3
__int64 v19; // x1
unsigned __int8 v20; // w0
int v21; // w6
size_t v22; // x2
unsigned __int8 *v23; // x0
char *v24; // x1
int v25; // w0
__int64 v26; // x23
__int64 v27; // x3
int v28; // w4
__int64 v29; // [xsp+68h] [xbp+68h]
v4 = 0LL;
if ( a2 )
v4 = operator new(8 * a2);
v5 = *(void **)a1;
*(_QWORD *)a1 = v4;
if ( v5 )
operator delete(v5);
*(_QWORD *)(a1 + 8) = a2;
if ( a2 )
{
v6 = 0LL;
do
*(_QWORD *)(*(_QWORD *)a1 + 8 * v6++) = 0LL;
while ( a2 != v6 );
v7 = *(_QWORD **)(a1 + 16);
if ( v7 )
{
v8 = a2 - 1;
v9 = v7[1];
v10 = a2 & (a2 - 1);
if ( v10 )
v11 = v9 % a2;
else
v11 = v8 & v9;
*(_QWORD *)(*(_QWORD *)a1 + 8 * v11) = a1 + 16;
for ( i = (_QWORD *)*v7; i; i = (_QWORD *)*i )
{
v13 = i[1];
if ( v10 )
v14 = v13 % a2;
else
v14 = v8 & v13;
if ( v11 != v14 )
{
v15 = 8 * v14;
if ( *(_QWORD *)(*(_QWORD *)a1 + 8 * v14) )
{
for ( j = i; ; j = (__int64 *)v26 )
{
v26 = *j;
if ( !*j )
break;
v17 = *((_BYTE *)i + 16);
v18 = v17 & 1;
v19 = v17 >> 1;
if ( (v17 & 1) != 0 )
v19 = i[3];
v20 = *(_BYTE *)(v26 + 16);
v21 = v20 & 1;
v22 = v20 >> 1;
if ( (v20 & 1) != 0 )
v22 = *(_QWORD *)(v26 + 24);
if ( v22 != v19 )
break;
v23 = (unsigned __int8 *)i + 17;
if ( v18 )
v23 = (unsigned __int8 *)i[4];
v24 = (char *)(v26 + 17);
if ( v21 )
v24 = *(char **)(v26 + 32);
if ( v18 )
{
v29 = v10;
v25 = std::char_traits<char>::compare(v23, v24, v22);
v10 = v29;
if ( v25 )
break;
}
else
{
v27 = 0LL;
while ( v22 != v27 )
{
v28 = v23[v27++];
if ( (unsigned __int8)v24[v27 - 1] != v28 )
goto LABEL_38;
}
}
}
LABEL_38:
*v7 = v26;
*j = **(_QWORD **)(*(_QWORD *)a1 + v15);
**(_QWORD **)(*(_QWORD *)a1 + v15) = i;
v14 = v11;
i = v7;
}
else
{
*(_QWORD *)(*(_QWORD *)a1 + 8 * v14) = v7;
}
}
v7 = i;
v11 = v14;
}
}
}
}
//----- (0000000000029C70) ----------------------------------------------------
void __fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::rehash(
__int64 a1,
std::__1 *this)
{
std::__1 *prime; // x19
unsigned __int64 v4; // x20
unsigned __int64 v5; // x1
unsigned __int64 v6; // x2
float v7; // s2
unsigned __int64 v8; // x0
prime = (std::__1 *)(&dword_0 + 2);
if ( this != (std::__1 *)((char *)&dword_0 + 1) )
{
prime = this;
if ( (((unsigned __int64)this - 1) & (unsigned __int64)this) != 0 )
prime = (std::__1 *)std::__next_prime(this, (unsigned __int64)this);
}
v4 = *(_QWORD *)(a1 + 8);
v5 = (unsigned __int64)prime;
if ( v4 < (unsigned __int64)prime
|| v4 > (unsigned __int64)prime
&& ((v6 = *(_QWORD *)(a1 + 24), v7 = *(float *)(a1 + 32), v4 > 2) && ((v4 - 1) & v4) == 0
? (v8 = 1LL << (64 - (unsigned __int8)__clz(vcvtps_u32_f32((float)v6 / v7) - 1)))
: (v8 = std::__next_prime((std::__1 *)vcvtps_u32_f32((float)v6 / v7), (unsigned __int64)prime)),
v8 < (unsigned __int64)prime ? (v5 = (unsigned __int64)prime) : (v5 = v8),
v4 > v5) )
{
std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::__rehash(
a1,
v5);
}
}
// 0: using guessed type int dword_0;
//----- (0000000000029D48) ----------------------------------------------------
_QWORD *__fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::__node_insert_unique(
__int64 a1,
_QWORD *a2)
{
__int64 v2; // x20
_QWORD *v4; // x25
unsigned __int64 v6; // x0
unsigned __int64 v7; // x19
_QWORD *v8; // x0
_QWORD *i; // x23
unsigned __int64 v10; // x0
unsigned __int64 v11; // x0
float v12; // s2
float v13; // s0
bool v14; // w1
std::__1 *v15; // x1
unsigned __int64 v16; // x0
unsigned __int64 v17; // x0
__int64 v18; // x20
_QWORD *v19; // x0
unsigned __int64 v20; // x1
unsigned __int64 v21; // x1
unsigned __int8 v22; // w0
int v23; // w3
__int64 v24; // x0
size_t v25; // x2
unsigned __int8 *v26; // x0
char *v27; // x1
__int64 v28; // x3
int v29; // w4
v4 = a2 + 2;
v6 = sub_24B08((__int64)(a2 + 2));
a2[1] = v6;
v7 = *(_QWORD *)(a1 + 8);
if ( v7 )
{
v2 = (v7 - 1) & v6;
if ( ((v7 - 1) & v7) != 0 )
v2 = v6 % v7;
v8 = *(_QWORD **)(*(_QWORD *)a1 + 8 * v2);
if ( v8 )
{
for ( i = (_QWORD *)*v8; i; i = (_QWORD *)*i )
{
v10 = i[1];
v11 = ((v7 - 1) & v7) != 0 ? v10 % v7 : v10 & (v7 - 1);
if ( v11 != v2 )
break;
v22 = *((_BYTE *)i + 16);
v23 = v22 & 1;
if ( (v22 & 1) != 0 )
v24 = i[3];
else
v24 = v22 >> 1;
v25 = *(_BYTE *)v4 >> 1;
if ( (*(_BYTE *)v4 & 1) != 0 )
v25 = v4[1];
if ( v25 == v24 )
{
v26 = (unsigned __int8 *)i + 17;
if ( v23 )
v26 = (unsigned __int8 *)i[4];
v27 = (char *)a2 + 17;
if ( (*(_BYTE *)v4 & 1) != 0 )
v27 = (char *)v4[2];
if ( !v23 )
{
v28 = 0LL;
while ( v25 != v28 )
{
v29 = v26[v28++];
if ( (unsigned __int8)v27[v28 - 1] != v29 )
goto LABEL_43;
}
return i;
}
if ( !(unsigned int)std::char_traits<char>::compare(v26, v27, v25) )
return i;
}
LABEL_43:
;
}
}
}
v12 = *(float *)(a1 + 32);
v13 = (float)(unsigned __int64)(*(_QWORD *)(a1 + 24) + 1LL);
if ( v13 > (float)((float)v7 * v12) )
{
if ( v7 > 2 )
{
v14 = ((v7 - 1) & v7) == 0;
goto LABEL_14;
}
LABEL_13:
v14 = 0;
LABEL_14:
v15 = (std::__1 *)(!v14 + 2 * v7);
v16 = vcvtps_u32_f32(v13 / v12);
if ( (unsigned __int64)v15 < v16 )
v15 = (std::__1 *)v16;
std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::rehash(
a1,
v15);
v7 = *(_QWORD *)(a1 + 8);
v17 = a2[1];
if ( ((v7 - 1) & v7) != 0 )
v2 = v17 % v7;
else
v2 = v17 & (v7 - 1);
goto LABEL_19;
}
if ( !v7 )
goto LABEL_13;
LABEL_19:
v18 = 8 * v2;
v19 = *(_QWORD **)(*(_QWORD *)a1 + v18);
if ( v19 )
{
*a2 = *v19;
*v19 = a2;
}
else
{
*a2 = *(_QWORD *)(a1 + 16);
*(_QWORD *)(a1 + 16) = a2;
*(_QWORD *)(*(_QWORD *)a1 + v18) = a1 + 16;
if ( *a2 )
{
v20 = *(_QWORD *)(*a2 + 8LL);
if ( (v7 & (v7 - 1)) != 0 )
v21 = v20 % v7;
else
v21 = v20 & (v7 - 1);
*(_QWORD *)(*(_QWORD *)a1 + 8 * v21) = a2;
}
}
i = a2;
++*(_QWORD *)(a1 + 24);
return i;
}
// 29E3C: variable 'v2' is possibly undefined
//----- (0000000000029F8C) ----------------------------------------------------
_QWORD *__fastcall std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::__insert_unique<std::pair<std::string const,int> const&>(
__int64 a1,
__int64 a2)
{
_QWORD *v4; // x0
__int64 v5; // x20
_QWORD *v6; // x19
unsigned __int64 v7; // x0
_QWORD *inserted; // x22
char v9; // w1
v4 = (_QWORD *)operator new(0x30uLL);
v5 = (__int64)(v4 + 2);
v6 = v4;
std::string::basic_string(v4 + 2, a2);
*(_DWORD *)(v5 + 24) = *(_DWORD *)(a2 + 24);
v7 = sub_24B08(v5);
*v6 = 0LL;
v6[1] = v7;
inserted = std::__hash_table<std::__hash_value_type<std::string,int>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,int>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,int>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,int>>>::__node_insert_unique(
a1,
v6);
if ( !v9 && v6 )
{
std::string::~string(v5);
operator delete(v6);
}
return inserted;
}
// 29FEC: variable 'v9' is possibly undefined
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
//----- (000000000002A054) ----------------------------------------------------
void __fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::__rehash(
__int64 a1,
unsigned __int64 a2)
{
__int64 v4; // x1
void *v5; // x0
__int64 v6; // x0
_QWORD *v7; // x27
unsigned __int64 v8; // x28
unsigned __int64 v9; // x22
__int64 v10; // x5
unsigned __int64 v11; // x22
_QWORD *i; // x20
unsigned __int64 v13; // x0
unsigned __int64 v14; // x0
__int64 v15; // x24
__int64 *j; // x25
unsigned __int8 v17; // w0
int v18; // w3
__int64 v19; // x1
unsigned __int8 v20; // w0
int v21; // w6
size_t v22; // x2
unsigned __int8 *v23; // x0
char *v24; // x1
int v25; // w0
__int64 v26; // x23
__int64 v27; // x3
int v28; // w4
__int64 v29; // [xsp+68h] [xbp+68h]
v4 = 0LL;
if ( a2 )
v4 = operator new(8 * a2);
v5 = *(void **)a1;
*(_QWORD *)a1 = v4;
if ( v5 )
operator delete(v5);
*(_QWORD *)(a1 + 8) = a2;
if ( a2 )
{
v6 = 0LL;
do
*(_QWORD *)(*(_QWORD *)a1 + 8 * v6++) = 0LL;
while ( a2 != v6 );
v7 = *(_QWORD **)(a1 + 16);
if ( v7 )
{
v8 = a2 - 1;
v9 = v7[1];
v10 = a2 & (a2 - 1);
if ( v10 )
v11 = v9 % a2;
else
v11 = v8 & v9;
*(_QWORD *)(*(_QWORD *)a1 + 8 * v11) = a1 + 16;
for ( i = (_QWORD *)*v7; i; i = (_QWORD *)*i )
{
v13 = i[1];
if ( v10 )
v14 = v13 % a2;
else
v14 = v8 & v13;
if ( v11 != v14 )
{
v15 = 8 * v14;
if ( *(_QWORD *)(*(_QWORD *)a1 + 8 * v14) )
{
for ( j = i; ; j = (__int64 *)v26 )
{
v26 = *j;
if ( !*j )
break;
v17 = *((_BYTE *)i + 16);
v18 = v17 & 1;
v19 = v17 >> 1;
if ( (v17 & 1) != 0 )
v19 = i[3];
v20 = *(_BYTE *)(v26 + 16);
v21 = v20 & 1;
v22 = v20 >> 1;
if ( (v20 & 1) != 0 )
v22 = *(_QWORD *)(v26 + 24);
if ( v22 != v19 )
break;
v23 = (unsigned __int8 *)i + 17;
if ( v18 )
v23 = (unsigned __int8 *)i[4];
v24 = (char *)(v26 + 17);
if ( v21 )
v24 = *(char **)(v26 + 32);
if ( v18 )
{
v29 = v10;
v25 = std::char_traits<char>::compare(v23, v24, v22);
v10 = v29;
if ( v25 )
break;
}
else
{
v27 = 0LL;
while ( v22 != v27 )
{
v28 = v23[v27++];
if ( (unsigned __int8)v24[v27 - 1] != v28 )
goto LABEL_38;
}
}
}
LABEL_38:
*v7 = v26;
*j = **(_QWORD **)(*(_QWORD *)a1 + v15);
**(_QWORD **)(*(_QWORD *)a1 + v15) = i;
v14 = v11;
i = v7;
}
else
{
*(_QWORD *)(*(_QWORD *)a1 + 8 * v14) = v7;
}
}
v7 = i;
v11 = v14;
}
}
}
}
//----- (000000000002A224) ----------------------------------------------------
void __fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::rehash(
__int64 a1,
std::__1 *this)
{
std::__1 *prime; // x19
unsigned __int64 v4; // x20
unsigned __int64 v5; // x1
unsigned __int64 v6; // x2
float v7; // s2
unsigned __int64 v8; // x0
prime = (std::__1 *)(&dword_0 + 2);
if ( this != (std::__1 *)((char *)&dword_0 + 1) )
{
prime = this;
if ( (((unsigned __int64)this - 1) & (unsigned __int64)this) != 0 )
prime = (std::__1 *)std::__next_prime(this, (unsigned __int64)this);
}
v4 = *(_QWORD *)(a1 + 8);
v5 = (unsigned __int64)prime;
if ( v4 < (unsigned __int64)prime
|| v4 > (unsigned __int64)prime
&& ((v6 = *(_QWORD *)(a1 + 24), v7 = *(float *)(a1 + 32), v4 > 2) && ((v4 - 1) & v4) == 0
? (v8 = 1LL << (64 - (unsigned __int8)__clz(vcvtps_u32_f32((float)v6 / v7) - 1)))
: (v8 = std::__next_prime((std::__1 *)vcvtps_u32_f32((float)v6 / v7), (unsigned __int64)prime)),
v8 < (unsigned __int64)prime ? (v5 = (unsigned __int64)prime) : (v5 = v8),
v4 > v5) )
{
std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::__rehash(
a1,
v5);
}
}
// 0: using guessed type int dword_0;
//----- (000000000002A2FC) ----------------------------------------------------
_QWORD *__fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::__node_insert_unique(
__int64 a1,
_QWORD *a2)
{
__int64 v2; // x20
_QWORD *v4; // x25
unsigned __int64 v6; // x0
unsigned __int64 v7; // x19
_QWORD *v8; // x0
_QWORD *i; // x23
unsigned __int64 v10; // x0
unsigned __int64 v11; // x0
float v12; // s2
float v13; // s0
bool v14; // w1
std::__1 *v15; // x1
unsigned __int64 v16; // x0
unsigned __int64 v17; // x0
__int64 v18; // x20
_QWORD *v19; // x0
unsigned __int64 v20; // x1
unsigned __int64 v21; // x1
unsigned __int8 v22; // w0
int v23; // w3
__int64 v24; // x0
size_t v25; // x2
unsigned __int8 *v26; // x0
char *v27; // x1
__int64 v28; // x3
int v29; // w4
v4 = a2 + 2;
v6 = sub_24B08((__int64)(a2 + 2));
a2[1] = v6;
v7 = *(_QWORD *)(a1 + 8);
if ( v7 )
{
v2 = (v7 - 1) & v6;
if ( ((v7 - 1) & v7) != 0 )
v2 = v6 % v7;
v8 = *(_QWORD **)(*(_QWORD *)a1 + 8 * v2);
if ( v8 )
{
for ( i = (_QWORD *)*v8; i; i = (_QWORD *)*i )
{
v10 = i[1];
v11 = ((v7 - 1) & v7) != 0 ? v10 % v7 : v10 & (v7 - 1);
if ( v11 != v2 )
break;
v22 = *((_BYTE *)i + 16);
v23 = v22 & 1;
if ( (v22 & 1) != 0 )
v24 = i[3];
else
v24 = v22 >> 1;
v25 = *(_BYTE *)v4 >> 1;
if ( (*(_BYTE *)v4 & 1) != 0 )
v25 = v4[1];
if ( v25 == v24 )
{
v26 = (unsigned __int8 *)i + 17;
if ( v23 )
v26 = (unsigned __int8 *)i[4];
v27 = (char *)a2 + 17;
if ( (*(_BYTE *)v4 & 1) != 0 )
v27 = (char *)v4[2];
if ( !v23 )
{
v28 = 0LL;
while ( v25 != v28 )
{
v29 = v26[v28++];
if ( (unsigned __int8)v27[v28 - 1] != v29 )
goto LABEL_43;
}
return i;
}
if ( !(unsigned int)std::char_traits<char>::compare(v26, v27, v25) )
return i;
}
LABEL_43:
;
}
}
}
v12 = *(float *)(a1 + 32);
v13 = (float)(unsigned __int64)(*(_QWORD *)(a1 + 24) + 1LL);
if ( v13 > (float)((float)v7 * v12) )
{
if ( v7 > 2 )
{
v14 = ((v7 - 1) & v7) == 0;
goto LABEL_14;
}
LABEL_13:
v14 = 0;
LABEL_14:
v15 = (std::__1 *)(!v14 + 2 * v7);
v16 = vcvtps_u32_f32(v13 / v12);
if ( (unsigned __int64)v15 < v16 )
v15 = (std::__1 *)v16;
std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::rehash(
a1,
v15);
v7 = *(_QWORD *)(a1 + 8);
v17 = a2[1];
if ( ((v7 - 1) & v7) != 0 )
v2 = v17 % v7;
else
v2 = v17 & (v7 - 1);
goto LABEL_19;
}
if ( !v7 )
goto LABEL_13;
LABEL_19:
v18 = 8 * v2;
v19 = *(_QWORD **)(*(_QWORD *)a1 + v18);
if ( v19 )
{
*a2 = *v19;
*v19 = a2;
}
else
{
*a2 = *(_QWORD *)(a1 + 16);
*(_QWORD *)(a1 + 16) = a2;
*(_QWORD *)(*(_QWORD *)a1 + v18) = a1 + 16;
if ( *a2 )
{
v20 = *(_QWORD *)(*a2 + 8LL);
if ( (v7 & (v7 - 1)) != 0 )
v21 = v20 % v7;
else
v21 = v20 & (v7 - 1);
*(_QWORD *)(*(_QWORD *)a1 + 8 * v21) = a2;
}
}
i = a2;
++*(_QWORD *)(a1 + 24);
return i;
}
// 2A3F0: variable 'v2' is possibly undefined
//----- (000000000002A540) ----------------------------------------------------
_QWORD *__fastcall std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::__insert_unique<std::pair<std::string const,std::string> const&>(
__int64 a1,
__int64 a2)
{
_QWORD *v4; // x0
__int64 v5; // x20
_QWORD *v6; // x19
unsigned __int64 v7; // x0
_QWORD *inserted; // x22
char v9; // w1
v4 = (_QWORD *)operator new(0x40uLL);
v5 = (__int64)(v4 + 2);
v6 = v4;
std::string::basic_string(v4 + 2, a2);
std::string::basic_string(v6 + 5, a2 + 24);
v7 = sub_24B08(v5);
*v6 = 0LL;
v6[1] = v7;
inserted = std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::__node_insert_unique(
a1,
v6);
if ( !v9 && v6 )
{
std::pair<std::string const,std::string>::~pair(v5);
operator delete(v6);
}
return inserted;
}
// 2A5BC: variable 'v9' is possibly undefined
// 13340: using guessed type __int64 __fastcall std::string::basic_string(_QWORD, _QWORD);
//----- (000000000002A624) ----------------------------------------------------
float *__fastcall std::unordered_map<std::string,std::string>::unordered_map(float *result, __int64 a2, __int64 a3)
{
__int64 v3; // x19
__int64 v4; // x20
__int64 v5; // x21
*(_QWORD *)result = 0LL;
*((_QWORD *)result + 1) = 0LL;
*((_QWORD *)result + 2) = 0LL;
*((_QWORD *)result + 3) = 0LL;
result[8] = 1.0;
v3 = (__int64)result;
v4 = a2;
v5 = a2 + 48 * a3;
while ( v4 != v5 )
{
result = (float *)std::__hash_table<std::__hash_value_type<std::string,std::string>,std::__unordered_map_hasher<std::string,std::__hash_value_type<std::string,std::string>,std::hash<std::string>,true>,std::__unordered_map_equal<std::string,std::__hash_value_type<std::string,std::string>,std::equal_to<std::string>,true>,std::allocator<std::__hash_value_type<std::string,std::string>>>::__insert_unique<std::pair<std::string const,std::string> const&>(
v3,
v4);
v4 += 48LL;
}
return result;
}
//----- (000000000002A694) ----------------------------------------------------
_DWORD *__fastcall sub_2A694(_DWORD *result)
{
if ( result )
{
if ( *result == 1431655765 )
return result;
Logger::e((Logger *)qword_4D488, "PF context: invalid.");
}
else
{
Logger::e((Logger *)qword_4D488, "PF context: invalid pointer");
}
return 0LL;
}
// 4D488: using guessed type __int64 qword_4D488;
//----- (000000000002A6DC) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfClose(fnv::vnm *this, void *a2)
{
int *v2; // x22
__int64 result; // x0
__int64 v4; // x0
unsigned int v5; // w19
_BYTE v6[2192]; // [xsp+48h] [xbp+48h] BYREF
v2 = sub_2A694(this);
result = 22LL;
if ( v2 )
{
v4 = close(v2[1]);
if ( (_DWORD)v4 && (v5 = *(_DWORD *)__get_errno_ptr(v4)) != 0 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: closing device, errno=%d", "PfClose", v5);
}
else
{
v5 = 0;
Logger::d((Logger *)qword_4D488, "%s: closed device.", "PfClose");
}
memset(v6, 0, sizeof(v6));
fnv::vnm::PfContext::PfContext((fnv::vnm::PfContext *)v6);
memcpy(v2, v6, 0x890uLL);
operator delete(v2);
return v5;
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
//----- (000000000002A7D8) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAbortAnchor(fnv::vnm *this, void *a2)
{
_DWORD *v3; // x0
void *v4; // x1
Logger *v5; // x20
unsigned int *errno_ptr; // x0
v3 = sub_2A694(this);
if ( !v3 )
return 22LL;
if ( ioctl(v3[1], 0xC0104453uLL, v3 + 286) == -1 )
{
v5 = (Logger *)qword_4D488;
errno_ptr = (unsigned int *)__get_errno_ptr(&off_4D000);
Logger::e(v5, "ERROR DIOCXABORT rc=%d", *errno_ptr);
}
fnv::vnm::PfClose(this, v4);
return 0LL;
}
// 2A830: variable 'v4' is possibly undefined
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D000: using guessed type void *off_4D000;
// 4D488: using guessed type __int64 qword_4D488;
//----- (000000000002A84C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfCommitAnchor(fnv::vnm *this, void *a2)
{
_DWORD *v3; // x0
void *v4; // x1
Logger *v5; // x20
unsigned int *errno_ptr; // x0
v3 = sub_2A694(this);
if ( !v3 )
return 22LL;
if ( ioctl(v3[1], 0xC0104452uLL, v3 + 286) == -1 )
{
v5 = (Logger *)qword_4D488;
errno_ptr = (unsigned int *)__get_errno_ptr(&off_4D000);
Logger::e(v5, "ERROR DIOCXCOMMIT rc=%d", *errno_ptr);
}
fnv::vnm::PfClose(this, v4);
return 0LL;
}
// 2A8A4: variable 'v4' is possibly undefined
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D000: using guessed type void *off_4D000;
// 4D488: using guessed type __int64 qword_4D488;
//----- (000000000002A8C0) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAddPoolAddr(_DWORD *a1, __int64 a2, unsigned __int8 *a3)
{
_DWORD *v5; // x19
__int64 result; // x0
int v7; // w0
const char *v8; // x1
const char *v9; // x1
__int64 v10; // x0
unsigned int v11; // w19
int v12; // [xsp+30h] [xbp+30h] BYREF
v5 = sub_2A694(a1);
result = 22LL;
if ( !v5 )
return result;
v7 = *a3;
if ( (v7 & 1) != 0 )
{
if ( *((_QWORD *)a3 + 1) )
{
v8 = (const char *)*((_QWORD *)a3 + 2);
LABEL_7:
if ( inet_pton(2, v8, &v12) != 1 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: invalid IP address", "PfAddPoolAddr");
return 22LL;
}
*((_BYTE *)v5 + 26) = 2;
v5[264] = v12;
v5[268] = -1;
}
}
else if ( v7 >> 1 )
{
v8 = (const char *)(a3 + 1);
goto LABEL_7;
}
v9 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v9 = *(const char **)(a2 + 16);
strncpy((char *)v5 + 1120, v9, 0xFuLL);
v10 = ioctl(v5[1], 0xC4704434uLL, v5 + 2);
v11 = v10;
if ( (_DWORD)v10 == -1 )
v11 = *(_DWORD *)__get_errno_ptr(v10);
result = 0LL;
if ( v11 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCADDADDR errno=%d", "PfAddPoolAddr", v11);
return v11;
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
//----- (000000000002AA10) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAddNatPoolAddr(_DWORD *a1, __int64 a2)
{
char *v3; // x0
char *v4; // x19
char *v5; // x0
const char *v6; // x1
const char *v7; // x1
__int64 v8; // x0
unsigned int v9; // w19
__int64 result; // x0
v3 = (char *)sub_2A694(a1);
if ( !v3 )
return 22LL;
v4 = v3;
v3[26] = 2;
v3[1096] = 2;
*((_DWORD *)v3 + 268) = -1;
v5 = v3 + 1120;
v6 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v6 = *(const char **)(a2 + 16);
strncpy(v5, v6, 0xFuLL);
v7 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v7 = *(const char **)(a2 + 16);
strncpy(v4 + 1056, v7, 0xFuLL);
v8 = ioctl(*((_DWORD *)v4 + 1), 0xC4704434uLL, v4 + 8);
v9 = v8;
if ( (_DWORD)v8 == -1 )
v9 = *(_DWORD *)__get_errno_ptr(v8);
result = 0LL;
if ( v9 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCADDADDR errno=%d", "PfAddNatPoolAddr", v9);
return v9;
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
//----- (000000000002AAE4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAddEgressAnchorRule(_DWORD *a1, __int64 a2)
{
const char *v3; // x20
__int64 result; // x0
const char *v5; // x0
__int64 v6; // x0
unsigned int v7; // w20
int v8; // [xsp+38h] [xbp+38h] BYREF
_DWORD v9[4]; // [xsp+40h] [xbp+40h] BYREF
char v10[2048]; // [xsp+50h] [xbp+50h] BYREF
int v11; // [xsp+850h] [xbp+850h]
int v12; // [xsp+860h] [xbp+860h]
char v13; // [xsp+AF9h] [xbp+AF9h]
char v14; // [xsp+B00h] [xbp+B00h]
char v15; // [xsp+B08h] [xbp+B08h]
v3 = (const char *)sub_2A694(a1);
result = 22LL;
if ( v3 )
{
v5 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v5 = *(const char **)(a2 + 16);
if ( inet_pton(2, v5, &v8) == 1 )
{
memset(v9, 0, 0xAD8uLL);
v9[1] = *((_DWORD *)v3 + 547);
v9[2] = *((_DWORD *)v3 + 3);
strncpy(v10, v3 + 1164, 0x3FFuLL);
v13 = 2;
v15 = 2;
v14 = 2;
v11 = v8;
v12 = -1;
v6 = ioctl(*((_DWORD *)v3 + 1), 0xCAD84404uLL, v9);
v7 = v6;
if ( (_DWORD)v6 == -1 )
v7 = *(_DWORD *)__get_errno_ptr(v6);
result = 0LL;
if ( v7 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCADDRULE errno=%d", "PfAddEgressAnchorRule", v7);
return v7;
}
}
else
{
Logger::e((Logger *)qword_4D488, "ERROR %s: invalid IP address", "PfAddEgressAnchorRule");
return 22LL;
}
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
// 2AAE4: using guessed type char anonymous_0[2048];
//----- (000000000002AC48) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAddEgressAnchorRuleIfname(_DWORD *a1, __int64 a2)
{
const char *v3; // x19
__int64 result; // x0
const char *v5; // x1
__int64 v6; // x0
unsigned int v7; // w19
_DWORD v8[4]; // [xsp+30h] [xbp+30h] BYREF
char v9[2048]; // [xsp+40h] [xbp+40h] BYREF
char v10[16]; // [xsp+840h] [xbp+840h] BYREF
int v11; // [xsp+850h] [xbp+850h]
char v12; // [xsp+868h] [xbp+868h]
char v13; // [xsp+869h] [xbp+869h]
char v14; // [xsp+AE9h] [xbp+AE9h]
char v15; // [xsp+AF0h] [xbp+AF0h]
char v16; // [xsp+AF8h] [xbp+AF8h]
v3 = (const char *)sub_2A694(a1);
result = 22LL;
if ( v3 )
{
memset(v8, 0, 0xAD8uLL);
v8[1] = *((_DWORD *)v3 + 547);
v8[2] = *((_DWORD *)v3 + 3);
strncpy(v9, v3 + 1164, 0x3FFuLL);
v14 = 2;
v16 = 2;
v15 = 2;
v12 = 2;
v13 = 1;
v11 = -1;
v5 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v5 = *(const char **)(a2 + 16);
strncpy(v10, v5, 0xFuLL);
v6 = ioctl(*((_DWORD *)v3 + 1), 0xCAD84404uLL, v8);
v7 = v6;
if ( (_DWORD)v6 == -1 )
v7 = *(_DWORD *)__get_errno_ptr(v6);
result = 0LL;
if ( v7 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCADDRULE errno=%d", "PfAddEgressAnchorRuleIfname", v7);
return v7;
}
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
// 2AC48: using guessed type char anonymous_0[2048];
// 2AC48: using guessed type char anonymous_1[16];
//----- (000000000002AD80) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAddPeer2PeerPortsAnchorRule(
_DWORD *a1,
int *a2,
int *a3,
int *a4,
int *a5,
unsigned __int8 *a6,
unsigned __int16 *a7,
unsigned __int16 *a8,
char a9,
char a10)
{
const char *v17; // x23
__int64 result; // x0
int v19; // w0
int v20; // w0
int v21; // w1
char v22; // w0
int v23; // w0
int v24; // w1
char v25; // w0
__int64 v26; // x0
unsigned int *errno_ptr; // x0
__int64 v28; // x0
unsigned int v29; // w20
int v30[4]; // [xsp+70h] [xbp+70h] BYREF
char v31[2048]; // [xsp+80h] [xbp+80h] BYREF
int v32; // [xsp+880h] [xbp+880h]
int v33; // [xsp+890h] [xbp+890h]
__int16 v34; // [xsp+8B0h] [xbp+8B0h]
__int16 v35; // [xsp+8B2h] [xbp+8B2h]
char v36; // [xsp+8B5h] [xbp+8B5h]
int v37; // [xsp+8B8h] [xbp+8B8h]
int v38; // [xsp+8C8h] [xbp+8C8h]
__int16 v39; // [xsp+8E8h] [xbp+8E8h]
__int16 v40; // [xsp+8EAh] [xbp+8EAh]
char v41; // [xsp+8EDh] [xbp+8EDh]
char v42; // [xsp+B2Fh] [xbp+B2Fh]
char v43; // [xsp+B30h] [xbp+B30h]
char v44; // [xsp+B31h] [xbp+B31h]
char v45; // [xsp+B34h] [xbp+B34h]
char v46; // [xsp+B35h] [xbp+B35h]
v17 = (const char *)sub_2A694(a1);
result = 22LL;
if ( !v17 )
return result;
memset(v30, 0, 0xAD8uLL);
strncpy(v31, v17 + 1164, 0x3FFuLL);
v30[1] = *((_DWORD *)v17 + 547);
v30[2] = *((_DWORD *)v17 + 3);
v32 = *a2;
v33 = *a3;
v37 = *a4;
v38 = *a5;
v19 = *a6;
v43 = 2;
v42 = a9;
v44 = v19;
if ( v19 == 6 )
{
if ( a10 )
{
v45 = 2;
v46 = 18;
}
goto LABEL_7;
}
if ( v19 == 17 )
{
LABEL_7:
v20 = *a7;
if ( *a7 )
{
v34 = (*a7 << 8) | HIBYTE(*a7);
v21 = a7[1];
v35 = (a7[1] << 8) | HIBYTE(a7[1]);
if ( v20 == v21 )
v22 = 2;
else
v22 = 9;
v36 = v22;
}
v23 = *a8;
if ( *a8 )
{
v39 = (*a8 << 8) | HIBYTE(*a8);
v24 = a8[1];
v40 = (a8[1] << 8) | HIBYTE(a8[1]);
if ( v23 == v24 )
v25 = 2;
else
v25 = 9;
v41 = v25;
}
}
v30[0] = 6;
v26 = ioctl(*((_DWORD *)v17 + 1), 0xCAD8441AuLL, v30);
if ( (_DWORD)v26 == -1 )
{
errno_ptr = (unsigned int *)__get_errno_ptr(v26);
Logger::e((Logger *)qword_4D488, "DIOCCHANGERULE rc = %d", *errno_ptr);
}
v30[0] = 2;
v28 = ioctl(*((_DWORD *)v17 + 1), 0xCAD8441AuLL, v30);
v29 = v28;
if ( (_DWORD)v28 == -1 )
v29 = *(_DWORD *)__get_errno_ptr(v28);
result = 0LL;
if ( v29 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCCHANGERULE errno=%d", "PfAddPeer2PeerPortsAnchorRule", v29);
return v29;
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
// 2AD80: using guessed type char anonymous_0[2048];
//----- (000000000002AFC4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfRemovePeer2PeerPortsAnchorRule(
_DWORD *a1,
int *a2,
int *a3,
int *a4,
int *a5,
char *a6,
_WORD *a7,
_WORD *a8)
{
unsigned int v8; // w19
const char *v15; // x0
const char *v16; // x21
__int64 v17; // x0
int v18; // w26
int i; // w24
int v20; // w0
__int64 v21; // x0
__int64 v22; // x0
unsigned int v23; // w23
__int64 v24; // x3
const char *v25; // x1
int v26; // w0
__int64 v27; // x0
__int64 v28; // x0
unsigned int v29; // w20
char v32[4]; // [xsp+70h] [xbp+70h] BYREF
int v33; // [xsp+74h] [xbp+74h]
_BYTE v34[56]; // [xsp+78h] [xbp+78h] BYREF
_BYTE v35[72]; // [xsp+B0h] [xbp+B0h] BYREF
int v36[3]; // [xsp+F8h] [xbp+F8h] BYREF
int v37; // [xsp+104h] [xbp+104h]
char v38[2048]; // [xsp+108h] [xbp+108h] BYREF
_BYTE v39[48]; // [xsp+908h] [xbp+908h] BYREF
__int64 v40; // [xsp+938h] [xbp+938h] BYREF
_BYTE v41[48]; // [xsp+940h] [xbp+940h] BYREF
_BYTE v42[585]; // [xsp+970h] [xbp+970h] BYREF
unsigned __int8 v43; // [xsp+BB9h] [xbp+BB9h]
__int64 v44; // [xsp+BD0h] [xbp+BD0h] BYREF
int v45[12]; // [xsp+13E0h] [xbp+13E0h] BYREF
__int16 v46[4]; // [xsp+1410h] [xbp+1410h] BYREF
int v47[12]; // [xsp+1418h] [xbp+1418h] BYREF
__int16 v48[292]; // [xsp+1448h] [xbp+1448h] BYREF
char v49; // [xsp+1691h] [xbp+1691h]
v8 = 22;
v15 = (const char *)sub_2A694(a1);
if ( v15 )
{
v16 = v15;
memset(v36, 0, 0xAD8uLL);
memset(&v44, 0, 0xAD8uLL);
memset(v32, 0, 0x88uLL);
v45[0] = *a2;
v45[4] = *a3;
v47[0] = *a4;
v47[4] = *a5;
v49 = *a6;
v46[0] = (*a7 << 8) | HIBYTE(*a7);
v46[1] = (a7[1] << 8) | HIBYTE(a7[1]);
v48[0] = (*a8 << 8) | HIBYTE(*a8);
v48[1] = (a8[1] << 8) | HIBYTE(a8[1]);
strncpy(v38, v16 + 1164, 0x3FFuLL);
v17 = ioctl(*((_DWORD *)v16 + 1), 0xCAD84406uLL, v36);
v8 = v17;
if ( (_DWORD)v17 == -1 )
v8 = *(_DWORD *)__get_errno_ptr(v17);
if ( v8 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCGETRULES errno=%d", "PfRemovePeer2PeerPortsAnchorRule", v8);
}
else
{
v18 = v37;
for ( i = 0; ; ++i )
{
if ( i >= v18 )
return 0;
v20 = *((_DWORD *)v16 + 1);
v36[0] = 0;
v37 = i;
v21 = ioctl(v20, 0xCAD84407uLL, v36);
v8 = v21;
if ( (_DWORD)v21 == -1 )
v8 = *(_DWORD *)__get_errno_ptr(v21);
if ( v8 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCGETRULE errno=%d", "PfRemovePeer2PeerPortsAnchorRule", v8);
return v8;
}
if ( v43 == (unsigned __int8)*a6
&& !memcmp(v39, v45, 0x20uLL)
&& !memcmp(v41, v47, 0x20uLL)
&& !memcmp(&v40, v46, 4uLL) )
{
v8 = memcmp(v42, v48, 4uLL);
if ( !v8 )
break;
}
}
v36[0] = 6;
v22 = ioctl(*((_DWORD *)v16 + 1), 0xCAD8441AuLL, v36);
v23 = v22;
if ( (_DWORD)v22 == -1 )
v23 = *(_DWORD *)__get_errno_ptr(v22);
if ( v23 )
{
v24 = v23;
v25 = "ERROR %s: get ticket DIOCCHANGERULE errno=%d";
LABEL_26:
v8 = v23;
Logger::e((Logger *)qword_4D488, v25, "PfRemovePeer2PeerPortsAnchorRule", v24);
return v8;
}
v36[0] = 5;
v26 = *((_DWORD *)v16 + 1);
v37 = i;
v27 = ioctl(v26, 0xCAD8441AuLL, v36);
v23 = v27;
if ( (_DWORD)v27 == -1 )
v23 = *(_DWORD *)__get_errno_ptr(v27);
if ( v23 )
{
v24 = v23;
v25 = "ERROR %s: remove rule DIOCCHANGERULE errno=%d";
goto LABEL_26;
}
Logger::i((Logger *)qword_4D488, "DIOCCHANGERULE success.");
v33 = v43;
v32[0] = v42[584];
memcpy(v34, v39, sizeof(v34));
memcpy(v35, v41, 0x38uLL);
ioctl(*((_DWORD *)v16 + 1), 0xC0884429uLL, v32);
memcpy(v34, v41, sizeof(v34));
memcpy(v35, v39, 0x38uLL);
v28 = ioctl(*((_DWORD *)v16 + 1), 0xC0884429uLL, v32);
v29 = v28;
if ( (_DWORD)v28 == -1 )
v29 = *(_DWORD *)__get_errno_ptr(v28);
if ( v29 )
{
v8 = v29;
Logger::e(
(Logger *)qword_4D488,
"ERROR %s: remove cache entry DIOCKILLSTATES errno=%d",
"PfRemovePeer2PeerPortsAnchorRule",
v29);
}
else
{
Logger::i((Logger *)qword_4D488, "DIOCKILLSTATES success.");
}
}
}
return v8;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
// 2AFC4: using guessed type char anonymous_0[2048];
//----- (000000000002B40C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAddIngressAnchorRule(_DWORD *a1, __int64 a2)
{
const char *v3; // x19
__int64 result; // x0
const char *v5; // x1
__int64 v6; // x0
unsigned int v7; // w19
_DWORD v8[4]; // [xsp+30h] [xbp+30h] BYREF
char v9[2304]; // [xsp+40h] [xbp+40h] BYREF
char v10[456]; // [xsp+940h] [xbp+940h] BYREF
v3 = (const char *)sub_2A694(a1);
result = 22LL;
if ( v3 )
{
memset(v8, 0, 0xAD8uLL);
v8[1] = *((_DWORD *)v3 + 547);
v8[2] = *((_DWORD *)v3 + 3);
strncpy(v9, v3 + 1164, 0x3FFuLL);
v10[425] = 1;
v10[440] = 2;
v10[432] = v3[26];
v5 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v5 = *(const char **)(a2 + 16);
strncpy(v10, v5, 0xFuLL);
v6 = ioctl(*((_DWORD *)v3 + 1), 0xCAD84404uLL, v8);
v7 = v6;
if ( (_DWORD)v6 == -1 )
v7 = *(_DWORD *)__get_errno_ptr(v6);
result = 0LL;
if ( v7 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCADDRULE errno=%d", "PfAddIngressAnchorRule", v7);
return v7;
}
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
// 2B40C: using guessed type char anonymous_0[2304];
//----- (000000000002B538) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfAddNatAnchorRule(_DWORD *a1, __int64 a2)
{
const char *v3; // x20
__int64 result; // x0
const char *v5; // x1
int v6; // w23
const char *v7; // x1
__int64 v8; // x0
unsigned int v9; // w20
_DWORD v10[4]; // [xsp+40h] [xbp+40h] BYREF
char v11[2048]; // [xsp+50h] [xbp+50h] BYREF
char v12[16]; // [xsp+850h] [xbp+850h] BYREF
int v13; // [xsp+860h] [xbp+860h]
char v14; // [xsp+878h] [xbp+878h]
char v15; // [xsp+884h] [xbp+884h]
char v16[188]; // [xsp+950h] [xbp+950h] BYREF
__int16 v17; // [xsp+A0Ch] [xbp+A0Ch]
__int16 v18; // [xsp+A0Eh] [xbp+A0Eh]
char v19; // [xsp+AF8h] [xbp+AF8h]
char v20; // [xsp+B00h] [xbp+B00h]
v3 = (const char *)sub_2A694(a1);
result = 22LL;
if ( v3 )
{
memset(v10, 0, 0xAD8uLL);
v10[1] = *((_DWORD *)v3 + 547);
v10[2] = *((_DWORD *)v3 + 3);
v17 = -15535;
v18 = -1;
strncpy(v11, v3 + 1164, 0x3FFuLL);
v20 = 2;
v19 = 4;
v20 = v3[26];
v5 = (const char *)(a2 + 1);
v6 = *(_BYTE *)a2 & 1;
if ( (*(_BYTE *)a2 & 1) != 0 )
v5 = *(const char **)(a2 + 16);
strncpy(v16, v5, 0xFuLL);
v14 = 2;
v13 = -1;
v15 = 1;
v7 = (const char *)(a2 + 1);
if ( v6 )
v7 = *(const char **)(a2 + 16);
strncpy(v12, v7, 0xFuLL);
v8 = ioctl(*((_DWORD *)v3 + 1), 0xCAD84404uLL, v10);
v9 = v8;
if ( (_DWORD)v8 == -1 )
v9 = *(_DWORD *)__get_errno_ptr(v8);
result = 0LL;
if ( v9 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCADDRULE errno=%d", "PfAddNatAnchorRule", v9);
return v9;
}
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
// 2B538: using guessed type char anonymous_0[2048];
// 2B538: using guessed type char anonymous_1[16];
// 2B538: using guessed type char anonymous_2[188];
//----- (000000000002B6AC) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfRemoveNatAnchorRule(_DWORD *a1, __int64 a2)
{
_DWORD *v3; // x23
__int64 result; // x0
__int64 v5; // x0
unsigned int v6; // w19
int v7; // w25
int i; // w22
int v9; // w0
__int64 v10; // x0
const char *v11; // x1
__int64 v12; // x0
int v13; // w0
__int64 v14; // x0
int v15[3]; // [xsp+50h] [xbp+50h] BYREF
int v16; // [xsp+5Ch] [xbp+5Ch]
char v17[2048]; // [xsp+60h] [xbp+60h] BYREF
char v18[712]; // [xsp+860h] [xbp+860h] BYREF
v3 = sub_2A694(a1);
result = 22LL;
if ( v3 )
{
memset(v15, 0, 0xAD8uLL);
strncpy(v17, "nat_vnm", 0x400uLL);
v18[680] = 4;
v5 = ioctl(v3[1], 0xCAD84406uLL, v15);
v6 = v5;
if ( (_DWORD)v5 == -1 )
v6 = *(_DWORD *)__get_errno_ptr(v5);
if ( v6 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCGETRULES errno=%d", "PfRemoveNatAnchorRule", v6);
return v6;
}
v7 = v16;
for ( i = 0; ; ++i )
{
if ( i >= v7 )
return 0LL;
v9 = v3[1];
v15[0] = 0;
v16 = i;
v10 = ioctl(v9, 0xCAD84407uLL, v15);
v6 = v10;
if ( (_DWORD)v10 == -1 )
v6 = *(_DWORD *)__get_errno_ptr(v10);
if ( v6 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCGETRULE errno=%d", "PfRemoveNatAnchorRule", v6);
return v6;
}
v11 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v11 = *(const char **)(a2 + 16);
if ( !strncmp(v18, v11, 0xFuLL) && v18[52] == 1 )
break;
}
v15[0] = 6;
v12 = ioctl(v3[1], 0xCAD8441AuLL, v15);
v6 = v12;
if ( (_DWORD)v12 == -1 )
v6 = *(_DWORD *)__get_errno_ptr(v12);
if ( v6 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: get ticket DIOCCHANGERULE errno=%d", "PfRemoveNatAnchorRule", v6);
return v6;
}
v15[0] = 5;
v13 = v3[1];
v16 = i;
v14 = ioctl(v13, 0xCAD8441AuLL, v15);
v6 = v14;
if ( (_DWORD)v14 == -1 )
v6 = *(_DWORD *)__get_errno_ptr(v14);
result = 0LL;
if ( v6 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: remove rule DIOCCHANGERULE errno=%d", "PfRemoveNatAnchorRule", v6);
return v6;
}
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
// 2B6AC: using guessed type char anonymous_0[2048];
//----- (000000000002B8F0) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfCallAnchor(_DWORD *a1, __int64 a2)
{
unsigned int v3; // w20
const char *v4; // x0
const char *v5; // x19
const char *v6; // x1
__int64 v7; // x0
unsigned int v8; // w19
_DWORD v10[4]; // [xsp+40h] [xbp+40h] BYREF
char v11[1024]; // [xsp+50h] [xbp+50h] BYREF
char v12[1736]; // [xsp+450h] [xbp+450h] BYREF
v3 = 22;
v4 = (const char *)sub_2A694(a1);
if ( v4 )
{
v5 = v4;
memset(v10, 0, 0xAD8uLL);
v10[1] = *((_DWORD *)v5 + 547);
v10[2] = *((_DWORD *)v5 + 3);
strncpy(v11, v5 + 1164, 0x3FFuLL);
v12[1712] = 2;
v6 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v6 = *(const char **)(a2 + 16);
strncpy(v12, v6, 0x3FFuLL);
strncpy(v11, v5 + 1164, 0x3FFuLL);
v3 = 0;
v7 = ioctl(*((_DWORD *)v5 + 1), 0xCAD84404uLL, v10);
if ( (_DWORD)v7 == -1 )
{
v8 = *(_DWORD *)__get_errno_ptr(v7);
if ( v8 )
{
v3 = v8;
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCADDRULE rc=%d", "PfCallAnchor", v8);
}
}
}
return v3;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 4D488: using guessed type __int64 qword_4D488;
//----- (000000000002BA28) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfEnable(fnv::vnm *this)
{
int v1; // w22
unsigned int v2; // w19
__int64 v3; // x0
int v4; // w24
int v6; // w20
__int64 v8; // x0
__int64 result; // x0
unsigned __int64 v10; // [xsp+50h] [xbp+50h] BYREF
__int64 v11[3]; // [xsp+58h] [xbp+58h] BYREF
__int64 v12[3]; // [xsp+70h] [xbp+70h] BYREF
v1 = 0;
do
{
++v1;
v2 = 0;
v3 = open("/dev/pf", 8194);
v4 = v3;
if ( (v3 & 0x80000000) != 0 )
v2 = *(_DWORD *)__get_errno_ptr(v3);
if ( v1 <= 2 && v2 == 22 )
{
memset(v11, 0, sizeof(v11));
std::string::__init(v11, &unk_33170, 23LL);
memset(v12, 0, sizeof(v12));
std::string::__init(v12, "PfOpenAnchorFailure: EINVAL", 27LL);
fnv::vnm::LogWorthy((__int64)v11, "nto/pf_util.cpp", 0x37u, (__int64)v12);
std::string::~string(v12);
std::string::~string(v11);
v6 = rand() % 490 + 10;
Logger::e(
(Logger *)qword_4D488,
"%s: (%d/%d) Failed to open /dev/pf with EINVAL, retrying in %d ms",
"PfEnable",
(unsigned int)v1,
3LL,
(unsigned int)v6);
v10 = v6;
std::this_thread::sleep_for<long long,std::ratio<1l,1000l>>(&v10);
}
}
while ( v2 == 22 && v1 <= 2 );
if ( (v4 & 0x80000000) != 0 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: No descriptor, rc=%d", "PfEnable", v2);
return v2;
}
v8 = ioctl(v4, 0x4401uLL);
v2 = v8;
if ( (_DWORD)v8 == -1 )
v2 = *(_DWORD *)__get_errno_ptr(v8);
close(v4);
result = 0LL;
if ( v2 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCSTART rc=%d", "PfEnable", v2);
return v2;
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D488: using guessed type __int64 qword_4D488;
//----- (000000000002BC20) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfDisable(fnv::vnm *this)
{
int v1; // w22
unsigned int v2; // w19
__int64 v3; // x0
int v4; // w24
int v6; // w20
__int64 v8; // x0
__int64 result; // x0
unsigned __int64 v10; // [xsp+50h] [xbp+50h] BYREF
__int64 v11[3]; // [xsp+58h] [xbp+58h] BYREF
__int64 v12[3]; // [xsp+70h] [xbp+70h] BYREF
v1 = 0;
do
{
++v1;
v2 = 0;
v3 = open("/dev/pf", 8194);
v4 = v3;
if ( (v3 & 0x80000000) != 0 )
v2 = *(_DWORD *)__get_errno_ptr(v3);
if ( v1 <= 2 && v2 == 22 )
{
memset(v11, 0, sizeof(v11));
std::string::__init(v11, &unk_33170, 23LL);
memset(v12, 0, sizeof(v12));
std::string::__init(v12, "PfOpenAnchorFailure: EINVAL", 27LL);
fnv::vnm::LogWorthy((__int64)v11, "nto/pf_util.cpp", 0x64u, (__int64)v12);
std::string::~string(v12);
std::string::~string(v11);
v6 = rand() % 490 + 10;
Logger::e(
(Logger *)qword_4D488,
"%s: (%d/%d) Failed to open /dev/pf with EINVAL, retrying in %d ms",
"PfDisable",
(unsigned int)v1,
3LL,
(unsigned int)v6);
v10 = v6;
std::this_thread::sleep_for<long long,std::ratio<1l,1000l>>(&v10);
}
}
while ( v2 == 22 && v1 <= 2 );
if ( (v4 & 0x80000000) != 0 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: No descriptor, rc=%d", "PfDisable", v2);
return v2;
}
v8 = ioctl(v4, 0x4402uLL);
v2 = v8;
if ( (_DWORD)v8 == -1 )
v2 = *(_DWORD *)__get_errno_ptr(v8);
close(v4);
result = 0LL;
if ( v2 )
{
Logger::e((Logger *)qword_4D488, "ERROR %s: DIOCSTOP rc=%d", "PfDisable", v2);
return v2;
}
return result;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D488: using guessed type __int64 qword_4D488;
//----- (000000000002BE18) ----------------------------------------------------
__int64 __fastcall sub_2BE18(char **a1, char *a2, int a3)
{
int v6; // w23
unsigned int v7; // w19
__int64 v8; // x0
int v9; // w22
int v11; // w20
char *v13; // x20
const char *v14; // x1
char v15; // w2
__int64 v16; // x0
__int64 v17; // x0
const char *v18; // x3
unsigned __int64 v20; // [xsp+60h] [xbp+60h] BYREF
__int64 v21[3]; // [xsp+68h] [xbp+68h] BYREF
__int64 v22[3]; // [xsp+80h] [xbp+80h] BYREF
v6 = 0;
do
{
++v6;
v7 = 0;
v8 = open("/dev/pf", 8194);
v9 = v8;
if ( (v8 & 0x80000000) != 0 )
v7 = *(_DWORD *)__get_errno_ptr(v8);
if ( v6 <= 2 && v7 == 22 )
{
memset(v21, 0, sizeof(v21));
std::string::__init(v21, &unk_33170, 23LL);
memset(v22, 0, sizeof(v22));
std::string::__init(v22, "PfOpenAnchorFailure: EINVAL", 27LL);
fnv::vnm::LogWorthy((__int64)v21, "nto/pf_util.cpp", 0xB3u, (__int64)v22);
std::string::~string(v22);
std::string::~string(v21);
v11 = rand() % 490 + 10;
Logger::e(
(Logger *)qword_4D488,
"%s: (%d/%d) Failed to open /dev/pf with EINVAL, retrying in %d ms",
"PfOpenAnchor",
(unsigned int)v6,
3LL,
(unsigned int)v11);
v20 = v11;
std::this_thread::sleep_for<long long,std::ratio<1l,1000l>>(&v20);
}
}
while ( v7 == 22 && v6 <= 2 );
if ( v9 == -1 )
{
Logger::e((Logger *)qword_4D488, "ERROR Could not open PF device, errno=%d", v7);
}
else
{
v13 = (char *)operator new(0x890uLL);
memset(v13, 0, 0x890uLL);
fnv::vnm::PfContext::PfContext((fnv::vnm::PfContext *)v13);
*((_DWORD *)v13 + 290) = a3;
*((_DWORD *)v13 + 286) = 1;
*((_DWORD *)v13 + 287) = 1032;
v14 = a2 + 1;
v15 = *a2;
*((_QWORD *)v13 + 144) = v13 + 1160;
if ( (v15 & 1) != 0 )
v14 = (const char *)*((_QWORD *)a2 + 2);
strncpy(v13 + 1164, v14, 0x3FFuLL);
v16 = ioctl(v9, 0xC0104451uLL, v13 + 1144);
v7 = v16;
if ( (_DWORD)v16 == -1 )
v7 = *(_DWORD *)__get_errno_ptr(v16);
if ( v7 )
{
v18 = "DIOCXBEGIN ioctl";
}
else
{
v17 = ioctl(v9, 0xC4704433uLL, v13 + 8);
v7 = v17;
if ( (_DWORD)v17 == -1 )
v7 = *(_DWORD *)__get_errno_ptr(v17);
if ( !v7 )
{
*a1 = v13;
*(_DWORD *)v13 = 1431655765;
*((_DWORD *)v13 + 1) = v9;
return 0LL;
}
v18 = "DIOCBEGINADDRS ioctl";
}
Logger::e((Logger *)qword_4D488, "ERROR %s: %s, errno=%d", "PfOpenAnchor", v18, v7);
close(v9);
operator delete(v13);
}
return v7;
}
// 13450: using guessed type __int64 __fastcall __get_errno_ptr(_QWORD);
// 13980: using guessed type __int64 __fastcall std::string::~string(_QWORD);
// 13AD0: using guessed type __int64 __fastcall std::string::__init(_QWORD, _QWORD, _QWORD);
// 4D488: using guessed type __int64 qword_4D488;
//----- (000000000002C0F4) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfFlushAnchor(char *a1)
{
__int64 result; // x0
void *v2; // x1
fnv::vnm *v3; // [xsp+20h] [xbp+20h] BYREF
result = sub_2BE18((char **)&v3, a1, 1);
if ( !(_DWORD)result )
return fnv::vnm::PfCommitAnchor(v3, v2);
return result;
}
// 2C12C: variable 'v2' is possibly undefined
//----- (000000000002C154) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfOpenFilterAnchor(char **a1, char *a2)
{
return sub_2BE18(a1, a2, 1);
}
//----- (000000000002C15C) ----------------------------------------------------
__int64 __fastcall fnv::vnm::PfOpenNatAnchor(char **a1, char *a2)
{
return sub_2BE18(a1, a2, 2);
}
//----- (000000000002C164) ----------------------------------------------------
void *__fastcall fnv::vnm::PfContext::PfContext(fnv::vnm::PfContext *this)
{
memset((char *)this + 8, 0, 0x470uLL);
*((_QWORD *)this + 143) = 0LL;
*((_QWORD *)this + 144) = 0LL;
return memset((char *)this + 1160, 0, 0x408uLL);
}
//----- (000000000002C1B0) ----------------------------------------------------
__int64 __fastcall std::this_thread::sleep_for<long long,std::ratio<1l,1000l>>(unsigned __int64 *a1)
{
unsigned __int64 v1; // x20
long double v2; // q0
__int64 v4[2]; // [xsp+20h] [xbp+20h] BYREF
v1 = *a1;
if ( (__int64)*a1 > 0 )
{
*(__n128 *)&v2 = sub_2C450(*a1);
if ( (sub_2C250(v2, *(long double *)&xmmword_2C240) & 0x80000000) != 0 )
v4[0] = 1000000 * v1;
else
v4[0] = 0x7FFFFFFFFFFFFFFFLL;
std::this_thread::sleep_for(v4);
}
return v4[1] ^ _stack_chk_guard;
}
// 13A80: using guessed type __int64 __fastcall std::this_thread::sleep_for(_QWORD);
// 2C240: using guessed type __int128 xmmword_2C240;
//----- (000000000002C250) ----------------------------------------------------
__int64 __fastcall sub_2C250(long double a1, long double a2)
{
__int64 v2; // x3
unsigned __int64 v3; // x8
unsigned __int64 v4; // x9
__int64 v5; // x4
__int64 v6; // x1
__int64 v7; // x0
__int64 result; // x0
_ReadStatusReg(ARM64_SYSREG(3, 3, 4, 4, 0));
v2 = HIWORD(*((_QWORD *)&a1 + 1)) & 0x7FFFLL;
v3 = *((_QWORD *)&a1 + 1) & 0xFFFFFFFFFFFFLL;
v4 = *((_QWORD *)&a2 + 1) & 0xFFFFFFFFFFFFLL;
v5 = HIWORD(*((_QWORD *)&a2 + 1)) & 0x7FFFLL;
if ( v2 == 0x7FFF && *(_QWORD *)&a1 | v3 || v5 == 0x7FFF && *(_QWORD *)&a2 | v4 )
{
sub_30748(1uLL);
return 2LL;
}
if ( v2 )
{
v6 = a1 < 0.0;
v7 = a2 < 0.0;
if ( !v5 && !(*(_QWORD *)&a2 | v4) )
goto LABEL_7;
}
else
{
v6 = a1 < 0.0;
v7 = a2 < 0.0;
if ( !v5 && !(*(_QWORD *)&a2 | v4) )
{
result = 0LL;
if ( !(*(_QWORD *)&a1 | v3) )
return result;
goto LABEL_7;
}
if ( !(*(_QWORD *)&a1 | v3) )
{
LABEL_13:
if ( v7 )
return 1LL;
else
return 0xFFFFFFFFLL;
}
}
if ( v7 != v6 )
{
LABEL_7:
if ( v6 )
return 0xFFFFFFFFLL;
else
return 1LL;
}
if ( v2 > v5 )
{
if ( v7 )
return 0xFFFFFFFFLL;
else
return 1LL;
}
if ( v2 < v5 )
goto LABEL_13;
if ( v3 > v4 || v3 == v4 && *(_QWORD *)&a1 > *(_QWORD *)&a2 )
goto LABEL_7;
if ( v3 < v4 || (result = 0LL, v3 == v4 && *(_QWORD *)&a1 < *(_QWORD *)&a2) )
{
if ( v6 )
return 1LL;
else
return 0xFFFFFFFFLL;
}
return result;
}
//----- (000000000002C3C8) ----------------------------------------------------
__n128 __fastcall sub_2C3C8(unsigned int a1)
{
unsigned int v1; // w4
unsigned int v2; // w0
__int16 v3; // w3
__n128 result; // q0
if ( a1 )
{
v1 = a1 >> 31;
v2 = abs32(a1);
v3 = __clz(v2);
result.n128_u64[0] = 0LL;
result.n128_u64[1] = ((unsigned __int64)v2 << ((unsigned __int8)v3 - 15)) & 0xFFFFFFFFFFFFLL | ((unsigned __int64)((16446 - v3) & 0x7FFF) << 48) & 0x7FFFFFFFFFFFFFFFLL | ((unsigned __int64)(unsigned __int8)v1 << 63);
}
else
{
return (__n128)0LL;
}
return result;
}
//----- (000000000002C450) ----------------------------------------------------
__n128 __fastcall sub_2C450(unsigned __int64 a1)
{
unsigned __int64 v1; // x4
unsigned __int64 v2; // x0
int v3; // w2
__n128 result; // q0
if ( a1 )
{
v1 = a1 >> 63;
v2 = abs64(a1);
v3 = 16446 - __clz(v2);
if ( 16495LL - v3 <= 63 )
{
result.n128_u64[0] = v2 << (111 - (unsigned __int8)v3);
result.n128_u64[1] = (v2 >> ((unsigned __int8)v3 - 47)) & 0xFFFFFFFFFFFFLL | ((unsigned __int64)(v3 & 0x7FFF) << 48) & 0x7FFFFFFFFFFFFFFFLL | ((unsigned __int64)(unsigned __int8)v1 << 63);
}
else
{
result.n128_u64[0] = 0LL;
result.n128_u64[1] = (v2 << (47 - (unsigned __int8)v3)) & 0xFFFFFFFFFFFFLL | ((unsigned __int64)(v3 & 0x7FFF) << 48) & 0x7FFFFFFFFFFFFFFFLL | ((unsigned __int64)(unsigned __int8)v1 << 63);
}
}
else
{
return (__n128)0LL;
}
return result;
}
//----- (000000000002C520) ----------------------------------------------------
char *__fastcall sub_2C520(char a1, char *a2, char *a3, unsigned __int64 *a4)
{
char *result; // x0
unsigned __int64 v6; // x4
unsigned int v7; // w7
char v8; // w8
char v9; // t1
unsigned __int64 v10; // x6
int v11; // w7
char v12; // t1
unsigned __int64 v13; // x6
_QWORD *v14; // x0
unsigned __int64 v15; // t1
if ( a1 == 80 )
{
v14 = (_QWORD *)((unsigned __int64)(a3 + 7) & 0xFFFFFFFFFFFFFFF8LL);
v15 = *v14;
result = (char *)(v14 + 1);
*a4 = v15;
}
else
{
switch ( a1 & 0xF )
{
case 0:
case 4:
case 0xC:
result = a3 + 8;
v6 = *(_QWORD *)a3;
goto LABEL_6;
case 1:
result = a3;
v6 = 0LL;
v11 = 0;
do
{
v12 = *result++;
v13 = (unsigned __int64)(v12 & 0x7F) << v11;
v11 += 7;
v6 |= v13;
}
while ( (v12 & 0x80) != 0 );
goto LABEL_6;
case 2:
result = a3 + 2;
v6 = *(unsigned __int16 *)a3;
goto LABEL_6;
case 3:
result = a3 + 4;
v6 = *(unsigned int *)a3;
goto LABEL_6;
case 9:
result = a3;
v6 = 0LL;
v7 = 0;
do
{
v9 = *result++;
v8 = v9;
v10 = (unsigned __int64)(v9 & 0x7F) << v7;
v7 += 7;
v6 |= v10;
}
while ( (v9 & 0x80) != 0 );
if ( v7 > 0x3F || (v8 & 0x40) == 0 )
goto LABEL_6;
v6 |= -1LL << v7;
goto LABEL_7;
case 0xA:
result = a3 + 2;
v6 = *(__int16 *)a3;
goto LABEL_6;
case 0xB:
result = a3 + 4;
v6 = *(int *)a3;
LABEL_6:
if ( v6 )
{
LABEL_7:
if ( (a1 & 0x70) != 16 )
a3 = a2;
v6 += (unsigned __int64)a3;
if ( (a1 & 0x80) != 0 )
v6 = *(_QWORD *)v6;
}
*a4 = v6;
break;
default:
abort();
}
}
return result;
}
//----- (000000000002C650) ----------------------------------------------------
__int64 __fastcall sub_2C650(unsigned __int8 a1, _QWORD *a2)
{
unsigned int v2; // w0
if ( a1 == 255 )
return 0LL;
v2 = a1 & 0x70;
if ( v2 == 32 )
return a2[101];
if ( v2 <= 0x20 )
{
if ( v2 && v2 != 16 )
goto LABEL_11;
return 0LL;
}
if ( v2 != 64 )
{
if ( v2 != 80 )
{
if ( v2 == 48 )
return a2[102];
LABEL_11:
abort();
}
return 0LL;
}
return a2[103];
}
//----- (000000000002C6D8) ----------------------------------------------------
char *__fastcall sub_2C6D8(char *result, unsigned __int64 a2, _QWORD *a3, _QWORD *dest)
{
__int64 v4; // x29
__int64 v5; // x30
unsigned __int64 v9; // x3
_QWORD *v10; // x26
char v11; // w1
char *v12; // x19
int v13; // w2
char v14; // w3
__int64 v15; // x4
int v16; // w1
char v17; // t1
unsigned __int64 v18; // x0
char *v19; // x2
__int64 v20; // x4
char *v21; // x1
__int64 i; // x0
unsigned __int64 v23; // x4
int v24; // w2
char v25; // t1
unsigned __int64 v26; // x1
unsigned __int64 v27; // x4
int v28; // w2
char v29; // t1
unsigned __int64 v30; // x1
unsigned __int64 v31; // x4
int v32; // w1
char v33; // t1
unsigned __int64 v34; // x0
__int64 v35; // x5
int v36; // w2
char v37; // t1
unsigned __int64 v38; // x1
char *v39; // x1
_QWORD *v40; // x3
void *v41; // x3
_QWORD *v42; // x28
__int64 v43; // x3
int v44; // w1
char v45; // t1
unsigned __int64 v46; // x0
int v47; // w1
__int64 v48; // x3
char v49; // t1
unsigned __int64 v50; // x0
__int64 v51; // x3
int v52; // w1
char v53; // t1
unsigned __int64 v54; // x0
__int64 v55; // x3
int v56; // w1
char v57; // t1
unsigned __int64 v58; // x0
__int64 v59; // x1
__int64 v60; // x1
unsigned __int64 v61; // x4
int v62; // w2
char v63; // t1
unsigned __int64 v64; // x1
__int64 v65; // x5
int v66; // w2
char v67; // t1
unsigned __int64 v68; // x1
__int64 v69; // x5
char *v70; // x1
int v71; // w2
char v72; // t1
unsigned __int64 v73; // x1
char v74; // w28
char *v75; // x0
__int64 v76; // x1
unsigned __int64 v77; // x5
int v78; // w1
char v79; // t1
unsigned __int64 v80; // x0
__int64 v81; // x4
int v82; // w2
char v83; // t1
unsigned __int64 v84; // x1
__int64 v85; // x4
char *v86; // x1
int v87; // w2
__int64 v88; // x0
char v89; // t1
unsigned __int64 v90; // x1
unsigned __int64 v91; // x3
int v92; // w1
char v93; // t1
unsigned __int64 v94; // x0
char *v95; // x0
__int64 v96; // x0
int v97; // w2
char v98; // t1
unsigned __int64 v99; // x1
int v100; // w1
char v101; // t1
unsigned __int64 v102; // x0
unsigned int v103; // w2
char v104; // w3
char v105; // t1
unsigned __int64 v106; // x1
__int64 v107; // x4
int v108; // w2
char v109; // t1
unsigned __int64 v110; // x1
unsigned int v111; // w2
__int64 v112; // x4
char v113; // w3
char v114; // t1
unsigned __int64 v115; // x1
__int64 v116; // x1
__int64 v117; // x3
unsigned int v118; // w1
char v119; // w2
char v120; // t1
unsigned __int64 v121; // x0
unsigned __int64 v122; // x4
int v123; // w1
char v124; // t1
unsigned __int64 v125; // x0
__int64 v126; // x5
int v127; // w2
char v128; // t1
unsigned __int64 v129; // x1
__int64 v130; // x5
char *v131; // x1
int v132; // w1
char v133; // t1
unsigned __int64 v134; // x0
unsigned int v135; // w2
char v136; // w3
char v137; // t1
unsigned __int64 v138; // x1
unsigned __int64 v139; // x3
int v140; // w1
char v141; // t1
unsigned __int64 v142; // x0
char *v143; // x0
__int64 v144; // x0
int v145; // w2
char v146; // t1
unsigned __int64 v147; // x1
__int64 v148; // x3
int v149; // w1
char v150; // t1
unsigned __int64 v151; // x0
_QWORD v152[206]; // [xsp-660h] [xbp-6D0h] BYREF
unsigned __int64 v153; // [xsp+68h] [xbp-8h] BYREF
dest[196] = 0LL;
if ( (unsigned __int64)result < a2 )
{
v152[204] = v4;
v152[205] = v5;
v9 = dest[201];
if ( v9 < a3[99] + (a3[104] >> 63) )
{
v10 = 0LL;
do
{
v11 = *result;
v12 = result + 1;
v13 = *result & 0xC0;
switch ( v13 )
{
case 64:
++result;
dest[201] = v9 + (v11 & 0x3F) * dest[204];
break;
case 128:
v14 = v11 & 0x3F;
v15 = 0LL;
v16 = 0;
do
{
v17 = *v12++;
v18 = (unsigned __int64)(v17 & 0x7F) << v16;
v16 += 7;
v15 |= v18;
}
while ( (v17 & 0x80) != 0 );
v19 = (char *)&dest[2 * (v14 & 0x3F)];
result = v12;
v20 = v15 * dest[203];
*((_DWORD *)v19 + 2) = 1;
*(_QWORD *)v19 = v20;
break;
case 192:
++result;
LODWORD(dest[2 * (v11 & 0x3F) + 1]) = 0;
break;
default:
switch ( *result )
{
case 0:
goto LABEL_20;
case 1:
v74 = *((_BYTE *)dest + 1648);
v75 = (char *)sub_2C650(v74, a3);
result = sub_2C520(v74, v75, v12, &v153);
dest[201] = v153;
goto LABEL_11;
case 2:
v76 = (unsigned __int8)result[1];
result += 2;
dest[201] = v9 + v76 * dest[204];
goto LABEL_11;
case 3:
v59 = *(unsigned __int16 *)(result + 1);
result += 3;
dest[201] = v9 + v59 * dest[204];
goto LABEL_11;
case 4:
v60 = *(unsigned int *)(result + 1);
result += 5;
dest[201] = v9 + v60 * dest[204];
goto LABEL_11;
case 5:
v61 = 0LL;
++result;
v62 = 0;
do
{
v63 = *result++;
v64 = (unsigned __int64)(v63 & 0x7F) << v62;
v62 += 7;
v61 |= v64;
}
while ( (v63 & 0x80) != 0 );
v65 = 0LL;
v66 = 0;
do
{
v67 = *result++;
v68 = (unsigned __int64)(v67 & 0x7F) << v66;
v66 += 7;
v65 |= v68;
}
while ( (v67 & 0x80) != 0 );
goto LABEL_56;
case 6:
v27 = 0LL;
++result;
v71 = 0;
do
{
v72 = *result++;
v73 = (unsigned __int64)(v72 & 0x7F) << v71;
v71 += 7;
v27 |= v73;
}
while ( (v72 & 0x80) != 0 );
goto LABEL_27;
case 7:
v23 = 0LL;
++result;
v24 = 0;
do
{
v25 = *result++;
v26 = (unsigned __int64)(v25 & 0x7F) << v24;
v24 += 7;
v23 |= v26;
}
while ( (v25 & 0x80) != 0 );
if ( v23 <= 0x61 )
LODWORD(dest[2 * v23 + 1]) = 6;
goto LABEL_11;
case 8:
v27 = 0LL;
++result;
v28 = 0;
do
{
v29 = *result++;
v30 = (unsigned __int64)(v29 & 0x7F) << v28;
v28 += 7;
v27 |= v30;
}
while ( (v29 & 0x80) != 0 );
LABEL_27:
if ( v27 <= 0x61 )
LODWORD(dest[2 * v27 + 1]) = 0;
goto LABEL_11;
case 9:
v31 = 0LL;
v32 = 0;
do
{
v33 = *v12++;
v34 = (unsigned __int64)(v33 & 0x7F) << v32;
v32 += 7;
v31 |= v34;
}
while ( (v33 & 0x80) != 0 );
result = v12;
v35 = 0LL;
v36 = 0;
do
{
v37 = *result++;
v38 = (unsigned __int64)(v37 & 0x7F) << v36;
v36 += 7;
v35 |= v38;
}
while ( (v37 & 0x80) != 0 );
if ( v31 <= 0x61 )
{
v39 = (char *)&dest[2 * v31];
*((_DWORD *)v39 + 2) = 2;
*(_QWORD *)v39 = v35;
}
goto LABEL_11;
case 10:
if ( v10 )
{
v40 = v10;
v10 = (_QWORD *)v10[196];
}
else
{
v40 = v152;
}
v41 = memcpy(v40, dest, 0x648uLL);
result = v12;
dest[196] = v41;
goto LABEL_11;
case 11:
v42 = (_QWORD *)dest[196];
memcpy(dest, v42, 0x648uLL);
v42[196] = v10;
result = v12;
v10 = v42;
goto LABEL_11;
case 12:
v43 = 0LL;
v44 = 0;
do
{
v45 = *v12++;
v46 = (unsigned __int64)(v45 & 0x7F) << v44;
v44 += 7;
v43 |= v46;
}
while ( (v45 & 0x80) != 0 );
dest[198] = v43;
v47 = 0;
v48 = 0LL;
do
{
v49 = *v12++;
v50 = (unsigned __int64)(v49 & 0x7F) << v47;
v47 += 7;
v48 |= v50;
}
while ( (v49 & 0x80) != 0 );
result = v12;
dest[197] = v48;
*((_DWORD *)dest + 400) = 1;
goto LABEL_11;
case 13:
v51 = 0LL;
v52 = 0;
do
{
v53 = *v12++;
v54 = (unsigned __int64)(v53 & 0x7F) << v52;
v52 += 7;
v51 |= v54;
}
while ( (v53 & 0x80) != 0 );
result = v12;
dest[198] = v51;
*((_DWORD *)dest + 400) = 1;
goto LABEL_11;
case 14:
v55 = 0LL;
v56 = 0;
do
{
v57 = *v12++;
v58 = (unsigned __int64)(v57 & 0x7F) << v56;
v56 += 7;
v55 |= v58;
}
while ( (v57 & 0x80) != 0 );
result = v12;
dest[197] = v55;
goto LABEL_11;
case 15:
v87 = 0;
*((_DWORD *)dest + 400) = 2;
v88 = 0LL;
dest[199] = v12;
do
{
v89 = *v12++;
v90 = (unsigned __int64)(v89 & 0x7F) << v87;
v87 += 7;
v88 |= v90;
}
while ( (v89 & 0x80) != 0 );
result = &v12[v88];
goto LABEL_11;
case 16:
v91 = 0LL;
v92 = 0;
do
{
v93 = *v12++;
v94 = (unsigned __int64)(v93 & 0x7F) << v92;
v92 += 7;
v91 |= v94;
}
while ( (v93 & 0x80) != 0 );
if ( v91 <= 0x61 )
{
v95 = (char *)&dest[2 * v91];
*((_DWORD *)v95 + 2) = 3;
*(_QWORD *)v95 = v12;
}
v96 = 0LL;
v97 = 0;
do
{
v98 = *v12++;
v99 = (unsigned __int64)(v98 & 0x7F) << v97;
v97 += 7;
v96 |= v99;
}
while ( (v98 & 0x80) != 0 );
result = &v12[v96];
goto LABEL_11;
case 17:
v61 = 0LL;
v100 = 0;
do
{
v101 = *v12++;
v102 = (unsigned __int64)(v101 & 0x7F) << v100;
v100 += 7;
v61 |= v102;
}
while ( (v101 & 0x80) != 0 );
result = v12;
v65 = 0LL;
v103 = 0;
do
{
v105 = *result++;
v104 = v105;
v106 = (unsigned __int64)(v105 & 0x7F) << v103;
v103 += 7;
v65 |= v106;
}
while ( (v105 & 0x80) != 0 );
if ( v103 <= 0x3F && (v104 & 0x40) != 0 )
v65 |= -1LL << v103;
LABEL_56:
v69 = v65 * dest[203];
if ( v61 <= 0x61 )
{
v70 = (char *)&dest[2 * v61];
*((_DWORD *)v70 + 2) = 1;
*(_QWORD *)v70 = v69;
}
goto LABEL_11;
case 18:
v107 = 0LL;
++result;
v108 = 0;
do
{
v109 = *result++;
v110 = (unsigned __int64)(v109 & 0x7F) << v108;
v108 += 7;
v107 |= v110;
}
while ( (v109 & 0x80) != 0 );
dest[198] = v107;
v111 = 0;
v112 = 0LL;
do
{
v114 = *result++;
v113 = v114;
v115 = (unsigned __int64)(v114 & 0x7F) << v111;
v111 += 7;
v112 |= v115;
}
while ( (v114 & 0x80) != 0 );
if ( v111 <= 0x3F && (v113 & 0x40) != 0 )
v112 |= -1LL << v111;
v116 = dest[203];
*((_DWORD *)dest + 400) = 1;
dest[197] = v116 * v112;
goto LABEL_11;
case 19:
v117 = 0LL;
v118 = 0;
do
{
v120 = *v12++;
v119 = v120;
v121 = (unsigned __int64)(v120 & 0x7F) << v118;
v118 += 7;
v117 |= v121;
}
while ( (v120 & 0x80) != 0 );
if ( v118 <= 0x3F && (v119 & 0x40) != 0 )
v117 |= -1LL << v118;
result = v12;
dest[197] = dest[203] * v117;
goto LABEL_11;
case 20:
v122 = 0LL;
v123 = 0;
do
{
v124 = *v12++;
v125 = (unsigned __int64)(v124 & 0x7F) << v123;
v123 += 7;
v122 |= v125;
}
while ( (v124 & 0x80) != 0 );
result = v12;
v126 = 0LL;
v127 = 0;
do
{
v128 = *result++;
v129 = (unsigned __int64)(v128 & 0x7F) << v127;
v127 += 7;
v126 |= v129;
}
while ( (v128 & 0x80) != 0 );
goto LABEL_104;
case 21:
v122 = 0LL;
v132 = 0;
do
{
v133 = *v12++;
v134 = (unsigned __int64)(v133 & 0x7F) << v132;
v132 += 7;
v122 |= v134;
}
while ( (v133 & 0x80) != 0 );
result = v12;
v126 = 0LL;
v135 = 0;
do
{
v137 = *result++;
v136 = v137;
v138 = (unsigned __int64)(v137 & 0x7F) << v135;
v135 += 7;
v126 |= v138;
}
while ( (v137 & 0x80) != 0 );
if ( v135 <= 0x3F && (v136 & 0x40) != 0 )
v126 |= -1LL << v135;
LABEL_104:
v130 = v126 * dest[203];
if ( v122 <= 0x61 )
{
v131 = (char *)&dest[2 * v122];
*((_DWORD *)v131 + 2) = 4;
*(_QWORD *)v131 = v130;
}
break;
case 22:
v139 = 0LL;
v140 = 0;
do
{
v141 = *v12++;
v142 = (unsigned __int64)(v141 & 0x7F) << v140;
v140 += 7;
v139 |= v142;
}
while ( (v141 & 0x80) != 0 );
if ( v139 <= 0x61 )
{
v143 = (char *)&dest[2 * v139];
*((_DWORD *)v143 + 2) = 5;
*(_QWORD *)v143 = v12;
}
v144 = 0LL;
v145 = 0;
do
{
v146 = *v12++;
v147 = (unsigned __int64)(v146 & 0x7F) << v145;
v145 += 7;
v144 |= v147;
}
while ( (v146 & 0x80) != 0 );
result = &v12[v144];
break;
case 45:
v21 = (char *)(dest + 32);
for ( i = 0LL; i != 128; i += 8LL )
{
*((_DWORD *)v21 + 2) = 1;
*(_QWORD *)v21 = i;
v21 += 16;
}
LABEL_20:
result = v12;
break;
case 46:
v148 = 0LL;
v149 = 0;
do
{
v150 = *v12++;
v151 = (unsigned __int64)(v150 & 0x7F) << v149;
v149 += 7;
v148 |= v151;
}
while ( (v150 & 0x80) != 0 );
result = v12;
a3[106] = v148;
break;
case 47:
v77 = 0LL;
v78 = 0;
do
{
v79 = *v12++;
v80 = (unsigned __int64)(v79 & 0x7F) << v78;
v78 += 7;
v77 |= v80;
}
while ( (v79 & 0x80) != 0 );
result = v12;
v81 = 0LL;
v82 = 0;
do
{
v83 = *result++;
v84 = (unsigned __int64)(v83 & 0x7F) << v82;
v82 += 7;
v81 |= v84;
}
while ( (v83 & 0x80) != 0 );
v85 = v81 * dest[203];
if ( v77 <= 0x61 )
{
v86 = (char *)&dest[2 * v77];
*((_DWORD *)v86 + 2) = 1;
*(_QWORD *)v86 = -v85;
}
break;
default:
abort();
}
break;
}
LABEL_11:
if ( a2 <= (unsigned __int64)result )
break;
v9 = dest[201];
}
while ( v9 < a3[99] + (a3[104] >> 63) );
}
}
return result;
}
// 2C6E4: variable 'v4' is possibly undefined
// 2C6E4: variable 'v5' is possibly undefined
//----- (000000000002CEC8) ----------------------------------------------------
__int64 __fastcall sub_2CEC8(_QWORD *a1, _QWORD *s)
{
__int64 v4; // x2
__int64 v5; // x0
__int64 v6; // x0
unsigned int *v7; // x23
unsigned int *v8; // x22
unsigned __int8 *v9; // x19
char *v10; // x0
__int64 v11; // x4
int v12; // w2
char v13; // t1
unsigned __int64 v14; // x1
unsigned int v15; // w2
__int64 v16; // x4
char v17; // w3
char v18; // t1
unsigned __int64 v19; // x1
__int64 v20; // x4
int v21; // w2
char v22; // t1
unsigned __int64 v23; // x1
unsigned __int64 v24; // x24
int v25; // w1
unsigned __int8 *v26; // x19
int v27; // t1
int v28; // w0
int v29; // w0
__int64 v31; // x1
char v32; // w1
int v33; // t1
char v34; // w1
int v35; // t1
char *v36; // x27
char v37; // w28
char *v38; // x0
int v39; // t1
__int64 v40; // t1
int v41; // w2
char v42; // t1
unsigned __int64 v43; // x1
__int64 v44; // x22
char *v45; // x22
__int64 v46; // x3
int v47; // w1
char v48; // t1
unsigned __int64 v49; // x0
int v50; // w24
char *v51; // x19
char *v52; // x0
unsigned __int64 v53; // [xsp+68h] [xbp+68h] BYREF
memset(s, 0, 0x680uLL);
a1[100] = 0LL;
v4 = a1[99];
a1[106] = 0LL;
if ( !v4 )
return 5LL;
v5 = (__int64)a1[104] < 0 ? 0LL : -1LL;
v6 = sub_30580(v4 + v5, a1 + 101);
v7 = (unsigned int *)v6;
if ( !v6 )
return 5LL;
v8 = (unsigned int *)(v6 + 4 - *(int *)(v6 + 4));
s[201] = a1[103];
v9 = (unsigned __int8 *)v8 + 9;
v10 = (char *)v8 + strlen((const char *)v8 + 9) + 10;
if ( *((_BYTE *)v8 + 9) == 101 && *((_BYTE *)v8 + 10) == 104 )
{
v40 = *(_QWORD *)v10;
v10 += 8;
v9 = (unsigned __int8 *)v8 + 11;
s[207] = v40;
}
if ( *((unsigned __int8 *)v8 + 8) > 3u )
{
if ( *v10 != 8 || v10[1] )
return 3LL;
v10 += 2;
}
v11 = 0LL;
v12 = 0;
do
{
v13 = *v10++;
v14 = (unsigned __int64)(v13 & 0x7F) << v12;
v12 += 7;
v11 |= v14;
}
while ( (v13 & 0x80) != 0 );
s[204] = v11;
v15 = 0;
v16 = 0LL;
do
{
v18 = *v10++;
v17 = v18;
v19 = (unsigned __int64)(v18 & 0x7F) << v15;
v15 += 7;
v16 |= v19;
}
while ( (v18 & 0x80) != 0 );
if ( v15 <= 0x3F && (v17 & 0x40) != 0 )
v16 |= -1LL << v15;
s[203] = v16;
if ( *((_BYTE *)v8 + 8) == 1 )
{
v31 = (unsigned __int8)*v10++;
s[205] = v31;
}
else
{
v20 = 0LL;
v21 = 0;
do
{
v22 = *v10++;
v23 = (unsigned __int64)(v22 & 0x7F) << v21;
v21 += 7;
v20 |= v23;
}
while ( (v22 & 0x80) != 0 );
s[205] = v20;
}
*((_BYTE *)s + 1649) = -1;
v24 = 0LL;
v25 = *v9;
if ( v25 == 122 )
{
v41 = 0;
do
{
v42 = *v10++;
v43 = (unsigned __int64)(v42 & 0x7F) << v41;
v41 += 7;
v24 |= v43;
}
while ( (v42 & 0x80) != 0 );
++v9;
*((_BYTE *)s + 1650) = 1;
v24 += (unsigned __int64)v10;
v25 = *v9;
}
v26 = v9 + 1;
while ( v25 )
{
switch ( v25 )
{
case 'L':
v32 = *v10++;
*((_BYTE *)s + 1649) = v32;
v33 = *v26++;
v25 = v33;
break;
case 'R':
v34 = *v10++;
*((_BYTE *)s + 1648) = v34;
v35 = *v26++;
v25 = v35;
break;
case 'P':
v36 = v10 + 1;
v37 = *v10;
v38 = (char *)sub_2C650(*v10, a1);
v10 = sub_2C520(v37, v38, v36, &v53);
s[202] = v53;
v39 = *v26++;
v25 = v39;
break;
case 'S':
*((_BYTE *)s + 1651) = 1;
v27 = *v26++;
v25 = v27;
break;
default:
goto LABEL_38;
}
}
if ( !v24 )
{
v24 = (unsigned __int64)v10;
LABEL_38:
if ( !v24 )
return 3LL;
}
sub_2C6D8((char *)v24, (unsigned __int64)v8 + *v8 + 4, a1, s);
v28 = *((unsigned __int8 *)s + 1648);
if ( v28 == 255 )
{
v44 = 2LL;
}
else
{
v29 = v28 & 7;
switch ( v29 )
{
case 0:
case 4:
v44 = 6LL;
break;
case 2:
v44 = 3LL;
break;
case 3:
v44 = 4LL;
break;
default:
abort();
}
}
v45 = (char *)&v7[v44];
if ( *((_BYTE *)s + 1650) )
{
v46 = 0LL;
v47 = 0;
do
{
v48 = *v45++;
v49 = (unsigned __int64)(v48 & 0x7F) << v47;
v47 += 7;
v46 |= v49;
}
while ( (v48 & 0x80) != 0 );
v50 = *((unsigned __int8 *)s + 1649);
v51 = &v45[v46];
if ( v50 == 255 )
goto LABEL_50;
goto LABEL_55;
}
v50 = *((unsigned __int8 *)s + 1649);
v51 = 0LL;
if ( v50 != 255 )
{
LABEL_55:
v52 = (char *)sub_2C650(v50, a1);
v45 = sub_2C520(v50, v52, v45, &v53);
a1[100] = v53;
LABEL_50:
if ( !v51 )
v51 = v45;
goto LABEL_52;
}
v51 = v45;
LABEL_52:
sub_2C6D8(v51, (unsigned __int64)v7 + *v7 + 4, a1, s);
return 0LL;
}
//----- (000000000002D2C0) ----------------------------------------------------
__int64 sub_2D2C0()
{
__int64 result; // x0
result = 8LL;
memset(&byte_4D490, 8, 32);
memset(&byte_4D4D0, 8, 33);
return result;
}
// 4D490: using guessed type char byte_4D490;
// 4D4D0: using guessed type char byte_4D4D0;
//----- (000000000002D3D8) ----------------------------------------------------
__int64 __fastcall sub_2D3D8(char *a1, unsigned __int64 a2, _QWORD *a3, __int64 a4)
{
int v6; // w20
unsigned int v7; // w5
char *v8; // x4
unsigned __int64 v9; // x1
int v10; // w3
__int64 result; // x0
__int64 v12; // x2
unsigned int v13; // w3
char v14; // w4
char v15; // t1
unsigned __int64 v16; // x1
int v17; // w5
__int64 v18; // x4
_QWORD *v19; // x1
int v20; // w5
int v21; // w5
__int64 v22; // x2
int v23; // w3
__int64 v24; // x1
__int64 v25; // x2
__int64 v26; // x4
__int64 v27; // x5
__int64 v28; // x3
int v29; // w5
int v30; // w1
char v31; // t1
unsigned __int64 v32; // x0
unsigned int v33; // w3
char v34; // w4
char v35; // t1
unsigned __int64 v36; // x1
int v37; // w3
int v38; // w1
char v39; // t1
unsigned __int64 v40; // x0
__int64 v41; // x1
char v42; // w25
char *v43; // x26
char *v44; // x0
__int64 v45; // x4
__int64 v46; // x1
int v47; // w1
unsigned int v48; // w5
char v49; // w4
char v50; // t1
unsigned __int64 v51; // x2
int v52; // w3
char v53; // t1
unsigned __int64 v54; // x2
__int64 v55; // x6
int v56; // w5
char v57; // t1
unsigned __int64 v58; // x2
int v59; // w2
unsigned __int64 v60; // [xsp+58h] [xbp+58h] BYREF
__int64 v61[64]; // [xsp+60h] [xbp+60h]
v61[0] = a4;
if ( (unsigned __int64)a1 >= a2 )
return a4;
v6 = 1;
while ( 2 )
{
v7 = (unsigned __int8)*a1;
v8 = a1 + 1;
switch ( *a1 )
{
case 3:
case 14:
case 15:
v9 = *(_QWORD *)(a1 + 1);
v10 = v6;
a1 += 9;
goto LABEL_7;
case 6:
case 25:
case 31:
case 32:
case 35:
case -108:
if ( !v6 )
goto LABEL_4;
v10 = v6 - 1;
v41 = v61[v6 - 1];
if ( v7 == 31 )
{
v9 = -v41;
++a1;
}
else if ( v7 <= 0x1F )
{
if ( v7 == 6 )
{
++a1;
v9 = *(_QWORD *)v41;
}
else
{
if ( v7 != 25 )
goto LABEL_4;
++a1;
v9 = abs64(v41);
}
}
else
{
switch ( v7 )
{
case 0x23u:
v55 = 0LL;
v56 = 0;
++a1;
do
{
v57 = *a1++;
v58 = (unsigned __int64)(v57 & 0x7F) << v56;
v56 += 7;
v55 |= v58;
}
while ( (v57 & 0x80) != 0 );
v9 = v41 + v55;
break;
case 0x94u:
v59 = (unsigned __int8)a1[1];
a1 += 2;
switch ( v59 )
{
case 1:
v9 = *(unsigned __int8 *)v41;
goto LABEL_7;
case 2:
v9 = *(unsigned __int16 *)v41;
goto LABEL_7;
case 4:
v9 = *(unsigned int *)v41;
goto LABEL_7;
case 8:
v9 = *(_QWORD *)v41;
goto LABEL_7;
default:
goto LABEL_4;
}
case 0x20u:
v9 = ~v41;
++a1;
break;
default:
goto LABEL_4;
}
}
LABEL_7:
if ( v10 > 63 )
goto LABEL_4;
v6 = v10 + 1;
v61[v10] = v9;
LABEL_9:
if ( a2 > (unsigned __int64)a1 )
continue;
if ( !v6 )
LABEL_4:
abort();
result = v61[v6 - 1];
break;
case 8:
v9 = (unsigned __int8)a1[1];
v10 = v6;
a1 += 2;
goto LABEL_7;
case 9:
v9 = a1[1];
v10 = v6;
a1 += 2;
goto LABEL_7;
case 10:
v9 = *(unsigned __int16 *)(a1 + 1);
v10 = v6;
a1 += 3;
goto LABEL_7;
case 11:
v9 = *(__int16 *)(a1 + 1);
v10 = v6;
a1 += 3;
goto LABEL_7;
case 12:
v9 = *(unsigned int *)(a1 + 1);
v10 = v6;
a1 += 5;
goto LABEL_7;
case 13:
v9 = *(int *)(a1 + 1);
v10 = v6;
a1 += 5;
goto LABEL_7;
case 16:
v9 = 0LL;
v52 = 0;
++a1;
do
{
v53 = *a1++;
v54 = (unsigned __int64)(v53 & 0x7F) << v52;
v52 += 7;
v9 |= v54;
}
while ( (v53 & 0x80) != 0 );
v10 = v6;
goto LABEL_7;
case 17:
v9 = 0LL;
v48 = 0;
++a1;
do
{
v50 = *a1++;
v49 = v50;
v51 = (unsigned __int64)(v50 & 0x7F) << v48;
v48 += 7;
v9 |= v51;
}
while ( (v50 & 0x80) != 0 );
v10 = v6;
if ( v48 <= 0x3F && (v49 & 0x40) != 0 )
v9 |= -1LL << v48;
goto LABEL_7;
case 18:
if ( !v6 )
goto LABEL_4;
v47 = v6 - 1;
goto LABEL_74;
case 19:
if ( !v6 )
goto LABEL_4;
--v6;
++a1;
goto LABEL_9;
case 20:
if ( v6 <= 1 )
goto LABEL_4;
v47 = v6 - 2;
LABEL_74:
v10 = v6;
++a1;
v9 = v61[v47];
goto LABEL_7;
case 21:
v45 = (unsigned __int8)a1[1];
a1 += 2;
v46 = v6 - 1;
if ( v45 >= v46 )
goto LABEL_4;
v10 = v6;
v9 = v61[v46 - v45];
goto LABEL_7;
case 22:
if ( v6 <= 1 )
goto LABEL_4;
++a1;
v28 = v61[v6 - 1];
v61[v6 - 1] = v61[v6 - 2];
v61[v6 - 2] = v28;
goto LABEL_9;
case 23:
if ( v6 <= 2 )
goto LABEL_4;
++a1;
v26 = v61[v6 - 1];
v27 = v61[v6 - 3];
v61[v6 - 1] = v61[v6 - 2];
v61[v6 - 2] = v27;
v61[v6 - 3] = v26;
goto LABEL_9;
case 26:
case 27:
case 28:
case 29:
case 30:
case 33:
case 34:
case 36:
case 37:
case 38:
case 39:
case 41:
case 42:
case 43:
case 44:
case 45:
case 46:
if ( v6 > 1 )
{
v10 = v6 - 2;
v24 = v61[v6 - 2];
v25 = v61[v6 - 1];
switch ( *a1 )
{
case 26:
v9 = v24 & v25;
++a1;
goto LABEL_7;
case 27:
v9 = v24 / v25;
++a1;
goto LABEL_7;
case 28:
v9 = v24 - v25;
++a1;
goto LABEL_7;
case 29:
++a1;
v9 = v24 % (unsigned __int64)v25;
goto LABEL_7;
case 30:
v9 = v24 * v25;
++a1;
goto LABEL_7;
case 33:
v9 = v24 | v25;
++a1;
goto LABEL_7;
case 34:
v9 = v24 + v25;
++a1;
goto LABEL_7;
case 36:
v9 = v24 << v25;
++a1;
goto LABEL_7;
case 37:
v9 = (unsigned __int64)v24 >> v25;
++a1;
goto LABEL_7;
case 38:
v9 = v24 >> v25;
++a1;
goto LABEL_7;
case 39:
v9 = v24 ^ v25;
++a1;
goto LABEL_7;
case 41:
++a1;
v9 = v24 == v25;
goto LABEL_7;
case 42:
++a1;
v9 = v24 >= v25;
goto LABEL_7;
case 43:
++a1;
v9 = v24 > v25;
goto LABEL_7;
case 44:
++a1;
v9 = v24 <= v25;
goto LABEL_7;
case 45:
++a1;
v9 = v24 < v25;
goto LABEL_7;
case 46:
++a1;
v9 = v24 != v25;
goto LABEL_7;
default:
goto LABEL_4;
}
}
goto LABEL_4;
case 40:
if ( !v6 )
goto LABEL_4;
if ( v61[--v6] )
a1 += *(__int16 *)(a1 + 1) + 3;
else
a1 += 3;
goto LABEL_9;
case 47:
a1 += *(__int16 *)(a1 + 1) + 3;
goto LABEL_9;
case 48:
case 49:
case 50:
case 51:
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 65:
case 66:
case 67:
case 68:
case 69:
case 70:
case 71:
case 72:
case 73:
case 74:
case 75:
case 76:
case 77:
case 78:
case 79:
v9 = v7 - 48;
v10 = v6;
++a1;
goto LABEL_7;
case 80:
case 81:
case 82:
case 83:
case 84:
case 85:
case 86:
case 87:
case 88:
case 89:
case 90:
case 91:
case 92:
case 93:
case 94:
case 95:
case 96:
case 97:
case 98:
case 99:
case 100:
case 101:
case 102:
case 103:
case 104:
case 105:
case 106:
case 107:
case 108:
case 109:
case 110:
case 111:
v21 = v7 - 80;
if ( v21 > 97 )
goto LABEL_4;
v22 = v21;
v9 = a3[v21];
v23 = (unsigned __int8)byte_4D490[v21];
if ( (a3[104] & 0x4000000000000000LL) != 0 )
goto LABEL_24;
goto LABEL_54;
case 112:
case 113:
case 114:
case 115:
case 116:
case 117:
case 118:
case 119:
case 120:
case 121:
case 122:
case 123:
case 124:
case 125:
case 126:
case 127:
case -128:
case -127:
case -126:
case -125:
case -124:
case -123:
case -122:
case -121:
case -120:
case -119:
case -118:
case -117:
case -116:
case -115:
case -114:
case -113:
v12 = 0LL;
v13 = 0;
++a1;
do
{
v15 = *a1++;
v14 = v15;
v16 = (unsigned __int64)(v15 & 0x7F) << v13;
v13 += 7;
v12 |= v16;
}
while ( (v15 & 0x80) != 0 );
if ( v13 <= 0x3F && (v14 & 0x40) != 0 )
v12 |= -1LL << v13;
v17 = v7 - 112;
if ( v17 > 97 )
goto LABEL_4;
v18 = v17;
v19 = (_QWORD *)a3[v17];
v20 = (unsigned __int8)byte_4D490[v17];
if ( (a3[104] & 0x4000000000000000LL) != 0 )
goto LABEL_18;
goto LABEL_48;
case -112:
v37 = 0;
v38 = 0;
do
{
v39 = *v8++;
v40 = (unsigned __int64)(v39 & 0x7F) << v38;
v38 += 7;
v37 |= v40;
}
while ( (v39 & 0x80) != 0 );
if ( v37 > 97 )
goto LABEL_4;
v22 = v37;
v9 = a3[v37];
v23 = (unsigned __int8)byte_4D490[v37];
if ( (a3[104] & 0x4000000000000000LL) != 0 )
{
LABEL_24:
if ( !*((_BYTE *)a3 + v22 + 856) )
{
if ( v23 != 8 )
goto LABEL_4;
v9 = *(_QWORD *)v9;
}
}
else
{
LABEL_54:
if ( v23 != 8 )
goto LABEL_4;
v9 = *(_QWORD *)v9;
}
v10 = v6;
a1 = v8;
goto LABEL_7;
case -110:
v29 = 0;
v30 = 0;
do
{
v31 = *v8++;
v32 = (unsigned __int64)(v31 & 0x7F) << v30;
v30 += 7;
v29 |= v32;
}
while ( (v31 & 0x80) != 0 );
a1 = v8;
v12 = 0LL;
v33 = 0;
do
{
v35 = *a1++;
v34 = v35;
v36 = (unsigned __int64)(v35 & 0x7F) << v33;
v33 += 7;
v12 |= v36;
}
while ( (v35 & 0x80) != 0 );
if ( v33 <= 0x3F && (v34 & 0x40) != 0 )
v12 |= -1LL << v33;
if ( v29 > 97 )
goto LABEL_4;
v18 = v29;
v19 = (_QWORD *)a3[v29];
v20 = (unsigned __int8)byte_4D490[v29];
if ( (a3[104] & 0x4000000000000000LL) != 0 )
{
LABEL_18:
if ( !*((_BYTE *)a3 + v18 + 856) )
{
if ( v20 != 8 )
goto LABEL_4;
v19 = (_QWORD *)*v19;
}
}
else
{
LABEL_48:
if ( v20 != 8 )
goto LABEL_4;
v19 = (_QWORD *)*v19;
}
v9 = (unsigned __int64)v19 + v12;
v10 = v6;
goto LABEL_7;
case -106:
++a1;
goto LABEL_9;
case -15:
v42 = a1[1];
v43 = a1 + 2;
v44 = (char *)sub_2C650(v42, a3);
a1 = sub_2C520(v42, v44, v43, &v60);
v10 = v6;
v9 = v60;
goto LABEL_7;
default:
goto LABEL_4;
}
return result;
}
}
// 2D3D8: using guessed type __int64 var_200[64];
//----- (000000000002DB40) ----------------------------------------------------
__int64 __fastcall sub_2DB40(char *src, __int64 a2)
{
__int64 v3; // x2
int v4; // w0
__int64 v5; // x1
int v6; // w3
char *v7; // x0
char v8; // t1
unsigned __int64 v9; // x2
__int64 v10; // x24
__int64 v11; // x26
_BYTE *v12; // x27
__int64 v13; // x25
char *v14; // x0
__int64 v15; // x1
int v16; // w3
char v17; // t1
unsigned __int64 v18; // x2
__int64 v19; // x0
__int64 result; // x0
__int64 v21; // x0
__int64 v22; // x1
char *v23; // x0
__int64 v24; // x1
int v25; // w3
char v26; // t1
unsigned __int64 v27; // x2
__int64 v28; // x0
_QWORD *v29; // x3
void **v30; // x1
__int64 v31; // x0
int v32; // w4
_QWORD *v33; // x1
__int64 v34; // [xsp+C28h] [xbp+68h]
__int64 v35; // [xsp+C38h] [xbp+78h] BYREF
_QWORD v36[31]; // [xsp+C40h] [xbp+80h] BYREF
__int64 *v37; // [xsp+D38h] [xbp+178h]
__int64 v38; // [xsp+F80h] [xbp+3C0h]
_BYTE v39[31]; // [xsp+F98h] [xbp+3D8h]
char v40; // [xsp+FB7h] [xbp+3F7h]
v34 = a2;
memcpy(v36, src, 0x3C0uLL);
v3 = v38;
if ( ((v38 & 0x4000000000000000LL) == 0 || !v40) && !v37 )
{
if ( byte_4D4AF != 8 )
goto LABEL_14;
v35 = *((_QWORD *)src + 98);
if ( (v38 & 0x4000000000000000LL) != 0 )
v40 = 0;
v37 = &v35;
}
if ( (*((_QWORD *)src + 104) & 0x4000000000000000LL) != 0 )
src[887] = 0;
v4 = *(_DWORD *)(v34 + 1600);
*((_QWORD *)src + 31) = 0LL;
if ( v4 != 1 )
{
if ( v4 != 2 )
goto LABEL_14;
v5 = 0LL;
v6 = 0;
v7 = *(char **)(v34 + 1592);
do
{
v8 = *v7++;
v9 = (unsigned __int64)(v8 & 0x7F) << v6;
v6 += 7;
v5 |= v9;
}
while ( (v8 & 0x80) != 0 );
v10 = sub_2D3D8(v7, (unsigned __int64)&v7[v5], v36, 0LL);
goto LABEL_10;
}
v31 = *(_QWORD *)(v34 + 1584);
if ( (int)v31 > 97 )
goto LABEL_14;
v32 = (unsigned __int8)byte_4D490[(int)v31];
v33 = (_QWORD *)v36[(int)v31];
if ( (v3 & 0x4000000000000000LL) == 0 )
{
if ( v32 != 8 )
abort();
goto LABEL_47;
}
if ( !v39[(int)v31] )
{
if ( v32 == 8 )
{
LABEL_47:
v33 = (_QWORD *)*v33;
goto LABEL_48;
}
LABEL_14:
abort();
}
LABEL_48:
v10 = (__int64)v33 + *(_QWORD *)(v34 + 1576);
LABEL_10:
v11 = v34;
v12 = src + 856;
v13 = 0LL;
*((_QWORD *)src + 98) = v10;
while ( 2 )
{
switch ( *(_DWORD *)(v11 + 8) )
{
case 1:
v19 = v10 + *(_QWORD *)v11;
if ( (*((_QWORD *)src + 104) & 0x4000000000000000LL) != 0 )
*v12 = 0;
goto LABEL_19;
case 2:
v21 = (int)*(_QWORD *)v11;
if ( !v39[v21] )
{
v19 = v36[v21];
if ( (*((_QWORD *)src + 104) & 0x4000000000000000LL) != 0 )
*v12 = 0;
LABEL_19:
*(_QWORD *)&src[8 * v13] = v19;
LABEL_20:
++v13;
v11 += 16LL;
++v12;
if ( v13 == 98 )
{
if ( *(_BYTE *)(v34 + 1651) )
goto LABEL_32;
goto LABEL_22;
}
continue;
}
if ( (int)*(_QWORD *)v11 > 97 )
goto LABEL_14;
v29 = (_QWORD *)v36[v21];
v30 = &off_4D000;
if ( (v38 & 0x4000000000000000LL) == 0 )
{
v30 = &off_4D000;
if ( byte_4D490[v21] != 8 )
goto LABEL_14;
v29 = (_QWORD *)*v29;
}
if ( *((unsigned __int8 *)v30 + v13 + 1168) > 8u )
goto LABEL_14;
*v12 = 1;
*(_QWORD *)&src[8 * v13] = v29;
LABEL_30:
++v13;
v11 += 16LL;
++v12;
if ( v13 != 98 )
continue;
if ( !*(_BYTE *)(v34 + 1651) )
{
LABEL_22:
result = *((_QWORD *)src + 104) & 0x7FFFFFFFFFFFFFFFLL;
*((_QWORD *)src + 104) = result;
return result;
}
LABEL_32:
result = *((_QWORD *)src + 104) | 0x8000000000000000LL;
*((_QWORD *)src + 104) = result;
return result;
case 3:
v14 = *(char **)v11;
v15 = 0LL;
v16 = 0;
do
{
v17 = *v14++;
v18 = (unsigned __int64)(v17 & 0x7F) << v16;
v16 += 7;
v15 |= v18;
}
while ( (v17 & 0x80) != 0 );
v19 = sub_2D3D8(v14, (unsigned __int64)&v14[v15], v36, v10);
if ( (*((_QWORD *)src + 104) & 0x4000000000000000LL) != 0 )
*v12 = 0;
goto LABEL_19;
case 4:
v22 = v10 + *(_QWORD *)v11;
if ( (unsigned __int8)byte_4D490[v13] > 8u )
goto LABEL_14;
*v12 = 1;
*(_QWORD *)&src[8 * v13] = v22;
goto LABEL_30;
case 5:
v23 = *(char **)v11;
v24 = 0LL;
v25 = 0;
do
{
v26 = *v23++;
v27 = (unsigned __int64)(v26 & 0x7F) << v25;
v25 += 7;
v24 |= v27;
}
while ( (v26 & 0x80) != 0 );
v28 = sub_2D3D8(v23, (unsigned __int64)&v23[v24], v36, v10);
if ( (unsigned __int8)byte_4D490[v13] > 8u )
goto LABEL_14;
*v12 = 1;
*(_QWORD *)&src[8 * v13] = v28;
goto LABEL_20;
default:
goto LABEL_30;
}
}
}
// 4D000: using guessed type void *off_4D000;
// 4D4AF: using guessed type char byte_4D4AF;
//----- (000000000002DEE0) ----------------------------------------------------
__int64 __fastcall sub_2DEE0(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v3; // x30
__int64 v7; // x0
__int64 result; // x0
__int64 v9; // [xsp+48h] [xbp+48h] BYREF
_QWORD v10[200]; // [xsp+50h] [xbp+50h] BYREF
int v11; // [xsp+690h] [xbp+690h]
memset((void *)a1, 0, 0x3C0uLL);
*(_QWORD *)(a1 + 832) = 0x4000000000000000LL;
*(_QWORD *)(a1 + 792) = v3;
if ( (unsigned int)sub_2CEC8((_QWORD *)a1, v10) )
goto LABEL_5;
if ( !pthread_once(dword_4D050, (void (*)(void))sub_2D2C0) )
{
if ( byte_4D4AF == 8 )
goto LABEL_7;
LABEL_5:
abort();
}
if ( byte_4D490[0] )
{
if ( byte_4D4AF != 8 )
goto LABEL_5;
}
else
{
memset(byte_4D490, 8, 32);
memset(&byte_4D4D0, 8, 33);
}
LABEL_7:
v7 = *(_QWORD *)(a1 + 832);
v9 = a2;
if ( (v7 & 0x4000000000000000LL) != 0 )
*(_BYTE *)(a1 + 887) = 0;
*(_QWORD *)(a1 + 248) = &v9;
v10[198] = 31LL;
v11 = 1;
v10[197] = 0LL;
result = sub_2DB40((char *)a1, (__int64)v10);
*(_QWORD *)(a1 + 792) = a3;
return result;
}
// 2DF28: variable 'v3' is possibly undefined
// 0: using guessed type int dword_0;
// 10: using guessed type __int16 word_10;
// 12: using guessed type __int16;
// 14: using guessed type int dword_14;
// 18: using guessed type __int64 (__fastcall *)();
// 40: using guessed type int;
// 44: using guessed type int;
// 48: using guessed type __int64;
// 50: using guessed type __int64;
// 58: using guessed type __int64;
// 4D050: using guessed type pthread_once_t dword_4D050[4];
// 4D4AF: using guessed type char byte_4D4AF;
// 4D4D0: using guessed type char byte_4D4D0;
//----- (000000000002E0F8) ----------------------------------------------------
_QWORD *__fastcall sub_2E0F8(__int64 a1, __int64 a2)
{
_QWORD *result; // x0
__int64 v5; // x2
int v6; // w1
sub_2DB40((char *)a1, a2);
result = *(_QWORD **)(a2 + 1640);
if ( *(_DWORD *)(a2 + 16LL * (_QWORD)result + 8) != 6 )
{
if ( (int)result > 97 )
goto LABEL_6;
v5 = (int)result;
result = *(_QWORD **)(a1 + 8LL * (int)result);
v6 = (unsigned __int8)byte_4D490[v5];
if ( (*(_QWORD *)(a1 + 832) & 0x4000000000000000LL) != 0 )
{
if ( *(_BYTE *)(a1 + v5 + 856) )
{
LABEL_9:
*(_QWORD *)(a1 + 792) = result;
return result;
}
if ( v6 != 8 )
goto LABEL_6;
}
else if ( v6 != 8 )
{
LABEL_6:
abort();
}
result = (_QWORD *)*result;
goto LABEL_9;
}
*(_QWORD *)(a1 + 792) = 0LL;
return result;
}
//----- (000000000002E190) ----------------------------------------------------
__int64 __fastcall sub_2E190(_QWORD *a1, _QWORD *a2)
{
int v4; // w0
int v5; // w20
__int64 result; // x0
_QWORD v7[202]; // [xsp+40h] [xbp+40h] BYREF
__int64 (__fastcall *v8)(__int64, _QWORD, _QWORD, _QWORD *, _QWORD *); // [xsp+690h] [xbp+690h]
while ( 1 )
{
v4 = sub_2CEC8(a2, v7);
v5 = a1[3] == a2[98] - (a2[104] >> 63) ? 4 : 0;
if ( v4 )
break;
if ( v8 )
{
result = v8(1LL, v5 | 2u, *a1, a1, a2);
if ( (_DWORD)result == 7 )
return result;
if ( (_DWORD)result != 8 )
break;
}
if ( v5 )
abort();
sub_2E0F8((__int64)a2, (__int64)v7);
}
return 2LL;
}
//----- (000000000002E248) ----------------------------------------------------
__int64 __fastcall sub_2E248(_QWORD *a1, _QWORD *a2)
{
__int64 v4; // x23
unsigned int (*v5)(void); // x24
unsigned int v6; // w0
unsigned int v7; // w19
unsigned int v8; // w0
bool v9; // zf
_QWORD v11[202]; // [xsp+40h] [xbp+40h] BYREF
__int64 (__fastcall *v12)(__int64, __int64, _QWORD, _QWORD *, _QWORD *); // [xsp+690h] [xbp+690h]
v5 = (unsigned int (*)(void))a1[2];
v4 = a1[3];
while ( 1 )
{
v8 = sub_2CEC8(a2, v11);
if ( v8 )
v9 = v8 == 5;
else
v9 = 1;
v7 = v8;
if ( !v9 )
return 2LL;
if ( v8 == 5 )
break;
if ( v5() )
return 2LL;
if ( v12 )
{
v6 = v12(1LL, 10LL, *a1, a1, a2);
v7 = v6;
if ( v6 == 7 )
return v7;
if ( v6 != 8 )
return 2LL;
}
sub_2E0F8((__int64)a2, (__int64)v11);
}
if ( ((unsigned int (__fastcall *)(__int64, __int64, _QWORD, _QWORD *, _QWORD *, __int64))v5)(
1LL,
26LL,
*a1,
a1,
a2,
v4) )
{
return 2LL;
}
return v7;
}
//----- (000000000002E358) ----------------------------------------------------
__int64 __fastcall sub_2E358(__int64 a1, __int64 a2)
{
__int64 v3; // x0
__int64 i; // x19
_QWORD *v6; // x0
_QWORD *v7; // x1
__int64 result; // x0
__int64 v9; // x1
__int64 v10; // x1
__int64 v11; // [xsp+38h] [xbp+38h] BYREF
v3 = *(_QWORD *)(a2 + 832);
if ( ((v3 & 0x4000000000000000LL) == 0 || !*(_BYTE *)(a2 + 887)) && !*(_QWORD *)(a2 + 248) )
{
v9 = *(_QWORD *)(a2 + 784);
if ( byte_4D4AF != 8 )
goto LABEL_7;
v11 = v9;
if ( (v3 & 0x4000000000000000LL) != 0 )
*(_BYTE *)(a2 + 887) = 0;
*(_QWORD *)(a2 + 248) = &v11;
}
for ( i = 0LL; i != 97; ++i )
{
v6 = *(_QWORD **)(a1 + 8 * i);
v7 = *(_QWORD **)(a2 + 8 * i);
if ( *(_BYTE *)(a1 + i + 856) )
goto LABEL_7;
if ( v6 != 0LL && *(_BYTE *)(a2 + i + 856) != 0 )
{
if ( byte_4D490[i] != 8 )
goto LABEL_7;
*v6 = v7;
}
else if ( v6 != v7 && v6 != 0LL && v7 != 0LL )
{
memcpy(v6, v7, (unsigned __int8)byte_4D490[i]);
}
}
if ( (*(_QWORD *)(a1 + 832) & 0x4000000000000000LL) != 0 && *(_BYTE *)(a1 + 887) )
return 0LL;
result = 0LL;
if ( !*(_QWORD *)(a1 + 248) )
{
if ( (*(_QWORD *)(a2 + 832) & 0x4000000000000000LL) == 0 )
{
if ( byte_4D4AF != 8 )
abort();
goto LABEL_25;
}
if ( *(_BYTE *)(a2 + 887) )
{
v10 = *(_QWORD *)(a2 + 248);
return v10 - *(_QWORD *)(a1 + 784) + *(_QWORD *)(a2 + 848);
}
if ( byte_4D4AF == 8 )
{
LABEL_25:
v10 = **(_QWORD **)(a2 + 248);
return v10 - *(_QWORD *)(a1 + 784) + *(_QWORD *)(a2 + 848);
}
LABEL_7:
abort();
}
return result;
}
// 4D4AF: using guessed type char byte_4D4AF;
//----- (000000000002E4E0) ----------------------------------------------------
__int64 __fastcall sub_2E4E0(__int64 a1, int a2)
{
__int64 v2; // x3
__int64 v3; // x1
int v4; // w2
if ( a2 > 97 )
goto LABEL_5;
v2 = a2;
v3 = *(_QWORD *)(a1 + 8LL * a2);
v4 = (unsigned __int8)byte_4D490[v2];
if ( (*(_QWORD *)(a1 + 832) & 0x4000000000000000LL) == 0 )
{
if ( v4 == 8 )
return *(_QWORD *)v3;
LABEL_5:
abort();
}
if ( !*(_BYTE *)(a1 + v2 + 856) )
{
if ( v4 != 8 )
goto LABEL_5;
return *(_QWORD *)v3;
}
return v3;
}
//----- (000000000002E550) ----------------------------------------------------
__int64 __fastcall sub_2E550(__int64 a1)
{
return *(_QWORD *)(a1 + 784);
}
//----- (000000000002E558) ----------------------------------------------------
_QWORD *__fastcall sub_2E558(_QWORD *result, int a2, __int64 a3)
{
int v3; // w3
if ( a2 > 97 )
goto LABEL_5;
v3 = (unsigned __int8)byte_4D490[a2];
if ( (result[104] & 0x4000000000000000LL) == 0 )
{
result = (_QWORD *)result[a2];
if ( v3 == 8 )
{
LABEL_7:
*result = a3;
return result;
}
LABEL_5:
abort();
}
if ( !*((_BYTE *)result + a2 + 856) )
{
result = (_QWORD *)result[a2];
if ( v3 != 8 )
goto LABEL_5;
goto LABEL_7;
}
result[a2] = a3;
return result;
}
//----- (000000000002E5C8) ----------------------------------------------------
__int64 __fastcall sub_2E5C8(__int64 a1)
{
return *(_QWORD *)(a1 + 792);
}
//----- (000000000002E5D0) ----------------------------------------------------
__int64 __fastcall sub_2E5D0(__int64 a1, _DWORD *a2)
{
unsigned __int64 v2; // x2
__int64 result; // x0
v2 = *(_QWORD *)(a1 + 832);
result = *(_QWORD *)(a1 + 792);
*a2 = v2 >> 63;
return result;
}
//----- (000000000002E5E8) ----------------------------------------------------
__int64 __fastcall sub_2E5E8(__int64 result, __int64 a2)
{
*(_QWORD *)(result + 792) = a2;
return result;
}
//----- (000000000002E5F0) ----------------------------------------------------
__int64 __fastcall sub_2E5F0(__int64 a1)
{
return *(_QWORD *)(a1 + 800);
}
//----- (000000000002E5F8) ----------------------------------------------------
__int64 __fastcall sub_2E5F8(__int64 a1)
{
return *(_QWORD *)(a1 + 824);
}
//----- (000000000002E600) ----------------------------------------------------
__int64 __fastcall sub_2E600(__int64 a1)
{
_QWORD v2[3]; // [xsp+18h] [xbp+18h] BYREF
if ( sub_30580(a1 - 1, v2) )
return v2[2];
else
return 0LL;
}
//----- (000000000002E630) ----------------------------------------------------
__int64 __fastcall sub_2E630(__int64 a1)
{
return *(_QWORD *)(a1 + 816);
}
//----- (000000000002E638) ----------------------------------------------------
__int64 __fastcall sub_2E638(__int64 a1)
{
return *(_QWORD *)(a1 + 808);
}
//----- (000000000002E640) ----------------------------------------------------
__int64 __fastcall sub_2E640(__int64 a1, __int64 a2)
{
__int64 v3; // x22
__int64 *v4; // x1
_BYTE *v5; // x3
_QWORD *v6; // x4
int v7; // w2
__int64 v8; // x2
__int64 v9; // x1
__int64 v10; // x4
__int16 v11; // w3
__int16 v12; // w2
__int64 result; // x0
_QWORD v14[120]; // [xsp+30h] [xbp+30h] BYREF
_QWORD v15[196]; // [xsp+3F0h] [xbp+3F0h] BYREF
_QWORD v16[2]; // [xsp+A10h] [xbp+A10h] BYREF
__int64 v17; // [xsp+A20h] [xbp+A20h]
int v18; // [xsp+A30h] [xbp+A30h]
__int64 v19; // [xsp+A58h] [xbp+A58h]
__int64 v20; // [xsp+A68h] [xbp+A68h]
v3 = a1 + 1;
memset(v14, 0, sizeof(v14));
v14[99] = v3;
v14[104] = 0x4000000000000000LL;
if ( (unsigned int)sub_2CEC8(v14, v15) || v18 == 2 )
return 0LL;
v4 = v15;
v5 = (_BYTE *)(a2 + 820);
v6 = (_QWORD *)(a2 + 32);
do
{
while ( 1 )
{
v7 = *((unsigned __int8 *)v4 + 8);
*v5 = v7;
if ( v7 == 1 || v7 == 2 )
break;
v4 += 2;
*v6 = 0LL;
++v5;
++v6;
if ( v4 == v16 )
goto LABEL_8;
}
v8 = *v4;
v4 += 2;
*v6 = v8;
++v5;
++v6;
}
while ( v4 != v16 );
LABEL_8:
v9 = v14[106];
v10 = v16[1];
v11 = v17;
v12 = v19;
*(_QWORD *)(a2 + 8) = v20;
*(_QWORD *)(a2 + 16) = v10;
*(_WORD *)(a2 + 816) = v11;
result = a2;
*(_WORD *)(a2 + 818) = v12;
*(_QWORD *)(a2 + 24) = v9;
return result;
}
//----- (000000000002E760) ----------------------------------------------------
_QWORD *__fastcall sub_2E760(
_QWORD *a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
__int64 a8,
__int64 a9)
{
__int64 v9; // x30
int v11; // w0
int v12; // w2
__int64 v14; // x3
_BYTE v16[960]; // [xsp+C0h] [xbp+C0h] BYREF
_QWORD v17[98]; // [xsp+480h] [xbp+480h] BYREF
__int64 v18; // [xsp+790h] [xbp+790h]
__int64 v19; // [xsp+798h] [xbp+798h]
unsigned __int64 v20; // [xsp+7C0h] [xbp+7C0h]
_QWORD v21[202]; // [xsp+840h] [xbp+840h] BYREF
__int64 (*v22)(void); // [xsp+E90h] [xbp+E90h]
sub_2DEE0((__int64)v16, (__int64)&a9, v9);
memcpy(v17, v16, 0x3C0uLL);
while ( 1 )
{
v12 = sub_2CEC8(v17, v21);
if ( v12 == 5 || v12 )
break;
if ( v22 )
{
v11 = v22();
if ( v11 == 6 )
{
v14 = v18 - (v20 >> 63);
a1[2] = 0LL;
a1[3] = v14;
memcpy(v17, v16, 0x3C0uLL);
if ( (unsigned int)sub_2E190(a1, v17) == 7 )
{
sub_2E358((__int64)v16, (__int64)v17);
nullsub_1(v18, v19);
}
return a1;
}
if ( v11 != 8 )
return a1;
}
sub_2E0F8((__int64)v17, (__int64)v21);
}
return a1;
}
// 2E7B0: variable 'v9' is possibly undefined
// 2E758: using guessed type __int64 __fastcall nullsub_1(_QWORD, _QWORD);
//----- (000000000002E8D8) ----------------------------------------------------
_QWORD *__fastcall sub_2E8D8(
_QWORD *a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
__int64 a8,
__int64 a9)
{
__int64 v9; // x30
_BYTE v15[960]; // [xsp+C0h] [xbp+C0h] BYREF
_QWORD v16[120]; // [xsp+480h] [xbp+480h] BYREF
sub_2DEE0((__int64)v15, (__int64)&a9, v9);
memcpy(v16, v15, sizeof(v16));
a1[2] = a2;
a1[3] = a3;
if ( (unsigned int)sub_2E248(a1, v16) == 7 )
{
sub_2E358((__int64)v15, (__int64)v16);
nullsub_1(v16[98], v16[99]);
}
return a1;
}
// 2E930: variable 'v9' is possibly undefined
// 2E758: using guessed type __int64 __fastcall nullsub_1(_QWORD, _QWORD);
//----- (000000000002E9C8) ----------------------------------------------------
_QWORD *__fastcall sub_2E9C8(
_QWORD *a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
__int64 a8,
__int64 a9)
{
__int64 v9; // x30
int v11; // w0
_BYTE v14[960]; // [xsp+C0h] [xbp+C0h] BYREF
_QWORD v15[120]; // [xsp+480h] [xbp+480h] BYREF
sub_2DEE0((__int64)v14, (__int64)&a9, v9);
memcpy(v15, v14, sizeof(v15));
if ( a1[2] )
v11 = sub_2E248(a1, v15);
else
v11 = sub_2E190(a1, v15);
if ( v11 != 7 )
abort();
sub_2E358((__int64)v14, (__int64)v15);
nullsub_1(v15[98], v15[99]);
return a1;
}
// 2EA18: variable 'v9' is possibly undefined
// 2E758: using guessed type __int64 __fastcall nullsub_1(_QWORD, _QWORD);
//----- (000000000002EAB8) ----------------------------------------------------
_QWORD *__fastcall sub_2EAB8(
_QWORD *a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
__int64 a8,
__int64 a9)
{
__int64 v9; // x30
__int64 v12; // [xsp+0h] [xbp+0h]
_BYTE v14[960]; // [xsp+C0h] [xbp+C0h] BYREF
_QWORD v15[120]; // [xsp+480h] [xbp+480h] BYREF
if ( a1[2] )
{
sub_2DEE0((__int64)v14, (__int64)&a9, v9);
memcpy(v15, v14, sizeof(v15));
if ( (unsigned int)sub_2E248(a1, v15) != 7 )
abort();
sub_2E358((__int64)v14, (__int64)v15);
nullsub_1(v15[98], v15[99]);
}
else
{
sub_2E760(a1, 0LL, a3, a4, a5, a6, a7, a8, v12);
}
return a1;
}
// 2EAFC: variable 'v12' is possibly undefined
// 2EB54: variable 'v9' is possibly undefined
// 2E758: using guessed type __int64 __fastcall nullsub_1(_QWORD, _QWORD);
//----- (000000000002EBA8) ----------------------------------------------------
__int64 __fastcall sub_2EBA8(__int64 result)
{
__int64 (__fastcall *v1)(__int64, __int64); // x2
v1 = *(__int64 (__fastcall **)(__int64, __int64))(result + 8);
if ( v1 )
return v1(1LL, result);
return result;
}
//----- (000000000002EBC8) ----------------------------------------------------
__int64 __fastcall sub_2EBC8(
unsigned int (__fastcall *a1)(_QWORD *, __int64),
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
__int64 a8,
__int64 a9)
{
__int64 v9; // x30
int v12; // w0
bool v13; // zf
int v14; // w19
_QWORD v16[120]; // [xsp+A0h] [xbp+A0h] BYREF
_QWORD v17[208]; // [xsp+460h] [xbp+460h] BYREF
sub_2DEE0((__int64)v16, (__int64)&a9, v9);
while ( 1 )
{
v12 = sub_2CEC8(v16, v17);
if ( v12 )
v13 = v12 == 5;
else
v13 = 1;
v14 = v12;
if ( !v13 || a1(v16, a2) )
return 3LL;
if ( v14 == 5 )
break;
sub_2E0F8((__int64)v16, (__int64)v17);
}
return 5LL;
}
// 2EC14: variable 'v9' is possibly undefined
//----- (000000000002ECA0) ----------------------------------------------------
__int64 __fastcall sub_2ECA0(__int64 a1, __int64 a2, __int64 a3)
{
unsigned __int64 v3; // x3
unsigned __int64 v4; // x1
__int64 result; // x0
v3 = *(_QWORD *)(a2 + 8);
v4 = *(_QWORD *)(a3 + 8);
if ( v3 >= v4 )
LODWORD(result) = 0;
else
LODWORD(result) = -1;
if ( v3 > v4 )
return 1LL;
else
return (unsigned int)result;
}
//----- (000000000002ECC0) ----------------------------------------------------
__int64 __fastcall sub_2ECC0(
__int64 result,
__int64 (__fastcall *a2)(__int64, _QWORD, __int64),
__int64 a3,
int a4,
int a5)
{
int v5; // w19
int v6; // w26
__int64 v8; // x25
int v11; // w21
int v12; // w19
__int64 *v13; // x20
__int64 v14; // x20
__int64 *v15; // x27
int v16; // w0
v5 = 2 * a4 + 1;
if ( v5 < a5 )
{
v6 = a4;
v8 = result;
do
{
v11 = v5 + 1;
v13 = (__int64 *)(a3 + 8LL * v5);
if ( a5 <= v5 + 1 )
{
v11 = v5;
v12 = 2 * v5;
result = a2(v8, *(_QWORD *)(a3 + 8LL * v6), *v13);
if ( (result & 0x80000000) == 0 )
return result;
}
else
{
v14 = 8LL * v5;
v15 = (__int64 *)(a3 + v14 + 8);
v13 = (__int64 *)(a3 + v14);
v16 = a2(v8, *(_QWORD *)(a3 + 8LL * v5), *v15);
if ( v16 < 0 )
v13 = v15;
if ( v16 >= 0 )
v11 = v5;
v12 = 2 * v11;
result = a2(v8, *(_QWORD *)(a3 + 8LL * v6), *v13);
if ( (result & 0x80000000) == 0 )
return result;
}
v5 = v12 + 1;
result = *(_QWORD *)(a3 + 8LL * v6);
*(_QWORD *)(a3 + 8LL * v6) = *v13;
v6 = v11;
*v13 = result;
}
while ( a5 > v5 );
}
return result;
}
//----- (000000000002EDB8) ----------------------------------------------------
__int64 __fastcall sub_2EDB8(__int64 result, __int64 (__fastcall *a2)(__int64, _QWORD, __int64), __int64 a3)
{
unsigned __int64 v3; // x19
int v4; // w20
__int64 v6; // x23
__int64 v8; // x22
int v9; // w3
int v10; // w19
_QWORD *v11; // x20
__int64 v12; // x0
v3 = *(_QWORD *)(a3 + 8);
v4 = (v3 >> 1) - 1;
v6 = result;
v8 = a3 + 16;
if ( v4 >= 0 )
{
do
{
v9 = v4--;
result = sub_2ECC0(v6, a2, v8, v9, v3);
}
while ( v4 != -1 );
}
v10 = v3 - 1;
v11 = (_QWORD *)(v8 + 8LL * v10);
if ( v10 > 0 )
{
do
{
v12 = *(_QWORD *)(a3 + 16);
*(_QWORD *)(a3 + 16) = *v11;
*v11-- = v12;
result = sub_2ECC0(v6, a2, v8, 0, v10--);
}
while ( v10 );
}
return result;
}
//----- (000000000002EE70) ----------------------------------------------------
__int64 __fastcall sub_2EE70(unsigned __int8 a1)
{
int v1; // w0
__int64 result; // x0
if ( a1 == 255 )
return 0LL;
v1 = a1 & 7;
switch ( v1 )
{
case 0:
case 4:
result = 8LL;
break;
case 2:
result = 2LL;
break;
case 3:
result = 4LL;
break;
default:
abort();
}
return result;
}
//----- (000000000002EEF0) ----------------------------------------------------
char *__fastcall sub_2EEF0(char a1, char *a2, char *a3, unsigned __int64 *a4)
{
char *result; // x0
unsigned __int64 v6; // x4
unsigned int v7; // w7
char v8; // w8
char v9; // t1
unsigned __int64 v10; // x6
int v11; // w7
char v12; // t1
unsigned __int64 v13; // x6
_QWORD *v14; // x0
unsigned __int64 v15; // t1
if ( a1 == 80 )
{
v14 = (_QWORD *)((unsigned __int64)(a3 + 7) & 0xFFFFFFFFFFFFFFF8LL);
v15 = *v14;
result = (char *)(v14 + 1);
*a4 = v15;
}
else
{
switch ( a1 & 0xF )
{
case 0:
case 4:
case 0xC:
result = a3 + 8;
v6 = *(_QWORD *)a3;
goto LABEL_6;
case 1:
result = a3;
v6 = 0LL;
v11 = 0;
do
{
v12 = *result++;
v13 = (unsigned __int64)(v12 & 0x7F) << v11;
v11 += 7;
v6 |= v13;
}
while ( (v12 & 0x80) != 0 );
goto LABEL_6;
case 2:
result = a3 + 2;
v6 = *(unsigned __int16 *)a3;
goto LABEL_6;
case 3:
result = a3 + 4;
v6 = *(unsigned int *)a3;
goto LABEL_6;
case 9:
result = a3;
v6 = 0LL;
v7 = 0;
do
{
v9 = *result++;
v8 = v9;
v10 = (unsigned __int64)(v9 & 0x7F) << v7;
v7 += 7;
v6 |= v10;
}
while ( (v9 & 0x80) != 0 );
if ( v7 > 0x3F || (v8 & 0x40) == 0 )
goto LABEL_6;
v6 |= -1LL << v7;
goto LABEL_7;
case 0xA:
result = a3 + 2;
v6 = *(__int16 *)a3;
goto LABEL_6;
case 0xB:
result = a3 + 4;
v6 = *(int *)a3;
LABEL_6:
if ( v6 )
{
LABEL_7:
if ( (a1 & 0x70) != 16 )
a3 = a2;
v6 += (unsigned __int64)a3;
if ( (a1 & 0x80) != 0 )
v6 = *(_QWORD *)v6;
}
*a4 = v6;
break;
default:
abort();
}
}
return result;
}
//----- (000000000002F020) ----------------------------------------------------
__int64 __fastcall sub_2F020(__int64 a1)
{
__int64 v1; // x19
size_t v3; // x0
unsigned int v4; // w1
char *v5; // x2
__int64 result; // x0
int v7; // t1
int v8; // t1
int v9; // t1
__int64 v10; // x19
int v11; // t1
int v12; // w0
int v13; // t1
int v14; // t1
int v15; // w3
unsigned __int64 v16; // [xsp+28h] [xbp+28h] BYREF
v1 = a1 + 9;
v3 = strlen((const char *)(a1 + 9)) + 1;
v4 = *(unsigned __int8 *)(a1 + 8);
v5 = (char *)(v1 + v3);
if ( v4 > 3 )
{
v15 = *(unsigned __int8 *)(v1 + v3);
result = 255LL;
if ( v15 != 8 || v5[1] )
return result;
v5 += 2;
}
if ( *(_BYTE *)(a1 + 9) != 122 )
return 0LL;
do
v7 = *v5++;
while ( (v7 & 0x80000000) != 0 );
do
v8 = *v5++;
while ( (v8 & 0x80000000) != 0 );
if ( v4 == 1 )
{
++v5;
}
else
{
do
v9 = *v5++;
while ( (v9 & 0x80000000) != 0 );
}
v10 = a1 + 10;
do
v11 = *v5++;
while ( (v11 & 0x80000000) != 0 );
v12 = *(unsigned __int8 *)(a1 + 10);
if ( v12 != 82 )
{
do
{
while ( v12 == 80 )
{
v5 = sub_2EEF0(*v5 & 0x7F, 0LL, v5 + 1, &v16);
v14 = *(unsigned __int8 *)++v10;
v12 = v14;
if ( v14 == 82 )
return (unsigned __int8)*v5;
}
++v5;
if ( v12 != 76 )
return 0LL;
v13 = *(unsigned __int8 *)++v10;
v12 = v13;
}
while ( v13 != 82 );
}
return (unsigned __int8)*v5;
}
//----- (000000000002F130) ----------------------------------------------------
__int64 __fastcall sub_2F130(unsigned __int8 a1, __int64 a2, __int64 a3)
{
unsigned int v3; // w0
if ( a1 == 255 )
return 0LL;
v3 = a1 & 0x70;
if ( v3 != 32 )
{
if ( v3 > 0x20 )
{
if ( v3 == 48 )
return *(_QWORD *)a3;
if ( v3 == 80 )
return 0LL;
LABEL_8:
abort();
}
if ( v3 && v3 != 16 )
goto LABEL_8;
return 0LL;
}
return *(_QWORD *)a2;
}
//----- (000000000002F1A0) ----------------------------------------------------
__int64 __fastcall sub_2F1A0(__int64 a1, __int64 a2, __int64 a3)
{
char v4; // w20
char *v7; // x21
__int64 result; // x0
unsigned __int64 v9; // [xsp+40h] [xbp+40h] BYREF
unsigned __int64 v10; // [xsp+48h] [xbp+48h] BYREF
v4 = (unsigned __int64)*(unsigned __int16 *)(a1 + 32) >> 3;
v7 = (char *)sub_2F130(v4, a1 + 8, a1 + 16);
sub_2EEF0(v4, v7, (char *)(a2 + 8), &v9);
sub_2EEF0((unsigned __int64)*(unsigned __int16 *)(a1 + 32) >> 3, v7, (char *)(a3 + 8), &v10);
if ( v9 >= v10 )
LODWORD(result) = 0;
else
LODWORD(result) = -1;
if ( v9 > v10 )
return 1LL;
else
return (unsigned int)result;
}
//----- (000000000002F230) ----------------------------------------------------
unsigned int *__fastcall sub_2F230(__int64 a1, unsigned int *a2, __int64 a3)
{
int v3; // w28
__int64 v4; // x23
__int64 v5; // x24
char *v9; // x27
__int64 v10; // x21
signed int v11; // w0
__int64 v12; // x0
unsigned __int64 v13; // x0
unsigned __int64 v14; // x1
char *v16; // x0
unsigned int v17; // w0
__int64 v18; // x1
unsigned __int64 v19; // [xsp+70h] [xbp+70h] BYREF
unsigned __int64 v20; // [xsp+78h] [xbp+78h] BYREF
LOBYTE(v3) = (unsigned __int64)*(unsigned __int16 *)(a1 + 32) >> 3;
v4 = a1 + 8;
v5 = a1 + 16;
v9 = (char *)sub_2F130(v3, a1 + 8, a1 + 16);
if ( !*a2 )
return 0LL;
v10 = 0LL;
v3 = (unsigned __int8)v3;
while ( 1 )
{
v11 = a2[1];
if ( !v11 )
goto LABEL_10;
if ( (*(_BYTE *)(a1 + 32) & 4) != 0 )
{
v12 = (__int64)a2 - v11 + 4;
if ( v12 != v10 )
{
v10 = v12;
v3 = sub_2F020(v12);
v9 = (char *)sub_2F130(v3, v4, v5);
}
}
if ( v3 )
break;
v13 = *((_QWORD *)a2 + 1);
v14 = *((_QWORD *)a2 + 2);
v19 = v13;
v20 = v14;
if ( v13 && a3 - v13 < v14 )
return a2;
LABEL_10:
a2 = (unsigned int *)((char *)a2 + *a2 + 4);
if ( !*a2 )
return 0LL;
}
v16 = sub_2EEF0(v3, v9, (char *)a2 + 8, &v19);
sub_2EEF0(v3 & 0xF, 0LL, v16, &v20);
v17 = sub_2EE70(v3);
v18 = -1LL;
if ( v17 <= 7 )
v18 = (1LL << (8 * (unsigned __int8)v17)) - 1;
if ( (v18 & v19) == 0 || a3 - v19 >= v20 )
goto LABEL_10;
return a2;
}
//----- (000000000002F3B8) ----------------------------------------------------
__int64 __fastcall sub_2F3B8(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v3; // x21
__int64 v4; // x22
__int64 v5; // x19
char v7; // w23
char *v8; // x0
char *v9; // x0
__int64 result; // x0
unsigned __int64 v11; // [xsp+40h] [xbp+40h] BYREF
unsigned __int64 v12; // [xsp+48h] [xbp+48h] BYREF
v3 = a2;
v4 = a1 + 8;
v5 = a1 + 16;
v7 = sub_2F020(a2 + 4 - *(int *)(a2 + 4));
v8 = (char *)sub_2F130(v7, v4, v5);
sub_2EEF0(v7, v8, (char *)(v3 + 8), &v11);
LOBYTE(v3) = sub_2F020(a3 + 4 - *(int *)(a3 + 4));
v9 = (char *)sub_2F130(v3, v4, v5);
sub_2EEF0(v3, v9, (char *)(a3 + 8), &v12);
if ( v11 >= v12 )
LODWORD(result) = 0;
else
LODWORD(result) = -1;
if ( v11 > v12 )
return 1LL;
else
return (unsigned int)result;
}
//----- (000000000002F478) ----------------------------------------------------
__int64 __fastcall sub_2F478(__int64 a1, char *a2)
{
char *v3; // x19
char *v4; // x22
int v5; // w20
__int64 v6; // x23
__int64 v7; // x2
signed int v8; // w0
unsigned __int8 v9; // w27
__int64 v10; // x28
int v11; // w0
unsigned __int64 v12; // x0
unsigned int v13; // w0
__int64 v14; // x3
unsigned __int64 v16; // [xsp+68h] [xbp+68h] BYREF
if ( *(_DWORD *)a2 )
{
v3 = a2;
v4 = 0LL;
LOBYTE(v5) = 0;
v6 = 0LL;
v7 = 0LL;
while ( 1 )
{
v8 = *((_DWORD *)v3 + 1);
if ( v8 )
{
v9 = v5;
v10 = (__int64)&v3[-v8 + 4];
if ( v10 != v7 )
{
v11 = sub_2F020((__int64)&v3[-v8 + 4]);
v5 = v11;
if ( v11 == 255 )
return -1LL;
v9 = v11;
v4 = (char *)sub_2F130(v11, a1 + 8, a1 + 16);
v12 = *(unsigned __int16 *)(a1 + 32);
if ( (v12 & 0x7F8) == 2040 )
{
*(_WORD *)(a1 + 32) = v12 & 0xF807 | (8 * v9);
}
else if ( v5 != (unsigned __int8)(v12 >> 3) )
{
*(_BYTE *)(a1 + 32) |= 4u;
}
}
sub_2EEF0(v9, v4, v3 + 8, &v16);
v13 = sub_2EE70(v9);
v14 = -1LL;
if ( v13 <= 7 )
v14 = (1LL << (8 * (unsigned __int8)v13)) - 1;
v7 = v10;
if ( (v14 & v16) != 0 )
{
++v6;
if ( *(_QWORD *)a1 > v16 )
*(_QWORD *)a1 = v16;
v7 = v10;
}
}
v3 += *(unsigned int *)v3 + 4;
if ( !*(_DWORD *)v3 )
return v6;
}
}
return 0LL;
}
//----- (000000000002F600) ----------------------------------------------------
__int64 __fastcall sub_2F600(__int64 a1, __int64 *a2, char *a3)
{
int v3; // w26
__int64 v4; // x21
__int64 v5; // x22
char *v9; // x25
__int64 result; // x0
__int64 v11; // x20
signed int v12; // w0
__int64 v13; // x0
__int64 v14; // x0
__int64 v15; // x1
unsigned int v16; // w0
__int64 v17; // x1
unsigned __int64 v18; // [xsp+68h] [xbp+68h] BYREF
LOBYTE(v3) = (unsigned __int64)*(unsigned __int16 *)(a1 + 32) >> 3;
v4 = a1 + 8;
v5 = a1 + 16;
v9 = (char *)sub_2F130(v3, a1 + 8, a1 + 16);
result = *(unsigned int *)a3;
if ( (_DWORD)result )
{
v11 = 0LL;
v3 = (unsigned __int8)v3;
do
{
v12 = *((_DWORD *)a3 + 1);
if ( v12 )
{
if ( (*(_BYTE *)(a1 + 32) & 4) != 0 )
{
v13 = (__int64)&a3[-v12 + 4];
if ( v13 != v11 )
{
v11 = v13;
v3 = sub_2F020(v13);
v9 = (char *)sub_2F130(v3, v4, v5);
}
}
if ( v3 )
{
sub_2EEF0(v3, v9, a3 + 8, &v18);
v16 = sub_2EE70(v3);
v17 = -1LL;
if ( v16 <= 7 )
v17 = (1LL << (8 * (unsigned __int8)v16)) - 1;
if ( (v17 & v18) == 0 )
goto LABEL_11;
LABEL_9:
v14 = *a2;
if ( *a2 )
{
v15 = *(_QWORD *)(v14 + 8);
*(_QWORD *)(v14 + 8) = v15 + 1;
*(_QWORD *)(v14 + 8 * (v15 + 2)) = a3;
}
goto LABEL_11;
}
if ( *((_QWORD *)a3 + 1) )
goto LABEL_9;
}
LABEL_11:
a3 += *(unsigned int *)a3 + 4;
result = *(unsigned int *)a3;
}
while ( (_DWORD)result );
}
return result;
}
//----- (000000000002F748) ----------------------------------------------------
unsigned int *__fastcall sub_2F748(__int64 a1, unsigned __int64 a2)
{
char v3; // w1
unsigned __int64 v5; // x0
__int64 v6; // x6
unsigned __int64 v7; // x3
unsigned __int64 i; // x7
unsigned __int64 v9; // x2
unsigned int *result; // x0
unsigned __int64 v11; // x4
__int64 v12; // x5
__int64 v13; // x26
char **v14; // x20
char *v15; // x1
char *v16; // t1
__int64 v17; // x0
unsigned int **v18; // x20
unsigned int *v19; // x1
unsigned int *v20; // t1
unsigned __int64 v21; // x1
_QWORD *v22; // x0
char **v23; // x20
char *v24; // x2
char *v25; // t1
__int64 (__fastcall *v26)(__int64, __int64, __int64); // x20
__int64 v27; // x26
unsigned __int64 v28; // x28
__int64 v29; // x0
__int64 v30; // x27
unsigned __int64 v31; // x19
unsigned __int64 v32; // x24
__int64 v33; // x20
char v34; // w25
char *v35; // x0
char *v36; // x0
char v37; // w24
__int64 v38; // x0
__int64 v39; // x25
char *v40; // x26
unsigned __int64 v41; // x28
unsigned __int64 v42; // x27
unsigned __int64 v43; // x20
__int64 v44; // x19
char *v45; // x0
__int64 v46; // x24
char *v47; // x25
__int64 *v48; // x28
_QWORD *v49; // x27
__int64 *v50; // x22
char *v51; // x0
__int64 v52; // x4
__int64 v53; // x3
__int64 j; // x1
__int64 v55; // x0
__int64 v56; // x0
__int64 v57; // x2
__int64 v58; // x23
_QWORD *v59; // x25
__int64 v60; // x28
__int64 v61; // x26
__int64 v62; // x24
__int64 *v63; // x27
__int64 v64; // x22
_QWORD *v65; // x1
__int64 v66; // x0
_QWORD *v67; // x0
_QWORD *v68; // [xsp+60h] [xbp+60h]
_QWORD *v69; // [xsp+68h] [xbp+68h]
__int64 v70; // [xsp+70h] [xbp+70h]
__int64 v71; // [xsp+78h] [xbp+78h]
__int64 **ptr; // [xsp+80h] [xbp+80h]
_QWORD *ptra; // [xsp+80h] [xbp+80h]
__int64 v74; // [xsp+88h] [xbp+88h]
_QWORD *v75; // [xsp+88h] [xbp+88h]
_QWORD *v76; // [xsp+88h] [xbp+88h]
unsigned __int64 v77; // [xsp+98h] [xbp+98h] BYREF
_QWORD *v78; // [xsp+A0h] [xbp+A0h] BYREF
_QWORD *v79; // [xsp+A8h] [xbp+A8h]
v3 = *(_BYTE *)(a1 + 32);
if ( (v3 & 1) != 0 )
{
LABEL_2:
if ( (v3 & 4) != 0 )
{
v27 = *(_QWORD *)(a1 + 24);
v28 = *(_QWORD *)(v27 + 8);
if ( v28 )
{
v29 = a1 + 16;
v30 = a1 + 8;
v31 = 0LL;
v74 = v29;
do
{
v32 = (v31 + v28) >> 1;
v33 = *(_QWORD *)(v27 + 8 * (v32 + 2));
v34 = sub_2F020(v33 + 4 - *(int *)(v33 + 4));
v35 = (char *)sub_2F130(v34, v30, v74);
v36 = sub_2EEF0(v34, v35, (char *)(v33 + 8), &v77);
sub_2EEF0(v34 & 0xF, 0LL, v36, (unsigned __int64 *)&v78);
if ( v77 <= a2 )
{
if ( (unsigned __int64)v78 + v77 > a2 )
return (unsigned int *)v33;
v31 = v32 + 1;
}
else
{
v28 = (v31 + v28) >> 1;
}
}
while ( v31 < v28 );
}
}
else
{
v5 = *(unsigned __int16 *)(a1 + 32);
if ( (v5 & 0x7F8) != 0 )
{
v37 = v5 >> 3;
v38 = sub_2F130(v37, a1 + 8, a1 + 16);
v39 = *(_QWORD *)(a1 + 24);
v40 = (char *)v38;
v41 = *(_QWORD *)(v39 + 8);
if ( v41 )
{
v42 = 0LL;
while ( 1 )
{
v43 = (v42 + v41) >> 1;
v44 = *(_QWORD *)(v39 + 8 * (v43 + 2));
v45 = sub_2EEF0(v37, v40, (char *)(v44 + 8), &v77);
sub_2EEF0(v37 & 0xF, 0LL, v45, (unsigned __int64 *)&v78);
if ( a2 >= v77 )
{
if ( a2 < (unsigned __int64)v78 + v77 )
return (unsigned int *)v44;
v42 = v43 + 1;
}
else
{
v41 = (v42 + v41) >> 1;
}
if ( v42 >= v41 )
return 0LL;
}
}
}
else
{
v6 = *(_QWORD *)(a1 + 24);
v7 = 0LL;
for ( i = *(_QWORD *)(v6 + 8); v7 < i; i = v9 )
{
v9 = (v7 + i) >> 1;
result = *(unsigned int **)(v6 + 8 * (v9 + 2));
v11 = *((_QWORD *)result + 1);
v12 = *((_QWORD *)result + 2);
if ( a2 < v11 )
{
while ( v7 < v9 )
{
v21 = (v7 + v9) >> 1;
result = *(unsigned int **)(v6 + 8 * (v21 + 2));
v11 = *((_QWORD *)result + 1);
v12 = *((_QWORD *)result + 2);
if ( a2 >= v11 )
goto LABEL_27;
v9 = (v7 + v9) >> 1;
}
return 0LL;
}
v21 = (v7 + i) >> 1;
v9 = i;
LABEL_27:
if ( a2 < v11 + v12 )
return result;
v7 = v21 + 1;
}
}
}
return 0LL;
}
v13 = *(_DWORD *)(a1 + 32) >> 11;
if ( *(_DWORD *)(a1 + 32) >> 11 )
goto LABEL_32;
if ( (*(_BYTE *)(a1 + 32) & 2) != 0 )
{
v14 = *(char ***)(a1 + 24);
v15 = *v14;
if ( !*v14 )
goto LABEL_20;
while ( 1 )
{
v17 = sub_2F478(a1, v15);
if ( v17 == -1 )
goto LABEL_19;
v16 = v14[1];
++v14;
v15 = v16;
v13 += v17;
if ( !v16 )
goto LABEL_30;
}
}
v13 = sub_2F478(a1, *(char **)(a1 + 24));
if ( v13 != -1 )
{
LABEL_30:
if ( (v13 & 0xFFFFFFFFFFE00000LL) != 0 )
{
*(_DWORD *)(a1 + 32) &= 0x7FFu;
if ( !v13 )
goto LABEL_20;
}
else
{
*(_DWORD *)(a1 + 32) = *(_DWORD *)(a1 + 32) & 0x7FF | ((_DWORD)v13 << 11);
if ( !v13 )
goto LABEL_20;
}
LABEL_32:
v78 = malloc(8 * (v13 + 2));
if ( !v78 )
goto LABEL_20;
v78[1] = 0LL;
v22 = malloc(8 * (v13 + 2));
v79 = v22;
if ( v22 )
v22[1] = 0LL;
if ( (*(_BYTE *)(a1 + 32) & 2) != 0 )
{
v23 = *(char ***)(a1 + 24);
v24 = *v23;
if ( !*v23 )
goto LABEL_96;
do
{
sub_2F600(a1, (__int64 *)&v78, v24);
v25 = v23[1];
++v23;
v24 = v25;
}
while ( v25 );
}
else
{
sub_2F600(a1, (__int64 *)&v78, *(char **)(a1 + 24));
}
v68 = v78;
v69 = v78;
if ( !v78 || v78[1] == v13 )
{
if ( (*(_BYTE *)(a1 + 32) & 4) != 0 )
{
v26 = sub_2F3B8;
}
else if ( (*(_WORD *)(a1 + 32) & 0x7F8) != 0 )
{
v26 = sub_2F1A0;
}
else
{
v26 = sub_2ECA0;
}
v46 = (__int64)v79;
if ( !v79 )
{
sub_2EDB8(a1, v26, (__int64)v78);
LABEL_85:
v67 = v78;
*v78 = *(_QWORD *)(a1 + 24);
*(_QWORD *)(a1 + 24) = v67;
*(_BYTE *)(a1 + 32) |= 1u;
goto LABEL_20;
}
v71 = v78[1];
if ( v71 )
{
v47 = (char *)(v78 + 2);
v48 = (__int64 *)&unk_4D4F8;
v49 = v79 + 2;
v50 = v78 + 2;
v70 = 0LL;
ptr = (__int64 **)(v79 + 2);
v75 = v78 + 2;
while ( 1 )
{
*ptr = v48;
if ( v71 == ++v70 )
break;
v48 = v50;
if ( v50 == (__int64 *)&unk_4D4F8 )
{
LABEL_68:
v48 = (__int64 *)&unk_4D4F8;
++v50;
++ptr;
}
else
{
while ( (v26(a1, v50[1], *v48) & 0x80000000) != 0 )
{
v51 = (char *)(v46 + (char *)v48 - v47);
v48 = (__int64 *)*((_QWORD *)v51 + 2);
*((_QWORD *)v51 + 2) = 0LL;
if ( v48 == (__int64 *)&unk_4D4F8 )
goto LABEL_68;
}
++v50;
++ptr;
}
}
v52 = 0LL;
v53 = 0LL;
for ( j = 0LL; j != v71; ++j )
{
if ( *v49 )
{
v55 = v53 + 2;
++v53;
v69[v55] = *v75;
}
else
{
v56 = v52 + 2;
++v52;
*(_QWORD *)(v46 + 8 * v56) = *v75;
}
++v49;
++v75;
}
v57 = (__int64)v79;
v69 = v78;
}
else
{
v57 = (__int64)v79;
v52 = 0LL;
v53 = 0LL;
}
v68[1] = v53;
*(_QWORD *)(v46 + 8) = v52;
if ( v69[1] + *(_QWORD *)(v57 + 8) == v13 )
{
sub_2EDB8(a1, v26, v57);
ptra = v79;
v58 = v79[1];
if ( v58 )
{
v59 = &v79[v58];
v76 = v78;
v60 = v78[1];
do
{
while ( 1 )
{
v61 = v58 - 1;
v62 = v59[1];
if ( v60 )
break;
LABEL_86:
v60 = 0LL;
v65 = v76;
--v59;
--v58;
v76[v61 + 2] = v62;
if ( !v61 )
goto LABEL_83;
}
v63 = &v76[v60 + 1];
while ( 1 )
{
v64 = v60 - 1;
if ( (int)v26(a1, *v63, v62) <= 0 )
break;
--v60;
v63[v58] = *v63;
--v63;
if ( !v64 )
goto LABEL_86;
}
v65 = v76;
--v59;
--v58;
v76[v60 + 2 + v61] = v62;
}
while ( v61 );
LABEL_83:
v66 = ptra[1];
ptra = v79;
v65[1] += v66;
}
free(ptra);
goto LABEL_85;
}
}
LABEL_96:
abort();
}
LABEL_19:
*(_QWORD *)(a1 + 24) = &unk_4D500;
*(_QWORD *)(a1 + 32) = 0LL;
*(_WORD *)(a1 + 32) = 2040;
LABEL_20:
if ( *(_QWORD *)a1 > a2 )
return 0LL;
v3 = *(_BYTE *)(a1 + 32);
if ( (v3 & 1) != 0 )
goto LABEL_2;
if ( (*(_BYTE *)(a1 + 32) & 2) == 0 )
return sub_2F230(a1, *(unsigned int **)(a1 + 24), a2);
v18 = *(unsigned int ***)(a1 + 24);
v19 = *v18;
if ( !*v18 )
return 0LL;
while ( 1 )
{
result = sub_2F230(a1, v19, a2);
if ( result )
break;
v20 = v18[1];
++v18;
v19 = v20;
if ( !v20 )
return 0LL;
}
return result;
}
//----- (000000000002FDE0) ----------------------------------------------------
__int64 __fastcall sub_2FDE0(__int64 *a1, unsigned __int64 a2, __int64 a3)
{
__int64 v3; // x10
int *v4; // x3
bool v5; // cc
__int64 v6; // x8
_QWORD *v7; // x4
__int64 v8; // x15
__int64 v9; // x16
unsigned __int16 v10; // w5
__int64 v11; // x4
unsigned __int64 v12; // x13
unsigned __int64 v13; // x14
__int64 v14; // x11
int *v15; // x6
int *v16; // x12
int v17; // w0
unsigned __int64 v18; // x8
unsigned __int64 v19; // x0
__int64 v20; // x7
unsigned __int64 v21; // x7
_BYTE *v22; // x19
bool v24; // zf
_QWORD *v25; // x0
char v26; // w21
__int64 v27; // x22
__int64 v28; // x23
char *v30; // x0
char *v31; // x0
int v32; // w21
char *v33; // x24
__int64 v34; // x2
unsigned __int64 v35; // x5
unsigned int *v36; // x0
char v37; // w19
char *v38; // x0
__int64 v39; // x8
unsigned __int64 v40; // x7
char *v41; // x0
char *v42; // x0
unsigned __int64 v43; // x4
unsigned __int64 v44; // x1
char *v45; // x21
unsigned __int64 v46; // x3
unsigned __int64 v47; // x2
unsigned __int64 v48; // x2
_BYTE *v49; // x22
unsigned __int8 v50; // w23
int v51; // w0
_BYTE *v52; // x19
unsigned int *v53; // [xsp+40h] [xbp-40h] BYREF
unsigned __int64 v54; // [xsp+48h] [xbp-38h] BYREF
unsigned __int64 v55[6]; // [xsp+50h] [xbp-30h] BYREF
v3 = *a1;
v4 = (int *)a1[2];
if ( *(_DWORD *)(a3 + 40) )
v5 = a2 > 0x2F;
else
v5 = 0;
if ( !v5 )
{
if ( a2 <= 0x19 )
return 0xFFFFFFFFLL;
goto LABEL_12;
}
if ( a1[4] != qword_4D060 )
{
v6 = a1[5];
goto LABEL_8;
}
v6 = a1[5];
if ( v6 != qword_4D508 )
{
LABEL_8:
qword_4D060 = a1[4];
v7 = &unk_4D548;
qword_4D508 = v6;
do
{
*(v7 - 6) = 0LL;
*(v7 - 5) = 0LL;
*(v7 - 1) = v7;
v7 += 6;
}
while ( &sysctlbyname != (_UNKNOWN *)v7 );
v8 = 0LL;
v9 = 0LL;
qword_4D690 = 0LL;
qword_4D510 = (__int64)&unk_4D518;
*(_DWORD *)(a3 + 40) = 0;
goto LABEL_13;
}
v39 = qword_4D510;
if ( !qword_4D510 )
{
LABEL_12:
v8 = 0LL;
v9 = 0LL;
LABEL_13:
v10 = *((_WORD *)a1 + 12);
if ( !v10 )
return 0LL;
v11 = 0LL;
v12 = 0LL;
v13 = 0LL;
v14 = 0LL;
v15 = 0LL;
v16 = 0LL;
while ( 1 )
{
v17 = *v4;
if ( *v4 != 1 )
break;
v18 = *(_QWORD *)a3;
v19 = v3 + *((_QWORD *)v4 + 2);
if ( v19 > *(_QWORD *)a3 )
{
LABEL_18:
++v11;
v4 += 14;
if ( v10 == v11 )
goto LABEL_28;
}
else
{
v20 = *((_QWORD *)v4 + 5);
++v11;
v4 += 14;
v21 = v19 + v20;
if ( v18 < v21 )
v12 = v21;
if ( v18 < v21 )
v13 = v19;
if ( v18 < v21 )
v14 = 1LL;
if ( v10 == v11 )
{
LABEL_28:
if ( v14 )
{
if ( a2 > 0x2F )
{
if ( v8 )
v24 = v9 == 0;
else
v24 = 1;
if ( v24 )
{
v25 = (_QWORD *)qword_4D510;
}
else
{
*(_QWORD *)(v9 + 40) = *(_QWORD *)(v8 + 40);
v25 = (_QWORD *)v8;
*(_QWORD *)(v8 + 40) = qword_4D510;
qword_4D510 = v8;
}
*v25 = v13;
v25[1] = v12;
v25[2] = v3;
v25[3] = v16;
v25[4] = v15;
}
goto LABEL_30;
}
return 0LL;
}
}
}
if ( v17 == 1685382480 )
{
v16 = v4;
}
else if ( v17 == 2 )
{
v15 = v4;
}
goto LABEL_18;
}
v8 = qword_4D510;
v9 = 0LL;
v40 = *(_QWORD *)a3;
while ( *(_QWORD *)v8 > v40 || *(_QWORD *)(v8 + 8) <= v40 )
{
if ( *(_OWORD *)v8 == 0LL || !*(_QWORD *)(v8 + 40) )
goto LABEL_13;
v9 = v8;
v8 = *(_QWORD *)(v8 + 40);
}
v3 = *(_QWORD *)(v8 + 16);
v16 = *(int **)(v8 + 24);
if ( qword_4D510 != v8 )
{
*(_QWORD *)(v9 + 40) = *(_QWORD *)(v8 + 40);
*(_QWORD *)(v8 + 40) = v39;
qword_4D510 = v8;
}
LABEL_30:
if ( !v16 )
return 0LL;
v22 = (_BYTE *)(v3 + *((_QWORD *)v16 + 2));
if ( *v22 != 1 )
return 1LL;
v26 = v22[1];
v27 = a3 + 8;
v28 = a3 + 16;
v30 = (char *)sub_2F130(v26, a3 + 8, a3 + 16);
v31 = sub_2EEF0(v26, v30, v22 + 4, (unsigned __int64 *)&v53);
v32 = (unsigned __int8)v22[2];
v33 = v31;
if ( v32 == 255 || v22[3] != 59 )
goto LABEL_44;
v41 = (char *)sub_2F130(v32, v27, v28);
v42 = sub_2EEF0(v32, v41, v33, &v54);
if ( !v54 )
return 1LL;
if ( ((unsigned __int8)v42 & 3) != 0 )
{
LABEL_44:
v34 = *(_QWORD *)a3;
v35 = *(_QWORD *)(a3 + 8);
v55[2] = *(_QWORD *)(a3 + 16);
v55[3] = (unsigned __int64)v53;
v55[4] = 4LL;
v55[0] = 0LL;
v55[1] = v35;
v36 = sub_2F230((__int64)v55, v53, v34);
*(_QWORD *)(a3 + 32) = v36;
if ( v36 )
{
v37 = sub_2F020((__int64)v36 - (int)v36[1] + 4);
v38 = (char *)sub_2F130(v37, v27, v28);
sub_2EEF0(v37, v38, (char *)(*(_QWORD *)(a3 + 32) + 8LL), &v54);
*(_QWORD *)(a3 + 24) = v54;
}
return 1LL;
}
v43 = *(_QWORD *)a3;
if ( *(_QWORD *)a3 < (unsigned __int64)&v22[*(int *)v42] )
return 1LL;
v44 = v54 - 1;
v45 = &v42[8 * v54 - 8];
if ( v43 >= (unsigned __int64)&v22[*(int *)v45] )
goto LABEL_69;
if ( v54 == 1 )
goto LABEL_72;
v46 = 0LL;
while ( 1 )
{
v48 = (v46 + v44) >> 1;
v45 = &v42[8 * v48];
if ( v43 < (unsigned __int64)&v22[*(int *)v45] )
{
v44 = (v46 + v44) >> 1;
goto LABEL_65;
}
v47 = v48 + 1;
if ( v43 < (unsigned __int64)&v22[*((int *)v45 + 2)] )
break;
v46 = v47;
LABEL_65:
if ( v44 <= v46 )
goto LABEL_72;
}
if ( v46 >= v44 )
LABEL_72:
abort();
LABEL_69:
v49 = &v22[*((int *)v45 + 1)];
v50 = sub_2F020((__int64)&v49[-*((int *)v49 + 1) + 4]);
v51 = sub_2EE70(v50);
sub_2EEF0(v50 & 0xF, 0LL, &v49[v51 + 8], v55);
v52 = &v22[*(int *)v45];
if ( *(_QWORD *)a3 < (unsigned __int64)&v52[v55[0]] )
*(_QWORD *)(a3 + 32) = v49;
*(_QWORD *)(a3 + 24) = v52;
return 1LL;
}
// 4D060: using guessed type __int64 qword_4D060;
// 4D508: using guessed type __int64 qword_4D508;
// 4D510: using guessed type __int64 qword_4D510;
// 4D690: using guessed type __int64 qword_4D690;
//----- (0000000000030238) ----------------------------------------------------
__int64 __fastcall sub_30238(__int64 a1, _QWORD *a2)
{
a2[4] = 0LL;
*a2 = -1LL;
a2[1] = 0LL;
a2[2] = 0LL;
a2[3] = a1;
*((_WORD *)a2 + 16) = 2040;
pthread_mutex_lock((pthread_mutex_t *)&unk_4D068);
a2[5] = qword_4D698;
qword_4D698 = (__int64)a2;
return pthread_mutex_unlock((pthread_mutex_t *)&unk_4D068);
}
// 4D698: using guessed type __int64 qword_4D698;
//----- (0000000000030298) ----------------------------------------------------
_DWORD *__fastcall sub_30298(_DWORD *result, _QWORD *a2, __int64 a3, __int64 a4)
{
if ( result )
{
if ( *result )
{
a2[4] = 0LL;
*a2 = -1LL;
a2[1] = a3;
a2[2] = a4;
a2[3] = result;
*((_WORD *)a2 + 16) = 2040;
pthread_mutex_lock((pthread_mutex_t *)&unk_4D068);
a2[5] = qword_4D698;
qword_4D698 = (__int64)a2;
return (_DWORD *)pthread_mutex_unlock((pthread_mutex_t *)&unk_4D068);
}
}
return result;
}
// 4D698: using guessed type __int64 qword_4D698;
//----- (0000000000030308) ----------------------------------------------------
__int64 __fastcall sub_30308(__int64 a1, _QWORD *a2)
{
if ( a1 )
{
if ( *(_DWORD *)a1 )
return sub_30238(a1, a2);
}
return a1;
}
//----- (0000000000030320) ----------------------------------------------------
_DWORD *__fastcall sub_30320(_DWORD *result)
{
__int64 v1; // x19
_QWORD *v2; // x0
if ( *result )
{
v1 = (__int64)result;
v2 = malloc(0x30uLL);
return (_DWORD *)sub_30238(v1, v2);
}
return result;
}
//----- (0000000000030360) ----------------------------------------------------
__int64 __fastcall sub_30360(__int64 a1, _QWORD *a2, __int64 a3, __int64 a4)
{
__int16 v5; // w1
a2[4] = 0LL;
*((_BYTE *)a2 + 32) = 2;
*a2 = -1LL;
a2[1] = a3;
v5 = *((_WORD *)a2 + 16);
a2[2] = a4;
a2[3] = a1;
*((_WORD *)a2 + 16) = v5 | 0x7F8;
pthread_mutex_lock((pthread_mutex_t *)&unk_4D068);
a2[5] = qword_4D698;
qword_4D698 = (__int64)a2;
return pthread_mutex_unlock((pthread_mutex_t *)&unk_4D068);
}
// 4D698: using guessed type __int64 qword_4D698;
//----- (00000000000303D0) ----------------------------------------------------
__int64 __fastcall sub_303D0(__int64 a1, _QWORD *a2)
{
return sub_30360(a1, a2, 0LL, 0LL);
}
//----- (00000000000303E0) ----------------------------------------------------
__int64 __fastcall sub_303E0(__int64 a1)
{
_QWORD *v2; // x0
v2 = malloc(0x30uLL);
return sub_30360(a1, v2, 0LL, 0LL);
}
//----- (0000000000030418) ----------------------------------------------------
__int64 __fastcall sub_30418(_DWORD *a1)
{
__int64 v2; // x0
__int64 *v3; // x1
__int64 v5; // x19
__int64 *v6; // x0
if ( !a1 || !*a1 )
return 0LL;
pthread_mutex_lock((pthread_mutex_t *)&unk_4D068);
v2 = qword_4D698;
if ( qword_4D698 )
{
if ( a1 == *(_DWORD **)(qword_4D698 + 24) )
{
v5 = qword_4D698;
v6 = &qword_4D698;
}
else
{
while ( 1 )
{
v5 = *(_QWORD *)(v2 + 40);
if ( !v5 )
goto LABEL_9;
if ( a1 == *(_DWORD **)(v5 + 24) )
break;
v2 = *(_QWORD *)(v2 + 40);
}
v6 = (__int64 *)(v2 + 40);
}
*v6 = *(_QWORD *)(v5 + 40);
goto LABEL_18;
}
LABEL_9:
v5 = qword_4D6A0;
if ( !qword_4D6A0 )
{
LABEL_20:
pthread_mutex_unlock((pthread_mutex_t *)&unk_4D068);
abort();
}
v3 = &qword_4D6A0;
while ( (*(_BYTE *)(v5 + 32) & 1) == 0 )
{
if ( a1 == *(_DWORD **)(v5 + 24) )
{
*v3 = *(_QWORD *)(v5 + 40);
goto LABEL_18;
}
LABEL_12:
v3 = (__int64 *)(v5 + 40);
v5 = *(_QWORD *)(v5 + 40);
if ( !v5 )
goto LABEL_20;
}
if ( a1 != **(_DWORD ***)(v5 + 24) )
goto LABEL_12;
*v3 = *(_QWORD *)(v5 + 40);
free(*(void **)(v5 + 24));
LABEL_18:
pthread_mutex_unlock((pthread_mutex_t *)&unk_4D068);
return v5;
}
// 4D698: using guessed type __int64 qword_4D698;
// 4D6A0: using guessed type __int64 qword_4D6A0;
//----- (0000000000030558) ----------------------------------------------------
void __fastcall sub_30558(_DWORD *a1)
{
void *v1; // x0
if ( *a1 )
{
v1 = (void *)sub_30418(a1);
free(v1);
}
}
//----- (0000000000030580) ----------------------------------------------------
__int64 __fastcall sub_30580(unsigned __int64 a1, _QWORD *a2)
{
__int64 i; // x19
unsigned int *v5; // x24
char v6; // w0
__int64 v7; // x1
unsigned __int8 v8; // w0
char v9; // w20
char *v10; // x0
__int64 result; // x0
_QWORD *v12; // x1
__int64 *v13; // x4
__int64 v14; // x2
__int64 v15; // x1
unsigned __int64 v16; // [xsp+40h] [xbp+40h] BYREF
__int64 v17; // [xsp+48h] [xbp+48h]
__int64 v18; // [xsp+50h] [xbp+50h]
__int64 v19; // [xsp+58h] [xbp+58h]
__int64 v20; // [xsp+60h] [xbp+60h]
int v21; // [xsp+68h] [xbp+68h]
pthread_mutex_lock((pthread_mutex_t *)&unk_4D068);
i = qword_4D6A0;
if ( !qword_4D6A0 )
goto LABEL_10;
while ( a1 < *(_QWORD *)i )
{
i = *(_QWORD *)(i + 40);
if ( !i )
goto LABEL_10;
}
v5 = sub_2F748(i, a1);
if ( v5 )
{
LABEL_6:
pthread_mutex_unlock((pthread_mutex_t *)&unk_4D068);
v6 = *(_BYTE *)(i + 32);
v7 = *(_QWORD *)(i + 16);
*a2 = *(_QWORD *)(i + 8);
a2[1] = v7;
if ( (v6 & 4) != 0 )
v8 = sub_2F020((__int64)v5 - (int)v5[1] + 4);
else
v8 = (unsigned __int64)*(unsigned __int16 *)(i + 32) >> 3;
v9 = v8;
v10 = (char *)sub_2F130(v8, i + 8, i + 16);
sub_2EEF0(v9, v10, (char *)v5 + 8, &v16);
a2[2] = v16;
return (__int64)v5;
}
else
{
LABEL_10:
for ( i = qword_4D698; qword_4D698; i = qword_4D698 )
{
qword_4D698 = *(_QWORD *)(i + 40);
v5 = sub_2F748(i, a1);
v12 = (_QWORD *)qword_4D6A0;
if ( qword_4D6A0 && *(_QWORD *)qword_4D6A0 >= *(_QWORD *)i )
{
do
{
v13 = v12 + 5;
v12 = (_QWORD *)v12[5];
}
while ( v12 && *v12 >= *(_QWORD *)i );
*(_QWORD *)(i + 40) = v12;
*v13 = i;
if ( v5 )
goto LABEL_6;
}
else
{
*(_QWORD *)(i + 40) = qword_4D6A0;
qword_4D6A0 = i;
if ( v5 )
goto LABEL_6;
}
}
pthread_mutex_unlock((pthread_mutex_t *)&unk_4D068);
v20 = 0LL;
v16 = a1;
v17 = 0LL;
v18 = 0LL;
v19 = 0LL;
v21 = 1;
if ( (dl_iterate_phdr((int (*)(struct dl_phdr_info *, size_t, void *))sub_2FDE0, &v16) & 0x80000000) != 0 )
{
return 0LL;
}
else
{
result = v20;
if ( v20 )
{
v14 = v18;
v15 = v19;
*a2 = v17;
a2[1] = v14;
a2[2] = v15;
}
}
}
return result;
}
// 4D698: using guessed type __int64 qword_4D698;
// 4D6A0: using guessed type __int64 qword_4D6A0;
//----- (0000000000030748) ----------------------------------------------------
unsigned __int64 __fastcall sub_30748(unsigned __int64 result)
{
if ( (result & 1) != 0 )
_ReadStatusReg(ARM64_SYSREG(3, 3, 4, 4, 1));
if ( (result & 2) != 0 )
_ReadStatusReg(ARM64_SYSREG(3, 3, 4, 4, 1));
if ( (result & 4) != 0 )
_ReadStatusReg(ARM64_SYSREG(3, 3, 4, 4, 1));
if ( (result & 8) != 0 )
_ReadStatusReg(ARM64_SYSREG(3, 3, 4, 4, 1));
if ( (result & 0x10) != 0 )
return _ReadStatusReg(ARM64_SYSREG(3, 3, 4, 4, 1));
return result;
}
// nfuncs=734 queued=423 decompiled=423 lumina nreq=0 worse=0 better=0
#error "There were 2 decompilation failure(s) on 423 function(s)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment